zhourui 5 лет назад
Родитель
Сommit
8ba6cfe588
54 измененных файлов с 764 добавлено и 1854 удалено
  1. 2 2
      o2server/configSample/exmail.json
  2. 1 1
      o2server/configSample/processPlatform.json
  3. 3 3
      o2server/configSample/query.json
  4. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ProcessPlatform.java
  5. 4 6
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Query.java
  6. 0 494
      o2server/x_component_assemble_control/src/main/webapp/describe/describe.json
  7. 0 24
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/AbstractFactory.java
  8. 0 33
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/ApplicationServletContextListener.java
  9. 0 51
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/Business.java
  10. 0 40
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/ThisApplication.java
  11. 0 41
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/factory/ComponentFactory.java
  12. 0 20
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/ActionApplication.java
  13. 0 10
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/ComponentJaxrsFilter.java
  14. 0 10
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/StatusJaxrsFilter.java
  15. 0 13
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionBase.java
  16. 0 52
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionCreate.java
  17. 0 47
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionDelete.java
  18. 0 44
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionDeleteAll.java
  19. 0 67
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionEdit.java
  20. 0 35
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionGet.java
  21. 0 74
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionListAll.java
  22. 0 141
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ComponentAction.java
  23. 0 88
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/status/StatusAction.java
  24. 0 28
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/status/WrapOutStatus.java
  25. 0 14
      o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/wrapout/WrapOutComponent.java
  26. 6 5
      o2server/x_console/pom.xml
  27. 5 4
      o2server/x_console/src/main/java/com/x/server/console/SchedulerBuilder.java
  28. 4 1
      o2server/x_console/src/main/java/com/x/server/console/action/ActionControl.java
  29. 43 0
      o2server/x_console/src/main/java/com/x/server/console/action/EraseContentOrg.java
  30. 3 2
      o2server/x_console/src/main/java/com/x/server/console/node/VoteCenterEvent.java
  31. 214 8
      o2server/x_processplatform_assemble_bam/src/main/webapp/describe/describe.json
  32. 1 1
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/content/JobFactory.java
  33. 1 4
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/data/ActionUpdateWithWork.java
  34. 23 20
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Draft.java
  35. 10 0
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/DraftProperties.java
  36. 31 26
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Read.java
  37. 33 33
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/ReadCompleted.java
  38. 22 0
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/ReadCompletedProperties.java
  39. 23 0
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/ReadProperties.java
  40. 0 18
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Record.java
  41. 23 15
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Review.java
  42. 12 0
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/ReviewProperties.java
  43. 34 52
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Task.java
  44. 46 84
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/TaskCompleted.java
  45. 23 1
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/TaskCompletedProperties.java
  46. 20 46
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/TaskProperties.java
  47. 50 34
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Work.java
  48. 18 43
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkCompleted.java
  49. 15 3
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkCompletedProperties.java
  50. 13 42
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkProperties.java
  51. 3 4
      o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/work/V2RerouteWi.java
  52. 1 1
      o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/data/ActionUpdateWithWork.java
  53. 68 64
      o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/data/BaseAction.java
  54. 8 4
      o2server/x_program_center/src/main/java/com/x/program/center/CenterQueue.java

+ 2 - 2
o2server/configSample/exmail.json

@@ -15,6 +15,6 @@
   "###ssoAddress": "单点登录获取地址###",
   "###token": "回调token###",
   "###encodingAesKey": "回调encodingAesKey###",
-  "###personAttributeNewCountName": " 存储邮件数量个人属性值.###",
-  "###personAttributeTitleName": " 存储邮件标题个人属性值.###"
+  "###personAttributeNewCountName": "存储邮件数量个人属性值.###",
+  "###personAttributeTitleName": "存储邮件标题个人属性值.###"
 }

+ 1 - 1
o2server/configSample/processPlatform.json

@@ -8,7 +8,7 @@
   "docToWordDefaultSite": "$doc",
   "executorCount": 32.0,
   "urge": {
-    "enable": true,
+    "enable": false,
     "cron": "30 0/10 8-18 * * ?",
     "###enable": "是否启用###",
     "###cron": "定时cron表达式.###"

+ 3 - 3
o2server/configSample/query.json

@@ -1,6 +1,6 @@
 {
   "crawlWorkCompleted": {
-    "enable": true,
+    "enable": false,
     "cron": "50 50 22 * * ?",
     "count": 2000.0,
     "excludeAttachment": [],
@@ -14,7 +14,7 @@
     "###maxAttachmentSize": "最大附件大小.###"
   },
   "crawlWork": {
-    "enable": true,
+    "enable": false,
     "cron": "40 40 7-21 * * ?",
     "count": 100.0,
     "excludeAttachment": [],
@@ -28,7 +28,7 @@
     "###maxAttachmentSize": "最大附件大小.###"
   },
   "crawlCms": {
-    "enable": true,
+    "enable": false,
     "cron": "30 30 7-21 * * ?",
     "count": 100.0,
     "excludeAttachment": [],

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

@@ -196,7 +196,7 @@ public class ProcessPlatform extends ConfigObject {
 			return o;
 		}
 
-		public final static Boolean DEFAULT_ENABLE = true;
+		public final static Boolean DEFAULT_ENABLE = false;
 
 		public final static String DEFAULT_CRON = "30 0/10 8-18 * * ?";
 

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

@@ -97,7 +97,7 @@ public class Query extends ConfigObject {
 		File file = new File(Config.base(), Config.PATH_CONFIG_QUERY);
 		FileUtils.write(file, XGsonBuilder.toJson(this), DefaultCharset.charset);
 	}
-	
+
 	public static class CrawlCms extends ConfigObject {
 
 		public static CrawlCms defaultInstance() {
@@ -105,7 +105,7 @@ public class Query extends ConfigObject {
 			return o;
 		}
 
-		public final static Boolean DEFAULT_ENABLE = true;
+		public final static Boolean DEFAULT_ENABLE = false;
 
 		public final static String DEFAULT_CRON = "30 30 7-21 * * ?";
 
@@ -180,7 +180,7 @@ public class Query extends ConfigObject {
 			return o;
 		}
 
-		public final static Boolean DEFAULT_ENABLE = true;
+		public final static Boolean DEFAULT_ENABLE = false;
 
 		public final static String DEFAULT_CRON = "40 40 7-21 * * ?";
 
@@ -268,7 +268,7 @@ public class Query extends ConfigObject {
 			return o;
 		}
 
-		public final static Boolean DEFAULT_ENABLE = true;
+		public final static Boolean DEFAULT_ENABLE = false;
 
 		public final static String DEFAULT_CRON = "50 50 22 * * ?";
 
@@ -348,8 +348,6 @@ public class Query extends ConfigObject {
 
 	}
 
-	
-
 	public void setCrawlWorkCompleted(CrawlWorkCompleted crawlWorkCompleted) {
 		this.crawlWorkCompleted = crawlWorkCompleted;
 	}

+ 0 - 494
o2server/x_component_assemble_control/src/main/webapp/describe/describe.json

@@ -1,494 +0,0 @@
-{
-  "jaxrs": [
-    {
-      "name": "CacheAction",
-      "className": "com.x.base.core.project.jaxrs.cache.CacheAction",
-      "description": "缓存操作",
-      "methods": [
-        {
-          "name": "configFlush",
-          "className": "com.x.base.core.project.jaxrs.cache.ActionConfigFlush",
-          "description": "接收config flush 信号.",
-          "type": "GET",
-          "path": "jaxrs/cache/config/flush",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "receive",
-          "className": "com.x.base.core.project.jaxrs.cache.ActionReceive",
-          "description": "接收Cache刷新信息.",
-          "type": "PUT",
-          "path": "jaxrs/cache",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [
-            {
-              "name": "nodeName",
-              "type": "String",
-              "isCollection": false,
-              "description": "节点名",
-              "isBaseType": true
-            },
-            {
-              "name": "className",
-              "type": "String",
-              "isCollection": false,
-              "description": "类名",
-              "isBaseType": true
-            },
-            {
-              "name": "keys",
-              "type": "List\u003cObject\u003e",
-              "isCollection": true,
-              "description": "关键字",
-              "isBaseType": false
-            }
-          ],
-          "outs": [
-            {
-              "name": "value",
-              "type": "String",
-              "isCollection": false,
-              "description": "字符串值"
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "ComponentAction",
-      "className": "com.x.component.assemble.control.jaxrs.component.ComponentAction",
-      "description": "组件",
-      "methods": [
-        {
-          "name": "create",
-          "className": "com.x.component.assemble.control.jaxrs.component.ActionCreate",
-          "description": "创建Component对象.",
-          "type": "POST",
-          "path": "jaxrs/component",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "delete",
-          "className": "com.x.component.assemble.control.jaxrs.component.ActionDelete",
-          "description": "删除Component对象.",
-          "type": "DELETE",
-          "path": "jaxrs/component/{flag}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "flag",
-              "type": "String",
-              "description": ""
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "deleteAll",
-          "className": "com.x.component.assemble.control.jaxrs.component.ActionDeleteAll",
-          "description": "删除所有Component,还原默认布局.",
-          "type": "DELETE",
-          "path": "jaxrs/component/delete/all",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "edit",
-          "className": "com.x.component.assemble.control.jaxrs.component.ActionEdit",
-          "description": "更新Component对象.",
-          "type": "PUT",
-          "path": "jaxrs/component/{flag}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "flag",
-              "type": "String",
-              "description": ""
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "get",
-          "className": "com.x.component.assemble.control.jaxrs.component.ActionGet",
-          "description": "获取Component对象.",
-          "type": "GET",
-          "path": "jaxrs/component/{flag}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "flag",
-              "type": "String",
-              "description": ""
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": []
-        },
-        {
-          "name": "listAll",
-          "className": "com.x.component.assemble.control.jaxrs.component.ActionListAll",
-          "description": "列示所有Component对象.",
-          "type": "GET",
-          "path": "jaxrs/component/list/all",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": []
-        }
-      ]
-    },
-    {
-      "name": "EchoAction",
-      "className": "com.x.base.core.project.jaxrs.echo.EchoAction",
-      "description": "响应",
-      "methods": [
-        {
-          "name": "get",
-          "className": "com.x.base.core.project.jaxrs.echo.ActionGet",
-          "description": "获取应答.",
-          "type": "GET",
-          "path": "jaxrs/echo",
-          "contentType": "application/json",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "servletContextName",
-              "type": "String",
-              "isCollection": false,
-              "description": "上下文根"
-            },
-            {
-              "name": "serverTime",
-              "type": "Date",
-              "isCollection": false,
-              "description": "服务器时间"
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "FireScheduleAction",
-      "className": "com.x.base.core.project.jaxrs.fireschedule.FireScheduleAction",
-      "description": "触发任务",
-      "methods": [
-        {
-          "name": "execute",
-          "className": "com.x.base.core.project.jaxrs.fireschedule.ActionExecute",
-          "description": "接受x_program_center发送过来的运行schedule.",
-          "type": "GET",
-          "path": "jaxrs/fireschedule/classname/{className}",
-          "contentType": "application/json",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "className",
-              "type": "String",
-              "description": "运行类"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "LoggerAction",
-      "className": "com.x.base.core.project.jaxrs.logger.LoggerAction",
-      "description": "日志操作",
-      "methods": [
-        {
-          "name": "debug",
-          "className": "com.x.base.core.project.jaxrs.logger.ActionDebug",
-          "description": "设置日志级别为DEBUG.",
-          "type": "GET",
-          "path": "jaxrs/logger/debug",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "get",
-          "className": "com.x.base.core.project.jaxrs.logger.ActionGet",
-          "description": "获取当前日志级别.",
-          "type": "GET",
-          "path": "jaxrs/logger",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "String",
-              "isCollection": false,
-              "description": "字符串值"
-            }
-          ]
-        },
-        {
-          "name": "info",
-          "className": "com.x.base.core.project.jaxrs.logger.ActionInfo",
-          "description": "设置日志级别为INFO",
-          "type": "GET",
-          "path": "jaxrs/logger/info",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "trace",
-          "className": "com.x.base.core.project.jaxrs.logger.ActionTrace",
-          "description": "设置日志级别为TRACE.",
-          "type": "GET",
-          "path": "jaxrs/logger/trace",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        },
-        {
-          "name": "warn",
-          "className": "com.x.base.core.project.jaxrs.logger.ActionWarn",
-          "description": "设置日志级别为WARN",
-          "type": "GET",
-          "path": "jaxrs/logger/warn",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "name": "SysResourceAction",
-      "className": "com.x.base.core.project.jaxrs.sysresource.SysResourceAction",
-      "description": "系统资源",
-      "methods": [
-        {
-          "name": "listResource",
-          "className": "com.x.base.core.project.jaxrs.sysresource.ActionListResource",
-          "description": "获取静态资源信息.",
-          "type": "GET",
-          "path": "jaxrs/sysresource/filePath/{filePath}",
-          "contentType": "application/json",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": false,
-          "pathParameters": [
-            {
-              "name": "filePath",
-              "type": "String",
-              "description": "查找路径(根路径:(0))"
-            }
-          ],
-          "formParameters": [],
-          "queryParameters": [],
-          "ins": [],
-          "outs": []
-        },
-        {
-          "name": "uploadResource",
-          "className": "com.x.base.core.project.jaxrs.sysresource.ActionUploadResource",
-          "description": "上传静态资源(仅上传到当前服务器)",
-          "type": "POST",
-          "path": "jaxrs/sysresource/upload/resource/as/new/{asNew}",
-          "contentType": "multipart/form-data",
-          "resultContentType": "application/json; charset\u003dUTF-8",
-          "useJsonElementParameter": false,
-          "useStringParameter": true,
-          "pathParameters": [
-            {
-              "name": "asNew",
-              "type": "Boolean",
-              "description": "覆盖类型:true删除原文件然后上传,false覆盖原文件"
-            }
-          ],
-          "formParameters": [
-            {
-              "name": "file",
-              "type": "File",
-              "description": "上传文件"
-            },
-            {
-              "name": "fileName",
-              "type": "String",
-              "description": "附件名称"
-            },
-            {
-              "name": "filePath",
-              "type": "String",
-              "description": "附件存放目录(可以为空)"
-            }
-          ],
-          "queryParameters": [],
-          "ins": [],
-          "outs": [
-            {
-              "name": "value",
-              "type": "Boolean",
-              "isCollection": false,
-              "description": "布尔值."
-            }
-          ]
-        }
-      ]
-    }
-  ]
-}

+ 0 - 24
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/AbstractFactory.java

@@ -1,24 +0,0 @@
-package com.x.component.assemble.control;
-
-import com.x.base.core.container.EntityManagerContainer;
-
-public abstract class AbstractFactory {
-
-	private Business business;
-
-	public AbstractFactory(Business business) throws Exception {
-		try {
-			if (null == business) {
-				throw new Exception("business can not be null.");
-			}
-			this.business = business;
-		} catch (Exception e) {
-			throw new Exception("can not instantiating factory.");
-		}
-	}
-
-	public EntityManagerContainer entityManagerContainer() throws Exception {
-		return this.business.entityManagerContainer();
-	}
-
-}

+ 0 - 33
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/ApplicationServletContextListener.java

@@ -1,33 +0,0 @@
-package com.x.component.assemble.control;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.annotation.WebListener;
-
-import com.x.base.core.project.Context;
-
-@WebListener
-public class ApplicationServletContextListener implements ServletContextListener {
-
-	@Override
-	public void contextInitialized(ServletContextEvent servletContextEvent) {
-		try {
-			ThisApplication.context = Context.concrete(servletContextEvent);
-			ThisApplication.init();
-			ThisApplication.context().regist();
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	@Override
-	public void contextDestroyed(ServletContextEvent servletContextEvent) {
-		try {
-			ThisApplication.destroy();
-			ThisApplication.context.destrory(servletContextEvent);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-}

+ 0 - 51
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/Business.java

@@ -1,51 +0,0 @@
-package com.x.component.assemble.control;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.organization.OrganizationDefinition;
-import com.x.component.assemble.control.factory.ComponentFactory;
-import com.x.organization.core.express.Organization;
-
-public class Business {
-
-	private EntityManagerContainer emc;
-
-	public Business(EntityManagerContainer emc) throws Exception {
-		this.emc = emc;
-	}
-
-	public EntityManagerContainer entityManagerContainer() {
-		return this.emc;
-	}
-
-	private ComponentFactory component;
-
-	public ComponentFactory component() throws Exception {
-		if (null == this.component) {
-			this.component = new ComponentFactory(this);
-		}
-		return component;
-	}
-
-	private Organization organization;
-
-	public Organization organization() throws Exception {
-		if (null == this.organization) {
-			this.organization = new Organization(ThisApplication.context());
-		}
-		return organization;
-	}
-
-	public boolean editable(EffectivePerson effectivePerson) throws Exception {
-		boolean result = false;
-		if (effectivePerson.isManager()) {
-			result = true;
-		}
-		if (!result) {
-			if (this.organization().person().hasRole(effectivePerson, OrganizationDefinition.Manager)) {
-				result = true;
-			}
-		}
-		return result;
-	}
-}

+ 0 - 40
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/ThisApplication.java

@@ -1,40 +0,0 @@
-package com.x.component.assemble.control;
-
-import com.x.base.core.project.Context;
-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.component.assemble.control.schedule.InitComponents;
-
-public class ThisApplication {
-
-	private ThisApplication() {
-		// nothing
-	}
-
-	protected static Context context;
-
-	private static Logger logger = LoggerFactory.getLogger(ThisApplication.class);
-
-	public static Context context() {
-		return context;
-	}
-
-	public static void init() {
-		try {
-			LoggerFactory.setLevel(Config.logLevel().x_component_assemble_control());
-			context.scheduleLocal(InitComponents.class, 1);
-		} catch (Exception e) {
-			logger.error(e);
-		}
-	}
-
-	public static void destroy() {
-		try {
-			//nothing
-		} catch (Exception e) {
-			logger.error(e);
-		}
-	}
-
-}

+ 0 - 41
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/factory/ComponentFactory.java

@@ -1,41 +0,0 @@
-package com.x.component.assemble.control.factory;
-
-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.component.assemble.control.AbstractFactory;
-import com.x.component.assemble.control.Business;
-import com.x.component.core.entity.Component;
-import com.x.component.core.entity.Component_;
-
-public class ComponentFactory extends AbstractFactory {
-
-	public ComponentFactory(Business business) throws Exception {
-		super(business);
-	}
-
-	public List<String> list() throws Exception {
-		EntityManager em = this.entityManagerContainer().get(Component.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Component> root = cq.from(Component.class);
-		cq.select(root.get(Component_.id));
-		return em.createQuery(cq).getResultList();
-	}
-
-	public List<String> listVisiable() throws Exception {
-		EntityManager em = this.entityManagerContainer().get(Component.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Component> root = cq.from(Component.class);
-		Predicate p = cb.equal(root.get(Component_.visible), Boolean.TRUE);
-		cq.where(p).select(root.get(Component_.id));
-		return em.createQuery(cq).getResultList();
-	}
-
-}

+ 0 - 20
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/ActionApplication.java

@@ -1,20 +0,0 @@
-package com.x.component.assemble.control.jaxrs;
-
-import java.util.Set;
-
-import javax.ws.rs.ApplicationPath;
-
-import com.x.base.core.project.jaxrs.AbstractActionApplication;
-import com.x.component.assemble.control.jaxrs.component.ComponentAction;
-import com.x.component.assemble.control.jaxrs.status.StatusAction;
-
-@ApplicationPath("jaxrs")
-public class ActionApplication extends AbstractActionApplication {
-
-	public Set<Class<?>> getClasses() {
-		classes.add(ComponentAction.class);
-		classes.add(StatusAction.class);
-		return classes;
-	}
-
-}

+ 0 - 10
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/ComponentJaxrsFilter.java

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

+ 0 - 10
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/StatusJaxrsFilter.java

@@ -1,10 +0,0 @@
-package com.x.component.assemble.control.jaxrs;
-
-import javax.servlet.annotation.WebFilter;
-
-import com.x.base.core.project.jaxrs.ManagerUserJaxrsFilter;
-
-@WebFilter(urlPatterns = { "/jaxrs/status/*" }, asyncSupported = true)
-public class StatusJaxrsFilter extends ManagerUserJaxrsFilter {
-
-}

+ 0 - 13
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionBase.java

@@ -1,13 +0,0 @@
-package com.x.component.assemble.control.jaxrs.component;
-
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.component.core.entity.Component;
-
-import net.sf.ehcache.Ehcache;
-
-class ActionBase extends StandardJaxrsAction {
-
-	Ehcache cache = ApplicationCache.instance().getCache(Component.class);
-
-}

+ 0 - 52
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionCreate.java

@@ -1,52 +0,0 @@
-package com.x.component.assemble.control.jaxrs.component;
-
-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.entity.annotation.CheckPersistType;
-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.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.WrapBoolean;
-import com.x.base.core.project.tools.ListTools;
-import com.x.component.assemble.control.Business;
-import com.x.component.core.entity.Component;
-
-class ActionCreate extends ActionBase {
-	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);
-			if (!business.editable(effectivePerson)) {
-				throw new ExceptionAccessDenied(effectivePerson);
-			}
-			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
-			Component component = Wi.copier.copy(wi);
-			component.setType(Component.TYPE_CUSTOM);
-			emc.beginTransaction(Component.class);
-			emc.persist(component, CheckPersistType.all);
-			emc.commit();
-			Wo wo = new Wo();
-			wo.setValue(true);
-			result.setData(wo);
-			ApplicationCache.notify(Component.class);
-			return result;
-		}
-	}
-
-	public static class Wi extends Component {
-
-		private static final long serialVersionUID = 8867806242224800105L;
-		static WrapCopier<Wi, Component> copier = WrapCopierFactory.wi(Wi.class, Component.class, null,
-				ListTools.toList(JpaObject.FieldsUnmodify, Component.type_FIELDNAME));
-
-	}
-
-	public static class Wo extends WrapBoolean {
-
-	}
-}

+ 0 - 47
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionDelete.java

@@ -1,47 +0,0 @@
-package com.x.component.assemble.control.jaxrs.component;
-
-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.cache.ApplicationCache;
-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.jaxrs.WrapBoolean;
-import com.x.component.assemble.control.Business;
-import com.x.component.core.entity.Component;
-
-import org.apache.commons.codec.binary.StringUtils;
-
-class ActionDelete extends ActionBase {
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
-			Business business = new Business(emc);
-			if (!business.editable(effectivePerson)) {
-				throw new ExceptionAccessDenied(effectivePerson);
-			}
-			Component component = emc.flag(flag, Component.class);
-			if (null == component) {
-				throw new ExceptionEntityNotExist(flag, Component.class);
-			}
-			if (StringUtils.equals(component.getType(),Component.TYPE_SYSTEM)) {
-				throw new ExceptionDeleteSystemComponent();
-			}
-
-			emc.beginTransaction(Component.class);
-			emc.remove(component, CheckRemoveType.all);
-			emc.commit();
-			Wo wo = new Wo();
-			wo.setValue(true);
-			result.setData(wo);
-			ApplicationCache.notify(Component.class);
-			return result;
-		}
-	}
-
-	public static class Wo extends WrapBoolean {
-
-	}
-}

+ 0 - 44
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionDeleteAll.java

@@ -1,44 +0,0 @@
-package com.x.component.assemble.control.jaxrs.component;
-
-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.cache.ApplicationCache;
-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.WrapBoolean;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.component.assemble.control.Business;
-import com.x.component.core.entity.Component;
-
-class ActionDeleteAll extends ActionBase {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionDeleteAll.class);
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
-			Business business = new Business(emc);
-			if (!business.editable(effectivePerson)) {
-				throw new ExceptionAccessDenied(effectivePerson);
-			}
-			emc.beginTransaction(Component.class);
-			for (Component o : emc.listAll(Component.class)) {
-				emc.remove(o, CheckRemoveType.all);
-			}
-			emc.commit();
-			Wo wo = new Wo();
-			wo.setValue(true);
-			result.setData(wo);
-			ApplicationCache.notify(Component.class);
-			return result;
-		}
-	}
-
-	public static class Wo extends WrapBoolean {
-
-	}
-
-}

+ 0 - 67
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionEdit.java

@@ -1,67 +0,0 @@
-package com.x.component.assemble.control.jaxrs.component;
-
-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.entity.JpaObject;
-import com.x.base.core.entity.annotation.CheckPersistType;
-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.config.Config;
-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.jaxrs.WrapBoolean;
-import com.x.base.core.project.tools.ListTools;
-import com.x.component.assemble.control.Business;
-import com.x.component.core.entity.Component;
-
-class ActionEdit extends ActionBase {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, JsonElement jsonElement) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
-			Business business = new Business(emc);
-			if (!business.editable(effectivePerson)) {
-				throw new ExceptionAccessDenied(effectivePerson);
-			}
-			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
-			Component component = emc.flag(flag, Component.class);
-			if (null == component) {
-				throw new ExceptionEntityNotExist(flag, Component.class);
-			}
-			Wi.copier.copy(wi, component);
-			List<String> names = ListTools.extractProperty(Config.components().getSystems(), "name", String.class, true,
-					true);
-			if (ListTools.contains(names, component.getName())) {
-				component.setType(Component.TYPE_SYSTEM);
-			} else {
-				component.setType(Component.TYPE_CUSTOM);
-			}
-			emc.beginTransaction(Component.class);
-			emc.persist(component, CheckPersistType.all);
-			emc.commit();
-			Wo wo = new Wo();
-			wo.setValue(true);
-			result.setData(wo);
-			ApplicationCache.notify(Component.class);
-			return result;
-		}
-	}
-
-	public static class Wi extends Component {
-
-		private static final long serialVersionUID = 8867806242224800105L;
-		static WrapCopier<Wi, Component> copier = WrapCopierFactory.wi(Wi.class, Component.class, null,
-				ListTools.toList(JpaObject.FieldsUnmodify, Component.type_FIELDNAME));
-
-	}
-
-	public static class Wo extends WrapBoolean {
-
-	}
-}

+ 0 - 35
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionGet.java

@@ -1,35 +0,0 @@
-package com.x.component.assemble.control.jaxrs.component;
-
-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.ExceptionEntityNotExist;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.component.core.entity.Component;
-
-class ActionGet extends ActionBase {
-
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<Wo> result = new ActionResult<>();
-			Component component = emc.flag(flag, Component.class);
-			if (null == component) {
-				throw new ExceptionEntityNotExist(flag, Component.class);
-			}
-			Wo wo = Wo.copier.copy(component);
-			result.setData(wo);
-			return result;
-		}
-	}
-
-	public static class Wo extends Component {
-
-		private static final long serialVersionUID = 8867806242224800105L;
-		static WrapCopier<Component, Wo> copier = WrapCopierFactory.wo(Component.class, Wo.class, null,
-				JpaObject.FieldsInvisible);
-	}
-
-}

+ 0 - 74
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ActionListAll.java

@@ -1,74 +0,0 @@
-package com.x.component.assemble.control.jaxrs.component;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
-
-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.cache.ApplicationCache;
-import com.x.base.core.project.config.Components;
-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.component.core.entity.Component;
-
-import net.sf.ehcache.Element;
-
-class ActionListAll extends ActionBase {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionListAll.class);
-
-	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			ActionResult<List<Wo>> result = new ActionResult<>();
-			String cacheKey = ApplicationCache.concreteCacheKey(this.getClass());
-			Element element = cache.get(cacheKey);
-			if (null != element && (null != element.getObjectValue())) {
-				result.setData((List<Wo>) element.getObjectValue());
-			} else {
-				final List<Wo> wos = new ArrayList<>();
-				List<Component> os = emc.listAll(Component.class);
-				os.stream().filter(o -> ListTools.contains(Components.SYSTEM_NAME_NAMES, o.getName()))
-						.sorted(Comparator.comparing(Component::getOrderNumber, Comparator.nullsLast(Integer::compareTo))
-								.thenComparing(Component::getCreateTime, Comparator.nullsLast(Date::compareTo)))
-						.forEach(o -> {
-							try {
-								wos.add(Wo.copier.copy(o));
-							} catch (Exception e) {
-								logger.error(e);
-							}
-						});
-				os.stream().filter(o -> !ListTools.contains(Components.SYSTEM_NAME_NAMES, o.getName()))
-						.sorted(Comparator.comparing(Component::getOrderNumber, Comparator.nullsLast(Integer::compareTo))
-								.thenComparing(Component::getCreateTime, Comparator.nullsLast(Date::compareTo)))
-						.forEach(o -> {
-							try {
-								wos.add(Wo.copier.copy(o));
-							} catch (Exception e) {
-								logger.error(e);
-							}
-						});
-				cache.put(new Element(cacheKey, wos));
-				result.setData(wos);
-			}
-			return result;
-		}
-	}
-
-	public static class Wo extends Component {
-
-		private static final long serialVersionUID = -340611438251489741L;
-
-		static WrapCopier<Component, Wo> copier = WrapCopierFactory.wo(Component.class, Wo.class, null,
-				JpaObject.FieldsInvisible);
-
-	}
-
-}

+ 0 - 141
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/component/ComponentAction.java

@@ -1,141 +0,0 @@
-package com.x.component.assemble.control.jaxrs.component;
-
-import java.util.List;
-
-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.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-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("component")
-@JaxrsDescribe("组件")
-public class ComponentAction extends StandardJaxrsAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ComponentAction.class);
-
-	@JaxrsMethodDescribe(value = "列示所有Component对象.", action = ActionListAll.class)
-	@GET
-	@Path("list/all")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void listAll(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
-		ActionResult<List<ActionListAll.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionListAll().execute(effectivePerson);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "获取Component对象.", action = ActionGet.class)
-	@GET
-	@Path("{flag}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@PathParam("flag") String flag) {
-		ActionResult<ActionGet.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGet().execute(effectivePerson, flag);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "创建Component对象.", action = ActionCreate.class)
-	@POST
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void create(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			JsonElement jsonElement) {
-		ActionResult<ActionCreate.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionCreate().execute(effectivePerson, jsonElement);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, jsonElement);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "更新Component对象.", action = ActionEdit.class)
-	@PUT
-	@Path("{flag}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void edit(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@PathParam("flag") String flag, JsonElement jsonElement) {
-		ActionResult<ActionEdit.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionEdit().execute(effectivePerson, flag, jsonElement);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, jsonElement);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "删除Component对象.", action = ActionDelete.class)
-	@DELETE
-	@Path("{flag}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void delete(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@PathParam("flag") String flag) {
-		ActionResult<ActionDelete.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionDelete().execute(effectivePerson, flag);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "删除所有Component,还原默认布局.", action = ActionDeleteAll.class)
-	@DELETE
-	@Path("delete/all")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void deleteAll(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
-		ActionResult<ActionDeleteAll.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionDeleteAll().execute(effectivePerson);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-}

+ 0 - 88
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/status/StatusAction.java

@@ -1,88 +0,0 @@
-package com.x.component.assemble.control.jaxrs.status;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-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 org.apache.commons.lang3.ObjectUtils;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-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.component.assemble.control.Business;
-import com.x.component.assemble.control.jaxrs.wrapout.WrapOutComponent;
-import com.x.component.core.entity.Component;
-
-@Path("status")
-public class StatusAction extends StandardJaxrsAction {
-
-	// @HttpMethodDescribe(value = "获取指定的应用信息.", response = WrapOutStatus.class)
-	@GET
-	@Path("list")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void list(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
-		ActionResult<WrapOutStatus> result = new ActionResult<>();
-		WrapOutStatus wrap = null;
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			Business business = new Business(emc);
-			wrap = new WrapOutStatus();
-			wrap.setAllowList(new ArrayList<WrapOutComponent>());
-			wrap.setDenyList(new ArrayList<WrapOutComponent>());
-			List<String> ids = business.component().listVisiable();
-			List<Component> components = new ArrayList<Component>(emc.list(Component.class, ids));
-			Collections.sort(components, new Comparator<Component>() {
-				public int compare(Component o1, Component o2) {
-					return ObjectUtils.compare(o1.getOrderNumber(), o2.getOrderNumber());
-				}
-			});
-			WrapCopier<Component, WrapOutComponent> copier = WrapCopierFactory.wo(Component.class,
-					WrapOutComponent.class, null, WrapOutComponent.Excludes);
-			for (Component o : components) {
-				WrapOutComponent wrapOutComponent = new WrapOutComponent();
-				copier.copy(o, wrapOutComponent);
-				if (this.allow(o, effectivePerson.getDistinguishedName())) {
-					wrap.getAllowList().add(wrapOutComponent);
-				} else {
-					wrap.getDenyList().add(wrapOutComponent);
-				}
-			}
-			result.setData(wrap);
-		} catch (Throwable th) {
-			th.printStackTrace();
-			result.error(th);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	private boolean allow(Component component, String person) throws Exception {
-		if ((component.getAllowList().isEmpty()) && (component.getDenyList().isEmpty())) {
-			return true;
-		}
-		if (component.getAllowList().contains(person)) {
-			return true;
-		}
-		if (component.getDenyList().contains(person)) {
-			return false;
-		}
-		return false;
-	}
-}

+ 0 - 28
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/status/WrapOutStatus.java

@@ -1,28 +0,0 @@
-package com.x.component.assemble.control.jaxrs.status;
-
-import java.util.List;
-
-import com.x.base.core.project.gson.GsonPropertyObject;
-import com.x.component.assemble.control.jaxrs.wrapout.WrapOutComponent;
-
-//@Wrap
-public class WrapOutStatus extends GsonPropertyObject {
-	private List<WrapOutComponent> allowList;
-	private List<WrapOutComponent> denyList;
-
-	public List<WrapOutComponent> getAllowList() {
-		return allowList;
-	}
-
-	public void setAllowList(List<WrapOutComponent> allowList) {
-		this.allowList = allowList;
-	}
-
-	public List<WrapOutComponent> getDenyList() {
-		return denyList;
-	}
-
-	public void setDenyList(List<WrapOutComponent> denyList) {
-		this.denyList = denyList;
-	}
-}

+ 0 - 14
o2server/x_component_assemble_control/src/main/webapp/describe/sources/com/x/component/assemble/control/jaxrs/wrapout/WrapOutComponent.java

@@ -1,14 +0,0 @@
-package com.x.component.assemble.control.jaxrs.wrapout;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.component.core.entity.Component;
-
-public class WrapOutComponent extends Component {
-
-	private static final long serialVersionUID = -4751880472257349437L;
-	public static List<String> Excludes = new ArrayList<>(JpaObject.FieldsInvisible);
-
-}

+ 6 - 5
o2server/x_console/pom.xml

@@ -1,8 +1,5 @@
 <?xml version="1.0"?>
-<project
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-	xmlns="http://maven.apache.org/POM/4.0.0"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
 		<groupId>o2oa</groupId>
@@ -24,6 +21,10 @@
 			<groupId>o2oa</groupId>
 			<artifactId>x_program_center_core_entity</artifactId>
 		</dependency>
+		<dependency>
+			<groupId>o2oa</groupId>
+			<artifactId>x_organization_core_entity</artifactId>
+		</dependency>
 		<dependency>
 			<groupId>o2oa</groupId>
 			<artifactId>x_cms_core_entity</artifactId>
@@ -36,7 +37,7 @@
 			<groupId>o2oa</groupId>
 			<artifactId>x_query_core_entity</artifactId>
 		</dependency>
-			<dependency>
+		<dependency>
 			<groupId>o2oa</groupId>
 			<artifactId>x_message_core_entity</artifactId>
 		</dependency>

+ 5 - 4
o2server/x_console/src/main/java/com/x/server/console/SchedulerBuilder.java

@@ -62,11 +62,11 @@ public class SchedulerBuilder {
 	/* 更新node节点applications 和 选择center主节点 */
 	private void registApplicationsAndVoteCenterTask(Scheduler scheduler, String scheduleGroup) throws Exception {
 		JobDetail jobDetail = JobBuilder.newJob(RegistApplicationsAndVoteCenterTask.class)
-				.withIdentity(RegistApplicationsAndVoteCenterTask.class.getName(), scheduleGroup).withDescription(Config.node())
-				.build();
+				.withIdentity(RegistApplicationsAndVoteCenterTask.class.getName(), scheduleGroup)
+				.withDescription(Config.node()).build();
 		Trigger trigger = TriggerBuilder.newTrigger()
 				.withIdentity(RegistApplicationsAndVoteCenterTask.class.getName(), scheduleGroup)
-				.withSchedule(CronScheduleBuilder.cronSchedule("*/30 * * * * ?")).build();
+				.withSchedule(CronScheduleBuilder.cronSchedule("0/15 * * * * ?")).build();
 		scheduler.scheduleJob(jobDetail, trigger);
 	}
 
@@ -77,7 +77,8 @@ public class SchedulerBuilder {
 		properties.setProperty("org.quartz.scheduler.rmi.proxy", "false");
 		properties.setProperty("org.quartz.scheduler.wrapJobExecutionInUserTransaction", "false");
 		properties.setProperty("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
-		properties.setProperty("org.quartz.threadPool.threadCount", "5");
+		// properties.setProperty("org.quartz.threadPool.threadCount", "5");
+		properties.setProperty("org.quartz.threadPool.threadCount", "50");
 		properties.setProperty("org.quartz.threadPool.threadPriority", "5");
 		properties.setProperty("org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread", "true");
 		properties.setProperty("org.quartz.jobStore.misfireThreshold", "60000");

+ 4 - 1
o2server/x_console/src/main/java/com/x/server/console/action/ActionControl.java

@@ -132,7 +132,7 @@ public class ActionControl extends ActionBase {
 
 	private static Option ecOption() {
 		return Option.builder("ec").longOpt("eraseContent").argName("type").hasArg().optionalArg(false)
-				.desc("清空实例数据,保留设计数据,type可选值 bbs cms log processPlatform message.").build();
+				.desc("清空实例数据,保留设计数据,type可选值 bbs cms log processPlatform message org.").build();
 	}
 
 	private static Option clh2Option() {
@@ -198,6 +198,9 @@ public class ActionControl extends ActionBase {
 			case "message":
 				new EraseContentMessage().execute();
 				break;
+			case "org":
+				new EraseContentOrg().execute();
+				break;
 			default:
 				logger.print("type may be processPlatform bbs cms log message.");
 		}

+ 43 - 0
o2server/x_console/src/main/java/com/x/server/console/action/EraseContentOrg.java

@@ -0,0 +1,43 @@
+package com.x.server.console.action;
+
+import javax.wsdl.Definition;
+
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.organization.core.entity.Bind;
+import com.x.organization.core.entity.Group;
+import com.x.organization.core.entity.Identity;
+import com.x.organization.core.entity.OauthCode;
+import com.x.organization.core.entity.Person;
+import com.x.organization.core.entity.PersonCard;
+import com.x.organization.core.entity.Role;
+import com.x.organization.core.entity.Unit;
+import com.x.organization.core.entity.UnitAttribute;
+import com.x.organization.core.entity.UnitDuty;
+import com.x.organization.core.entity.accredit.Empower;
+import com.x.organization.core.entity.accredit.EmpowerLog;
+
+public class EraseContentOrg extends EraseContentProcessPlatform {
+
+	private static Logger logger = LoggerFactory.getLogger(EraseContentOrg.class);
+
+	@Override
+	public boolean execute() throws Exception {
+		this.init("org", null);
+		addClass(Group.class);
+		addClass(Role.class);
+		addClass(UnitDuty.class);
+		addClass(UnitAttribute.class);
+		addClass(Unit.class);
+		addClass(PersonCard.class);
+		addClass(Bind.class);
+		addClass(Definition.class);
+		addClass(OauthCode.class);
+		addClass(Empower.class);
+		addClass(EmpowerLog.class);
+		addClass(Identity.class);
+		addClass(Person.class);
+		this.run();
+		return true;
+	}
+}

+ 3 - 2
o2server/x_console/src/main/java/com/x/server/console/node/VoteCenterEvent.java

@@ -44,8 +44,9 @@ public class VoteCenterEvent implements Event {
 					return;
 				}
 			} catch (Exception e) {
-				logger.warn("failed to connect center: {}, port: {}, sslEnable: {}.", entry.getKey(),
-						entry.getValue().getPort(), entry.getValue().getSslEnable());
+				// logger.warn("failed to connect center: {}, port: {}, sslEnable: {}.",
+				// entry.getKey(),
+				// entry.getValue().getPort(), entry.getValue().getSslEnable());
 			}
 		}
 

+ 214 - 8
o2server/x_processplatform_assemble_bam/src/main/webapp/describe/describe.json

@@ -376,7 +376,32 @@
           "formParameters": [],
           "queryParameters": [],
           "ins": [],
-          "outs": []
+          "outs": [
+            {
+              "name": "name",
+              "type": "String",
+              "isCollection": false,
+              "description": "名称"
+            },
+            {
+              "name": "value",
+              "type": "String",
+              "isCollection": false,
+              "description": "值"
+            },
+            {
+              "name": "count",
+              "type": "Long",
+              "isCollection": false,
+              "description": "数量"
+            },
+            {
+              "name": "duration",
+              "type": "Long",
+              "isCollection": false,
+              "description": "总时长"
+            }
+          ]
         },
         {
           "name": "listCountCompletedTaskByActivity",
@@ -834,7 +859,26 @@
           "formParameters": [],
           "queryParameters": [],
           "ins": [],
-          "outs": []
+          "outs": [
+            {
+              "name": "name",
+              "type": "String",
+              "isCollection": false,
+              "description": "名称"
+            },
+            {
+              "name": "value",
+              "type": "String",
+              "isCollection": false,
+              "description": "值"
+            },
+            {
+              "name": "count",
+              "type": "Long",
+              "isCollection": false,
+              "description": "数量"
+            }
+          ]
         },
         {
           "name": "listCountExpiredWorkByApplication",
@@ -962,7 +1006,26 @@
           "formParameters": [],
           "queryParameters": [],
           "ins": [],
-          "outs": []
+          "outs": [
+            {
+              "name": "name",
+              "type": "String",
+              "isCollection": false,
+              "description": "名称"
+            },
+            {
+              "name": "value",
+              "type": "String",
+              "isCollection": false,
+              "description": "值"
+            },
+            {
+              "name": "count",
+              "type": "Long",
+              "isCollection": false,
+              "description": "数量"
+            }
+          ]
         },
         {
           "name": "listCountStartTaskByActivity",
@@ -1127,7 +1190,26 @@
           "formParameters": [],
           "queryParameters": [],
           "ins": [],
-          "outs": []
+          "outs": [
+            {
+              "name": "name",
+              "type": "String",
+              "isCollection": false,
+              "description": "名称"
+            },
+            {
+              "name": "value",
+              "type": "String",
+              "isCollection": false,
+              "description": "值"
+            },
+            {
+              "name": "count",
+              "type": "Long",
+              "isCollection": false,
+              "description": "数量"
+            }
+          ]
         },
         {
           "name": "listCountStartWorkByApplication",
@@ -1380,7 +1462,26 @@
           "formParameters": [],
           "queryParameters": [],
           "ins": [],
-          "outs": []
+          "outs": [
+            {
+              "name": "application",
+              "type": "List\u003cWoApplication\u003e",
+              "isCollection": true,
+              "description": "应用分类"
+            },
+            {
+              "name": "process",
+              "type": "List\u003cWoProcess\u003e",
+              "isCollection": true,
+              "description": "分类流程"
+            },
+            {
+              "name": "activity",
+              "type": "List\u003cWoActivity\u003e",
+              "isCollection": true,
+              "description": "活动分类"
+            }
+          ]
         },
         {
           "name": "categoryTrigger",
@@ -1396,7 +1497,26 @@
           "formParameters": [],
           "queryParameters": [],
           "ins": [],
-          "outs": []
+          "outs": [
+            {
+              "name": "application",
+              "type": "List\u003cWoApplication\u003e",
+              "isCollection": true,
+              "description": "应用分类"
+            },
+            {
+              "name": "process",
+              "type": "List\u003cWoProcess\u003e",
+              "isCollection": true,
+              "description": "分类流程"
+            },
+            {
+              "name": "activity",
+              "type": "List\u003cWoActivity\u003e",
+              "isCollection": true,
+              "description": "活动分类"
+            }
+          ]
         },
         {
           "name": "organization",
@@ -1412,7 +1532,20 @@
           "formParameters": [],
           "queryParameters": [],
           "ins": [],
-          "outs": []
+          "outs": [
+            {
+              "name": "unit",
+              "type": "List\u003cWoUnit\u003e",
+              "isCollection": true,
+              "description": "按组织统计"
+            },
+            {
+              "name": "person",
+              "type": "List\u003cWoPerson\u003e",
+              "isCollection": true,
+              "description": "按个人统计"
+            }
+          ]
         },
         {
           "name": "running",
@@ -1444,7 +1577,80 @@
           "formParameters": [],
           "queryParameters": [],
           "ins": [],
-          "outs": []
+          "outs": [
+            {
+              "name": "applicationCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "应用数量"
+            },
+            {
+              "name": "processCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "流程数量"
+            },
+            {
+              "name": "taskCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "待办数量"
+            },
+            {
+              "name": "taskCompletedCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "已办数量"
+            },
+            {
+              "name": "readCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "待阅数量"
+            },
+            {
+              "name": "readCompletedCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "已阅数量"
+            },
+            {
+              "name": "workCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "工作实例数量"
+            },
+            {
+              "name": "workCompletedCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "已完成工作数量"
+            },
+            {
+              "name": "expiredTaskCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "超时待办数量"
+            },
+            {
+              "name": "expiredTaskCompletedCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "超时已办数量"
+            },
+            {
+              "name": "expiredWorkCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "超时工作数量"
+            },
+            {
+              "name": "expiredWorkCompletedCount",
+              "type": "Long",
+              "isCollection": false,
+              "description": "身份对象"
+            }
+          ]
         }
       ]
     },

+ 1 - 1
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/content/JobFactory.java

@@ -46,7 +46,7 @@ public class JobFactory extends AbstractFactory {
 			return workCompleted.getJob();
 		}
 		List<WorkCompleted> os = this.entityManagerContainer().fetchEqual(WorkCompleted.class,
-				ListTools.toList(WorkCompleted.work_FIELDNAME), WorkCompleted.work_FIELDNAME, flag);
+				ListTools.toList(WorkCompleted.job_FIELDNAME), WorkCompleted.work_FIELDNAME, flag);
 		if (ListTools.isNotEmpty(os)) {
 			return os.get(0).getJob();
 		}

+ 1 - 4
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/data/ActionUpdateWithWork.java

@@ -26,13 +26,10 @@ class ActionUpdateWithWork extends BaseAction {
 		Work work = null;
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			Audit audit = logger.audit(effectivePerson);
-			/** 防止提交空数据清空data */
+			// 防止提交空数据清空data
 			if (null == jsonElement || (!jsonElement.isJsonObject())) {
 				throw new ExceptionNotJsonObject();
 			}
-//			if (jsonElement.getAsJsonObject().entrySet().isEmpty()) {
-//				throw new ExceptionEmptyData();
-//			}
 			Business business = new Business(emc);
 			work = emc.find(id, Work.class);
 			if (null == work) {

+ 23 - 20
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Draft.java

@@ -1,22 +1,14 @@
 package com.x.processplatform.core.entity.content;
 
-import java.util.Date;
-import java.util.Objects;
-
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
+import javax.persistence.PostLoad;
 import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
-import org.apache.openjpa.persistence.Persistent;
-import org.apache.openjpa.persistence.jdbc.Index;
-import org.apache.openjpa.persistence.jdbc.Strategy;
-
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
@@ -25,6 +17,11 @@ import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.core.entity.PersistenceProperties;
 
+import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.persistence.Persistent;
+import org.apache.openjpa.persistence.jdbc.Index;
+import org.apache.openjpa.persistence.jdbc.Strategy;
+
 @Entity
 @ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Content.Draft.table, uniqueConstraints = {
@@ -55,19 +52,29 @@ public class Draft extends SliceJpaObject {
 
 	/* 更新运行方法 */
 	public void onPersist() throws Exception {
-		// do nothing
+		if (StringTools.utf8Length(this.getProperties().getTitle()) > length_255B) {
+			this.title = StringTools.utf8SubString(this.getProperties().getTitle(), length_255B - 3) + "...";
+		}
 	}
 
-	public void setTitle(String title) {
-		if (StringTools.utf8Length(title) > length_255B) {
-			this.title = StringTools.utf8SubString(this.title, 252) + "...";
-		} else {
-			this.title = Objects.toString(title, "");
+	@PostLoad
+	public void postLoad() {
+		if ((null != this.properties) && StringUtils.isNotEmpty(this.getProperties().getTitle())) {
+			this.title = this.getProperties().getTitle();
 		}
 	}
 
-	public Draft() {
+	public void setTitle(String title) {
+		this.title = title;
+		this.getProperties().setTitle(title);
+	}
+
+	public String getTitle() {
+		return this.title;
+	}
 
+	public Draft() {
+		// nothing
 	}
 
 	public DraftProperties getProperties() {
@@ -163,10 +170,6 @@ public class Draft extends SliceJpaObject {
 		this.process = process;
 	}
 
-	public String getTitle() {
-		return title;
-	}
-
 	public String getIdentity() {
 		return identity;
 	}

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

@@ -6,6 +6,8 @@ public class DraftProperties extends JsonProperties {
 
     private Data data = new Data();
 
+    private String title;
+
     public Data getData() {
         return data;
     }
@@ -14,4 +16,12 @@ public class DraftProperties extends JsonProperties {
         this.data = data;
     }
 
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
 }

+ 31 - 26
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Read.java

@@ -1,7 +1,6 @@
 package com.x.processplatform.core.entity.content;
 
 import java.util.Date;
-import java.util.Objects;
 
 import javax.persistence.Basic;
 import javax.persistence.Column;
@@ -13,16 +12,12 @@ import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Lob;
+import javax.persistence.PostLoad;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
-import org.apache.commons.lang3.StringUtils;
-import org.apache.openjpa.persistence.Persistent;
-import org.apache.openjpa.persistence.jdbc.Index;
-import org.apache.openjpa.persistence.jdbc.Strategy;
-
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
@@ -33,6 +28,11 @@ import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.core.entity.PersistenceProperties;
 import com.x.processplatform.core.entity.element.ActivityType;
 
+import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.persistence.Persistent;
+import org.apache.openjpa.persistence.jdbc.Index;
+import org.apache.openjpa.persistence.jdbc.Strategy;
+
 @Entity
 @ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Content.Read.table, uniqueConstraints = {
@@ -66,33 +66,42 @@ public class Read extends SliceJpaObject implements ProjectionInterface {
 		if (StringUtils.isEmpty(this.startTimeMonth) && (null != this.startTime)) {
 			this.startTimeMonth = DateTools.format(this.startTime, DateTools.format_yyyyMM);
 		}
-		if (StringTools.utf8Length(this.getOpinion()) > length_255B) {
-			this.opinionLob = this.getOpinion();
-			this.opinion = StringTools.utf8SubString(this.getOpinion(), length_255B);
-		} else {
-			this.opinion = Objects.toString(this.getOpinion(), "");
-			this.opinionLob = null;
+		if (StringTools.utf8Length(this.getProperties().getTitle()) > length_255B) {
+			this.title = StringTools.utf8SubString(this.getProperties().getTitle(), length_255B - 3) + "...";
+		}
+		if (StringTools.utf8Length(this.getProperties().getOpinion()) > length_255B) {
+			this.opinion = StringTools.utf8SubString(this.getProperties().getOpinion(), length_255B - 3) + "...";
+		}
+	}
+
+	@PostLoad
+	public void postLoad() {
+		if (null != this.properties) {
+			if (StringUtils.isNotEmpty(this.getProperties().getTitle())) {
+				this.title = this.getProperties().getTitle();
+			}
+			if (StringUtils.isNotEmpty(this.getProperties().getOpinion())) {
+				this.opinion = this.getProperties().getOpinion();
+			}
 		}
 	}
 
 	public void setOpinion(String opinion) {
 		this.opinion = opinion;
+		this.getProperties().setOpinion(opinion);
 	}
 
 	public String getOpinion() {
-		if (StringUtils.isNotEmpty(this.opinionLob)) {
-			return this.opinionLob;
-		} else {
-			return this.opinion;
-		}
+		return this.opinion;
 	}
 
 	public void setTitle(String title) {
-		if (StringTools.utf8Length(title) > length_255B) {
-			this.title = StringTools.utf8SubString(this.title, 252) + "...";
-		} else {
-			this.title = Objects.toString(title, "");
-		}
+		this.title = title;
+		this.getProperties().setTitle(title);
+	}
+
+	public String getTitle() {
+		return this.title;
 	}
 
 	public Read() {
@@ -622,10 +631,6 @@ public class Read extends SliceJpaObject implements ProjectionInterface {
 		this.work = work;
 	}
 
-	public String getTitle() {
-		return title;
-	}
-
 	public String getIdentity() {
 		return identity;
 	}

+ 33 - 33
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/ReadCompleted.java

@@ -1,7 +1,6 @@
 package com.x.processplatform.core.entity.content;
 
 import java.util.Date;
-import java.util.Objects;
 
 import javax.persistence.Basic;
 import javax.persistence.Column;
@@ -13,16 +12,12 @@ import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Lob;
+import javax.persistence.PostLoad;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
-import org.apache.commons.lang3.StringUtils;
-import org.apache.openjpa.persistence.Persistent;
-import org.apache.openjpa.persistence.jdbc.Index;
-import org.apache.openjpa.persistence.jdbc.Strategy;
-
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
@@ -33,6 +28,11 @@ import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.core.entity.PersistenceProperties;
 import com.x.processplatform.core.entity.element.ActivityType;
 
+import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.persistence.Persistent;
+import org.apache.openjpa.persistence.jdbc.Index;
+import org.apache.openjpa.persistence.jdbc.Strategy;
+
 /**
  * 没有多值字段
  * 
@@ -73,33 +73,42 @@ public class ReadCompleted extends SliceJpaObject implements ProjectionInterface
 		if (StringUtils.isEmpty(this.completedTimeMonth) && (null != this.completedTime)) {
 			this.completedTimeMonth = DateTools.format(this.completedTime, DateTools.format_yyyyMM);
 		}
-		if (StringTools.utf8Length(this.getOpinion()) > length_255B) {
-			this.opinionLob = this.getOpinion();
-			this.opinion = StringTools.utf8SubString(this.getOpinion(), length_255B);
-		} else {
-			this.opinion = Objects.toString(this.getOpinion(), "");
-			this.opinionLob = null;
+		if (StringTools.utf8Length(this.getProperties().getTitle()) > length_255B) {
+			this.title = StringTools.utf8SubString(this.getProperties().getTitle(), length_255B - 3) + "...";
+		}
+		if (StringTools.utf8Length(this.getProperties().getOpinion()) > length_255B) {
+			this.opinion = StringTools.utf8SubString(this.getProperties().getOpinion(), length_255B - 3) + "...";
+		}
+	}
+
+	@PostLoad
+	public void postLoad() {
+		if (null != this.properties) {
+			if (StringUtils.isNotEmpty(this.getProperties().getTitle())) {
+				this.title = this.getProperties().getTitle();
+			}
+			if (StringUtils.isNotEmpty(this.getProperties().getOpinion())) {
+				this.opinion = this.getProperties().getOpinion();
+			}
 		}
 	}
 
 	public void setOpinion(String opinion) {
 		this.opinion = opinion;
+		this.getProperties().setOpinion(opinion);
 	}
 
 	public String getOpinion() {
-		if (StringUtils.isNotEmpty(this.opinionLob)) {
-			return this.opinionLob;
-		} else {
-			return this.opinion;
-		}
+		return this.opinion;
 	}
 
 	public void setTitle(String title) {
-		if (StringTools.utf8Length(title) > length_255B) {
-			this.title = StringTools.utf8SubString(this.title, 252) + "...";
-		} else {
-			this.title = Objects.toString(title, "");
-		}
+		this.title = title;
+		this.getProperties().setTitle(title);
+	}
+
+	public String getTitle() {
+		return this.title;
 	}
 
 	/* 更新运行方法 */
@@ -115,6 +124,7 @@ public class ReadCompleted extends SliceJpaObject implements ProjectionInterface
 		this.workCompleted = read.getWorkCompleted();
 		this.completed = read.getCompleted();
 		this.read = read.getId();
+		// 必须使用setTitle赋值
 		this.setTitle(read.getTitle());
 		this.application = read.getApplication();
 		this.applicationName = read.getApplicationName();
@@ -140,7 +150,7 @@ public class ReadCompleted extends SliceJpaObject implements ProjectionInterface
 		this.startTimeMonth = read.getStartTimeMonth();
 		this.completedTime = completedTime;
 		this.duration = duration;
-		/** 必须使用set方法,执行opinion的判断 */
+		// 必须使用setOpinion赋值
 		this.setOpinion(read.getOpinion());
 		this.copyProjectionFields(read);
 	}
@@ -264,12 +274,6 @@ public class ReadCompleted extends SliceJpaObject implements ProjectionInterface
 	@CheckPersist(allowEmpty = false)
 	private String unit;
 
-//	public static final String opinionGroup_FIELDNAME = "opinionGroup";
-//	@FieldDescribe("意见分组")
-//	@CheckPersist(allowEmpty = true)
-//	@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + opinionGroup_FIELDNAME)
-//	private String opinionGroup;
-
 	public static final String opinion_FIELDNAME = "opinion";
 	@FieldDescribe("处理意见.")
 	@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + opinion_FIELDNAME)
@@ -658,10 +662,6 @@ public class ReadCompleted extends SliceJpaObject implements ProjectionInterface
 		this.completed = completed;
 	}
 
-	public String getTitle() {
-		return title;
-	}
-
 	public String getApplication() {
 		return application;
 	}

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

@@ -1,7 +1,29 @@
 package com.x.processplatform.core.entity.content;
 
 import com.x.base.core.entity.JsonProperties;
+import com.x.base.core.project.annotation.FieldDescribe;
 
 public class ReadCompletedProperties extends JsonProperties {
 
+    @FieldDescribe("标题")
+    private String title;
+
+    @FieldDescribe("意见")
+    private String opinion;
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getOpinion() {
+        return opinion;
+    }
+
+    public void setOpinion(String opinion) {
+        this.opinion = opinion;
+    }
 }

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

@@ -1,7 +1,30 @@
 package com.x.processplatform.core.entity.content;
 
 import com.x.base.core.entity.JsonProperties;
+import com.x.base.core.project.annotation.FieldDescribe;
 
 public class ReadProperties extends JsonProperties {
 
+    @FieldDescribe("标题")
+    private String title;
+
+    @FieldDescribe("意见")
+    private String opinion;
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getOpinion() {
+        return opinion;
+    }
+
+    public void setOpinion(String opinion) {
+        this.opinion = opinion;
+    }
+
 }

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

@@ -136,24 +136,6 @@ public class Record extends SliceJpaObject {
 		this.getProperties().setEmpowerFromIdentity(task.getEmpowerFromIdentity());
 	}
 
-	// public Record(Work work) {
-	// this();
-	// this.setApplication(work.getApplication());
-	// this.setProcess(work.getProcess());
-	// this.setWork(work.getId());
-	// this.setJob(work.getJob());
-	// this.setDisplay(true);
-	// this.setCompleted(false);
-	// this.setFromActivity(work.getActivity());
-	// this.setFromActivityType(work.getActivityType());
-	// this.setFromActivityName(work.getActivityName());
-	// this.setFromActivityAlias(work.getActivityAlias());
-	// this.setFromActivityToken(work.getActivityToken());
-	//// this.getProperties().setOpinion("");
-	//// this.getProperties().setRouteName(task.getRouteName());
-	//// this.getProperties().setMediaOpinion(task.getMediaOpinion());
-	// }
-
 	public Record(WorkLog workLog) {
 		this();
 		this.setApplication(workLog.getApplication());

+ 23 - 15
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Review.java

@@ -1,23 +1,18 @@
 package com.x.processplatform.core.entity.content;
 
 import java.util.Date;
-import java.util.Objects;
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
+import javax.persistence.PostLoad;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
-import org.apache.commons.lang3.StringUtils;
-import org.apache.openjpa.persistence.Persistent;
-import org.apache.openjpa.persistence.jdbc.Index;
-import org.apache.openjpa.persistence.jdbc.Strategy;
-
 import com.x.base.core.entity.AbstractPersistenceProperties;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
@@ -28,6 +23,11 @@ import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.core.entity.PersistenceProperties;
 
+import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.persistence.Persistent;
+import org.apache.openjpa.persistence.jdbc.Index;
+import org.apache.openjpa.persistence.jdbc.Strategy;
+
 @Entity
 @ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Content.Review.table, uniqueConstraints = {
@@ -63,16 +63,28 @@ public class Review extends SliceJpaObject implements ProjectionInterface {
 		if (StringUtils.isEmpty(this.completedTimeMonth) && (null != this.completedTime)) {
 			this.completedTimeMonth = DateTools.format(this.completedTime, DateTools.format_yyyyMM);
 		}
+
+		if (StringTools.utf8Length(this.getProperties().getTitle()) > length_255B) {
+			this.title = StringTools.utf8SubString(this.getProperties().getTitle(), length_255B - 3) + "...";
+		}
 	}
 
-	public void setTitle(String title) {
-		if (StringTools.utf8Length(title) > length_255B) {
-			this.title = StringTools.utf8SubString(this.title, 252) + "...";
-		} else {
-			this.title = Objects.toString(title, "");
+	@PostLoad
+	public void postLoad() {
+		if ((null != this.properties) && StringUtils.isNotEmpty(this.getProperties().getTitle())) {
+			this.title = this.getProperties().getTitle();
 		}
 	}
 
+	public void setTitle(String title) {
+		this.title = title;
+		this.getProperties().setTitle(title);
+	}
+
+	public String getTitle() {
+		return this.title;
+	}
+
 	/* 更新运行方法 */
 
 	public Review() {
@@ -544,10 +556,6 @@ public class Review extends SliceJpaObject implements ProjectionInterface {
 		this.work = work;
 	}
 
-	public String getTitle() {
-		return title;
-	}
-
 	public String getJob() {
 		return job;
 	}

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

@@ -1,7 +1,19 @@
 package com.x.processplatform.core.entity.content;
 
 import com.x.base.core.entity.JsonProperties;
+import com.x.base.core.project.annotation.FieldDescribe;
 
 public class ReviewProperties extends JsonProperties {
 
+    @FieldDescribe("标题")
+    private String title;
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
 }

+ 34 - 52
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Task.java

@@ -4,7 +4,6 @@ import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.Date;
 import java.util.List;
-import java.util.Objects;
 
 import javax.persistence.Basic;
 import javax.persistence.Column;
@@ -17,20 +16,12 @@ import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Lob;
 import javax.persistence.OrderColumn;
+import javax.persistence.PostLoad;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
-import org.apache.commons.lang3.StringUtils;
-import org.apache.openjpa.persistence.Persistent;
-import org.apache.openjpa.persistence.PersistentCollection;
-import org.apache.openjpa.persistence.jdbc.ContainerTable;
-import org.apache.openjpa.persistence.jdbc.ElementColumn;
-import org.apache.openjpa.persistence.jdbc.Index;
-import org.apache.openjpa.persistence.jdbc.Strategy;
-
-import com.google.gson.annotations.SerializedName;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
@@ -43,6 +34,14 @@ import com.x.processplatform.core.entity.PersistenceProperties;
 import com.x.processplatform.core.entity.element.ActivityType;
 import com.x.processplatform.core.entity.element.Route;
 
+import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.persistence.Persistent;
+import org.apache.openjpa.persistence.PersistentCollection;
+import org.apache.openjpa.persistence.jdbc.ContainerTable;
+import org.apache.openjpa.persistence.jdbc.ElementColumn;
+import org.apache.openjpa.persistence.jdbc.Index;
+import org.apache.openjpa.persistence.jdbc.Strategy;
+
 @Entity
 @ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Content.Task.table, uniqueConstraints = {
@@ -74,33 +73,42 @@ public class Task extends SliceJpaObject implements ProjectionInterface {
 		if (StringUtils.isEmpty(this.startTimeMonth) && (null != this.startTime)) {
 			this.startTimeMonth = DateTools.format(this.startTime, DateTools.format_yyyyMM);
 		}
-		if (StringTools.utf8Length(this.getOpinion()) > length_255B) {
-			this.opinionLob = this.getOpinion();
-			this.opinion = StringTools.utf8SubString(this.getOpinion(), length_255B);
-		} else {
-			this.opinion = Objects.toString(this.getOpinion(), "");
-			this.opinionLob = null;
+		if (StringTools.utf8Length(this.getProperties().getTitle()) > length_255B) {
+			this.title = StringTools.utf8SubString(this.getProperties().getTitle(), length_255B - 3) + "...";
+		}
+		if (StringTools.utf8Length(this.getProperties().getOpinion()) > length_255B) {
+			this.opinion = StringTools.utf8SubString(this.getProperties().getOpinion(), length_255B - 3) + "...";
+		}
+	}
+
+	@PostLoad
+	public void postLoad() {
+		if (null != this.properties) {
+			if (StringUtils.isNotEmpty(this.getProperties().getTitle())) {
+				this.title = this.getProperties().getTitle();
+			}
+			if (StringUtils.isNotEmpty(this.getProperties().getOpinion())) {
+				this.opinion = this.getProperties().getOpinion();
+			}
 		}
 	}
 
 	public void setOpinion(String opinion) {
 		this.opinion = opinion;
+		this.getProperties().setOpinion(opinion);
 	}
 
 	public String getOpinion() {
-		if (StringUtils.isNotEmpty(this.opinionLob)) {
-			return this.opinionLob;
-		} else {
-			return this.opinion;
-		}
+		return this.opinion;
 	}
 
 	public void setTitle(String title) {
-		if (StringTools.utf8Length(title) > length_255B) {
-			this.title = StringTools.utf8SubString(this.title, length_255B - 3) + "...";
-		} else {
-			this.title = Objects.toString(title, "");
-		}
+		this.title = title;
+		this.getProperties().setTitle(title);
+	}
+
+	public String getTitle() {
+		return this.title;
 	}
 
 	/* 更新运行方法 */
@@ -141,11 +149,6 @@ public class Task extends SliceJpaObject implements ProjectionInterface {
 		if (ListTools.isNotEmpty(routes)) {
 			routes.stream().sorted(Comparator.comparing(Route::getOrderNumber, Comparator.nullsLast(Integer::compareTo))
 					.thenComparing(Route::getUpdateTime, Date::compareTo)).forEach(o -> {
-//						this.getProperties().getRouteList().add(o.getId());
-//						this.getProperties().getRouteNameList().add(o.getName());
-//						this.getProperties().getRouteOpinionList().add(StringUtils.trimToEmpty(o.getOpinion()));
-//						this.getProperties().getRouteDecisionOpinionList()
-//								.add(StringUtils.trimToEmpty(o.getDecisionOpinion()));
 						this.routeList.add(o.getId());
 						this.routeNameList.add(o.getName());
 						this.routeOpinionList.add(StringUtils.trimToEmpty(o.getOpinion()));
@@ -733,11 +736,6 @@ public class Task extends SliceJpaObject implements ProjectionInterface {
 		this.work = work;
 	}
 
-	// @SerializedName("title")
-	public String getTitle() {
-		return title;
-	}
-
 	public String getIdentity() {
 		return identity;
 	}
@@ -762,14 +760,6 @@ public class Task extends SliceJpaObject implements ProjectionInterface {
 		this.activityName = activityName;
 	}
 
-//	public List<String> getRouteList() {
-//		return routeList;
-//	}
-//
-//	public void setRouteList(List<String> routeList) {
-//		this.routeList = routeList;
-//	}
-
 	public Date getStartTime() {
 		return startTime;
 	}
@@ -810,14 +800,6 @@ public class Task extends SliceJpaObject implements ProjectionInterface {
 		this.person = person;
 	}
 
-//	public List<String> getRouteNameList() {
-//		return routeNameList;
-//	}
-//
-//	public void setRouteNameList(List<String> routeNameList) {
-//		this.routeNameList = routeNameList;
-//	}
-
 	public String getApplication() {
 		return application;
 	}

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

@@ -13,17 +13,12 @@ import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Lob;
+import javax.persistence.PostLoad;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
-import org.apache.commons.lang3.BooleanUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.openjpa.persistence.Persistent;
-import org.apache.openjpa.persistence.jdbc.Index;
-import org.apache.openjpa.persistence.jdbc.Strategy;
-
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
@@ -36,6 +31,12 @@ import com.x.processplatform.core.entity.PersistenceProperties;
 import com.x.processplatform.core.entity.element.ActivityType;
 import com.x.processplatform.core.entity.element.Route;
 
+import org.apache.commons.lang3.BooleanUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.persistence.Persistent;
+import org.apache.openjpa.persistence.jdbc.Index;
+import org.apache.openjpa.persistence.jdbc.Strategy;
+
 /**
  * 没有多值字段
  * 
@@ -55,7 +56,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 	private static final String TABLE = PersistenceProperties.Content.TaskCompleted.table;
 
 	/* 继续流转 */
-//	private static final String PROCESSINGTYPE_processing = "processing";
 	public static final String PROCESSINGTYPE_TASK = "task";
 	/* 开始 */
 	public static final String PROCESSINGTYPE_START = "start";
@@ -106,29 +106,41 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 		if (null == this.routeName) {
 			this.routeName = "";
 		}
-		if (StringTools.utf8Length(this.getOpinion()) > length_255B) {
-			this.opinionLob = this.getOpinion();
-			this.opinion = StringTools.utf8SubString(this.getOpinion(), length_255B);
-		} else {
-			this.opinion = Objects.toString(this.getOpinion(), "");
-			this.opinionLob = null;
-		}
 		if (Objects.isNull(this.processingType)) {
 			this.processingType = PROCESSINGTYPE_TASK;
 		}
 		switch (this.processingType) {
-		case PROCESSINGTYPE_APPENDTASK:
-		case PROCESSINGTYPE_BEAPPENDEDTASK:
-		case PROCESSINGTYPE_REROUTE:
-		case PROCESSINGTYPE_RETRACT:
-		case PROCESSINGTYPE_ROLLBACK:
-		case PROCESSINGTYPE_EMPOWER:
-		case PROCESSINGTYPE_RESET:
-			this.joinInquire = false;
-			break;
-		default:
-			this.joinInquire = true;
-			break;
+			case PROCESSINGTYPE_APPENDTASK:
+			case PROCESSINGTYPE_BEAPPENDEDTASK:
+			case PROCESSINGTYPE_REROUTE:
+			case PROCESSINGTYPE_RETRACT:
+			case PROCESSINGTYPE_ROLLBACK:
+			case PROCESSINGTYPE_EMPOWER:
+			case PROCESSINGTYPE_RESET:
+				this.joinInquire = false;
+				break;
+			default:
+				this.joinInquire = true;
+				break;
+		}
+
+		if (StringTools.utf8Length(this.getProperties().getTitle()) > length_255B) {
+			this.title = StringTools.utf8SubString(this.getProperties().getTitle(), length_255B - 3) + "...";
+		}
+		if (StringTools.utf8Length(this.getProperties().getOpinion()) > length_255B) {
+			this.opinion = StringTools.utf8SubString(this.getProperties().getOpinion(), length_255B - 3) + "...";
+		}
+	}
+
+	@PostLoad
+	public void postLoad() {
+		if (null != this.properties) {
+			if (StringUtils.isNotEmpty(this.getProperties().getTitle())) {
+				this.title = this.getProperties().getTitle();
+			}
+			if (StringUtils.isNotEmpty(this.getProperties().getOpinion())) {
+				this.opinion = this.getProperties().getOpinion();
+			}
 		}
 	}
 
@@ -142,22 +154,20 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 
 	public void setOpinion(String opinion) {
 		this.opinion = opinion;
+		this.getProperties().setOpinion(opinion);
 	}
 
 	public String getOpinion() {
-		if (StringUtils.isNotEmpty(this.opinionLob)) {
-			return this.opinionLob;
-		} else {
-			return this.opinion;
-		}
+		return this.opinion;
 	}
 
 	public void setTitle(String title) {
-		if (StringTools.utf8Length(title) > length_255B) {
-			this.title = StringTools.utf8SubString(this.title, 252) + "...";
-		} else {
-			this.title = Objects.toString(title, "");
-		}
+		this.title = title;
+		this.getProperties().setTitle(title);
+	}
+
+	public String getTitle() {
+		return this.title;
 	}
 
 	/* 更新运行方法 */
@@ -288,12 +298,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 		this.duration = duration;
 		this.processingType = processingType;
 		/* 必须使用set方法,执行opinion的判断 */
-//		if (StringUtils.isEmpty(task.getOpinion())) {
-//			this.setOpinion(StringUtils.trimToEmpty(
-//					ListTools.parallel(task.getRouteNameList(), task.getRouteName(), task.getRouteOpinionList())));
-//		} else {
-//			this.setOpinion(task.getOpinion());
-//		}
 		this.setOpinion(task.getOpinion());
 		this.copyProjectionFields(task);
 		this.empowerFromIdentity = task.getEmpowerFromIdentity();
@@ -535,12 +539,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 	@CheckPersist(allowEmpty = true)
 	private String routeName;
 
-//	public static final String opinionGroup_FIELDNAME = "opinionGroup";
-//	@FieldDescribe("意见分组")
-//	@CheckPersist(allowEmpty = true)
-//	@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + opinionGroup_FIELDNAME)
-//	private String opinionGroup;
-
 	public static final String opinion_FIELDNAME = "opinion";
 	@FieldDescribe("处理意见.")
 	@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + opinion_FIELDNAME)
@@ -575,14 +573,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 	@CheckPersist(allowEmpty = false)
 	private Long duration;
 
-//	public static final String processingType_FIELDNAME = "processingType";
-//	@FieldDescribe("流程流转类型")
-//	@Enumerated(EnumType.STRING)
-//	@Column(length = ProcessingType.length, name = ColumnNamePrefix + processingType_FIELDNAME)
-//	@Index(name = TABLE + IndexNameMiddle + processingType_FIELDNAME)
-//	@CheckPersist(allowEmpty = false)
-//	private ProcessingType processingType;
-
 	public static final String processingType_FIELDNAME = "processingType";
 	@FieldDescribe("流程流转类型")
 	@Column(length = JpaObject.length_16B, name = ColumnNamePrefix + processingType_FIELDNAME)
@@ -643,14 +633,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 	@CheckPersist(allowEmpty = true)
 	private Boolean joinInquire;
 
-//	public static final String nextTaskIdentityListText_FIELDNAME = "nextTaskIdentityListText";
-//	@FieldDescribe("下一环节处理人记录,记录前台处理待办产生的提示.")
-//	@Lob
-//	@Basic(fetch = FetchType.EAGER)
-//	@Column(length = JpaObject.length_1M, name = ColumnNamePrefix + nextTaskIdentityListText_FIELDNAME)
-//	@CheckPersist(allowEmpty = true)
-//	private String nextTaskIdentityListText;
-
 	public static final String properties_FIELDNAME = "properties";
 	@FieldDescribe("属性对象存储字段.")
 	@Persistent
@@ -893,10 +875,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 		this.job = job;
 	}
 
-	public String getTitle() {
-		return title;
-	}
-
 	public Date getStartTime() {
 		return startTime;
 	}
@@ -1077,14 +1055,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 		this.activityType = activityType;
 	}
 
-	// public ManualMode getManualMode() {
-	// return manualMode;
-	// }
-	//
-	// public void setManualMode(ManualMode manualMode) {
-	// this.manualMode = manualMode;
-	// }
-
 	public String getStartTimeMonth() {
 		return startTimeMonth;
 	}
@@ -1093,14 +1063,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
 		this.startTimeMonth = startTimeMonth;
 	}
 
-//	public ProcessingType getProcessingType() {
-//		return processingType;
-//	}
-//
-//	public void setProcessingType(ProcessingType processingType) {
-//		this.processingType = processingType;
-//	}
-
 	public String getSerial() {
 		return serial;
 	}

+ 23 - 1
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/TaskCompletedProperties.java

@@ -11,9 +11,23 @@ public class TaskCompletedProperties extends JsonProperties {
 	@FieldDescribe("从task带过来的上一处理人")
 	private List<String> prevTaskIdentityList;
 
-	@FieldDescribe("从手续处理人")
+	@FieldDescribe("续处理人")
 	private List<String> nextTaskIdentityList = new ArrayList<>();
 
+	@FieldDescribe("标题")
+	private String title;
+
+	@FieldDescribe("意见")
+	private String opinion;
+
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
 	public List<String> getPrevTaskIdentityList() {
 		if (null == this.prevTaskIdentityList) {
 			this.prevTaskIdentityList = new ArrayList<>();
@@ -36,4 +50,12 @@ public class TaskCompletedProperties extends JsonProperties {
 		this.prevTaskIdentityList = prevTaskIdentityList;
 	}
 
+	public String getOpinion() {
+		return opinion;
+	}
+
+	public void setOpinion(String opinion) {
+		this.opinion = opinion;
+	}
+
 }

+ 20 - 46
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/TaskProperties.java

@@ -4,43 +4,17 @@ import java.util.ArrayList;
 import java.util.List;
 
 import com.x.base.core.entity.JsonProperties;
+import com.x.base.core.project.annotation.FieldDescribe;
 
 public class TaskProperties extends JsonProperties {
 
 	private List<String> prevTaskIdentityList;
 
-//	private List<String> routeList;
-//	private List<String> routeNameList;
-//	private List<String> routeOpinionList;
-//	private List<String> routeDecisionOpinionList;
+	@FieldDescribe("标题")
+	private String title;
 
-//	public List<String> getRouteDecisionOpinionList() {
-//		if (null == routeDecisionOpinionList) {
-//			routeDecisionOpinionList = new ArrayList<String>();
-//		}
-//		return routeDecisionOpinionList;
-//	}
-//
-//	public List<String> getRouteOpinionList() {
-//		if (null == routeOpinionList) {
-//			routeOpinionList = new ArrayList<String>();
-//		}
-//		return routeOpinionList;
-//	}
-//
-//	public List<String> getRouteNameList() {
-//		if (null == routeNameList) {
-//			routeNameList = new ArrayList<String>();
-//		}
-//		return routeNameList;
-//	}
-//
-//	public List<String> getRouteList() {
-//		if (null == routeList) {
-//			routeList = new ArrayList<String>();
-//		}
-//		return routeList;
-//	}
+	@FieldDescribe("意见")
+	private String opinion;
 
 	public List<String> getPrevTaskIdentityList() {
 		if (null == prevTaskIdentityList) {
@@ -53,20 +27,20 @@ public class TaskProperties extends JsonProperties {
 		this.prevTaskIdentityList = prevTaskIdentityList;
 	}
 
-//	public void setRouteList(List<String> routeList) {
-//		this.routeList = routeList;
-//	}
-//
-//	public void setRouteNameList(List<String> routeNameList) {
-//		this.routeNameList = routeNameList;
-//	}
-//
-//	public void setRouteOpinionList(List<String> routeOpinionList) {
-//		this.routeOpinionList = routeOpinionList;
-//	}
-//
-//	public void setRouteDecisionOpinionList(List<String> routeDecisionOpinionList) {
-//		this.routeDecisionOpinionList = routeDecisionOpinionList;
-//	}
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	public String getOpinion() {
+		return opinion;
+	}
+
+	public void setOpinion(String opinion) {
+		this.opinion = opinion;
+	}
 
 }

+ 50 - 34
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Work.java

@@ -15,20 +15,12 @@ import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Lob;
 import javax.persistence.OrderColumn;
+import javax.persistence.PostLoad;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
-import org.apache.commons.lang3.StringUtils;
-import org.apache.openjpa.persistence.Persistent;
-import org.apache.openjpa.persistence.PersistentCollection;
-import org.apache.openjpa.persistence.jdbc.ContainerTable;
-import org.apache.openjpa.persistence.jdbc.ElementColumn;
-import org.apache.openjpa.persistence.jdbc.ElementIndex;
-import org.apache.openjpa.persistence.jdbc.Index;
-import org.apache.openjpa.persistence.jdbc.Strategy;
-
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
@@ -42,6 +34,15 @@ import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.core.entity.PersistenceProperties;
 import com.x.processplatform.core.entity.element.ActivityType;
 
+import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.persistence.Persistent;
+import org.apache.openjpa.persistence.PersistentCollection;
+import org.apache.openjpa.persistence.jdbc.ContainerTable;
+import org.apache.openjpa.persistence.jdbc.ElementColumn;
+import org.apache.openjpa.persistence.jdbc.ElementIndex;
+import org.apache.openjpa.persistence.jdbc.Index;
+import org.apache.openjpa.persistence.jdbc.Strategy;
+
 @Entity
 @ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Content.Work.table, uniqueConstraints = {
@@ -53,7 +54,7 @@ public class Work extends SliceJpaObject implements ProjectionInterface {
 
 	private static final long serialVersionUID = 7668822947307502058L;
 	private static final String TABLE = PersistenceProperties.Content.Work.table;
-
+	public static final String TITLEALIAS_SUBJECT = "subject";
 	public static final String WORKCREATETYPE_SURFACE = "surface";
 	public static final String WORKCREATETYPE_ASSIGN = "assign";
 
@@ -77,14 +78,11 @@ public class Work extends SliceJpaObject implements ProjectionInterface {
 			this.startTimeMonth = DateTools.format(this.startTime, DateTools.format_yyyyMM);
 		}
 		this.serial = Objects.toString(this.serial, "");
-		if (StringTools.utf8Length(title) > length_255B) {
-			this.title = StringTools.utf8SubString(title, length_255B);
-			this.titleLob = title;
-		} else {
-			this.title = Objects.toString(this.title, "");
-			this.titleLob = null;
+		// add by Ray 20200622
+		if (StringTools.utf8Length(this.getProperties().getTitle()) > length_255B) {
+			this.title = StringTools.utf8SubString(this.getProperties().getTitle(), length_255B - 3) + "...";
 		}
-		/* 填入处理人文本 */
+		// 填入处理人文本
 		if (ListTools.isEmpty(this.manualTaskIdentityList)) {
 			this.manualTaskIdentityText = "";
 		} else {
@@ -93,6 +91,14 @@ public class Work extends SliceJpaObject implements ProjectionInterface {
 			this.setManualTaskIdentityText(text);
 		}
 	}
+
+	@PostLoad
+	public void postLoad() {
+		if ((null != this.properties) && StringUtils.isNotEmpty(this.getProperties().getTitle())) {
+			this.title = this.getProperties().getTitle();
+		}
+	}
+
 	/* 更新运行方法 */
 
 	public Work() {
@@ -121,16 +127,25 @@ public class Work extends SliceJpaObject implements ProjectionInterface {
 		return this.properties;
 	}
 
+	// public void setTitle(String title) {
+	// this.title = title;
+	// }
+
+	// public String getTitle() {
+	// if (StringUtils.isNotEmpty(this.titleLob)) {
+	// return this.titleLob;
+	// } else {
+	// return this.title;
+	// }
+	// }
+
 	public void setTitle(String title) {
 		this.title = title;
+		this.getProperties().setTitle(title);
 	}
 
 	public String getTitle() {
-		if (StringUtils.isNotEmpty(this.titleLob)) {
-			return this.titleLob;
-		} else {
-			return this.title;
-		}
+		return this.title;
 	}
 
 	public String getWorkCreateType() {
@@ -154,12 +169,13 @@ public class Work extends SliceJpaObject implements ProjectionInterface {
 	@CheckPersist(allowEmpty = true)
 	private String title;
 
-	public static final String titleLob_FIELDNAME = "titleLob";
-	@FieldDescribe("标题,长文本")
-	@Lob
-	@Basic(fetch = FetchType.EAGER)
-	@Column(length = JpaObject.length_1M, name = ColumnNamePrefix + titleLob_FIELDNAME)
-	private String titleLob;
+	// public static final String titleLob_FIELDNAME = "titleLob";
+	// @FieldDescribe("标题,长文本")
+	// @Lob
+	// @Basic(fetch = FetchType.EAGER)
+	// @Column(length = JpaObject.length_1M, name = ColumnNamePrefix +
+	// titleLob_FIELDNAME)
+	// private String titleLob;
 
 	public static final String startTime_FIELDNAME = "startTime";
 	@FieldDescribe("工作开始时间")
@@ -994,13 +1010,13 @@ public class Work extends SliceJpaObject implements ProjectionInterface {
 		this.manualTaskIdentityText = manualTaskIdentityText;
 	}
 
-	public String getTitleLob() {
-		return titleLob;
-	}
+	// public String getTitleLob() {
+	// return titleLob;
+	// }
 
-	public void setTitleLob(String titleLob) {
-		this.titleLob = titleLob;
-	}
+	// public void setTitleLob(String titleLob) {
+	// this.titleLob = titleLob;
+	// }
 
 	public String getStringValue01() {
 		return stringValue01;

+ 18 - 43
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkCompleted.java

@@ -1,7 +1,6 @@
 package com.x.processplatform.core.entity.content;
 
 import java.util.Date;
-import java.util.Objects;
 
 import javax.persistence.Basic;
 import javax.persistence.Column;
@@ -11,17 +10,12 @@ import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Lob;
+import javax.persistence.PostLoad;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
-import org.apache.commons.lang3.BooleanUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.openjpa.persistence.Persistent;
-import org.apache.openjpa.persistence.jdbc.Index;
-import org.apache.openjpa.persistence.jdbc.Strategy;
-
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
@@ -32,6 +26,12 @@ import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.core.entity.PersistenceProperties;
 
+import org.apache.commons.lang3.BooleanUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.openjpa.persistence.Persistent;
+import org.apache.openjpa.persistence.jdbc.Index;
+import org.apache.openjpa.persistence.jdbc.Strategy;
+
 @Entity
 @ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Content.WorkCompleted.table, uniqueConstraints = {
@@ -78,12 +78,15 @@ public class WorkCompleted extends SliceJpaObject implements ProjectionInterface
 		if (StringUtils.isEmpty(this.creatorUnitLevelName)) {
 			this.creatorUnitLevelName = "";
 		}
-		if (StringTools.utf8Length(title) > length_255B) {
-			this.title = StringTools.utf8SubString(title, length_255B);
-			this.titleLob = title;
-		} else {
-			this.title = Objects.toString(this.title, "");
-			this.titleLob = null;
+		if (StringTools.utf8Length(this.getProperties().getTitle()) > length_255B) {
+			this.title = StringTools.utf8SubString(this.getProperties().getTitle(), length_255B - 3) + "...";
+		}
+	}
+
+	@PostLoad
+	public void postLoad() {
+		if ((null != this.properties) && StringUtils.isNotEmpty(this.getProperties().getTitle())) {
+			this.title = this.getProperties().getTitle();
 		}
 	}
 
@@ -137,14 +140,11 @@ public class WorkCompleted extends SliceJpaObject implements ProjectionInterface
 
 	public void setTitle(String title) {
 		this.title = title;
+		this.getProperties().setTitle(title);
 	}
 
 	public String getTitle() {
-		if (StringUtils.isNotEmpty(this.titleLob)) {
-			return this.titleLob;
-		} else {
-			return this.title;
-		}
+		return this.title;
 	}
 
 	public Boolean getMerged() {
@@ -165,13 +165,6 @@ public class WorkCompleted extends SliceJpaObject implements ProjectionInterface
 	@CheckPersist(allowEmpty = true)
 	private String title;
 
-	public static final String titleLob_FIELDNAME = "titleLob";
-	@FieldDescribe("标题,长文本")
-	@Lob
-	@Basic(fetch = FetchType.EAGER)
-	@Column(length = JpaObject.length_1M, name = ColumnNamePrefix + titleLob_FIELDNAME)
-	private String titleLob;
-
 	public static final String startTime_FIELDNAME = "startTime";
 	@FieldDescribe("工作开始时间")
 	@Temporal(TemporalType.TIMESTAMP)
@@ -800,14 +793,6 @@ public class WorkCompleted extends SliceJpaObject implements ProjectionInterface
 		this.allowRollback = allowRollback;
 	}
 
-	// public String getData() {
-	// 	return data;
-	// }
-
-	// public void setData(String data) {
-	// 	this.data = data;
-	// }
-
 	public String getStringValue01() {
 		return stringValue01;
 	}
@@ -1056,14 +1041,6 @@ public class WorkCompleted extends SliceJpaObject implements ProjectionInterface
 		this.timeValue02 = timeValue02;
 	}
 
-	public String getTitleLob() {
-		return titleLob;
-	}
-
-	public void setTitleLob(String titleLob) {
-		this.titleLob = titleLob;
-	}
-
 	public void setMerged(Boolean merged) {
 		this.merged = merged;
 	}
@@ -1104,6 +1081,4 @@ public class WorkCompleted extends SliceJpaObject implements ProjectionInterface
 		this.activityDescription = activityDescription;
 	}
 
-	
-
 }

+ 15 - 3
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkCompletedProperties.java

@@ -4,20 +4,26 @@ import java.util.ArrayList;
 import java.util.List;
 
 import com.x.base.core.entity.JsonProperties;
+import com.x.base.core.project.annotation.FieldDescribe;
 
 public class WorkCompletedProperties extends JsonProperties {
 
+	@FieldDescribe("合并记录对象")
 	private List<Record> recordList = new ArrayList<>();
 
+	@FieldDescribe("合并数据对象")
 	private Data data;
 
-	public List<WorkLog> workLogList= new ArrayList<>();
+	@FieldDescribe("合并工作日志对象")
+	public List<WorkLog> workLogList = new ArrayList<>();
+
+	@FieldDescribe("标题")
+	private String title;
 
 	public List<Record> getRecordList() {
 		return recordList;
 	}
 
-
 	public void setRecordList(List<Record> recordList) {
 		this.recordList = recordList;
 	}
@@ -38,6 +44,12 @@ public class WorkCompletedProperties extends JsonProperties {
 		this.workLogList = workLogList;
 	}
 
-	
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
 
 }

+ 13 - 42
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkProperties.java

@@ -5,15 +5,22 @@ import java.util.LinkedHashMap;
 import java.util.List;
 
 import com.x.base.core.entity.JsonProperties;
+import com.x.base.core.project.annotation.FieldDescribe;
 
 public class WorkProperties extends JsonProperties {
 
+	@FieldDescribe("强制待办处理人")
 	private List<String> manualForceTaskIdentityList = new ArrayList<>();
 
+	@FieldDescribe("授权对象")
 	private LinkedHashMap<String, String> manualEmpowerMap = new LinkedHashMap<>();
 
+	@FieldDescribe("服务回调值")
 	private LinkedHashMap<String, Object> serviceValue = new LinkedHashMap<>();
 
+	@FieldDescribe("标题")
+	private String title;
+
 	public List<String> getManualForceTaskIdentityList() {
 		if (this.manualForceTaskIdentityList == null) {
 			this.manualForceTaskIdentityList = new ArrayList<String>();
@@ -47,48 +54,12 @@ public class WorkProperties extends JsonProperties {
 		this.serviceValue = serviceValue;
 	}
 
+	public String getTitle() {
+		return title;
+	}
 
-
-	
-
-//	private String destinationRoute;
-//
-//	private String destinationRouteName;
-//
-//	private ActivityType destinationActivityType;
-//
-//	private String destinationActivity;
-
-//	public String getDestinationRoute() {
-//		return destinationRoute;
-//	}
-//
-//	public void setDestinationRoute(String destinationRoute) {
-//		this.destinationRoute = destinationRoute;
-//	}
-//
-//	public String getDestinationRouteName() {
-//		return destinationRouteName;
-//	}
-//
-//	public void setDestinationRouteName(String destinationRouteName) {
-//		this.destinationRouteName = destinationRouteName;
-//	}
-//
-//	public ActivityType getDestinationActivityType() {
-//		return destinationActivityType;
-//	}
-//
-//	public void setDestinationActivityType(ActivityType destinationActivityType) {
-//		this.destinationActivityType = destinationActivityType;
-//	}
-//
-//	public String getDestinationActivity() {
-//		return destinationActivity;
-//	}
-//
-//	public void setDestinationActivity(String destinationActivity) {
-//		this.destinationActivity = destinationActivity;
-//	}
+	public void setTitle(String title) {
+		this.title = title;
+	}
 
 }

+ 3 - 4
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/work/V2RerouteWi.java

@@ -3,11 +3,10 @@ package com.x.processplatform.core.express.service.processing.jaxrs.work;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.lang3.BooleanUtils;
-
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.gson.GsonPropertyObject;
-import com.x.processplatform.core.entity.element.ActivityType;
+
+import org.apache.commons.lang3.BooleanUtils;
 
 public class V2RerouteWi extends GsonPropertyObject {
 
@@ -25,7 +24,7 @@ public class V2RerouteWi extends GsonPropertyObject {
 
 	public List<String> getManualForceTaskIdentityList() {
 		if (null == this.manualForceTaskIdentityList) {
-			this.manualForceTaskIdentityList = new ArrayList<String>();
+			this.manualForceTaskIdentityList = new ArrayList<>();
 		}
 		return manualForceTaskIdentityList;
 	}

+ 1 - 1
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/data/ActionUpdateWithWork.java

@@ -29,7 +29,7 @@ class ActionUpdateWithWork extends BaseAction {
 		Wo wo = new Wo();
 		String executorSeed = null;
 
-		/* 防止提交空数据清空data */
+		// 防止提交空数据清空data
 		if (null == jsonElement || (!jsonElement.isJsonObject())) {
 			throw new ExceptionNotJsonObject();
 		}

+ 68 - 64
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/data/BaseAction.java

@@ -29,8 +29,6 @@ import com.x.query.core.entity.Item;
 
 abstract class BaseAction extends StandardJaxrsAction {
 
-	private static final String subject_path = "subject";
-
 	protected Gson gson = XGsonBuilder.instance();
 
 	JsonElement getData(Business business, String job, String... paths) throws Exception {
@@ -41,14 +39,14 @@ abstract class BaseAction extends StandardJaxrsAction {
 		return jsonElement;
 	}
 
-	/** 将data中的Title 和 serial 字段同步到work中 */
+	// 将data中的Title 和 serial 字段同步到work中
 	void updateTitleSerial(Business business, Work work, JsonElement jsonElement) throws Exception {
 		String title = XGsonBuilder.extractString(jsonElement, Work.title_FIELDNAME);
 		if (null == title) {
-			title = XGsonBuilder.extractString(jsonElement, subject_path);
+			title = XGsonBuilder.extractString(jsonElement, Work.TITLEALIAS_SUBJECT);
 		}
 		String serial = XGsonBuilder.extractString(jsonElement, Work.serial_FIELDNAME);
-		/* 如果有数据就将数据覆盖到work task taskCompleted read readCompleted review 中 */
+		// 如果有数据就将数据覆盖到work task taskCompleted read readCompleted review 中
 		if (((null != title) && (!Objects.equals(title, work.getTitle())))
 				|| ((null != serial) && (!Objects.equals(serial, work.getSerial())))) {
 			business.entityManagerContainer().beginTransaction(Work.class);
@@ -69,50 +67,58 @@ abstract class BaseAction extends StandardJaxrsAction {
 			List<Review> reviews = business.entityManagerContainer().listEqual(Review.class, Review.job_FIELDNAME,
 					work.getJob());
 
-			if ((null != title) && (!Objects.equals(title, work.getTitle()))) {
-				work.setTitle(title);
-				for (Task o : tasks) {
-					o.setTitle(title);
-				}
-				for (TaskCompleted o : taskCompleteds) {
-					o.setTitle(title);
-				}
-				for (Read o : reads) {
-					o.setTitle(title);
-				}
-				for (ReadCompleted o : readCompleteds) {
-					o.setTitle(title);
-				}
-				for (Review o : reviews) {
-					o.setTitle(title);
-				}
+			this.updateTitle(title, work, tasks, taskCompleteds, reads, readCompleteds, reviews);
+			this.updateSerial(serial, work, tasks, taskCompleteds, reads, readCompleteds, reviews);
+			// 这里必须先提交掉,不然后面的获取会得到不一致的状态
+			// <openjpa-2.4.3-SNAPSHOT-r422266:1777109 nonfatal user error>
+			// org.apache.openjpa.persistence.InvalidStateException: Opera tion attempted on
+			// a deleted instance.
+			business.entityManagerContainer().commit();
+		}
+	}
+
+	private void updateTitle(String title, Work work, List<Task> tasks, List<TaskCompleted> taskCompleteds,
+			List<Read> reads, List<ReadCompleted> readCompleteds, List<Review> reviews) {
+		if ((null != title) && (!Objects.equals(title, work.getTitle()))) {
+			work.setTitle(title);
+			for (Task o : tasks) {
+				o.setTitle(title);
+			}
+			for (TaskCompleted o : taskCompleteds) {
+				o.setTitle(title);
+			}
+			for (Read o : reads) {
+				o.setTitle(title);
+			}
+			for (ReadCompleted o : readCompleteds) {
+				o.setTitle(title);
+			}
+			for (Review o : reviews) {
+				o.setTitle(title);
 			}
+		}
+
+	}
 
-			if ((null != serial) && (!Objects.equals(serial, work.getSerial()))) {
-				work.setSerial(serial);
-				for (Task o : tasks) {
-					o.setSerial(serial);
-				}
-				for (TaskCompleted o : taskCompleteds) {
-					o.setSerial(serial);
-				}
-				for (Read o : reads) {
-					o.setSerial(serial);
-				}
-				for (ReadCompleted o : readCompleteds) {
-					o.setSerial(serial);
-				}
-				for (Review o : reviews) {
-					o.setSerial(serial);
-				}
+	private void updateSerial(String serial, Work work, List<Task> tasks, List<TaskCompleted> taskCompleteds,
+			List<Read> reads, List<ReadCompleted> readCompleteds, List<Review> reviews) {
+		if ((null != serial) && (!Objects.equals(serial, work.getSerial()))) {
+			work.setSerial(serial);
+			for (Task o : tasks) {
+				o.setSerial(serial);
+			}
+			for (TaskCompleted o : taskCompleteds) {
+				o.setSerial(serial);
+			}
+			for (Read o : reads) {
+				o.setSerial(serial);
+			}
+			for (ReadCompleted o : readCompleteds) {
+				o.setSerial(serial);
+			}
+			for (Review o : reviews) {
+				o.setSerial(serial);
 			}
-			/** 这里必须先提交掉,不然后面的获取会得到不一致的状态 */
-			/**
-			 * <openjpa-2.4.3-SNAPSHOT-r422266:1777109 nonfatal user error>
-			 * org.apache.openjpa.persistence.InvalidStateException: Opera tion attempted on
-			 * a deleted instance.
-			 */
-			business.entityManagerContainer().commit();
 		}
 	}
 
@@ -141,13 +147,13 @@ abstract class BaseAction extends StandardJaxrsAction {
 				this.fill(_o, work);
 				business.entityManagerContainer().persist(_o);
 			}
-			/* 标记数据已经被修改 */
+			// 标记数据已经被修改
 			business.entityManagerContainer().beginTransaction(Work.class);
 			work.setDataChanged(true);
-			/* 基于前面的原因,这里进行单独提交 */
+			// 基于前面的原因,这里进行单独提交
 			business.entityManagerContainer().commit();
 		}
-	} 
+	}
 
 	void updateData(Business business, WorkCompleted workCompleted, JsonElement jsonElement, String... paths)
 			throws Exception {
@@ -175,7 +181,7 @@ abstract class BaseAction extends StandardJaxrsAction {
 				this.fill(_o, workCompleted);
 				business.entityManagerContainer().persist(_o);
 			}
-			/** 基于前面的原因,这里进行单独提交 */
+			// 基于前面的原因,这里进行单独提交
 			business.entityManagerContainer().commit();
 
 		}
@@ -209,9 +215,9 @@ abstract class BaseAction extends StandardJaxrsAction {
 		DataItemConverter<Item> converter = new DataItemConverter<>(Item.class);
 		business.entityManagerContainer().beginTransaction(Item.class);
 		if ((null != cursor) && cursor.getItemType().equals(ItemType.a)) {
-			/* 向数组里面添加一个成员对象 */
+			// 向数组里面添加一个成员对象
 			Integer index = business.item().getArrayLastIndexWithJobWithPath(work.getJob(), paths);
-			/* 新的路径开始 */
+			// 新的路径开始
 			String[] ps = new String[paths.length + 1];
 			for (int i = 0; i < paths.length; i++) {
 				ps[i] = paths[i];
@@ -223,7 +229,7 @@ abstract class BaseAction extends StandardJaxrsAction {
 				business.entityManagerContainer().persist(o);
 			}
 		} else if ((cursor == null) && parent.getItemType().equals(ItemType.o)) {
-			/* 向parent对象添加一个属性值 */
+			// 向parent对象添加一个属性值
 			List<Item> adds = converter.disassemble(jsonElement, paths);
 			for (Item o : adds) {
 				this.fill(o, work);
@@ -233,7 +239,7 @@ abstract class BaseAction extends StandardJaxrsAction {
 			throw new Exception("unexpected post data with work" + work + ".path:" + StringUtils.join(paths, ".")
 					+ "json:" + jsonElement);
 		}
-		/* 标记数据已经被修改 */
+		// 标记数据已经被修改
 		business.entityManagerContainer().beginTransaction(Work.class);
 		work.setDataChanged(true);
 		business.entityManagerContainer().commit();
@@ -249,30 +255,28 @@ abstract class BaseAction extends StandardJaxrsAction {
 		for (Item o : exists) {
 			business.entityManagerContainer().remove(o);
 		}
-		if (paths.length > 0) {
-			if (NumberUtils.isCreatable(paths[paths.length - 1])) {
-				int position = paths.length - 1;
-				for (Item o : business.item().listWithJobWithPathWithAfterLocation(work.getJob(),
-						NumberUtils.toInt(paths[position]), paths)) {
-					o.path(Integer.toString(o.pathLocation(position) - 1), position);
-				}
+		if ((paths.length > 0) && NumberUtils.isCreatable(paths[paths.length - 1])) {
+			int position = paths.length - 1;
+			for (Item o : business.item().listWithJobWithPathWithAfterLocation(work.getJob(),
+					NumberUtils.toInt(paths[position]), paths)) {
+				o.path(Integer.toString(o.pathLocation(position) - 1), position);
 			}
 		}
-		/* 标记数据已经被修改 */
+		// 标记数据已经被修改
 		business.entityManagerContainer().beginTransaction(Work.class);
 		work.setDataChanged(true);
 		business.entityManagerContainer().commit();
 	}
 
 	void fill(Item o, Work work) {
-		/** 将DateItem与Work放在同一个分区 */
+		// 将DateItem与Work放在同一个分区
 		o.setDistributeFactor(work.getDistributeFactor());
 		o.setBundle(work.getJob());
 		o.setItemCategory(ItemCategory.pp);
 	}
 
 	void fill(Item o, WorkCompleted workCompleted) {
-		/** 将DateItem与Work放在同一个分区 */
+		// 将DateItem与Work放在同一个分区
 		o.setDistributeFactor(workCompleted.getDistributeFactor());
 		o.setBundle(workCompleted.getJob());
 		o.setItemCategory(ItemCategory.pp);

+ 8 - 4
o2server/x_program_center/src/main/java/com/x/program/center/CenterQueue.java

@@ -13,6 +13,7 @@ import com.x.base.core.project.gson.XGsonBuilder;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.queue.AbstractQueue;
+import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.ListTools;
 
 public class CenterQueue extends AbstractQueue<CenterQueueBody> {
@@ -46,13 +47,16 @@ public class CenterQueue extends AbstractQueue<CenterQueueBody> {
 			if (null != application) {
 				application.setReportDate(now);
 			} else {
+				if (ListTools.isNotEmpty(applications.get(body.getClassName()))) {
+					logger.print("cluster add application: {}, node: {}.", body.getNode(), body.getClassName());
+				}
 				body.setReportDate(now);
 				applications.add(body.getClassName(), body);
 				Config.resource_node_applicationsTimestamp(now);
 				applications.updateTimestamp(now);
-				Config.resource_node_applications(XGsonBuilder.instance().toJsonTree(applications));
 			}
 		}
+		Config.resource_node_applications(XGsonBuilder.instance().toJsonTree(applications));
 	}
 
 	private void refresh(CenterQueueRefreshBody body) throws Exception {
@@ -63,10 +67,10 @@ public class CenterQueue extends AbstractQueue<CenterQueueBody> {
 		for (Entry<String, CopyOnWriteArrayList<Application>> en : applications.entrySet()) {
 			List<Application> removeApplications = new ArrayList<>();
 			for (Application application : en.getValue()) {
-				if ((now.getTime() - application.getReportDate().getTime()) > REFRESHAPPLICATIONSINTERVAL * 1000
-						+ 10000) {
+				if ((now.getTime() - application.getReportDate().getTime()) > REFRESHAPPLICATIONSINTERVAL * 2 * 1000) {
 					removeApplications.add(application);
-					logger.warn("application dropped, node: {}, application: {}.", application.getNode(), en.getKey());
+					logger.warn("cluster dropped application: {}, node: {}, report date: {}.", en.getKey(),
+							application.getNode(), DateTools.format(application.getReportDate()));
 				}
 			}
 			modify = en.getValue().removeAll(removeApplications) || modify;