Просмотр исходного кода

更新脚本为使用编译缓存

roo00 6 лет назад
Родитель
Сommit
3fceb1bd8a
100 измененных файлов с 1996 добавлено и 3198 удалено
  1. 27 27
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ProcessPlatform.java
  2. 0 33
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Query.java
  3. 0 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/message/MessageConnector.java
  4. 5 5
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/organization/EmpowerLog.java
  5. 88 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/script/ScriptFactory.java
  6. 108 108
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/scripting/AbstractRuntime.java
  7. 7 7
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/scripting/ResultObject.java
  8. 189 189
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/scripting/ScriptHelper.java
  9. 23 23
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/scripting/Scripting.java
  10. 253 253
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/scripting/ScriptingEngine.java
  11. 8 6
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_program_center.java
  12. 25 0
      o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/poi/TestClient.java
  13. 6 4
      o2server/x_console/src/main/java/com/x/server/console/action/ActionDumpStorage.java
  14. 11 10
      o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/oauth/ActionInfo.java
  15. 56 54
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/identity/ActionCreate.java
  16. 11 6
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/ActionInput.java
  17. 0 2
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/BaseAction.java
  18. 112 0
      o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empower/ActionManagerListPaging.java
  19. 19 0
      o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empower/EmpowerAction.java
  20. 30 8
      o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empowerlog/ActionListToCurrentPersonPaging.java
  21. 29 3
      o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empowerlog/ActionListWithCurrentPersonPaging.java
  22. 127 0
      o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empowerlog/ActionManagerListPaging.java
  23. 29 8
      o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empowerlog/EmpowerLogAction.java
  24. 14 15
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/accredit/EmpowerLog.java
  25. 0 2
      o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/ThisApplication.java
  26. 0 153
      o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/schedule/CleanElementVersion.java
  27. 0 4
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/ActionApplication.java
  28. 0 10
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/ToolJaxrsFilter.java
  29. 0 10
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/UtilJaxrsFilter.java
  30. 0 1
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionUpdateCallback.java
  31. 6 5
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/file/ActionListWithApplication.java
  32. 2 1
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ActionGetAllowRerouteTo.java
  33. 2 1
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ActionGetComplex.java
  34. 2 1
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ActionListAvailableIdentityWithProcess.java
  35. 227 157
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ActionListWithPersonWithApplication.java
  36. 0 12
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ExceptionApplicationNotExist.java
  37. 0 12
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ExceptionProcessNotExist.java
  38. 15 12
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionCreateWithWork.java
  39. 17 14
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionCreateWithWorkCompleted.java
  40. 0 2
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionManageProcessing.java
  41. 2 3
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionProcessing.java
  42. 10 10
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionManageDelete.java
  43. 8 16
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/BaseAction.java
  44. 25 21
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/review/ActionCreateWithWork.java
  45. 15 11
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/review/ActionCreateWithWorkCompleted.java
  46. 2 2
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/review/ReviewAction.java
  47. 0 15
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionProcessing.java
  48. 17 10
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionReset.java
  49. 17 13
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionManageDelete.java
  50. 11 10
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionPress.java
  51. 4 5
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/TaskCompletedAction.java
  52. 0 69
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/tool/ActionOrganizationEval.java
  53. 0 60
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/tool/ActionTaskCompletedOrphanWorkWorkCompleted.java
  54. 0 59
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/tool/ActionTaskOrphanManual.java
  55. 0 7
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/tool/BaseAction.java
  56. 0 68
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/tool/ToolAction.java
  57. 0 78
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/util/ActionReorgTaskCompletedLatest.java
  58. 0 30
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/util/BaseAction.java
  59. 0 46
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/util/UtilAction.java
  60. 22 19
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionCheckDraft.java
  61. 44 46
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionCloseCheck.java
  62. 9 8
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionCreate.java
  63. 7 6
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionDelete.java
  64. 11 3
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListWithWorkOrWorkCompleted.java
  65. 0 259
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListWithWorkOrWorkCompleted2.java
  66. 0 35
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutAttachment.java
  67. 0 36
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutRead.java
  68. 0 36
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutReadCompleted.java
  69. 0 36
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutReview.java
  70. 0 25
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutSerialNumber.java
  71. 0 36
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutTask.java
  72. 0 34
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutTaskCompleted.java
  73. 0 36
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutWork.java
  74. 0 43
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutWorkCompleted.java
  75. 0 88
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutActivity.java
  76. 0 15
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutAgent.java
  77. 0 35
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutApplication.java
  78. 0 13
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutBegin.java
  79. 0 13
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutCancel.java
  80. 0 13
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutChoice.java
  81. 0 14
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutDelay.java
  82. 0 15
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutEmbed.java
  83. 0 12
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutEnd.java
  84. 0 14
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutForm.java
  85. 0 14
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutInvoke.java
  86. 0 15
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutManual.java
  87. 0 14
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutMerge.java
  88. 0 14
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutMessage.java
  89. 0 14
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutParallel.java
  90. 0 151
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutProcess.java
  91. 0 13
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutQueryStat.java
  92. 0 14
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutQueryView.java
  93. 0 13
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutRoute.java
  94. 0 29
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutScript.java
  95. 0 14
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutService.java
  96. 0 14
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutSplit.java
  97. 16 0
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/TaskCompleted.java
  98. 33 0
      o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/Business.java
  99. 213 213
      o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ScriptHelper.java
  100. 82 82
      o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ScriptHelperFactory.java

+ 27 - 27
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ProcessPlatform.java

@@ -46,9 +46,9 @@ public class ProcessPlatform extends ConfigObject {
 		this.formVersionCount = DEFAULT_FORMVERSIONCOUNT;
 		this.processVersionCount = DEFAULT_PROCESSVERSIONCOUNT;
 		this.scriptVersionCount = DEFAULT_SCRIPTVERSIONCOUNT;
-		this.formVersionPeriod = DEFAULT_FORMVERSIONPERIOD;
-		this.processVersionPeriod = DEFAULT_PROCESSVERSIONPERIOD;
-		this.scriptVersionPeriod = DEFAULT_SCRIPTVERSIONPERIOD;
+//		this.formVersionPeriod = DEFAULT_FORMVERSIONPERIOD;
+//		this.processVersionPeriod = DEFAULT_PROCESSVERSIONPERIOD;
+//		this.scriptVersionPeriod = DEFAULT_SCRIPTVERSIONPERIOD;
 		this.docToWordType = DEFAULT_DOCTOWORDTYPE;
 		this.docToWordDefaultFileName = DEFAULT_DOCTOWORDDEFAULTFILENAME;
 		this.docToWordDefaultSite = DEFAULT_DOCTOWORDDEFAULTSITE;
@@ -75,14 +75,14 @@ public class ProcessPlatform extends ConfigObject {
 	@FieldDescribe("脚本历史版本保留数量,0为不保留.")
 	private Integer scriptVersionCount;
 
-	@FieldDescribe("表单历史版本保留天数.")
-	private Integer formVersionPeriod;
-
-	@FieldDescribe("流程历史版本保留天数.")
-	private Integer processVersionPeriod;
-
-	@FieldDescribe("脚本历史版本保留天数.")
-	private Integer scriptVersionPeriod;
+//	@FieldDescribe("表单历史版本保留天数.")
+//	private Integer formVersionPeriod;
+//
+//	@FieldDescribe("流程历史版本保留天数.")
+//	private Integer processVersionPeriod;
+//
+//	@FieldDescribe("脚本历史版本保留天数.")
+//	private Integer scriptVersionPeriod;
 
 	@FieldDescribe("HTML版式公文转换成Word文件方式,local,cloud.")
 	private String docToWordType;
@@ -112,20 +112,20 @@ public class ProcessPlatform extends ConfigObject {
 		return scriptVersionCount == null ? DEFAULT_SCRIPTVERSIONCOUNT : this.scriptVersionCount;
 	}
 
-	public Integer getFormVersionPeriod() {
-		return (formVersionPeriod == null || formVersionPeriod < 1) ? DEFAULT_FORMVERSIONPERIOD
-				: this.formVersionPeriod;
-	}
-
-	public Integer getProcessVersionPeriod() {
-		return (processVersionPeriod == null || processVersionPeriod < 1) ? DEFAULT_PROCESSVERSIONPERIOD
-				: this.processVersionPeriod;
-	}
-
-	public Integer getScriptVersionPeriod() {
-		return (scriptVersionPeriod == null || scriptVersionPeriod < 1) ? DEFAULT_SCRIPTVERSIONPERIOD
-				: this.scriptVersionPeriod;
-	}
+//	public Integer getFormVersionPeriod() {
+//		return (formVersionPeriod == null || formVersionPeriod < 1) ? DEFAULT_FORMVERSIONPERIOD
+//				: this.formVersionPeriod;
+//	}
+//
+//	public Integer getProcessVersionPeriod() {
+//		return (processVersionPeriod == null || processVersionPeriod < 1) ? DEFAULT_PROCESSVERSIONPERIOD
+//				: this.processVersionPeriod;
+//	}
+//
+//	public Integer getScriptVersionPeriod() {
+//		return (scriptVersionPeriod == null || scriptVersionPeriod < 1) ? DEFAULT_SCRIPTVERSIONPERIOD
+//				: this.scriptVersionPeriod;
+//	}
 
 	public String getDocToWordType() {
 		return StringUtils.isEmpty(docToWordType) ? DEFAULT_DOCTOWORDTYPE : docToWordType;
@@ -535,10 +535,10 @@ public class ProcessPlatform extends ConfigObject {
 		public final static Integer DEFAULT_COUNT = 3;
 
 		@FieldDescribe("提醒间隔(分钟)")
-		private Integer intervalMinutes;
+		private Integer intervalMinutes = DEFAULT_INTERVALMINUTES;
 
 		@FieldDescribe("提醒数量限制.")
-		private Integer count;
+		private Integer count = DEFAULT_COUNT;
 
 		public Integer getIntervalMinutes() {
 			return (intervalMinutes == null || intervalMinutes < 1) ? DEFAULT_INTERVALMINUTES : this.intervalMinutes;

+ 0 - 33
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Query.java

@@ -53,15 +53,6 @@ public class Query extends ConfigObject {
 	@FieldDescribe("tess使用语言.")
 	private String tessLanguage = "chi_sim";
 
-//	@FieldDescribe("可使用搜索人员.")
-//	private List<String> searchPeople = new ArrayList<>();
-//
-//	@FieldDescribe("可使用搜索群组.")
-//	private List<String> searchGroups = new ArrayList<>();
-//
-//	@FieldDescribe("可使用角色.")
-//	private List<String> searchRoles = new ArrayList<>();
-
 	public static final Boolean default_extractOffice = true;
 	public static final Boolean default_extractPdf = true;
 	public static final Boolean default_extractText = true;
@@ -100,18 +91,6 @@ public class Query extends ConfigObject {
 		return this.crawlWorkCompleted == null ? new CrawlWorkCompleted() : this.crawlWorkCompleted;
 	}
 
-//	public List<String> getSearchPeople() {
-//		return searchPeople == null ? new ArrayList<String>() : this.searchPeople;
-//	}
-//
-//	public List<String> getSearchGroups() {
-//		return searchGroups == null ? new ArrayList<String>() : this.searchGroups;
-//	}
-//
-//	public List<String> getSearchRoles() {
-//		return searchRoles == null ? new ArrayList<String>() : this.searchRoles;
-//	}
-
 	public void save() throws Exception {
 		File file = new File(Config.base(), Config.PATH_CONFIG_QUERY);
 		FileUtils.write(file, XGsonBuilder.toJson(this), DefaultCharset.charset);
@@ -302,16 +281,4 @@ public class Query extends ConfigObject {
 		this.tessLanguage = tessLanguage;
 	}
 
-//	public void setSearchPeople(List<String> searchPeople) {
-//		this.searchPeople = searchPeople;
-//	}
-//
-//	public void setSearchGroups(List<String> searchGroups) {
-//		this.searchGroups = searchGroups;
-//	}
-//
-//	public void setSearchRoles(List<String> searchRoles) {
-//		this.searchRoles = searchRoles;
-//	}
-
 }

+ 0 - 1
o2server/x_base_core_project/src/main/java/com/x/base/core/project/message/MessageConnector.java

@@ -171,7 +171,6 @@ public class MessageConnector {
 					e.printStackTrace();
 				}
 			}
-			LoggerFactory.print(MessageConnector.class, "connectorThread on {} stoped!", context.path());
 		}
 	}
 

+ 5 - 5
o2server/x_base_core_project/src/main/java/com/x/base/core/project/organization/EmpowerLog.java

@@ -47,7 +47,7 @@ public class EmpowerLog extends GsonPropertyObject {
 	private String work;
 
 	@FieldDescribe("委托时间.")
-	private Date trustTime;
+	private Date empowerTime;
 
 	@FieldDescribe("标题.")
 	private String title;
@@ -107,8 +107,8 @@ public class EmpowerLog extends GsonPropertyObject {
 		return this;
 	}
 
-	public EmpowerLog setTrustTime(Date trustTime) {
-		this.trustTime = trustTime;
+	public EmpowerLog setEmpowerTime(Date empowerTime) {
+		this.empowerTime = empowerTime;
 		return this;
 	}
 
@@ -167,8 +167,8 @@ public class EmpowerLog extends GsonPropertyObject {
 		return work;
 	}
 
-	public Date getTrustTime() {
-		return trustTime;
+	public Date getEmpowerTime() {
+		return empowerTime;
 	}
 
 	public String getTitle() {

+ 88 - 2
o2server/x_base_core_project/src/main/java/com/x/base/core/project/script/ScriptFactory.java

@@ -9,11 +9,13 @@ import javax.script.Compilable;
 import javax.script.CompiledScript;
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineManager;
-import javax.script.ScriptException;
 
 import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.commons.lang3.BooleanUtils;
 
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.config.Config;
 
@@ -29,7 +31,30 @@ public class ScriptFactory {
 
 	public static final String BINDING_NAME_RESOURCES = "resources";
 	public static final String BINDING_NAME_EFFECTIVEPERSON = "effectivePerson";
+	public static final String BINDING_NAME_WORKCONTEXT = "workContext";
+	public static final String BINDING_NAME_GSON = "gson";
+	public static final String BINDING_NAME_DATA = "data";
+	public static final String BINDING_NAME_ORGANIZATION = "organization";
+	public static final String BINDING_NAME_WEBSERVICESCLIENT = "webservicesClient";
+	public static final String BINDING_NAME_DICTIONARY = "dictionary";
+	public static final String BINDING_NAME_ROUTES = "routes";
+	public static final String BINDING_NAME_ROUTE = "routes";
+	public static final String BINDING_NAME_APPLICATIONS = "applications";
+
+	public static final String BINDING_NAME_ASSIGNDATA = "assignData";
+
+	public static final String BINDING_NAME_IDENTITY = "identity";
+
 	public static final String BINDING_NAME_PARAMETERS = "parameters";
+	public static final String BINDING_NAME_JAXRSRESPONSE = "jaxrsResponse";
+	public static final String BINDING_NAME_JAXWSRESPONSE = "jaxwsResponse";
+
+	public static final String BINDING_NAME_JAXRSBODY = "jaxrsBody";
+	public static final String BINDING_NAME_JAXRSHEAD = "jaxrsHead";
+
+	public static final String BINDING_NAME_SERVICEVALUE = "serviceValue";
+	public static final String BINDING_NAME_TASK = "task";
+	public static final String BINDING_NAME_EXPIRE = "expire";
 
 	public static CompiledScript initialServiceScriptText() throws Exception {
 		if (COMPILEDSCRIPT_INITIALSERVICESCRIPTTEXT == null) {
@@ -168,4 +193,65 @@ public class ScriptFactory {
 			iterator(o, results);
 		}
 	}
-}
+
+	public static List<String> extrectDistinguishedNameList(Object o) throws Exception {
+		List<String> list = new ArrayList<>();
+		if (null != o) {
+			if (o instanceof CharSequence) {
+				list.add(Objects.toString(o, ""));
+			} else if (o instanceof JsonObject) {
+				JsonObject jsonObject = (JsonObject) o;
+				if (jsonObject.has(JpaObject.DISTINGUISHEDNAME)) {
+					list.add(jsonObject.get(JpaObject.DISTINGUISHEDNAME).getAsString());
+				}
+			} else if (o instanceof JsonArray) {
+				for (JsonElement jsonElement : (JsonArray) o) {
+					if (jsonElement.isJsonObject()) {
+						JsonObject jsonObject = jsonElement.getAsJsonObject();
+						if (jsonObject.has(JpaObject.DISTINGUISHEDNAME)) {
+							list.add(jsonObject.get(JpaObject.DISTINGUISHEDNAME).getAsString());
+						}
+					}
+				}
+			} else if (o instanceof Iterable) {
+				for (Object obj : (Iterable<?>) o) {
+					if (null != obj) {
+						if (obj instanceof CharSequence) {
+							list.add(Objects.toString(obj, ""));
+						} else {
+							Object d = PropertyUtils.getProperty(obj, JpaObject.DISTINGUISHEDNAME);
+							if (null != d) {
+								list.add(Objects.toString(d, ""));
+							}
+						}
+					}
+				}
+			} else if (o instanceof ScriptObjectMirror) {
+				ScriptObjectMirror som = (ScriptObjectMirror) o;
+				if (som.isArray()) {
+					Object[] objs = (som.to(Object[].class));
+					for (Object obj : objs) {
+						if (null != obj) {
+							if (obj instanceof CharSequence) {
+								list.add(Objects.toString(obj, ""));
+							} else {
+								Object d = PropertyUtils.getProperty(obj, JpaObject.DISTINGUISHEDNAME);
+								if (null != d) {
+									list.add(Objects.toString(d, ""));
+								}
+							}
+						}
+					}
+				} else {
+					Object d = PropertyUtils.getProperty(o, JpaObject.DISTINGUISHEDNAME);
+					if (null != d) {
+						list.add(Objects.toString(d, ""));
+					}
+				}
+			}
+		}
+		return list;
+
+	}
+
+}

+ 108 - 108
o2server/x_base_core_project/src/main/java/com/x/base/core/project/scripting/AbstractRuntime.java

@@ -1,108 +1,108 @@
-package com.x.base.core.project.scripting;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.collections4.list.TreeList;
-
-import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.base.core.project.gson.GsonPropertyObject;
-
-public abstract class AbstractRuntime extends GsonPropertyObject {
-
-	@FieldDescribe("当前用户")
-	private String person = "";
-
-	@FieldDescribe("组织")
-	private List<String> unitList = new TreeList<>();
-
-	@FieldDescribe("群组")
-	private List<String> groupList = new TreeList<>();
-
-	@FieldDescribe("角色")
-	private List<String> roleList = new TreeList<>();
-
-	@FieldDescribe("所有群组")
-	private List<String> unitAllList = new TreeList<>();
-
-	@FieldDescribe("身份")
-	private List<String> identityList = new TreeList<>();
-
-	@FieldDescribe("参数")
-	private Map<String, Object> parameter = new HashMap<>();
-
-	@FieldDescribe("数量")
-	private Integer count = 0;
-
-	public Map<String, Object> getParameter() {
-		if (this.parameter == null) {
-			this.parameter = new HashMap<String, Object>();
-		}
-		return this.parameter;
-	}
-
-	public String getPerson() {
-		return person;
-	}
-
-	public void setPerson(String person) {
-		this.person = person;
-	}
-
-	public List<String> getUnitList() {
-		return unitList;
-	}
-
-	public void setUnitList(List<String> unitList) {
-		this.unitList = unitList;
-	}
-
-	public List<String> getGroupList() {
-		return groupList;
-	}
-
-	public void setGroupList(List<String> groupList) {
-		this.groupList = groupList;
-	}
-
-	public List<String> getRoleList() {
-		return roleList;
-	}
-
-	public void setRoleList(List<String> roleList) {
-		this.roleList = roleList;
-	}
-
-	public List<String> getUnitAllList() {
-		return unitAllList;
-	}
-
-	public void setUnitAllList(List<String> unitAllList) {
-		this.unitAllList = unitAllList;
-	}
-
-	public List<String> getIdentityList() {
-		return identityList;
-	}
-
-	public void setIdentityList(List<String> identityList) {
-		this.identityList = identityList;
-	}
-
-	public Integer getCount() {
-		return count;
-	}
-
-	public void setCount(Integer count) {
-		this.count = count;
-	}
-
-	public void setParameter(Map<String, Object> parameter) {
-		this.parameter = parameter;
-	}
-
-
- 
-
-}
+//package com.x.base.core.project.scripting;
+//
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+//import org.apache.commons.collections4.list.TreeList;
+//
+//import com.x.base.core.project.annotation.FieldDescribe;
+//import com.x.base.core.project.gson.GsonPropertyObject;
+//
+//public abstract class AbstractRuntime extends GsonPropertyObject {
+//
+//	@FieldDescribe("当前用户")
+//	private String person = "";
+//
+//	@FieldDescribe("组织")
+//	private List<String> unitList = new TreeList<>();
+//
+//	@FieldDescribe("群组")
+//	private List<String> groupList = new TreeList<>();
+//
+//	@FieldDescribe("角色")
+//	private List<String> roleList = new TreeList<>();
+//
+//	@FieldDescribe("所有群组")
+//	private List<String> unitAllList = new TreeList<>();
+//
+//	@FieldDescribe("身份")
+//	private List<String> identityList = new TreeList<>();
+//
+//	@FieldDescribe("参数")
+//	private Map<String, Object> parameter = new HashMap<>();
+//
+//	@FieldDescribe("数量")
+//	private Integer count = 0;
+//
+//	public Map<String, Object> getParameter() {
+//		if (this.parameter == null) {
+//			this.parameter = new HashMap<String, Object>();
+//		}
+//		return this.parameter;
+//	}
+//
+//	public String getPerson() {
+//		return person;
+//	}
+//
+//	public void setPerson(String person) {
+//		this.person = person;
+//	}
+//
+//	public List<String> getUnitList() {
+//		return unitList;
+//	}
+//
+//	public void setUnitList(List<String> unitList) {
+//		this.unitList = unitList;
+//	}
+//
+//	public List<String> getGroupList() {
+//		return groupList;
+//	}
+//
+//	public void setGroupList(List<String> groupList) {
+//		this.groupList = groupList;
+//	}
+//
+//	public List<String> getRoleList() {
+//		return roleList;
+//	}
+//
+//	public void setRoleList(List<String> roleList) {
+//		this.roleList = roleList;
+//	}
+//
+//	public List<String> getUnitAllList() {
+//		return unitAllList;
+//	}
+//
+//	public void setUnitAllList(List<String> unitAllList) {
+//		this.unitAllList = unitAllList;
+//	}
+//
+//	public List<String> getIdentityList() {
+//		return identityList;
+//	}
+//
+//	public void setIdentityList(List<String> identityList) {
+//		this.identityList = identityList;
+//	}
+//
+//	public Integer getCount() {
+//		return count;
+//	}
+//
+//	public void setCount(Integer count) {
+//		this.count = count;
+//	}
+//
+//	public void setParameter(Map<String, Object> parameter) {
+//		this.parameter = parameter;
+//	}
+//
+//
+// 
+//
+//}

+ 7 - 7
o2server/x_base_core_project/src/main/java/com/x/base/core/project/scripting/ResultObject.java

@@ -1,7 +1,7 @@
-package com.x.base.core.project.scripting;
-
-import com.x.base.core.project.gson.GsonPropertyObject;
-
-public class ResultObject extends GsonPropertyObject {
-
-}
+//package com.x.base.core.project.scripting;
+//
+//import com.x.base.core.project.gson.GsonPropertyObject;
+//
+//public class ResultObject extends GsonPropertyObject {
+//
+//}

+ 189 - 189
o2server/x_base_core_project/src/main/java/com/x/base/core/project/scripting/ScriptHelper.java

@@ -1,189 +1,189 @@
-package com.x.base.core.project.scripting;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Objects;
-
-import javax.script.ScriptEngine;
-import javax.script.ScriptEngineManager;
-
-import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.SystemUtils;
-
-import com.x.base.core.project.exception.ExceptionScriptEval;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-
-import jdk.nashorn.api.scripting.ScriptObjectMirror;
-
-public class ScriptHelper {
-
-	private static Logger logger = LoggerFactory.getLogger(ScriptHelper.class);
-
-	private static final String defaultLanguage = "JavaScript";
-
-	private static final String distinguishedName = "distinguishedName";
-
-	private ScriptEngineManager factory;
-	private ScriptEngine engine;
-
-	public ScriptHelper() throws Exception {
-		this(null, null);
-	}
-
-	public ScriptHelper(Map<String, Object> map) throws Exception {
-		this(map, null);
-	}
-
-	public ScriptHelper(String initialScriptText) throws Exception {
-		this(null, initialScriptText);
-	}
-
-	public ScriptHelper(Map<String, Object> map, String initialScriptText) throws Exception {
-		this.factory = new ScriptEngineManager();
-		this.engine = factory.getEngineByName(defaultLanguage);
-		if (null != map && (!map.isEmpty())) {
-			for (Entry<String, Object> entry : map.entrySet()) {
-				engine.put(entry.getKey(), entry.getValue());
-			}
-		}
-		if (StringUtils.isNotBlank(initialScriptText)) {
-			engine.eval(initialScriptText);
-		}
-	}
-
-	public void put(String key, Object value) {
-		this.engine.put(key, value);
-	}
-
-	public void put(Map<String, Object> map) {
-		for (Entry<String, Object> entry : map.entrySet()) {
-			engine.put(entry.getKey(), entry.getValue());
-		}
-	}
-
-	public Object eval(String scriptText) throws Exception {
-		StringBuffer sb = new StringBuffer();
-		try {
-			sb.append("(function(){").append(System.lineSeparator());
-			if (StringUtils.isNotEmpty(scriptText)) {
-				sb.append(scriptText).append(System.lineSeparator());
-			}
-			sb.append("})();");
-			Object obj = this.engine.eval(sb.toString());
-			return obj;
-		} catch (Exception e) {
-			throw new ExceptionScriptEval(e, sb.toString());
-		}
-	}
-
-	public List<String> evalAsStringList(String scriptText) throws Exception {
-		Object o = this.eval(scriptText);
-		return this.readAsStringList(o);
-	}
-
-	public String evalAsString(String scriptText) throws Exception {
-		Object o = this.eval(scriptText);
-		return Objects.toString(o);
-	}
-
-	public Boolean evalAsBoolean(String scriptText) throws Exception {
-		Object o = this.eval(scriptText);
-		return (Boolean) o;
-	}
-
-	public List<String> evalExtrectDistinguishedName(String scriptText) throws Exception {
-		List<String> list = new ArrayList<>();
-		Object o = this.eval(scriptText);
-		if (null != o) {
-			if (o instanceof CharSequence) {
-				list.add(Objects.toString(o, ""));
-			} else if (o instanceof Iterable) {
-				for (Object obj : (Iterable<?>) o) {
-					if (null != obj) {
-						if (obj instanceof CharSequence) {
-							list.add(Objects.toString(obj, ""));
-						} else {
-							Object d = PropertyUtils.getProperty(obj, distinguishedName);
-							if (null != d) {
-								list.add(Objects.toString(d, ""));
-							}
-						}
-					}
-				}
-			} else if (o instanceof ScriptObjectMirror) {
-				ScriptObjectMirror som = (ScriptObjectMirror) o;
-				if (som.isArray()) {
-					Object[] objs = (som.to(Object[].class));
-					for (Object obj : objs) {
-						if (null != obj) {
-							if (obj instanceof CharSequence) {
-								list.add(Objects.toString(obj, ""));
-							} else {
-								Object d = PropertyUtils.getProperty(obj, distinguishedName);
-								if (null != d) {
-									list.add(Objects.toString(d, ""));
-								}
-							}
-						}
-					}
-				} else {
-					Object d = PropertyUtils.getProperty(o, distinguishedName);
-					if (null != d) {
-						list.add(Objects.toString(d, ""));
-					}
-				}
-			}
-		}
-		return list;
-	}
-
-	private List<String> readAsStringList(Object obj) throws Exception {
-		List<String> list = new ArrayList<>();
-		for (Object o : this.iterator(obj)) {
-			list.add(Objects.toString(o));
-		}
-		return list;
-	}
-
-	private List<Object> iterator(Object obj) throws Exception {
-		List<Object> results = new ArrayList<>();
-		this.iterator(obj, results);
-		return results;
-	}
-
-	private void iterator(Object obj, List<Object> results) throws Exception {
-		if (null == obj) {
-			return;
-		}
-		List<Object> list = new ArrayList<>();
-		if (obj.getClass().isArray()) {
-			for (Object o : (Object[]) obj) {
-				list.add(o);
-			}
-		} else if (obj instanceof Collection) {
-			for (Object o : (Collection<?>) obj) {
-				list.add(o);
-			}
-		} else if (obj instanceof ScriptObjectMirror) {
-			ScriptObjectMirror som = (ScriptObjectMirror) obj;
-			if (som.isArray()) {
-				Object[] os = (som.to(Object[].class));
-				for (Object o : os) {
-					list.add(o);
-				}
-			} else {
-				results.add(som);
-			}
-		} else {
-			results.add(obj);
-		}
-		for (Object o : list) {
-			iterator(o, results);
-		}
-	}
-}
+//package com.x.base.core.project.scripting;
+//
+//import java.util.ArrayList;
+//import java.util.Collection;
+//import java.util.List;
+//import java.util.Map;
+//import java.util.Map.Entry;
+//import java.util.Objects;
+//
+//import javax.script.ScriptEngine;
+//import javax.script.ScriptEngineManager;
+//
+//import org.apache.commons.beanutils.PropertyUtils;
+//import org.apache.commons.lang3.StringUtils;
+//import org.apache.commons.lang3.SystemUtils;
+//
+//import com.x.base.core.project.exception.ExceptionScriptEval;
+//import com.x.base.core.project.logger.Logger;
+//import com.x.base.core.project.logger.LoggerFactory;
+//
+//import jdk.nashorn.api.scripting.ScriptObjectMirror;
+//
+//public class ScriptHelper {
+//
+//	private static Logger logger = LoggerFactory.getLogger(ScriptHelper.class);
+//
+//	private static final String defaultLanguage = "JavaScript";
+//
+//	private static final String distinguishedName = "distinguishedName";
+//
+//	private ScriptEngineManager factory;
+//	private ScriptEngine engine;
+//
+//	public ScriptHelper() throws Exception {
+//		this(null, null);
+//	}
+//
+//	public ScriptHelper(Map<String, Object> map) throws Exception {
+//		this(map, null);
+//	}
+//
+//	public ScriptHelper(String initialScriptText) throws Exception {
+//		this(null, initialScriptText);
+//	}
+//
+//	public ScriptHelper(Map<String, Object> map, String initialScriptText) throws Exception {
+//		this.factory = new ScriptEngineManager();
+//		this.engine = factory.getEngineByName(defaultLanguage);
+//		if (null != map && (!map.isEmpty())) {
+//			for (Entry<String, Object> entry : map.entrySet()) {
+//				engine.put(entry.getKey(), entry.getValue());
+//			}
+//		}
+//		if (StringUtils.isNotBlank(initialScriptText)) {
+//			engine.eval(initialScriptText);
+//		}
+//	}
+//
+//	public void put(String key, Object value) {
+//		this.engine.put(key, value);
+//	}
+//
+//	public void put(Map<String, Object> map) {
+//		for (Entry<String, Object> entry : map.entrySet()) {
+//			engine.put(entry.getKey(), entry.getValue());
+//		}
+//	}
+//
+//	public Object eval(String scriptText) throws Exception {
+//		StringBuffer sb = new StringBuffer();
+//		try {
+//			sb.append("(function(){").append(System.lineSeparator());
+//			if (StringUtils.isNotEmpty(scriptText)) {
+//				sb.append(scriptText).append(System.lineSeparator());
+//			}
+//			sb.append("})();");
+//			Object obj = this.engine.eval(sb.toString());
+//			return obj;
+//		} catch (Exception e) {
+//			throw new ExceptionScriptEval(e, sb.toString());
+//		}
+//	}
+//
+//	public List<String> evalAsStringList(String scriptText) throws Exception {
+//		Object o = this.eval(scriptText);
+//		return this.readAsStringList(o);
+//	}
+//
+//	public String evalAsString(String scriptText) throws Exception {
+//		Object o = this.eval(scriptText);
+//		return Objects.toString(o);
+//	}
+//
+//	public Boolean evalAsBoolean(String scriptText) throws Exception {
+//		Object o = this.eval(scriptText);
+//		return (Boolean) o;
+//	}
+//
+//	public List<String> evalExtrectDistinguishedName(String scriptText) throws Exception {
+//		List<String> list = new ArrayList<>();
+//		Object o = this.eval(scriptText);
+//		if (null != o) {
+//			if (o instanceof CharSequence) {
+//				list.add(Objects.toString(o, ""));
+//			} else if (o instanceof Iterable) {
+//				for (Object obj : (Iterable<?>) o) {
+//					if (null != obj) {
+//						if (obj instanceof CharSequence) {
+//							list.add(Objects.toString(obj, ""));
+//						} else {
+//							Object d = PropertyUtils.getProperty(obj, distinguishedName);
+//							if (null != d) {
+//								list.add(Objects.toString(d, ""));
+//							}
+//						}
+//					}
+//				}
+//			} else if (o instanceof ScriptObjectMirror) {
+//				ScriptObjectMirror som = (ScriptObjectMirror) o;
+//				if (som.isArray()) {
+//					Object[] objs = (som.to(Object[].class));
+//					for (Object obj : objs) {
+//						if (null != obj) {
+//							if (obj instanceof CharSequence) {
+//								list.add(Objects.toString(obj, ""));
+//							} else {
+//								Object d = PropertyUtils.getProperty(obj, distinguishedName);
+//								if (null != d) {
+//									list.add(Objects.toString(d, ""));
+//								}
+//							}
+//						}
+//					}
+//				} else {
+//					Object d = PropertyUtils.getProperty(o, distinguishedName);
+//					if (null != d) {
+//						list.add(Objects.toString(d, ""));
+//					}
+//				}
+//			}
+//		}
+//		return list;
+//	}
+//
+//	private List<String> readAsStringList(Object obj) throws Exception {
+//		List<String> list = new ArrayList<>();
+//		for (Object o : this.iterator(obj)) {
+//			list.add(Objects.toString(o));
+//		}
+//		return list;
+//	}
+//
+//	private List<Object> iterator(Object obj) throws Exception {
+//		List<Object> results = new ArrayList<>();
+//		this.iterator(obj, results);
+//		return results;
+//	}
+//
+//	private void iterator(Object obj, List<Object> results) throws Exception {
+//		if (null == obj) {
+//			return;
+//		}
+//		List<Object> list = new ArrayList<>();
+//		if (obj.getClass().isArray()) {
+//			for (Object o : (Object[]) obj) {
+//				list.add(o);
+//			}
+//		} else if (obj instanceof Collection) {
+//			for (Object o : (Collection<?>) obj) {
+//				list.add(o);
+//			}
+//		} else if (obj instanceof ScriptObjectMirror) {
+//			ScriptObjectMirror som = (ScriptObjectMirror) obj;
+//			if (som.isArray()) {
+//				Object[] os = (som.to(Object[].class));
+//				for (Object o : os) {
+//					list.add(o);
+//				}
+//			} else {
+//				results.add(som);
+//			}
+//		} else {
+//			results.add(obj);
+//		}
+//		for (Object o : list) {
+//			iterator(o, results);
+//		}
+//	}
+//}

+ 23 - 23
o2server/x_base_core_project/src/main/java/com/x/base/core/project/scripting/Scripting.java

@@ -1,23 +1,23 @@
-package com.x.base.core.project.scripting;
-
-import javax.script.ScriptEngineManager;
-
-import com.x.base.core.project.config.Config;
-
-public class Scripting {
-
-	private static ScriptEngineManager scriptEngineManager;
-
-	public static ScriptingEngine getEngine() {
-		if (scriptEngineManager == null) {
-			synchronized (Scripting.class) {
-				if (scriptEngineManager == null) {
-					scriptEngineManager = new ScriptEngineManager();
-				}
-			}
-		}
-		ScriptingEngine engine = new ScriptingEngine(scriptEngineManager.getEngineByName(Config.SCRIPTING_ENGINE_NAME));
-		return engine;
-	}
-
-}
+//package com.x.base.core.project.scripting;
+//
+//import javax.script.ScriptEngineManager;
+//
+//import com.x.base.core.project.config.Config;
+//
+//public class Scripting {
+//
+//	private static ScriptEngineManager scriptEngineManager;
+//
+//	public static ScriptingEngine getEngine() {
+//		if (scriptEngineManager == null) {
+//			synchronized (Scripting.class) {
+//				if (scriptEngineManager == null) {
+//					scriptEngineManager = new ScriptEngineManager();
+//				}
+//			}
+//		}
+//		ScriptingEngine engine = new ScriptingEngine(scriptEngineManager.getEngineByName(Config.SCRIPTING_ENGINE_NAME));
+//		return engine;
+//	}
+//
+//}

+ 253 - 253
o2server/x_base_core_project/src/main/java/com/x/base/core/project/scripting/ScriptingEngine.java

@@ -1,253 +1,253 @@
-package com.x.base.core.project.scripting;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Objects;
-
-import javax.script.ScriptEngine;
-
-import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.project.exception.ExceptionScriptEval;
-import com.x.base.core.project.http.EffectivePerson;
-
-import jdk.nashorn.api.scripting.ScriptObjectMirror;
-
-public class ScriptingEngine {
-
-	public ScriptEngine scriptEngine;
-
-	private static final String distinguishedName = "distinguishedName";
-
-	public static final String BINDINGNAME_GSON = "gson";
-	public static final String BINDINGNAME_ORGANIZATION = "organization";
-	public static final String BINDINGNAME_WORKCONTEXT = "workContext";
-	public static final String BINDINGNAME_DATA = "data";
-	public static final String BINDINGNAME_WEBSERVICESCLIENT = "webservicesClient";
-	public static final String BINDINGNAME_DICTIONARY = "dictionary";
-	public static final String BINDINGNAME__LOOKUP = "lookup";
-	public static final String BINDINGNAME_APPLICATIONS = "applications";
-	public static final String BINDINGNAME_PARAMETER = "parameter";
-	public static final String BINDINGNAME_PARAMETERS = "parameters";
-	public static final String BINDINGNAME_EFFECTIVEPERSON = "effectivePerson";
-	public static final String BINDINGNAME_JAXRSRESPONSE = "jaxrsResponse";
-	public static final String BINDINGNAME_JAXWSRESPONSE = "jaxwsResponse";
-	public static final String BINDINGNAME_ROUTEDATA = "routeData";
-
-	public static final String BINDINGNAME_ROUTES = "routes";
-	public static final String BINDINGNAME_ROUTE = "route";
-
-	public static final String BINDINGNAME_RESOURCES = "resources";
-
-	public ScriptingEngine(ScriptEngine scriptEngine) {
-		this.scriptEngine = scriptEngine;
-	}
-
-	public ScriptingEngine binding(String key, Object value) {
-		this.scriptEngine.put(key, value);
-		return this;
-	}
-
-	public ScriptingEngine binding(Map<String, Object> map) {
-		for (Entry<String, Object> entry : map.entrySet()) {
-			scriptEngine.put(entry.getKey(), entry.getValue());
-		}
-		return this;
-	}
-
-	public ScriptingEngine bindingOrganization(Object o) {
-		this.scriptEngine.put(BINDINGNAME_ORGANIZATION, o);
-		return this;
-	}
-
-	public ScriptingEngine bindingWorkContext(Object o) {
-		this.scriptEngine.put(BINDINGNAME_WORKCONTEXT, o);
-		return this;
-	}
-
-	public ScriptingEngine bindingData(Object o) {
-		this.scriptEngine.put(BINDINGNAME_DATA, o);
-		return this;
-	}
-
-	public ScriptingEngine bindingWebservicesClient(Object o) {
-		this.scriptEngine.put(BINDINGNAME_WEBSERVICESCLIENT, o);
-		return this;
-	}
-
-	public ScriptingEngine bindingDictionary(Object o) {
-		this.scriptEngine.put(BINDINGNAME_DICTIONARY, o);
-		return this;
-	}
-
-	public ScriptingEngine bindingApplications(Object o) {
-		this.scriptEngine.put(BINDINGNAME_APPLICATIONS, o);
-		return this;
-	}
-
-	public ScriptingEngine bindingEffectivePerson(EffectivePerson effectivePerson) {
-		this.scriptEngine.put(BINDINGNAME_EFFECTIVEPERSON, effectivePerson);
-		return this;
-	}
-
-	public ScriptingEngine bindingJaxrsResponse(Object o) {
-		this.scriptEngine.put(BINDINGNAME_JAXRSRESPONSE, o);
-		return this;
-	}
-
-	public ScriptingEngine bindingJaxwsResponse(Object o) {
-		this.scriptEngine.put(BINDINGNAME_JAXWSRESPONSE, o);
-		return this;
-	}
-
-	public ScriptingEngine bindingParameter(Object o) {
-		this.scriptEngine.put(BINDINGNAME_PARAMETER, o);
-		return this;
-	}
-
-	public ScriptingEngine bindingParameters(Object o) {
-		this.scriptEngine.put(BINDINGNAME_PARAMETERS, o);
-		return this;
-	}
-
-	public ScriptingEngine bindingRouteData(String str) {
-		this.scriptEngine.put(BINDINGNAME_ROUTEDATA, str);
-		return this;
-	}
-
-	public ScriptingEngine bindingRoutes(Object o) {
-		this.scriptEngine.put(BINDINGNAME_ROUTES, o);
-		return this;
-	}
-
-	public ScriptingEngine bindingRoute(Object o) {
-		this.scriptEngine.put(BINDINGNAME_ROUTE, o);
-		return this;
-	}
-
-	public Object eval(String scriptText) throws Exception {
-		StringBuffer sb = new StringBuffer();
-		try {
-			sb.append("(function(){").append(System.lineSeparator());
-			if (StringUtils.isNotEmpty(scriptText)) {
-				sb.append(scriptText).append(System.lineSeparator());
-			}
-			sb.append("})();");
-			Object obj = this.scriptEngine.eval(sb.toString());
-			return obj;
-		} catch (Exception e) {
-			throw new ExceptionScriptEval(e, sb.toString());
-		}
-	}
-
-	public List<String> evalAsStringList(String scriptText) throws Exception {
-		Object o = this.eval(scriptText);
-		return this.readAsStringList(o);
-	}
-
-	public String evalAsString(String scriptText) throws Exception {
-		Object o = this.eval(scriptText);
-		return Objects.toString(o);
-	}
-
-	public Boolean evalAsBoolean(String scriptText) throws Exception {
-		Object o = this.eval(scriptText);
-		return (Boolean) o;
-	}
-
-	public List<String> evalExtrectDistinguishedName(String scriptText) throws Exception {
-		List<String> list = new ArrayList<>();
-		Object o = this.eval(scriptText);
-		if (null != o) {
-			if (o instanceof CharSequence) {
-				list.add(Objects.toString(o, ""));
-			} else if (o instanceof Iterable) {
-				for (Object obj : (Iterable<?>) o) {
-					if (null != obj) {
-						if (obj instanceof CharSequence) {
-							list.add(Objects.toString(obj, ""));
-						} else {
-							Object d = PropertyUtils.getProperty(obj, distinguishedName);
-							if (null != d) {
-								list.add(Objects.toString(d, ""));
-							}
-						}
-					}
-				}
-			} else if (o instanceof ScriptObjectMirror) {
-				ScriptObjectMirror som = (ScriptObjectMirror) o;
-				if (som.isArray()) {
-					Object[] objs = (som.to(Object[].class));
-					for (Object obj : objs) {
-						if (null != obj) {
-							if (obj instanceof CharSequence) {
-								list.add(Objects.toString(obj, ""));
-							} else {
-								Object d = PropertyUtils.getProperty(obj, distinguishedName);
-								if (null != d) {
-									list.add(Objects.toString(d, ""));
-								}
-							}
-						}
-					}
-				} else {
-					Object d = PropertyUtils.getProperty(o, distinguishedName);
-					if (null != d) {
-						list.add(Objects.toString(d, ""));
-					}
-				}
-			}
-		}
-		return list;
-	}
-
-	private List<String> readAsStringList(Object obj) throws Exception {
-		List<String> list = new ArrayList<>();
-		for (Object o : this.iterator(obj)) {
-			list.add(Objects.toString(o));
-		}
-		return list;
-	}
-
-	private List<Object> iterator(Object obj) throws Exception {
-		List<Object> results = new ArrayList<>();
-		this.iterator(obj, results);
-		return results;
-	}
-
-	private void iterator(Object obj, List<Object> results) throws Exception {
-		if (null == obj) {
-			return;
-		}
-		List<Object> list = new ArrayList<>();
-		if (obj.getClass().isArray()) {
-			for (Object o : (Object[]) obj) {
-				list.add(o);
-			}
-		} else if (obj instanceof Collection) {
-			for (Object o : (Collection<?>) obj) {
-				list.add(o);
-			}
-		} else if (obj instanceof ScriptObjectMirror) {
-			ScriptObjectMirror som = (ScriptObjectMirror) obj;
-			if (som.isArray()) {
-				Object[] os = (som.to(Object[].class));
-				for (Object o : os) {
-					list.add(o);
-				}
-			} else {
-				results.add(som);
-			}
-		} else {
-			results.add(obj);
-		}
-		for (Object o : list) {
-			iterator(o, results);
-		}
-	}
-
-}
+//package com.x.base.core.project.scripting;
+//
+//import java.util.ArrayList;
+//import java.util.Collection;
+//import java.util.List;
+//import java.util.Map;
+//import java.util.Map.Entry;
+//import java.util.Objects;
+//
+//import javax.script.ScriptEngine;
+//
+//import org.apache.commons.beanutils.PropertyUtils;
+//import org.apache.commons.lang3.StringUtils;
+//
+//import com.x.base.core.project.exception.ExceptionScriptEval;
+//import com.x.base.core.project.http.EffectivePerson;
+//
+//import jdk.nashorn.api.scripting.ScriptObjectMirror;
+//
+//public class ScriptingEngine {
+//
+//	public ScriptEngine scriptEngine;
+//
+//	private static final String distinguishedName = "distinguishedName";
+//
+//	public static final String BINDINGNAME_GSON = "gson";
+//	public static final String BINDINGNAME_ORGANIZATION = "organization";
+//	public static final String BINDINGNAME_WORKCONTEXT = "workContext";
+//	public static final String BINDINGNAME_DATA = "data";
+//	public static final String BINDINGNAME_WEBSERVICESCLIENT = "webservicesClient";
+//	public static final String BINDINGNAME_DICTIONARY = "dictionary";
+//	public static final String BINDINGNAME__LOOKUP = "lookup";
+//	public static final String BINDINGNAME_APPLICATIONS = "applications";
+//	public static final String BINDINGNAME_PARAMETER = "parameter";
+//	public static final String BINDINGNAME_PARAMETERS = "parameters";
+//	public static final String BINDINGNAME_EFFECTIVEPERSON = "effectivePerson";
+//	public static final String BINDINGNAME_JAXRSRESPONSE = "jaxrsResponse";
+//	public static final String BINDINGNAME_JAXWSRESPONSE = "jaxwsResponse";
+//	public static final String BINDINGNAME_ROUTEDATA = "routeData";
+//
+//	public static final String BINDINGNAME_ROUTES = "routes";
+//	public static final String BINDINGNAME_ROUTE = "route";
+//
+//	public static final String BINDINGNAME_RESOURCES = "resources";
+//
+//	public ScriptingEngine(ScriptEngine scriptEngine) {
+//		this.scriptEngine = scriptEngine;
+//	}
+//
+//	public ScriptingEngine binding(String key, Object value) {
+//		this.scriptEngine.put(key, value);
+//		return this;
+//	}
+//
+//	public ScriptingEngine binding(Map<String, Object> map) {
+//		for (Entry<String, Object> entry : map.entrySet()) {
+//			scriptEngine.put(entry.getKey(), entry.getValue());
+//		}
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingOrganization(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_ORGANIZATION, o);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingWorkContext(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_WORKCONTEXT, o);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingData(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_DATA, o);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingWebservicesClient(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_WEBSERVICESCLIENT, o);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingDictionary(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_DICTIONARY, o);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingApplications(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_APPLICATIONS, o);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingEffectivePerson(EffectivePerson effectivePerson) {
+//		this.scriptEngine.put(BINDINGNAME_EFFECTIVEPERSON, effectivePerson);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingJaxrsResponse(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_JAXRSRESPONSE, o);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingJaxwsResponse(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_JAXWSRESPONSE, o);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingParameter(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_PARAMETER, o);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingParameters(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_PARAMETERS, o);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingRouteData(String str) {
+//		this.scriptEngine.put(BINDINGNAME_ROUTEDATA, str);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingRoutes(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_ROUTES, o);
+//		return this;
+//	}
+//
+//	public ScriptingEngine bindingRoute(Object o) {
+//		this.scriptEngine.put(BINDINGNAME_ROUTE, o);
+//		return this;
+//	}
+//
+//	public Object eval(String scriptText) throws Exception {
+//		StringBuffer sb = new StringBuffer();
+//		try {
+//			sb.append("(function(){").append(System.lineSeparator());
+//			if (StringUtils.isNotEmpty(scriptText)) {
+//				sb.append(scriptText).append(System.lineSeparator());
+//			}
+//			sb.append("})();");
+//			Object obj = this.scriptEngine.eval(sb.toString());
+//			return obj;
+//		} catch (Exception e) {
+//			throw new ExceptionScriptEval(e, sb.toString());
+//		}
+//	}
+//
+//	public List<String> evalAsStringList(String scriptText) throws Exception {
+//		Object o = this.eval(scriptText);
+//		return this.readAsStringList(o);
+//	}
+//
+//	public String evalAsString(String scriptText) throws Exception {
+//		Object o = this.eval(scriptText);
+//		return Objects.toString(o);
+//	}
+//
+//	public Boolean evalAsBoolean(String scriptText) throws Exception {
+//		Object o = this.eval(scriptText);
+//		return (Boolean) o;
+//	}
+//
+//	public List<String> evalExtrectDistinguishedName(String scriptText) throws Exception {
+//		List<String> list = new ArrayList<>();
+//		Object o = this.eval(scriptText);
+//		if (null != o) {
+//			if (o instanceof CharSequence) {
+//				list.add(Objects.toString(o, ""));
+//			} else if (o instanceof Iterable) {
+//				for (Object obj : (Iterable<?>) o) {
+//					if (null != obj) {
+//						if (obj instanceof CharSequence) {
+//							list.add(Objects.toString(obj, ""));
+//						} else {
+//							Object d = PropertyUtils.getProperty(obj, distinguishedName);
+//							if (null != d) {
+//								list.add(Objects.toString(d, ""));
+//							}
+//						}
+//					}
+//				}
+//			} else if (o instanceof ScriptObjectMirror) {
+//				ScriptObjectMirror som = (ScriptObjectMirror) o;
+//				if (som.isArray()) {
+//					Object[] objs = (som.to(Object[].class));
+//					for (Object obj : objs) {
+//						if (null != obj) {
+//							if (obj instanceof CharSequence) {
+//								list.add(Objects.toString(obj, ""));
+//							} else {
+//								Object d = PropertyUtils.getProperty(obj, distinguishedName);
+//								if (null != d) {
+//									list.add(Objects.toString(d, ""));
+//								}
+//							}
+//						}
+//					}
+//				} else {
+//					Object d = PropertyUtils.getProperty(o, distinguishedName);
+//					if (null != d) {
+//						list.add(Objects.toString(d, ""));
+//					}
+//				}
+//			}
+//		}
+//		return list;
+//	}
+//
+//	private List<String> readAsStringList(Object obj) throws Exception {
+//		List<String> list = new ArrayList<>();
+//		for (Object o : this.iterator(obj)) {
+//			list.add(Objects.toString(o));
+//		}
+//		return list;
+//	}
+//
+//	private List<Object> iterator(Object obj) throws Exception {
+//		List<Object> results = new ArrayList<>();
+//		this.iterator(obj, results);
+//		return results;
+//	}
+//
+//	private void iterator(Object obj, List<Object> results) throws Exception {
+//		if (null == obj) {
+//			return;
+//		}
+//		List<Object> list = new ArrayList<>();
+//		if (obj.getClass().isArray()) {
+//			for (Object o : (Object[]) obj) {
+//				list.add(o);
+//			}
+//		} else if (obj instanceof Collection) {
+//			for (Object o : (Collection<?>) obj) {
+//				list.add(o);
+//			}
+//		} else if (obj instanceof ScriptObjectMirror) {
+//			ScriptObjectMirror som = (ScriptObjectMirror) obj;
+//			if (som.isArray()) {
+//				Object[] os = (som.to(Object[].class));
+//				for (Object o : os) {
+//					list.add(o);
+//				}
+//			} else {
+//				results.add(som);
+//			}
+//		} else {
+//			results.add(obj);
+//		}
+//		for (Object o : list) {
+//			iterator(o, results);
+//		}
+//	}
+//
+//}

+ 8 - 6
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_program_center.java

@@ -1,5 +1,6 @@
 package com.x.base.core.project;
 
+import com.x.base.core.entity.StorageType;
 import com.x.base.core.project.annotation.Module;
 import com.x.base.core.project.annotation.ModuleCategory;
 import com.x.base.core.project.annotation.ModuleType;
@@ -15,12 +16,13 @@ import com.x.base.core.project.annotation.ModuleType;
 		"com.x.organization.core.entity.Person", "com.x.organization.core.entity.Identity",
 		"com.x.organization.core.entity.PersonAttribute", "com.x.organization.core.entity.Unit",
 		"com.x.organization.core.entity.UnitAttribute", "com.x.organization.core.entity.UnitDuty",
-		"com.x.general.core.entity.area.District", "com.x.program.center.core.entity.ScheduleLog" }, storeJars = {
-				"x_organization_core_express", "x_program_center_core_entity", "x_attendance_core_entity",
-				"x_cms_core_entity", "x_message_core_entity", "x_component_core_entity", "x_file_core_entity",
-				"x_meeting_core_entity", "x_okr_core_entity", "x_organization_core_entity",
-				"x_processplatform_core_entity", "x_query_core_entity", "x_portal_core_entity",
-				"x_general_core_entity" }, dynamicJars = { "x_query_dynamic_entity" })
+		"com.x.general.core.entity.area.District", "com.x.program.center.core.entity.ScheduleLog" },
+		storageTypes = { StorageType.structure }, storeJars = {
+		"x_organization_core_express", "x_program_center_core_entity", "x_attendance_core_entity",
+		"x_cms_core_entity", "x_message_core_entity", "x_component_core_entity", "x_file_core_entity",
+		"x_meeting_core_entity", "x_okr_core_entity", "x_organization_core_entity",
+		"x_processplatform_core_entity", "x_query_core_entity", "x_portal_core_entity",
+		"x_general_core_entity" }, dynamicJars = { "x_query_dynamic_entity" })
 public class x_program_center extends Deployable {
 
 }

+ 25 - 0
o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/poi/TestClient.java

@@ -0,0 +1,25 @@
+package com.x.base.core.project.test.poi;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
+import org.junit.Test;
+
+public class TestClient {
+
+	@Test
+	public void test() throws Exception {
+
+		byte[] bs = FileUtils.readFileToByteArray(new File("e:/1.html"));
+		try (ByteArrayInputStream bais = new ByteArrayInputStream(bs);
+				FileOutputStream fos = new FileOutputStream("e:/1.docx")) {
+			XWPFDocument docx = new XWPFDocument(bais);
+			docx.write(fos);
+
+		}
+
+	}
+}

+ 6 - 4
o2server/x_console/src/main/java/com/x/server/console/action/ActionDumpStorage.java

@@ -172,10 +172,12 @@ public class ActionDumpStorage {
 				for (T t : list) {
 					name = t.getStorage();
 					mapping = storageMappings.get(cls, name);
-					if (null == mapping && Config.dumpRestoreStorage().getExceptionInvalidStorage()) {
-						throw new Exception("can not find storageMapping class: " + cls.getName() + ", storage: " + name
-								+ ", id: " + t.getId() + ", name: " + t.getName()
-								+ ", set exceptionInvalidStorage to false will ignore item.");
+					if(StringUtils.isNotEmpty(name)) {
+						if (null == mapping && Config.dumpRestoreStorage().getExceptionInvalidStorage()) {
+							throw new Exception("can not find storageMapping class: " + cls.getName() + ", storage: " + name
+									+ ", id: " + t.getId() + ", name: " + t.getName()
+									+ ", set exceptionInvalidStorage to false will ignore item.");
+						}
 					}
 					if (null != mapping) {
 						File file = new File(directory, FilenameUtils.getName(t.path()));

+ 11 - 10
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/oauth/ActionInfo.java

@@ -4,7 +4,8 @@ import java.util.LinkedHashMap;
 import java.util.Objects;
 import java.util.regex.Pattern;
 
-import javax.script.ScriptEngine;
+import javax.script.ScriptContext;
+import javax.script.SimpleScriptContext;
 
 import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -19,8 +20,7 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoText;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.scripting.Scripting;
-import com.x.base.core.project.scripting.ScriptingEngine;
+import com.x.base.core.project.script.ScriptFactory;
 import com.x.organization.assemble.authentication.Business;
 import com.x.organization.core.entity.OauthCode;
 import com.x.organization.core.entity.Person;
@@ -68,13 +68,14 @@ class ActionInfo extends BaseAction {
 		WoInfo woInfo = new WoInfo();
 		if (Config.token().isInitialManager(oauthCode.getPerson())) {
 			InitialManager initialManager = Config.token().initialManagerInstance();
-			ScriptingEngine engine = Scripting.getEngine();
-			engine.binding("person", initialManager);
+			ScriptContext scriptContext = new SimpleScriptContext();
+			scriptContext.getBindings(ScriptContext.ENGINE_SCOPE).put("person", initialManager);
 			for (String str : StringUtils.split(oauthCode.getScope(), ",")) {
 				String property = oauth.getMapping().get(str);
 				String value = "";
 				if (SCRIPT_PATTERN.matcher(property).find()) {
-					value = Objects.toString(engine.eval(property));
+					value = Objects
+							.toString(ScriptFactory.asString(ScriptFactory.scriptEngine.eval(property, scriptContext)));
 				} else {
 					value = Objects.toString(PropertyUtils.getProperty(initialManager, property));
 				}
@@ -83,17 +84,17 @@ class ActionInfo extends BaseAction {
 			}
 		} else {
 			Person person = business.entityManagerContainer().find(oauthCode.getPerson(), Person.class);
-			ScriptingEngine engine = Scripting.getEngine();
-			engine.binding("person", person);
+			ScriptContext scriptContext = new SimpleScriptContext();
+			scriptContext.getBindings(ScriptContext.ENGINE_SCOPE).put("person", person);
 			for (String str : StringUtils.split(oauthCode.getScope(), ",")) {
 				String property = oauth.getMapping().get(str);
 				String value = "";
 				if (SCRIPT_PATTERN.matcher(property).find()) {
-					value = Objects.toString(engine.eval(property));
+					value = Objects
+							.toString(ScriptFactory.asString(ScriptFactory.scriptEngine.eval(property, scriptContext)));
 				} else {
 					value = Objects.toString(PropertyUtils.getProperty(person, property));
 				}
-				// value = new String(value.getBytes(), "GB2312");
 				woInfo.put(str, value);
 			}
 		}

+ 56 - 54
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/identity/ActionCreate.java

@@ -33,68 +33,70 @@ import com.x.organization.core.entity.Unit;
 class ActionCreate extends BaseAction {
 
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
-			Business business = new Business(emc);
-			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
-			Person person = business.person().pick(wi.getPerson());
-			if (null == person) {
-				throw new ExceptionPersonNotExist(wi.getPerson());
-			}
-			person = emc.find(person.getId(), Person.class);
-			Unit unit = business.unit().pick(wi.getUnit());
-			if (null == unit) {
-				throw new ExceptionUnitNotExist(wi.getUnit());
-			}
-			if (!business.editable(effectivePerson, unit)) {
-				throw new ExceptionAccessDenied(effectivePerson, unit);
-			}
-			if (this.existedWithPersonWithUnit(business, person, unit)) {
-				throw new ExceptionExistInUnit(person, unit);
-			}
-			if (StringUtils.isEmpty(wi.getName())) {
-				throw new ExceptionNameEmpty();
-			}
-			Identity identity = new Identity();
-			Wi.copier.copy(wi, identity);
-			/** 如果唯一标识不为空,要检查唯一标识是否唯一 */
-			if (this.uniqueDuplicateWhenNotEmpty(business, identity)) {
-				throw new ExceptionDuplicateUnique(identity.getName(), identity.getUnique());
-			}
-			identity.setUnit(unit.getId());
-			identity.setUnitLevel(unit.getLevel());
-			identity.setUnitLevelName(unit.getLevelName());
-			identity.setUnitName(unit.getName());
-			identity.setPerson(person.getId());
-			/* 设置主身份 */
-			List<Identity> others = emc.listEqual(Identity.class, Identity.person_FIELDNAME, identity.getPerson());
-			if (others.isEmpty()) {
-				identity.setMajor(true);
-			} else {
-				if (BooleanUtils.isTrue(identity.getMajor())) {
-					for (Identity o : others) {
-						if (!StringUtils.equals(identity.getId(), o.getId())) {
-							o.setMajor(false);
+		/* 前端在添加人员时重复执行,所以需要同步执行 */
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wo = new Wo();
+		synchronized (ActionCreate.class) {
+			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+				Business business = new Business(emc);
+				Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
+				Person person = business.person().pick(wi.getPerson());
+				if (null == person) {
+					throw new ExceptionPersonNotExist(wi.getPerson());
+				}
+				person = emc.find(person.getId(), Person.class);
+				Unit unit = business.unit().pick(wi.getUnit());
+				if (null == unit) {
+					throw new ExceptionUnitNotExist(wi.getUnit());
+				}
+				if (!business.editable(effectivePerson, unit)) {
+					throw new ExceptionAccessDenied(effectivePerson, unit);
+				}
+				if (this.existedWithPersonWithUnit(business, person, unit)) {
+					throw new ExceptionExistInUnit(person, unit);
+				}
+				if (StringUtils.isEmpty(wi.getName())) {
+					throw new ExceptionNameEmpty();
+				}
+				Identity identity = new Identity();
+				Wi.copier.copy(wi, identity);
+				/** 如果唯一标识不为空,要检查唯一标识是否唯一 */
+				if (this.uniqueDuplicateWhenNotEmpty(business, identity)) {
+					throw new ExceptionDuplicateUnique(identity.getName(), identity.getUnique());
+				}
+				identity.setUnit(unit.getId());
+				identity.setUnitLevel(unit.getLevel());
+				identity.setUnitLevelName(unit.getLevelName());
+				identity.setUnitName(unit.getName());
+				identity.setPerson(person.getId());
+				/* 设置主身份 */
+				List<Identity> others = emc.listEqual(Identity.class, Identity.person_FIELDNAME, identity.getPerson());
+				if (others.isEmpty()) {
+					identity.setMajor(true);
+				} else {
+					if (BooleanUtils.isTrue(identity.getMajor())) {
+						for (Identity o : others) {
+							if (!StringUtils.equals(identity.getId(), o.getId())) {
+								o.setMajor(false);
+							}
 						}
 					}
 				}
-			}
-
-			emc.beginTransaction(Identity.class);
-			emc.beginTransaction(Person.class);
 
-			emc.persist(identity, CheckPersistType.all);
-			List<Unit> topUnits = business.unit()
-					.pick(ListTools.trim(person.getTopUnitList(), true, true, this.topUnit(business, unit).getId()));
-			person.setTopUnitList(ListTools.extractField(topUnits, Unit.id_FIELDNAME, String.class, true, true));
-			emc.persist(person, CheckPersistType.all);
+				emc.beginTransaction(Identity.class);
+				emc.beginTransaction(Person.class);
 
-			emc.commit();
+				emc.persist(identity, CheckPersistType.all);
+				List<Unit> topUnits = business.unit().pick(
+						ListTools.trim(person.getTopUnitList(), true, true, this.topUnit(business, unit).getId()));
+				person.setTopUnitList(ListTools.extractField(topUnits, Unit.id_FIELDNAME, String.class, true, true));
+				emc.persist(person, CheckPersistType.all);
 
+				emc.commit();
+				wo.setId(identity.getId());
+			}
 			ApplicationCache.notify(Identity.class);
 			ApplicationCache.notify(Person.class);
-			Wo wo = new Wo();
-			wo.setId(identity.getId());
 			result.setData(wo);
 			return result;
 		}

+ 11 - 6
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/ActionInput.java

@@ -10,7 +10,12 @@ import java.util.Map.Entry;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import javax.script.Bindings;
+import javax.script.ScriptContext;
+import javax.script.SimpleScriptContext;
+
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.text.StringEscapeUtils;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
@@ -30,8 +35,7 @@ import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.scripting.Scripting;
-import com.x.base.core.project.scripting.ScriptingEngine;
+import com.x.base.core.project.script.ScriptFactory;
 import com.x.base.core.project.tools.Crypto;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.ListTools;
@@ -89,11 +93,12 @@ class ActionInput extends BaseAction {
 		Pattern pattern = Pattern.compile(com.x.base.core.project.config.Person.REGULAREXPRESSION_SCRIPT);
 		Matcher matcher = pattern.matcher(Config.person().getPassword());
 		if (matcher.matches()) {
-			String eval = matcher.group(1);
-			ScriptingEngine engine = Scripting.getEngine();
+			String eval = ScriptFactory.functionalization(StringEscapeUtils.unescapeJson(matcher.group(1)));
+			ScriptContext scriptContext = new SimpleScriptContext();
+			Bindings bindings = scriptContext.getBindings(ScriptContext.ENGINE_SCOPE);
 			for (PersonItem o : people) {
-				engine.binding("person", o);
-				String pass = engine.eval(eval).toString();
+				bindings.put("person", o);
+				String pass = ScriptFactory.scriptEngine.eval(eval, scriptContext).toString();
 				o.setPassword(pass);
 			}
 		} else {

+ 0 - 2
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/BaseAction.java

@@ -25,8 +25,6 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
 import com.x.base.core.project.organization.OrganizationDefinition;
 import com.x.base.core.project.script.ScriptFactory;
-import com.x.base.core.project.scripting.Scripting;
-import com.x.base.core.project.scripting.ScriptingEngine;
 import com.x.base.core.project.tools.ListTools;
 import com.x.base.core.project.tools.StringTools;
 import com.x.organization.assemble.control.Business;

+ 112 - 0
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empower/ActionManagerListPaging.java

@@ -0,0 +1,112 @@
+package com.x.organization.assemble.personal.jaxrs.empower;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.gson.GsonPropertyObject;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.tools.DateTools;
+import com.x.organization.assemble.personal.Business;
+import com.x.organization.core.entity.Person;
+import com.x.organization.core.entity.accredit.Empower;
+import com.x.organization.core.entity.accredit.Empower_;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Tuple;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.util.List;
+
+class ActionManagerListPaging extends BaseAction {
+
+	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, Integer page, Integer size, JsonElement jsonElement)
+			throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
+			Business business = new Business(emc);
+			ActionResult<List<Wo>> result = new ActionResult<>();
+			EntityManager em = emc.get(Empower.class);
+			CriteriaBuilder cb = em.getCriteriaBuilder();
+			CriteriaQuery<Tuple> cq = cb.createQuery(Tuple.class);
+			Root<Empower> root = cq.from(Empower.class);
+			Predicate p = cb.conjunction();
+			if(effectivePerson.isManager()) {
+				if (StringUtils.isNotEmpty(wi.getFromPerson())) {
+					Person person = business.person().pick(wi.getFromPerson());
+					if (person != null){
+						p = cb.and(p, cb.equal(root.get(Empower_.fromPerson), person.getDistinguishedName()));
+					}
+				}
+			}else{
+				p = cb.and(p, cb.equal(root.get(Empower_.fromPerson), effectivePerson.getDistinguishedName()));
+			}
+			if(DateTools.isDateTimeOrDate(wi.getStartTime())){
+				p = cb.and(p, cb.greaterThan(root.get(Empower_.createTime), DateTools.parse(wi.getStartTime())));
+			}
+			if(DateTools.isDateTimeOrDate(wi.getEndTime())){
+				p = cb.and(p, cb.lessThan(root.get(Empower_.createTime), DateTools.parse(wi.getEndTime())));
+			}
+
+			List<Wo> wos = emc.fetchDescPaging(Empower.class, Wo.copier, p, page, size,
+					Empower.createTime_FIELDNAME);
+			result.setData(wos);
+			result.setCount(emc.count(Empower.class, p));
+			return result;
+		}
+	}
+
+	public static class Wo extends Empower {
+
+		private static final long serialVersionUID = 4279205128463146835L;
+
+		static WrapCopier<Empower, Wo> copier = WrapCopierFactory.wi(Empower.class, Wo.class,
+				JpaObject.singularAttributeField(Empower.class, true, true), null);
+
+	}
+
+	public class Wi extends GsonPropertyObject {
+
+		@FieldDescribe("授权人")
+		private String fromPerson;
+
+		@FieldDescribe("(授权创建时间)开始时间yyyy-MM-dd HH:mm:ss")
+		private String startTime;
+
+		@FieldDescribe("(授权创建时间)结束时间yyyy-MM-dd HH:mm:ss")
+		private String endTime;
+
+		public String getFromPerson() {
+			return fromPerson;
+		}
+
+		public void setFromPerson(String fromPerson) {
+			this.fromPerson = fromPerson;
+		}
+
+		public String getStartTime() {
+			return startTime;
+		}
+
+		public void setStartTime(String startTime) {
+			this.startTime = startTime;
+		}
+
+		public String getEndTime() {
+			return endTime;
+		}
+
+		public void setEndTime(String endTime) {
+			this.endTime = endTime;
+		}
+
+	}
+
+}

+ 19 - 0
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empower/EmpowerAction.java

@@ -267,4 +267,23 @@ public class EmpowerAction extends StandardJaxrsAction {
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 
+	@JaxrsMethodDescribe(value = "管理员根据条件查询授权记录.", action = ActionManagerListPaging.class)
+	@POST
+	@Path("manager/list/paging/{page}/size/{size}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void managerlistPaging(@Suspended final AsyncResponse asyncResponse,
+								  @Context HttpServletRequest request, @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
+								  @JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
+		ActionResult<List<ActionManagerListPaging.Wo>> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionManagerListPaging().execute(effectivePerson, page, size, jsonElement);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, jsonElement);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
 }

+ 30 - 8
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empowerlog/ActionListToCurrentPersonPaging.java

@@ -9,31 +9,38 @@ import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 
+import org.apache.commons.lang3.StringUtils;
+
+import com.google.gson.JsonElement;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
-import com.x.organization.assemble.personal.Business;
-import com.x.organization.assemble.personal.jaxrs.empowerlog.ActionListWithCurrentPersonPaging.Wo;
+import com.x.base.core.project.tools.StringTools;
 import com.x.organization.core.entity.accredit.EmpowerLog;
 import com.x.organization.core.entity.accredit.EmpowerLog_;
 
-import net.sf.ehcache.Element;
-
 class ActionListToCurrentPersonPaging extends BaseAction {
 
-	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, Integer page, Integer size) throws Exception {
+	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, Integer page, Integer size, JsonElement jsonElement)
+			throws Exception {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
 			ActionResult<List<Wo>> result = new ActionResult<>();
 			EntityManager em = emc.get(EmpowerLog.class);
 			CriteriaBuilder cb = em.getCriteriaBuilder();
 			CriteriaQuery<Tuple> cq = cb.createQuery(Tuple.class);
 			Root<EmpowerLog> root = cq.from(EmpowerLog.class);
 			Predicate p = cb.equal(root.get(EmpowerLog_.toPerson), effectivePerson.getDistinguishedName());
+			if (StringUtils.isNotEmpty(wi.getKey())) {
+				String key = "%" + StringTools.escapeSqlLikeKey(wi.getKey()) + "%";
+				p = cb.and(p, cb.like(root.get(EmpowerLog_.title), key, StringTools.SQL_ESCAPE_CHAR));
+			}
 			List<Wo> wos = emc.fetchDescPaging(EmpowerLog.class, Wo.copier, p, page, size,
 					EmpowerLog.createTime_FIELDNAME);
 			result.setData(wos);
@@ -46,8 +53,23 @@ class ActionListToCurrentPersonPaging extends BaseAction {
 
 		private static final long serialVersionUID = 4279205128463146835L;
 
-		static WrapCopier<EmpowerLog, Wo> copier = WrapCopierFactory.wi(EmpowerLog.class, Wo.class, null,
-				JpaObject.FieldsUnmodify);
+		static WrapCopier<EmpowerLog, Wo> copier = WrapCopierFactory.wo(EmpowerLog.class, Wo.class, null,
+				JpaObject.FieldsInvisible);
+
+	}
+
+	public class Wi extends GsonPropertyObject {
+
+		@FieldDescribe("匹配关键字")
+		private String key;
+
+		public String getKey() {
+			return key;
+		}
+
+		public void setKey(String key) {
+			this.key = key;
+		}
 
 	}
 

+ 29 - 3
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empowerlog/ActionListWithCurrentPersonPaging.java

@@ -9,26 +9,38 @@ import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 
+import org.apache.commons.lang3.StringUtils;
+
+import com.google.gson.JsonElement;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.tools.StringTools;
 import com.x.organization.core.entity.accredit.EmpowerLog;
 import com.x.organization.core.entity.accredit.EmpowerLog_;
 
 class ActionListWithCurrentPersonPaging extends BaseAction {
 
-	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, Integer page, Integer size) throws Exception {
+	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, Integer page, Integer size, JsonElement jsonElement)
+			throws Exception {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
 			ActionResult<List<Wo>> result = new ActionResult<>();
 			EntityManager em = emc.get(EmpowerLog.class);
 			CriteriaBuilder cb = em.getCriteriaBuilder();
 			CriteriaQuery<Tuple> cq = cb.createQuery(Tuple.class);
 			Root<EmpowerLog> root = cq.from(EmpowerLog.class);
 			Predicate p = cb.equal(root.get(EmpowerLog_.fromPerson), effectivePerson.getDistinguishedName());
+			if (StringUtils.isNotEmpty(wi.getKey())) {
+				String key = "%" + StringTools.escapeSqlLikeKey(wi.getKey()) + "%";
+				p = cb.and(p, cb.like(root.get(EmpowerLog_.title), key, StringTools.SQL_ESCAPE_CHAR));
+			}
 			List<Wo> wos = emc.fetchDescPaging(EmpowerLog.class, Wo.copier, p, page, size,
 					EmpowerLog.createTime_FIELDNAME);
 			result.setData(wos);
@@ -41,9 +53,23 @@ class ActionListWithCurrentPersonPaging extends BaseAction {
 
 		private static final long serialVersionUID = 4279205128463146835L;
 
-		static WrapCopier<EmpowerLog, Wo> copier = WrapCopierFactory.wi(EmpowerLog.class, Wo.class, null,
-				JpaObject.FieldsUnmodify);
+		static WrapCopier<EmpowerLog, Wo> copier = WrapCopierFactory.wo(EmpowerLog.class, Wo.class, null,
+				JpaObject.FieldsInvisible);
 
 	}
 
+	public class Wi extends GsonPropertyObject {
+
+		@FieldDescribe("匹配关键字")
+		private String key;
+
+		public String getKey() {
+			return key;
+		}
+
+		public void setKey(String key) {
+			this.key = key;
+		}
+
+	}
 }

+ 127 - 0
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empowerlog/ActionManagerListPaging.java

@@ -0,0 +1,127 @@
+package com.x.organization.assemble.personal.jaxrs.empowerlog;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.gson.GsonPropertyObject;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.tools.DateTools;
+import com.x.base.core.project.tools.StringTools;
+import com.x.organization.assemble.personal.Business;
+import com.x.organization.core.entity.Person;
+import com.x.organization.core.entity.accredit.EmpowerLog;
+import com.x.organization.core.entity.accredit.EmpowerLog_;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Tuple;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.util.List;
+
+class ActionManagerListPaging extends BaseAction {
+
+	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, Integer page, Integer size, JsonElement jsonElement)
+			throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
+			Business business = new Business(emc);
+			ActionResult<List<Wo>> result = new ActionResult<>();
+			EntityManager em = emc.get(EmpowerLog.class);
+			CriteriaBuilder cb = em.getCriteriaBuilder();
+			CriteriaQuery<Tuple> cq = cb.createQuery(Tuple.class);
+			Root<EmpowerLog> root = cq.from(EmpowerLog.class);
+			Predicate p = cb.conjunction();
+			if(effectivePerson.isManager()) {
+				if (StringUtils.isNotEmpty(wi.getFromPerson())) {
+					Person person = business.person().pick(wi.getFromPerson());
+					if (person != null){
+						p = cb.and(p, cb.equal(root.get(EmpowerLog_.fromPerson), person.getDistinguishedName()));
+					}
+				}
+			}else{
+				p = cb.and(p, cb.equal(root.get(EmpowerLog_.fromPerson), effectivePerson.getDistinguishedName()));
+			}
+			if(DateTools.isDateTimeOrDate(wi.getStartTime())){
+				p = cb.and(p, cb.greaterThan(root.get(EmpowerLog_.createTime), DateTools.parse(wi.getStartTime())));
+			}
+			if(DateTools.isDateTimeOrDate(wi.getEndTime())){
+				p = cb.and(p, cb.lessThan(root.get(EmpowerLog_.createTime), DateTools.parse(wi.getEndTime())));
+			}
+			if (StringUtils.isNotEmpty(wi.getKey())) {
+				String key = "%" + StringTools.escapeSqlLikeKey(wi.getKey()) + "%";
+				p = cb.and(p, cb.like(root.get(EmpowerLog_.title), key, StringTools.SQL_ESCAPE_CHAR));
+			}
+			List<Wo> wos = emc.fetchDescPaging(EmpowerLog.class, Wo.copier, p, page, size,
+					EmpowerLog.createTime_FIELDNAME);
+			result.setData(wos);
+			result.setCount(emc.count(EmpowerLog.class, p));
+			return result;
+		}
+	}
+
+	public static class Wo extends EmpowerLog {
+
+		private static final long serialVersionUID = 4279205128463146835L;
+
+		static WrapCopier<EmpowerLog, Wo> copier = WrapCopierFactory.wi(EmpowerLog.class, Wo.class,
+				JpaObject.singularAttributeField(EmpowerLog.class, true, true), null);
+
+	}
+
+	public class Wi extends GsonPropertyObject {
+
+		@FieldDescribe("授权人")
+		private String fromPerson;
+
+		@FieldDescribe("匹配关键字")
+		private String key;
+
+		@FieldDescribe("(授权创建时间)开始时间yyyy-MM-dd HH:mm:ss")
+		private String startTime;
+
+		@FieldDescribe("(授权创建时间)结束时间yyyy-MM-dd HH:mm:ss")
+		private String endTime;
+
+		public String getKey() {
+			return key;
+		}
+
+		public void setKey(String key) {
+			this.key = key;
+		}
+
+		public String getFromPerson() {
+			return fromPerson;
+		}
+
+		public void setFromPerson(String fromPerson) {
+			this.fromPerson = fromPerson;
+		}
+
+		public String getStartTime() {
+			return startTime;
+		}
+
+		public void setStartTime(String startTime) {
+			this.startTime = startTime;
+		}
+
+		public String getEndTime() {
+			return endTime;
+		}
+
+		public void setEndTime(String endTime) {
+			this.endTime = endTime;
+		}
+
+	}
+
+}

+ 29 - 8
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empowerlog/EmpowerLogAction.java

@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
+import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
@@ -14,6 +15,7 @@ import javax.ws.rs.container.Suspended;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 
+import com.google.gson.JsonElement;
 import com.x.base.core.project.annotation.JaxrsDescribe;
 import com.x.base.core.project.annotation.JaxrsMethodDescribe;
 import com.x.base.core.project.annotation.JaxrsParameterDescribe;
@@ -70,38 +72,38 @@ public class EmpowerLogAction extends StandardJaxrsAction {
 	}
 
 	@JaxrsMethodDescribe(value = "获取当前人员的委托日志.", action = ActionListWithCurrentPersonPaging.class)
-	@GET
+	@POST
 	@Path("list/currentperson/paging/{page}/size/{size}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void listWithCurrentPersonPaging(@Suspended final AsyncResponse asyncResponse,
 			@Context HttpServletRequest request, @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
-			@JaxrsParameterDescribe("数量") @PathParam("size") Integer size) {
+			@JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
 		ActionResult<List<ActionListWithCurrentPersonPaging.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = new ActionListWithCurrentPersonPaging().execute(effectivePerson, page, size);
+			result = new ActionListWithCurrentPersonPaging().execute(effectivePerson, page, size, jsonElement);
 		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
+			logger.error(e, effectivePerson, request, jsonElement);
 			result.error(e);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 
 	@JaxrsMethodDescribe(value = "获取当前人员的被委托日志.", action = ActionListToCurrentPersonPaging.class)
-	@GET
+	@POST
 	@Path("list/to/currentperson/paging/{page}/size/{size}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void listToCurrentPersonPaging(@Suspended final AsyncResponse asyncResponse,
 			@Context HttpServletRequest request, @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
-			@JaxrsParameterDescribe("数量") @PathParam("size") Integer size) {
+			@JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
 		ActionResult<List<ActionListToCurrentPersonPaging.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = new ActionListToCurrentPersonPaging().execute(effectivePerson, page, size);
+			result = new ActionListToCurrentPersonPaging().execute(effectivePerson, page, size, jsonElement);
 		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
+			logger.error(e, effectivePerson, request, jsonElement);
 			result.error(e);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
@@ -124,4 +126,23 @@ public class EmpowerLogAction extends StandardJaxrsAction {
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 
+	@JaxrsMethodDescribe(value = "管理员根据条件查询委托日志.", action = ActionManagerListPaging.class)
+	@POST
+	@Path("manager/list/paging/{page}/size/{size}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void managerlistPaging(@Suspended final AsyncResponse asyncResponse,
+											@Context HttpServletRequest request, @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
+											@JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
+		ActionResult<List<ActionManagerListPaging.Wo>> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionManagerListPaging().execute(effectivePerson, page, size, jsonElement);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, jsonElement);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
 }

+ 14 - 15
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/accredit/EmpowerLog.java

@@ -19,6 +19,7 @@ import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
 import com.x.base.core.entity.annotation.ContainerEntity;
 import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.tools.StringTools;
 import com.x.organization.core.entity.PersistenceProperties;
 
 @Entity
@@ -49,12 +50,14 @@ public class EmpowerLog extends SliceJpaObject {
 	/* 以上为 JpaObject 默认字段 */
 
 	public void onPersist() throws Exception {
+
 	}
 
-	/** 更新运行方法 */
+	public void setTitle(String title) {
+		this.title = StringTools.utf8SubString(title, JpaObject.length_255B);
+	}
 
-	/** flag标志位 */
-	/** 默认内容结束 */
+	/** 更新运行方法 */
 
 	public static final String fromPerson_FIELDNAME = "fromPerson";
 	@FieldDescribe("人员.")
@@ -136,13 +139,13 @@ public class EmpowerLog extends SliceJpaObject {
 	@CheckPersist(allowEmpty = true)
 	private String work;
 
-	public static final String trustTime_FIELDNAME = "trustTime";
+	public static final String empowerTime_FIELDNAME = "empowerTime";
 	@FieldDescribe("委托时间.")
 	@Temporal(TemporalType.TIMESTAMP)
-	@Column(name = ColumnNamePrefix + trustTime_FIELDNAME)
-	@Index(name = TABLE + IndexNameMiddle + trustTime_FIELDNAME)
+	@Column(name = ColumnNamePrefix + empowerTime_FIELDNAME)
+	@Index(name = TABLE + IndexNameMiddle + empowerTime_FIELDNAME)
 	@CheckPersist(allowEmpty = true)
-	private Date trustTime;
+	private Date empowerTime;
 
 	public static final String title_FIELDNAME = "title";
 	@FieldDescribe("标题.")
@@ -268,22 +271,18 @@ public class EmpowerLog extends SliceJpaObject {
 		this.work = work;
 	}
 
-	public Date getTrustTime() {
-		return trustTime;
+	public Date getEmpowerTime() {
+		return empowerTime;
 	}
 
-	public void setTrustTime(Date trustTime) {
-		this.trustTime = trustTime;
+	public void setEmpowerTime(Date empowerTime) {
+		this.empowerTime = empowerTime;
 	}
 
 	public String getTitle() {
 		return title;
 	}
 
-	public void setTitle(String title) {
-		this.title = title;
-	}
-
 	public String getActivity() {
 		return activity;
 	}

+ 0 - 2
o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/ThisApplication.java

@@ -4,7 +4,6 @@ import com.x.base.core.project.Context;
 import com.x.base.core.project.config.Config;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.message.MessageConnector;
-import com.x.processplatform.assemble.designer.schedule.CleanElementVersion;
 
 public class ThisApplication {
 
@@ -29,7 +28,6 @@ public class ThisApplication {
 			formVersionQueue.start();
 			processVersionQueue.start();
 			scriptVersionQueue.start();
-			context.schedule(CleanElementVersion.class, "20 20 5 * * ?");
 		} catch (Exception e) {
 			e.printStackTrace();
 		}

+ 0 - 153
o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/schedule/CleanElementVersion.java

@@ -1,153 +0,0 @@
-package com.x.processplatform.assemble.designer.schedule;
-
-import java.util.Date;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import org.apache.commons.lang3.time.DateUtils;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.annotation.CheckRemoveType;
-import com.x.base.core.project.config.Config;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.schedule.AbstractJob;
-import com.x.base.core.project.tools.ListTools;
-import com.x.base.core.project.utils.time.TimeStamp;
-import com.x.processplatform.assemble.designer.Business;
-import com.x.processplatform.core.entity.element.FormVersion;
-import com.x.processplatform.core.entity.element.FormVersion_;
-import com.x.processplatform.core.entity.element.ProcessVersion;
-import com.x.processplatform.core.entity.element.ProcessVersion_;
-import com.x.processplatform.core.entity.element.ScriptVersion;
-import com.x.processplatform.core.entity.element.ScriptVersion_;
-
-public class CleanElementVersion extends AbstractJob {
-
-	private static Logger logger = LoggerFactory.getLogger(CleanElementVersion.class);
-
-	@Override
-	public void schedule(JobExecutionContext jobExecutionContext) throws Exception {
-		TimeStamp stamp = new TimeStamp();
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-
-			Business business = new Business(emc);
-
-			int formVersionCount = cleanFormVersion(business);
-			int processVersionCount = cleanProcessVersion(business);
-			int scriptVersionCount = cleanScriptVersion(business);
-
-			logger.print("清理历史表单 {} 个, 历史流程{} 个, 历史脚本{} 个, 耗时:{}.", formVersionCount, processVersionCount,
-					scriptVersionCount, stamp.consumingMilliseconds());
-		
-		} catch (Exception e) {
-			logger.error(e);
-			throw new JobExecutionException(e);
-		}
-	}
-
-	private Integer cleanScriptVersion(Business business) throws Exception {
-		List<String> ids;
-		ScriptVersion scriptVersion;
-		int count = 0;
-		do {
-			ids = this.listScriptVersion(business);
-			if (ListTools.isNotEmpty(ids)) {
-				business.entityManagerContainer().beginTransaction(ScriptVersion.class);
-				for (String id : ids) {
-					scriptVersion = business.entityManagerContainer().find(id, ScriptVersion.class);
-					business.entityManagerContainer().remove(scriptVersion, CheckRemoveType.all);
-					count++;
-				}
-				business.entityManagerContainer().commit();
-			}
-		} while (ListTools.isNotEmpty(ids));
-		return count;
-	}
-
-	private Integer cleanProcessVersion(Business business) throws Exception {
-		List<String> ids;
-		ProcessVersion processVersion;
-		int count = 0;
-		do {
-			ids = this.listProcessVersion(business);
-			if (ListTools.isNotEmpty(ids)) {
-				business.entityManagerContainer().beginTransaction(ProcessVersion.class);
-				for (String id : ids) {
-					processVersion = business.entityManagerContainer().find(id, ProcessVersion.class);
-					business.entityManagerContainer().remove(processVersion, CheckRemoveType.all);
-					count++;
-				}
-				business.entityManagerContainer().commit();
-			}
-		} while (ListTools.isNotEmpty(ids));
-		return count;
-	}
-
-	private Integer cleanFormVersion(Business business) throws Exception {
-		List<String> ids;
-		FormVersion formVersion;
-		int count = 0;
-		do {
-			ids = this.listFormVersion(business);
-			if (ListTools.isNotEmpty(ids)) {
-				business.entityManagerContainer().beginTransaction(FormVersion.class);
-				for (String id : ids) {
-					formVersion = business.entityManagerContainer().find(id, FormVersion.class);
-					business.entityManagerContainer().remove(formVersion, CheckRemoveType.all);
-					count++;
-				}
-				business.entityManagerContainer().commit();
-			}
-		} while (ListTools.isNotEmpty(ids));
-		return count;
-	}
-
-	private List<String> listFormVersion(Business business) throws Exception {
-		Date date = new Date();
-		date = DateUtils.addDays(date, 0 - Config.processPlatform().getFormVersionPeriod());
-		EntityManager em = business.entityManagerContainer().get(FormVersion.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<FormVersion> root = cq.from(FormVersion.class);
-		Predicate p = cb.lessThan(root.get(FormVersion_.createTime), date);
-		cq.select(root.get(FormVersion_.id)).where(p).distinct(true);
-		List<String> os = em.createQuery(cq.distinct(true)).setMaxResults(100).getResultList();
-		return os;
-	}
-
-	private List<String> listProcessVersion(Business business) throws Exception {
-		Date date = new Date();
-		date = DateUtils.addDays(date, 0 - Config.processPlatform().getProcessVersionPeriod());
-		EntityManager em = business.entityManagerContainer().get(ProcessVersion.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<ProcessVersion> root = cq.from(ProcessVersion.class);
-		Predicate p = cb.lessThan(root.get(ProcessVersion_.createTime), date);
-		cq.select(root.get(ProcessVersion_.id)).where(p).distinct(true);
-		List<String> os = em.createQuery(cq.distinct(true)).setMaxResults(100).getResultList();
-		return os;
-	}
-
-	private List<String> listScriptVersion(Business business) throws Exception {
-		Date date = new Date();
-		date = DateUtils.addDays(date, 0 - Config.processPlatform().getScriptVersionPeriod());
-		EntityManager em = business.entityManagerContainer().get(ScriptVersion.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<ScriptVersion> root = cq.from(ScriptVersion.class);
-		Predicate p = cb.lessThan(root.get(ScriptVersion_.createTime), date);
-		cq.select(root.get(ScriptVersion_.id)).where(p).distinct(true);
-		List<String> os = em.createQuery(cq.distinct(true)).setMaxResults(100).getResultList();
-		return os;
-	}
-
-}

+ 0 - 4
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/ActionApplication.java

@@ -23,8 +23,6 @@ import com.x.processplatform.assemble.surface.jaxrs.script.ScriptAction;
 import com.x.processplatform.assemble.surface.jaxrs.serialnumber.SerialNumberAction;
 import com.x.processplatform.assemble.surface.jaxrs.task.TaskAction;
 import com.x.processplatform.assemble.surface.jaxrs.taskcompleted.TaskCompletedAction;
-import com.x.processplatform.assemble.surface.jaxrs.tool.ToolAction;
-import com.x.processplatform.assemble.surface.jaxrs.util.UtilAction;
 import com.x.processplatform.assemble.surface.jaxrs.work.WorkAction;
 import com.x.processplatform.assemble.surface.jaxrs.workcompleted.WorkCompletedAction;
 import com.x.processplatform.assemble.surface.jaxrs.worklog.WorkLogAction;
@@ -49,10 +47,8 @@ public class ActionApplication extends AbstractActionApplication {
 		classes.add(WorkAction.class);
 		classes.add(WorkCompletedAction.class);
 		classes.add(JobAction.class);
-		classes.add(ToolAction.class);
 		classes.add(FileAction.class);
 		classes.add(FormAction.class);
-		classes.add(UtilAction.class);
 		classes.add(WorkLogAction.class);
 		classes.add(ControlAction.class);
 		classes.add(RouteAction.class);

+ 0 - 10
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/ToolJaxrsFilter.java

@@ -1,10 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs;
-
-import javax.servlet.annotation.WebFilter;
-
-import com.x.base.core.project.jaxrs.CipherManagerUserJaxrsFilter;
-
-@WebFilter(urlPatterns = "/jaxrs/tool/*", asyncSupported = true)
-public class ToolJaxrsFilter extends CipherManagerUserJaxrsFilter {
-
-}

+ 0 - 10
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/UtilJaxrsFilter.java

@@ -1,10 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs;
-
-import javax.servlet.annotation.WebFilter;
-
-import com.x.base.core.project.jaxrs.CipherManagerUserJaxrsFilter;
-
-@WebFilter(urlPatterns = "/jaxrs/util/*", asyncSupported = true)
-public class UtilJaxrsFilter extends CipherManagerUserJaxrsFilter {
-
-}

+ 0 - 1
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionUpdateCallback.java

@@ -1,6 +1,5 @@
 package com.x.processplatform.assemble.surface.jaxrs.attachment;
 
-import com.x.base.core.entity.annotation.CheckPersistType;
 import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.tika.Tika;

+ 6 - 5
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/file/ActionListWithApplication.java

@@ -1,5 +1,6 @@
 package com.x.processplatform.assemble.surface.jaxrs.file;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import com.x.base.core.container.EntityManagerContainer;
@@ -7,7 +8,6 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
@@ -19,18 +19,19 @@ import com.x.processplatform.core.entity.element.File;
 class ActionListWithApplication extends BaseAction {
 
 	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String applicationFlag) throws Exception {
+		List<Wo> wos = new ArrayList<>();
+		ActionResult<List<Wo>> result = new ActionResult<>();
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			Business business = new Business(emc);
-			ActionResult<List<Wo>> result = new ActionResult<>();
 			Application application = business.application().pick(applicationFlag);
 			if (null == application) {
 				throw new ExceptionEntityNotExist(applicationFlag, Application.class);
 			}
-			List<Wo> wos = emc.fetchEqual(File.class, Wo.copier, File.application_FIELDNAME, application.getId());
+			wos = emc.fetchEqual(File.class, Wo.copier, File.application_FIELDNAME, application.getId());
 			wos = business.file().sort(wos);
-			result.setData(wos);
-			return result;
 		}
+		result.setData(wos);
+		return result;
 	}
 
 	public static class Wo extends File {

+ 2 - 1
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ActionGetAllowRerouteTo.java

@@ -10,6 +10,7 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.processplatform.assemble.surface.Business;
@@ -37,7 +38,7 @@ class ActionGetAllowRerouteTo extends BaseAction {
 			Business business = new Business(emc);
 			Process process = business.process().pick(flag);
 			if (null == process) {
-				throw new ExceptionProcessNotExist(flag);
+				throw new ExceptionEntityNotExist(flag, Process.class);
 			}
 			Wo wo = Wo.copier.copy(process);
 			wo.setAgentList(this.filterAgents(business, process));

+ 2 - 1
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ActionGetComplex.java

@@ -7,6 +7,7 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.processplatform.assemble.surface.Business;
@@ -35,7 +36,7 @@ class ActionGetComplex extends BaseAction {
 			Business business = new Business(emc);
 			Process process = business.process().pick(flag);
 			if (null == process) {
-				throw new ExceptionProcessNotExist(flag);
+				throw new ExceptionEntityNotExist(flag, Process.class);
 			}
 			Wo wo = this.pack(business, process);
 			result.setData(wo);

+ 2 - 1
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ActionListAvailableIdentityWithProcess.java

@@ -8,6 +8,7 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.organization.Identity;
@@ -24,7 +25,7 @@ public class ActionListAvailableIdentityWithProcess extends BaseAction {
 			Business business = new Business(emc);
 			Process process = business.process().pick(flag);
 			if (null == process) {
-				throw new ExceptionProcessNotExist(flag);
+				throw new ExceptionEntityNotExist(flag, Process.class);
 			}
 			List<String> identities = business.organization().identity().listWithPerson(effectivePerson);
 			List<String> dns = new ArrayList<>();

+ 227 - 157
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ActionListWithPersonWithApplication.java

@@ -8,25 +8,12 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.exception.ExceptionAccessDenied;
+import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.tools.SortTools;
 import com.x.processplatform.assemble.surface.Business;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutAgent;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutBegin;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutCancel;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutChoice;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutDelay;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutEmbed;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutEnd;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutInvoke;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutManual;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutMerge;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutMessage;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutParallel;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutRoute;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutService;
-import com.x.processplatform.assemble.surface.wrapout.element.WrapOutSplit;
 import com.x.processplatform.core.entity.element.Application;
 import com.x.processplatform.core.entity.element.Process;
 
@@ -39,15 +26,13 @@ class ActionListWithPersonWithApplication extends BaseAction {
 			List<Wo> wos = new ArrayList<>();
 			Application application = business.application().pick(applicationFlag);
 			if (null == application) {
-				throw new ExceptionApplicationNotExist(applicationFlag);
+				throw new ExceptionEntityNotExist(applicationFlag, Application.class);
 			}
 			List<String> roles = business.organization().role().listWithPerson(effectivePerson);
 			List<String> identities = business.organization().identity().listWithPerson(effectivePerson);
 			List<String> units = business.organization().unit().listWithPersonSupNested(effectivePerson);
 			if (!business.application().allowRead(effectivePerson, roles, identities, units, application)) {
-				throw new Exception("person{name:" + effectivePerson.getDistinguishedName()
-						+ "} has insufficient permissions with application name: " + application.getName() + ", id: "
-						+ application.getId() + ".");
+				throw new ExceptionAccessDenied(effectivePerson);
 			}
 
 			List<String> ids = business.process().listStartableWithApplication(effectivePerson, identities, units,
@@ -64,146 +49,231 @@ class ActionListWithPersonWithApplication extends BaseAction {
 	public static class Wo extends Process {
 
 		private static final long serialVersionUID = 1521228691441978462L;
-		public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
 
-		static WrapCopier<Process, Wo> copier = WrapCopierFactory.wo(Process.class, Wo.class, null, Wo.Excludes);
-
-		private List<WrapOutAgent> agentList;
-		private WrapOutBegin begin;
-		private List<WrapOutCancel> cancelList;
-		private List<WrapOutChoice> choiceList;
-		private List<WrapOutDelay> delayList;
-		private List<WrapOutEmbed> embedList;
-		private List<WrapOutEnd> endList;
-		private List<WrapOutInvoke> invokeList;
-		private List<WrapOutManual> manualList;
-		private List<WrapOutMerge> mergeList;
-		private List<WrapOutMessage> messageList;
-		private List<WrapOutRoute> routeList;
-		private List<WrapOutParallel> parallelList;
-		private List<WrapOutService> serviceList;
-		private List<WrapOutSplit> splitList;
-
-		public List<WrapOutAgent> getAgentList() {
-			return agentList;
-		}
-
-		public void setAgentList(List<WrapOutAgent> agentList) {
-			this.agentList = agentList;
-		}
-
-		public WrapOutBegin getBegin() {
-			return begin;
-		}
-
-		public void setBegin(WrapOutBegin begin) {
-			this.begin = begin;
-		}
-
-		public List<WrapOutCancel> getCancelList() {
-			return cancelList;
-		}
-
-		public void setCancelList(List<WrapOutCancel> cancelList) {
-			this.cancelList = cancelList;
-		}
-
-		public List<WrapOutChoice> getChoiceList() {
-			return choiceList;
-		}
-
-		public void setChoiceList(List<WrapOutChoice> choiceList) {
-			this.choiceList = choiceList;
-		}
-
-		public List<WrapOutDelay> getDelayList() {
-			return delayList;
-		}
-
-		public void setDelayList(List<WrapOutDelay> delayList) {
-			this.delayList = delayList;
-		}
-
-		public List<WrapOutEmbed> getEmbedList() {
-			return embedList;
-		}
-
-		public void setEmbedList(List<WrapOutEmbed> embedList) {
-			this.embedList = embedList;
-		}
-
-		public List<WrapOutEnd> getEndList() {
-			return endList;
-		}
-
-		public void setEndList(List<WrapOutEnd> endList) {
-			this.endList = endList;
-		}
-
-		public List<WrapOutInvoke> getInvokeList() {
-			return invokeList;
-		}
-
-		public void setInvokeList(List<WrapOutInvoke> invokeList) {
-			this.invokeList = invokeList;
-		}
-
-		public List<WrapOutManual> getManualList() {
-			return manualList;
-		}
-
-		public void setManualList(List<WrapOutManual> manualList) {
-			this.manualList = manualList;
-		}
-
-		public List<WrapOutMerge> getMergeList() {
-			return mergeList;
-		}
-
-		public void setMergeList(List<WrapOutMerge> mergeList) {
-			this.mergeList = mergeList;
-		}
-
-		public List<WrapOutMessage> getMessageList() {
-			return messageList;
-		}
-
-		public void setMessageList(List<WrapOutMessage> messageList) {
-			this.messageList = messageList;
-		}
-
-		public List<WrapOutRoute> getRouteList() {
-			return routeList;
-		}
-
-		public void setRouteList(List<WrapOutRoute> routeList) {
-			this.routeList = routeList;
-		}
-
-		public List<WrapOutParallel> getParallelList() {
-			return parallelList;
-		}
-
-		public void setParallelList(List<WrapOutParallel> parallelList) {
-			this.parallelList = parallelList;
-		}
-
-		public List<WrapOutService> getServiceList() {
-			return serviceList;
-		}
-
-		public void setServiceList(List<WrapOutService> serviceList) {
-			this.serviceList = serviceList;
-		}
-
-		public List<WrapOutSplit> getSplitList() {
-			return splitList;
-		}
-
-		public void setSplitList(List<WrapOutSplit> splitList) {
-			this.splitList = splitList;
-		}
+		static WrapCopier<Process, Wo> copier = WrapCopierFactory.wo(Process.class, Wo.class, null,
+				JpaObject.FieldsInvisible);
+
+//		private List<WrapOutAgent> agentList;
+//		private WrapOutBegin begin;
+//		private List<WrapOutCancel> cancelList;
+//		private List<WrapOutChoice> choiceList;
+//		private List<WrapOutDelay> delayList;
+//		private List<WrapOutEmbed> embedList;
+//		private List<WrapOutEnd> endList;
+//		private List<WrapOutInvoke> invokeList;
+//		private List<WrapOutManual> manualList;
+//		private List<WrapOutMerge> mergeList;
+//		private List<WrapOutMessage> messageList;
+//		private List<WrapOutRoute> routeList;
+//		private List<WrapOutParallel> parallelList;
+//		private List<WrapOutService> serviceList;
+//		private List<WrapOutSplit> splitList;
+//
+//		public List<WrapOutAgent> getAgentList() {
+//			return agentList;
+//		}
+//
+//		public void setAgentList(List<WrapOutAgent> agentList) {
+//			this.agentList = agentList;
+//		}
+//
+//		public WrapOutBegin getBegin() {
+//			return begin;
+//		}
+//
+//		public void setBegin(WrapOutBegin begin) {
+//			this.begin = begin;
+//		}
+//
+//		public List<WrapOutCancel> getCancelList() {
+//			return cancelList;
+//		}
+//
+//		public void setCancelList(List<WrapOutCancel> cancelList) {
+//			this.cancelList = cancelList;
+//		}
+//
+//		public List<WrapOutChoice> getChoiceList() {
+//			return choiceList;
+//		}
+//
+//		public void setChoiceList(List<WrapOutChoice> choiceList) {
+//			this.choiceList = choiceList;
+//		}
+//
+//		public List<WrapOutDelay> getDelayList() {
+//			return delayList;
+//		}
+//
+//		public void setDelayList(List<WrapOutDelay> delayList) {
+//			this.delayList = delayList;
+//		}
+//
+//		public List<WrapOutEmbed> getEmbedList() {
+//			return embedList;
+//		}
+//
+//		public void setEmbedList(List<WrapOutEmbed> embedList) {
+//			this.embedList = embedList;
+//		}
+//
+//		public List<WrapOutEnd> getEndList() {
+//			return endList;
+//		}
+//
+//		public void setEndList(List<WrapOutEnd> endList) {
+//			this.endList = endList;
+//		}
+//
+//		public List<WrapOutInvoke> getInvokeList() {
+//			return invokeList;
+//		}
+//
+//		public void setInvokeList(List<WrapOutInvoke> invokeList) {
+//			this.invokeList = invokeList;
+//		}
+//
+//		public List<WrapOutManual> getManualList() {
+//			return manualList;
+//		}
+//
+//		public void setManualList(List<WrapOutManual> manualList) {
+//			this.manualList = manualList;
+//		}
+//
+//		public List<WrapOutMerge> getMergeList() {
+//			return mergeList;
+//		}
+//
+//		public void setMergeList(List<WrapOutMerge> mergeList) {
+//			this.mergeList = mergeList;
+//		}
+//
+//		public List<WrapOutMessage> getMessageList() {
+//			return messageList;
+//		}
+//
+//		public void setMessageList(List<WrapOutMessage> messageList) {
+//			this.messageList = messageList;
+//		}
+//
+//		public List<WrapOutRoute> getRouteList() {
+//			return routeList;
+//		}
+//
+//		public void setRouteList(List<WrapOutRoute> routeList) {
+//			this.routeList = routeList;
+//		}
+//
+//		public List<WrapOutParallel> getParallelList() {
+//			return parallelList;
+//		}
+//
+//		public void setParallelList(List<WrapOutParallel> parallelList) {
+//			this.parallelList = parallelList;
+//		}
+//
+//		public List<WrapOutService> getServiceList() {
+//			return serviceList;
+//		}
+//
+//		public void setServiceList(List<WrapOutService> serviceList) {
+//			this.serviceList = serviceList;
+//		}
+//
+//		public List<WrapOutSplit> getSplitList() {
+//			return splitList;
+//		}
+//
+//		public void setSplitList(List<WrapOutSplit> splitList) {
+//			this.splitList = splitList;
+//		}
 
 	}
 
+//	public static class WrapOutAgent extends Agent {
+//
+//		private static final long serialVersionUID = 797206511536423164L;
+//
+//	}
+//
+//	public class WrapOutBegin extends Begin {
+//
+//		private static final long serialVersionUID = 2446418422019675597L;
+//	}
+//
+//	public class WrapOutCancel extends Cancel {
+//
+//		private static final long serialVersionUID = 813182162888838666L;
+//	}
+//
+//	public class WrapOutChoice extends Choice {
+//
+//		private static final long serialVersionUID = -1907168588535775375L;
+//	}
+//
+//	public class WrapOutDelay extends Delay {
+//
+//		private static final long serialVersionUID = 2184569713152663503L;
+//
+//	}
+//
+//	public class WrapOutEmbed extends Embed {
+//
+//		private static final long serialVersionUID = 298602065524433660L;
+//
+//	}
+//
+//	public class WrapOutEnd extends End {
+//		private static final long serialVersionUID = 7675857316009459984L;
+//	}
+//
+//	public class WrapOutInvoke extends Invoke {
+//
+//		private static final long serialVersionUID = -6918382714118518231L;
+//
+//	}
+//
+//	public class WrapOutManual extends Manual {
+//
+//		private static final long serialVersionUID = -5145199730047767525L;
+//
+//	}
+//
+//	public class WrapOutMerge extends Merge {
+//
+//		private static final long serialVersionUID = 5007599746571282452L;
+//
+//	}
+//
+//	public class WrapOutMessage extends Message {
+//
+//		private static final long serialVersionUID = -2833187584269867692L;
+//
+//	}
+//
+//	public class WrapOutParallel extends Parallel {
+//
+//		private static final long serialVersionUID = 3452734679516289443L;
+//
+//	}
+//
+//	public class WrapOutService extends Service {
+//
+//		private static final long serialVersionUID = -8322044803022612130L;
+//
+//	}
+//
+//	public class WrapOutSplit extends Split {
+//
+//		private static final long serialVersionUID = 2746872526189840000L;
+//
+//	}
+//
+//	public class WrapOutRoute extends Route {
+//
+//		private static final long serialVersionUID = 4309969270030957709L;
+//
+//	}
+
 }

+ 0 - 12
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ExceptionApplicationNotExist.java

@@ -1,12 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs.process;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionApplicationNotExist extends PromptException {
-
-	private static final long serialVersionUID = 5092496738469805434L;
-
-	ExceptionApplicationNotExist(String flag) {
-		super("application:{} not existed.", flag);
-	}
-}

+ 0 - 12
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/process/ExceptionProcessNotExist.java

@@ -1,12 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs.process;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ExceptionProcessNotExist extends PromptException {
-
-	private static final long serialVersionUID = 7546873370819826009L;
-
-	ExceptionProcessNotExist(String flag) {
-		super("process:{} not existed.", flag);
-	}
-}

+ 15 - 12
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionCreateWithWork.java

@@ -26,11 +26,16 @@ class ActionCreateWithWork extends BaseAction {
 
 	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String workId, JsonElement jsonElement)
 			throws Exception {
+		ActionResult<List<Wo>> result = new ActionResult<>();
+		Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
+		Work work = null;
+		if (ListTools.isEmpty(wi.getIdentityList())) {
+			throw new ExceptionEmptyIdentity();
+		}
+
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<List<Wo>> result = new ActionResult<>();
-			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
 			Business business = new Business(emc);
-			Work work = emc.find(workId, Work.class);
+			work = emc.find(workId, Work.class);
 			if (null == work) {
 				throw new ExceptionEntityNotExist(workId, Work.class);
 			}
@@ -40,16 +45,14 @@ class ActionCreateWithWork extends BaseAction {
 					throw new ExceptionAccessDenied(effectivePerson, work);
 				}
 			}
-			if (ListTools.isEmpty(wi.getIdentityList())) {
-				throw new ExceptionEmptyIdentity();
-			}
-			List<Wo> wos = ThisApplication.context().applications()
-					.postQuery(effectivePerson.getDebugger(), x_processplatform_service_processing.class,
-							"read/work/" + URLEncoder.encode(work.getId(), DefaultCharset.name), wi)
-					.getDataAsList(Wo.class);
-			result.setData(wos);
-			return result;
 		}
+
+		List<Wo> wos = ThisApplication.context().applications()
+				.postQuery(effectivePerson.getDebugger(), x_processplatform_service_processing.class,
+						"read/work/" + URLEncoder.encode(work.getId(), DefaultCharset.name), wi, work.getJob())
+				.getDataAsList(Wo.class);
+		result.setData(wos);
+		return result;
 	}
 
 	public static class Wi extends GsonPropertyObject {

+ 17 - 14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionCreateWithWorkCompleted.java

@@ -1,12 +1,12 @@
 package com.x.processplatform.assemble.surface.jaxrs.read;
 
-import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.List;
 
 import com.google.gson.JsonElement;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.project.Applications;
 import com.x.base.core.project.x_processplatform_service_processing;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
@@ -15,7 +15,6 @@ import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.tools.DefaultCharset;
 import com.x.base.core.project.tools.ListTools;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.assemble.surface.ThisApplication;
@@ -26,11 +25,17 @@ class ActionCreateWithWorkCompleted extends BaseAction {
 
 	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String workCompletedId, JsonElement jsonElement)
 			throws Exception {
+		ActionResult<List<Wo>> result = new ActionResult<>();
+		Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
+		WorkCompleted workCompleted = null;
+
+		if (ListTools.isEmpty(wi.getIdentityList())) {
+			throw new ExceptionEmptyIdentity();
+		}
+
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<List<Wo>> result = new ActionResult<>();
-			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
 			Business business = new Business(emc);
-			WorkCompleted workCompleted = emc.find(workCompletedId, WorkCompleted.class);
+			workCompleted = emc.find(workCompletedId, WorkCompleted.class);
 			if (null == workCompleted) {
 				throw new ExceptionEntityNotExist(workCompletedId, WorkCompleted.class);
 			}
@@ -41,16 +46,14 @@ class ActionCreateWithWorkCompleted extends BaseAction {
 					throw new ExceptionAccessDenied(effectivePerson, workCompleted);
 				}
 			}
-			if (ListTools.isEmpty(wi.getIdentityList())) {
-				throw new ExceptionEmptyIdentity();
-			}
-			List<Wo> wos = ThisApplication.context().applications()
-					.postQuery(effectivePerson.getDebugger(), x_processplatform_service_processing.class,
-							"read/workcompleted/" + URLEncoder.encode(workCompleted.getId(), DefaultCharset.name), wi)
-					.getDataAsList(Wo.class);
-			result.setData(wos);
-			return result;
 		}
+		List<Wo> wos = ThisApplication.context().applications()
+				.postQuery(effectivePerson.getDebugger(), x_processplatform_service_processing.class,
+						Applications.joinQueryUri("read", "workcompleted", workCompleted.getId()), wi,
+						workCompleted.getJob())
+				.getDataAsList(Wo.class);
+		result.setData(wos);
+		return result;
 	}
 
 	public static class Wi extends GsonPropertyObject {

+ 0 - 2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionManageProcessing.java

@@ -1,7 +1,5 @@
 package com.x.processplatform.assemble.surface.jaxrs.read;
 
-import java.net.URLEncoder;
-
 import org.apache.commons.lang3.StringUtils;
 
 import com.google.gson.JsonElement;

+ 2 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionProcessing.java

@@ -1,12 +1,11 @@
 package com.x.processplatform.assemble.surface.jaxrs.read;
 
-import java.net.URLEncoder;
-
 import org.apache.commons.lang3.StringUtils;
 
 import com.google.gson.JsonElement;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.project.Applications;
 import com.x.base.core.project.x_processplatform_service_processing;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
@@ -45,7 +44,7 @@ class ActionProcessing extends BaseAction {
 		/* processing read */
 		Wo wo = ThisApplication.context().applications()
 				.putQuery(x_processplatform_service_processing.class,
-						"read/" + URLEncoder.encode(read.getId(), "UTF-8") + "/processing", null, read.getJob())
+						Applications.joinQueryUri("read", read.getId(), "processing"), null, read.getJob())
 				.getData(Wo.class);
 		result.setData(wo);
 		return result;

+ 10 - 10
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionManageDelete.java

@@ -1,9 +1,8 @@
 package com.x.processplatform.assemble.surface.jaxrs.readcompleted;
 
-import java.net.URLEncoder;
-
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.project.Applications;
 import com.x.base.core.project.x_processplatform_service_processing;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
@@ -19,10 +18,11 @@ import com.x.processplatform.core.entity.element.Process;
 class ActionManageDelete extends BaseAction {
 
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		ReadCompleted readCompleted = null;
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
 			Business business = new Business(emc);
-			ReadCompleted readCompleted = emc.find(id, ReadCompleted.class);
+			readCompleted = emc.find(id, ReadCompleted.class);
 			if (null == readCompleted) {
 				throw new ExceptionEntityNotExist(id, ReadCompleted.class);
 			}
@@ -32,13 +32,13 @@ class ActionManageDelete extends BaseAction {
 			if (!business.canManageApplicationOrProcess(effectivePerson, application, process)) {
 				throw new ExceptionAccessDenied(effectivePerson);
 			}
-			ThisApplication.context().applications().deleteQuery(x_processplatform_service_processing.class,
-					"readcompleted/" + URLEncoder.encode(readCompleted.getId(), "UTF-8"));
-			Wo wo = new Wo();
-			wo.setId(readCompleted.getId());
-			result.setData(wo);
-			return result;
 		}
+		ThisApplication.context().applications().deleteQuery(x_processplatform_service_processing.class,
+				Applications.joinQueryUri("readcompleted", readCompleted.getId()), readCompleted.getJob());
+		Wo wo = new Wo();
+		wo.setId(readCompleted.getId());
+		result.setData(wo);
+		return result;
 	}
 
 	public static class Wo extends WoId {

+ 8 - 16
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/BaseAction.java

@@ -6,30 +6,22 @@ import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
 import com.x.processplatform.assemble.surface.Business;
-import com.x.processplatform.assemble.surface.wrapout.content.WrapOutReadCompleted;
-import com.x.processplatform.assemble.surface.wrapout.content.WrapOutWork;
-import com.x.processplatform.assemble.surface.wrapout.content.WrapOutWorkCompleted;
 import com.x.processplatform.core.entity.content.ReadCompleted;
 import com.x.processplatform.core.entity.content.ReadCompleted_;
-import com.x.processplatform.core.entity.content.Work;
-import com.x.processplatform.core.entity.content.WorkCompleted;
 
 abstract class BaseAction extends StandardJaxrsAction {
 
-	static WrapCopier<ReadCompleted, WrapOutReadCompleted> readCompletedOutCopier = WrapCopierFactory
-			.wo(ReadCompleted.class, WrapOutReadCompleted.class, null, WrapOutReadCompleted.FieldsInvisible);
-
-	static WrapCopier<Work, WrapOutWork> workOutCopier = WrapCopierFactory.wo(Work.class, WrapOutWork.class, null,
-			WrapOutWork.Excludes);
-
-	static WrapCopier<WorkCompleted, WrapOutWorkCompleted> workCompletedOutCopier = WrapCopierFactory
-			.wo(WorkCompleted.class, WrapOutWorkCompleted.class, null, WrapOutWorkCompleted.Excludes);
-
+//	static WrapCopier<ReadCompleted, WrapOutReadCompleted> readCompletedOutCopier = WrapCopierFactory
+//			.wo(ReadCompleted.class, WrapOutReadCompleted.class, null, WrapOutReadCompleted.FieldsInvisible);
+//
+//	static WrapCopier<Work, WrapOutWork> workOutCopier = WrapCopierFactory.wo(Work.class, WrapOutWork.class, null,
+//			WrapOutWork.Excludes);
+//
+//	static WrapCopier<WorkCompleted, WrapOutWorkCompleted> workCompletedOutCopier = WrapCopierFactory
+//			.wo(WorkCompleted.class, WrapOutWorkCompleted.class, null, WrapOutWorkCompleted.Excludes);
 	
 
 	Long countWithApplication(Business business, EffectivePerson effectivePerson, String id) throws Exception {

+ 25 - 21
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/review/ActionCreateWithWork.java

@@ -1,36 +1,39 @@
 package com.x.processplatform.assemble.surface.jaxrs.review;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import com.google.gson.JsonElement;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.project.Applications;
+import com.x.base.core.project.x_processplatform_service_processing;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WrapIdList;
+import com.x.base.core.project.jaxrs.WoId;
 import com.x.base.core.project.tools.ListTools;
-import com.x.base.core.project.x_processplatform_service_processing;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.assemble.surface.ThisApplication;
 import com.x.processplatform.assemble.surface.WorkControl;
 import com.x.processplatform.core.entity.content.Work;
 import com.x.processplatform.core.entity.content.WorkCompleted;
 
-import java.util.ArrayList;
-import java.util.List;
-
 class ActionCreateWithWork extends BaseAction {
 
-	protected ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
+	protected ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, JsonElement jsonElement)
+			throws Exception {
+		ActionResult<List<Wo>> result = new ActionResult<>();
+		Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
+		Work work = null;
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
 			Business business = new Business(emc);
-			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
-			Work work = emc.find(wi.getWorkId(), Work.class);
+			work = emc.find(wi.getWork(), Work.class);
 			if (null == work) {
-				throw new ExceptionEntityNotExist(wi.getWorkId(), WorkCompleted.class);
+				throw new ExceptionEntityNotExist(wi.getWork(), WorkCompleted.class);
 			}
 			WoControl control = business.getControl(effectivePerson, work, WoControl.class);
 			if (!control.getAllowVisit()) {
@@ -40,18 +43,19 @@ class ActionCreateWithWork extends BaseAction {
 			if (ListTools.isEmpty(people)) {
 				throw new ExceptionPersonEmpty();
 			}
-			Wo wo = ThisApplication.context().applications()
-					.postQuery(x_processplatform_service_processing.class, "review/create/work", wi)
-					.getData(Wo.class);
-			result.setData(wo);
-			return result;
 		}
+		List<Wo> wos = ThisApplication.context().applications()
+				.postQuery(x_processplatform_service_processing.class,
+						Applications.joinQueryUri("review", "create", "work"), wi, work.getJob())
+				.getDataAsList(Wo.class);
+		result.setData(wos);
+		return result;
 	}
 
 	public static class Wi extends GsonPropertyObject {
 
 		@FieldDescribe("流转中工作")
-		private String workId;
+		private String work;
 
 		@FieldDescribe("可阅读人员")
 		private List<String> personList = new ArrayList<>();
@@ -64,16 +68,16 @@ class ActionCreateWithWork extends BaseAction {
 			this.personList = personList;
 		}
 
-		public String getWorkId() {
-			return workId;
+		public String getWork() {
+			return work;
 		}
 
-		public void setWorkId(String workId) {
-			this.workId = workId;
+		public void setWork(String work) {
+			this.work = work;
 		}
 	}
 
-	public static class Wo extends WrapIdList {
+	public static class Wo extends WoId {
 	}
 
 	public static class WoControl extends WorkControl {

+ 15 - 11
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/review/ActionCreateWithWorkCompleted.java

@@ -6,7 +6,8 @@ import java.util.List;
 import com.google.gson.JsonElement;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.project.jaxrs.WrapIdList;
+import com.x.base.core.project.jaxrs.WoId;
+import com.x.base.core.project.Applications;
 import com.x.base.core.project.x_processplatform_service_processing;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
@@ -22,12 +23,14 @@ import com.x.processplatform.core.entity.content.WorkCompleted;
 
 class ActionCreateWithWorkCompleted extends BaseAction {
 
-	protected ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
+	protected ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, JsonElement jsonElement)
+			throws Exception {
+		ActionResult<List<Wo>> result = new ActionResult<>();
+		Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
+		WorkCompleted workCompleted = null;
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
 			Business business = new Business(emc);
-			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
-			WorkCompleted workCompleted = emc.find(wi.getWorkCompleted(), WorkCompleted.class);
+			workCompleted = emc.find(wi.getWorkCompleted(), WorkCompleted.class);
 			if (null == workCompleted) {
 				throw new ExceptionEntityNotExist(wi.getWorkCompleted(), WorkCompleted.class);
 			}
@@ -39,12 +42,13 @@ class ActionCreateWithWorkCompleted extends BaseAction {
 			if (ListTools.isEmpty(people)) {
 				throw new ExceptionPersonEmpty();
 			}
-			Wo wo = ThisApplication.context().applications()
-					.postQuery(x_processplatform_service_processing.class, "review/create/workcompleted", wi)
-					.getData(Wo.class);
-			result.setData(wo);
-			return result;
 		}
+		List<Wo> wos = ThisApplication.context().applications()
+				.postQuery(x_processplatform_service_processing.class,
+						Applications.joinQueryUri("review", "create", "workcompleted"), wi, workCompleted.getJob())
+				.getDataAsList(Wo.class);
+		result.setData(wos);
+		return result;
 	}
 
 	public static class Wi extends GsonPropertyObject {
@@ -73,7 +77,7 @@ class ActionCreateWithWorkCompleted extends BaseAction {
 
 	}
 
-	public static class Wo extends WrapIdList {
+	public static class Wo extends WoId {
 	}
 
 	public static class WoControl extends WorkCompletedControl {

+ 2 - 2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/review/ReviewAction.java

@@ -207,7 +207,7 @@ public class ReviewAction extends StandardJaxrsAction {
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void createWithWork(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
 			JsonElement jsonElement) {
-		ActionResult<ActionCreateWithWork.Wo> result = new ActionResult<>();
+		ActionResult<List<ActionCreateWithWork.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
 			result = new ActionCreateWithWork().execute(effectivePerson, jsonElement);
@@ -225,7 +225,7 @@ public class ReviewAction extends StandardJaxrsAction {
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void createWithWorkCompleted(@Suspended final AsyncResponse asyncResponse,
 			@Context HttpServletRequest request, JsonElement jsonElement) {
-		ActionResult<ActionCreateWithWorkCompleted.Wo> result = new ActionResult<>();
+		ActionResult<List<ActionCreateWithWorkCompleted.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
 			result = new ActionCreateWithWorkCompleted().execute(effectivePerson, jsonElement);

+ 0 - 15
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionProcessing.java

@@ -162,21 +162,6 @@ class ActionProcessing extends BaseAction {
 		return false;
 	}
 
-//	private List<Wo> listCurrentTask(Business business, String job) throws Exception {
-//		List<WoTask> woTasks = business.entityManagerContainer().fetchEqual(Task.class, WoTask.copier,
-//				Task.job_FIELDNAME, job);
-//		List<Wo> wos = new ArrayList<>();
-//		for (Entry<String, List<WoTask>> en : woTasks.stream().collect(Collectors.groupingBy(WoTask::getActivity))
-//				.entrySet()) {
-//			Wo wo = new Wo();
-//			wo.setActivity(en.getValue().get(0).getActivity());
-//			wo.setActivityName(en.getValue().get(0).getActivityName());
-//			wo.setTaskList(en.getValue());
-//			wos.add(wo);
-//		}
-//		return wos;
-//	}
-
 	public static class Wo extends GsonPropertyObject {
 
 		private String activityName;

+ 17 - 10
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionReset.java

@@ -1,5 +1,6 @@
 package com.x.processplatform.assemble.surface.jaxrs.task;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.commons.collections4.ListUtils;
@@ -27,11 +28,13 @@ import com.x.processplatform.core.entity.content.Task;
 public class ActionReset extends BaseAction {
 
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, JsonElement jsonElement) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
+		Task task = null;
+		List<String> identites = new ArrayList<>();
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
-			ActionResult<Wo> result = new ActionResult<>();
 			Business business = new Business(emc);
-			Task task = emc.find(id, Task.class);
+			task = emc.find(id, Task.class);
 			if (null == task) {
 				throw new ExceptionEntityNotExist(id, Task.class);
 			}
@@ -42,7 +45,7 @@ public class ActionReset extends BaseAction {
 			}
 
 			/* 检查reset人员 */
-			List<String> identites = business.organization().identity().list(wi.getIdentityList());
+			identites = business.organization().identity().list(wi.getIdentityList());
 
 			/* 在新增待办人员中删除当前的处理人 */
 			identites = ListUtils.subtract(identites, ListTools.toList(task.getIdentity()));
@@ -59,14 +62,18 @@ public class ActionReset extends BaseAction {
 				}
 				emc.commit();
 				wi.setIdentityList(identites);
-				ThisApplication.context().applications().putQuery(x_processplatform_service_processing.class,
-						Applications.joinQueryUri("task", task.getId(), "reset"), wi);
 			}
-			Wo wo = new Wo();
-			wo.setId(task.getWork());
-			result.setData(wo);
-			return result;
 		}
+
+		if (!identites.isEmpty()) {
+			ThisApplication.context().applications().putQuery(x_processplatform_service_processing.class,
+					Applications.joinQueryUri("task", task.getId(), "reset"), wi, task.getJob());
+		}
+
+		Wo wo = new Wo();
+		wo.setId(task.getWork());
+		result.setData(wo);
+		return result;
 	}
 
 	public static class Wi extends GsonPropertyObject {

+ 17 - 13
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionManageDelete.java

@@ -1,16 +1,14 @@
 package com.x.processplatform.assemble.surface.jaxrs.taskcompleted;
 
-import java.net.URLEncoder;
-
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.project.Applications;
 import com.x.base.core.project.x_processplatform_service_processing;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.http.WrapOutId;
-import com.x.base.core.project.tools.DefaultCharset;
+import com.x.base.core.project.jaxrs.WoId;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.assemble.surface.ThisApplication;
 import com.x.processplatform.core.entity.content.TaskCompleted;
@@ -19,13 +17,14 @@ import com.x.processplatform.core.entity.element.Process;
 
 class ActionManageDelete extends BaseAction {
 
-	ActionResult<WrapOutId> execute(EffectivePerson effectivePerson, String id) throws Exception {
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		TaskCompleted taskCompleted = null;
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<WrapOutId> result = new ActionResult<>();
 			Business business = new Business(emc);
-			TaskCompleted taskCompleted = emc.find(id, TaskCompleted.class);
+			taskCompleted = emc.find(id, TaskCompleted.class);
 			if (null == taskCompleted) {
-				throw new ExceptionEntityNotExist(id,TaskCompleted.class);
+				throw new ExceptionEntityNotExist(id, TaskCompleted.class);
 			}
 			Process process = business.process().pick(taskCompleted.getProcess());
 			Application application = business.application().pick(taskCompleted.getApplication());
@@ -33,12 +32,17 @@ class ActionManageDelete extends BaseAction {
 			if (!business.canManageApplicationOrProcess(effectivePerson, application, process)) {
 				throw new ExceptionAccessDenied(effectivePerson);
 			}
-			ThisApplication.context().applications().deleteQuery(x_processplatform_service_processing.class,
-					"taskcompleted/" + URLEncoder.encode(taskCompleted.getId(), DefaultCharset.name));
-			WrapOutId wrap = new WrapOutId(taskCompleted.getId());
-			result.setData(wrap);
-			return result;
 		}
+		Wo wo = ThisApplication.context().applications()
+				.deleteQuery(x_processplatform_service_processing.class,
+						Applications.joinQueryUri("taskcompleted", taskCompleted.getId()), taskCompleted.getJob())
+				.getData(Wo.class);
+		result.setData(wo);
+		return result;
+	}
+
+	public static class Wo extends WoId {
+
 	}
 
 }

+ 11 - 10
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionPress.java

@@ -31,14 +31,16 @@ class ActionPress extends BaseAction {
 	private static Logger logger = LoggerFactory.getLogger(ActionPress.class);
 
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, String workId) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		TaskCompleted taskCompleted = null;
+		Work work = null;
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
 			Business business = new Business(emc);
-			Work work = emc.find(workId, Work.class);
+			work = emc.find(workId, Work.class);
 			if (null == work) {
 				throw new ExceptionEntityNotExist(workId, Work.class);
 			}
-			TaskCompleted taskCompleted = emc
+			taskCompleted = emc
 					.listEqualAndEqual(TaskCompleted.class, TaskCompleted.person_FIELDNAME,
 							effectivePerson.getDistinguishedName(), TaskCompleted.job_FIELDNAME, work.getJob())
 					.stream().sorted(Comparator.comparing(TaskCompleted::getCompletedTime,
@@ -63,15 +65,14 @@ class ActionPress extends BaseAction {
 			}
 			if (emc.countEqual(Task.class, Task.work_FIELDNAME, work.getId()) == 0) {
 				throw new ExceptionPressNoneTask(work.getId());
-
 			}
-			Wo wo = ThisApplication
-					.context().applications().getQuery(x_processplatform_service_processing.class, Applications
-							.joinQueryUri("taskcompleted", taskCompleted.getId(), "press", "work", work.getId()))
-					.getData(Wo.class);
-			result.setData(wo);
-			return result;
 		}
+		Wo wo = ThisApplication.context().applications()
+				.getQuery(x_processplatform_service_processing.class, Applications.joinQueryUri("taskcompleted",
+						taskCompleted.getId(), "press", "work", work.getId()), taskCompleted.getJob())
+				.getData(Wo.class);
+		result.setData(wo);
+		return result;
 	}
 
 	public static class Wo extends WrapStringList {

+ 4 - 5
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/TaskCompletedAction.java

@@ -24,7 +24,6 @@ import com.x.base.core.project.bean.NameValueCountPair;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
-import com.x.base.core.project.http.WrapOutId;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
 import com.x.base.core.project.logger.Logger;
@@ -397,7 +396,7 @@ public class TaskCompletedAction extends StandardJaxrsAction {
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void manageDelete(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
 			@JaxrsParameterDescribe("标识") @PathParam("id") String id) {
-		ActionResult<WrapOutId> result = new ActionResult<>();
+		ActionResult<ActionManageDelete.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
 			result = new ActionManageDelete().execute(effectivePerson, id);
@@ -505,9 +504,9 @@ public class TaskCompletedAction extends StandardJaxrsAction {
 	@Path("list/filter/{page}/size/{size}/manage")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void manageListFilterPaging(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-									   @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
-									   @JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
+	public void manageListFilterPaging(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request, @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
+			@JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
 		ActionResult<List<ActionManageListFilterPaging.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {

+ 0 - 69
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/tool/ActionOrganizationEval.java

@@ -1,69 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs.tool;
-
-import javax.script.ScriptEngine;
-import javax.script.ScriptEngineManager;
-
-import com.google.gson.JsonElement;
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.base.core.project.config.Config;
-import com.x.base.core.project.gson.GsonPropertyObject;
-import com.x.base.core.project.gson.XGsonBuilder;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.processplatform.assemble.surface.Business;
-
-class ActionOrganizationEval extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionOrganizationEval.class);
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
-			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
-			Wo wo = new Wo();
-			Business business = new Business(emc);
-			ScriptEngineManager factory = new ScriptEngineManager();
-			ScriptEngine engine = factory.getEngineByName(Config.SCRIPTING_ENGINE_NAME);
-			engine.put("org", business.organization());
-			engine.put("effectivePerson", effectivePerson);
-			logger.warn("eval script: {}", wi.getScript());
-			Object o = engine.eval(wi.getScript());
-			wo.setValue(XGsonBuilder.toJson(o));
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wi extends GsonPropertyObject {
-
-		@FieldDescribe("执行脚本")
-		private String script;
-
-		public String getScript() {
-			return script;
-		}
-
-		public void setScript(String script) {
-			this.script = script;
-		}
-	}
-
-	public static class Wo extends GsonPropertyObject {
-
-		@FieldDescribe("执行结果")
-		private String value;
-
-		public String getValue() {
-			return value;
-		}
-
-		public void setValue(String value) {
-			this.value = value;
-		}
-	}
-
-}

+ 0 - 60
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/tool/ActionTaskCompletedOrphanWorkWorkCompleted.java

@@ -1,60 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs.tool;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.exception.ExceptionAccessDenied;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.processplatform.assemble.surface.Business;
-import com.x.processplatform.core.entity.content.Task;
-import com.x.processplatform.core.entity.content.Task_;
-import com.x.processplatform.core.entity.content.Work;
-
-class ActionTaskCompletedOrphanWorkWorkCompleted extends BaseAction {
-
-	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			if (effectivePerson.isNotManager()) {
-				throw new ExceptionAccessDenied(effectivePerson);
-			}
-			ActionResult<List<Wo>> result = new ActionResult<>();
-			Business business = new Business(emc);
-			List<String> workIds = emc.ids(Work.class);
-			List<Wo> wos = emc.fetch(this.listOrphanTask(business, workIds), Wo.copier);
-			result.setData(wos);
-			return result;
-		}
-	}
-
-	private List<String> listOrphanTask(Business business, List<String> workIds) throws Exception {
-		EntityManager em = business.entityManagerContainer().get(Task.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Task> root = cq.from(Task.class);
-		Predicate p = cb.not(root.get(Task_.work).in(workIds));
-		cq.select(root.get(Task_.id)).where(p).distinct(true);
-		return em.createQuery(cq).getResultList();
-	}
-
-	public static class Wo extends Task {
-
-		private static final long serialVersionUID = -5257306329734318116L;
-		static WrapCopier<Task, Wo> copier = WrapCopierFactory.wo(Task.class, Wo.class,
-				ListTools.toList(JpaObject.id_FIELDNAME, Task.title_FIELDNAME, Task.identity_FIELDNAME,
-						Task.process_FIELDNAME, Task.processName_FIELDNAME),
-				null);
-
-	}
-}

+ 0 - 59
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/tool/ActionTaskOrphanManual.java

@@ -1,59 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs.tool;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.exception.ExceptionAccessDenied;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.ListTools;
-import com.x.processplatform.assemble.surface.Business;
-import com.x.processplatform.core.entity.content.Task;
-import com.x.processplatform.core.entity.content.Task_;
-import com.x.processplatform.core.entity.element.Manual;
-
-class ActionTaskOrphanManual extends BaseAction {
-
-	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			if (effectivePerson.isNotManager()) {
-				throw new ExceptionAccessDenied(effectivePerson);
-			}
-			ActionResult<List<Wo>> result = new ActionResult<>();
-			Business business = new Business(emc);
-			List<String> manualIds = emc.ids(Manual.class);
-			List<Wo> wos = emc.fetch(this.listOrphanTask(business, manualIds), Wo.copier);
-			result.setData(wos);
-			return result;
-		}
-	}
-
-	private List<String> listOrphanTask(Business business, List<String> manualIds) throws Exception {
-		EntityManager em = business.entityManagerContainer().get(Task.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Task> root = cq.from(Task.class);
-		Predicate p = cb.not(root.get(Task_.activity).in(manualIds));
-		cq.select(root.get(Task_.id)).where(p).distinct(true);
-		return em.createQuery(cq).getResultList();
-	}
-
-	public static class Wo extends Task {
-
-		private static final long serialVersionUID = -5257306329734318116L;
-		static WrapCopier<Task, Wo> copier = WrapCopierFactory.wo(Task.class, Wo.class,
-				ListTools.toList(JpaObject.id_FIELDNAME, Task.title_FIELDNAME, Task.identity_FIELDNAME,
-						Task.process_FIELDNAME, Task.processName_FIELDNAME),
-				null);
-	}
-}

+ 0 - 7
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/tool/BaseAction.java

@@ -1,7 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs.tool;
-
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-
-abstract class BaseAction extends StandardJaxrsAction {
-
-}

+ 0 - 68
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/tool/ToolAction.java

@@ -1,68 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs.tool;
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.container.AsyncResponse;
-import javax.ws.rs.container.Suspended;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-
-import com.google.gson.JsonElement;
-import com.x.base.core.project.annotation.JaxrsDescribe;
-import com.x.base.core.project.annotation.JaxrsMethodDescribe;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.http.HttpMediaType;
-import com.x.base.core.project.jaxrs.ResponseFactory;
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-
-@Path("tool")
-@JaxrsDescribe("工具")
-public class ToolAction extends StandardJaxrsAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ToolAction.class);
-
-	@JaxrsMethodDescribe(value = "测试后台organization执行结果.", action = ActionOrganizationEval.class)
-	@POST
-	@Path("organization/eval")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void organizationEval(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			JsonElement jsonElement) {
-		ActionResult<ActionOrganizationEval.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionOrganizationEval().execute(effectivePerson, jsonElement);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, jsonElement);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "Task对象中的孤立对象,无法连接到Manual.", action = ActionTaskOrphanManual.class)
-	@GET
-	@Path("task/orphan/manual")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void taskOrphanManual(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
-		ActionResult<List<ActionTaskOrphanManual.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionTaskOrphanManual().execute(effectivePerson);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-}

+ 0 - 78
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/util/ActionReorgTaskCompletedLatest.java

@@ -1,78 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs.util;
-
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Root;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.project.exception.ExceptionAccessDenied;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WrapInteger;
-import com.x.base.core.project.organization.OrganizationDefinition;
-import com.x.processplatform.assemble.surface.Business;
-import com.x.processplatform.assemble.surface.WorkControl;
-import com.x.processplatform.core.entity.content.TaskCompleted;
-import com.x.processplatform.core.entity.content.TaskCompleted_;
-
-public class ActionReorgTaskCompletedLatest extends BaseAction {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			ActionResult<Wo> result = new ActionResult<>();
-			if (effectivePerson.isNotManager() && (!business.organization().person().hasRole(effectivePerson,
-					OrganizationDefinition.Manager, OrganizationDefinition.ProcessPlatformManager))) {
-				throw new ExceptionAccessDenied(effectivePerson);
-			}
-			Wo wo = new Wo();
-			wo.setValue(0);
-			this.listJobs(business).stream().forEach(o -> {
-				try {
-					emc.beginTransaction(TaskCompleted.class);
-					emc.listEqual(TaskCompleted.class, TaskCompleted.job_FIELDNAME, o).stream()
-							.collect(Collectors.groupingBy(TaskCompleted::getPerson)).values().stream().forEach(l -> {
-								List<TaskCompleted> os = l.stream()
-										.sorted(Comparator.comparing(TaskCompleted::getCompletedTime,
-												Comparator.nullsFirst(Date::compareTo)).reversed())
-										.collect(Collectors.toList());
-								os.get(0).setLatest(true);
-								for (int i = 1; i < os.size(); i++) {
-									os.get(i).setLatest(false);
-								}
-								wo.setValue(wo.getValue() + os.size());
-							});
-					emc.commit();
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-			});
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	private List<String> listJobs(Business business) throws Exception {
-		EntityManager em = business.entityManagerContainer().get(TaskCompleted.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskCompleted> root = cq.from(TaskCompleted.class);
-		cq.select(root.get(TaskCompleted_.job)).distinct(true);
-		return em.createQuery(cq).getResultList();
-	}
-
-	public static class WoControl extends WorkControl {
-	}
-
-	public static class Wo extends WrapInteger {
-
-	}
-
-}

+ 0 - 30
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/util/BaseAction.java

@@ -1,30 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs.util;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.processplatform.assemble.surface.wrapout.content.WrapOutAttachment;
-import com.x.processplatform.assemble.surface.wrapout.content.WrapOutTask;
-import com.x.processplatform.assemble.surface.wrapout.content.WrapOutWork;
-import com.x.processplatform.assemble.surface.wrapout.content.WrapOutWorkCompleted;
-import com.x.processplatform.core.entity.content.Attachment;
-import com.x.processplatform.core.entity.content.Task;
-import com.x.processplatform.core.entity.content.Work;
-import com.x.processplatform.core.entity.content.WorkCompleted;
-
-abstract class BaseAction extends StandardJaxrsAction {
-
-	static WrapCopier<Task, WrapOutTask> taskOutCopier = WrapCopierFactory.wo(Task.class, WrapOutTask.class, null,
-			JpaObject.FieldsInvisible);
-
-	static WrapCopier<Work, WrapOutWork> workOutCopier = WrapCopierFactory.wo(Work.class, WrapOutWork.class, null,
-			JpaObject.FieldsInvisible);
-
-	static WrapCopier<WorkCompleted, WrapOutWorkCompleted> workCompletedOutCopier = WrapCopierFactory
-			.wo(WorkCompleted.class, WrapOutWorkCompleted.class, null, JpaObject.FieldsInvisible);
-
-	static WrapCopier<Attachment, WrapOutAttachment> attachmentOutCopier = WrapCopierFactory.wo(Attachment.class,
-			WrapOutAttachment.class, null, JpaObject.FieldsInvisible);
-
-}

+ 0 - 46
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/util/UtilAction.java

@@ -1,46 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs.util;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.container.AsyncResponse;
-import javax.ws.rs.container.Suspended;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-
-import com.x.base.core.project.annotation.JaxrsDescribe;
-import com.x.base.core.project.annotation.JaxrsMethodDescribe;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.http.HttpMediaType;
-import com.x.base.core.project.jaxrs.ResponseFactory;
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-
-@Path("util")
-@JaxrsDescribe("工具")
-public class UtilAction extends StandardJaxrsAction {
-
-	private static Logger logger = LoggerFactory.getLogger(UtilAction.class);
-
-	@JaxrsMethodDescribe(value = "整理已办的latest属性.", action = ActionReorgTaskCompletedLatest.class)
-	@GET
-	@Path("reorg/taskcompleted/latest")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void reorgTaskCompletedLatest(@Suspended final AsyncResponse asyncResponse,
-			@Context HttpServletRequest request) {
-		ActionResult<ActionReorgTaskCompletedLatest.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionReorgTaskCompletedLatest().execute(effectivePerson);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-}

+ 22 - 19
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionCheckDraft.java

@@ -21,32 +21,35 @@ import com.x.processplatform.core.entity.element.Process;
 class ActionCheckDraft extends BaseAction {
 
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wo = new Wo();
+		Work work = null;
+		Process process = null;
+		WoControl control = null;
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
-			Wo wo = new Wo();
 			Business business = new Business(emc);
-			Work work = emc.find(id, Work.class);
+			work = emc.find(id, Work.class);
 			if (null != work) {
-				Process process = business.process().pick(work.getProcess());
-				if (null != process) {
-					if (BooleanUtils.isTrue(process.getCheckDraft())) {
-						WoControl control = business.getControl(effectivePerson, work, WoControl.class);
-						if (BooleanUtils.isTrue(control.getAllowDelete())) {
-							if (BooleanUtils.isFalse(work.getDataChanged())
-									&& Objects.equals(ActivityType.manual, work.getActivityType())) {
-								wo = ThisApplication.context().applications()
-										.deleteQuery(x_processplatform_service_processing.class,
-												Applications.joinQueryUri("work", work.getId()))
-										.getData(Wo.class);
-								wo.setId(work.getId());
-							}
-						}
+				process = business.process().pick(work.getProcess());
+				control = business.getControl(effectivePerson, work, WoControl.class);
+			}
+		}
+		if ((null != process) && (null != control)) {
+			if (BooleanUtils.isTrue(process.getCheckDraft())) {
+				if (BooleanUtils.isTrue(control.getAllowDelete())) {
+					if (BooleanUtils.isFalse(work.getDataChanged())
+							&& Objects.equals(ActivityType.manual, work.getActivityType())) {
+						wo = ThisApplication.context().applications()
+								.deleteQuery(x_processplatform_service_processing.class,
+										Applications.joinQueryUri("work", work.getId()))
+								.getData(Wo.class);
+						wo.setId(work.getId());
 					}
 				}
 			}
-			result.setData(wo);
-			return result;
 		}
+		result.setData(wo);
+		return result;
 	}
 
 	public static class Wo extends WoId {

+ 44 - 46
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionCloseCheck.java

@@ -15,43 +15,41 @@ import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WrapBoolean;
-import com.x.base.core.project.tools.ListTools;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.assemble.surface.ThisApplication;
 import com.x.processplatform.core.entity.content.Task;
 import com.x.processplatform.core.entity.content.Work;
 import com.x.processplatform.core.entity.element.ActivityType;
-import com.x.processplatform.core.entity.element.Manual;
-import com.x.processplatform.core.entity.element.ManualMode;
 import com.x.processplatform.core.entity.element.Process;
 
 class ActionCloseCheck extends BaseAction {
 
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wo = new Wo();
+
+		Work work = null;
+		Process process = null;
+
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
 			Business business = new Business(emc);
-			Work work = emc.find(id, Work.class);
-			Wo wo = new Wo();
-			wo.setDraft(this.draft(business, effectivePerson, work));
-			if (BooleanUtils.isFalse(wo.getDraft().getValue())) {
-				wo.setGrabRelease(this.grabRelease(business, effectivePerson, work));
-			}
-			result.setData(wo);
-			return result;
+			work = emc.find(id, Work.class);
+			process = business.process().pick(work.getProcess());
 		}
+		wo.setDraft(this.draft(effectivePerson, work, process));
+		result.setData(wo);
+		return result;
 	}
 
-	private WoDraft draft(Business business, EffectivePerson effectivePerson, Work work) throws Exception {
+	private WoDraft draft(EffectivePerson effectivePerson, Work work, Process process) throws Exception {
 		WoDraft wo = new WoDraft();
 		wo.setValue(false);
 		if ((null != work) && (BooleanUtils.isFalse(work.getDataChanged()))
 				&& (Objects.equals(ActivityType.manual, work.getActivityType()))) {
-			Process process = business.process().pick(work.getProcess());
 			if ((null != process) && (BooleanUtils.isTrue(process.getCheckDraft()))) {
 				if (effectivePerson.isPerson(work.getCreatorPerson())) {
 					ThisApplication.context().applications().deleteQuery(x_processplatform_service_processing.class,
-							Applications.joinQueryUri("work", work.getId())).getData(Wo.class);
+							Applications.joinQueryUri("work", work.getId()), work.getJob()).getData(Wo.class);
 					wo.setValue(true);
 				}
 			}
@@ -59,35 +57,35 @@ class ActionCloseCheck extends BaseAction {
 		return wo;
 	}
 
-	private WoGrabRelease grabRelease(Business business, EffectivePerson effectivePerson, Work work) throws Exception {
-		WoGrabRelease wo = new WoGrabRelease();
-		if ((null != work) && (Objects.equals(work.getActivityType(), ActivityType.manual))) {
-			Manual manual = business.manual().pick(work.getActivity());
-			if ((null != manual) && Objects.equals(ManualMode.grab, manual.getManualMode())) {
-				if (ListTools.isEmpty(work.getManualTaskIdentityList())
-						|| (work.getManualTaskIdentityList().size() == 1)) {
-					business.entityManagerContainer().beginTransaction(Work.class);
-					work.getManualTaskIdentityList().clear();
-					business.entityManagerContainer().commit();
-					ThisApplication.context().applications().putQuery(effectivePerson.getDebugger(),
-							x_processplatform_service_processing.class,
-							Applications.joinQueryUri("work", work.getId(), "processing"), null);
-					List<Task> tasks = business.entityManagerContainer().fetchEqual(Task.class,
-							ListTools.toList(Task.identity_FIELDNAME), Task.work_FIELDNAME, work.getId());
-					wo.setRelease(true);
-					wo.setTaskList(tasks);
-				}
-			}
-		}
-		return wo;
-	}
+//	private WoGrabRelease grabRelease(Business business, EffectivePerson effectivePerson, Work work) throws Exception {
+//		WoGrabRelease wo = new WoGrabRelease();
+//		if ((null != work) && (Objects.equals(work.getActivityType(), ActivityType.manual))) {
+//			Manual manual = business.manual().pick(work.getActivity());
+//			if ((null != manual) && Objects.equals(ManualMode.grab, manual.getManualMode())) {
+//				if (ListTools.isEmpty(work.getManualTaskIdentityList())
+//						|| (work.getManualTaskIdentityList().size() == 1)) {
+//					business.entityManagerContainer().beginTransaction(Work.class);
+//					work.getManualTaskIdentityList().clear();
+//					business.entityManagerContainer().commit();
+//					ThisApplication.context().applications().putQuery(effectivePerson.getDebugger(),
+//							x_processplatform_service_processing.class,
+//							Applications.joinQueryUri("work", work.getId(), "processing"), null);
+//					List<Task> tasks = business.entityManagerContainer().fetchEqual(Task.class,
+//							ListTools.toList(Task.identity_FIELDNAME), Task.work_FIELDNAME, work.getId());
+//					wo.setRelease(true);
+//					wo.setTaskList(tasks);
+//				}
+//			}
+//		}
+//		return wo;
+//	}
 
 	public static class Wo extends GsonPropertyObject {
 
 		@FieldDescribe("检查删除草稿结果")
 		private WoDraft draft;
-		@FieldDescribe("检查抢办释放结果")
-		private WoGrabRelease grabRelease;
+//		@FieldDescribe("检查抢办释放结果")
+//		private WoGrabRelease grabRelease;
 
 		public WoDraft getDraft() {
 			return draft;
@@ -97,13 +95,13 @@ class ActionCloseCheck extends BaseAction {
 			this.draft = draft;
 		}
 
-		public WoGrabRelease getGrabRelease() {
-			return grabRelease;
-		}
-
-		public void setGrabRelease(WoGrabRelease grabRelease) {
-			this.grabRelease = grabRelease;
-		}
+//		public WoGrabRelease getGrabRelease() {
+//			return grabRelease;
+//		}
+//
+//		public void setGrabRelease(WoGrabRelease grabRelease) {
+//			this.grabRelease = grabRelease;
+//		}
 
 	}
 

+ 9 - 8
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionCreate.java

@@ -17,6 +17,7 @@ import com.google.gson.JsonElement;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.Applications;
 import com.x.base.core.project.x_processplatform_service_processing;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.bean.WrapCopier;
@@ -55,13 +56,14 @@ class ActionCreate extends BaseAction {
 		/* 已存在草稿id */
 		String lastestWorkId = "";
 		String identity = null;
+		Process process = null;
 		List<Wo> wos = new ArrayList<>();
 		ActionResult<List<Wo>> result = new ActionResult<>();
 		Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			Business business = new Business(emc);
 			identity = this.decideCreatorIdentity(business, effectivePerson, wi);
-			Process process = business.process().pick(processFlag);
+			process = business.process().pick(processFlag);
 			if (null == process) {
 				throw new ExceptionProcessNotExist(processFlag);
 			}
@@ -77,13 +79,12 @@ class ActionCreate extends BaseAction {
 				lastestWorkId = this.latest(business, process, identity);
 				workId = lastestWorkId;
 			}
-			if (StringUtils.isEmpty(workId)) {
-				WoId woId = ThisApplication.context().applications()
-						.postQuery(x_processplatform_service_processing.class,
-								"work/process/" + URLEncoder.encode(process.getId(), DefaultCharset.name), wi.getData())
-						.getData(WoId.class);
-				workId = woId.getId();
-			}
+		}
+		if (StringUtils.isEmpty(workId)) {
+			WoId woId = ThisApplication.context().applications().postQuery(x_processplatform_service_processing.class,
+					Applications.joinQueryUri("work", "process", process.getId()), wi.getData(), process.getId())
+					.getData(WoId.class);
+			workId = woId.getId();
 		}
 		/* 设置Work信息 */
 		if (BooleanUtils.isFalse(wi.getLatest()) || (StringUtils.isEmpty(lastestWorkId))) {

+ 7 - 6
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionDelete.java

@@ -19,10 +19,11 @@ import com.x.processplatform.core.entity.content.Work;
 class ActionDelete extends BaseAction {
 
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Work work = null;
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
 			Business business = new Business(emc);
-			Work work = emc.find(id, Work.class);
+			work = emc.find(id, Work.class);
 			if (null == work) {
 				throw new ExceptionWorkNotExist(id);
 			}
@@ -31,11 +32,11 @@ class ActionDelete extends BaseAction {
 				throw new ExceptionWorkAccessDenied(effectivePerson.getDistinguishedName(), work.getTitle(),
 						work.getId());
 			}
-			Wo wo = ThisApplication.context().applications().deleteQuery(x_processplatform_service_processing.class,
-					"work/" + URLEncoder.encode(work.getId(), DefaultCharset.name)).getData(Wo.class);
-			result.setData(wo);
-			return result;
 		}
+		Wo wo = ThisApplication.context().applications().deleteQuery(x_processplatform_service_processing.class,
+				"work/" + URLEncoder.encode(work.getId(), DefaultCharset.name)).getData(Wo.class);
+		result.setData(wo);
+		return result;
 	}
 
 	public static class Wo extends WoId {

+ 11 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListWithWorkOrWorkCompleted.java

@@ -8,6 +8,7 @@ import java.util.Objects;
 import java.util.concurrent.CompletableFuture;
 import java.util.stream.Collectors;
 
+import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.StringUtils;
 
 import com.x.base.core.container.EntityManagerContainer;
@@ -104,13 +105,19 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction {
 									n.getWorkLog().getFromActivityToken())).forEach(t -> {
 										wo.getNextManualTaskIdentityList().add(t.getIdentity());
 									});
-							taskCompleteds.stream().filter(t -> StringUtils.equals(t.getActivityToken(),
-									n.getWorkLog().getFromActivityToken())).forEach(t -> {
+							taskCompleteds.stream()
+									.filter(t -> BooleanUtils.isTrue(t.getJoinInquire()) && StringUtils
+											.equals(t.getActivityToken(), n.getWorkLog().getFromActivityToken()))
+									.forEach(t -> {
 										wo.getNextManualTaskCompletedIdentityList().add(t.getIdentity());
 									});
 						}
 					}
 				}
+				/* 下一环节处理人可能是重复处理导致重复的,去重 */
+				wo.setNextManualTaskIdentityList(ListTools.trim(wo.getNextManualTaskIdentityList(), true, true));
+				wo.setNextManualTaskCompletedIdentityList(
+						ListTools.trim(wo.getNextManualTaskCompletedIdentityList(), true, true));
 				wos.add(wo);
 			}
 			ListTools.groupStick(wos, tasks, WorkLog.fromActivityToken_FIELDNAME, Task.activityToken_FIELDNAME,
@@ -294,7 +301,8 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction {
 						TaskCompleted.opinionLob_FIELDNAME, TaskCompleted.startTime_FIELDNAME,
 						TaskCompleted.activityName_FIELDNAME, TaskCompleted.completedTime_FIELDNAME,
 						TaskCompleted.activityToken_FIELDNAME, TaskCompleted.mediaOpinion_FIELDNAME,
-						TaskCompleted.processingType_FIELDNAME, TaskCompleted.empowerToIdentity_FIELDNAME),
+						TaskCompleted.processingType_FIELDNAME, TaskCompleted.empowerToIdentity_FIELDNAME,
+						TaskCompleted.joinInquire_FIELDNAME),
 				null);
 	}
 

+ 0 - 259
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListWithWorkOrWorkCompleted2.java

@@ -1,259 +0,0 @@
-package com.x.processplatform.assemble.surface.jaxrs.worklog;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.CompletableFuture;
-import java.util.stream.Collectors;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.exception.ExceptionAccessDenied;
-import com.x.base.core.project.exception.ExceptionEntityNotExist;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.tools.ListTools;
-import com.x.processplatform.assemble.surface.Business;
-import com.x.processplatform.core.entity.content.Read;
-import com.x.processplatform.core.entity.content.ReadCompleted;
-import com.x.processplatform.core.entity.content.Task;
-import com.x.processplatform.core.entity.content.TaskCompleted;
-import com.x.processplatform.core.entity.content.WorkLog;
-
-class ActionListWithWorkOrWorkCompleted2 extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionListWithWorkOrWorkCompleted2.class);
-
-	private final static String taskList_FIELDNAME = "taskList";
-	private final static String taskCompletedList_FIELDNAME = "taskCompletedList";
-	private final static String readList_FIELDNAME = "readList";
-	private final static String readCompletedList_FIELDNAME = "readCompletedList";
-
-	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String workOrWorkCompleted) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<List<Wo>> result = new ActionResult<>();
-
-			Business business = new Business(emc);
-
-			if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted,
-					new ExceptionEntityNotExist(workOrWorkCompleted))) {
-				throw new ExceptionAccessDenied(effectivePerson);
-			}
-
-			final String job = business.job().findWithWorkOrWorkCompleted(workOrWorkCompleted);
-
-			CompletableFuture<List<WoTask>> future_tasks = CompletableFuture.supplyAsync(() -> {
-				return this.tasks(business, job);
-			});
-			CompletableFuture<List<WoTaskCompleted>> future_taskCompleteds = CompletableFuture.supplyAsync(() -> {
-				return this.taskCompleteds(business, job);
-			});
-			CompletableFuture<List<WoRead>> future_reads = CompletableFuture.supplyAsync(() -> {
-				return this.reads(business, job);
-			});
-			CompletableFuture<List<WoReadCompleted>> future_readCompleteds = CompletableFuture.supplyAsync(() -> {
-				return this.readCompleteds(business, job);
-			});
-			CompletableFuture<List<Wo>> future_workLogs = CompletableFuture.supplyAsync(() -> {
-				return this.workLogs(business, job);
-			});
-			List<WoTask> tasks = future_tasks.get();
-			List<WoTaskCompleted> taskCompleteds = future_taskCompleteds.get();
-			List<WoRead> reads = future_reads.get();
-			List<WoReadCompleted> readCompleteds = future_readCompleteds.get();
-			List<Wo> wos = future_workLogs.get();
-			ListTools.groupStick(wos, tasks, WorkLog.fromActivityToken_FIELDNAME, Task.activityToken_FIELDNAME,
-					taskList_FIELDNAME);
-			ListTools.groupStick(wos, taskCompleteds, WorkLog.fromActivityToken_FIELDNAME,
-					TaskCompleted.activityToken_FIELDNAME, taskCompletedList_FIELDNAME);
-			ListTools.groupStick(wos, reads, WorkLog.fromActivityToken_FIELDNAME, Read.activityToken_FIELDNAME,
-					readList_FIELDNAME);
-			ListTools.groupStick(wos, readCompleteds, WorkLog.fromActivityToken_FIELDNAME,
-					ReadCompleted.activityToken_FIELDNAME, readCompletedList_FIELDNAME);
-			result.setData(wos);
-			return result;
-		}
-	}
-
-	private List<WoTask> tasks(Business business, String job) {
-		List<WoTask> os = new ArrayList<>();
-		try {
-			os = business.entityManagerContainer().fetchEqual(Task.class, WoTask.copier, WoTask.job_FIELDNAME, job)
-					.stream().sorted(Comparator.comparing(Task::getStartTime, Comparator.nullsLast(Date::compareTo)))
-					.collect(Collectors.toList());
-		} catch (Exception e) {
-			logger.error(e);
-		}
-		return os;
-	}
-
-	private List<WoTaskCompleted> taskCompleteds(Business business, String job) {
-		List<WoTaskCompleted> os = new ArrayList<>();
-		try {
-			os = business.entityManagerContainer()
-					.fetchEqual(TaskCompleted.class, WoTaskCompleted.copier, TaskCompleted.job_FIELDNAME, job).stream()
-					.sorted(Comparator.comparing(TaskCompleted::getStartTime, Comparator.nullsLast(Date::compareTo)))
-					.collect(Collectors.toList());
-		} catch (Exception e) {
-			logger.error(e);
-		}
-		return os;
-	}
-
-	private List<WoRead> reads(Business business, String job) {
-		List<WoRead> os = new ArrayList<>();
-		try {
-			os = business.entityManagerContainer().fetchEqual(Read.class, WoRead.copier, Read.job_FIELDNAME, job)
-					.stream().sorted(Comparator.comparing(Read::getStartTime, Comparator.nullsLast(Date::compareTo)))
-					.collect(Collectors.toList());
-		} catch (Exception e) {
-			logger.error(e);
-		}
-		return os;
-	}
-
-	private List<WoReadCompleted> readCompleteds(Business business, String job) {
-		List<WoReadCompleted> os = new ArrayList<>();
-		try {
-			os = business.entityManagerContainer()
-					.fetchEqual(ReadCompleted.class, WoReadCompleted.copier, ReadCompleted.job_FIELDNAME, job).stream()
-					.sorted(Comparator.comparing(ReadCompleted::getStartTime, Comparator.nullsLast(Date::compareTo)))
-					.collect(Collectors.toList());
-		} catch (Exception e) {
-			logger.error(e);
-		}
-		return os;
-	}
-
-	private List<Wo> workLogs(Business business, String job) {
-		List<Wo> os = new ArrayList<>();
-		try {
-			os = business.entityManagerContainer().fetchEqual(WorkLog.class, Wo.copier, WorkLog.job_FIELDNAME, job);
-			return os.stream()
-					.sorted(Comparator.comparing(Wo::getFromTime, Comparator.nullsLast(Date::compareTo))
-							.thenComparing(Wo::getArrivedTime, Comparator.nullsLast(Date::compareTo)))
-					.collect(Collectors.toList());
-		} catch (Exception e) {
-			logger.error(e);
-		}
-		return os;
-	}
-
-	public static class Wo extends WorkLog {
-
-		private static final long serialVersionUID = -7666329770246726197L;
-
-		static WrapCopier<WorkLog, Wo> copier = WrapCopierFactory.wo(WorkLog.class, Wo.class,
-				ListTools.toList(WorkLog.id_FIELDNAME, WorkLog.fromActivity_FIELDNAME,
-						WorkLog.fromActivityType_FIELDNAME, WorkLog.fromActivityName_FIELDNAME,
-						WorkLog.fromActivityAlias_FIELDNAME, WorkLog.fromActivityToken_FIELDNAME,
-						WorkLog.fromTime_FIELDNAME, WorkLog.arrivedActivity_FIELDNAME,
-						WorkLog.arrivedActivityType_FIELDNAME, WorkLog.arrivedActivityName_FIELDNAME,
-						WorkLog.arrivedActivityAlias_FIELDNAME, WorkLog.arrivedActivityToken_FIELDNAME,
-						WorkLog.arrivedTime_FIELDNAME, WorkLog.routeName_FIELDNAME, WorkLog.connected_FIELDNAME,
-						WorkLog.splitting_FIELDNAME, WorkLog.fromGroup_FIELDNAME, WorkLog.arrivedGroup_FIELDNAME,
-						WorkLog.fromOpinionGroup_FIELDNAME, WorkLog.arrivedOpinionGroup_FIELDNAME),
-				JpaObject.FieldsInvisible);
-
-		private List<WoTask> taskList = new ArrayList<>();
-
-		private List<WoTaskCompleted> taskCompletedList = new ArrayList<>();
-
-		private List<WoRead> readList = new ArrayList<>();
-
-		private List<WoReadCompleted> readCompletedList = new ArrayList<>();
-
-		public List<WoTask> getTaskList() {
-			return taskList;
-		}
-
-		public void setTaskList(List<WoTask> taskList) {
-			this.taskList = taskList;
-		}
-
-		public List<WoTaskCompleted> getTaskCompletedList() {
-			return taskCompletedList;
-		}
-
-		public void setTaskCompletedList(List<WoTaskCompleted> taskCompletedList) {
-			this.taskCompletedList = taskCompletedList;
-		}
-
-		public List<WoRead> getReadList() {
-			return readList;
-		}
-
-		public void setReadList(List<WoRead> readList) {
-			this.readList = readList;
-		}
-
-		public List<WoReadCompleted> getReadCompletedList() {
-			return readCompletedList;
-		}
-
-		public void setReadCompletedList(List<WoReadCompleted> readCompletedList) {
-			this.readCompletedList = readCompletedList;
-		}
-
-	}
-
-	public static class WoTask extends Task {
-
-		private static final long serialVersionUID = 293599148568443301L;
-
-		static WrapCopier<Task, WoTask> copier = WrapCopierFactory.wo(Task.class, WoTask.class,
-				ListTools.toList(Task.id_FIELDNAME, Task.person_FIELDNAME, Task.identity_FIELDNAME, Task.unit_FIELDNAME,
-						Task.routeName_FIELDNAME, Task.opinion_FIELDNAME, Task.opinionLob_FIELDNAME,
-						Task.startTime_FIELDNAME, Task.activityName_FIELDNAME, Task.activityToken_FIELDNAME,
-						Task.empowerFromIdentity_FIELDNAME),
-				null);
-	}
-
-	public static class WoTaskCompleted extends TaskCompleted {
-
-		private static final long serialVersionUID = -4432508672641778924L;
-
-		static WrapCopier<TaskCompleted, WoTaskCompleted> copier = WrapCopierFactory.wo(TaskCompleted.class,
-				WoTaskCompleted.class,
-				ListTools.toList(TaskCompleted.id_FIELDNAME, TaskCompleted.person_FIELDNAME,
-						TaskCompleted.identity_FIELDNAME, TaskCompleted.unit_FIELDNAME,
-						TaskCompleted.routeName_FIELDNAME, TaskCompleted.opinion_FIELDNAME,
-						TaskCompleted.opinionLob_FIELDNAME, TaskCompleted.startTime_FIELDNAME,
-						TaskCompleted.activityName_FIELDNAME, TaskCompleted.completedTime_FIELDNAME,
-						TaskCompleted.activityToken_FIELDNAME, TaskCompleted.mediaOpinion_FIELDNAME,
-						TaskCompleted.processingType_FIELDNAME, TaskCompleted.empowerToIdentity_FIELDNAME),
-				null);
-	}
-
-	public static class WoRead extends Read {
-
-		private static final long serialVersionUID = -7243683008987722267L;
-
-		static WrapCopier<Read, WoRead> copier = WrapCopierFactory.wo(Read.class, WoRead.class,
-				ListTools.toList(Read.id_FIELDNAME, Read.person_FIELDNAME, Read.identity_FIELDNAME, Read.unit_FIELDNAME,
-						Read.opinion_FIELDNAME, Read.opinionLob_FIELDNAME, Read.startTime_FIELDNAME,
-						Read.activityName_FIELDNAME, Read.activityToken_FIELDNAME),
-				null);
-	}
-
-	public static class WoReadCompleted extends ReadCompleted {
-
-		private static final long serialVersionUID = -7086077858353505033L;
-
-		static WrapCopier<ReadCompleted, WoReadCompleted> copier = WrapCopierFactory.wo(ReadCompleted.class,
-				WoReadCompleted.class,
-				ListTools.toList(ReadCompleted.id_FIELDNAME, ReadCompleted.person_FIELDNAME,
-						ReadCompleted.identity_FIELDNAME, ReadCompleted.unit_FIELDNAME, ReadCompleted.opinion_FIELDNAME,
-						ReadCompleted.opinionLob_FIELDNAME, ReadCompleted.startTime_FIELDNAME,
-						ReadCompleted.activityName_FIELDNAME, ReadCompleted.completedTime_FIELDNAME,
-						ReadCompleted.activityToken_FIELDNAME),
-				null);
-	}
-
-}

+ 0 - 35
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutAttachment.java

@@ -1,35 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.content;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.content.Attachment;
-
-public class WrapOutAttachment extends Attachment {
-
-	private static final long serialVersionUID = 1954637399762611493L;
-
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-	private Long rank;
-
-	private Long referencedCount;
-
-	public Long getRank() {
-		return rank;
-	}
-
-	public void setRank(Long rank) {
-		this.rank = rank;
-	}
-
-	public Long getReferencedCount() {
-		return referencedCount;
-	}
-
-	public void setReferencedCount(Long referencedCount) {
-		this.referencedCount = referencedCount;
-	}
-
-}

+ 0 - 36
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutRead.java

@@ -1,36 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.content;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.assemble.surface.WorkControl;
-import com.x.processplatform.core.entity.content.Read;
-
-public class WrapOutRead extends Read {
-
-	private static final long serialVersionUID = -8067704098385000667L;
-
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-	private Long rank;
-
-	private WorkControl control;
-
-	public Long getRank() {
-		return rank;
-	}
-
-	public void setRank(Long rank) {
-		this.rank = rank;
-	}
-
-	public WorkControl getControl() {
-		return control;
-	}
-
-	public void setControl(WorkControl control) {
-		this.control = control;
-	}
-
-}

+ 0 - 36
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutReadCompleted.java

@@ -1,36 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.content;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.assemble.surface.WorkControl;
-import com.x.processplatform.core.entity.content.ReadCompleted;
-
-public class WrapOutReadCompleted extends ReadCompleted {
-
-	private static final long serialVersionUID = -1305610937955675829L;
-
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-	private Long rank;
-
-	private WorkControl control;
-
-	public Long getRank() {
-		return rank;
-	}
-
-	public void setRank(Long rank) {
-		this.rank = rank;
-	}
-
-	public WorkControl getControl() {
-		return control;
-	}
-
-	public void setControl(WorkControl control) {
-		this.control = control;
-	}
-
-}

+ 0 - 36
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutReview.java

@@ -1,36 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.content;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.assemble.surface.WorkControl;
-import com.x.processplatform.core.entity.content.Review;
-
-public class WrapOutReview extends Review {
-
-	private static final long serialVersionUID = 2697843292828496041L;
-
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-	private Long rank;
-
-	private WorkControl control;
-
-	public Long getRank() {
-		return rank;
-	}
-
-	public void setRank(Long rank) {
-		this.rank = rank;
-	}
-
-	public WorkControl getControl() {
-		return control;
-	}
-
-	public void setControl(WorkControl control) {
-		this.control = control;
-	}
-
-}

+ 0 - 25
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutSerialNumber.java

@@ -1,25 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.content;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.content.SerialNumber;
-
-public class WrapOutSerialNumber extends SerialNumber {
-
-	private static final long serialVersionUID = 6915255077548190559L;
-
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-	private String processName;
-
-	public String getProcessName() {
-		return processName;
-	}
-
-	public void setProcessName(String processName) {
-		this.processName = processName;
-	}
-
-}

+ 0 - 36
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutTask.java

@@ -1,36 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.content;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.assemble.surface.WorkControl;
-import com.x.processplatform.core.entity.content.Task;
-
-public class WrapOutTask extends Task {
-
-	private static final long serialVersionUID = 2279846765261247910L;
-
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-	private Long rank;
-
-	private WorkControl control;
-
-	public Long getRank() {
-		return rank;
-	}
-
-	public void setRank(Long rank) {
-		this.rank = rank;
-	}
-
-	public WorkControl getControl() {
-		return control;
-	}
-
-	public void setControl(WorkControl control) {
-		this.control = control;
-	}
-
-}

+ 0 - 34
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutTaskCompleted.java

@@ -1,34 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.content;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.assemble.surface.WorkControl;
-import com.x.processplatform.core.entity.content.TaskCompleted;
-
-public class WrapOutTaskCompleted extends TaskCompleted {
-
-	private static final long serialVersionUID = -7253999118308715077L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-	private Long rank;
-
-	private WorkControl control;
-
-	public Long getRank() {
-		return rank;
-	}
-
-	public void setRank(Long rank) {
-		this.rank = rank;
-	}
-
-	public WorkControl getControl() {
-		return control;
-	}
-
-	public void setControl(WorkControl control) {
-		this.control = control;
-	}
-
-}

+ 0 - 36
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutWork.java

@@ -1,36 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.content;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.assemble.surface.WorkControl;
-import com.x.processplatform.core.entity.content.Work;
-
-public class WrapOutWork extends Work {
-
-	private static final long serialVersionUID = -5668264661685818057L;
-
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-	private Long rank;
-
-	private WorkControl control;
-
-	public Long getRank() {
-		return rank;
-	}
-
-	public void setRank(Long rank) {
-		this.rank = rank;
-	}
-
-	public WorkControl getControl() {
-		return control;
-	}
-
-	public void setControl(WorkControl control) {
-		this.control = control;
-	}
-
-}

+ 0 - 43
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/content/WrapOutWorkCompleted.java

@@ -1,43 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.content;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.assemble.surface.WorkControl;
-import com.x.processplatform.core.entity.content.WorkCompleted;
-
-public class WrapOutWorkCompleted extends WorkCompleted {
-
-	private static final long serialVersionUID = 2395048971976018595L;
-
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-	public static List<String> Excludes_FormData = new ArrayList<>(JpaObject.FieldsInvisible);
-
-	static {
-		Excludes_FormData.add("formData");
-		Excludes_FormData.add("formMobileData");
-	}
-
-	private Long rank;
-
-	private WorkControl control;
-
-	public Long getRank() {
-		return rank;
-	}
-
-	public void setRank(Long rank) {
-		this.rank = rank;
-	}
-
-	public WorkControl getControl() {
-		return control;
-	}
-
-	public void setControl(WorkControl control) {
-		this.control = control;
-	}
-
-}

+ 0 - 88
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutActivity.java

@@ -1,88 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import com.x.base.core.project.gson.GsonPropertyObject;
-import com.x.processplatform.core.entity.element.ActivityType;
-
-public class WrapOutActivity extends GsonPropertyObject {
-
-	private String id;
-
-	private String name;
-
-	private String description;
-
-	private String alias;
-
-	private String position;
-
-	private ActivityType activityType;
-
-	private String resetRange;
-
-	private Integer resetCount;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getDescription() {
-		return description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-	public String getAlias() {
-		return alias;
-	}
-
-	public void setAlias(String alias) {
-		this.alias = alias;
-	}
-
-	public String getPosition() {
-		return position;
-	}
-
-	public void setPosition(String position) {
-		this.position = position;
-	}
-
-	public ActivityType getActivityType() {
-		return activityType;
-	}
-
-	public void setActivityType(ActivityType activityType) {
-		this.activityType = activityType;
-	}
-
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public Integer getResetCount() {
-		return resetCount;
-	}
-
-	public void setResetCount(Integer resetCount) {
-		this.resetCount = resetCount;
-	}
-
-	public String getResetRange() {
-		return resetRange;
-	}
-
-	public void setResetRange(String resetRange) {
-		this.resetRange = resetRange;
-	}
-
-}

+ 0 - 15
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutAgent.java

@@ -1,15 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Agent;
-
-public class WrapOutAgent extends Agent {
-
-
-	private static final long serialVersionUID = 797206511536423164L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 35
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutApplication.java

@@ -1,35 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Application;
-
-public class WrapOutApplication extends Application {
-
-	private static final long serialVersionUID = -4862564047240738097L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-	private List<WrapOutProcess> processList;
-
-	/* 当前用户是否可以编辑此应用的列表界面 */
-	private Boolean allowControl;
-
-	public Boolean getAllowControl() {
-		return allowControl;
-	}
-
-	public void setAllowControl(Boolean allowControl) {
-		this.allowControl = allowControl;
-	}
-
-	public List<WrapOutProcess> getProcessList() {
-		return processList;
-	}
-
-	public void setProcessList(List<WrapOutProcess> processList) {
-		this.processList = processList;
-	}
-
-}

+ 0 - 13
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutBegin.java

@@ -1,13 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Begin;
-
-public class WrapOutBegin extends Begin {
-
-	private static final long serialVersionUID = 2446418422019675597L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-}

+ 0 - 13
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutCancel.java

@@ -1,13 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Cancel;
-
-public class WrapOutCancel extends Cancel {
-
-	private static final long serialVersionUID = 813182162888838666L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-}

+ 0 - 13
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutChoice.java

@@ -1,13 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Choice;
-
-public class WrapOutChoice extends Choice {
-
-	private static final long serialVersionUID = -1907168588535775375L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-}

+ 0 - 14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutDelay.java

@@ -1,14 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Delay;
-
-public class WrapOutDelay extends Delay {
-
-	private static final long serialVersionUID = 2184569713152663503L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 15
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutEmbed.java

@@ -1,15 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Embed;
-
-public class WrapOutEmbed extends Embed {
-
-	private static final long serialVersionUID = 298602065524433660L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-
-}

+ 0 - 12
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutEnd.java

@@ -1,12 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.End;
-
-public class WrapOutEnd extends End {
-	private static final long serialVersionUID = 7675857316009459984L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-}

+ 0 - 14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutForm.java

@@ -1,14 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Form;
-
-public class WrapOutForm extends Form {
-
-	private static final long serialVersionUID = 8714459358196550018L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutInvoke.java

@@ -1,14 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Invoke;
-
-public class WrapOutInvoke extends Invoke {
-
-	private static final long serialVersionUID = -6918382714118518231L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 15
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutManual.java

@@ -1,15 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Manual;
-
-public class WrapOutManual extends Manual {
-
-
-	private static final long serialVersionUID = -5145199730047767525L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutMerge.java

@@ -1,14 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Merge;
-
-public class WrapOutMerge extends Merge {
-
-	private static final long serialVersionUID = 5007599746571282452L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutMessage.java

@@ -1,14 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Message;
-
-public class WrapOutMessage extends Message {
-
-	private static final long serialVersionUID = -2833187584269867692L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutParallel.java

@@ -1,14 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Parallel;
-
-public class WrapOutParallel extends Parallel {
-
-	private static final long serialVersionUID = 3452734679516289443L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 151
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutProcess.java

@@ -1,151 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Process;
-
-public class WrapOutProcess extends Process {
-
-	private static final long serialVersionUID = 1521228691441978462L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-	private List<WrapOutAgent> agentList;
-	private WrapOutBegin begin;
-	private List<WrapOutCancel> cancelList;
-	private List<WrapOutChoice> choiceList;
-	private List<WrapOutDelay> delayList;
-	private List<WrapOutEmbed> embedList;
-	private List<WrapOutEnd> endList;
-	private List<WrapOutInvoke> invokeList;
-	private List<WrapOutManual> manualList;
-	private List<WrapOutMerge> mergeList;
-	private List<WrapOutMessage> messageList;
-	private List<WrapOutRoute> routeList;
-	private List<WrapOutParallel> parallelList;
-	private List<WrapOutService> serviceList;
-	private List<WrapOutSplit> splitList;
-
-	public List<WrapOutAgent> getAgentList() {
-		return agentList;
-	}
-
-	public void setAgentList(List<WrapOutAgent> agentList) {
-		this.agentList = agentList;
-	}
-
-	public WrapOutBegin getBegin() {
-		return begin;
-	}
-
-	public void setBegin(WrapOutBegin begin) {
-		this.begin = begin;
-	}
-
-	public List<WrapOutCancel> getCancelList() {
-		return cancelList;
-	}
-
-	public void setCancelList(List<WrapOutCancel> cancelList) {
-		this.cancelList = cancelList;
-	}
-
-	public List<WrapOutChoice> getChoiceList() {
-		return choiceList;
-	}
-
-	public void setChoiceList(List<WrapOutChoice> choiceList) {
-		this.choiceList = choiceList;
-	}
-
-
-	public List<WrapOutDelay> getDelayList() {
-		return delayList;
-	}
-
-	public void setDelayList(List<WrapOutDelay> delayList) {
-		this.delayList = delayList;
-	}
-
-	public List<WrapOutEmbed> getEmbedList() {
-		return embedList;
-	}
-
-	public void setEmbedList(List<WrapOutEmbed> embedList) {
-		this.embedList = embedList;
-	}
-
-	public List<WrapOutEnd> getEndList() {
-		return endList;
-	}
-
-	public void setEndList(List<WrapOutEnd> endList) {
-		this.endList = endList;
-	}
-
-	public List<WrapOutInvoke> getInvokeList() {
-		return invokeList;
-	}
-
-	public void setInvokeList(List<WrapOutInvoke> invokeList) {
-		this.invokeList = invokeList;
-	}
-
-	public List<WrapOutManual> getManualList() {
-		return manualList;
-	}
-
-	public void setManualList(List<WrapOutManual> manualList) {
-		this.manualList = manualList;
-	}
-
-	public List<WrapOutMerge> getMergeList() {
-		return mergeList;
-	}
-
-	public void setMergeList(List<WrapOutMerge> mergeList) {
-		this.mergeList = mergeList;
-	}
-
-	public List<WrapOutMessage> getMessageList() {
-		return messageList;
-	}
-
-	public void setMessageList(List<WrapOutMessage> messageList) {
-		this.messageList = messageList;
-	}
-
-	public List<WrapOutRoute> getRouteList() {
-		return routeList;
-	}
-
-	public void setRouteList(List<WrapOutRoute> routeList) {
-		this.routeList = routeList;
-	}
-
-	public List<WrapOutParallel> getParallelList() {
-		return parallelList;
-	}
-
-	public void setParallelList(List<WrapOutParallel> parallelList) {
-		this.parallelList = parallelList;
-	}
-
-	public List<WrapOutService> getServiceList() {
-		return serviceList;
-	}
-
-	public void setServiceList(List<WrapOutService> serviceList) {
-		this.serviceList = serviceList;
-	}
-
-	public List<WrapOutSplit> getSplitList() {
-		return splitList;
-	}
-
-	public void setSplitList(List<WrapOutSplit> splitList) {
-		this.splitList = splitList;
-	}
-
-}

+ 0 - 13
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutQueryStat.java

@@ -1,13 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.QueryStat;
-public class WrapOutQueryStat extends QueryStat {
-
-	private static final long serialVersionUID = 2886873983211744188L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutQueryView.java

@@ -1,14 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.QueryView;
-
-public class WrapOutQueryView extends QueryView {
-
-	private static final long serialVersionUID = 2886873983211744188L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 13
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutRoute.java

@@ -1,13 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Route;
-public class WrapOutRoute extends Route {
-
-	private static final long serialVersionUID = 4309969270030957709L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 29
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutScript.java

@@ -1,29 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.List;
-
-import com.x.base.core.project.gson.GsonPropertyObject;
-
-public class WrapOutScript extends GsonPropertyObject {
-
-	private String text;
-
-	private List<String> importedList;
-
-	public List<String> getImportedList() {
-		return importedList;
-	}
-
-	public void setImportedList(List<String> importedList) {
-		this.importedList = importedList;
-	}
-
-	public String getText() {
-		return text;
-	}
-
-	public void setText(String text) {
-		this.text = text;
-	}
-
-}

+ 0 - 14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutService.java

@@ -1,14 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Service;
-
-public class WrapOutService extends Service {
-
-	private static final long serialVersionUID = -8322044803022612130L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 0 - 14
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/wrapout/element/WrapOutSplit.java

@@ -1,14 +0,0 @@
-package com.x.processplatform.assemble.surface.wrapout.element;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.processplatform.core.entity.element.Split;
-
-public class WrapOutSplit extends Split {
-
-	private static final long serialVersionUID = 2746872526189840000L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 16 - 0
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/TaskCompleted.java

@@ -263,6 +263,7 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 //		}
 		this.setOpinion(task.getOpinion());
 		this.copyProjectionFields(task);
+		this.empowerFromIdentity = task.getEmpowerFromIdentity();
 	}
 
 	public static final String job_FIELDNAME = "job";
@@ -402,6 +403,13 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 	@CheckPersist(allowEmpty = true)
 	private String empowerToIdentity;
 
+	public static final String empowerFromIdentity_FIELDNAME = "empowerFromIdentity";
+	@FieldDescribe("授权自Identity")
+	@Column(length = length_255B, name = ColumnNamePrefix + empowerFromIdentity_FIELDNAME)
+	@Index(name = TABLE + IndexNameMiddle + empowerFromIdentity_FIELDNAME)
+	@CheckPersist(allowEmpty = true)
+	private String empowerFromIdentity;
+
 	public static final String unit_FIELDNAME = "unit";
 	@FieldDescribe("当前处理人所在部门.")
 	@Column(length = length_255B, name = ColumnNamePrefix + unit_FIELDNAME)
@@ -1410,4 +1418,12 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 		this.empowerToIdentity = empowerToIdentity;
 	}
 
+	public String getEmpowerFromIdentity() {
+		return empowerFromIdentity;
+	}
+
+	public void setEmpowerFromIdentity(String empowerFromIdentity) {
+		this.empowerFromIdentity = empowerFromIdentity;
+	}
+
 }

+ 33 - 0
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/Business.java

@@ -17,6 +17,39 @@ import com.x.processplatform.service.processing.factory.WorkLogFactory;
 
 public class Business {
 
+	public static final String EVENT_MANUALTASKEXPIRE = "manualTaskExpire";
+	public static final String EVENT_MANUALTASK = "manualTask";
+	public static final String EVENT_MANUALSTAY = "manualStay";
+	public static final String EVENT_MANUALBEFORETASK = "manualBeforeTask";
+	public static final String EVENT_MANUALAFTERTASK = "manualAfterTask";
+	public static final String EVENT_BEFOREARRIVE = "beforeArrive";
+	public static final String EVENT_AFTERARRIVE = "afterArrive";
+	public static final String EVENT_BEFOREEXECUTE = "beforeExecute";
+	public static final String EVENT_AFTEREXECUTE = "afterExecute";
+	public static final String EVENT_BEFOREINQUIRE = "beforeInquire";
+	public static final String EVENT_AFTERINQUIRE = "afterInquire";
+	public static final String EVENT_INVOKEJAXWSPARAMETER = "invokeJaxwsParameter";
+	public static final String EVENT_INVOKEJAXRSPARAMETER = "invokeJaxrsParameter";
+	public static final String EVENT_INVOKEJAXWSRESPONSE = "invokeJaxwsResponse";
+	public static final String EVENT_INVOKEJAXRSRESPONSE = "invokeJaxrsResponse";
+	public static final String EVENT_INVOKEJAXRSBODY = "invokeJaxrsBody";
+	public static final String EVENT_INVOKEJAXRSHEAD = "invokeJaxrsHead";
+	public static final String EVENT_SERVICE = "service";
+	public static final String EVENT_ROUTE = "route";
+	public static final String EVENT_ROUTEAPPENDTASKIDENTITY = "routeAppendTaskIdentity";
+	public static final String EVENT_READ = "read";
+	public static final String EVENT_REVIEW = "review";
+	public static final String EVENT_AGENT = "agent";
+	public static final String EVENT_AGENTINTERRUPT = "agentInterrupt";
+	public static final String EVENT_DELAY = "delay";
+	public static final String EVENT_EMBEDTARGETASSIGNDATA = "embedTargetAssignData";
+	public static final String EVENT_EMBEDTARGETIDENTITY = "embedTargetIdentity";
+	public static final String EVENT_EMBEDTARGETTITLE = "embedTargetTitle";
+	public static final String EVENT_PROCESSAFTERBEGIN = "processAfterBegin";
+	public static final String EVENT_PROCESSAFTEREND = "processAfterEnd";
+	public static final String EVENT_PROCESSEXPIRE = "processExpire";
+	public static final String EVENT_SPLIT = "split";
+
 	private EntityManagerContainer emc;
 
 	public Business(EntityManagerContainer emc) throws Exception {

+ 213 - 213
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ScriptHelper.java

@@ -1,213 +1,213 @@
-package com.x.processplatform.service.processing;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Objects;
-
-import javax.script.ScriptEngine;
-import javax.script.ScriptEngineManager;
-
-import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.SystemUtils;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.x.base.core.project.exception.ExceptionScriptEval;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.processplatform.core.entity.element.Script;
-import com.x.processplatform.service.processing.processor.AeiObjects;
-
-import jdk.nashorn.api.scripting.ScriptObjectMirror;
-
-public class ScriptHelper {
-
-	private static Logger logger = LoggerFactory.getLogger(ScriptHelper.class);
-
-	private static final String defaultLanguage = "JavaScript";
-
-	private static final String distinguishedName = "distinguishedName";
-
-	private ScriptEngineManager factory;
-	private ScriptEngine engine;
-	private Business business;
-	private AeiObjects aeiObjects = null;
-
-	public AeiObjects getAeiObjects() {
-		return this.aeiObjects;
-	}
-
-	void setAeiObjects(AeiObjects aeiObjects) {
-		this.aeiObjects = aeiObjects;
-	}
-
-	ScriptHelper(Business business, Map<String, Object> map, String initialScriptText) throws Exception {
-		this.factory = new ScriptEngineManager();
-		this.engine = factory.getEngineByName(defaultLanguage);
-		this.business = business;
-		for (Entry<String, Object> entry : map.entrySet()) {
-			engine.put(entry.getKey(), entry.getValue());
-		}
-		try {
-			engine.eval(initialScriptText);
-		} catch (Exception e) {
-			throw new ExceptionInitialScript(e, initialScriptText);
-		}
-	}
-
-	public Object eval(String scriptText) throws Exception {
-		Object o = this.eval(null, null, scriptText);
-		return o;
-	}
-
-	public Object eval(String application, String scriptName, String scriptText) throws Exception {
-		StringBuffer sb = new StringBuffer();
-		try {
-			sb.append("(function(){").append(SystemUtils.LINE_SEPARATOR);
-			if (StringUtils.isNotEmpty(scriptName)) {
-				List<Script> list = business.element().listScriptNestedWithApplicationWithUniqueName(application,
-						scriptName);
-				for (Script o : list) {
-					sb.append(o.getText()).append(SystemUtils.LINE_SEPARATOR);
-				}
-			}
-			if (StringUtils.isNotEmpty(scriptText)) {
-				sb.append(scriptText).append(SystemUtils.LINE_SEPARATOR);
-			}
-			sb.append("}).apply(bind);");
-			// return this.engine.eval(sb.toString(), scriptContext);
-			Object obj = this.engine.eval(sb.toString());
-			logger.debug("eval return:{}.", obj);
-			return obj;
-		} catch (Exception e) {
-			throw new ExceptionScriptEval(e, e.getMessage() + ", code:\n" + sb.toString());
-		}
-	}
-
-	public List<String> evalAsStringList(String application, String scriptName, String scriptText) throws Exception {
-		Object o = this.eval(application, scriptName, scriptText);
-		return this.readAsStringList(o);
-	}
-
-	public String evalAsString(String application, String scriptName, String scriptText) throws Exception {
-		Object o = this.eval(application, scriptName, scriptText);
-		return Objects.toString(o);
-	}
-
-	public Boolean evalAsBoolean(String application, String scriptName, String scriptText) throws Exception {
-		Object o = this.eval(application, scriptName, scriptText);
-		return (Boolean) o;
-	}
-
-	public List<String> evalExtrectDistinguishedName(String application, String scriptName, String scriptText)
-			throws Exception {
-		List<String> list = new ArrayList<>();
-		Object o = this.eval(application, scriptName, scriptText);
-		if (null != o) {
-			if (o instanceof CharSequence) {
-				list.add(Objects.toString(o, ""));
-			} else if (o instanceof JsonObject) {
-				JsonObject jsonObject = (JsonObject) o;
-				if (jsonObject.has(distinguishedName)) {
-					list.add(jsonObject.get(distinguishedName).getAsString());
-				}
-			} else if (o instanceof JsonArray) {
-				for (JsonElement jsonElement : (JsonArray) o) {
-					if (jsonElement.isJsonObject()) {
-						JsonObject jsonObject = jsonElement.getAsJsonObject();
-						if (jsonObject.has(distinguishedName)) {
-							list.add(jsonObject.get(distinguishedName).getAsString());
-						}
-					}
-				}
-			} else if (o instanceof Iterable) {
-				for (Object obj : (Iterable<?>) o) {
-					if (null != obj) {
-						if (obj instanceof CharSequence) {
-							list.add(Objects.toString(obj, ""));
-						} else {
-							Object d = PropertyUtils.getProperty(obj, distinguishedName);
-							if (null != d) {
-								list.add(Objects.toString(d, ""));
-							}
-						}
-					}
-				}
-			} else if (o instanceof ScriptObjectMirror) {
-				ScriptObjectMirror som = (ScriptObjectMirror) o;
-				if (som.isArray()) {
-					Object[] objs = (som.to(Object[].class));
-					for (Object obj : objs) {
-						if (null != obj) {
-							if (obj instanceof CharSequence) {
-								list.add(Objects.toString(obj, ""));
-							} else {
-								Object d = PropertyUtils.getProperty(obj, distinguishedName);
-								if (null != d) {
-									list.add(Objects.toString(d, ""));
-								}
-							}
-						}
-					}
-				} else {
-					Object d = PropertyUtils.getProperty(o, distinguishedName);
-					if (null != d) {
-						list.add(Objects.toString(d, ""));
-					}
-				}
-			}
-		}
-		return list;
-
-	}
-
-	private List<String> readAsStringList(Object obj) throws Exception {
-		List<String> list = new ArrayList<>();
-		for (Object o : this.iterator(obj)) {
-			list.add(Objects.toString(o));
-		}
-		return list;
-	}
-
-	private List<Object> iterator(Object obj) throws Exception {
-		List<Object> results = new ArrayList<>();
-		this.iterator(obj, results);
-		return results;
-	}
-
-	private void iterator(Object obj, List<Object> results) throws Exception {
-		if (null == obj) {
-			return;
-		}
-		List<Object> list = new ArrayList<>();
-		if (obj.getClass().isArray()) {
-			for (Object o : (Object[]) obj) {
-				list.add(o);
-			}
-		} else if (obj instanceof Collection) {
-			for (Object o : (Collection<?>) obj) {
-				list.add(o);
-			}
-		} else if (obj instanceof ScriptObjectMirror) {
-			ScriptObjectMirror som = (ScriptObjectMirror) obj;
-			if (som.isArray()) {
-				Object[] os = (som.to(Object[].class));
-				for (Object o : os) {
-					list.add(o);
-				}
-			} else {
-				results.add(som);
-			}
-		} else {
-			results.add(obj);
-		}
-		for (Object o : list) {
-			iterator(o, results);
-		}
-	}
-}
+//package com.x.processplatform.service.processing;
+//
+//import java.util.ArrayList;
+//import java.util.Collection;
+//import java.util.List;
+//import java.util.Map;
+//import java.util.Map.Entry;
+//import java.util.Objects;
+//
+//import javax.script.ScriptEngine;
+//import javax.script.ScriptEngineManager;
+//
+//import org.apache.commons.beanutils.PropertyUtils;
+//import org.apache.commons.lang3.StringUtils;
+//import org.apache.commons.lang3.SystemUtils;
+//
+//import com.google.gson.JsonArray;
+//import com.google.gson.JsonElement;
+//import com.google.gson.JsonObject;
+//import com.x.base.core.project.exception.ExceptionScriptEval;
+//import com.x.base.core.project.logger.Logger;
+//import com.x.base.core.project.logger.LoggerFactory;
+//import com.x.processplatform.core.entity.element.Script;
+//import com.x.processplatform.service.processing.processor.AeiObjects;
+//
+//import jdk.nashorn.api.scripting.ScriptObjectMirror;
+//
+//public class ScriptHelper {
+//
+//	private static Logger logger = LoggerFactory.getLogger(ScriptHelper.class);
+//
+//	private static final String defaultLanguage = "JavaScript";
+//
+//	private static final String distinguishedName = "distinguishedName";
+//
+//	private ScriptEngineManager factory;
+//	private ScriptEngine engine;
+//	private Business business;
+//	private AeiObjects aeiObjects = null;
+//
+//	public AeiObjects getAeiObjects() {
+//		return this.aeiObjects;
+//	}
+//
+//	void setAeiObjects(AeiObjects aeiObjects) {
+//		this.aeiObjects = aeiObjects;
+//	}
+//
+//	ScriptHelper(Business business, Map<String, Object> map, String initialScriptText) throws Exception {
+//		this.factory = new ScriptEngineManager();
+//		this.engine = factory.getEngineByName(defaultLanguage);
+//		this.business = business;
+//		for (Entry<String, Object> entry : map.entrySet()) {
+//			engine.put(entry.getKey(), entry.getValue());
+//		}
+//		try {
+//			engine.eval(initialScriptText);
+//		} catch (Exception e) {
+//			throw new ExceptionInitialScript(e, initialScriptText);
+//		}
+//	}
+//
+//	public Object eval(String scriptText) throws Exception {
+//		Object o = this.eval(null, null, scriptText);
+//		return o;
+//	}
+//
+//	public Object eval(String application, String scriptName, String scriptText) throws Exception {
+//		StringBuffer sb = new StringBuffer();
+//		try {
+//			sb.append("(function(){").append(SystemUtils.LINE_SEPARATOR);
+//			if (StringUtils.isNotEmpty(scriptName)) {
+//				List<Script> list = business.element().listScriptNestedWithApplicationWithUniqueName(application,
+//						scriptName);
+//				for (Script o : list) {
+//					sb.append(o.getText()).append(SystemUtils.LINE_SEPARATOR);
+//				}
+//			}
+//			if (StringUtils.isNotEmpty(scriptText)) {
+//				sb.append(scriptText).append(SystemUtils.LINE_SEPARATOR);
+//			}
+//			sb.append("}).apply(bind);");
+//			// return this.engine.eval(sb.toString(), scriptContext);
+//			Object obj = this.engine.eval(sb.toString());
+//			logger.debug("eval return:{}.", obj);
+//			return obj;
+//		} catch (Exception e) {
+//			throw new ExceptionScriptEval(e, e.getMessage() + ", code:\n" + sb.toString());
+//		}
+//	}
+//
+//	public List<String> evalAsStringList(String application, String scriptName, String scriptText) throws Exception {
+//		Object o = this.eval(application, scriptName, scriptText);
+//		return this.readAsStringList(o);
+//	}
+//
+//	public String evalAsString(String application, String scriptName, String scriptText) throws Exception {
+//		Object o = this.eval(application, scriptName, scriptText);
+//		return Objects.toString(o);
+//	}
+//
+//	public Boolean evalAsBoolean(String application, String scriptName, String scriptText) throws Exception {
+//		Object o = this.eval(application, scriptName, scriptText);
+//		return (Boolean) o;
+//	}
+//
+//	public List<String> evalExtrectDistinguishedName(String application, String scriptName, String scriptText)
+//			throws Exception {
+//		List<String> list = new ArrayList<>();
+//		Object o = this.eval(application, scriptName, scriptText);
+//		if (null != o) {
+//			if (o instanceof CharSequence) {
+//				list.add(Objects.toString(o, ""));
+//			} else if (o instanceof JsonObject) {
+//				JsonObject jsonObject = (JsonObject) o;
+//				if (jsonObject.has(distinguishedName)) {
+//					list.add(jsonObject.get(distinguishedName).getAsString());
+//				}
+//			} else if (o instanceof JsonArray) {
+//				for (JsonElement jsonElement : (JsonArray) o) {
+//					if (jsonElement.isJsonObject()) {
+//						JsonObject jsonObject = jsonElement.getAsJsonObject();
+//						if (jsonObject.has(distinguishedName)) {
+//							list.add(jsonObject.get(distinguishedName).getAsString());
+//						}
+//					}
+//				}
+//			} else if (o instanceof Iterable) {
+//				for (Object obj : (Iterable<?>) o) {
+//					if (null != obj) {
+//						if (obj instanceof CharSequence) {
+//							list.add(Objects.toString(obj, ""));
+//						} else {
+//							Object d = PropertyUtils.getProperty(obj, distinguishedName);
+//							if (null != d) {
+//								list.add(Objects.toString(d, ""));
+//							}
+//						}
+//					}
+//				}
+//			} else if (o instanceof ScriptObjectMirror) {
+//				ScriptObjectMirror som = (ScriptObjectMirror) o;
+//				if (som.isArray()) {
+//					Object[] objs = (som.to(Object[].class));
+//					for (Object obj : objs) {
+//						if (null != obj) {
+//							if (obj instanceof CharSequence) {
+//								list.add(Objects.toString(obj, ""));
+//							} else {
+//								Object d = PropertyUtils.getProperty(obj, distinguishedName);
+//								if (null != d) {
+//									list.add(Objects.toString(d, ""));
+//								}
+//							}
+//						}
+//					}
+//				} else {
+//					Object d = PropertyUtils.getProperty(o, distinguishedName);
+//					if (null != d) {
+//						list.add(Objects.toString(d, ""));
+//					}
+//				}
+//			}
+//		}
+//		return list;
+//
+//	}
+//
+//	private List<String> readAsStringList(Object obj) throws Exception {
+//		List<String> list = new ArrayList<>();
+//		for (Object o : this.iterator(obj)) {
+//			list.add(Objects.toString(o));
+//		}
+//		return list;
+//	}
+//
+//	private List<Object> iterator(Object obj) throws Exception {
+//		List<Object> results = new ArrayList<>();
+//		this.iterator(obj, results);
+//		return results;
+//	}
+//
+//	private void iterator(Object obj, List<Object> results) throws Exception {
+//		if (null == obj) {
+//			return;
+//		}
+//		List<Object> list = new ArrayList<>();
+//		if (obj.getClass().isArray()) {
+//			for (Object o : (Object[]) obj) {
+//				list.add(o);
+//			}
+//		} else if (obj instanceof Collection) {
+//			for (Object o : (Collection<?>) obj) {
+//				list.add(o);
+//			}
+//		} else if (obj instanceof ScriptObjectMirror) {
+//			ScriptObjectMirror som = (ScriptObjectMirror) obj;
+//			if (som.isArray()) {
+//				Object[] os = (som.to(Object[].class));
+//				for (Object o : os) {
+//					list.add(o);
+//				}
+//			} else {
+//				results.add(som);
+//			}
+//		} else {
+//			results.add(obj);
+//		}
+//		for (Object o : list) {
+//			iterator(o, results);
+//		}
+//	}
+//}

+ 82 - 82
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ScriptHelperFactory.java

@@ -1,82 +1,82 @@
-package com.x.processplatform.service.processing;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.x.base.core.project.gson.XGsonBuilder;
-import com.x.base.core.project.scripting.ScriptingEngine;
-import com.x.base.core.project.webservices.WebservicesClient;
-import com.x.organization.core.express.Organization;
-import com.x.processplatform.core.entity.content.Data;
-import com.x.processplatform.core.entity.content.Task;
-import com.x.processplatform.core.entity.content.TaskCompleted;
-import com.x.processplatform.core.entity.content.Work;
-import com.x.processplatform.core.entity.element.Activity;
-import com.x.processplatform.service.processing.processor.AeiObjects;
-
-public class ScriptHelperFactory {
-
-	public static String initialScriptText;
-
-	public static ScriptHelper create(AeiObjects aeiObjects, BindingPair... bindingPairs) throws Exception {
-		WorkContext workContext = new WorkContext(aeiObjects);
-		Map<String, Object> map = new HashMap<>();
-		map.put(ScriptingEngine.BINDINGNAME_WORKCONTEXT, workContext);
-		map.put(ScriptingEngine.BINDINGNAME_GSON, XGsonBuilder.instance());
-		map.put(ScriptingEngine.BINDINGNAME_DATA, aeiObjects.getData());
-		map.put(ScriptingEngine.BINDINGNAME_ORGANIZATION, new Organization(ThisApplication.context()));
-		map.put(ScriptingEngine.BINDINGNAME_WEBSERVICESCLIENT, new WebservicesClient());
-		map.put(ScriptingEngine.BINDINGNAME_DICTIONARY,
-				new ApplicationDictHelper(aeiObjects.entityManagerContainer(), aeiObjects.getWork().getApplication()));
-		map.put(ScriptingEngine.BINDINGNAME_APPLICATIONS, ThisApplication.context().applications());
-		if ((null != aeiObjects.getProcessingAttributes())
-				&& (null != aeiObjects.getProcessingAttributes().getRouteData())) {
-			map.put(ScriptingEngine.BINDINGNAME_ROUTEDATA,
-					aeiObjects.getProcessingAttributes().getRouteData().toString());
-		} else {
-			map.put(ScriptingEngine.BINDINGNAME_ROUTEDATA, "");
-		}
-		for (BindingPair o : bindingPairs) {
-			map.put(o.getName(), o.getValue());
-		}
-		ScriptHelper sh = new ScriptHelper(aeiObjects.business(), map, initialScriptText);
-		sh.setAeiObjects(aeiObjects);
-		return sh;
-	}
-
-	public static ScriptHelper createWithTask(Business business, Work work, Data data, Activity activity, Task task,
-			BindingPair... bindingPairs) throws Exception {
-		WorkContext workContext = new WorkContext(business, work, activity, task);
-		Map<String, Object> map = new HashMap<>();
-		map.put(ScriptingEngine.BINDINGNAME_WORKCONTEXT, workContext);
-		map.put(ScriptingEngine.BINDINGNAME_DATA, data);
-		map.put(ScriptingEngine.BINDINGNAME_ORGANIZATION, new Organization(ThisApplication.context()));
-		map.put(ScriptingEngine.BINDINGNAME_WEBSERVICESCLIENT, new WebservicesClient());
-		map.put(ScriptingEngine.BINDINGNAME_DICTIONARY,
-				new ApplicationDictHelper(business.entityManagerContainer(), work.getApplication()));
-		map.put(ScriptingEngine.BINDINGNAME_APPLICATIONS, ThisApplication.context().applications());
-		for (BindingPair o : bindingPairs) {
-			map.put(o.getName(), o.getValue());
-		}
-		ScriptHelper sh = new ScriptHelper(business, map, initialScriptText);
-		return sh;
-	}
-
-	public static ScriptHelper createWithTaskCompleted(Business business, Work work, Data data, Activity activity,
-			TaskCompleted taskCompleted, BindingPair... bindingPairs) throws Exception {
-		WorkContext workContext = new WorkContext(business, work, activity, taskCompleted);
-		Map<String, Object> map = new HashMap<>();
-		map.put(ScriptingEngine.BINDINGNAME_WORKCONTEXT, workContext);
-		map.put(ScriptingEngine.BINDINGNAME_DATA, data);
-		map.put(ScriptingEngine.BINDINGNAME_ORGANIZATION, new Organization(ThisApplication.context()));
-		map.put(ScriptingEngine.BINDINGNAME_WEBSERVICESCLIENT, new WebservicesClient());
-		map.put(ScriptingEngine.BINDINGNAME_DICTIONARY,
-				new ApplicationDictHelper(business.entityManagerContainer(), work.getApplication()));
-		map.put(ScriptingEngine.BINDINGNAME_APPLICATIONS, ThisApplication.context().applications());
-		for (BindingPair o : bindingPairs) {
-			map.put(o.getName(), o.getValue());
-		}
-		ScriptHelper sh = new ScriptHelper(business, map, initialScriptText);
-		return sh;
-	}
-}
+//package com.x.processplatform.service.processing;
+//
+//import java.util.HashMap;
+//import java.util.Map;
+//
+//import com.x.base.core.project.gson.XGsonBuilder;
+//import com.x.base.core.project.scripting.ScriptingEngine;
+//import com.x.base.core.project.webservices.WebservicesClient;
+//import com.x.organization.core.express.Organization;
+//import com.x.processplatform.core.entity.content.Data;
+//import com.x.processplatform.core.entity.content.Task;
+//import com.x.processplatform.core.entity.content.TaskCompleted;
+//import com.x.processplatform.core.entity.content.Work;
+//import com.x.processplatform.core.entity.element.Activity;
+//import com.x.processplatform.service.processing.processor.AeiObjects;
+//
+//public class ScriptHelperFactory {
+//
+//	public static String initialScriptText;
+//
+//	public static ScriptHelper create(AeiObjects aeiObjects, BindingPair... bindingPairs) throws Exception {
+//		WorkContext workContext = new WorkContext(aeiObjects);
+//		Map<String, Object> map = new HashMap<>();
+//		map.put(ScriptingEngine.BINDINGNAME_WORKCONTEXT, workContext);
+//		map.put(ScriptingEngine.BINDINGNAME_GSON, XGsonBuilder.instance());
+//		map.put(ScriptingEngine.BINDINGNAME_DATA, aeiObjects.getData());
+//		map.put(ScriptingEngine.BINDINGNAME_ORGANIZATION, new Organization(ThisApplication.context()));
+//		map.put(ScriptingEngine.BINDINGNAME_WEBSERVICESCLIENT, new WebservicesClient());
+//		map.put(ScriptingEngine.BINDINGNAME_DICTIONARY,
+//				new ApplicationDictHelper(aeiObjects.entityManagerContainer(), aeiObjects.getWork().getApplication()));
+//		map.put(ScriptingEngine.BINDINGNAME_APPLICATIONS, ThisApplication.context().applications());
+//		if ((null != aeiObjects.getProcessingAttributes())
+//				&& (null != aeiObjects.getProcessingAttributes().getRouteData())) {
+//			map.put(ScriptingEngine.BINDINGNAME_ROUTEDATA,
+//					aeiObjects.getProcessingAttributes().getRouteData().toString());
+//		} else {
+//			map.put(ScriptingEngine.BINDINGNAME_ROUTEDATA, "");
+//		}
+//		for (BindingPair o : bindingPairs) {
+//			map.put(o.getName(), o.getValue());
+//		}
+//		ScriptHelper sh = new ScriptHelper(aeiObjects.business(), map, initialScriptText);
+//		sh.setAeiObjects(aeiObjects);
+//		return sh;
+//	}
+//
+//	public static ScriptHelper createWithTask(Business business, Work work, Data data, Activity activity, Task task,
+//			BindingPair... bindingPairs) throws Exception {
+//		WorkContext workContext = new WorkContext(business, work, activity, task);
+//		Map<String, Object> map = new HashMap<>();
+//		map.put(ScriptingEngine.BINDINGNAME_WORKCONTEXT, workContext);
+//		map.put(ScriptingEngine.BINDINGNAME_DATA, data);
+//		map.put(ScriptingEngine.BINDINGNAME_ORGANIZATION, new Organization(ThisApplication.context()));
+//		map.put(ScriptingEngine.BINDINGNAME_WEBSERVICESCLIENT, new WebservicesClient());
+//		map.put(ScriptingEngine.BINDINGNAME_DICTIONARY,
+//				new ApplicationDictHelper(business.entityManagerContainer(), work.getApplication()));
+//		map.put(ScriptingEngine.BINDINGNAME_APPLICATIONS, ThisApplication.context().applications());
+//		for (BindingPair o : bindingPairs) {
+//			map.put(o.getName(), o.getValue());
+//		}
+//		ScriptHelper sh = new ScriptHelper(business, map, initialScriptText);
+//		return sh;
+//	}
+//
+//	public static ScriptHelper createWithTaskCompleted(Business business, Work work, Data data, Activity activity,
+//			TaskCompleted taskCompleted, BindingPair... bindingPairs) throws Exception {
+//		WorkContext workContext = new WorkContext(business, work, activity, taskCompleted);
+//		Map<String, Object> map = new HashMap<>();
+//		map.put(ScriptingEngine.BINDINGNAME_WORKCONTEXT, workContext);
+//		map.put(ScriptingEngine.BINDINGNAME_DATA, data);
+//		map.put(ScriptingEngine.BINDINGNAME_ORGANIZATION, new Organization(ThisApplication.context()));
+//		map.put(ScriptingEngine.BINDINGNAME_WEBSERVICESCLIENT, new WebservicesClient());
+//		map.put(ScriptingEngine.BINDINGNAME_DICTIONARY,
+//				new ApplicationDictHelper(business.entityManagerContainer(), work.getApplication()));
+//		map.put(ScriptingEngine.BINDINGNAME_APPLICATIONS, ThisApplication.context().applications());
+//		for (BindingPair o : bindingPairs) {
+//			map.put(o.getName(), o.getValue());
+//		}
+//		ScriptHelper sh = new ScriptHelper(business, map, initialScriptText);
+//		return sh;
+//	}
+//}

Некоторые файлы не были показаны из-за большого количества измененных файлов