roo00 6 gadi atpakaļ
vecāks
revīzija
635c42e43d
100 mainītis faili ar 5946 papildinājumiem un 1087 dzēšanām
  1. 38 8
      o2server/x_attendance_assemble_control/src/main/webapp/jest/describe.js
  2. 12 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java
  3. 2 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/container/checker/StringValuePersistChecker.java
  4. 10 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/annotation/ActionLogger.java
  5. 15 8
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ApplicationServer.java
  6. 8 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/CenterServer.java
  7. 3 3
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ClientInit.java
  8. 16 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Config.java
  9. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/DumpRestoreData.java
  10. 0 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Person.java
  11. 230 129
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ProcessPlatform.java
  12. 11 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/WebServer.java
  13. 5 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/executor/CallWrapObject.java
  14. 48 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/executor/ProcessPlatformExecutorFactory.java
  15. 35 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/gson/XGsonBuilder.java
  16. 18 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/CacheControlFactory.java
  17. 59 99
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/ResponseFactory.java
  18. 38 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/WoContentType.java
  19. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/WoText.java
  20. 0 50
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/metrics/MetricsTimer.java
  21. 0 194
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/metrics/MetricsTimerReport.java
  22. 0 164
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/metrics/StandardJaxrsActionReporter.java
  23. 1 27
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/proxy/StandardJaxrsActionProxy.java
  24. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/logger/Logger.java
  25. 9 9
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/organization/OrganizationDefinition.java
  26. 5 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/DateTools.java
  27. 3 5
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/ExtractTextTools.java
  28. 2 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_assemble_surface.java
  29. 86 0
      o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/gson/GsonTools.java
  30. 6 39
      o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/gson/TestClient.java
  31. 9 0
      o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/lambda/TestClient2.java
  32. 12 10
      o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/string/TestClient.java
  33. 20 0
      o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/tika/TestClient.java
  34. 75 6
      o2server/x_base_core_project/src/test/resources/aaa.json
  35. 12 0
      o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSConfigSettingService.java
  36. 8 10
      o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSForumInfoService.java
  37. 10 2
      o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSForumSubjectStatisticService.java
  38. 14 12
      o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSSectionInfoService.java
  39. 41 28
      o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSSubjectInfoService.java
  40. 38 8
      o2server/x_bbs_assemble_control/src/main/webapp/jest/describe.js
  41. 13 25
      o2server/x_bbs_core_entity/src/main/java/com/x/bbs/entity/BBSForumInfo.java
  42. 12 25
      o2server/x_bbs_core_entity/src/main/java/com/x/bbs/entity/BBSSectionInfo.java
  43. 4 0
      o2server/x_build/.gitignore
  44. 57 0
      o2server/x_build/deploy_o2server.xml
  45. 27 0
      o2server/x_build/gitHub.xml
  46. 3 0
      o2server/x_build/git_archive.bat
  47. 435 0
      o2server/x_build/gulpfile.js
  48. 45 0
      o2server/x_build/package-lock.json
  49. 45 0
      o2server/x_build/package.json
  50. 276 0
      o2server/x_build/src/main/java/com/x/build/CheckEntity.java
  51. 91 0
      o2server/x_build/src/main/java/com/x/build/CopyJest.java
  52. 130 0
      o2server/x_build/src/main/java/com/x/build/Publish.java
  53. 199 0
      o2server/x_build/src/main/java/com/x/build/SyncToGitHubDirectory.java
  54. 135 0
      o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy.java
  55. 224 0
      o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_127_0_0_1.java
  56. 194 0
      o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_172_16_96_100.java
  57. 194 0
      o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_172_16_97_5.java
  58. 194 0
      o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_cx_o2oa_net.java
  59. 212 0
      o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_demo_o2oa_net.java
  60. 200 0
      o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_dev10_o2oa_net.java
  61. 243 0
      o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_dev_o2oa_net.java
  62. 201 0
      o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_poc_zoneland_net.java
  63. 8 0
      o2server/x_build/src/main/java/com/x/build/redeploy/package-info.java
  64. 128 0
      o2server/x_build/src/main/resources/pom_template_assemble.xml
  65. 29 0
      o2server/x_build/src/main/resources/pom_template_core.xml
  66. 128 0
      o2server/x_build/src/main/resources/pom_template_service.xml
  67. 0 0
      o2server/x_build/src/test/resources/aaa.json
  68. 259 0
      o2server/x_build/version.xml
  69. 231 0
      o2server/x_build/wrdp.xml
  70. 10 9
      o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/service/CalendarServiceAdv.java
  71. 38 8
      o2server/x_calendar_assemble_control/src/main/webapp/jest/describe.js
  72. 49 16
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/DocumentFactory.java
  73. 58 14
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/ReviewFactory.java
  74. 280 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionQueryListPrevWithFilter.java
  75. 25 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/DocumentAction.java
  76. 43 7
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/DocumentInfoService.java
  77. 58 8
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/DocumentQueryService.java
  78. 24 7
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/ReviewService.java
  79. 38 8
      o2server/x_cms_assemble_control/src/main/webapp/jest/describe.js
  80. 17 21
      o2server/x_cms_core_entity/src/main/java/com/x/cms/core/entity/AppInfo.java
  81. 16 11
      o2server/x_cms_core_entity/src/main/java/com/x/cms/core/entity/content/Data.java
  82. 11 13
      o2server/x_cms_core_express/src/main/java/com/x/cms/core/express/permission/CmsPermissionService.java
  83. 38 8
      o2server/x_component_assemble_control/src/main/webapp/jest/describe.js
  84. 6 8
      o2server/x_console/src/main/java/com/x/server/console/CommandFactory.java
  85. 16 0
      o2server/x_console/src/main/java/com/x/server/console/Main.java
  86. 11 0
      o2server/x_console/src/main/java/com/x/server/console/ResourceFactory.java
  87. 1 1
      o2server/x_console/src/main/java/com/x/server/console/action/ActionDumpData.java
  88. 1 1
      o2server/x_console/src/main/java/com/x/server/console/action/ActionDumpStorage.java
  89. 61 0
      o2server/x_console/src/main/java/com/x/server/console/action/ActionShowHttpThread.java
  90. 11 7
      o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java
  91. 10 7
      o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java
  92. 37 11
      o2server/x_console/src/main/java/com/x/server/console/server/web/WebServerTools.java
  93. 38 8
      o2server/x_file_assemble_control/src/main/webapp/jest/describe.js
  94. 38 8
      o2server/x_general_assemble_control/src/main/webapp/jest/describe.js
  95. 38 8
      o2server/x_hotpic_assemble_control/src/main/webapp/jest/describe.js
  96. 38 8
      o2server/x_meeting_assemble_control/src/main/webapp/jest/describe.js
  97. 2 0
      o2server/x_meeting_core_entity/src/main/java/com/x/meeting/core/entity/Meeting.java
  98. 38 8
      o2server/x_message_assemble_communicate/src/main/webapp/jest/describe.js
  99. 38 8
      o2server/x_mind_assemble_control/src/main/webapp/jest/describe.js
  100. 38 8
      o2server/x_okr_assemble_control/src/main/webapp/jest/describe.js

+ 38 - 8
o2server/x_attendance_assemble_control/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

+ 12 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java

@@ -380,6 +380,18 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		return list;
 	}
 
+	public <T extends JpaObject, W extends Comparable<? super W>> List<T> listLessThan(Class<T> cls, String attribute,
+			W w) throws Exception {
+		EntityManager em = this.get(cls);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<T> cq = cb.createQuery(cls);
+		Root<T> root = cq.from(cls);
+		cq.select(root).where(cb.lessThan(root.get(attribute), w));
+		List<T> os = em.createQuery(cq).getResultList();
+		List<T> list = new ArrayList<>(os);
+		return list;
+	}
+
 	public <T extends JpaObject> List<T> listEqualAndEqual(Class<T> cls, String attribute, Object value,
 			String otherAttribute, Object otherValue) throws Exception {
 		EntityManager em = this.get(cls);

+ 2 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/container/checker/StringValuePersistChecker.java

@@ -15,6 +15,7 @@ import javax.persistence.criteria.Path;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 
+import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 
@@ -28,6 +29,7 @@ import com.x.base.core.entity.annotation.Equal;
 import com.x.base.core.entity.annotation.NotEqual;
 import com.x.base.core.entity.tools.JpaObjectTools;
 import com.x.base.core.project.tools.StringTools;
+import org.apache.commons.text.StringEscapeUtils;
 
 public class StringValuePersistChecker extends AbstractChecker {
 

+ 10 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/annotation/ActionLogger.java

@@ -0,0 +1,10 @@
+package com.x.base.core.project.annotation;
+
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+@Inherited
+@Documented
+public @interface ActionLogger {
+}

+ 15 - 8
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ApplicationServer.java

@@ -13,6 +13,14 @@ public class ApplicationServer extends ConfigObject {
 		return new ApplicationServer();
 	}
 
+	private static final Integer DEFAULT_PORT = 20020;
+	private static final Integer DEFAULT_SCANINTERVAL = 0;
+	private static final Integer DEFAULT_WEIGHT = 100;
+	private static final Integer DEFAULT_SCHEDULEWEIGHT = 100;
+	private static final Boolean DEFAULT_STATENABLE = true;
+	private static final String DEFAULT_STATEXCLUSIONS = "*.js,*.gif,*.jpg,*.png,*.css,*.ico";
+	private static final Integer DEFAULT_MAXFORMCONTENT = 20;
+
 	public ApplicationServer() {
 		this.enable = true;
 		this.port = DEFAULT_PORT;
@@ -27,16 +35,9 @@ public class ApplicationServer extends ConfigObject {
 		this.scheduleWeights = new CopyOnWriteArrayList<NameWeightPair>();
 		this.statEnable = DEFAULT_STATENABLE;
 		this.statExclusions = DEFAULT_STATEXCLUSIONS;
-
+		this.maxFormContent = DEFAULT_MAXFORMCONTENT;
 	}
 
-	private static final Integer DEFAULT_PORT = 20020;
-	private static final Integer DEFAULT_SCANINTERVAL = 0;
-	private static final Integer DEFAULT_WEIGHT = 100;
-	private static final Integer DEFAULT_SCHEDULEWEIGHT = 100;
-	private static final Boolean DEFAULT_STATENABLE = true;
-	private static final String DEFAULT_STATEXCLUSIONS = "*.js,*.gif,*.jpg,*.png,*.css,*.ico";
-
 	@FieldDescribe("是否启用")
 	private Boolean enable;
 	@FieldDescribe("http/https端口,负责向前端提供数据访问接口.默认为20020端口.")
@@ -63,6 +64,12 @@ public class ApplicationServer extends ConfigObject {
 	private Boolean statEnable;
 	@FieldDescribe("统计忽略路径,默认忽略*.js,*.gif,*.jpg,*.png,*.css,*.ico")
 	private String statExclusions;
+	@FieldDescribe("最大提交数据限制(M),限制有所上传的内容大小,包括附件.")
+	private Integer maxFormContent;
+
+	public Integer getMaxFormContent() {
+		return ((null == maxFormContent) || (maxFormContent < 1)) ? DEFAULT_MAXFORMCONTENT : maxFormContent;
+	}
 
 	public String getStatExclusions() {
 		return (StringUtils.isEmpty(statExclusions) ? DEFAULT_STATEXCLUSIONS : this.statExclusions) + ",/druid/*";

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

@@ -20,6 +20,7 @@ public class CenterServer extends ConfigObject {
 	private static final Integer DEFAULT_ORDER = 0;
 	private static final Boolean DEFAULT_STATENABLE = true;
 	private static final String DEFAULT_STATEXCLUSIONS = "*.js,*.gif,*.jpg,*.png,*.css,*.ico";
+	private static final Integer DEFAULT_MAXFORMCONTENT = 20;
 
 	public static CenterServer defaultInstance() {
 		return new CenterServer();
@@ -38,6 +39,7 @@ public class CenterServer extends ConfigObject {
 		this.configApiEnable = DEFAULT_CONFIGAPIENABLE;
 		this.statEnable = DEFAULT_STATENABLE;
 		this.statExclusions = DEFAULT_STATEXCLUSIONS;
+		this.maxFormContent = DEFAULT_MAXFORMCONTENT;
 	}
 
 	@FieldDescribe("是否启用")
@@ -66,6 +68,12 @@ public class CenterServer extends ConfigObject {
 	private Boolean statEnable;
 	@FieldDescribe("统计忽略路径,默认忽略*.js,*.gif,*.jpg,*.png,*.css,*.ico")
 	private String statExclusions;
+	@FieldDescribe("最大提交数据限制(M),限制有所上传的内容大小,包括附件.")
+	private Integer maxFormContent;
+
+	public Integer getMaxFormContent() {
+		return ((null == maxFormContent) || (maxFormContent < 1)) ? DEFAULT_MAXFORMCONTENT : maxFormContent;
+	}
 
 	public String getStatExclusions() {
 		return (StringUtils.isEmpty(statExclusions) ? DEFAULT_STATEXCLUSIONS : this.statExclusions) + ",/druid/*";

+ 3 - 3
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ClientInit.java

@@ -28,7 +28,7 @@ public class ClientInit extends ConfigObject {
 	private LoginPage loginPage;
 
 	@FieldDescribe("是否启用webSocket")
-	private String webSocketEnable;
+	private Boolean webSocketEnable;
 
 	public ClientInit() {
 		this.enable = DEFAULT_ENABLE;
@@ -148,11 +148,11 @@ public class ClientInit extends ConfigObject {
 		this.loginPage = loginPage;
 	}
 
-	public String getWebSocketEnable() {
+	public Boolean getWebSocketEnable() {
 		return webSocketEnable;
 	}
 
-	public void setWebSocketEnable(String webSocketEnable) {
+	public void setWebSocketEnable(Boolean webSocketEnable) {
 		this.webSocketEnable = webSocketEnable;
 	}
 

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

@@ -7,6 +7,7 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Map.Entry;
+import java.util.concurrent.ExecutorService;
 import java.util.concurrent.LinkedBlockingQueue;
 
 import javax.naming.InitialContext;
@@ -128,6 +129,8 @@ public class Config {
 	public static final String RESOURCE_NODE_CENTERSPRIMARYNODE = RESOURCE_NODE_PREFIX + "centersPrimaryNode";
 	public static final String RESOURCE_NODE_CENTERSPRIMARYPORT = RESOURCE_NODE_PREFIX + "centersPrimaryPort";
 	public static final String RESOURCE_NODE_CENTERSPRIMARYSSLENABLE = RESOURCE_NODE_PREFIX + "centersPrimarySslEnable";
+	public static final String RESOURCE_NODE_PROCESSPLATFORMEXECUTORS = RESOURCE_NODE_PREFIX
+			+ "processPlatformExecutors";
 
 	private static final String DEFAULT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWcVZIS57VeOUzi8c01WKvwJK9uRe6hrGTUYmF6J/pI6/UvCbdBWCoErbzsBZOElOH8Sqal3vsNMVLjPYClfoDyYDaUlakP3ldfnXJzAFJVVubF53KadG+fwnh9ZMvxdh7VXVqRL3IQBDwGgzX4rmSK+qkUJjc3OkrNJPB7LLD8QIDAQAB";
 	private static final String DEFAULT_PRIVATE_KEY = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJZxVkhLntV45TOLxzTVYq/Akr25F7qGsZNRiYXon+kjr9S8Jt0FYKgStvOwFk4SU4fxKpqXe+w0xUuM9gKV+gPJgNpSVqQ/eV1+dcnMAUlVW5sXncpp0b5/CeH1ky/F2HtVdWpEvchAEPAaDNfiuZIr6qRQmNzc6Ss0k8HsssPxAgMBAAECgYAWtRy05NUgm5Lc6Og0jVDL/mEnydxPBy2ectwzHh2k7wIHNi8XhUxFki2TMqzrM9Dv3/LySpMl4AE3mhs34LNPy6F+MwyF5X7j+2Y6MflJyeb9HNyT++viysQneoOEiOk3ghxF2/GPjpiEF79wSp+1YKTxRAyq7ypV3t35fGOOEQJBANLDPWl8b5c3lrcz/dTamMjHbVamEyX43yzQOphzkhYsz4pruATzTxU+z8/zPdEqHcWWV39CP3xu3EYNcAhxJW8CQQC2u7PF5Xb1xYRCsmIPssFxil64vvdUadSxl7GLAgjQ9ULyYWB24KObCEzLnPcT8Pf2Q0YQOixxa/78FuzmgbyfAkA7ZFFV/H7lugB6t+f7p24OhkRFep9CwBMD6dnZRBgSr6X8d8ZvfrD2Z7DgBMeSva+OEoOtlNmXExZ3lynO9zN5AkAVczEmIMp3DSl6XtAuAZC9kD2QODJ2QToLYsAfjiyUwsWKCC43piTuVOoW2KUUPSwOR1VZIEsJQWEcHGDQqhgHAkAeZ7a6dVRZFdBwKA0ADjYCufAW2cIYiVDQBJpgB+kiLQflusNOCBK0FT3lg8BdUSy2D253Ih6l3lbaM/4M7DFQ";
@@ -1232,4 +1235,17 @@ public class Config {
 		initialContext().rebind(RESOURCE_NODE_CENTERSPRIMARYSSLENABLE, sslEnable);
 	}
 
+	public static synchronized ExecutorService[] resource_node_processPlatformExecutors() throws Exception {
+		Object o = initialContext().lookup(RESOURCE_NODE_PROCESSPLATFORMEXECUTORS);
+		if (null != o) {
+			return (ExecutorService[]) o;
+		}
+		return null;
+	}
+
+	public static synchronized void resource_node_processPlatformExecutors(ExecutorService[] executorServices)
+			throws Exception {
+		initialContext().rebind(RESOURCE_NODE_PROCESSPLATFORMEXECUTORS, executorServices);
+	}
+
 }

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

@@ -57,7 +57,7 @@ public class DumpRestoreData extends ConfigObject {
 
 	public Integer getBatchSize() {
 		if ((null == this.batchSize) || (this.batchSize < 1)) {
-			return 2000;
+			return default_batchSize;
 		}
 		return this.batchSize;
 	}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Person.java


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

@@ -41,11 +41,7 @@ public class ProcessPlatform extends ConfigObject {
 	}
 
 	public ProcessPlatform() {
-		this.urge = new Urge();
-		this.expire = new Expire();
-		this.delay = new Delay();
-		this.reorganize = new Reorganize();
-		this.dataMerge = new DataMerge();
+
 		this.maintenanceIdentity = "";
 		this.formVersionCount = DEFAULT_FORMVERSIONCOUNT;
 		this.processVersionCount = DEFAULT_PROCESSVERSIONCOUNT;
@@ -57,25 +53,15 @@ public class ProcessPlatform extends ConfigObject {
 		this.docToWordDefaultFileName = DEFAULT_DOCTOWORDDEFAULTFILENAME;
 		this.docToWordDefaultSite = DEFAULT_DOCTOWORDDEFAULTSITE;
 		this.executorCount = DEFAULT_EXECUTORCOUNT;
-	}
-
-	@FieldDescribe("提醒设置,设置提醒间隔.")
-	private Press press;
-
-	@FieldDescribe("催办任务设置,发现即将过期时发送提醒消息.")
-	private Urge urge;
-
-	@FieldDescribe("过期任务设置,将执行3个独立任务,1.将已经过了截至时间的待办标记过期,2.触发设置了过期路由的工作,3.如果启用了自动流转,那么开始自动流转,可以选择仅处理唯一路由的工作,或者启动基于MLP的人工神经网络进行处理.")
-	private Expire expire;
-
-	@FieldDescribe("延时任务设置,定时触发延时任务,当超过延时时间后继续流转.")
-	private Delay delay;
-
-	@FieldDescribe("整理任务设置,将执行4个独立任务,1.删除无效的待办,2.删除流程或者应用不存在的工作,3.将活动节点错误的工作调度到开始节点,4.触发滞留时间过长的工作.")
-	private Reorganize reorganize;
+		this.urge = new Urge();
+		this.expire = new Expire();
+		this.touchDelay = new TouchDelay();
+		this.dataMerge = new DataMerge();
+		this.touchDetained = new TouchDetained();
+		this.deleteDraft = new DeleteDraft();
+		this.passExpired = new PassExpired();
 
-	@FieldDescribe("合并任务设置,定时触发合并任务,将已完成工作的Data从Item表中提取合并到WorkCompleted的Data字段中,默认工作完成后2年开始进行合并.")
-	private DataMerge dataMerge;
+	}
 
 	@FieldDescribe("维护身份,当工作发生意外错误,无法找到对应的处理人情况下,先尝试将工作分配给创建身份,如果创建身份也不可获取,那么分配给指定人员,默认情况下这个值为空.")
 	private String maintenanceIdentity;
@@ -154,9 +140,32 @@ public class ProcessPlatform extends ConfigObject {
 		return StringUtils.isEmpty(docToWordDefaultSite) ? DEFAULT_DOCTOWORDDEFAULTSITE : docToWordDefaultSite;
 	}
 
-	public Press getPress() {
-		return this.press == null ? new Press() : this.press;
-	}
+	@FieldDescribe("催办任务设置,发现即将过期时发送提醒消息.")
+	private Urge urge;
+
+	@FieldDescribe("将已经过了截至时间的待办标记过期.")
+	private Expire expire;
+
+	@FieldDescribe("延时任务设置,定时触发延时任务,当超过延时时间后继续流转.")
+	private TouchDelay touchDelay;
+
+	@FieldDescribe("合并任务设置,定时触发合并任务,将已完成工作的Data从Item表中提取合并到WorkCompleted的Data字段中,默认工作完成后2年开始进行合并.")
+	private DataMerge dataMerge;
+
+	@FieldDescribe("清除草稿状态的工作.")
+	private DeleteDraft deleteDraft;
+
+	@FieldDescribe("超时工作路由设置.")
+	private PassExpired passExpired;
+
+	@FieldDescribe("触发长时间未处理的工作.")
+	private TouchDetained touchDetained;
+
+	@FieldDescribe("记录长期滞留工作,待办,待阅设置.")
+	private LogLongDetained logLongDetained;
+
+	@FieldDescribe("提醒设置,设置提醒间隔.")
+	private Press press;
 
 	public Urge getUrge() {
 		return this.urge == null ? new Urge() : this.urge;
@@ -166,18 +175,34 @@ public class ProcessPlatform extends ConfigObject {
 		return this.expire == null ? new Expire() : this.expire;
 	}
 
-	public Delay getDelay() {
-		return this.delay == null ? new Delay() : this.delay;
+	public PassExpired getPassExpired() {
+		return this.passExpired == null ? new PassExpired() : this.passExpired;
+	}
+
+	public TouchDelay getTouchDelay() {
+		return this.touchDelay == null ? new TouchDelay() : this.touchDelay;
+	}
+
+	public TouchDetained getTouchDetained() {
+		return this.touchDetained == null ? new TouchDetained() : this.touchDetained;
 	}
 
-	public Reorganize getReorganize() {
-		return this.reorganize == null ? new Reorganize() : this.reorganize;
+	public DeleteDraft getDeleteDraft() {
+		return this.deleteDraft == null ? new DeleteDraft() : this.deleteDraft;
+	}
+
+	public LogLongDetained getLogLongDetained() {
+		return this.logLongDetained == null ? new LogLongDetained() : this.logLongDetained;
 	}
 
 	public DataMerge getDataMerge() {
 		return this.dataMerge == null ? new DataMerge() : this.dataMerge;
 	}
 
+	public Press getPress() {
+		return this.press == null ? new Press() : this.press;
+	}
+
 	public String getMaintenanceIdentity() {
 		return maintenanceIdentity;
 	}
@@ -187,41 +212,6 @@ public class ProcessPlatform extends ConfigObject {
 		FileUtils.write(file, XGsonBuilder.toJson(this), DefaultCharset.charset);
 	}
 
-	public static class Press extends ConfigObject {
-
-		public static Press defaultInstance() {
-			Press o = new Press();
-			return o;
-		}
-
-		public final static Integer DEFAULT_INTERVALMINUTES = 10;
-
-		public final static Integer DEFAULT_COUNT = 3;
-
-		@FieldDescribe("提醒间隔(分钟)")
-		private Integer intervalMinutes;
-
-		@FieldDescribe("提醒数量限制.")
-		private Integer count;
-
-		public Integer getIntervalMinutes() {
-			return (intervalMinutes == null || intervalMinutes < 0) ? DEFAULT_INTERVALMINUTES : this.intervalMinutes;
-		}
-
-		public Integer getCount() {
-			return (count == null || count < 0) ? DEFAULT_COUNT : this.count;
-		}
-
-		public void setIntervalMinutes(Integer intervalMinutes) {
-			this.intervalMinutes = intervalMinutes;
-		}
-
-		public void setCount(Integer count) {
-			this.count = count;
-		}
-
-	}
-
 	public static class Urge extends ConfigObject {
 
 		public static Urge defaultInstance() {
@@ -231,7 +221,7 @@ public class ProcessPlatform extends ConfigObject {
 
 		public final static Boolean DEFAULT_ENABLE = true;
 
-		public final static String DEFAULT_CRON = "6 6/10 8-18 * * ?";
+		public final static String DEFAULT_CRON = "30 0/10 8-18 * * ?";
 
 		@FieldDescribe("是否启用")
 		private Boolean enable = DEFAULT_ENABLE;
@@ -269,13 +259,7 @@ public class ProcessPlatform extends ConfigObject {
 
 		public final static Boolean DEFAULT_ENABLE = true;
 
-		public final static String DEFAULT_CRON = "8 8/10 * * * ?";
-
-		public final static String AUTO_NEURAL = "neural";
-		public final static String AUTO_SINGLE = "single";
-		public final static String AUTO_DISABLE = "disable";
-
-		public final static String DEFAULT_AUTO = AUTO_DISABLE;
+		public final static String DEFAULT_CRON = "45 0/15 8-18 * * ?";
 
 		@FieldDescribe("是否启用")
 		private Boolean enable = DEFAULT_ENABLE;
@@ -283,9 +267,6 @@ public class ProcessPlatform extends ConfigObject {
 		@FieldDescribe("定时cron表达式")
 		private String cron = DEFAULT_CRON;
 
-		@FieldDescribe("自动处理模式,disable:禁用,neural:人工神经网络,single:仅处理只有一条路由的工作.")
-		private String auto = DEFAULT_AUTO;
-
 		public String getCron() {
 			if (StringUtils.isNotEmpty(this.cron) && CronExpression.isValidExpression(this.cron)) {
 				return this.cron;
@@ -298,34 +279,51 @@ public class ProcessPlatform extends ConfigObject {
 			return BooleanUtils.isTrue(this.enable);
 		}
 
-		public void setCron(String cron) {
-			this.cron = cron;
-		}
+	}
 
-		public void setEnable(Boolean enable) {
-			this.enable = enable;
+	public static class TouchDelay extends ConfigObject {
+
+		public static TouchDelay defaultInstance() {
+			TouchDelay o = new TouchDelay();
+			return o;
 		}
 
-		public String getAuto() {
-			return StringUtils.isEmpty(this.auto) ? DEFAULT_AUTO : this.auto;
+		public final static Boolean DEFAULT_ENABLE = true;
+
+		public final static String DEFAULT_CRON = "5 0/5 * * * ?";
+
+		@FieldDescribe("是否启用")
+		private Boolean enable = DEFAULT_ENABLE;
+
+		@FieldDescribe("定时cron表达式")
+		private String cron = DEFAULT_CRON;
+
+		public String getCron() {
+			if (StringUtils.isNotEmpty(this.cron) && CronExpression.isValidExpression(this.cron)) {
+				return this.cron;
+			} else {
+				return DEFAULT_CRON;
+			}
 		}
 
-		public void setAuto(String auto) {
-			this.auto = auto;
+		public Boolean getEnable() {
+			return BooleanUtils.isTrue(this.enable);
 		}
 
 	}
 
-	public static class Delay extends ConfigObject {
+	public static class DataMerge extends ConfigObject {
 
-		public static Delay defaultInstance() {
-			Delay o = new Delay();
+		public static DataMerge defaultInstance() {
+			DataMerge o = new DataMerge();
 			return o;
 		}
 
-		public final static Boolean DEFAULT_ENABLE = true;
+		public final static Boolean DEFAULT_ENABLE = false;
 
-		public final static String DEFAULT_CRON = "2 2/10 * * * ?";
+		public final static String DEFAULT_CRON = "30 30 6 * * ?";
+
+		public final static Integer DEFAULT_THRESHOLDDAYS = 365 * 2;
 
 		@FieldDescribe("是否启用")
 		private Boolean enable = DEFAULT_ENABLE;
@@ -333,6 +331,9 @@ public class ProcessPlatform extends ConfigObject {
 		@FieldDescribe("定时cron表达式")
 		private String cron = DEFAULT_CRON;
 
+		@FieldDescribe("期限,已完成工作结束间隔指定时间进行merge,默认两年后进行merge")
+		private Integer thresholdDays = DEFAULT_THRESHOLDDAYS;
+
 		public String getCron() {
 			if (StringUtils.isNotEmpty(this.cron) && CronExpression.isValidExpression(this.cron)) {
 				return this.cron;
@@ -345,27 +346,24 @@ public class ProcessPlatform extends ConfigObject {
 			return BooleanUtils.isTrue(this.enable);
 		}
 
-		public void setCron(String cron) {
-			this.cron = cron;
+		public Integer getThresholdDays() {
+			return (null == thresholdDays || thresholdDays < 1) ? DEFAULT_THRESHOLDDAYS : thresholdDays;
 		}
 
-		public void setEnable(Boolean enable) {
-			this.enable = enable;
-		}
 	}
 
-	public static class Reorganize extends ConfigObject {
+	public static class TouchDetained extends ConfigObject {
 
-		public static Reorganize defaultInstance() {
-			Reorganize o = new Reorganize();
+		public static TouchDetained defaultInstance() {
+			TouchDetained o = new TouchDetained();
 			return o;
 		}
 
-		public final static String DEFAULT_CRON = "30 15 8,12,14 * * ?";
+		public final static String DEFAULT_CRON = "30 30 12 * * ?";
 
 		public final static Boolean DEFAULT_ENABLE = true;
 
-		public final static Integer DEFAULT_TRIGGERAFTERMINUTES = 60 * 24;
+		public final static Integer DEFAULT_THRESHOLDMINUTES = 60 * 24;
 
 		@FieldDescribe("是否启用")
 		private Boolean enable = DEFAULT_ENABLE;
@@ -373,8 +371,16 @@ public class ProcessPlatform extends ConfigObject {
 		@FieldDescribe("定时cron表达式")
 		private String cron = DEFAULT_CRON;
 
-		@FieldDescribe("当工作滞留设定时间后,将尝试触发工作流转,可以自动处理由于人员变动的引起的工作滞留.")
-		private Integer triggerAfterMinutes = DEFAULT_TRIGGERAFTERMINUTES;
+		@FieldDescribe("当工作滞留设定时间后,将尝试触发工作流转,可以自动处理由于人员变动的引起的工作滞留,默认24*60分钟.")
+		private Integer thresholdMinutes = DEFAULT_THRESHOLDMINUTES;
+
+		public Integer getThresholdMinutes() {
+			return (null == thresholdMinutes || thresholdMinutes < 0) ? DEFAULT_THRESHOLDMINUTES : thresholdMinutes;
+		}
+
+		public Boolean getEnable() {
+			return BooleanUtils.isTrue(this.enable);
+		}
 
 		public String getCron() {
 			if (StringUtils.isNotEmpty(this.cron) && CronExpression.isValidExpression(this.cron)) {
@@ -384,40 +390,94 @@ public class ProcessPlatform extends ConfigObject {
 			}
 		}
 
+	}
+
+	public static class DeleteDraft extends ConfigObject {
+
+		public static DeleteDraft defaultInstance() {
+			DeleteDraft o = new DeleteDraft();
+			return o;
+		}
+
+		public final static String DEFAULT_CRON = "0 0 20 * * ?";
+
+		public final static Boolean DEFAULT_ENABLE = false;
+
+		public final static Integer DEFAULT_THRESHOLDMINUTES = 60 * 24 * 10;
+
+		@FieldDescribe("是否启用")
+		private Boolean enable = DEFAULT_ENABLE;
+
+		@FieldDescribe("定时cron表达式")
+		private String cron = DEFAULT_CRON;
+
+		@FieldDescribe("设定阈值,如果超过这个时间认为是可以删除的草稿,默认为10天.")
+		private Integer thresholdMinutes = DEFAULT_THRESHOLDMINUTES;
+
+		public Integer getThresholdMinutes() {
+			return (null == thresholdMinutes || thresholdMinutes < 0) ? DEFAULT_THRESHOLDMINUTES : thresholdMinutes;
+		}
+
 		public Boolean getEnable() {
 			return BooleanUtils.isTrue(this.enable);
 		}
 
-		public void setCron(String cron) {
-			this.cron = cron;
+		public String getCron() {
+			if (StringUtils.isNotEmpty(this.cron) && CronExpression.isValidExpression(this.cron)) {
+				return this.cron;
+			} else {
+				return DEFAULT_CRON;
+			}
 		}
 
-		public void setEnable(Boolean enable) {
-			this.enable = enable;
-		}
+	}
+
+	public static class PassExpired extends ConfigObject {
 
-		public Integer getTriggerAfterMinutes() {
-			return null == this.triggerAfterMinutes ? DEFAULT_TRIGGERAFTERMINUTES : this.triggerAfterMinutes;
+		public static PassExpired defaultInstance() {
+			PassExpired o = new PassExpired();
+			return o;
 		}
 
-		public void setTriggerAfterMinutes(Integer triggerAfterMinutes) {
-			this.triggerAfterMinutes = triggerAfterMinutes;
+		public final static String DEFAULT_CRON = "5 5 8-18 * * ?";
+
+		public final static Boolean DEFAULT_ENABLE = true;
+
+		@FieldDescribe("是否启用")
+		private Boolean enable = DEFAULT_ENABLE;
+
+		@FieldDescribe("定时cron表达式")
+		private String cron = DEFAULT_CRON;
+
+		public Boolean getEnable() {
+			return BooleanUtils.isTrue(this.enable);
 		}
 
+		public String getCron() {
+			if (StringUtils.isNotEmpty(this.cron) && CronExpression.isValidExpression(this.cron)) {
+				return this.cron;
+			} else {
+				return DEFAULT_CRON;
+			}
+		}
 	}
 
-	public static class DataMerge extends ConfigObject {
+	public static class LogLongDetained extends ConfigObject {
 
-		public static DataMerge defaultInstance() {
-			DataMerge o = new DataMerge();
+		public static LogLongDetained defaultInstance() {
+			LogLongDetained o = new LogLongDetained();
 			return o;
 		}
 
-		public final static Boolean DEFAULT_ENABLE = false;
+		public final static String DEFAULT_CRON = "0 0 4 * * ?";
 
-		public final static String DEFAULT_CRON = "30 30 6 * * ?";
+		public final static Boolean DEFAULT_ENABLE = true;
+
+		public final static Integer DEFAULT_TASKTHRESHOLDMINUTES = 60 * 24 * 10;
+
+		public final static Integer DEFAULT_READTHRESHOLDMINUTES = 60 * 24 * 10;
 
-		public final static Integer DEFAULT_PERIOD = 365 * 2;
+		public final static Integer DEFAULT_WORKTHRESHOLDMINUTES = 60 * 24 * 10;
 
 		@FieldDescribe("是否启用")
 		private Boolean enable = DEFAULT_ENABLE;
@@ -425,8 +485,33 @@ public class ProcessPlatform extends ConfigObject {
 		@FieldDescribe("定时cron表达式")
 		private String cron = DEFAULT_CRON;
 
-		@FieldDescribe("期限,已完成工作结束间隔指定时间进行merge,默认两年后进行merge")
-		private Integer period = DEFAULT_PERIOD;
+		@FieldDescribe("设定待办滞留阈值,.")
+		private Integer taskThresholdMinutes = DEFAULT_TASKTHRESHOLDMINUTES;
+
+		@FieldDescribe("设定待阅滞留阈值,.")
+		private Integer readThresholdMinutes = DEFAULT_READTHRESHOLDMINUTES;
+
+		@FieldDescribe("设定工作滞留阈值,.")
+		private Integer workThresholdMinutes = DEFAULT_WORKTHRESHOLDMINUTES;
+
+		public Integer getTaskThresholdMinutes() {
+			return (null == taskThresholdMinutes || taskThresholdMinutes < 0) ? DEFAULT_TASKTHRESHOLDMINUTES
+					: taskThresholdMinutes;
+		}
+
+		public Integer getReadThresholdMinutes() {
+			return (null == readThresholdMinutes || readThresholdMinutes < 0) ? DEFAULT_READTHRESHOLDMINUTES
+					: readThresholdMinutes;
+		}
+
+		public Integer getWorkThresholdMinutes() {
+			return (null == workThresholdMinutes || workThresholdMinutes < 0) ? DEFAULT_WORKTHRESHOLDMINUTES
+					: workThresholdMinutes;
+		}
+
+		public Boolean getEnable() {
+			return BooleanUtils.isTrue(this.enable);
+		}
 
 		public String getCron() {
 			if (StringUtils.isNotEmpty(this.cron) && CronExpression.isValidExpression(this.cron)) {
@@ -436,25 +521,41 @@ public class ProcessPlatform extends ConfigObject {
 			}
 		}
 
-		public Boolean getEnable() {
-			return BooleanUtils.isTrue(this.enable) && (null != this.period) && (this.period > -1);
+	}
+
+	public static class Press extends ConfigObject {
+
+		public static Press defaultInstance() {
+			Press o = new Press();
+			return o;
 		}
 
-		public void setCron(String cron) {
-			this.cron = cron;
+		public final static Integer DEFAULT_INTERVALMINUTES = 10;
+
+		public final static Integer DEFAULT_COUNT = 3;
+
+		@FieldDescribe("提醒间隔(分钟)")
+		private Integer intervalMinutes;
+
+		@FieldDescribe("提醒数量限制.")
+		private Integer count;
+
+		public Integer getIntervalMinutes() {
+			return (intervalMinutes == null || intervalMinutes < 1) ? DEFAULT_INTERVALMINUTES : this.intervalMinutes;
 		}
 
-		public void setEnable(Boolean enable) {
-			this.enable = enable;
+		public Integer getCount() {
+			return (count == null || count < 0) ? DEFAULT_COUNT : this.count;
 		}
 
-		public Integer getPeriod() {
-			return period;
+		public void setIntervalMinutes(Integer intervalMinutes) {
+			this.intervalMinutes = intervalMinutes;
 		}
 
-		public void setPeriod(Integer period) {
-			this.period = period;
+		public void setCount(Integer count) {
+			this.count = count;
 		}
+
 	}
 
 }

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

@@ -21,6 +21,7 @@ public class WebServer extends ConfigObject {
 		this.dirAllowed = DEFAULT_DIRALLOWED;
 		this.statEnable = DEFAULT_STATENABLE;
 		this.statExclusions = DEFAULT_STATEXCLUSIONS;
+		this.cacheControlMaxAge = DEFAULT_CACHECONTROLMAXAGE;
 	}
 
 	private static final Integer DEFAULT_HTTP_PORT = 80;
@@ -29,6 +30,7 @@ public class WebServer extends ConfigObject {
 	private static final Boolean DEFAULT_DIRALLOWED = false;
 	private static final Boolean DEFAULT_STATENABLE = false;
 	private static final String DEFAULT_STATEXCLUSIONS = "*.gif,*.jpg,*.png,*.ico";
+	private static final Integer DEFAULT_CACHECONTROLMAXAGE = 0;
 
 	@FieldDescribe("是否启用")
 	private Boolean enable;
@@ -48,6 +50,15 @@ public class WebServer extends ConfigObject {
 	private Boolean statEnable;
 	@FieldDescribe("统计忽略路径,默认忽略*.gif,*.jpg,*.png,*.ico")
 	private String statExclusions;
+	@FieldDescribe("服务器max-age缓存时间(秒)")
+	private Integer cacheControlMaxAge;
+
+	public Integer getCacheControlMaxAge() {
+		if (cacheControlMaxAge == null || cacheControlMaxAge < 0) {
+			return DEFAULT_CACHECONTROLMAXAGE;
+		}
+		return cacheControlMaxAge;
+	}
 
 	public String getStatExclusions() {
 		return (StringUtils.isEmpty(statExclusions) ? DEFAULT_STATEXCLUSIONS : this.statExclusions) + ",/druid/*";

+ 5 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/executor/CallWrapObject.java

@@ -0,0 +1,5 @@
+package com.x.base.core.project.executor;
+
+public class CallWrapObject {
+	public String executorSeed;
+}

+ 48 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/executor/ProcessPlatformExecutorFactory.java

@@ -0,0 +1,48 @@
+package com.x.base.core.project.executor;
+
+import java.util.Objects;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.zip.CRC32;
+
+import com.x.base.core.project.config.Config;
+
+public class ProcessPlatformExecutorFactory {
+
+	private static ExecutorService[] executors;
+
+//	private static int count;
+//
+//	public static ExecutorService get(String seed) throws Exception {
+//		if (null == executors) {
+//			synchronized (ProcessPlatformExecutorServiceFactory.class) {
+//				if (null == executors) {
+//					count = Config.processPlatform().getExecutorCount();
+//					executors = new ExecutorService[count];
+//					for (int i = 0; i < count; i++) {
+//						executors[i] = Executors.newSingleThreadExecutor();
+//					}
+//				}
+//			}
+//		}
+//		CRC32 crc32 = new CRC32();
+//		crc32.update(Objects.toString(seed, "").getBytes());
+//		int idx = (int) (crc32.getValue() % count);
+//		return executors[idx];
+//	}
+
+	public static ExecutorService get(String seed) throws Exception {
+		if (null == executors) {
+			synchronized (ProcessPlatformExecutorFactory.class) {
+				if (null == executors) {
+					executors = Config.resource_node_processPlatformExecutors();
+				}
+			}
+		}
+		CRC32 crc32 = new CRC32();
+		crc32.update(Objects.toString(seed, "").getBytes());
+		int idx = (int) (crc32.getValue() % executors.length);
+		return executors[idx];
+	}
+
+}

+ 35 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/gson/XGsonBuilder.java

@@ -3,6 +3,7 @@ package com.x.base.core.project.gson;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.commons.lang3.StringUtils;
 
@@ -162,4 +163,38 @@ public class XGsonBuilder {
 		}
 	}
 
+	public static JsonElement merge(JsonElement from, JsonElement to) throws Exception {
+		if (from == null) {
+			throw new Exception("from jsonElement can't be null.");
+		}
+		if (to == null) {
+			throw new Exception("to jsonElement can't be null.");
+		}
+		if (!from.isJsonObject()) {
+			throw new Exception("from jsonElement must be a jsonObject.");
+		}
+		if (!to.isJsonObject()) {
+			throw new Exception("to jsonElement must be a jsonObject.");
+		}
+		return merge(from.getAsJsonObject(), to.deepCopy().getAsJsonObject());
+	}
+
+	private static JsonObject merge(JsonObject from, JsonObject to) {
+		for (Map.Entry<String, JsonElement> fromEntry : from.entrySet()) {
+			String key = fromEntry.getKey();
+			JsonElement fromValue = fromEntry.getValue();
+			if (to.has(key)) {
+				JsonElement toValue = to.get(key);
+				if ((!fromValue.isJsonObject()) || (!toValue.isJsonObject())) {
+					to.add(key, fromValue);
+				} else {
+					merge(fromValue.getAsJsonObject(), toValue.getAsJsonObject());
+				}
+			} else {
+				to.add(key, fromValue);
+			}
+		}
+		return to;
+	}
+
 }

+ 18 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/CacheControlFactory.java

@@ -0,0 +1,18 @@
+package com.x.base.core.project.jaxrs;
+
+import javax.ws.rs.core.CacheControl;
+
+public class CacheControlFactory {
+	public static CacheControl getDefault() {
+		CacheControl cc = new CacheControl();
+		cc.setNoCache(true);
+		return cc;
+	}
+
+	public static CacheControl getMaxAge(Integer max) {
+		CacheControl cc = new CacheControl();
+		cc.setMaxAge(max);
+		return cc;
+	}
+
+}

+ 59 - 99
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/ResponseFactory.java

@@ -5,9 +5,9 @@ import java.util.Objects;
 import java.util.zip.CRC32;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.CacheControl;
 import javax.ws.rs.core.EntityTag;
 import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.ResponseBuilder;
 
 import org.apache.commons.lang3.StringUtils;
 import org.eclipse.jetty.http.HttpHeader;
@@ -20,57 +20,55 @@ import com.x.base.core.project.tools.DefaultCharset;
 
 public class ResponseFactory {
 
-	// private static CacheControl defaultCacheControl =
-	// CacheControlFactory.getDefault();
+	private static CacheControl defaultCacheControl = CacheControlFactory.getDefault();
 
 	public static final String Content_Disposition = "Content-Disposition";
 	// public static final String Content_Length = "Content-Length";
 	public static final String Accept_Ranges = "Accept-Ranges";
 	public static final String Content_Type = "Content-Type";
 
-//	public static <T> Response getDefaultActionResultResponse(ActionResult<T> result) {
-//		if (result.getType().equals(ActionResult.Type.error)) {
-//			if ((result.throwable instanceof CallbackPromptException)) {
-//				return Response.ok(callbackError(result)).build();
-//			} else {
-//				return Response.serverError().entity(result.toJson()).build();
-//			}
-//		} else {
-//			if ((null != result.getData()) && (result.getData() instanceof WoFile)) {
-//				/* 附件,二进制流文件 */
-//				WoFile wo = (WoFile) result.getData();
-//				return Response.ok(wo.getBytes()).header(Content_Disposition, wo.getContentDisposition())
-//						.header(Content_Type, wo.getContentType()).header(Accept_Ranges, "bytes").tag(etagWoFile(wo))
-//						.build();
-//			} else if ((null != result.getData()) && (result.getData() instanceof WoText)) {
-//				/* 纯文本text */
-//				WoText wo = (WoText) result.getData();
-//				return Response.ok(wo.getText()).type(HttpMediaType.TEXT_PLAIN_UTF_8).tag(etagWoText(wo)).build();
-//			} else if ((null != result.getData()) && (result.getData() instanceof WoCallback)) {
-//				/* jsonp callback */
-//				return Response.ok(callback((WoCallback) result.getData())).build();
-//			} else if ((null != result.getData()) && (result.getData() instanceof WoSeeOther)) {
-//				/* 303 */
-//				WoSeeOther wo = (WoSeeOther) result.getData();
-//				try {
-//					return Response.seeOther(new URI(wo.getUrl())).build();
-//				} catch (Exception e) {
-//					return Response.serverError().entity(Objects.toString(wo.getUrl(), "")).build();
-//				}
-//			} else if ((null != result.getData()) && (result.getData() instanceof WoTemporaryRedirect)) {
-//				/* 304 */
-//				WoTemporaryRedirect wo = (WoTemporaryRedirect) result.getData();
-//				try {
-//					return Response.temporaryRedirect(new URI(wo.getUrl())).build();
-//				} catch (Exception e) {
-//					return Response.serverError().entity(Objects.toString(wo.getUrl(), "")).build();
-//				}
-//			} else {
-//				/* default */
-//				return Response.ok(result.toJson()).tag(etagDefault(result.getData())).build();
-//			}
-//		}
-//	}
+	public static <T> Response getDefaultActionResultResponse(ActionResult<T> result) {
+		if (result.getType().equals(ActionResult.Type.error)) {
+			if ((result.throwable instanceof CallbackPromptException)) {
+				return Response.ok(callbackError(result)).cacheControl(defaultCacheControl).build();
+			} else {
+				return Response.serverError().entity(result.toJson()).cacheControl(defaultCacheControl).build();
+			}
+		} else {
+			if ((null != result.getData()) && (result.getData() instanceof WoFile)) {
+				WoFile wo = (WoFile) result.getData();
+				return Response.ok(wo.getBytes()).header(Content_Disposition, wo.getContentDisposition())
+						.header(Content_Type, wo.getContentType()).header(Accept_Ranges, "bytes").build();
+			} else if ((null != result.getData()) && (result.getData() instanceof WoText)) {
+				WoText wo = (WoText) result.getData();
+				return Response.ok(wo.getText()).cacheControl(defaultCacheControl).type(HttpMediaType.TEXT_PLAIN_UTF_8)
+						.build();
+			} else if ((null != result.getData()) && (result.getData() instanceof WoContentType)) {
+				WoContentType wo = (WoContentType) result.getData();
+				return Response.ok(wo.getBody()).type(wo.getContentType()).build();
+			} else if ((null != result.getData()) && (result.getData() instanceof WoCallback)) {
+				return Response.ok(callback((WoCallback) result.getData())).cacheControl(defaultCacheControl).build();
+			} else if ((null != result.getData()) && (result.getData() instanceof WoSeeOther)) {
+				WoSeeOther wo = (WoSeeOther) result.getData();
+				try {
+					return Response.seeOther(new URI(wo.getUrl())).build();
+				} catch (Exception e) {
+					return Response.serverError().entity(Objects.toString(wo.getUrl(), ""))
+							.cacheControl(defaultCacheControl).build();
+				}
+			} else if ((null != result.getData()) && (result.getData() instanceof WoTemporaryRedirect)) {
+				WoTemporaryRedirect wo = (WoTemporaryRedirect) result.getData();
+				try {
+					return Response.temporaryRedirect(new URI(wo.getUrl())).build();
+				} catch (Exception e) {
+					return Response.serverError().entity(Objects.toString(wo.getUrl(), ""))
+							.cacheControl(defaultCacheControl).build();
+				}
+			} else {
+				return Response.ok(result.toJson()).cacheControl(defaultCacheControl).build();
+			}
+		}
+	}
 
 	public static <T> Response getEntityTagActionResultResponse(HttpServletRequest request, ActionResult<T> result) {
 		if (result.getType().equals(ActionResult.Type.error)) {
@@ -88,8 +86,7 @@ public class ResponseFactory {
 					return Response.notModified().tag(tag).build();
 				}
 				return Response.ok(wo.getBytes()).header(Content_Disposition, wo.getContentDisposition())
-						.header(Content_Type, wo.getContentType()).header(Accept_Ranges, "bytes").tag(etagWoFile(wo))
-						.build();
+						.header(Content_Type, wo.getContentType()).header(Accept_Ranges, "bytes").tag(tag).build();
 			} else if ((null != result.getData()) && (result.getData() instanceof WoText)) {
 				/* 纯文本text */
 				WoText wo = (WoText) result.getData();
@@ -97,7 +94,14 @@ public class ResponseFactory {
 				if (notModified(request, tag)) {
 					return Response.notModified().tag(tag).build();
 				}
-				return Response.ok(wo.getText()).type(HttpMediaType.TEXT_PLAIN_UTF_8).tag(etagWoText(wo)).build();
+				return Response.ok(wo.getText()).type(HttpMediaType.TEXT_PLAIN_UTF_8).tag(tag).build();
+			} else if ((null != result.getData()) && (result.getData() instanceof WoContentType)) {
+				WoContentType wo = (WoContentType) result.getData();
+				EntityTag tag = new EntityTag(etagWoContentType(wo));
+				if (notModified(request, tag)) {
+					return Response.notModified().tag(tag).build();
+				}
+				return Response.ok(wo.getBody()).type(wo.getContentType()).tag(tag).build();
 			} else if ((null != result.getData()) && (result.getData() instanceof WoCallback)) {
 				/* jsonp callback */
 				return Response.ok(callback((WoCallback) result.getData())).build();
@@ -128,56 +132,6 @@ public class ResponseFactory {
 		}
 	}
 
-//	private static CacheControl maxAgeCacheControl = CacheControlFactory.getMaxAge(259200);
-//
-//	public static <T> Response getMaxAgeActionResultResponse(ActionResult<T> result) {
-//		if (result.getType().equals(ActionResult.Type.error)) {
-//			if ((result.throwable instanceof CallbackPromptException)) {
-//				return Response.ok(callbackError(result)).cacheControl(maxAgeCacheControl).build();
-//			} else {
-//				return Response.serverError().entity(result.toJson()).cacheControl(maxAgeCacheControl).build();
-//			}
-//		} else {
-//			if ((null != result.getData()) && (result.getData() instanceof WoFile)) {
-//				/* 附件,二进制流文件 */
-//				WoFile wo = (WoFile) result.getData();
-//				return Response.ok(wo.getBytes()).header(Content_Disposition, wo.getContentDisposition())
-//						.header(Content_Type, wo.getContentType()).header(Accept_Ranges, "bytes")
-//						.cacheControl(maxAgeCacheControl).tag(etagWoFile(wo)).build();
-//			} else if ((null != result.getData()) && (result.getData() instanceof WoText)) {
-//				/* 纯文本text */
-//				WoText wo = (WoText) result.getData();
-//				return Response.ok(wo.getText()).type(HttpMediaType.TEXT_PLAIN_UTF_8).cacheControl(maxAgeCacheControl)
-//						.tag(etagWoText(wo)).build();
-//			} else if ((null != result.getData()) && (result.getData() instanceof WoCallback)) {
-//				/* jsonp callback */
-//				return Response.ok(callback((WoCallback) result.getData())).cacheControl(maxAgeCacheControl).build();
-//			} else if ((null != result.getData()) && (result.getData() instanceof WoSeeOther)) {
-//				/* 303 */
-//				WoSeeOther wo = (WoSeeOther) result.getData();
-//				try {
-//					return Response.seeOther(new URI(wo.getUrl())).cacheControl(maxAgeCacheControl).build();
-//				} catch (Exception e) {
-//					return Response.serverError().entity(Objects.toString(wo.getUrl(), ""))
-//							.cacheControl(maxAgeCacheControl).build();
-//				}
-//			} else if ((null != result.getData()) && (result.getData() instanceof WoTemporaryRedirect)) {
-//				/* 304 */
-//				WoTemporaryRedirect wo = (WoTemporaryRedirect) result.getData();
-//				try {
-//					return Response.temporaryRedirect(new URI(wo.getUrl())).cacheControl(maxAgeCacheControl).build();
-//				} catch (Exception e) {
-//					return Response.serverError().entity(Objects.toString(wo.getUrl(), ""))
-//							.cacheControl(maxAgeCacheControl).build();
-//				}
-//			} else {
-//				/* default */
-//				return Response.ok(result.toJson()).cacheControl(maxAgeCacheControl).tag(etagDefault(result.getData()))
-//						.build();
-//			}
-//		}
-//	}
-
 	private static boolean notModified(HttpServletRequest request, EntityTag tag) {
 		String If_None_Match = request.getHeader(HttpHeader.IF_NONE_MATCH.toString());
 		if (StringUtils.isNotEmpty(If_None_Match)) {
@@ -194,6 +148,12 @@ public class ResponseFactory {
 		return crc.getValue() + "";
 	}
 
+	private static String etagWoContentType(WoContentType wo) {
+		CRC32 crc = new CRC32();
+		crc.update((wo.getBody().toString() + wo.getContentType()).getBytes());
+		return crc.getValue() + "";
+	}
+
 	private static String etagWoText(WoText wo) {
 		CRC32 crc = new CRC32();
 		crc.update(wo.getText().getBytes(DefaultCharset.charset_utf_8));

+ 38 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/WoContentType.java

@@ -0,0 +1,38 @@
+package com.x.base.core.project.jaxrs;
+
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.gson.GsonPropertyObject;
+
+public class WoContentType extends GsonPropertyObject {
+
+	public WoContentType() {
+	}
+
+	public WoContentType(Object body, String contentType) {
+		this.body = body;
+		this.contentType = contentType;
+	}
+
+	@FieldDescribe("地址.")
+	private String contentType;
+
+	@FieldDescribe("内容.")
+	private Object body;
+
+	public String getContentType() {
+		return contentType;
+	}
+
+	public void setContentType(String contentType) {
+		this.contentType = contentType;
+	}
+
+	public Object getBody() {
+		return body;
+	}
+
+	public void setBody(Object body) {
+		this.body = body;
+	}
+
+}

+ 1 - 1
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/WoText.java

@@ -2,7 +2,7 @@ package com.x.base.core.project.jaxrs;
 
 import com.x.base.core.project.annotation.FieldDescribe;
 
-public abstract class WoText{
+public class WoText {
 
 	public WoText() {
 	}

+ 0 - 50
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/metrics/MetricsTimer.java

@@ -1,50 +0,0 @@
-package com.x.base.core.project.jaxrs.metrics;
-
-public class MetricsTimer {
-    private String timerName;
-    private double rate;
-    private String unit;
-    private String showMessage;
-
-    public MetricsTimer() {
-    }
-
-    public MetricsTimer(final String timerName, final double rate, final String unit, String showMessage) {
-        this.timerName = timerName;
-        this.rate = rate;
-        this.unit = unit;
-        this.showMessage = showMessage;
-    }
-
-    public String getTimerName() {
-        return this.timerName;
-    }
-
-    public void setTimerName(final String timerName) {
-        this.timerName = timerName;
-    }
-
-    public double getRate() {
-        return this.rate;
-    }
-
-    public void setRate(final double rate) {
-        this.rate = rate;
-    }
-
-    public String getUnit() {
-        return this.unit;
-    }
-
-    public void setUnit(final String unit) {
-        this.unit = unit;
-    }
-
-    public String getShowMessage() {
-        return this.showMessage;
-    }
-
-    public void setShowMessage(final String showMessage) {
-        this.showMessage = showMessage;
-    }
-}

+ 0 - 194
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/metrics/MetricsTimerReport.java

@@ -1,194 +0,0 @@
-package com.x.base.core.project.jaxrs.metrics;
-
-public class MetricsTimerReport {
-
-    private String targetClassName;
-
-    private String targetContextName;
-
-    private String targetContextCNName;
-
-    private String dateTime;
-
-    private Long count;
-
-    private MetricsTimer mean_rate;
-
-    private MetricsTimer m1_rate;
-
-    private MetricsTimer m5_rate;
-
-    private MetricsTimer m15_rate;
-
-    private MetricsTimer min;
-
-    private MetricsTimer max;
-
-    private MetricsTimer mean;
-
-    private MetricsTimer stddev;
-
-    private MetricsTimer p50;
-
-    private MetricsTimer p75;
-
-    private MetricsTimer p95;
-
-    private MetricsTimer p98;
-
-    private MetricsTimer p99;
-
-    private MetricsTimer p999;
-
-    public String getTargetContextCNName() {
-        return this.targetContextCNName;
-    }
-
-    public void setTargetContextCNName(final String targetContextCNName) {
-        this.targetContextCNName = targetContextCNName;
-    }
-
-    public String getDateTime() {
-        return this.dateTime;
-    }
-
-    public void setDateTime(final String dateTime) {
-        this.dateTime = dateTime;
-    }
-
-    public String getTargetClassName() {
-        return this.targetClassName;
-    }
-
-    public void setTargetClassName(final String targetClassName) {
-        this.targetClassName = targetClassName;
-    }
-
-    public String getTargetContextName() {
-        return this.targetContextName;
-    }
-
-    public void setTargetContextName(final String targetContextName) {
-        this.targetContextName = targetContextName;
-    }
-
-    public Long getCount() {
-        return this.count;
-    }
-
-    public void setCount(final Long count) {
-        this.count = count;
-    }
-
-    public MetricsTimer getMean_rate() {
-        return this.mean_rate;
-    }
-
-    public void setMean_rate(final MetricsTimer mean_rate) {
-        this.mean_rate = mean_rate;
-    }
-
-    public MetricsTimer getM1_rate() {
-        return this.m1_rate;
-    }
-
-    public void setM1_rate(final MetricsTimer m1_rate) {
-        this.m1_rate = m1_rate;
-    }
-
-    public MetricsTimer getM5_rate() {
-        return this.m5_rate;
-    }
-
-    public void setM5_rate(final MetricsTimer m5_rate) {
-        this.m5_rate = m5_rate;
-    }
-
-    public MetricsTimer getM15_rate() {
-        return this.m15_rate;
-    }
-
-    public void setM15_rate(final MetricsTimer m15_rate) {
-        this.m15_rate = m15_rate;
-    }
-
-    public MetricsTimer getMin() {
-        return this.min;
-    }
-
-    public void setMin(final MetricsTimer min) {
-        this.min = min;
-    }
-
-    public MetricsTimer getMax() {
-        return this.max;
-    }
-
-    public void setMax(final MetricsTimer max) {
-        this.max = max;
-    }
-
-    public MetricsTimer getMean() {
-        return this.mean;
-    }
-
-    public void setMean(final MetricsTimer mean) {
-        this.mean = mean;
-    }
-
-    public MetricsTimer getStddev() {
-        return this.stddev;
-    }
-
-    public void setStddev(final MetricsTimer stddev) {
-        this.stddev = stddev;
-    }
-
-    public MetricsTimer getP50() {
-        return this.p50;
-    }
-
-    public void setP50(final MetricsTimer p50) {
-        this.p50 = p50;
-    }
-
-    public MetricsTimer getP75() {
-        return this.p75;
-    }
-
-    public void setP75(final MetricsTimer p75) {
-        this.p75 = p75;
-    }
-
-    public MetricsTimer getP95() {
-        return this.p95;
-    }
-
-    public void setP95(final MetricsTimer p95) {
-        this.p95 = p95;
-    }
-
-    public MetricsTimer getP98() {
-        return this.p98;
-    }
-
-    public void setP98(final MetricsTimer p98) {
-        this.p98 = p98;
-    }
-
-    public MetricsTimer getP99() {
-        return this.p99;
-    }
-
-    public void setP99(final MetricsTimer p99) {
-        this.p99 = p99;
-    }
-
-    public MetricsTimer getP999() {
-        return this.p999;
-    }
-
-    public void setP999(final MetricsTimer p999) {
-        this.p999 = p999;
-    }
-}

+ 0 - 164
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/metrics/StandardJaxrsActionReporter.java

@@ -1,164 +0,0 @@
-package com.x.base.core.project.jaxrs.metrics;
-
-import com.codahale.metrics.Timer;
-import com.codahale.metrics.*;
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.x.base.core.project.Context;
-import com.x.base.core.project.config.Config;
-import com.x.base.core.project.connection.ActionResponse;
-import com.x.base.core.project.connection.CipherConnectionAction;
-import com.x.base.core.project.gson.XGsonBuilder;
-
-import java.io.PrintStream;
-import java.text.DateFormat;
-import java.util.*;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
-public class StandardJaxrsActionReporter extends ScheduledReporter {
-    private Gson gson = XGsonBuilder.instance();
-    private static final int CONSOLE_WIDTH = 80;
-    private final PrintStream output;
-    private final Locale locale;
-    private final Clock clock;
-    private final DateFormat dateFormat;
-    private Context context;
-
-    public static StandardJaxrsActionReporter.Builder forRegistry( MetricRegistry registry ) {
-        return new StandardJaxrsActionReporter.Builder(registry);
-    }
-
-    private StandardJaxrsActionReporter(MetricRegistry registry, PrintStream output, Locale locale, Clock clock, TimeZone timeZone, TimeUnit rateUnit, TimeUnit durationUnit, MetricFilter filter, ScheduledExecutorService executor, boolean shutdownExecutorOnStop, Set<MetricAttribute> disabledMetricAttributes, Context context) {
-        super(registry, "jaxrs-action-reporter", filter, rateUnit, durationUnit, executor, shutdownExecutorOnStop, disabledMetricAttributes);
-        this.context = context;
-        this.output = output;
-        this.locale = locale;
-        this.clock = clock;
-        this.dateFormat = DateFormat.getDateTimeInstance(3, 2, locale);
-        this.dateFormat.setTimeZone(timeZone);
-    }
-
-    public void report( SortedMap<String, Gauge> gauges, SortedMap<String, Counter> counters, SortedMap<String, Histogram> histograms, SortedMap<String, Meter> meters, SortedMap<String, Timer> timers) {
-        String nodeName = null;
-        JsonElement jsonData = null;
-
-        //将timers数据全部转为Json发送到center指定接口
-        try {
-            nodeName = Config.node();
-            jsonData = gson.toJsonTree( getMetricsTimers(timers) );
-            ActionResponse respone = CipherConnectionAction.put(false,
-                    Config.url_x_program_center_jaxrs("center", "metrics" ) + "/" + nodeName, jsonData);
-        } catch (Exception e) {
-            System.out.println("metrics report to center server got an error!" + e.getMessage() );
-        }
-    }
-
-    private Map<String , MetricsTimerReport> getMetricsTimers(SortedMap<String, Timer> timers ){
-        String dateTime = this.dateFormat.format(new Date(this.clock.getTime()));
-        Map<String, MetricsTimerReport> timerReportMap = new HashMap<>();
-        MetricsTimerReport metricsTimerReport = null;
-        if (!timers.isEmpty()) {
-            Map.Entry entry;
-            Iterator var7 = timers.entrySet().iterator();
-            while(var7.hasNext()) {
-                try{
-                    entry = (Map.Entry)var7.next();
-                    metricsTimerReport = getMetricsTimerReport((Timer)entry.getValue());
-                    metricsTimerReport.setTargetContextName( context.servletContextName() );
-                    metricsTimerReport.setTargetContextCNName( context.name() );
-                    metricsTimerReport.setTargetClassName( (String)entry.getKey() );
-                    metricsTimerReport.setDateTime( dateTime );
-                    timerReportMap.put( (String)entry.getKey(), metricsTimerReport );
-                }catch(Exception e ){
-                    e.printStackTrace();
-                }
-            }
-        }
-        return timerReportMap;
-    }
-
-    private MetricsTimerReport getMetricsTimerReport(Timer timer) {
-        Snapshot snapshot = timer.getSnapshot();
-
-        MetricsTimerReport metricsTimerReport = new MetricsTimerReport();
-        metricsTimerReport.setCount(timer.getCount());
-        metricsTimerReport.setMean_rate(new MetricsTimer( MetricAttribute.MEAN_RATE.name(), this.convertRate(timer.getMeanRate()), this.getRateUnit(),
-                        String.format(this.locale, "mean rate = %2.2f calls/%s", this.convertRate(timer.getMeanRate()), this.getRateUnit())));
-        metricsTimerReport.setM1_rate(new MetricsTimer( MetricAttribute.M1_RATE.name(), this.convertRate(timer.getOneMinuteRate()), this.getRateUnit(),
-                String.format(this.locale, "1-minute rate = %2.2f calls/%s", this.convertRate(timer.getOneMinuteRate()), this.getRateUnit())));
-        metricsTimerReport.setM5_rate(new MetricsTimer( MetricAttribute.M5_RATE.name(), this.convertRate(timer.getFiveMinuteRate()), this.getRateUnit(),
-                String.format(this.locale, "5-minute rate = %2.2f calls/%s", this.convertRate(timer.getFiveMinuteRate()), this.getRateUnit())));
-        metricsTimerReport.setM15_rate(new MetricsTimer( MetricAttribute.M15_RATE.name(), this.convertRate(timer.getFifteenMinuteRate()), this.getRateUnit(),
-                String.format(this.locale, "15-minute rate = %2.2f calls/%s", this.convertRate(timer.getFifteenMinuteRate()), this.getRateUnit())));
-        metricsTimerReport.setMin(new MetricsTimer( MetricAttribute.MIN.name(), this.convertDuration((double)snapshot.getMin()), this.getDurationUnit(),
-                String.format(this.locale, "min = %2.2f %s", this.convertDuration((double)snapshot.getMin()), this.getDurationUnit())));
-        metricsTimerReport.setMax(new MetricsTimer( MetricAttribute.MAX.name(), this.convertDuration((double)snapshot.getMax()), this.getDurationUnit(),
-                String.format(this.locale, "max = %2.2f %s", this.convertDuration((double)snapshot.getMax()), this.getDurationUnit())));
-        metricsTimerReport.setMean(new MetricsTimer( MetricAttribute.MEAN.name(), this.convertDuration((double)snapshot.getMean()), this.getDurationUnit(),
-                String.format(this.locale, "mean = %2.2f %s", this.convertDuration((double)snapshot.getMean()), this.getDurationUnit())));
-        metricsTimerReport.setStddev(new MetricsTimer( MetricAttribute.STDDEV.name(), this.convertDuration((double)snapshot.getStdDev()), this.getDurationUnit(),
-                String.format(this.locale, "stddev = %2.2f %s", this.convertDuration((double)snapshot.getStdDev()), this.getDurationUnit())));
-        metricsTimerReport.setP50(new MetricsTimer( MetricAttribute.P50.name(), this.convertDuration((double)snapshot.getMedian()), this.getDurationUnit(),
-                String.format(this.locale, "median = %2.2f %s", this.convertDuration((double)snapshot.getMedian()), this.getDurationUnit())));
-        metricsTimerReport.setP75(new MetricsTimer( MetricAttribute.P75.name(), this.convertDuration((double)snapshot.get75thPercentile()), this.getDurationUnit(),
-                String.format(this.locale, "75%% <= %2.2f %s", this.convertDuration((double)snapshot.get75thPercentile()), this.getDurationUnit())));
-        metricsTimerReport.setP95(new MetricsTimer( MetricAttribute.P95.name(), this.convertDuration((double)snapshot.get95thPercentile()), this.getDurationUnit(),
-                String.format(this.locale, "95%% <= %2.2f %s", this.convertDuration((double)snapshot.get95thPercentile()), this.getDurationUnit())));
-        metricsTimerReport.setP98(new MetricsTimer( MetricAttribute.P98.name(), this.convertDuration((double)snapshot.get98thPercentile()), this.getDurationUnit(),
-                String.format(this.locale, "98%% <= %2.2f %s", this.convertDuration((double)snapshot.get98thPercentile()), this.getDurationUnit())));
-        metricsTimerReport.setP99(new MetricsTimer( MetricAttribute.P99.name(), this.convertDuration((double)snapshot.get99thPercentile()), this.getDurationUnit(),
-                String.format(this.locale, "99%% <= %2.2f %s", this.convertDuration((double)snapshot.get99thPercentile()), this.getDurationUnit())));
-        metricsTimerReport.setP999(new MetricsTimer( MetricAttribute.P999.name(), this.convertDuration((double)snapshot.get999thPercentile()), this.getDurationUnit(),
-                String.format(this.locale, "99.9%% <= %2.2f %s", this.convertDuration((double)snapshot.get999thPercentile()), this.getDurationUnit())));
-        return metricsTimerReport;
-    }
-
-    public static class Builder {
-        private final MetricRegistry registry;
-        private PrintStream output;
-        private Locale locale;
-        private Clock clock;
-        private TimeZone timeZone;
-        private TimeUnit rateUnit;
-        private TimeUnit durationUnit;
-        private MetricFilter filter;
-        private ScheduledExecutorService executor;
-        private boolean shutdownExecutorOnStop;
-        private Set<MetricAttribute> disabledMetricAttributes;
-
-        private Builder(MetricRegistry registry) {
-            this.registry = registry;
-            this.output = System.out;
-            this.locale = Locale.getDefault();
-            this.clock = Clock.defaultClock();
-            this.timeZone = TimeZone.getDefault();
-            this.rateUnit = TimeUnit.SECONDS;
-            this.durationUnit = TimeUnit.MILLISECONDS;
-            this.filter = MetricFilter.ALL;
-            this.executor = null;
-            this.shutdownExecutorOnStop = true;
-            this.disabledMetricAttributes = Collections.emptySet();
-        }
-
-        public StandardJaxrsActionReporter.Builder convertRatesTo(TimeUnit rateUnit) {
-            this.rateUnit = rateUnit;
-            return this;
-        }
-
-        public StandardJaxrsActionReporter.Builder convertDurationsTo(TimeUnit durationUnit) {
-            this.durationUnit = durationUnit;
-            return this;
-        }
-
-        public StandardJaxrsActionReporter.Builder filter(MetricFilter filter) {
-            this.filter = filter;
-            return this;
-        }
-
-        public StandardJaxrsActionReporter build( Context context ) {
-            return new StandardJaxrsActionReporter(this.registry, this.output, this.locale, this.clock, this.timeZone, this.rateUnit,
-                    this.durationUnit, this.filter, this.executor, this.shutdownExecutorOnStop, this.disabledMetricAttributes, context);
-        }
-    }
-}

+ 1 - 27
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/proxy/StandardJaxrsActionProxy.java

@@ -18,20 +18,11 @@ import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
 
 public class StandardJaxrsActionProxy implements MethodInterceptor {
-// 2019-11-29 注释所有metrics相关的汇报能力,排查占用内存过大,导致OOM的问题
-//    private static MetricRegistry metricRegistry = new MetricRegistry();
-//    private static StandardJaxrsActionReporter reporter = null;
     private Enhancer enhancer = new Enhancer();
     private Context context;
 
     public StandardJaxrsActionProxy(Context context) {
-//        if( reporter == null) {
-//            reporter = StandardJaxrsActionReporter.forRegistry(metricRegistry)
-//                    .convertRatesTo(TimeUnit.SECONDS)
-//                    .convertDurationsTo(TimeUnit.MILLISECONDS)
-//                    .build(context);
-//            reporter.start(15, TimeUnit.SECONDS);
-//        }
+        this.context = context;
     }
 
     public Object getProxy(Class clazz){
@@ -42,23 +33,7 @@ public class StandardJaxrsActionProxy implements MethodInterceptor {
 
     @Override
     public Object intercept( Object o, Method method, Object[] objects, MethodProxy methodProxy ) throws Throwable {
-//        Timer timer = null;
-//        Timer.Context ctx = null;
-//        try{
-//            timer = metricRegistry.timer(MetricRegistry.name(method.getDeclaringClass(),method.getName(), ""));
-//            ctx = timer.time();
-//        }catch(Exception e){
-//            e.printStackTrace();
-//        }
-
-        //执行真实的服务方法
         Object result = methodProxy.invokeSuper(o, objects);
-
-//        try{
-//            ctx.stop();
-//        }catch(Exception e){
-//            e.printStackTrace();
-//        }
         try{
             //尝试记录审计日志
             if( Config.logLevel().audit().enable() ){
@@ -80,7 +55,6 @@ public class StandardJaxrsActionProxy implements MethodInterceptor {
      * @throws ClassNotFoundException
      */
     private void tryToRecordAuditLog(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws ClassNotFoundException {
-
         //分析调用过程,记录审计日志
         Annotation[] annotations_auditLog = method.getAnnotationsByType(AuditLog.class);
         //该方法是否有AuditLog注解,如果有,则需要记录审计日志

+ 1 - 1
o2server/x_base_core_project/src/main/java/com/x/base/core/project/logger/Logger.java

@@ -252,7 +252,7 @@ public class Logger {
 
 	private StringBuilder create(String logLevel, String id) {
 		StringBuilder o = new StringBuilder();
-		o.append(DateTools.now()).append(" ").append(logLevel);
+		o.append(DateTools.nowMs()).append(" ").append(logLevel);
 		o.append(" [").append(StringUtils.isEmpty(id) ? Thread.currentThread().getName() : id).append("] ");
 		o.append(this.name).append(" - ");
 		return o;

+ 9 - 9
o2server/x_base_core_project/src/main/java/com/x/base/core/project/organization/OrganizationDefinition.java

@@ -72,23 +72,23 @@ public class OrganizationDefinition {
 
 	public final static String RoleDefinitionSuffix = "SystemRole";
 
-	public final static Pattern person_distinguishedName_pattern = Pattern.compile("^(\\S+)\\@(\\S+)\\@P$");
+	public final static Pattern person_distinguishedName_pattern = Pattern.compile("^(.+)\\@(\\S+)\\@P$");
 
-	public final static Pattern personAttribute_distinguishedName_pattern = Pattern.compile("^(\\S+)\\@(\\S+)\\@PA$");
+	public final static Pattern personAttribute_distinguishedName_pattern = Pattern.compile("^(.+)\\@(\\S+)\\@PA$");
 
-	public final static Pattern group_distinguishedName_pattern = Pattern.compile("^(\\S+)\\@(\\S+)\\@G$");
+	public final static Pattern group_distinguishedName_pattern = Pattern.compile("^(.+)\\@(\\S+)\\@G$");
 
-	public final static Pattern role_distinguishedName_pattern = Pattern.compile("^(\\S+)\\@(\\S+)\\@R$");
+	public final static Pattern role_distinguishedName_pattern = Pattern.compile("^(.+)\\@(\\S+)\\@R$");
 
-	public final static Pattern identity_distinguishedName_pattern = Pattern.compile("^(\\S+)\\@(\\S+)\\@I$");
+	public final static Pattern identity_distinguishedName_pattern = Pattern.compile("^(.+)\\@(\\S+)\\@I$");
 
-	public final static Pattern unit_distinguishedName_pattern = Pattern.compile("^(\\S+)\\@(\\S+)\\@U$");
+	public final static Pattern unit_distinguishedName_pattern = Pattern.compile("^(.+)\\@(\\S+)\\@U$");
 
-	public final static Pattern unitAttribute_distinguishedName_pattern = Pattern.compile("^(\\S+)\\@(\\S+)\\@UA$");
+	public final static Pattern unitAttribute_distinguishedName_pattern = Pattern.compile("^(.+)\\@(\\S+)\\@UA$");
 
-	public final static Pattern unitDuty_distinguishedName_pattern = Pattern.compile("^(\\S+)\\@(\\S+)\\@UD$");
+	public final static Pattern unitDuty_distinguishedName_pattern = Pattern.compile("^(.+)\\@(\\S+)\\@UD$");
 
-	public final static Pattern distinguishedName_pattern = Pattern.compile("^(\\S+)\\@(\\S+)\\@(P|PA|G|R|I|U|UA|UD)$");
+	public final static Pattern distinguishedName_pattern = Pattern.compile("^(.+)\\@(\\S+)\\@(P|PA|G|R|I|U|UA|UD)$");
 
 	public static String name(String distinguishedName) {
 		if (StringUtils.contains(distinguishedName, "@")) {

+ 5 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/DateTools.java

@@ -26,6 +26,7 @@ public class DateTools {
 	public final static String format_HHmmss = "HH:mm:ss";
 	public final static String format_HHmm = "HH:mm";
 	public final static String format_yyyyMMddHHmmss = "yyyy-MM-dd HH:mm:ss";
+	public final static String format_yyyyMMddHHmmssSSS = "yyyy-MM-dd HH:mm:ss.SSS";
 	public final static String format_yyyyMMddHHmm = "yyyy-MM-dd HH:mm";
 
 	public final static String formatCompact_yyyyMMdd = "yyyyMMdd";
@@ -61,6 +62,10 @@ public class DateTools {
 		return DateFormatUtils.format(new Date(), format_yyyyMMddHHmmss);
 	}
 
+	public static String nowMs() {
+		return DateFormatUtils.format(new Date(), format_yyyyMMddHHmmssSSS);
+	}
+
 	public static String compact(Date date) {
 		return DateFormatUtils.format(date, formatCompact_yyyyMMddHHmmss);
 	}

+ 3 - 5
o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/ExtractTextTools.java

@@ -66,7 +66,8 @@ public class ExtractTextTools {
 	public static final List<String> SUPPORT_IMAGE_TYPES = UnmodifiableList
 			.unmodifiableList(ListTools.toList(".bmp", ".jpg", ".png", ".gif", ".jpeg", "jpe"));
 
-	public static String extract(byte[] bytes, String name, Boolean office, Boolean pdf, Boolean txt, Boolean image) {
+	public static String extract(byte[] bytes, String name, Boolean office, Boolean pdf, Boolean txt, Boolean image)
+			throws Exception {
 		if ((null != bytes) && bytes.length > 0 && bytes.length < 1024 * 1024 * 10) {
 			if (office) {
 				if (StringUtils.endsWithIgnoreCase(name, ".doc") || StringUtils.endsWithIgnoreCase(name, ".docx")) {
@@ -114,13 +115,10 @@ public class ExtractTextTools {
 		return null;
 	}
 
-	public static String word(byte[] bytes) {
+	public static String word(byte[] bytes) throws Exception {
 		try (ByteArrayInputStream in = new ByteArrayInputStream(bytes)) {
 			return tikaInstance().parseToString(in);
-		} catch (Exception e) {
-			logger.error(e);
 		}
-		return null;
 	}
 
 	public static String excel(byte[] bytes) {

+ 2 - 2
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_assemble_surface.java

@@ -11,8 +11,8 @@ import com.x.base.core.project.annotation.ModuleType;
 		"com.x.processplatform.core.entity.content.Hint", "com.x.processplatform.core.entity.content.SerialNumber",
 		"com.x.processplatform.core.entity.content.Task", "com.x.processplatform.core.entity.content.TaskCompleted",
 		"com.x.processplatform.core.entity.content.Work", "com.x.processplatform.core.entity.content.WorkCompleted",
-		"com.x.processplatform.core.entity.content.WorkLog", "com.x.processplatform.core.entity.element.Agent",
-		"com.x.processplatform.core.entity.element.Application",
+		"com.x.processplatform.core.entity.content.WorkLog", "com.x.processplatform.core.entity.content.KeyLock",
+		"com.x.processplatform.core.entity.element.Agent", "com.x.processplatform.core.entity.element.Application",
 		"com.x.processplatform.core.entity.element.ApplicationDict",
 		"com.x.processplatform.core.entity.element.ApplicationDictItem",
 		"com.x.processplatform.core.entity.element.Begin", "com.x.processplatform.core.entity.element.Cancel",

+ 86 - 0
o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/gson/GsonTools.java

@@ -0,0 +1,86 @@
+package com.x.base.core.project.test.gson;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.apache.commons.beanutils.PropertyUtils;
+import org.junit.Test;
+
+import com.google.gson.annotations.SerializedName;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import java.util.Map;
+
+public class GsonTools {
+
+    public static enum ConflictStrategy {
+
+        THROW_EXCEPTION, PREFER_FIRST_OBJ, PREFER_SECOND_OBJ, PREFER_NON_NULL;
+    }
+
+    public static class JsonObjectExtensionConflictException extends Exception {
+
+        public JsonObjectExtensionConflictException(String message) {
+            super(message);
+        }
+
+    }
+
+    public static void extendJsonObject(JsonObject destinationObject, ConflictStrategy conflictResolutionStrategy, JsonObject ... objs) 
+            throws JsonObjectExtensionConflictException {
+        for (JsonObject obj : objs) {
+            extendJsonObject(destinationObject, obj, conflictResolutionStrategy);
+        }
+    }
+
+    private static void extendJsonObject(JsonObject leftObj, JsonObject rightObj, ConflictStrategy conflictStrategy) 
+            throws JsonObjectExtensionConflictException {
+        for (Map.Entry<String, JsonElement> rightEntry : rightObj.entrySet()) {
+            String rightKey = rightEntry.getKey();
+            JsonElement rightVal = rightEntry.getValue();
+            if (leftObj.has(rightKey)) {
+                //conflict                
+                JsonElement leftVal = leftObj.get(rightKey);
+                if (leftVal.isJsonArray() && rightVal.isJsonArray()) {
+                    JsonArray leftArr = leftVal.getAsJsonArray();
+                    JsonArray rightArr = rightVal.getAsJsonArray();
+                    //concat the arrays -- there cannot be a conflict in an array, it's just a collection of stuff
+                    for (int i = 0; i < rightArr.size(); i++) {
+                        leftArr.add(rightArr.get(i));
+                    }
+                } else if (leftVal.isJsonObject() && rightVal.isJsonObject()) {
+                    //recursive merging
+                    extendJsonObject(leftVal.getAsJsonObject(), rightVal.getAsJsonObject(), conflictStrategy);
+                } else {//not both arrays or objects, normal merge with conflict resolution
+                    handleMergeConflict(rightKey, leftObj, leftVal, rightVal, conflictStrategy);
+                }
+            } else {//no conflict, add to the object
+                leftObj.add(rightKey, rightVal);
+            }
+        }
+    }
+
+    private static void handleMergeConflict(String key, JsonObject leftObj, JsonElement leftVal, JsonElement rightVal, ConflictStrategy conflictStrategy) 
+            throws JsonObjectExtensionConflictException {
+        {
+            switch (conflictStrategy) {
+                case PREFER_FIRST_OBJ:
+                    break;//do nothing, the right val gets thrown out
+                case PREFER_SECOND_OBJ:
+                    leftObj.add(key, rightVal);//right side auto-wins, replace left val with its val
+                    break;
+                case PREFER_NON_NULL:
+                    //check if right side is not null, and left side is null, in which case we use the right val
+                    if (leftVal.isJsonNull() && !rightVal.isJsonNull()) {
+                        leftObj.add(key, rightVal);
+                    }//else do nothing since either the left value is non-null or the right value is null
+                    break;
+                case THROW_EXCEPTION:
+                    throw new JsonObjectExtensionConflictException("Key " + key + " exists in both objects and the conflict resolution strategy is " + conflictStrategy);
+                default:
+                    throw new UnsupportedOperationException("The conflict strategy " + conflictStrategy + " is unknown and cannot be processed");
+            }
+        }
+    }
+}

+ 6 - 39
o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/gson/TestClient.java

@@ -1,50 +1,17 @@
 package com.x.base.core.project.test.gson;
 
-import java.util.Map.Entry;
-
-import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.math.NumberUtils;
 import org.junit.Test;
 
 import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
 import com.x.base.core.project.gson.XGsonBuilder;
 
 public class TestClient {
-
-	public JsonElement mergeSection(JsonElement data, String[] paths, String key, JsonElement source) throws Exception {
-		JsonObject data_part_object = this.navigateElseEmptyObject(data, paths).getAsJsonObject();
-		JsonObject source_part_object = this.navigateElseEmptyObject(source, paths).getAsJsonObject();
-		for (Entry<String, JsonElement> entry : source_part_object.entrySet()) {
-			if (!StringUtils.equals(key, entry.getKey())) {
-				data_part_object.add(entry.getKey(), entry.getValue());
-			}
-		}
-		return data;
-	}
-
-	private JsonElement navigateElseEmptyObject(JsonElement jsonElement, String[] paths) throws Exception {
-		if (paths.length == 0) {
-			return jsonElement;
-		}
-		if (jsonElement.isJsonPrimitive() || jsonElement.isJsonNull()) {
-			return new JsonObject();
-		}
-		if (jsonElement.isJsonArray()) {
-			return navigateElseEmptyObject(jsonElement.getAsJsonArray().get(NumberUtils.toInt(paths[0])),
-					ArrayUtils.remove(paths, 0));
-		}
-		return navigateElseEmptyObject(jsonElement.getAsJsonObject().get(paths[0]), ArrayUtils.remove(paths, 0));
-	}
-
 	@Test
-	public void test2() throws Exception {
-		String json1 = "{'level':'aaaa','city':{'area1':'hangzhou'},'cat':[{'tj':{'a1':true,'a2':false}},{'qt':111}]}";
-		String json2 = "{'city':{'area2':'ningbo'},'cat':[{'tj':{'a2':true,'a3':'ggg'}},{'qt':222}]}";
-		JsonElement data1 = XGsonBuilder.instance().fromJson(json1, JsonElement.class);
-		JsonElement data2 = XGsonBuilder.instance().fromJson(json2, JsonElement.class);
-		System.out.println(mergeSection(data1, new String[] { "cat", "0", "tj" }, "", data2));
+	public void test() throws Exception {
+		String aaa = "{'aaa':'bbbddd','a1':['11','22','33'],'a2':['a','b','c'],'c':{'1':'11','2':'22','3':'33'}}";
+		String bbb = "{'aaa':'bbb','a2':['a','b','e','f'],'c':{'4':'44','5':'55'}}";
+		JsonElement a = XGsonBuilder.instance().fromJson(aaa, JsonElement.class);
+		JsonElement b = XGsonBuilder.instance().fromJson(bbb, JsonElement.class);
+		System.out.println(XGsonBuilder.merge(a, b));
 	}
-
 }

+ 9 - 0
o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/lambda/TestClient2.java

@@ -40,4 +40,13 @@ public class TestClient2 {
 		}
 	}
 
+	@Test
+	public void test2() {
+
+		List<String> aa = new ArrayList<>();
+
+		System.out.println(aa.stream().findFirst().orElse(null));
+
+	}
+
 }

+ 12 - 10
o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/string/TestClient.java

@@ -1,8 +1,8 @@
 package com.x.base.core.project.test.string;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.util.zip.CRC32;
 
+import org.apache.commons.text.StringEscapeUtils;
 import org.junit.Test;
 
 import com.x.base.core.project.tools.StringTools;
@@ -13,14 +13,16 @@ public class TestClient {
 
 	@Test
 	public void test() {
-		List<String> a = new ArrayList<>();
-		a.add("abc");
-		a.add("edf");
-		a.add("a");
-		a.add("bc");
-		a.add("ed");
-		a.add("f");
-		// System.out.println(StringTools.mergeEndsWith(a));
+		CRC32 c = new CRC32();
+		c.update("".getBytes());
+		System.out.println(c.getValue());
+	}
+
+	@Test
+	public void test4() {
+		String aaa ="(var v \\u003d person.getMobile();\\u000a return v.su\\nbstring(v.length - 6);)";
+		System.out.println(aaa);
+		System.out.println(StringEscapeUtils.unescapeJson(aaa));
 	}
 
 	@Test

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

@@ -0,0 +1,20 @@
+package com.x.base.core.project.test.tika;
+
+import java.io.File;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.tika.Tika;
+import org.junit.Test;
+
+public class TestClient {
+
+	@Test
+	public void test() throws Exception {
+		Tika tika = new Tika();
+		byte[] bs = FileUtils.readFileToByteArray(new File("e:/93ccd8d6-e699-4a82-a0b8-c4bd17e63dd8.doc"));
+		System.out.println("!!!dd@@@!w!!!!!!1!! 1!!!!!!!!!!1!!!!");
+		System.out.println(tika.detect(bs));
+		System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+	}
+
+}

+ 75 - 6
o2server/x_base_core_project/src/test/resources/aaa.json

@@ -1,8 +1,77 @@
 {
-	"stringFieldList": [
-		{
-			"name": "a",
-			"description": "a字段"
-		}
-	]
+    "enable": true,
+    "center": {
+        "enable": true,
+		"order" : 4,
+        "sslEnable": false,
+        "redeploy": true,
+        "port": 20030.0,
+        "httpProtocol": "",
+        "proxyHost": "",
+        "proxyPort": 20030.0,
+        "scanInterval": 0.0,
+        "statEnable": true
+    },
+    "application": {
+                    "enable": true,
+        "port": 20020.0,
+        "sslEnable": false,
+        "proxyHost": "",
+        "proxyPort": 20020.0,
+        "redeploy": true,
+        "scanInterval": 0.0,
+        "includes": [],
+        "excludes": ["*_attendance_*", "*_bbs_*", "*_calendar_*", "*_file_*", "*_okr_*", "*_hotpic_*", "*_meeting_*", "*_mind_*", "*_teamwork_*", "*_jpush_*"],
+        "weights": [],
+        "statEnable": true
+    },
+    "web": {
+        "enable": true,
+        "sslEnable": false,
+        "proxyHost": "",
+        "port": 8080,
+        "weight": 100.0,
+        "statEnable": false
+    },
+    "data": {
+        "enable": false,
+        "tcpPort": 20050.0,
+        "webPort": 20051.0,
+        "includes": [],
+        "excludes": [],
+        "jmxEnable": false,
+        "cacheSize": 512.0,
+        "logLevel": "WARN"
+    },
+    "storage": {
+        "enable": true,
+        "port": 20040.0,
+        "sslEnable": false,
+        "name": "s004",
+        "accounts": []
+    },
+    "dumpData": {
+        "enable": false,
+        "cron": "",
+        "size": 14.0,
+        "path": ""
+    },
+    "dumpStorage": {
+        "enable": false,
+        "cron": "",
+        "size": 14.0,
+        "path": ""
+    },
+    "restoreData": {
+        "cron": "",
+        "path": ""
+    },
+    "restoreStorage": {
+        "cron": "",
+        "path": ""
+    },
+    "nodeAgentEnable": false,
+    "nodeAgentPort": 20010.0,
+    "nodeAgentEncrypt": false,
+    "autoStart": true
 }

+ 12 - 0
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSConfigSettingService.java

@@ -257,6 +257,18 @@ public class BBSConfigSettingService{
 			logger.warn( "system init system config 'BBS_LOGO_NAME' got an exception." );
 			logger.error(e);
 		}
+
+		value = " - O2OA办公软件管理系统";
+		type = "text";
+		selectContent = null;
+		isMultiple = false;
+		description = "论坛标题Tail:全站网页标题内容的后缀内容。默认' - O2OA办公软件管理系统',可以为空。";
+		try {
+			checkAndInitSystemConfig("BBS_TITLE_TAIL", "论坛标题Tail", value, description, type, selectContent, isMultiple,  ++ordernumber );
+		} catch (Exception e) {
+			logger.warn( "system init system config 'BBS_TITLE_TAIL' got an exception." );
+			logger.error(e);
+		}
 		
 		value = "信息|问题|投票";
 		type = "select";

+ 8 - 10
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSForumInfoService.java

@@ -1,9 +1,5 @@
 package com.x.bbs.assemble.control.service;
 
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.annotation.CheckPersistType;
@@ -12,11 +8,10 @@ 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.bbs.assemble.control.Business;
-import com.x.bbs.entity.BBSForumInfo;
-import com.x.bbs.entity.BBSPermissionInfo;
-import com.x.bbs.entity.BBSPermissionRole;
-import com.x.bbs.entity.BBSRoleInfo;
-import com.x.bbs.entity.BBSUserRole;
+import com.x.bbs.entity.*;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.List;
 
 /**
  * 论坛信息管理服务类
@@ -46,8 +41,11 @@ public class BBSForumInfoService {
 			emc.commit();
 		}else{
 			//更新一条记录
-			emc.beginTransaction( BBSForumInfo.class );
 			_bBSForumInfo.copyTo( _bBSForumInfo_tmp, JpaObject.FieldsUnmodify  );
+			if( StringUtils.isEmpty( _bBSForumInfo_tmp.getReplyMessageNotifyType() )){
+				_bBSForumInfo.setReplyMessageNotifyType("0,0,0");
+			}
+			emc.beginTransaction( BBSForumInfo.class );
 			emc.check( _bBSForumInfo_tmp, CheckPersistType.all );	
 			emc.commit();
 		}

+ 10 - 2
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSForumSubjectStatisticService.java

@@ -1,7 +1,6 @@
 package com.x.bbs.assemble.control.service;
 
-import java.util.List;
-
+import com.alibaba.druid.util.StringUtils;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.annotation.CheckPersistType;
@@ -11,6 +10,8 @@ import com.x.bbs.entity.BBSForumInfo;
 import com.x.bbs.entity.BBSSectionInfo;
 import com.x.bbs.entity.BBSSubjectInfo;
 
+import java.util.List;
+
 public class BBSForumSubjectStatisticService {
 	
 	public void statisticSubjectTotalAndReplayTotalForForum( List<BBSForumInfo> forumInfoList ) throws Exception {
@@ -43,6 +44,9 @@ public class BBSForumSubjectStatisticService {
 								sectionInfo.setSubjectTotalToday( count.longValue() );
 								count = business.replyInfoFactory().countReplyForTodayBySectionId( mainSectionInfo.getId() );
 								sectionInfo.setReplyTotalToday( count.longValue() );
+								if( StringUtils.isEmpty( sectionInfo.getReplyMessageNotifyType() )){
+									sectionInfo.setReplyMessageNotifyType("0,0,0");
+								}
 								emc.check( sectionInfo, CheckPersistType.all );
 							}
 						}
@@ -55,9 +59,13 @@ public class BBSForumSubjectStatisticService {
 						mainSectionInfo.setSubjectTotalToday( count.longValue() );
 						count = business.replyInfoFactory().countReplyForTodayBySectionId( mainSectionInfo.getId() );
 						mainSectionInfo.setReplyTotalToday( count.longValue() );
+						if( StringUtils.isEmpty( mainSectionInfo.getReplyMessageNotifyType() )){
+							mainSectionInfo.setReplyMessageNotifyType("0,0,0");
+						}
 						emc.check( mainSectionInfo, CheckPersistType.all );
 					}
 				}
+
 				//统计论坛版块数量
 				count = business.sectionInfoFactory().countAllSectionByForumId( f.getId() );
 				f.setSectionTotal( count.longValue() );

+ 14 - 12
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSSectionInfoService.java

@@ -1,11 +1,5 @@
 package com.x.bbs.assemble.control.service;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
@@ -15,12 +9,11 @@ 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.bbs.assemble.control.Business;
-import com.x.bbs.entity.BBSForumInfo;
-import com.x.bbs.entity.BBSPermissionInfo;
-import com.x.bbs.entity.BBSPermissionRole;
-import com.x.bbs.entity.BBSRoleInfo;
-import com.x.bbs.entity.BBSSectionInfo;
-import com.x.bbs.entity.BBSUserRole;
+import com.x.bbs.entity.*;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 论坛信息管理服务类
@@ -71,11 +64,17 @@ public class BBSSectionInfoService {
 			emc.persist( _bBSSectionInfo, CheckPersistType.all);
 			if( _forumInfo_tmp != null ){
 				_forumInfo_tmp.setSectionTotal( _forumInfo_tmp.getSectionTotal() + 1 );
+				if( StringUtils.isEmpty( _forumInfo_tmp.getReplyMessageNotifyType() )){
+					_forumInfo_tmp.setReplyMessageNotifyType("0,0,0");
+				}
 				emc.check( _forumInfo_tmp, CheckPersistType.all );	
 			}
 		}else{
 			_bBSSectionInfo.setCreateTime( _bBSSectionInfo_tmp.getCreateTime() );
 			_bBSSectionInfo.copyTo( _bBSSectionInfo_tmp, JpaObject.FieldsUnmodify  );
+			if( StringUtils.isEmpty( _bBSSectionInfo_tmp.getReplyMessageNotifyType() )){
+				_bBSSectionInfo_tmp.setReplyMessageNotifyType("0,0,0");
+			}
 			emc.check( _bBSSectionInfo_tmp, CheckPersistType.all );
 		}
 		emc.commit();
@@ -150,6 +149,9 @@ public class BBSSectionInfoService {
 				}else{
 					forumInfo.setSectionTotal( 0L );
 				}
+				if( StringUtils.isEmpty( forumInfo.getReplyMessageNotifyType() )){
+					forumInfo.setReplyMessageNotifyType("0,0,0");
+				}
 			}
 			emc.check( forumInfo, CheckPersistType.all );
 			emc.remove( bBSSectionInfo, CheckRemoveType.all );

+ 41 - 28
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSSubjectInfoService.java

@@ -1,9 +1,5 @@
 package com.x.bbs.assemble.control.service;
 
-import java.util.ArrayList;
-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;
@@ -16,16 +12,12 @@ import com.x.base.core.project.tools.ListTools;
 import com.x.bbs.assemble.common.date.DateOperation;
 import com.x.bbs.assemble.control.Business;
 import com.x.bbs.assemble.control.ThisApplication;
-import com.x.bbs.entity.BBSForumInfo;
-import com.x.bbs.entity.BBSReplyInfo;
-import com.x.bbs.entity.BBSSectionInfo;
-import com.x.bbs.entity.BBSSubjectAttachment;
-import com.x.bbs.entity.BBSSubjectContent;
-import com.x.bbs.entity.BBSSubjectInfo;
-import com.x.bbs.entity.BBSSubjectVoteResult;
-import com.x.bbs.entity.BBSVoteOption;
-import com.x.bbs.entity.BBSVoteOptionGroup;
-import com.x.bbs.entity.BBSVoteRecord;
+import com.x.bbs.entity.*;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
 
 /**
  * 论坛信息管理服务类
@@ -36,10 +28,10 @@ public class BBSSubjectInfoService {
 	
 	private static  Logger logger = LoggerFactory.getLogger( BBSSubjectInfoService.class );
 	private DateOperation dateOperation = new DateOperation();
-	
+
 	/**
 	 * 根据传入的ID从数据库查询BBSSubjectInfo对象
-	 * @param id
+	 * @param ids
 	 * @return
 	 * @throws Exception
 	 */
@@ -115,11 +107,15 @@ public class BBSSubjectInfoService {
 			emc.commit();
 		}
 	}
-	
-	
+
+
 	/**
 	 * 向数据库保存BBSSubjectInfo对象
-	 * @param wrapIn
+	 * @param emc
+	 * @param _bBSSubjectInfo
+	 * @param content
+	 * @return
+	 * @throws Exception
 	 */
 	public BBSSubjectInfo save( EntityManagerContainer emc, BBSSubjectInfo _bBSSubjectInfo, String content ) throws Exception {
 		List<BBSSubjectAttachment> attachList = null;
@@ -157,11 +153,17 @@ public class BBSSubjectInfoService {
 			if( _forumInfo_tmp != null ){
 				_forumInfo_tmp.setSubjectTotalToday( _forumInfo_tmp.getSubjectTotalToday() + 1 );
 				_forumInfo_tmp.setSubjectTotal( _forumInfo_tmp.getSubjectTotal() + 1 );
+				if( StringUtils.isEmpty( _forumInfo_tmp.getReplyMessageNotifyType() )){
+					_forumInfo_tmp.setReplyMessageNotifyType("0,0,0");
+				}
 				emc.check( _forumInfo_tmp, CheckPersistType.all );	
 			}
 			if( _sectionInfo_tmp != null ){
 				_sectionInfo_tmp.setSubjectTotalToday( _sectionInfo_tmp.getSubjectTotalToday() + 1 );
 				_sectionInfo_tmp.setSubjectTotal( _sectionInfo_tmp.getSubjectTotal() + 1 );
+				if( StringUtils.isEmpty( _sectionInfo_tmp.getReplyMessageNotifyType() )){
+					_sectionInfo_tmp.setReplyMessageNotifyType("0,0,0");
+				}
 				emc.check( _sectionInfo_tmp, CheckPersistType.all );	
 			}
 		}else{
@@ -207,16 +209,17 @@ public class BBSSubjectInfoService {
 		emc.commit();
 		return _bBSSubjectInfo;
 	}
-	
+
 	/**
 	 * 根据ID从数据库中删除BBSSubjectInfo对象
-	 * 删除主题后,要对一系列的数据进行操作:
-	 * 1、所有的回贴删除,记录回贴数量n
-	 * 2、版块主题数量-1,如果有主版块,主版块主题数量-1
-	 * 3、论坛主题数量-1
-	 * 4、版块回复数量-n,如果有主版块,主版块回复数量-n
-	 * 5、论坛回复数量-n
-	 * @param id
+	 * 	 * 删除主题后,要对一系列的数据进行操作:
+	 * 	 * 1、所有的回贴删除,记录回贴数量n
+	 * 	 * 2、版块主题数量-1,如果有主版块,主版块主题数量-1
+	 * 	 * 3、论坛主题数量-1
+	 * 	 * 4、版块回复数量-n,如果有主版块,主版块回复数量-n
+	 * 	 * 5、论坛回复数量-n
+	 * @param emc
+	 * @param subjectId
 	 * @throws Exception
 	 */
 	public void delete( EntityManagerContainer emc, String subjectId ) throws Exception {
@@ -323,6 +326,9 @@ public class BBSSubjectInfoService {
 				if ( dateOperation.isTheSameDate( today, subjectInfo.getCreateTime() ) && forumInfo.getSubjectTotalToday() > 0) {
 					forumInfo.setSubjectTotalToday( forumInfo.getSubjectTotalToday() - 1 );
 				}
+				if( StringUtils.isEmpty( forumInfo.getReplyMessageNotifyType() )){
+					forumInfo.setReplyMessageNotifyType("0,0,0");
+				}
 				emc.check(forumInfo, CheckPersistType.all);
 			}
 			if( mainSectionInfo != null ){
@@ -332,6 +338,9 @@ public class BBSSubjectInfoService {
 				if ( dateOperation.isTheSameDate( today, subjectInfo.getCreateTime() ) && mainSectionInfo.getSubjectTotalToday() > 0) {
 					mainSectionInfo.setSubjectTotalToday( mainSectionInfo.getSubjectTotalToday() - 1 );
 				}
+				if( StringUtils.isEmpty( mainSectionInfo.getReplyMessageNotifyType() )){
+					mainSectionInfo.setReplyMessageNotifyType("0,0,0");
+				}
 				emc.check( mainSectionInfo, CheckPersistType.all );
 			}
 			if( sectionInfo != null ){
@@ -341,6 +350,9 @@ public class BBSSubjectInfoService {
 				if ( dateOperation.isTheSameDate( today, subjectInfo.getCreateTime() ) && sectionInfo.getSubjectTotalToday() > 0) {
 					sectionInfo.setSubjectTotalToday( sectionInfo.getSubjectTotalToday() - 1 );
 				}
+				if( StringUtils.isEmpty( sectionInfo.getReplyMessageNotifyType() )){
+					sectionInfo.setReplyMessageNotifyType("0,0,0");
+				}
 				emc.check( sectionInfo, CheckPersistType.all );
 			}
 			emc.remove( subjectInfo, CheckRemoveType.all );
@@ -540,8 +552,9 @@ public class BBSSubjectInfoService {
 
 	/**
 	 * 版块置顶设置
+	 * @param emc
 	 * @param subjectId
-	 * @param topToForum
+	 * @param topToSection
 	 * @param name
 	 * @return
 	 * @throws Exception

+ 38 - 8
o2server/x_bbs_assemble_control/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

+ 13 - 25
o2server/x_bbs_core_entity/src/main/java/com/x/bbs/entity/BBSForumInfo.java

@@ -1,32 +1,20 @@
 package com.x.bbs.entity;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.Basic;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.Id;
-import javax.persistence.Inheritance;
-import javax.persistence.InheritanceType;
-import javax.persistence.Lob;
-import javax.persistence.OrderColumn;
-import javax.persistence.Table;
-import javax.persistence.UniqueConstraint;
-
-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 com.x.base.core.entity.AbstractPersistenceProperties;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
 import com.x.base.core.entity.annotation.ContainerEntity;
 import com.x.base.core.project.annotation.FieldDescribe;
+import 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 javax.persistence.*;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 论坛信息表
@@ -472,16 +460,16 @@ public class BBSForumInfo extends SliceJpaObject {
 		this.typeCategory = typeCategory;
 	}
 
-	public Boolean getReplyMessageNotify() { return this.replyMessageNotify; }
+	public Boolean getReplyMessageNotify() { return this.replyMessageNotify== null ? false : this.replyMessageNotify; }
 
 	public void setReplyMessageNotify(final Boolean replyMessageNotify) { this.replyMessageNotify = replyMessageNotify; }
 
-	public String getReplyMessageNotifyType() { return this.replyMessageNotifyType; }
+	public String getReplyMessageNotifyType() { return this.replyMessageNotifyType == null ? "0,0,0" : this.replyMessageNotifyType; }
 
 	public void setReplyMessageNotifyType(final String replyMessageNotifyType) { this.replyMessageNotifyType = replyMessageNotifyType; }
 
 	public Boolean getSubjectMessageNotify() {
-		return this.subjectMessageNotify;
+		return this.subjectMessageNotify == null ? false : this.subjectMessageNotify;
 	}
 
 	public void setSubjectMessageNotify(final Boolean subjectMessageNotify) {
@@ -489,7 +477,7 @@ public class BBSForumInfo extends SliceJpaObject {
 	}
 
 	public String getSubjectMessageNotifyType() {
-		return this.subjectMessageNotifyType;
+		return this.subjectMessageNotifyType == null ? "0,0" : this.subjectMessageNotifyType;
 	}
 
 	public void setSubjectMessageNotifyType(final String subjectMessageNotifyType) {

+ 12 - 25
o2server/x_bbs_core_entity/src/main/java/com/x/bbs/entity/BBSSectionInfo.java

@@ -1,32 +1,19 @@
 package com.x.bbs.entity;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.Basic;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.Id;
-import javax.persistence.Inheritance;
-import javax.persistence.InheritanceType;
-import javax.persistence.Lob;
-import javax.persistence.Table;
-import javax.persistence.UniqueConstraint;
-
-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.OrderColumn;
-
 import com.x.base.core.entity.AbstractPersistenceProperties;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
 import com.x.base.core.entity.annotation.ContainerEntity;
 import com.x.base.core.project.annotation.FieldDescribe;
+import org.apache.openjpa.persistence.PersistentCollection;
+import org.apache.openjpa.persistence.jdbc.Index;
+import org.apache.openjpa.persistence.jdbc.OrderColumn;
+import org.apache.openjpa.persistence.jdbc.*;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 版块信息表
@@ -317,11 +304,11 @@ public class BBSSectionInfo extends SliceJpaObject {
 	@CheckPersist(allowEmpty = true)
 	private String subjectMessageNotifyType = "0,0";
 
-	public Boolean getSubjectMessageNotify() { return this.subjectMessageNotify; }
+	public Boolean getSubjectMessageNotify() { return this.subjectMessageNotify == null?false:this.subjectMessageNotify; }
 
 	public void setSubjectMessageNotify(final Boolean subjectMessageNotify) { this.subjectMessageNotify = subjectMessageNotify; }
 
-	public String getSubjectMessageNotifyType() { return this.subjectMessageNotifyType; }
+	public String getSubjectMessageNotifyType() { return this.subjectMessageNotifyType == null?"0,0" : this.subjectMessageNotifyType; }
 
 	public void setSubjectMessageNotifyType(final String subjectMessageNotifyType) { this.subjectMessageNotifyType = subjectMessageNotifyType; }
 
@@ -539,11 +526,11 @@ public class BBSSectionInfo extends SliceJpaObject {
 
 	public void setVisiblePermissionList(List<String> visiblePermissionList) { this.visiblePermissionList = visiblePermissionList; }
 
-	public Boolean getReplyMessageNotify() { return this.replyMessageNotify; }
+	public Boolean getReplyMessageNotify() { return this.replyMessageNotify == null ? false : this.replyMessageNotify; }
 
 	public void setReplyMessageNotify(final Boolean replyMessageNotify) { this.replyMessageNotify = replyMessageNotify; }
 
-	public String getReplyMessageNotifyType() { return this.replyMessageNotifyType; }
+	public String getReplyMessageNotifyType() { return this.replyMessageNotifyType == null ? "0,0,0" : this.replyMessageNotifyType; }
 
 	public void setReplyMessageNotifyType(final String replyMessageNotifyType) { this.replyMessageNotifyType = replyMessageNotifyType; }
 

+ 4 - 0
o2server/x_build/.gitignore

@@ -0,0 +1,4 @@
+.classpath
+.project
+/.settings/
+/target/

+ 57 - 0
o2server/x_build/deploy_o2server.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." name="main" default="default">
+	<basename property="project" file="${basedir}" />
+	<dirname property="o2server.dir" file="${basedir}../" />
+	<target name="default">
+		<copy todir="D:/o2server/commons">
+			<fileset dir="${o2server.dir}/commons">
+				<exclude name="**/.settings" />
+				<exclude name="**/.classpath" />
+				<exclude name="**/.project" />
+				<exclude name="**/.gitignore" />
+			</fileset>
+		</copy>
+	</target>
+	<copy todir="D:/o2server/store">
+		<fileset dir="${o2server.dir}/store">
+			<exclude name="**/.settings" />
+			<exclude name="**/.classpath" />
+			<exclude name="**/.project" />
+			<exclude name="**/.gitignore" />
+		</fileset>
+	</copy>
+	<copy todir="D:/o2server/configSample">
+		<fileset dir="${o2server.dir}/configSample">
+			<exclude name="**/.settings" />
+			<exclude name="**/.classpath" />
+			<exclude name="**/.project" />
+			<exclude name="**/.gitignore" />
+		</fileset>
+	</copy>
+	<copy todir="D:/o2server/localSample">
+		<fileset dir="${o2server.dir}/localSample">
+			<exclude name="**/.settings" />
+			<exclude name="**/.classpath" />
+			<exclude name="**/.project" />
+			<exclude name="**/.gitignore" />
+		</fileset>
+	</copy>
+	<copy todir="D:/o2server">
+		<fileset dir="${o2server.dir}">
+			<include name="start_windows.bat" />
+			<include name="start_linux.sh" />
+			<include name="start_aix.sh" />
+			<include name="start_macos.sh" />
+			<include name="stop_windows.bat" />
+			<include name="stop_linux.sh" />
+			<include name="stop_aix.sh" />
+			<include name="stop_macos.sh" />
+			<include name="console_windows.bat" />
+			<include name="console_linux.sh" />
+			<include name="console_aix.sh" />
+			<include name="console_macos.sh" />
+			<include name="console.jar" />
+			<include name="index.html" />
+		</fileset>
+	</copy>
+</project>

+ 27 - 0
o2server/x_build/gitHub.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." name="main" default="toGitHub">
+	<basename property="project" file="${basedir}" />
+	<dirname property="o2server.dir" file="${basedir}../" />
+	<dirname property="o2oa.dir" file="${basedir}../../" />
+	<property name="git.dir" location="D:/GitHub/o2oa/o2server" />
+
+	<path id="project.classpath">
+		<pathelement location="src/main/java" />
+		<pathelement location="src/main/resources" />
+		<pathelement location="target/classes" />
+		<fileset dir="${o2server.dir}/commons/ext">
+			<include name="**/*.jar" />
+		</fileset>
+		<fileset dir="${o2server.dir}/store/jars">
+			<include name="*.jar" />
+		</fileset>
+	</path>
+
+	<target name="toGitHub">
+		<java classname="com.x.build.SyncToGitHubDirectory">
+			<classpath refid="project.classpath" />
+			<arg value="${o2server.dir}" />
+			<arg value="${git.dir}" />
+		</java>
+	</target>
+</project>

+ 3 - 0
o2server/x_build/git_archive.bat

@@ -0,0 +1,3 @@
+cd d:/github/o2oa
+
+git archive --format zip --output "d:/src.zip" master

+ 435 - 0
o2server/x_build/gulpfile.js

@@ -0,0 +1,435 @@
+var gulp = require('gulp'),
+//var deleted = require('gulp-deleted');
+    del = require('del'),
+    uglify = require('gulp-tm-uglify'),
+    rename = require('gulp-rename'),
+    changed = require('gulp-changed'),
+    gulpif = require('gulp-if'),
+    minimist = require('minimist'),
+    ftp = require('gulp-ftp'),
+    sftp = require('gulp-sftp'),
+    JSFtp = require('jsftp'),
+    gutil = require('gulp-util'),
+    fs = require("fs");
+var assetRev = require('gulp-tm-asset-rev');
+
+var apps = [
+    {"folder": "o2_lib",                                    "tasks": ["move", "clean"]},
+    {"folder": "o2_core",                                   "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_ANN",                           "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_AppCenter",                     "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_AppMarket",                     "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Attendance",                    "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_BAM",                           "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Calendar",                      "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Chat",                          "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_cms_Column",                    "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_cms_ColumnManager",             "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_cms_DictionaryDesigner",        "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_cms_Document",                  "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_cms_FormDesigner",              "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_cms_Index",                     "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_cms_Module",                    "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_cms_QueryViewDesigner",         "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_cms_ScriptDesigner",            "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_cms_ViewDesigner",              "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_cms_Xform",                     "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Collect",                       "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Common",                        "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Console",                       "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_ControlPanel",                  "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_CRM",                           "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Deployment",                    "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_DesignCenter",                  "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Empty",                         "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Execution",                     "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_ExeManager",                    "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_FaceSet",                       "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_File",                          "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Forum",                         "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_ForumCategory",                 "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_ForumDocument",                 "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_ForumPerson",                   "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_ForumSearch",                   "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_ForumSection",                  "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_HotArticle",                    "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_IM",                            "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_LogViewer",                     "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Meeting",                       "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Message",                       "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Minder",                        "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_MinderEditor",                  "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Note",                          "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_OKR",                           "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_OnlineMeeting",                 "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_OnlineMeetingRoom",             "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Org",                           "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_portal_PageDesigner",           "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_portal_Portal",                 "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_portal_PortalExplorer",         "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_portal_PortalManager",          "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_portal_ScriptDesigner",         "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_portal_WidgetDesigner",         "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_Application",           "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_ApplicationExplorer",   "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_DictionaryDesigner",    "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_FormDesigner",          "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_ProcessDesigner",       "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_ProcessManager",        "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_ScriptDesigner",        "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_StatDesigner",          "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_TaskCenter",            "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_ViewDesigner",          "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_Work",                  "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_process_Xform",                 "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Profile",                       "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_query_Query",                   "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_query_QueryExplorer",           "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_query_QueryManager",            "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_query_StatDesigner",            "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_query_ViewDesigner",            "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_query_TableDesigner",           "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_query_StatementDesigner",       "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Report",                        "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_ReportDocument",                "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_ReportMinder",                  "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_ScriptEditor",                  "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Search",                        "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_SelecterTest",                  "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Selector",                      "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_service_AgentDesigner",         "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_service_InvokeDesigner",        "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_service_ServiceManager",        "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Setting",                       "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_SmartOfficeRoom",               "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Snake",                         "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Strategy",                      "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Template",                      "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Weixin",                        "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_desktop",                                 "tasks": ["move", "min", "clean", "watch"]}
+];
+
+var sourcePrefix = '../../o2web/';
+var destDir = 'target/o2server/servers/webServer/';
+
+var uploadOptions = {
+    'location': 'E:/o2server/servers/webServer/',
+    'host': '',
+    'user': '',
+    'pass': '',
+    "remotePath": "/"
+};
+var options = minimist(process.argv.slice(2), {//upload: local ftp or sftp
+    string: ["upload", "location", "host", "user", "pass", "port", "remotePath"]
+});
+options.upload = options.upload || "";
+options.location = options.location || uploadOptions.location;
+options.host = options.host || uploadOptions.host;
+options.user = options.user || uploadOptions.user;
+options.pass = options.pass || uploadOptions.pass;
+options.port = options.port || 0;
+options.remotePath = options.remotePath || uploadOptions.remotePath;
+
+
+var minTasks = [];
+var moveTasks = [];
+var watchTasks = [];
+var cleanTasks = [];
+
+function getMinTask(path){
+    return function(){
+        var src = sourcePrefix+'source/'+path+'/**/*.js';
+        var dest = destDir+path+'/';
+        return gulp.src(src)
+            .pipe(changed(dest))
+            .pipe(uglify())
+            .pipe(rename({ extname: '.min.js' }))
+            .pipe(gulpif((options.upload=='local'&&options.location!=''), gulp.dest(options.location+path+'/')))
+            .pipe(gulpif((options.upload=='ftp'&&options.host!=''), ftp({
+                host: options.host,
+                user: options.user || 'anonymous',
+                pass: options.pass || '@anonymous',
+                port: options.port || 21,
+                remotePath: (options.remotePath || '/')+path
+            })))
+            .pipe(gulpif((options.upload=='sftp'&&options.host!=''), ftp({
+                host: options.host,
+                user: options.user || 'anonymous',
+                pass: options.pass || null,
+                port: options.port || 22,
+                remotePath: (options.remotePath || '/')+path
+            })))
+            .pipe(gulp.dest(dest))
+            .pipe(gutil.noop());
+    }
+}
+function getMoveTask(path){
+    return function(){
+        var src = sourcePrefix+'source/'+path+'/**/*';
+        var dest = destDir+path+'/';
+        return gulp.src(src)
+            .pipe(changed(dest))
+            .pipe(gulpif((options.upload=='local'&&options.location!=''), gulp.dest(options.location+path+'/')))
+            .pipe(gulpif((options.upload=='ftp'&&options.host!=''), ftp({
+                host: options.host,
+                user: options.user || 'anonymous',
+                pass: options.pass || '@anonymous',
+                port: options.port || 21,
+                remotePath: (options.remotePath || '/')+path
+            })))
+            .pipe(gulpif((options.upload=='sftp'&&options.host!=''), ftp({
+                host: options.host,
+                user: options.user || 'anonymous',
+                pass: options.pass || null,
+                port: options.port || 22,
+                remotePath: (options.remotePath || '/')+path
+            })))
+            .pipe(gulp.dest(dest))
+            .pipe(gutil.noop());
+    }
+}
+
+function getCleanTask(path){
+    return function(cb){
+        var dest = destDir+path+'/';
+        del(dest, cb);
+    }
+}
+
+function cleanRemoteFtp(f, cb){
+    var file = options.remotePath+f;
+
+    var ftp = new JSFtp({
+        host: options.host,
+        user: options.user || 'anonymous',
+        pass: options.pass || null,
+        port: options.port || 21
+    });
+
+    ftp.raw('dele '+file, function(err) {
+        if (err){ cb(); return; }
+        if (file.substring(file.length-3).toLowerCase()==".js"){
+            file = file.replace('.js', ".min.js");
+            ftp.raw('dele '+file, function(err) {
+                if (err){ cb(); return; }
+
+                if (file.indexOf("/")!=-1){
+                    var p = file.substring(0, file.lastIndexOf("/"));
+                    ftp.raw('rmd '+p, function(err) {
+                        if (err){ cb(); return; }
+
+                        ftp.raw.quit();
+                        cb();
+                    });
+                }
+
+            });
+        }else{
+            if (file.indexOf("/")!=-1){
+                var pPath = file.substring(0, file.lastIndexOf("/"));
+                ftp.raw('rmd '+pPath, function(err) {
+                    if (err){ cb(); return; }
+                    ftp.raw.quit();
+                    cb();
+                });
+            }
+        }
+    });
+}
+function cleanRemoteLocal(f, cb){
+    var file = options.location+f;
+    del(file, {force: true, dryRun: true}, function(){
+        if (file.substring(file.length-3).toLowerCase()==".js"){
+            var minfile = file.replace('.js', ".min.js");
+            del(minfile, {force: true, dryRun: true}, function(){
+                var p = file.substring(0, file.lastIndexOf("/"));
+                fs.rmdir(p,function(err){
+                    if(err){}
+                    cb();
+                })
+            });
+        }else{
+            var p = file.substring(0, file.lastIndexOf("/"));
+            fs.rmdir(p,function(err){
+                if(err){}
+                cb();
+            })
+        }
+    });
+}
+
+function getCleanRemoteTask(path){
+    return function(cb){
+        if (options.upload){
+            var file = path.replace(/\\/g, "/");
+            file = file.substring(file.indexOf("source/")+7);
+
+            if (options.upload=='local'&&options.location!='') cleanRemoteLocal(file, cb);
+            if (options.upload=='ftp'&&options.host!='') cleanRemoteFtp(file, cb);
+        }else{
+            if (cb) cb();
+        }
+    }
+}
+function getWatchTask(path, min){
+    return function(cb){
+        var moveTask = "move:"+path;
+        var minTask = "min:"+path;
+        var cleanTask = "clean:"+path;
+        if (min) gulp.watch('source/'+path+'/**/*.js', {"events": ['add','change']}, gulp.parallel(minTask));
+        gulp.watch('source/'+path+'/**/*', {"events": ['addDir', 'add','change']},  gulp.parallel(moveTask));
+
+        // gulp.watch('source/'+path+'/**/*', {"events": ['unlinkDir']},  function(file){
+        //     console.log("into unlinkDir watch ......."+file);
+        // });
+
+
+        watcher = gulp.watch('source/'+path+'/**/*', {delay:500});
+        watcher.on('unlink', function(file, stats){
+            console.log("into unlink watch ......."+file);
+            gulp.task("cleanRemote", getCleanRemoteTask(file))
+            gulp.series(gulp.parallel(cleanTask, "cleanRemote"), gulp.parallel(minTask, moveTask))();
+        });
+        // watcher.on('unlinkDir', function(file, stats){
+        //     console.log("into unlinkDir watch ......."+file);
+        //     // gulp.task("cleanRemoteDir", getCleanRemoteTask(file))
+        //     // gulp.series(gulp.parallel(cleanTask, "cleanRemoteDir"), gulp.parallel(minTask, moveTask))();
+        // });
+    }
+}
+
+apps.map(function(app){
+    var taskName = "";
+    if (app.tasks.indexOf("min")!==-1){
+        taskName = "min:"+app.folder;
+        minTasks.push(taskName);
+        gulp.task(taskName, getMinTask(app.folder));
+    }
+    if (app.tasks.indexOf("move")!==-1){
+        taskName = "move:"+app.folder;
+        moveTasks.push(taskName);
+        gulp.task(taskName, getMoveTask(app.folder));
+    }
+    if (app.tasks.indexOf("clean")!==-1){
+        taskName = "clean:"+app.folder;
+        cleanTasks.push(taskName);
+        gulp.task(taskName, getCleanTask(app.folder));
+    }
+    if (app.tasks.indexOf("watch")!==-1){
+        taskName = "watch:"+app.folder;
+        watchTasks.push(taskName);
+        gulp.task(taskName, getWatchTask(app.folder, (app.tasks.indexOf("min")!==-1)));
+    }
+
+    if (app.tasks.indexOf("min")!==-1 && app.tasks.indexOf("move")!==-1){
+        gulp.task(app.folder, gulp.parallel("min:"+app.folder, "move:"+app.folder));
+    }else if (app.tasks.indexOf("min")==-1 && app.tasks.indexOf("move")!==-1){
+        gulp.task(app.folder, gulp.parallel("move:"+app.folder));
+    }else if (app.tasks.indexOf("min")!==-1 && app.tasks.indexOf("move")==-1){
+        gulp.task(app.folder, gulp.parallel("min:"+app.folder));
+    }
+
+
+})
+
+gulp.task("index", function(){
+	var src = [sourcePrefix+'source/favicon.ico', sourcePrefix+'source/index.html'];
+	return gulp.src(src)
+			.pipe(changed(destDir))
+            .pipe(gulpif((options.upload=='local'&&options.location!=''), gulp.dest(options.location+'/')))
+            .pipe(gulpif((options.upload=='ftp'&&options.host!=''), ftp({
+                host: options.host,
+                user: options.user || 'anonymous',
+                pass: options.pass || '@anonymous',
+                port: options.port || 21,
+                remotePath: (options.remotePath || '/')
+            })))
+            .pipe(gulpif((options.upload=='sftp'&&options.host!=''), ftp({
+                host: options.host,
+                user: options.user || 'anonymous',
+                pass: options.pass || null,
+                port: options.port || 22,
+                remotePath: (options.remotePath || '/')
+            })))
+            .pipe(gulp.dest(destDir))
+            .pipe(gutil.noop());
+});
+
+//gulp.task("default", gulp.parallel(minTasks, moveTasks, "index"));
+gulp.task("clean", gulp.series(cleanTasks));
+gulp.task("sync", gulp.series(
+    gulp.series(cleanTasks),
+    gulp.parallel(minTasks, moveTasks, "index")
+));
+gulp.task("watch", gulp.parallel(watchTasks));
+
+gulp.task("o2:new-v:html", function () {
+    var path = "x_desktop";
+    var src = sourcePrefix+'source/'+path+'/*.html';
+    var dest = destDir+'x_desktop/';
+    return gulp.src(src)
+        .pipe(assetRev())
+        .pipe(gulpif((options.upload=='local'&&options.location!=''), gulp.dest(options.location+path+'/')))
+        .pipe(gulpif((options.upload=='ftp'&&options.host!=''), ftp({
+            host: options.host,
+            user: options.user || 'anonymous',
+            pass: options.pass || '@anonymous',
+            port: options.port || 21,
+            remotePath: (options.remotePath || '/')+path
+        })))
+        .pipe(gulpif((options.upload=='sftp'&&options.host!=''), sftp({
+            host: options.host,
+            user: options.user || 'anonymous',
+            pass: options.pass || null,
+            port: options.port || 22,
+            remotePath: (options.remotePath || '/')+path
+        })))
+        .pipe(gulp.dest(dest))
+        .pipe(gutil.noop());
+
+});
+gulp.task("o2:new-v:o2", function () {
+    var path = "o2_core";
+    var src = sourcePrefix+'source/'+path+'/o2.js';
+    var dest = destDir+'o2_core/';
+    return gulp.src(src)
+        .pipe(assetRev())
+        .pipe(gulpif((options.upload=='local'&&options.location!=''), gulp.dest(options.location+path+'/')))
+        .pipe(gulpif((options.upload=='ftp'&&options.host!=''), ftp({
+            host: options.host,
+            user: options.user || 'anonymous',
+            pass: options.pass || '@anonymous',
+            port: options.port || 21,
+            remotePath: (options.remotePath || '/')+path
+        })))
+        .pipe(gulpif((options.upload=='sftp'&&options.host!=''), sftp({
+            host: options.host,
+            user: options.user || 'anonymous',
+            pass: options.pass || null,
+            port: options.port || 22,
+            remotePath: (options.remotePath || '/')+path
+        })))
+        .pipe(gulp.dest(dest))
+        .pipe(uglify())
+        .pipe(rename({ extname: '.min.js' }))
+        .pipe(gulpif((options.upload=='local'&&options.location!=''), gulp.dest(options.location+path+'/')))
+        .pipe(gulpif((options.upload=='ftp'&&options.host!=''), ftp({
+            host: options.host,
+            user: options.user || 'anonymous',
+            pass: options.pass || '@anonymous',
+            port: options.port || 21,
+            remotePath: (options.remotePath || '/')+path
+        })))
+        .pipe(gulpif((options.upload=='sftp'&&options.host!=''), sftp({
+            host: options.host,
+            user: options.user || 'anonymous',
+            pass: options.pass || null,
+            port: options.port || 22,
+            remotePath: (options.remotePath || '/')+path
+        })))
+        .pipe(gulp.dest(dest))
+        .pipe(gutil.noop());
+});
+gulp.task("o2:new-v", gulp.parallel("o2:new-v:o2", "o2:new-v:html"));
+
+gulp.task("default", gulp.series("clean", gulp.parallel(minTasks, moveTasks, 'index'), "o2:new-v"));

+ 45 - 0
o2server/x_build/package-lock.json

@@ -0,0 +1,45 @@
+{
+  "name": "o2oa_web",
+  "version": "1.1.7",
+  "description": "a javascript library",
+  "main": "o2.js",
+  "scripts": {
+    "test": "gulp",
+    "report-coverage": "codecov"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/huqi1980/o2oa_client_web.git"
+  },
+  "keywords": [
+    "oa",
+    "office",
+    "workflow",
+    "process",
+    "cms",
+    "bpm",
+    "portal"
+  ],
+  "author": "Tommy-O2OA",
+  "license": "AGPL-3.0",
+  "bugs": {
+    "url": "https://github.com/huqi1980/o2oa_client_web/issues"
+  },
+  "homepage": "https://github.com/huqi1980/o2oa_client_web#readme",
+  "devDependencies": {
+    "gulp": "^4.0.0",
+    "gulp-tm-asset-rev": "0.0.16",
+    "gulp-changed": "^3.2.0",
+    "gulp-deleted": "0.0.2",
+    "gulp-ftp": "^1.1.0",
+    "gulp-if": "^2.0.2",
+    "gulp-rename": "^1.4.0",
+    "gulp-sftp": "^0.1.5",
+    "gulp-tm-uglify": "^3.0.1",
+    "karma": "^3.1.4",
+    "karma-jasmine": "^2.0.1",
+    "karma-phantomjs-launcher": "^1.0.4",
+    "merge-stream": "^1.0.1",
+    "minimist": "^1.2.0"
+  }
+}

+ 45 - 0
o2server/x_build/package.json

@@ -0,0 +1,45 @@
+{
+  "name": "o2oa_web",
+  "version": "1.1.7",
+  "description": "a javascript library",
+  "main": "o2.js",
+  "scripts": {
+    "test": "gulp",
+    "report-coverage": "codecov"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/huqi1980/o2oa_client_web.git"
+  },
+  "keywords": [
+    "oa",
+    "office",
+    "workflow",
+    "process",
+    "cms",
+    "bpm",
+    "portal"
+  ],
+  "author": "Tommy-O2OA",
+  "license": "AGPL-3.0",
+  "bugs": {
+    "url": "https://github.com/huqi1980/o2oa_client_web/issues"
+  },
+  "homepage": "https://github.com/huqi1980/o2oa_client_web#readme",
+  "devDependencies": {
+    "gulp": "^4.0.0",
+    "gulp-tm-asset-rev": "0.0.16",
+    "gulp-changed": "^3.2.0",
+    "gulp-deleted": "0.0.2",
+    "gulp-ftp": "^1.1.0",
+    "gulp-if": "^2.0.2",
+    "gulp-rename": "^1.4.0",
+    "gulp-sftp": "^0.1.5",
+    "gulp-tm-uglify": "^3.0.1",
+    "karma": "^3.1.4",
+    "karma-jasmine": "^2.0.1",
+    "karma-phantomjs-launcher": "^1.0.4",
+    "merge-stream": "^1.0.1",
+    "minimist": "^1.2.0"
+  }
+}

+ 276 - 0
o2server/x_build/src/main/java/com/x/build/CheckEntity.java

@@ -0,0 +1,276 @@
+package com.x.build;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+import javax.persistence.Column;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.Index;
+import javax.persistence.Lob;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import org.apache.openjpa.persistence.jdbc.ContainerTable;
+import org.junit.Test;
+
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.entity.annotation.ContainerEntity;
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.annotation.Module;
+import com.x.base.core.project.gson.XGsonBuilder;
+
+import io.github.classgraph.ClassGraph;
+import io.github.classgraph.ClassInfo;
+import io.github.classgraph.ScanResult;
+
+public class CheckEntity {
+
+	/*
+	 * 检查数据库字段名是否是ColumnNamePrefix + fieldName
+	 */
+	@Test
+	public void checkColumnName() throws Exception {
+		try (ScanResult scanResult = new ClassGraph().enableAllInfo().scan()) {
+			List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(ContainerEntity.class.getName());
+			List<Class<?>> list = new ArrayList<>();
+			for (ClassInfo info : classInfos) {
+				list.add(Class.forName(info.getName()));
+			}
+			for (Class<?> cls : list) {
+				List<Field> fields = FieldUtils.getAllFieldsList(cls);
+				for (Field field : fields) {
+					Column col = field.getAnnotation(Column.class);
+					if (null != col) {
+						if (StringUtils.equals(JpaObject.ColumnNamePrefix + field.getName(), col.name())) {
+							// System.out.println(cls + ":" + field.getName() + ":" + col.name() + ":" +
+							// col.length());
+						} else {
+							System.err.println(cls + ":" + field.getName() + ":" + col.name() + ":" + col.length());
+						}
+					}
+				}
+			}
+		}
+	}
+
+	/*
+	 * 检查是否有将Lob类型字段增加索引
+	 */
+	@Test
+	public void checkLobIndex() throws Exception {
+		try (ScanResult scanResult = new ClassGraph().enableAllInfo().scan()) {
+			List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(ContainerEntity.class.getName());
+			List<Class<?>> list = new ArrayList<>();
+			for (ClassInfo info : classInfos) {
+				list.add(Class.forName(info.getName()));
+			}
+			for (Class<?> cls : list) {
+				List<Field> fields = FieldUtils.getAllFieldsList(cls);
+				for (Field field : fields) {
+					Lob lob = field.getAnnotation(Lob.class);
+					Index index = field.getAnnotation(Index.class);
+					if ((null != lob) && (null != index)) {
+						System.err.println(cls + ":" + field.getName());
+					} else {
+						// System.out.println(cls + ":" + field.getName() ;
+					}
+				}
+			}
+		}
+	}
+
+	/*
+	 * 检查是否有将Lob类型字段增加索引
+	 * 
+	 * @FieldDescribe("群组的个人成员.存放个人 ID.")
+	 * 
+	 * @PersistentCollection(fetch = FetchType.EAGER)
+	 * 
+	 * @OrderColumn(name = ORDERCOLUMNCOLUMN)
+	 * 
+	 * @ContainerTable(name = TABLE + ContainerTableNameMiddle +
+	 * personList_FIELDNAME, joinIndex = @Index(name = TABLE + IndexNameMiddle +
+	 * personList_FIELDNAME + JoinIndexNameSuffix))
+	 * 
+	 * @ElementColumn(length = JpaObject.length_id, name = ColumnNamePrefix +
+	 * personList_FIELDNAME)
+	 * 
+	 * @ElementIndex(name = TABLE + IndexNameMiddle + personList_FIELDNAME +
+	 * ElementIndexNameSuffix)
+	 * 
+	 * @CheckPersist(allowEmpty = true, citationExists = @CitationExist(type =
+	 * Person.class)) private List<String> personList;
+	 */
+	@Test
+	public void checkListFieldContainerTableName() throws Exception {
+		try (ScanResult scanResult = new ClassGraph().enableAllInfo().scan()) {
+			List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(ContainerEntity.class.getName());
+			List<Class<?>> list = new ArrayList<>();
+			for (ClassInfo info : classInfos) {
+				list.add(Class.forName(info.getName()));
+			}
+			for (Class<?> cls : list) {
+				List<Field> fields = FieldUtils.getAllFieldsList(cls);
+				for (Field field : fields) {
+					if (List.class.isAssignableFrom(field.getType())) {
+						ContainerTable containerTable = field.getAnnotation(ContainerTable.class);
+						if (null != containerTable) {
+							String name = FieldUtils.readStaticField(cls, "TABLE", true).toString()
+									+ JpaObject.ContainerTableNameMiddle + field.getName();
+							if (!StringUtils.equals(name, containerTable.name())) {
+								System.err.println(cls.getName() + ":" + field.getName());
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	/*
+	 * 检查是否将@FieldDescribe注解到static字段上,如果是意味着上下行搞错了
+	 */
+	@Test
+	public void checkFieldDescribeOnStatic() throws Exception {
+		try (ScanResult scanResult = new ClassGraph().enableAllInfo().scan()) {
+			List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(ContainerEntity.class.getName());
+			List<Class<?>> list = new ArrayList<>();
+			for (ClassInfo info : classInfos) {
+				list.add(Class.forName(info.getName()));
+			}
+			for (Class<?> cls : list) {
+				List<Field> fields = FieldUtils.getFieldsListWithAnnotation(cls, FieldDescribe.class);
+				for (Field field : fields) {
+					if (java.lang.reflect.Modifier.isStatic(field.getModifiers())) {
+						System.out.println(cls + ":" + field.getName());
+					}
+				}
+			}
+		}
+	}
+
+	/*
+	 * 检查约束名中的table名称和entity类中的TABLE名称是否一致
+	 */
+	@Test
+	public void checkTableNameUniqueConstraintName() throws Exception {
+		try (ScanResult scanResult = new ClassGraph().enableAllInfo().scan()) {
+			List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(ContainerEntity.class.getName());
+			List<Class<?>> list = new ArrayList<>();
+			for (ClassInfo info : classInfos) {
+				list.add(Class.forName(info.getName()));
+			}
+			for (Class<?> cls : list) {
+				Table table = cls.getAnnotation(Table.class);
+				String name = Objects.toString(FieldUtils.readStaticField(cls, "TABLE", true));
+				if (!StringUtils.equals(table.name(), name)) {
+					System.out.println("table name not match:" + cls);
+				}
+				for (UniqueConstraint u : table.uniqueConstraints()) {
+					if (!StringUtils.startsWith(u.name(), table.name())) {
+						System.out.println("uniqueConstraint name not match:" + cls);
+					}
+				}
+			}
+		}
+	}
+
+	/*
+	 * 检查类中是否有在createTime,updateTime和sequence上的索引,这几个索引已经用约束在类上了
+	 */
+	@Test
+	public void checkIdCreateTimeUpdateTimeSequenceIndex() throws Exception {
+		try (ScanResult scanResult = new ClassGraph().enableAllInfo().scan()) {
+			List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(ContainerEntity.class.getName());
+			List<Class<?>> list = new ArrayList<>();
+			for (ClassInfo info : classInfos) {
+				list.add(Class.forName(info.getName()));
+			}
+			for (Class<?> cls : list) {
+				Field idField = FieldUtils.getField(cls, JpaObject.id_FIELDNAME, true);
+				Field createTimeField = FieldUtils.getField(cls, JpaObject.createTime_FIELDNAME, true);
+				Field updateTimeField = FieldUtils.getField(cls, JpaObject.updateTime_FIELDNAME, true);
+				Field sequenceField = FieldUtils.getField(cls, JpaObject.sequence_FIELDNAME, true);
+				if ((null != idField.getAnnotation(Index.class)) || (null != createTimeField.getAnnotation(Index.class))
+						|| (null != updateTimeField.getAnnotation(Index.class))
+						|| (null != sequenceField.getAnnotation(Index.class))) {
+					System.out.println(cls.getName() + " has IdCreateTimeUpdateTimeSequenceIndex");
+				}
+			}
+		}
+	}
+
+	/*
+	 * 检查entity是否有重复的字段
+	 */
+	@Test
+	public void checkMutiField() throws Exception {
+		try (ScanResult scanResult = new ClassGraph().enableAllInfo().scan()) {
+			List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(ContainerEntity.class.getName());
+			List<Class<?>> list = new ArrayList<>();
+			for (ClassInfo info : classInfos) {
+				list.add(Class.forName(info.getName()));
+			}
+			for (Class<?> cls : list) {
+				Object o = cls.newInstance();
+				XGsonBuilder.toJson(o);
+			}
+		}
+	}
+
+	/*
+	 * 检查entity是否有重复的字段
+	 */
+	@Test
+	public void checkEnum() throws Exception {
+		try (ScanResult scanResult = new ClassGraph().enableAllInfo().scan()) {
+			List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(ContainerEntity.class.getName());
+			List<Class<?>> list = new ArrayList<>();
+			for (ClassInfo info : classInfos) {
+				list.add(Class.forName(info.getName()));
+			}
+			for (Class<?> cls : list) {
+				List<Field> fields = FieldUtils.getFieldsListWithAnnotation(cls, FieldDescribe.class);
+				for (Field field : fields) {
+					if (field.getType().isEnum()) {
+						Enumerated enumerated = field.getAnnotation(Enumerated.class);
+						Column column = field.getAnnotation(Column.class);
+						if (null == enumerated || (!Objects.equals(EnumType.STRING, enumerated.value()))
+								|| (null == column) || column.length() > 200) {
+							System.out.println(cls + ":" + field.getName());
+						}
+					}
+				}
+			}
+		}
+	}
+
+	/*
+	 * 检查entity是否有重复的字段
+	 */
+	@Test
+	public void checkContainerEntities() throws Exception {
+		try (ScanResult scanResult = new ClassGraph().enableAllInfo().scan()) {
+			List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(Module.class.getName());
+			List<Class<?>> list = new ArrayList<>();
+			for (ClassInfo info : classInfos) {
+				list.add(Class.forName(info.getName()));
+			}
+			for (Class<?> cls : list) {
+				List<String> containerEntities = (List<String>) FieldUtils.readStaticField(cls, "containerEntities");
+				for (String str : containerEntities) {
+					try {
+						Class clazz = Class.forName(str);
+					} catch (Exception e) {
+						System.out.println(cls.getName() + " error " + str);
+					}
+				}
+			}
+		}
+	}
+}

+ 91 - 0
o2server/x_build/src/main/java/com/x/build/CopyJest.java

@@ -0,0 +1,91 @@
+package com.x.build;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+import org.apache.commons.io.FileUtils;
+import org.junit.Test;
+
+import com.x.base.core.project.annotation.Module;
+import com.x.base.core.project.annotation.ModuleType;
+
+import io.github.classgraph.ClassGraph;
+import io.github.classgraph.ClassInfo;
+import io.github.classgraph.ScanResult;
+
+public class CopyJest {
+
+	@Test
+	public void copyDescribeJs() throws Exception {
+		File root = new File(new File("").getAbsolutePath());
+		File template = new File(root, "jest/describe.js");
+		for (ClassInfo classInfo : this.list()) {
+			File dir = new File(root.getParent(), classInfo.getSimpleName());
+			File dest = new File(dir, "src/main/webapp/jest/describe.js");
+			System.out.println("copy to:" + dest.getAbsolutePath());
+			FileUtils.copyFile(template, dest);
+		}
+	}
+
+	@Test
+	public void copyJqueryJs() throws Exception {
+		File root = new File(new File("").getAbsolutePath());
+		File template = new File(root, "jest/jquery.min.js");
+		for (ClassInfo classInfo : this.list()) {
+			File dir = new File(root.getParent(), classInfo.getSimpleName());
+			File dest = new File(dir, "src/main/webapp/jest/jquery.min.js");
+			System.out.println("copy to:" + dest.getAbsolutePath());
+			FileUtils.copyFile(template, dest);
+		}
+	}
+
+	@Test
+	public void copylipboardJs() throws Exception {
+		File root = new File(new File("").getAbsolutePath());
+		File template = new File(root, "jest/clipboard.min.js");
+		for (ClassInfo classInfo : this.list()) {
+			File dir = new File(root.getParent(), classInfo.getSimpleName());
+			File dest = new File(dir, "src/main/webapp/jest/jquery.min.js");
+			System.out.println("copy to:" + dest.getAbsolutePath());
+			FileUtils.copyFile(template, dest);
+		}
+	}
+
+	@Test
+	public void copyIndexHtml() throws Exception {
+		File root = new File(new File("").getAbsolutePath());
+		File template = new File(root, "jest/index.html");
+		for (ClassInfo classInfo : this.list()) {
+			File dir = new File(root.getParent(), classInfo.getSimpleName());
+			File dest = new File(dir, "src/main/webapp/jest/index.html");
+			System.out.println("copy to:" + dest.getAbsolutePath());
+			FileUtils.copyFile(template, dest);
+		}
+	}
+
+	private List<ClassInfo> list() throws Exception {
+		try (ScanResult scanResult = new ClassGraph().enableAllInfo().scan()) {
+			List<ClassInfo> list = new ArrayList<>();
+			List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(Module.class.getName());
+			for (ClassInfo info : classInfos) {
+				Class<?> clz = Class.forName(info.getName());
+				Module module = clz.getAnnotation(Module.class);
+				if (Objects.equals(module.type(), ModuleType.ASSEMBLE)
+						|| Objects.equals(module.type(), ModuleType.SERVICE)) {
+					list.add(info);
+				}
+			}
+			return list;
+		}
+	}
+
+	@Test
+	public void test() throws Exception {
+		for (ClassInfo classInfo : this.list()) {
+			System.out.println(classInfo.getSimpleName());
+		}
+
+	}
+}

+ 130 - 0
o2server/x_build/src/main/java/com/x/build/Publish.java

@@ -0,0 +1,130 @@
+package com.x.build;
+
+import java.io.File;
+import java.security.MessageDigest;
+import java.util.Date;
+import java.util.LinkedHashMap;
+
+import org.apache.commons.codec.binary.Hex;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.junit.Test;
+
+import com.x.base.core.project.gson.XGsonBuilder;
+import com.x.base.core.project.tools.DateTools;
+
+public class Publish {
+
+	private static final String endPoint = "obs.cn-east-2.myhwclouds.com";
+
+	private static final String ak = "67CEL8RL5I3QP20IYBIE";
+
+	private static final String sk = "eyWMRgA2rxhZS4uPcZ4sFGX2T0wAercYgXRKcXEX";
+
+//	private static ObsClient obsClient;
+//
+//	private static String bucketName = "obs-o2public";
+
+	public static void main(String... args) throws Exception {
+		String version = args[0];
+		String dir = args[1];
+		Date now = new Date();
+		// File file_update = new File(dir, version + ".zip");
+		File file_windows = new File(dir, "o2server_" + version + "_windows.zip");
+		File file_linux = new File(dir, "o2server_" + version + "_linux.zip");
+		File file_macos = new File(dir, "o2server_" + version + "_macos.zip");
+		File file_aix = new File(dir, "o2server_" + version + "_aix.zip");
+		File file_neokylin_loongson = new File(dir, "o2server_" + version + "_neokylin_loongson.zip");
+		// File version_dir = new
+		// File("D:/download.o2oa.net/o2server/servers/webServer/download/versions");
+		// File update_dir = new File("D:/o2collect/servers/webServer/o2server/update");
+		// FileUtils.copyFile(file_update, new File(version_dir,
+		// file_update.getName()));
+//		FileUtils.copyFile(file_windows, new File(version_dir, file_windows.getName()));
+//		FileUtils.copyFile(file_linux, new File(version_dir, file_linux.getName()));
+//		FileUtils.copyFile(file_macos, new File(version_dir, file_macos.getName()));
+//		FileUtils.copyFile(file_aix, new File(version_dir, file_aix.getName()));
+
+//		LinkedHashMap<String, Object> map_update = new LinkedHashMap<>();
+//		map_update.put("version", version);
+//		map_update.put("size", file_update.length());
+//		map_update.put("url", "http://download.o2oa.net/download/versions/" + file_update.getName());
+
+//		FileUtils.write(new File(update_dir, FilenameUtils.getBaseName(file_update.getName()) + ".json"),
+//				XGsonBuilder.toJson(map_update), false);
+		LinkedHashMap<String, Object> map_windows = new LinkedHashMap<>();
+		LinkedHashMap<String, Object> map_linux = new LinkedHashMap<>();
+		LinkedHashMap<String, Object> map_macos = new LinkedHashMap<>();
+		LinkedHashMap<String, Object> map_aix = new LinkedHashMap<>();
+		LinkedHashMap<String, Object> map_neokylin_loongson = new LinkedHashMap<>();
+		map_windows.put("system", "windows");
+		map_windows.put("name", "o2server_" + version + "_windows");
+		map_windows.put("fileName", FilenameUtils.getName(file_windows.getName()));
+		map_windows.put("fileSize", file_windows.length() / 1024 / 1024 + "MB");
+		map_windows.put("updateTime", DateTools.format(now));
+		// map_windows.put("url", updateToObs(file_windows.getName(),
+		// file_windows.getParent()));
+		map_windows.put("url", "http://download.o2oa.net/download/" + file_windows.getName());
+		map_windows.put("sha256", sha256(file_windows));
+		map_linux.put("system", "linux");
+		map_linux.put("name", "o2server_" + version + "_linux");
+		map_linux.put("fileName", FilenameUtils.getName(file_linux.getName()));
+		map_linux.put("fileSize", file_linux.length() / 1024 / 1024 + "MB");
+		map_linux.put("updateTime", DateTools.format(now));
+		// map_linux.put("url", updateToObs(file_linux.getName(),
+		// file_linux.getParent()));
+		map_linux.put("url", "http://download.o2oa.net/download/" + file_linux.getName());
+		map_linux.put("sha256", sha256(file_linux));
+		map_macos.put("system", "macos");
+		map_macos.put("name", FilenameUtils.getBaseName(file_macos.getName()));
+		map_macos.put("fileName", FilenameUtils.getName(file_macos.getName()));
+		map_macos.put("fileSize", file_macos.length() / 1024 / 1024 + "MB");
+		map_macos.put("updateTime", DateTools.format(now));
+		// map_macos.put("url", updateToObs(file_macos.getName(),
+		// file_macos.getParent()));
+		map_macos.put("url", "http://download.o2oa.net/download/" + file_macos.getName());
+		map_macos.put("sha256", sha256(file_macos));
+		map_aix.put("system", "aix");
+		map_aix.put("name", FilenameUtils.getBaseName(file_aix.getName()));
+		map_aix.put("fileName", FilenameUtils.getName(file_aix.getName()));
+		map_aix.put("fileSize", file_aix.length() / 1024 / 1024 + "MB");
+		map_aix.put("updateTime", DateTools.format(now));
+		// map_aix.put("url", updateToObs(file_aix.getName(), file_aix.getParent()));
+		map_aix.put("url", "http://download.o2oa.net/download/" + file_aix.getName());
+		map_aix.put("sha256", sha256(file_aix));
+		map_neokylin_loongson.put("system", "neokylin_loongson");
+		map_neokylin_loongson.put("name", FilenameUtils.getBaseName(file_neokylin_loongson.getName()));
+		map_neokylin_loongson.put("fileName", FilenameUtils.getName(file_neokylin_loongson.getName()));
+		map_neokylin_loongson.put("fileSize", file_neokylin_loongson.length() / 1024 / 1024 + "MB");
+		map_neokylin_loongson.put("updateTime", DateTools.format(now));
+		// map_aix.put("url", updateToObs(file_aix.getName(), file_aix.getParent()));
+		map_neokylin_loongson.put("url", "http://download.o2oa.net/download/" + file_neokylin_loongson.getName());
+		map_neokylin_loongson.put("sha256", sha256(file_neokylin_loongson));
+		LinkedHashMap<String, Object> map = new LinkedHashMap<>();
+		map.put("windows", map_windows);
+		map.put("linux", map_linux);
+		map.put("macos", map_macos);
+		map.put("aix", map_aix);
+		map.put("neokylin_loongson", map_neokylin_loongson);
+		File file_download = new File("D:/download.o2oa.net/o2server/servers/webServer/download",
+				"download_preview.json");
+		FileUtils.writeStringToFile(file_download, XGsonBuilder.toJson(map));
+		File file_download_jsonp = new File("D:/download.o2oa.net/o2server/servers/webServer/download",
+				"download_preview.jsonp");
+		String jsonp = "callback(" + StringUtils.LF + XGsonBuilder.toJson(map) + StringUtils.LF + ")";
+		FileUtils.writeStringToFile(file_download_jsonp, jsonp);
+	}
+
+	private static String sha256(File file) throws Exception {
+		MessageDigest messageDigest;
+		messageDigest = MessageDigest.getInstance("SHA-256");
+		byte[] hash = messageDigest.digest(FileUtils.readFileToByteArray(file));
+		return Hex.encodeHexString(hash);
+	}
+
+	@Test
+	public void test1() throws Exception {
+		System.out.println(sha256(new File("d:/o2server_20180615160351_x86.zip")));
+	}
+}

+ 199 - 0
o2server/x_build/src/main/java/com/x/build/SyncToGitHubDirectory.java

@@ -0,0 +1,199 @@
+package com.x.build;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.filefilter.WildcardFileFilter;
+import org.junit.Test;
+
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+
+public class SyncToGitHubDirectory {
+
+	private static Logger logger = LoggerFactory.getLogger(SyncToGitHubDirectory.class);
+
+	private static List<String> dirExcludes = new ArrayList<>();
+	private static List<String> dirIncludes = new ArrayList<>();
+	private static List<String> fileExcludes = new ArrayList<>();
+	private static List<String> fileIncludes = new ArrayList<>();
+
+	static {
+		dirExcludes.add("*/describe");
+		dirExcludes.add("*\\describe");
+		dirExcludes.add("*/target");
+		dirExcludes.add("*\\target");
+		dirExcludes.add("*/x_build_and_scratch");
+		dirExcludes.add("*\\x_build_and_scratch");
+		dirExcludes.add("*/.settings");
+		dirExcludes.add("*\\.settings");
+	}
+	static {
+		dirIncludes.add("*/src");
+		dirIncludes.add("*\\src");
+	}
+	static {
+		fileExcludes.add("*.class");
+		fileExcludes.add("*_.java");
+		fileExcludes.add("*/.classpath");
+		fileExcludes.add("*\\.classpath");
+		fileExcludes.add("*/.project");
+		fileExcludes.add("*\\.project");
+		fileExcludes.add("*/META-INF/persistence.xml");
+		fileExcludes.add("*\\META-INF\\persistence.xml");
+	}
+	static {
+		fileIncludes.add("*.java");
+		fileIncludes.add("*.json");
+		fileIncludes.add("*.xml");
+		fileIncludes.add("*/pom.xml");
+		fileIncludes.add("*\\pom.xml");
+	}
+
+	public static void main(String... args) throws Exception {
+		File source = new File(args[0]);
+		File target = new File(args[1]);
+		if ((!source.exists()) || (!source.isDirectory())) {
+			throw new Exception("源目录为空或者不是目录.");
+		}
+		if ((!target.exists()) || (!target.isDirectory())) {
+			throw new Exception("目标目录为空或者不是目录.");
+		}
+		List<File> sources = new ArrayList<>();
+		for (File f : source.listFiles()) {
+			if (f.isDirectory()) {
+				if (FilenameUtils.wildcardMatch(f.getName(), "x_*")
+						&& (!FilenameUtils.wildcardMatch(f.getName(), "x_build_and_scratch"))) {
+					sources.add(f);
+				}
+			}
+		}
+		for (File s : sources) {
+			File t = new File(target, s.getName());
+			FileUtils.forceMkdir(t);
+			logger.print("源目录: {}, 目标目录: {} 开始推送.", s.getAbsolutePath(), t.getAbsolutePath());
+			SyncToGitHubDirectory sync = new SyncToGitHubDirectory();
+			sync.synchronize(s, t);
+		}
+	}
+
+	private void synchronize(File source, File target) throws Exception {
+		int modify = 0;
+		for (File f : source.listFiles()) {
+			if (f.isDirectory()) {
+				File dir = this.dir(f, target);
+				if (dir.exists()) {
+					synchronize(f, dir);
+				}
+			} else {
+				modify += this.file(f, target);
+			}
+		}
+		this.clean(source, target);
+		logger.print("{} {} files modified.", source.getAbsolutePath(), modify);
+	}
+
+	private void clean(File source, File target) throws Exception {
+		if (!this.match(target)) {
+			logger.print("删除目录: {}.", target.getAbsolutePath());
+			FileUtils.forceDelete(target);
+		} else {
+			for (File t : target.listFiles()) {
+				if (t.isDirectory() && (!this.match(t))) {
+					logger.print("删除目录: {}.", t.getAbsolutePath());
+					FileUtils.forceDelete(t);
+					continue;
+				}
+				if (t.isFile() && (!this.match(t))) {
+					logger.print("删除文件: {}.", t.getAbsolutePath());
+					FileUtils.forceDelete(t);
+					continue;
+				}
+				File s = new File(source, t.getName());
+				if ((!s.exists()) || (t.isDirectory() != s.isDirectory())) {
+					FileUtils.forceDelete(t);
+				}
+			}
+		}
+	}
+
+	private File dir(File s, File target) throws Exception {
+		File t = new File(target, s.getName());
+		if (this.match(s)) {
+			logger.print("推送目录: {}.", s.getAbsolutePath());
+			if ((!t.exists()) || (!t.isDirectory())) {
+				FileUtils.forceMkdir(t);
+			}
+		} else {
+			logger.print("跳过推送目录: {}.", s.getAbsolutePath());
+		}
+		return t;
+	}
+
+	private int file(File s, File target) throws Exception {
+		if (this.match(s)) {
+			logger.print("推送文件: {}.", s.getAbsolutePath());
+			File t = new File(target, s.getName());
+			if ((!t.exists()) || t.isDirectory() || (t.lastModified() != s.lastModified())) {
+				FileUtils.copyFile(s, t, true);
+				return 1;
+			}
+		} else {
+			logger.print("跳过推送文件: {}.", s.getAbsolutePath());
+		}
+		return 0;
+	}
+
+	private boolean match(File file) {
+		if (file.isDirectory()) {
+			return this.dirMatch(file);
+		} else {
+			return this.fileMatch(file);
+		}
+	}
+
+	private boolean fileMatch(File file) {
+		for (String wildcard : fileExcludes) {
+			if (FilenameUtils.wildcardMatchOnSystem(file.getAbsolutePath(), wildcard)) {
+				return false;
+			}
+		}
+		for (String wildcard : fileIncludes) {
+			if (FilenameUtils.wildcardMatchOnSystem(file.getAbsolutePath(), wildcard)) {
+				return true;
+			}
+		}
+		return true;
+	}
+
+	private boolean dirMatch(File file) {
+		for (String wildcard : dirExcludes) {
+			if (FilenameUtils.wildcardMatchOnSystem(file.getAbsolutePath(), wildcard)) {
+				return false;
+			}
+		}
+		for (String wildcard : dirIncludes) {
+			if (FilenameUtils.wildcardMatchOnSystem(file.getAbsolutePath(), wildcard)) {
+				return true;
+			}
+		}
+		return true;
+	}
+
+	@Test
+	public void test1() {
+		File file = new File("E:\\bbb\\x_attendance_assemble_control\\.project");
+		System.out.println(FilenameUtils.wildcardMatchOnSystem(file.getAbsolutePath(), "*\\.project"));
+
+	}
+
+	@Test
+	public void test2() {
+		File file = new File("D:\\aaa\\2\\abc.java");
+		WildcardFileFilter filter = new WildcardFileFilter("*/2/*.java");
+		System.out.println(filter.accept(file));
+	}
+}

+ 135 - 0
o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy.java

@@ -0,0 +1,135 @@
+package com.x.build.redeploy;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.Socket;
+import java.util.Date;
+
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.junit.Test;
+
+import com.x.base.core.project.annotation.Module;
+import com.x.base.core.project.annotation.ModuleCategory;
+import com.x.base.core.project.annotation.ModuleType;
+import com.x.base.core.project.gson.XGsonBuilder;
+import com.x.base.core.project.tools.Crypto;
+import com.x.base.core.project.tools.DateTools;
+import com.x.base.core.project.tools.FileTools;
+
+import jersey.repackaged.com.google.common.base.Objects;
+
+public class Redeploy {
+
+	public static final String DEFAULT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWcVZIS57VeOUzi8c01WKvwJK9uRe6hrGTUYmF6J/pI6/UvCbdBWCoErbzsBZOElOH8Sqal3vsNMVLjPYClfoDyYDaUlakP3ldfnXJzAFJVVubF53KadG+fwnh9ZMvxdh7VXVqRL3IQBDwGgzX4rmSK+qkUJjc3OkrNJPB7LLD8QIDAQAB";
+	public static final String DEFAULT_PRIVATE_KEY = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJZxVkhLntV45TOLxzTVYq/Akr25F7qGsZNRiYXon+kjr9S8Jt0FYKgStvOwFk4SU4fxKpqXe+w0xUuM9gKV+gPJgNpSVqQ/eV1+dcnMAUlVW5sXncpp0b5/CeH1ky/F2HtVdWpEvchAEPAaDNfiuZIr6qRQmNzc6Ss0k8HsssPxAgMBAAECgYAWtRy05NUgm5Lc6Og0jVDL/mEnydxPBy2ectwzHh2k7wIHNi8XhUxFki2TMqzrM9Dv3/LySpMl4AE3mhs34LNPy6F+MwyF5X7j+2Y6MflJyeb9HNyT++viysQneoOEiOk3ghxF2/GPjpiEF79wSp+1YKTxRAyq7ypV3t35fGOOEQJBANLDPWl8b5c3lrcz/dTamMjHbVamEyX43yzQOphzkhYsz4pruATzTxU+z8/zPdEqHcWWV39CP3xu3EYNcAhxJW8CQQC2u7PF5Xb1xYRCsmIPssFxil64vvdUadSxl7GLAgjQ9ULyYWB24KObCEzLnPcT8Pf2Q0YQOixxa/78FuzmgbyfAkA7ZFFV/H7lugB6t+f7p24OhkRFep9CwBMD6dnZRBgSr6X8d8ZvfrD2Z7DgBMeSva+OEoOtlNmXExZ3lynO9zN5AkAVczEmIMp3DSl6XtAuAZC9kD2QODJ2QToLYsAfjiyUwsWKCC43piTuVOoW2KUUPSwOR1VZIEsJQWEcHGDQqhgHAkAeZ7a6dVRZFdBwKA0ADjYCufAW2cIYiVDQBJpgB+kiLQflusNOCBK0FT3lg8BdUSy2D253Ih6l3lbaM/4M7DFQ";
+
+	public static String redeploy(String server, Integer port, Class<?> cls, String publicKey) {
+		return redeploy(server, port, cls.getSimpleName(), publicKey);
+	}
+
+	public static String redeploy(String server, Integer port, String simpleName, String publicKey) {
+		String result = "";
+		try {
+			File file = find(simpleName);
+			byte[] bytes = FileUtils.readFileToByteArray(file);
+			CommandObject cmd = new CommandObject();
+			cmd.setCommand("redeploy:" + simpleName);
+			cmd.setBody(Base64.encodeBase64URLSafeString(bytes));
+			if (StringUtils.isNotEmpty(publicKey)) {
+				cmd.setCredential(Crypto.rsaEncrypt("o2@" + DateTools.format(new Date()), publicKey));
+			}
+			String json = XGsonBuilder.toJson(cmd);
+			try (Socket client = new Socket(server, port)) {
+				try (OutputStream outputStream = client.getOutputStream();
+						InputStream inputStream = client.getInputStream()) {
+					IOUtils.write(json, outputStream);
+					client.shutdownOutput();
+					result = IOUtils.toString(inputStream);
+					client.shutdownInput();
+				}
+			}
+		} catch (Exception e) {
+			result = e.getMessage();
+			e.printStackTrace();
+		}
+		return result;
+	}
+
+	private static File find(String simpleClassName) {
+		File dir = new File(FileTools.parent(FileTools.parent(new File("."))), "store");
+		File file = new File(dir, simpleClassName + ".war");
+		if (file.exists()) {
+			return file;
+		}
+		dir = new File(FileTools.parent(FileTools.parent(new File("."))), "store/jars");
+		file = new File(dir, simpleClassName + ".jar");
+		if (file.exists()) {
+			return file;
+		}
+		dir = new File(FileTools.parent(FileTools.parent(new File("."))), "custom");
+		file = new File(dir, simpleClassName + ".war");
+		if (file.exists()) {
+			return file;
+		}
+		dir = new File(FileTools.parent(FileTools.parent(new File("."))), "custom/jars");
+		file = new File(dir, simpleClassName + ".jar");
+		if (file.exists()) {
+			return file;
+		}
+		return null;
+	}
+
+	public static class CommandObject {
+
+		private String command;
+
+		private String body;
+
+		private String credential;
+
+		public String getCommand() {
+			return command;
+		}
+
+		public void setCommand(String command) {
+			this.command = command;
+		}
+
+		public String getBody() {
+			return body;
+		}
+
+		public void setBody(String body) {
+			this.body = body;
+		}
+
+		public String getCredential() {
+			return credential;
+		}
+
+		public void setCredential(String credential) {
+			this.credential = credential;
+		}
+
+	}
+
+	@Test
+	public void testRsaEncrypt() throws Exception {
+		File file = new File("D:/O2/code/store/x_query_assemble_surface.war");
+		byte[] bytes = FileUtils.readFileToByteArray(file);
+		CommandObject cmd = new CommandObject();
+		cmd.setCommand("redeploy:x_query_assemble_surface");
+		cmd.setBody(Base64.encodeBase64URLSafeString(bytes));
+		String json = XGsonBuilder.toJson(cmd);
+		System.out.println(json);
+		String en = Crypto.rsaEncrypt(json, DEFAULT_PUBLIC_KEY);
+		System.out.println(en);
+		String de = Crypto.rsaDecrypt(en, DEFAULT_PRIVATE_KEY);
+		System.out.println(de);
+	}
+
+}

+ 224 - 0
o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_127_0_0_1.java

@@ -0,0 +1,224 @@
+package com.x.build.redeploy;
+
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.*;
+import org.junit.Test;
+
+public class Redeploy_127_0_0_1 {
+
+	private static Logger logger = LoggerFactory.getLogger(Redeploy_127_0_0_1.class);
+
+	public static final String HOST = "127.0.0.1";
+
+	public static Integer PORT = 20010;
+
+	@Test
+	public void x_hotpic_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_hotpic_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_file_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_file_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_cms_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_cms_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_component_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_component_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_attendance_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_attendance_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_base_core_project() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_base_core_project.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_message_assemble_communicate() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_message_assemble_communicate.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_mind_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_bbs_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_bbs_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_core_entity() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_okr_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_okr_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_mind_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_designer() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_service_processing() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_designer() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_service_processing() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_core_entity() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_meeting_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_meeting_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_organization_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_authentication() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_organization_assemble_authentication.class,
+				Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_personal() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_organization_assemble_personal.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_portal_assemble_surface() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_portal_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_program_center() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_program_center.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_meeting_core_entity() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_meeting_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+ 
+
+	@Test
+	public void x_wcrm_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, "x_wcrm_assemble_control", Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_teamwork_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_teamwork_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_teamwork_core_entity() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, "x_teamwork_core_entity", Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+	
+	@Test
+	public void zoneland_unicom_bj_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, "zoneland_unicom_bj_assemble_control", Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_file_core_entity() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, "x_file_core_entity",Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+	
+
+}

+ 194 - 0
o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_172_16_96_100.java

@@ -0,0 +1,194 @@
+package com.x.build.redeploy;
+
+import org.junit.Test;
+
+import com.x.base.core.project.x_attendance_assemble_control;
+import com.x.base.core.project.x_base_core_project;
+import com.x.base.core.project.x_bbs_assemble_control;
+import com.x.base.core.project.x_bbs_core_entity;
+import com.x.base.core.project.x_calendar_assemble_control;
+import com.x.base.core.project.x_calendar_core_entity;
+import com.x.base.core.project.x_cms_assemble_control;
+import com.x.base.core.project.x_cms_core_entity;
+import com.x.base.core.project.x_component_assemble_control;
+import com.x.base.core.project.x_file_assemble_control;
+import com.x.base.core.project.x_hotpic_assemble_control;
+import com.x.base.core.project.x_meeting_assemble_control;
+import com.x.base.core.project.x_message_assemble_communicate;
+import com.x.base.core.project.x_mind_assemble_control;
+import com.x.base.core.project.x_mind_core_entity;
+import com.x.base.core.project.x_okr_assemble_control;
+import com.x.base.core.project.x_okr_core_entity;
+import com.x.base.core.project.x_organization_assemble_authentication;
+import com.x.base.core.project.x_organization_assemble_control;
+import com.x.base.core.project.x_portal_assemble_surface;
+import com.x.base.core.project.x_processplatform_assemble_designer;
+import com.x.base.core.project.x_processplatform_assemble_surface;
+import com.x.base.core.project.x_processplatform_service_processing;
+import com.x.base.core.project.x_query_assemble_designer;
+import com.x.base.core.project.x_query_assemble_surface;
+import com.x.base.core.project.x_query_service_processing;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+
+public class Redeploy_172_16_96_100 {
+
+	private static Logger logger = LoggerFactory.getLogger(Redeploy_172_16_96_100.class);
+
+	public static final String HOST = "172.16.96.100";
+
+	public static Integer PORT = 20010;
+
+	@Test
+	public void x_hotpic_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_hotpic_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_file_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_file_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_cms_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_cms_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_component_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_component_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_attendance_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_attendance_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_base_core_project() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_base_core_project.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_message_assemble_communicate() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_message_assemble_communicate.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_mind_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_bbs_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_bbs_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_core_entity() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_okr_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_okr_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_mind_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_designer() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_service_processing() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_designer() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_service_processing() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_meeting_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_meeting_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_organization_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_authentication() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_organization_assemble_authentication.class,
+				Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_portal_assemble_surface() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_portal_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+}

+ 194 - 0
o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_172_16_97_5.java

@@ -0,0 +1,194 @@
+package com.x.build.redeploy;
+
+import org.junit.Test;
+
+import com.x.base.core.project.x_attendance_assemble_control;
+import com.x.base.core.project.x_base_core_project;
+import com.x.base.core.project.x_bbs_assemble_control;
+import com.x.base.core.project.x_bbs_core_entity;
+import com.x.base.core.project.x_calendar_assemble_control;
+import com.x.base.core.project.x_calendar_core_entity;
+import com.x.base.core.project.x_cms_assemble_control;
+import com.x.base.core.project.x_cms_core_entity;
+import com.x.base.core.project.x_component_assemble_control;
+import com.x.base.core.project.x_file_assemble_control;
+import com.x.base.core.project.x_hotpic_assemble_control;
+import com.x.base.core.project.x_meeting_assemble_control;
+import com.x.base.core.project.x_message_assemble_communicate;
+import com.x.base.core.project.x_mind_assemble_control;
+import com.x.base.core.project.x_mind_core_entity;
+import com.x.base.core.project.x_okr_assemble_control;
+import com.x.base.core.project.x_okr_core_entity;
+import com.x.base.core.project.x_organization_assemble_authentication;
+import com.x.base.core.project.x_organization_assemble_control;
+import com.x.base.core.project.x_portal_assemble_surface;
+import com.x.base.core.project.x_processplatform_assemble_designer;
+import com.x.base.core.project.x_processplatform_assemble_surface;
+import com.x.base.core.project.x_processplatform_service_processing;
+import com.x.base.core.project.x_query_assemble_designer;
+import com.x.base.core.project.x_query_assemble_surface;
+import com.x.base.core.project.x_query_service_processing;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+
+public class Redeploy_172_16_97_5 {
+
+	private static Logger logger = LoggerFactory.getLogger(Redeploy_172_16_97_5.class);
+
+	public static final String HOST = "172.16.97.5";
+
+	public static Integer PORT = 20010;
+
+	@Test
+	public void x_hotpic_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_hotpic_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_file_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_file_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_cms_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_cms_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_component_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_component_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_attendance_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_attendance_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_base_core_project() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_base_core_project.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_message_assemble_communicate() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_message_assemble_communicate.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_mind_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_bbs_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_bbs_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_core_entity() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_okr_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_okr_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_mind_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_designer() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_service_processing() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_designer() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_service_processing() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_meeting_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_meeting_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_organization_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_authentication() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_organization_assemble_authentication.class,
+				Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_portal_assemble_surface() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_portal_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+}

+ 194 - 0
o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_cx_o2oa_net.java

@@ -0,0 +1,194 @@
+package com.x.build.redeploy;
+
+import org.junit.Test;
+
+import com.x.base.core.project.x_attendance_assemble_control;
+import com.x.base.core.project.x_base_core_project;
+import com.x.base.core.project.x_bbs_assemble_control;
+import com.x.base.core.project.x_bbs_core_entity;
+import com.x.base.core.project.x_calendar_assemble_control;
+import com.x.base.core.project.x_calendar_core_entity;
+import com.x.base.core.project.x_cms_assemble_control;
+import com.x.base.core.project.x_cms_core_entity;
+import com.x.base.core.project.x_component_assemble_control;
+import com.x.base.core.project.x_file_assemble_control;
+import com.x.base.core.project.x_hotpic_assemble_control;
+import com.x.base.core.project.x_meeting_assemble_control;
+import com.x.base.core.project.x_message_assemble_communicate;
+import com.x.base.core.project.x_mind_assemble_control;
+import com.x.base.core.project.x_mind_core_entity;
+import com.x.base.core.project.x_okr_assemble_control;
+import com.x.base.core.project.x_okr_core_entity;
+import com.x.base.core.project.x_organization_assemble_authentication;
+import com.x.base.core.project.x_organization_assemble_control;
+import com.x.base.core.project.x_portal_assemble_surface;
+import com.x.base.core.project.x_processplatform_assemble_designer;
+import com.x.base.core.project.x_processplatform_assemble_surface;
+import com.x.base.core.project.x_processplatform_service_processing;
+import com.x.base.core.project.x_query_assemble_designer;
+import com.x.base.core.project.x_query_assemble_surface;
+import com.x.base.core.project.x_query_service_processing;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+
+public class Redeploy_cx_o2oa_net {
+
+	private static Logger logger = LoggerFactory.getLogger(Redeploy_cx_o2oa_net.class);
+
+	public static final String HOST = "xc.o2oa.net";
+
+	public static Integer PORT = 20010;
+
+	@Test
+	public void x_hotpic_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_hotpic_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_file_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_file_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_cms_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_core_entity() {
+		logger.print("result:{}.", Redeploy.redeploy(HOST, PORT, x_cms_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_component_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_component_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_attendance_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_attendance_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_base_core_project() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_base_core_project.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_message_assemble_communicate() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_message_assemble_communicate.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_mind_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_bbs_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_core_entity() {
+		logger.print("result:{}.", Redeploy.redeploy(HOST, PORT, x_bbs_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_calendar_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_core_entity() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_calendar_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_okr_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_core_entity() {
+		logger.print("result:{}.", Redeploy.redeploy(HOST, PORT, x_okr_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_core_entity() {
+		logger.print("result:{}.", Redeploy.redeploy(HOST, PORT, x_mind_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_designer() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_service_processing() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_designer() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_service_processing() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_meeting_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_meeting_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_organization_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_authentication() {
+		logger.print("result:{}.", Redeploy.redeploy(HOST, PORT, x_organization_assemble_authentication.class,
+				Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_portal_assemble_surface() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_portal_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+}

+ 212 - 0
o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_demo_o2oa_net.java

@@ -0,0 +1,212 @@
+package com.x.build.redeploy;
+
+import org.junit.Test;
+
+import com.x.base.core.project.x_attendance_assemble_control;
+import com.x.base.core.project.x_base_core_project;
+import com.x.base.core.project.x_bbs_assemble_control;
+import com.x.base.core.project.x_bbs_core_entity;
+import com.x.base.core.project.x_calendar_assemble_control;
+import com.x.base.core.project.x_calendar_core_entity;
+import com.x.base.core.project.x_cms_assemble_control;
+import com.x.base.core.project.x_cms_core_entity;
+import com.x.base.core.project.x_component_assemble_control;
+import com.x.base.core.project.x_file_assemble_control;
+import com.x.base.core.project.x_hotpic_assemble_control;
+import com.x.base.core.project.x_meeting_assemble_control;
+import com.x.base.core.project.x_message_assemble_communicate;
+import com.x.base.core.project.x_mind_assemble_control;
+import com.x.base.core.project.x_mind_core_entity;
+import com.x.base.core.project.x_okr_assemble_control;
+import com.x.base.core.project.x_okr_core_entity;
+import com.x.base.core.project.x_organization_assemble_authentication;
+import com.x.base.core.project.x_organization_assemble_control;
+import com.x.base.core.project.x_portal_assemble_surface;
+import com.x.base.core.project.x_processplatform_assemble_designer;
+import com.x.base.core.project.x_processplatform_assemble_surface;
+import com.x.base.core.project.x_processplatform_service_processing;
+import com.x.base.core.project.x_query_assemble_designer;
+import com.x.base.core.project.x_query_assemble_surface;
+import com.x.base.core.project.x_query_service_processing;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+
+public class Redeploy_demo_o2oa_net {
+
+	private static Logger logger = LoggerFactory.getLogger(Redeploy_demo_o2oa_net.class);
+
+	public static final String HOST = "114.116.106.38";
+
+	public static Integer PORT = 20010;
+
+	@Test
+	public void x_hotpic_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_hotpic_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_file_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_file_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+	
+	@Test
+	public void x_cms_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_cms_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_cms_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_component_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_component_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_attendance_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_attendance_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+//	@Test
+//	public void x_report_assemble_control() {
+//		logger.print("result:{}",
+//				Redeploy.redeploy(HOST, PORT, x_report_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+//	}
+
+	@Test
+	public void x_base_core_project() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_base_core_project.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+//	@Test
+//	public void x_report_core_entity() {
+//		logger.print("result:{}",
+//				Redeploy.redeploy(HOST, PORT, x_report_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+//	}
+
+	@Test
+	public void x_message_assemble_communicate() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_message_assemble_communicate.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_mind_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_bbs_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_bbs_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_core_entity() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_okr_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_okr_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_mind_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_designer() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_service_processing() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_designer() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_service_processing() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_meeting_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_meeting_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_organization_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_authentication() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_organization_assemble_authentication.class,
+				Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+//	@Test
+//	public void x_organization_assemble_custom() {
+//		logger.print("result:{}",
+//				Redeploy.redeploy(HOST, PORT, x_organization_assemble_custom.class, Redeploy.DEFAULT_PUBLIC_KEY));
+//	}
+
+	@Test
+	public void x_portal_assemble_surface() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_portal_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+}

+ 200 - 0
o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_dev10_o2oa_net.java

@@ -0,0 +1,200 @@
+package com.x.build.redeploy;
+
+import org.junit.Test;
+
+import com.x.base.core.project.x_attendance_assemble_control;
+import com.x.base.core.project.x_base_core_project;
+import com.x.base.core.project.x_bbs_assemble_control;
+import com.x.base.core.project.x_bbs_core_entity;
+import com.x.base.core.project.x_calendar_assemble_control;
+import com.x.base.core.project.x_calendar_core_entity;
+import com.x.base.core.project.x_cms_assemble_control;
+import com.x.base.core.project.x_cms_core_entity;
+import com.x.base.core.project.x_component_assemble_control;
+import com.x.base.core.project.x_file_assemble_control;
+import com.x.base.core.project.x_hotpic_assemble_control;
+import com.x.base.core.project.x_meeting_assemble_control;
+import com.x.base.core.project.x_message_assemble_communicate;
+import com.x.base.core.project.x_mind_assemble_control;
+import com.x.base.core.project.x_mind_core_entity;
+import com.x.base.core.project.x_okr_assemble_control;
+import com.x.base.core.project.x_okr_core_entity;
+import com.x.base.core.project.x_organization_assemble_authentication;
+import com.x.base.core.project.x_organization_assemble_control;
+import com.x.base.core.project.x_portal_assemble_surface;
+import com.x.base.core.project.x_processplatform_assemble_designer;
+import com.x.base.core.project.x_processplatform_assemble_surface;
+import com.x.base.core.project.x_processplatform_service_processing;
+import com.x.base.core.project.x_query_assemble_designer;
+import com.x.base.core.project.x_query_assemble_surface;
+import com.x.base.core.project.x_query_service_processing;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+
+public class Redeploy_dev10_o2oa_net {
+
+	private static Logger logger = LoggerFactory.getLogger(Redeploy_dev10_o2oa_net.class);
+
+	public static final String HOST = "dev10.o2oa.net";
+
+	public static Integer PORT = 20010;
+
+	@Test
+	public void x_hotpic_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_hotpic_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_file_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_file_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_cms_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_cms_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_component_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_component_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_attendance_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_attendance_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_base_core_project() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_base_core_project.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_message_assemble_communicate() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_message_assemble_communicate.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_mind_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_bbs_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_bbs_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_core_entity() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_okr_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_okr_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_mind_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_designer() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_service_processing() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_designer() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_service_processing() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_meeting_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_meeting_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_organization_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_authentication() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_organization_assemble_authentication.class,
+				Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+//	@Test
+//	public void x_organization_assemble_custom() {
+//		logger.print("result:{}",
+//				Redeploy.redeploy(HOST, PORT, x_organization_assemble_custom.class, Redeploy.DEFAULT_PUBLIC_KEY));
+//	}
+
+	@Test
+	public void x_portal_assemble_surface() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_portal_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+}

+ 243 - 0
o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_dev_o2oa_net.java

@@ -0,0 +1,243 @@
+package com.x.build.redeploy;
+
+import org.junit.Test;
+
+import com.x.base.core.project.x_attendance_assemble_control;
+import com.x.base.core.project.x_base_core_project;
+import com.x.base.core.project.x_bbs_assemble_control;
+import com.x.base.core.project.x_bbs_core_entity;
+import com.x.base.core.project.x_calendar_assemble_control;
+import com.x.base.core.project.x_calendar_core_entity;
+import com.x.base.core.project.x_cms_assemble_control;
+import com.x.base.core.project.x_cms_core_entity;
+import com.x.base.core.project.x_component_assemble_control;
+import com.x.base.core.project.x_file_assemble_control;
+import com.x.base.core.project.x_file_core_entity;
+import com.x.base.core.project.x_hotpic_assemble_control;
+import com.x.base.core.project.x_meeting_assemble_control;
+import com.x.base.core.project.x_message_assemble_communicate;
+import com.x.base.core.project.x_mind_assemble_control;
+import com.x.base.core.project.x_mind_core_entity;
+import com.x.base.core.project.x_okr_assemble_control;
+import com.x.base.core.project.x_okr_core_entity;
+import com.x.base.core.project.x_organization_assemble_authentication;
+import com.x.base.core.project.x_organization_assemble_control;
+import com.x.base.core.project.x_organization_assemble_express;
+import com.x.base.core.project.x_organization_core_entity;
+import com.x.base.core.project.x_portal_assemble_surface;
+import com.x.base.core.project.x_processplatform_assemble_designer;
+import com.x.base.core.project.x_processplatform_assemble_surface;
+import com.x.base.core.project.x_processplatform_service_processing;
+import com.x.base.core.project.x_query_assemble_designer;
+import com.x.base.core.project.x_query_assemble_surface;
+import com.x.base.core.project.x_query_core_express;
+import com.x.base.core.project.x_query_service_processing;
+import com.x.base.core.project.x_teamwork_assemble_control;
+import com.x.base.core.project.x_teamwork_core_entity;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+
+public class Redeploy_dev_o2oa_net {
+
+	private static Logger logger = LoggerFactory.getLogger(Redeploy_dev_o2oa_net.class);
+
+	public static final String HOST = "dev.o2oa.net";
+
+	public static Integer PORT = 20010;
+
+	@Test
+	public void x_hotpic_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_hotpic_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_file_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_file_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_file_core_entity() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_file_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_cms_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_core_entity() {
+		logger.print("result:{}.", Redeploy.redeploy(HOST, PORT, x_cms_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_component_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_component_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_attendance_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_attendance_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_base_core_project() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_base_core_project.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_message_assemble_communicate() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_message_assemble_communicate.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_mind_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_bbs_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_core_entity() {
+		logger.print("result:{}.", Redeploy.redeploy(HOST, PORT, x_bbs_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_calendar_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_core_entity() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_calendar_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_okr_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_core_entity() {
+		logger.print("result:{}.", Redeploy.redeploy(HOST, PORT, x_okr_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_core_entity() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_mind_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_designer() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_service_processing() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+	
+	@Test
+	public void x_query_core_express() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_core_express.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_designer() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_service_processing() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_meeting_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_meeting_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_express() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_organization_assemble_express.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_organization_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_authentication() {
+		logger.print("result:{}.", Redeploy.redeploy(HOST, PORT, x_organization_assemble_authentication.class,
+				Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_portal_assemble_surface() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_portal_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_teamwork_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_teamwork_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_teamwork_core_entity() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_teamwork_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_core_entity() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, x_organization_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_wcrm_assemble_control() {
+		logger.print("result:{}.",
+				Redeploy.redeploy(HOST, PORT, "x_wcrm_assemble_control", Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+}

+ 201 - 0
o2server/x_build/src/main/java/com/x/build/redeploy/Redeploy_poc_zoneland_net.java

@@ -0,0 +1,201 @@
+package com.x.build.redeploy;
+
+import org.junit.Test;
+
+import com.x.base.core.project.x_attendance_assemble_control;
+import com.x.base.core.project.x_base_core_project;
+import com.x.base.core.project.x_bbs_assemble_control;
+import com.x.base.core.project.x_bbs_core_entity;
+import com.x.base.core.project.x_calendar_assemble_control;
+import com.x.base.core.project.x_calendar_core_entity;
+import com.x.base.core.project.x_cms_assemble_control;
+import com.x.base.core.project.x_cms_core_entity;
+import com.x.base.core.project.x_component_assemble_control;
+import com.x.base.core.project.x_file_assemble_control;
+import com.x.base.core.project.x_hotpic_assemble_control;
+import com.x.base.core.project.x_meeting_assemble_control;
+import com.x.base.core.project.x_message_assemble_communicate;
+import com.x.base.core.project.x_mind_assemble_control;
+import com.x.base.core.project.x_mind_core_entity;
+import com.x.base.core.project.x_okr_assemble_control;
+import com.x.base.core.project.x_okr_core_entity;
+import com.x.base.core.project.x_organization_assemble_authentication;
+import com.x.base.core.project.x_organization_assemble_control;
+import com.x.base.core.project.x_portal_assemble_surface;
+import com.x.base.core.project.x_processplatform_assemble_designer;
+import com.x.base.core.project.x_processplatform_assemble_surface;
+import com.x.base.core.project.x_processplatform_service_processing;
+import com.x.base.core.project.x_query_assemble_designer;
+import com.x.base.core.project.x_query_assemble_surface;
+import com.x.base.core.project.x_query_core_express;
+import com.x.base.core.project.x_query_service_processing;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+
+public class Redeploy_poc_zoneland_net {
+
+	private static Logger logger = LoggerFactory.getLogger(Redeploy_poc_zoneland_net.class);
+
+	public static final String HOST = "poc.zoneland.net";
+
+	public static Integer PORT = 20010;
+
+	@Test
+	public void x_hotpic_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_hotpic_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_file_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_file_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_cms_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_cms_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_cms_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_component_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_component_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_attendance_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_attendance_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_base_core_project() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_base_core_project.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_message_assemble_communicate() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_message_assemble_communicate.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_mind_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_bbs_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_bbs_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_bbs_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_calendar_core_entity() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_calendar_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_okr_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_okr_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_okr_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_mind_core_entity() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_mind_core_entity.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_assemble_designer() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_query_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_service_processing() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_surface() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_assemble_designer() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_assemble_designer.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_processplatform_service_processing() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_processplatform_service_processing.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_query_core_express() {
+		logger.print("result: {}.",
+				Redeploy.redeploy(HOST, PORT, x_query_core_express.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+	
+	@Test
+	public void x_meeting_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_meeting_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_control() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_organization_assemble_control.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_organization_assemble_authentication() {
+		logger.print("result:{}", Redeploy.redeploy(HOST, PORT, x_organization_assemble_authentication.class,
+				Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+	@Test
+	public void x_portal_assemble_surface() {
+		logger.print("result:{}",
+				Redeploy.redeploy(HOST, PORT, x_portal_assemble_surface.class, Redeploy.DEFAULT_PUBLIC_KEY));
+	}
+
+}

+ 8 - 0
o2server/x_build/src/main/java/com/x/build/redeploy/package-info.java

@@ -0,0 +1,8 @@
+/**
+ * 
+ */
+/**
+ * @author zhour
+ *
+ */
+package com.x.build.redeploy;

+ 128 - 0
o2server/x_build/src/main/resources/pom_template_assemble.xml

@@ -0,0 +1,128 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>o2oa</groupId>
+		<artifactId>o2server</artifactId>
+		<version>4.0.5</version>
+	</parent>
+	<artifactId>x_processplatform_assemble_designer</artifactId>
+	<dependencies>
+		<dependency>
+			<groupId>org.imgscalr</groupId>
+			<artifactId>imgscalr-lib</artifactId>
+			<version>4.2</version>
+		</dependency>
+		<dependency>
+			<groupId>com.sun</groupId>
+			<artifactId>tools</artifactId>
+			<version>1.5.0</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../o2server_build_and_scratch/lib/java/tools.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>o2oa.o2server</groupId>
+			<artifactId>x_base_core_project</artifactId>
+			<version>${version}</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../store/jars/x_base_core_project.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>o2oa.o2server</groupId>
+			<artifactId>x_query_core_entity</artifactId>
+			<version>${version}</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../store/jars/x_query_core_entity.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>o2oa.o2server</groupId>
+			<artifactId>x_processplatform_core_entity</artifactId>
+			<version>${version}</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../store/jars/x_processplatform_core_entity.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>o2oa.o2server</groupId>
+			<artifactId>x_organization_core_express</artifactId>
+			<version>${version}</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../store/jars/x_organization_core_express.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>o2oa.o2server</groupId>
+			<artifactId>x_organization_core_entity</artifactId>
+			<version>${version}</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../store/jars/x_organization_core_entity.jar</systemPath>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<defaultGoal>package</defaultGoal>
+		<plugins>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<version>1.7</version>
+				<dependencies>
+					<dependency>
+						<groupId>com.sun</groupId>
+						<artifactId>tools</artifactId>
+						<version>1.5.0</version>
+						<scope>system</scope>
+						<systemPath>${basedir}/../o2server_build_and_scratch/lib/java/tools.jar</systemPath>
+					</dependency>
+				</dependencies>
+				<executions>
+					<execution>
+						<id>createEnhancePersistenceXml</id>
+						<phase>generate-sources</phase>
+						<configuration>
+							<target>
+								<ant antfile="../build_common.xml">
+									<target name="createPersistenceXml" />
+								</ant>
+							</target>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-resources-plugin</artifactId>
+				<version>3.1.0</version>
+				<executions>
+					<execution>
+						<id>copy-resources</id>
+						<phase>verify</phase>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<configuration>
+							<outputDirectory>../store/</outputDirectory>
+							<resources>
+								<resource>
+									<directory>target</directory>
+									<includes>
+										<include>*.war</include>
+									</includes>
+								</resource>
+							</resources>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>3.2.2</version>
+				<configuration>
+					<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
+				</configuration>
+			</plugin>
+		</plugins>
+
+	</build>
+	<packaging>war</packaging>
+</project>

+ 29 - 0
o2server/x_build/src/main/resources/pom_template_core.xml

@@ -0,0 +1,29 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>o2oa</groupId>
+		<artifactId>o2server</artifactId>
+		<version>4.0.5</version>
+	</parent>
+	<artifactId>o2server_build_and_scratch</artifactId>
+	<dependencies>
+		<dependency>
+			<groupId>com.sun</groupId>
+			<artifactId>tools</artifactId>
+			<version>1.5.0</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../o2server_build_and_scratch/lib/java/tools.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>o2oa.o2server</groupId>
+			<artifactId>x_base_core_project</artifactId>
+			<version>${version}</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../store/jars/x_base_core_project.jar</systemPath>
+		</dependency>
+	</dependencies>
+	<build>
+	</build>
+</project>

+ 128 - 0
o2server/x_build/src/main/resources/pom_template_service.xml

@@ -0,0 +1,128 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>o2oa</groupId>
+		<artifactId>o2server</artifactId>
+		<version>4.0.5</version>
+	</parent>
+	<artifactId>x_processplatform_assemble_designer</artifactId>
+	<dependencies>
+		<dependency>
+			<groupId>org.imgscalr</groupId>
+			<artifactId>imgscalr-lib</artifactId>
+			<version>4.2</version>
+		</dependency>
+		<dependency>
+			<groupId>com.sun</groupId>
+			<artifactId>tools</artifactId>
+			<version>1.5.0</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../o2server_build_and_scratch/lib/java/tools.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>o2oa.o2server</groupId>
+			<artifactId>x_base_core_project</artifactId>
+			<version>${version}</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../store/jars/x_base_core_project.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>o2oa.o2server</groupId>
+			<artifactId>x_query_core_entity</artifactId>
+			<version>${version}</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../store/jars/x_query_core_entity.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>o2oa.o2server</groupId>
+			<artifactId>x_processplatform_core_entity</artifactId>
+			<version>${version}</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../store/jars/x_processplatform_core_entity.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>o2oa.o2server</groupId>
+			<artifactId>x_organization_core_express</artifactId>
+			<version>${version}</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../store/jars/x_organization_core_express.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>o2oa.o2server</groupId>
+			<artifactId>x_organization_core_entity</artifactId>
+			<version>${version}</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/../store/jars/x_organization_core_entity.jar</systemPath>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<defaultGoal>package</defaultGoal>
+		<plugins>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<version>1.7</version>
+				<dependencies>
+					<dependency>
+						<groupId>com.sun</groupId>
+						<artifactId>tools</artifactId>
+						<version>1.5.0</version>
+						<scope>system</scope>
+						<systemPath>${basedir}/../o2server_build_and_scratch/lib/java/tools.jar</systemPath>
+					</dependency>
+				</dependencies>
+				<executions>
+					<execution>
+						<id>createEnhancePersistenceXml</id>
+						<phase>generate-sources</phase>
+						<configuration>
+							<target>
+								<ant antfile="../build_common.xml">
+									<target name="createPersistenceXml" />
+								</ant>
+							</target>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-resources-plugin</artifactId>
+				<version>3.1.0</version>
+				<executions>
+					<execution>
+						<id>copy-resources</id>
+						<phase>verify</phase>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<configuration>
+							<outputDirectory>../store/</outputDirectory>
+							<resources>
+								<resource>
+									<directory>target</directory>
+									<includes>
+										<include>*.war</include>
+									</includes>
+								</resource>
+							</resources>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>3.2.2</version>
+				<configuration>
+					<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
+				</configuration>
+			</plugin>
+		</plugins>
+
+	</build>
+	<packaging>war</packaging>
+</project>

+ 0 - 0
o2server/x_build/src/test/resources/aaa.json


+ 259 - 0
o2server/x_build/version.xml

@@ -0,0 +1,259 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." name="main" default="default">
+	<basename property="project" file="${basedir}" />
+	<dirname property="o2server.dir" file="${basedir}../" />
+	<tstamp>
+		<format property="VERSION" pattern="yyyyMMddHHmmss" locale="zh-cn" />
+	</tstamp>
+
+	<path id="project.classpath">
+		<pathelement location="src/main/java" />
+		<pathelement location="src/main/resources" />
+		<pathelement location="target/classes" />
+		<fileset dir="${o2server.dir}/commons/ext">
+			<include name="**/*.jar" />
+		</fileset>
+		<fileset dir="${o2server.dir}/store/jars">
+			<include name="*.jar" />
+		</fileset>
+		<fileset dir="lib">
+			<include name="**/*.jar" />
+		</fileset>
+	</path>
+
+	<property name="TYPE" value="o2server" />
+	<property name="publish.dir" location="D:/download.o2oa.net/o2server/servers/webServer/download" />
+	<target name="default" depends="publish" />
+	<target name="prepareSource">
+		<delete dir="target/o2server" />
+		<mkdir dir="target/o2server" />
+		<mkdir dir="target/o2server/config" />
+		<mkdir dir="target/o2server/local" />
+		<mkdir dir="target/o2server/configSample" />
+		<mkdir dir="target/o2server/localSample" />
+		<mkdir dir="target/o2server/servers/webServer" />
+		<mkdir dir="target/o2server/servers/centerServer/webapps" />
+		<mkdir dir="target/o2server/servers/centerServer/work" />
+		<mkdir dir="target/o2server/servers/applicationServer/webapps" />
+		<mkdir dir="target/o2server/servers/applicationServer/work" />
+		<exec vmlauncher="false" executable="npm">
+			<arg line="install" />
+		</exec>
+		<exec vmlauncher="false" executable="npm">
+			<arg line="install -g gulp-cli" />
+		</exec>
+		<exec vmlauncher="false" executable="gulp" />
+		<copy todir="target/o2server/commons/">
+			<fileset dir="${o2server.dir}/commons/" />
+		</copy>
+		<copy todir="target/o2server/configSample">
+			<fileset dir="${o2server.dir}/configSample" />
+		</copy>
+		<copy todir="target/o2server/localSample">
+			<fileset dir="${o2server.dir}/localSample" />
+		</copy>
+		<copy todir="target/o2server/store/">
+			<fileset dir="${o2server.dir}/store/">
+				<exclude name="x_report_assemble_control.war" />
+				<exclude name="jars/x_report_core_entity.jar" />
+				<exclude name="x_strategydeploy_assemble_control.war" />
+				<exclude name="jars/x_strategydeploy_core_entity.jar" />
+			</fileset>
+		</copy>
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="console.jar" />
+				<include name="index.html" />
+			</fileset>
+		</copy>
+
+
+		<zip encoding="utf-8" destfile="target/o2server/src.zip" update="false">
+			<zipfileset dir="${o2server.dir}/x_base_core_project" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_base_core_project" />
+			<zipfileset dir="${o2server.dir}/x_attendance_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_attendance_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_attendance_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_attendance_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_bbs_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_bbs_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_calendar_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_calendar_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_cms_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_cms_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_component_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_component_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_file_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_file_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_general_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_general_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_hotpic_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_hotpic_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_jpush_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_jpush_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_meeting_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_meeting_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_message_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_message_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_mind_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_mind_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_okr_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_okr_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_organization_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_portal_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_portal_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_processplatform_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_processplatform_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_query_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_query_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_program_center_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_program_center_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_organization_core_express" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_core_express" />
+			<zipfileset dir="${o2server.dir}/x_query_core_express" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_query_core_express" />
+			<zipfileset dir="${o2server.dir}/x_bbs_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_bbs_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_calendar_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_calendar_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_cms_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_cms_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_component_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_component_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_file_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_file_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_general_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_general_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_hotpic_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_hotpic_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_meeting_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_meeting_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_message_assemble_communicate" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_message_assemble_communicate" />
+			<zipfileset dir="${o2server.dir}/x_mind_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_mind_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_okr_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_okr_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_organization_assemble_authentication" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_assemble_authentication" />
+			<zipfileset dir="${o2server.dir}/x_organization_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_organization_assemble_express" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_assemble_express" />
+			<zipfileset dir="${o2server.dir}/x_organization_assemble_personal" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_assemble_personal" />
+			<zipfileset dir="${o2server.dir}/x_portal_assemble_designer" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_portal_assemble_designer" />
+			<zipfileset dir="${o2server.dir}/x_portal_assemble_surface" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_portal_assemble_surface" />
+			<zipfileset dir="${o2server.dir}/x_processplatform_assemble_bam" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_processplatform_assemble_bam" />
+			<zipfileset dir="${o2server.dir}/x_processplatform_assemble_designer" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_processplatform_assemble_designer" />
+			<zipfileset dir="${o2server.dir}/x_processplatform_assemble_surface" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_processplatform_assemble_surface" />
+			<zipfileset dir="${o2server.dir}/x_processplatform_service_processing" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_processplatform_service_processing" />
+			<zipfileset dir="${o2server.dir}/x_query_assemble_designer" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_query_assemble_designer" />
+			<zipfileset dir="${o2server.dir}/x_query_assemble_surface" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_query_assemble_surface" />
+			<zipfileset dir="${o2server.dir}/x_query_service_processing" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_query_service_processing" />
+			<zipfileset dir="${o2server.dir}/x_program_center" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_program_center" />
+			<zipfileset dir="${o2server.dir}/x_console" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_console" />
+		</zip>
+
+		<echo message="${VERSION}" file="target/o2server/version.o2" append="false" />
+	</target>
+
+
+	<target name="publish" depends="prepareSource">
+		<!--windows-->
+		<delete dir="target/o2server/jvm" />
+		<mkdir dir="target/o2server/jvm" />
+		<copy todir="target/o2server/jvm/windows">
+			<fileset dir="${o2server.dir}/jvm/windows" />
+		</copy>
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="start_windows.bat" />
+				<include name="start_windows_debug.bat" />
+				<include name="stop_windows.bat" />
+				<include name="console_windows.bat" />
+				<include name="service_windows.bat" />
+			</fileset>
+		</copy>
+		<zip encoding="utf-8" destfile="${publish.dir}/${TYPE}_${VERSION}_windows.zip" update="false">
+			<zipfileset dir="target/o2server/" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server" />
+		</zip>
+		<!--linux-->
+		<delete dir="target/o2server/jvm" />
+		<mkdir dir="target/o2server/jvm" />
+		<copy todir="target/o2server/jvm/linux">
+			<fileset dir="${o2server.dir}/jvm/linux" />
+		</copy>
+		<delete file="target/o2server/start_windows.bat" />
+		<delete file="target/o2server/start_windows_debug.bat" />
+		<delete file="target/o2server/stop_windows.bat" />
+		<delete file="target/o2server/console_windows.bat" />
+		<delete file="target/o2server/service_windows.bat" />
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="start_linux.sh" />
+				<include name="start_linux_debug.sh" />
+				<include name="stop_linux.sh" />
+				<include name="console_linux.sh" />
+			</fileset>
+		</copy>
+		<zip encoding="utf-8" destfile="${publish.dir}/${TYPE}_${VERSION}_linux.zip" update="false">
+			<zipfileset dir="target/o2server/" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server" />
+		</zip>
+		<!--macos-->
+		<delete dir="target/o2server/jvm" />
+		<mkdir dir="target/o2server/jvm" />
+		<copy todir="target/o2server/jvm/macos">
+			<fileset dir="${o2server.dir}/jvm/macos" />
+		</copy>
+		<delete file="target/o2server/start_linux.sh" />
+		<delete file="target/o2server/start_linux_debug.sh" />
+		<delete file="target/o2server/stop_linux.sh" />
+		<delete file="target/o2server/console_linux.sh" />
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="start_macos.sh" />
+				<include name="start_macos_debug.sh" />
+				<include name="stop_macos.sh" />
+				<include name="console_macos.sh" />
+			</fileset>
+		</copy>
+		<mkdir dir="${publish.dir}" />
+		<zip encoding="utf-8" destfile="${publish.dir}/${TYPE}_${VERSION}_macos.zip" update="false">
+			<zipfileset dir="target/o2server/" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server" />
+		</zip>
+		<!--aix-->
+		<delete dir="target/o2server/jvm" />
+		<mkdir dir="target/o2server/jvm" />
+		<copy todir="target/o2server/jvm/aix">
+			<fileset dir="${o2server.dir}/jvm/aix" />
+		</copy>
+		<delete file="target/o2server/start_macos.sh" />
+		<delete file="target/o2server/start_macos_debug.sh" />
+		<delete file="target/o2server/stop_macos.sh" />
+		<delete file="target/o2server/console_macos.sh" />
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="start_aix.sh" />
+				<include name="start_aix_debug.sh" />
+				<include name="stop_aix.sh" />
+				<include name="console_aix.sh" />
+			</fileset>
+		</copy>
+		<zip encoding="utf-8" destfile="${publish.dir}/${TYPE}_${VERSION}_aix.zip" update="false">
+			<zipfileset dir="target/o2server/" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server" />
+		</zip>
+		<!--neokylin_loongson-->
+		<delete dir="target/o2server/jvm" />
+		<mkdir dir="target/o2server/jvm" />
+		<copy todir="target/o2server/jvm/neokylin_loongson">
+			<fileset dir="${o2server.dir}/jvm/neokylin_loongson" />
+		</copy>
+		<delete file="target/o2server/start_aix.sh" />
+		<delete file="target/o2server/start_aix_debug.sh" />
+		<delete file="target/o2server/stop_aix.sh" />
+		<delete file="target/o2server/console_aix.sh" />
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="start_neokylin_loongson.sh" />
+				<include name="start_neokylin_loongson_debug.sh" />
+				<include name="stop_neokylin_loongson.sh" />
+				<include name="console_neokylin_loongson.sh" />
+			</fileset>
+		</copy>
+		<zip encoding="utf-8" destfile="${publish.dir}/${TYPE}_${VERSION}_neokylin_loongson.zip" update="false">
+			<zipfileset dir="target/o2server/" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server" />
+		</zip>
+		<!--raspberrypi-->
+		<delete dir="target/o2server/jvm" />
+		<mkdir dir="target/o2server/jvm" />
+		<copy todir="target/o2server/jvm/raspberrypi">
+			<fileset dir="${o2server.dir}/jvm/raspberrypi" />
+		</copy>
+		<delete file="target/o2server/start_neokylin_loongson.sh" />
+		<delete file="target/o2server/start_neokylin_loongson_debug.sh" />
+		<delete file="target/o2server/stop_neokylin_loongson.sh" />
+		<delete file="target/o2server/console_neokylin_loongson.sh" />
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="start_raspberrypi.sh" />
+				<include name="start_raspberrypi_debug.sh" />
+				<include name="stop_raspberrypi.sh" />
+				<include name="console_raspberrypi.sh" />
+			</fileset>
+		</copy>
+		<zip encoding="utf-8" destfile="${publish.dir}/${TYPE}_${VERSION}_raspberrypi.zip" update="false">
+			<zipfileset dir="target/o2server/" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server" />
+		</zip>
+		<java classname="com.x.build.Publish">
+			<classpath refid="project.classpath" />
+			<arg value="${VERSION}" />
+			<arg value="${publish.dir}" />
+		</java>
+	</target>
+
+</project>

+ 231 - 0
o2server/x_build/wrdp.xml

@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." name="main" default="default">
+	<basename property="project" file="${basedir}" />
+	<dirname property="o2server.dir" file="${basedir}../" />
+	<tstamp>
+		<format property="VERSION" pattern="yyyyMMddHHmmss" locale="zh-cn" />
+	</tstamp>
+
+	<path id="project.classpath">
+		<pathelement location="src/main/java" />
+		<pathelement location="src/main/resources" />
+		<pathelement location="target/classes" />
+		<fileset dir="${o2server.dir}/commons/ext">
+			<include name="**/*.jar" />
+		</fileset>
+		<fileset dir="${o2server.dir}/store/jars">
+			<include name="*.jar" />
+		</fileset>
+		<fileset dir="lib">
+			<include name="**/*.jar" />
+		</fileset>
+	</path>
+
+	<property name="TYPE" value="wrdp" />
+	<property name="publish.dir" location="D:/www.zoneland.net/o2server/servers/webServer/wrdp/download" />
+	<target name="default" depends="publish" />
+	<target name="prepareSource">
+		<delete dir="target/o2server" />
+		<mkdir dir="target/o2server" />
+		<mkdir dir="target/o2server/config" />
+		<mkdir dir="target/o2server/local" />
+		<mkdir dir="target/o2server/configSample" />
+		<mkdir dir="target/o2server/localSample" />
+		<mkdir dir="target/o2server/servers/webServer" />
+		<mkdir dir="target/o2server/servers/centerServer/webapps" />
+		<mkdir dir="target/o2server/servers/centerServer/work" />
+		<mkdir dir="target/o2server/servers/applicationServer/webapps" />
+		<mkdir dir="target/o2server/servers/applicationServer/work" />
+		<exec vmlauncher="false" executable="npm">
+			<arg line="install" />
+		</exec>
+		<exec vmlauncher="false" executable="npm">
+			<arg line="install -g gulp-cli" />
+		</exec>
+		<exec vmlauncher="false" executable="gulp" />
+		<copy todir="target/o2server/commons/">
+			<fileset dir="${o2server.dir}/commons/" />
+		</copy>
+		<copy todir="target/o2server/configSample">
+			<fileset dir="${o2server.dir}/configSample" />
+		</copy>
+		<copy todir="target/o2server/localSample">
+			<fileset dir="${o2server.dir}/localSample" />
+		</copy>
+		<copy todir="target/o2server/store/">
+			<fileset dir="${o2server.dir}/store/">
+				<exclude name="x_report_assemble_control.war" />
+				<exclude name="jars/x_report_core_entity.jar" />
+				<exclude name="x_strategydeploy_assemble_control.war" />
+				<exclude name="jars/x_strategydeploy_core_entity.jar" />
+			</fileset>
+		</copy>
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="console.jar" />
+				<include name="index.html" />
+			</fileset>
+		</copy>
+
+
+		<zip encoding="utf-8" destfile="target/o2server/src.zip" update="false">
+			<zipfileset dir="${o2server.dir}/x_base_core_project" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_base_core_project" />
+			<zipfileset dir="${o2server.dir}/x_attendance_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_attendance_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_attendance_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_attendance_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_bbs_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_bbs_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_calendar_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_calendar_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_cms_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_cms_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_component_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_component_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_file_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_file_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_general_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_general_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_hotpic_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_hotpic_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_meeting_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_meeting_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_message_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_message_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_mind_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_mind_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_okr_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_okr_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_organization_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_portal_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_portal_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_processplatform_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_processplatform_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_query_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_query_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_program_center_core_entity" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_program_center_core_entity" />
+			<zipfileset dir="${o2server.dir}/x_organization_core_express" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_core_express" />
+			<zipfileset dir="${o2server.dir}/x_query_core_express" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_query_core_express" />
+			<zipfileset dir="${o2server.dir}/x_bbs_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_bbs_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_calendar_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_calendar_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_cms_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_cms_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_component_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_component_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_file_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_file_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_general_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_general_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_hotpic_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_hotpic_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_meeting_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_meeting_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_message_assemble_communicate" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_message_assemble_communicate" />
+			<zipfileset dir="${o2server.dir}/x_mind_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_mind_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_okr_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_okr_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_organization_assemble_authentication" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_assemble_authentication" />
+			<zipfileset dir="${o2server.dir}/x_organization_assemble_control" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_assemble_control" />
+			<zipfileset dir="${o2server.dir}/x_organization_assemble_express" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_assemble_express" />
+			<zipfileset dir="${o2server.dir}/x_organization_assemble_personal" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_organization_assemble_personal" />
+			<zipfileset dir="${o2server.dir}/x_portal_assemble_designer" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_portal_assemble_designer" />
+			<zipfileset dir="${o2server.dir}/x_portal_assemble_surface" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_portal_assemble_surface" />
+			<zipfileset dir="${o2server.dir}/x_processplatform_assemble_bam" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_processplatform_assemble_bam" />
+			<zipfileset dir="${o2server.dir}/x_processplatform_assemble_designer" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_processplatform_assemble_designer" />
+			<zipfileset dir="${o2server.dir}/x_processplatform_assemble_surface" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_processplatform_assemble_surface" />
+			<zipfileset dir="${o2server.dir}/x_processplatform_service_processing" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_processplatform_service_processing" />
+			<zipfileset dir="${o2server.dir}/x_query_assemble_designer" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_query_assemble_designer" />
+			<zipfileset dir="${o2server.dir}/x_query_assemble_surface" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_query_assemble_surface" />
+			<zipfileset dir="${o2server.dir}/x_query_service_processing" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_query_service_processing" />
+			<zipfileset dir="${o2server.dir}/x_program_center" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_program_center" />
+			<zipfileset dir="${o2server.dir}/x_console" filemode="777" dirmode="777" encoding="utf-8" includes="**/*.java" excludes="**/*_.java,src/test/**" prefix="x_console" />
+		</zip>
+
+		<echo message="${VERSION}" file="target/o2server/version.o2" append="false" />
+	</target>
+
+
+	<target name="publish" depends="prepareSource">
+		<!--windows-->
+		<delete dir="target/o2server/jvm" />
+		<mkdir dir="target/o2server/jvm" />
+		<copy todir="target/o2server/jvm/windows">
+			<fileset dir="${o2server.dir}/jvm/windows" />
+		</copy>
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="start_windows.bat" />
+				<include name="start_windows_debug.bat" />
+				<include name="stop_windows.bat" />
+				<include name="console_windows.bat" />
+				<include name="service_windows.bat" />
+			</fileset>
+		</copy>
+		<zip encoding="utf-8" destfile="${publish.dir}/${TYPE}_${VERSION}_windows.zip" update="false">
+			<zipfileset dir="target/o2server/" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server" />
+		</zip>
+		<!--linux-->
+		<delete dir="target/o2server/jvm" />
+		<mkdir dir="target/o2server/jvm" />
+		<copy todir="target/o2server/jvm/linux">
+			<fileset dir="${o2server.dir}/jvm/linux" />
+		</copy>
+		<delete file="target/o2server/start_windows.bat" />
+		<delete file="target/o2server/start_windows_debug.bat" />
+		<delete file="target/o2server/stop_windows.bat" />
+		<delete file="target/o2server/console_windows.bat" />
+		<delete file="target/o2server/service_windows.bat" />
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="start_linux.sh" />
+				<include name="stop_linux.sh" />
+				<include name="console_linux.sh" />
+			</fileset>
+		</copy>
+		<zip encoding="utf-8" destfile="${publish.dir}/${TYPE}_${VERSION}_linux.zip" update="false">
+			<zipfileset dir="target/o2server/" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server" />
+		</zip>
+		<!--macos-->
+		<delete dir="target/o2server/jvm" />
+		<mkdir dir="target/o2server/jvm" />
+		<copy todir="target/o2server/jvm/macos">
+			<fileset dir="${o2server.dir}/jvm/macos" />
+		</copy>
+		<delete file="target/o2server/start_linux.sh" />
+		<delete file="target/o2server/start_linux_debug.sh" />
+		<delete file="target/o2server/stop_linux.sh" />
+		<delete file="target/o2server/console_linux.sh" />
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="start_macos.sh" />
+				<include name="start_macos_debug.sh" />
+				<include name="stop_macos.sh" />
+				<include name="console_macos.sh" />
+			</fileset>
+		</copy>
+		<mkdir dir="${publish.dir}" />
+		<zip encoding="utf-8" destfile="${publish.dir}/${TYPE}_${VERSION}_macos.zip" update="false">
+			<zipfileset dir="target/o2server/" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server" />
+		</zip>
+		<!--aix-->
+		<delete dir="target/o2server/jvm" />
+		<mkdir dir="target/o2server/jvm" />
+		<copy todir="target/o2server/jvm/aix">
+			<fileset dir="${o2server.dir}/jvm/aix" />
+		</copy>
+		<delete file="target/o2server/start_macos.sh" />
+		<delete file="target/o2server/start_macos_debug.sh" />
+		<delete file="target/o2server/stop_macos.sh" />
+		<delete file="target/o2server/console_macos.sh" />
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="start_aix.sh" />
+				<include name="start_aix_debug.sh" />
+				<include name="stop_aix.sh" />
+				<include name="console_aix.sh" />
+			</fileset>
+		</copy>
+		<zip encoding="utf-8" destfile="${publish.dir}/${TYPE}_${VERSION}_aix.zip" update="false">
+			<zipfileset dir="target/o2server/" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server" />
+		</zip>
+		<!--neokylin_loongson-->
+		<delete dir="target/o2server/jvm" />
+		<mkdir dir="target/o2server/jvm" />
+		<copy todir="target/o2server/jvm/neokylin_loongson">
+			<fileset dir="${o2server.dir}/jvm/neokylin_loongson" />
+		</copy>
+		<delete file="target/o2server/start_aix.sh" />
+		<delete file="target/o2server/start_aix_debug.sh" />
+		<delete file="target/o2server/stop_aix.sh" />
+		<delete file="target/o2server/console_aix.sh" />
+		<copy todir="target/o2server">
+			<fileset dir="${o2server.dir}">
+				<include name="start_neokylin_loongson.sh" />
+				<include name="start_neokylin_loongson_debug.sh" />
+				<include name="stop_neokylin_loongson.sh" />
+				<include name="console_neokylin_loongson.sh" />
+			</fileset>
+		</copy>
+		<zip encoding="utf-8" destfile="${publish.dir}/${TYPE}_${VERSION}_neokylin_loongson.zip" update="false">
+			<zipfileset dir="target/o2server/" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server" />
+		</zip>
+	</target>
+
+</project>

+ 10 - 9
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/service/CalendarServiceAdv.java

@@ -1,16 +1,15 @@
 package com.x.calendar.assemble.control.service;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.tools.ListTools;
 import com.x.calendar.assemble.control.Business;
 import com.x.calendar.core.entity.Calendar;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
 
 
 /**
@@ -85,7 +84,11 @@ public class CalendarServiceAdv{
 		addStringToList( calendar.getCreateor(), calendar.getViewablePersonList() );
 		
 		if( "UNIT".equals( calendar.getType() )) {
-			addStringToList( calendar.getTarget(), calendar.getViewableUnitList() );
+			if( ListTools.isEmpty(calendar.getViewableUnitList() )
+				&& ListTools.isEmpty(calendar.getViewableGroupList() )
+				&& ListTools.isEmpty(calendar.getViewablePersonList() )){
+				addStringToList( calendar.getTarget(), calendar.getViewableUnitList() );
+			}
 		}else {
 			addStringToList( calendar.getTarget(), calendar.getViewablePersonList() );
 		}		
@@ -180,12 +183,10 @@ public class CalendarServiceAdv{
 			throw e;
 		}
 	}
-	
+
 	/**
 	 * 根据权限查询日历信息ID列表
 	 * @param personName
-	 * @param unitNames
-	 * @param groupNames
 	 * @return
 	 * @throws Exception
 	 */

+ 38 - 8
o2server/x_calendar_assemble_control/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

+ 49 - 16
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/DocumentFactory.java

@@ -1,23 +1,21 @@
 package com.x.cms.assemble.control.factory;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.*;
-
-import com.x.cms.core.entity.Review;
-import com.x.cms.core.entity.Review_;
-import org.apache.commons.lang3.StringUtils;
-
 import com.x.base.core.project.exception.ExceptionWhen;
 import com.x.base.core.project.tools.ListTools;
 import com.x.cms.assemble.control.AbstractFactory;
 import com.x.cms.assemble.control.Business;
 import com.x.cms.core.entity.Document;
 import com.x.cms.core.entity.Document_;
+import com.x.cms.core.entity.Review;
+import com.x.cms.core.entity.Review_;
 import com.x.cms.core.entity.tools.CriteriaBuilderTools;
 import com.x.cms.core.entity.tools.filter.QueryFilter;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.EntityManager;
+import javax.persistence.criteria.*;
+import java.util.ArrayList;
+import java.util.List;
 /**
  * 文档信息基础功能服务类
  * 
@@ -239,6 +237,47 @@ public class DocumentFactory extends AbstractFactory {
 		}
 		return em.createQuery(cq.where(p)).setMaxResults( maxCount).getResultList();
 	}
+
+	/**
+	 * 根据条件查询符合条件的文档信息,根据上一条的sequnce查询指定数量的信息
+	 * @param maxCount
+	 * @param sequenceFieldValue
+	 * @param orderField
+	 * @param orderType
+	 * @param queryFilter
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Document> listPrevWithCondition( Integer maxCount, String sequenceFieldValue, String orderField, String orderType, QueryFilter queryFilter ) throws Exception {
+		EntityManager em = this.entityManagerContainer().get( Document.class );
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Document> cq = cb.createQuery(Document.class);
+		Root<Document> root = cq.from(Document.class);
+		Predicate p = CriteriaBuilderTools.composePredicateWithQueryFilter( Document_.class, cb, null, root, queryFilter );
+		if( StringUtils.isNotEmpty( sequenceFieldValue ) ) {
+			Predicate p_seq = cb.isNotNull( root.get( orderField ) );
+			if( "desc".equalsIgnoreCase( orderType )){
+				p_seq = cb.and( p_seq, cb.greaterThan( root.get( orderField ), sequenceFieldValue.toString() ));
+			}else{
+				p_seq = cb.and( p_seq, cb.lessThan( root.get( orderField ), sequenceFieldValue.toString() ));
+			}
+			p = cb.and( p, p_seq);
+		}
+
+		List<Order> orders = new ArrayList<>();
+		Order isTopOrder = CriteriaBuilderTools.getOrder( cb, root, Document_.class, Document.isTop_FIELDNAME, "desc" );
+		if( isTopOrder != null ){
+			orders.add( isTopOrder );
+		}
+		Order orderWithField = CriteriaBuilderTools.getOrder( cb, root, Document_.class, orderField, orderType );
+		if( orderWithField != null ){
+			orders.add( orderWithField );
+		}
+		if( ListTools.isNotEmpty( orders )) {
+			cq.orderBy( orders );
+		}
+		return em.createQuery(cq.where(p)).setMaxResults( maxCount).getResultList();
+	}
 	
 	/**
 	 * 根据条件查询指定数量的符合条件的文档信息列表
@@ -258,12 +297,6 @@ public class DocumentFactory extends AbstractFactory {
 		Predicate p = CriteriaBuilderTools.composePredicateWithQueryFilter( Document_.class, cb, null, root, queryFilter );
 
 		List<Order> orders = new ArrayList<>();
-//		if( !Document.isTop_FIELDNAME.equals( orderField )) {
-//			Order isTopOrder = CriteriaBuilderTools.getOrder( cb, root, Document_.class, Document.isTop_FIELDNAME, "desc" );
-//			if( isTopOrder != null ){
-//				orders.add( isTopOrder );
-//			}
-//		}
 		Order isTopOrder = CriteriaBuilderTools.getOrder( cb, root, Document_.class, Document.isTop_FIELDNAME, "desc" );
 		if( isTopOrder != null ){
 			orders.add( isTopOrder );

+ 58 - 14
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/ReviewFactory.java

@@ -1,17 +1,5 @@
 package com.x.cms.assemble.control.factory;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Order;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import org.apache.commons.lang3.StringUtils;
-
 import com.x.base.core.project.exception.ExceptionWhen;
 import com.x.base.core.project.tools.ListTools;
 import com.x.cms.assemble.control.AbstractFactory;
@@ -22,6 +10,12 @@ import com.x.cms.core.entity.Review;
 import com.x.cms.core.entity.Review_;
 import com.x.cms.core.entity.tools.CriteriaBuilderTools;
 import com.x.cms.core.entity.tools.filter.QueryFilter;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.EntityManager;
+import javax.persistence.criteria.*;
+import java.util.ArrayList;
+import java.util.List;
 /**
  * 文档权限控制信息服务类
  */
@@ -149,7 +143,7 @@ public class ReviewFactory extends AbstractFactory {
 	 * @return
 	 * @throws Exception
 	 */
-	public List<Review> listWithFilter( Integer maxCount, String orderField, String orderType, String personName, QueryFilter queryFilter ) throws Exception {
+	public List<Review> listNextWithFilter( Integer maxCount, String orderField, String orderType, String personName, QueryFilter queryFilter ) throws Exception {
 		EntityManager em = this.entityManagerContainer().get( Review.class );
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaQuery<Review> cq = cb.createQuery(Review.class);
@@ -190,7 +184,7 @@ public class ReviewFactory extends AbstractFactory {
 	 * @return
 	 * @throws Exception
 	 */
-	public List<Review> listWithFilter( Integer maxCount, String sequenceFieldValue, String orderField, String orderType, String personName, QueryFilter queryFilter ) throws Exception {
+	public List<Review> listNextWithFilter( Integer maxCount, String sequenceFieldValue, String orderField, String orderType, String personName, QueryFilter queryFilter ) throws Exception {
 		EntityManager em = this.entityManagerContainer().get( Review.class );
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaQuery<Review> cq = cb.createQuery(Review.class);
@@ -229,6 +223,56 @@ public class ReviewFactory extends AbstractFactory {
 		return em.createQuery(cq.where(p)).setMaxResults( maxCount).getResultList();
 	}
 
+	/**
+	 * 根据条件查询符合条件的文档信息ID,根据上一条的sequnce查询指定数量的信息
+	 * @param maxCount
+	 * @param sequenceFieldValue
+	 * @param orderField
+	 * @param orderType
+	 * @param personName
+	 * @param queryFilter
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Review> listPrevWithFilter( Integer maxCount, String sequenceFieldValue, String orderField, String orderType, String personName, QueryFilter queryFilter ) throws Exception {
+		EntityManager em = this.entityManagerContainer().get( Review.class );
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Review> cq = cb.createQuery(Review.class);
+		Root<Review> root = cq.from(Review.class);
+		Predicate p_permission = cb.equal( root.get( Review_.permissionObj ), "*");
+		if( StringUtils.isNotEmpty( personName )) {
+			p_permission = CriteriaBuilderTools.predicate_or( cb, p_permission, cb.equal( root.get( Review_.permissionObj ), personName ) );
+		}
+		Predicate p = CriteriaBuilderTools.composePredicateWithQueryFilter( Review_.class, cb, p_permission, root, queryFilter );
+		if( StringUtils.isNotEmpty( sequenceFieldValue ) ) {
+			Predicate p_seq = cb.isNotNull( root.get( Review_.docSequence ) );
+			if( "desc".equalsIgnoreCase( orderType )){
+				p_seq = cb.and( p_seq, cb.greaterThan( root.get( Review_.docSequence ), sequenceFieldValue.toString() ));
+			}else{
+				p_seq = cb.and( p_seq, cb.lessThan( root.get( Review_.docSequence ), sequenceFieldValue.toString() ));
+			}
+			p = cb.and( p, p_seq);
+		}
+
+		List<Order> orders = new ArrayList<>();
+		if( !Document.isTop_FIELDNAME.equals( orderField )) {
+			Order isTopOrder = CriteriaBuilderTools.getOrder( cb, root, Document_.class, Document.isTop_FIELDNAME, "desc" );
+			if( isTopOrder != null ){
+				orders.add( isTopOrder );
+			}
+		}
+
+		Order orderWithField = CriteriaBuilderTools.getOrder( cb, root, Review_.class, orderField, orderType );
+		if( orderWithField != null ){
+			orders.add( orderWithField );
+		}
+
+		if( ListTools.isNotEmpty( orders )) {
+			cq.orderBy( orders );
+		}
+		return em.createQuery(cq.where(p)).setMaxResults( maxCount).getResultList();
+	}
+
 	/**
 	 * 根据条件查询指定条数符合条件的文档信息Review列表
 	 * @param orderField

+ 280 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionQueryListPrevWithFilter.java

@@ -0,0 +1,280 @@
+package com.x.cms.assemble.control.jaxrs.document;
+
+import com.google.gson.JsonElement;
+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.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.cms.core.entity.Document;
+import com.x.cms.core.entity.Review;
+import com.x.cms.core.entity.tools.filter.QueryFilter;
+import com.x.cms.core.entity.tools.filter.term.InTerm;
+import com.x.cms.core.entity.tools.filter.term.NotInTerm;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ActionQueryListPrevWithFilter extends BaseAction {
+
+	private static  Logger logger = LoggerFactory.getLogger(ActionQueryListPrevWithFilter.class);
+
+	protected ActionResult<List<Wo>> execute( HttpServletRequest request, String id, Integer count, JsonElement jsonElement, EffectivePerson effectivePerson ) {
+		ActionResult<List<Wo>> result = new ActionResult<>();		
+		Long total = 0L;
+		Wi wi = null;
+		List<Wo> wos = new ArrayList<>();
+		List<Document> documentList = null;
+		List<Document> searchResultList = new ArrayList<>();
+		List<Review> reviewList =  null;
+		Boolean check = true;
+		Boolean isManager = false;
+		String personName = effectivePerson.getDistinguishedName();
+		QueryFilter queryFilter = null;
+		
+		if ( count == 0 ) { count = 20; }
+		if ( StringUtils.isEmpty( id ) || "(0)".equals( id ) ) { id = null; }
+		
+		try {
+			wi = this.convertToWrapIn( jsonElement, Wi.class );
+		} catch (Exception e ) {
+			check = false;
+			Exception exception = new ExceptionDocumentInfoProcess( e, "系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString() );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		if ( wi == null ) { wi = new Wi(); }
+		
+		if( StringUtils.isEmpty( wi.getDocumentType() )) {
+			wi.setDocumentType( "信息" );
+		}
+		
+		if( StringUtils.isEmpty( wi.getOrderField() )) {
+			wi.setOrderField( "createTime" );
+		}
+		
+		if( StringUtils.isEmpty( wi.getOrderType() )) {
+			wi.setOrderType( "DESC" );
+		}
+		
+		if( ListTools.isEmpty( wi.getStatusList() )) {
+			List<String> status = new ArrayList<>();
+			status.add( "published" );
+			wi.setStatusList( status );
+		}
+		
+		if (check) {
+			try {
+				queryFilter = wi.getQueryFilter();
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionDocumentInfoProcess(e, "系统在获取查询条件信息时发生异常。");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ) {
+			try {
+				if( effectivePerson.isManager() || userManagerService.isHasPlatformRole( effectivePerson.getDistinguishedName(), "CMSManager" )) {
+					isManager = true;
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionDocumentInfoProcess(e, "系统在判断用户是否是管理时发生异常。");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ) {
+			//查询是否已读,需要使用相应的ID进行IN操作,效率有一些低
+			List<String> readDocIds = null;
+			if( "READ".equalsIgnoreCase( wi.getReadFlag() )) { //只查询阅读过的
+				//查询出该用户所有已经阅读过的文档ID列表
+				try {
+					readDocIds = documentViewRecordServiceAdv.listDocIdsByPerson( personName, 2000 );
+					if( ListTools.isEmpty( readDocIds )) {
+						readDocIds = new ArrayList<>();
+						readDocIds.add( "no Document readed" );
+					}
+					if( isManager ) {
+						queryFilter.addInTerm( new InTerm( "id", new ArrayList<>( readDocIds ) ) );
+					}else {
+						queryFilter.addInTerm( new InTerm( "docId", new ArrayList<>( readDocIds ) ) );
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionDocumentInfoProcess(e, "系统在查询用户已经阅读过的文档ID列表时发生异常。");
+					result.error(exception);
+					logger.error(e, effectivePerson, request, null);
+				}
+			}else if("UNREAD".equalsIgnoreCase( wi.getReadFlag() )) { //只查询未阅读过的
+				//查询出该用户所有已经阅读过的文档ID列表
+				try {
+					readDocIds = documentViewRecordServiceAdv.listDocIdsByPerson( personName, 2000 );
+					if( ListTools.isNotEmpty( readDocIds )) {
+						if( isManager ) {
+							queryFilter.addNotInTerm( new NotInTerm( "id", new ArrayList<>( readDocIds ) ) );
+						}else {
+							queryFilter.addNotInTerm( new NotInTerm( "docId", new ArrayList<>( readDocIds ) ) );
+						}
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionDocumentInfoProcess(e, "系统在查询用户已经阅读过的文档ID列表时发生异常。");
+					result.error(exception);
+					logger.error(e, effectivePerson, request, null);
+				}
+			}
+		}
+		
+		if (check) { // 从Review表中查询符合条件的对象总数
+			try {
+				if( isManager ) { //直接从Document忽略权限查询
+					total = documentQueryService.countWithConditionOutofPermission( queryFilter );
+				}else {
+					total = documentQueryService.countWithConditionInReview( personName, queryFilter );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionDocumentInfoProcess(e, "系统在获取用户可查询到的文档数据条目数量时发生异常。");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		
+		if (check) {
+			//document和Review除了sequence还有5个排序列支持title, appAlias, categoryAlias, categoryName, creatorUnitName的分页查询
+			//除了sequence和title, appAlias, categoryAlias, categoryName, creatorUnitName之外,其他的列排序全部在内存进行分页
+			try {
+				if( isManager ) {
+					//判断排序列是不是已经在Document表里做了sequence索引列,如果是,则只需要从document表查询 即可。
+					if( Document.isFieldInSequence( wi.getOrderField()) ) { //直接从Document忽略权限查询
+						searchResultList = documentQueryService.listPrevWithConditionOutofPermission( id, count, wi.getOrderField(), wi.getOrderType(), queryFilter );
+					}else {
+						//根据人员权限查询出2000条文档的完整信息,然后对某属性进行排序,在内存中进行分页
+						documentList = documentQueryService.listNextWithConditionOutofPermission( wi.getOrderField(), wi.getOrderType(), queryFilter, 2000 );
+						//循环分页,查询传入的ID所在的位置,向后再查询N条
+						if( ListTools.isNotEmpty( documentList )) {
+							Document document = null;
+							int index = -1;
+							//放一页到searchResultList中进行返回
+							for( int i = 0; i< documentList.size(); i++ ) {
+								if( StringUtils.isEmpty( id ) || document.getId().equalsIgnoreCase( id ) ) {
+									index = i;
+								}
+							}
+							for( ; index >=0; index-- ){
+								searchResultList.add( documentList.get(index) );
+								if( searchResultList.size() >= count ) { break; }
+							}
+						}
+					}
+				}else {
+					if( Document.isFieldInSequence(wi.getOrderField()) ) { // 从Review表中查询符合条件的对象,并且转换为Document对象列表
+						searchResultList = documentQueryService.listPrevWithConditionInReview( id, count, wi.getOrderField(), wi.getOrderType(), personName, queryFilter );
+					}else {
+						reviewList =  documentQueryService.listNextWithConditionInReview( wi.getOrderField(), wi.getOrderType(), personName, queryFilter, 2000 );
+						//循环分页,查询传入的ID所在的位置,向后再查询N条,转换为Document放到searchResultList
+						searchResultList = new ArrayList<>();
+						if( ListTools.isNotEmpty( reviewList )) {
+							Boolean add2List = false;
+							Review review = null;
+							int index = -1;
+							//放一页到searchResultList中进行返回
+							for( int i = 0; i< reviewList.size(); i++ ) {
+								if( StringUtils.isEmpty( id ) || review.getDocId().equalsIgnoreCase( id ) ) {
+									index = i;
+								}
+							}
+							for( ; index >=0; index-- ){
+								searchResultList.add(documentQueryService.get( review.getDocId() ) );
+								if( searchResultList.size() >= count ) { break; }
+							}
+						}
+					}
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionDocumentInfoProcess(e, "系统在根据用户可访问的文档ID列表对文档进行分页查询时发生异常。");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		
+		if (check) {
+			if ( searchResultList != null ) {
+				Wo wo = null;
+				for( Document document : searchResultList ) {
+					if( document != null ){
+						try {
+							wo = Wo.copier.copy( document );
+							if( wo.getCreatorPerson() != null && !wo.getCreatorPerson().isEmpty() ) {
+								wo.setCreatorPersonShort( wo.getCreatorPerson().split( "@" )[0]);
+							}
+							if( wo.getCreatorUnitName() != null && !wo.getCreatorUnitName().isEmpty() ) {
+								wo.setCreatorUnitNameShort( wo.getCreatorUnitName().split( "@" )[0]);
+							}
+							if( wo.getCreatorTopUnitName() != null && !wo.getCreatorTopUnitName().isEmpty() ) {
+								wo.setCreatorTopUnitNameShort( wo.getCreatorTopUnitName().split( "@" )[0]);
+							}
+							if( wi.getNeedData() ) {
+								//需要组装数据
+								wo.setData( documentQueryService.getDocumentData( document ) );
+							}
+						} catch (Exception e) {
+							check = false;
+							Exception exception = new ExceptionDocumentInfoProcess(e, "系统获取文档数据内容信息时发生异常。Id:" + document.getCategoryId());
+							result.error(exception);
+							logger.error(e, effectivePerson, request, null);
+						}
+						wos.add( wo );
+					}
+				}
+			}
+		}
+		result.setCount(total);
+		result.setData(wos);
+		return result;
+	}	
+
+	public class DocumentCacheForFilter {
+
+		private Long total = 0L;		
+		private List<Wo> documentList = null;
+
+		public Long getTotal() {
+			return total;
+		}
+
+		public void setTotal(Long total) {
+			this.total = total;
+		}
+
+		public List<Wo> getDocumentList() {
+			return documentList;
+		}
+
+		public void setDocumentList(List<Wo> documentList) {
+			this.documentList = documentList;
+		}	
+	}
+	
+	public static class Wi extends WrapInDocumentFilter{
+		
+	}
+	
+	public static class Wo extends WrapOutDocumentList {
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		public static WrapCopier<Document, Wo> copier = WrapCopierFactory.wo( Document.class, Wo.class, null,JpaObject.FieldsInvisible);
+		
+	}
+}

+ 25 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/DocumentAction.java

@@ -359,6 +359,31 @@ public class DocumentAction extends StandardJaxrsAction{
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
+
+	@JaxrsMethodDescribe(value = "列示符合过滤条件的已发布的信息内容, 上一页.", action = ActionQueryListPrevWithFilter.class)
+	@PUT
+	@Path("filter/list/{id}/prev/{count}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_listPrevWithFilter( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+										  @JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id,
+										  @JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count,
+										  JsonElement jsonElement ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<List<ActionQueryListPrevWithFilter.Wo>> result = new ActionResult<>();
+		Boolean check = true;
+
+		if( check ){
+			try {
+				result = ((ActionQueryListPrevWithFilter)proxy.getProxy(ActionQueryListPrevWithFilter.class)).execute( request, id, count, jsonElement, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
 	
 	@JaxrsMethodDescribe(value = "列示符合过滤条件的草稿信息内容, 下一页.", action = ActionQueryListDraftNextWithFilter.class)
 	@PUT

+ 43 - 7
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/DocumentInfoService.java

@@ -1,11 +1,5 @@
 package com.x.cms.assemble.control.service;
 
-import java.util.Date;
-import java.util.List;
-
-import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.lang3.StringUtils;
-
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.annotation.CheckPersistType;
@@ -22,6 +16,11 @@ import com.x.cms.core.entity.FileInfo;
 import com.x.cms.core.entity.Log;
 import com.x.cms.core.entity.tools.filter.QueryFilter;
 import com.x.query.core.entity.Item;
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Date;
+import java.util.List;
 
 public class DocumentInfoService {
 
@@ -247,12 +246,49 @@ public class DocumentInfoService {
 		}
 		return business.getDocumentFactory().listNextWithCondition( pageSize, sequenceFieldValue, orderField, orderType, queryFilter );
 	}
+
+	/**
+	 * 对Document信息进行分页查询(忽略权限)
+	 * document和Review除了sequence还有5个排序列支持title, appAlias, categoryAlias, creatorPerson, creatorUnitName的分页查询
+	 除了sequence和title, appAlias, categoryAlias, categoryName, creatorUnitName之外,其他的列排序全部在内存进行分页
+	 * @param emc
+	 * @param pageSize
+	 * @param lastId
+	 * @param orderField
+	 * @param orderType
+	 * @param queryFilter
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Document> listPrevWithCondition( EntityManagerContainer emc, Integer pageSize, String lastId, String orderField, String orderType, QueryFilter queryFilter ) throws Exception {
+		if( pageSize == 0 ) { pageSize = 20; }
+		if( StringUtils.isEmpty( orderType ) ) {  orderType = "desc"; }
+		Business business = new Business(emc);
+		Document document = null;
+		String sequenceFieldValue = null;
+		Object obj = null;
+
+		//校正排序列情况
+		orderField = Document.getSequnceFieldNameWithProperty( orderField );
+
+		//如果有指定lastId值 ,需要查询该ID对应的文档的sequence
+		if( StringUtils.isNotEmpty( lastId ) && !StringUtils.equalsIgnoreCase( lastId, StandardJaxrsAction.EMPTY_SYMBOL ) ) {
+			document = emc.find( lastId, Document.class );
+			if( document != null ){//查询出ID对应的记录的sequence
+				obj = PropertyUtils.getProperty( document, orderField );
+				if( obj != null ) {
+					sequenceFieldValue = obj.toString();
+				}
+			}
+		}
+		return business.getDocumentFactory().listPrevWithCondition( pageSize, sequenceFieldValue, orderField, orderType, queryFilter );
+	}
 	
 	public List<Document> listNextWithCondition(EntityManagerContainer emc, String orderField, String orderType, QueryFilter queryFilter, int maxCount) throws Exception {
 		if( maxCount == 0 ) { maxCount = 20; }
 		Business business = new Business(emc);
 		return business.getDocumentFactory().listNextWithCondition( orderField, orderType, queryFilter, maxCount );
-	}	
+	}
 	
 	public List<Document> listMyDraft(EntityManagerContainer emc, String name, List<String> categoryIdList, String documentType) throws Exception {
 		Business business = new Business(emc);	

+ 58 - 8
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/DocumentQueryService.java

@@ -1,10 +1,5 @@
 package com.x.cms.assemble.control.service;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-
 import com.google.gson.Gson;
 import com.google.gson.JsonElement;
 import com.x.base.core.container.EntityManagerContainer;
@@ -22,7 +17,11 @@ import com.x.cms.core.entity.Document;
 import com.x.cms.core.entity.Review;
 import com.x.cms.core.entity.content.Data;
 import com.x.cms.core.entity.tools.filter.QueryFilter;
-import com.x.query.core.entity.Item;	
+import com.x.query.core.entity.Item;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 对文档信息进行查询的服务类
@@ -316,9 +315,9 @@ public class DocumentQueryService {
 				document = emc.find( lastId, Document.class );
 			}
 			if( document != null ) {
-				reviewList = reviewService.listViewableWithFilter( emc, pageSize, document.getSequence(), orderField, orderType, person, queryFilter );
+				reviewList = reviewService.listNextViewableWithFilter( emc, pageSize, document.getSequence(), orderField, orderType, person, queryFilter );
 			}else {
-				reviewList = reviewService.listViewableWithFilter( emc, pageSize, null, orderField, orderType, person, queryFilter );
+				reviewList = reviewService.listNextViewableWithFilter( emc, pageSize, null, orderField, orderType, person, queryFilter );
 			}	
 			//根据Review列表查询Document列表信息
 			documentList = listDocumentsWithReview( reviewList );			
@@ -328,6 +327,35 @@ public class DocumentQueryService {
 		}
 	}
 
+	public List<Document> listPrevWithConditionInReview( String lastId, Integer pageSize, String orderField, String orderType, String person, QueryFilter queryFilter ) throws Exception {
+		if( pageSize == 0 ) { pageSize = 20; }
+
+		if( StringUtils.isEmpty( orderField ) ) {
+			orderField = Document.sequence_FIELDNAME;
+		}
+		if( StringUtils.isEmpty( orderType ) ) {
+			orderType = "desc";
+		}
+		Document document = null;
+		List<Document> documentList = null;
+		List<Review> reviewList = null;
+		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
+			if( StringUtils.isNotEmpty( lastId ) ) {
+				document = emc.find( lastId, Document.class );
+			}
+			if( document != null ) {
+				reviewList = reviewService.listPrevViewableWithFilter( emc, pageSize, document.getSequence(), orderField, orderType, person, queryFilter );
+			}else {
+				reviewList = reviewService.listPrevViewableWithFilter( emc, pageSize, null, orderField, orderType, person, queryFilter );
+			}
+			//根据Review列表查询Document列表信息
+			documentList = listDocumentsWithReview( reviewList );
+			return documentList;
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
 	/**
 	 * 根据条件查询指定条数符合条件的文档信息Review列表
 	 * @param orderField
@@ -396,6 +424,28 @@ public class DocumentQueryService {
 		}
 	}
 
+	/**
+	 * 对Document信息进行分页查询(忽略权限)
+	 * document和Review除了sequence还有5个排序列支持title, appAlias, categoryAlias, categoryName, creatorUnitName的分页查询
+	 除了sequence和title, appAlias, categoryAlias, categoryName, creatorUnitName之外,其他的列排序全部在内存进行分页
+	 * @param lastId
+	 * @param pageSize
+	 * @param orderField
+	 * @param orderType
+	 * @param queryFilter
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Document> listPrevWithConditionOutofPermission( String lastId, Integer pageSize, String orderField, String orderType, QueryFilter queryFilter ) throws Exception {
+		if( pageSize == 0 ) { pageSize = 20; }
+		//按正常逻辑根据序列进行分页查询
+		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
+			return documentInfoService.listPrevWithCondition( emc, pageSize, lastId, orderField, orderType, queryFilter );
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
 	/**
 	 * 对Document信息进行分页查询(包含权限)
 	 * @param personName

+ 24 - 7
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/ReviewService.java

@@ -1,10 +1,5 @@
 package com.x.cms.assemble.control.service;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.entity.annotation.CheckPersistType;
 import com.x.base.core.entity.annotation.CheckRemoveType;
@@ -18,6 +13,10 @@ import com.x.cms.core.entity.CategoryInfo;
 import com.x.cms.core.entity.Document;
 import com.x.cms.core.entity.Review;
 import com.x.cms.core.entity.tools.filter.QueryFilter;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
 
 public class ReviewService {
 
@@ -48,10 +47,28 @@ public class ReviewService {
 	 * @return
 	 * @throws Exception
 	 */
-	public List<Review> listViewableWithFilter( EntityManagerContainer emc, Integer pageSize, String docSequence, String orderField,
+	public List<Review> listNextViewableWithFilter( EntityManagerContainer emc, Integer pageSize, String docSequence, String orderField,
 			String orderType, String person, QueryFilter queryFilter ) throws Exception {
 		Business business = new Business(emc);
-		return business.reviewFactory().listWithFilter( pageSize, docSequence, orderField, orderType, person, queryFilter);
+		return business.reviewFactory().listNextWithFilter( pageSize, docSequence, orderField, orderType, person, queryFilter);
+	}
+
+	/**
+	 * 根据权限和条件查询符合条件的可见的文档Review信息列表
+	 * @param emc
+	 * @param pageSize
+	 * @param docSequence
+	 * @param orderField
+	 * @param orderType
+	 * @param person
+	 * @param queryFilter
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Review> listPrevViewableWithFilter( EntityManagerContainer emc, Integer pageSize, String docSequence, String orderField,
+													String orderType, String person, QueryFilter queryFilter ) throws Exception {
+		Business business = new Business(emc);
+		return business.reviewFactory().listPrevWithFilter( pageSize, docSequence, orderField, orderType, person, queryFilter);
 	}
 	
 	/**

+ 38 - 8
o2server/x_cms_assemble_control/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

+ 17 - 21
o2server/x_cms_core_entity/src/main/java/com/x/cms/core/entity/AppInfo.java

@@ -1,26 +1,5 @@
 package com.x.cms.core.entity;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.Basic;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.Id;
-import javax.persistence.Inheritance;
-import javax.persistence.InheritanceType;
-import javax.persistence.Lob;
-import javax.persistence.Table;
-import javax.persistence.UniqueConstraint;
-
-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.OrderColumn;
-
 import com.x.base.core.entity.AbstractPersistenceProperties;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
@@ -30,6 +9,14 @@ import com.x.base.core.entity.annotation.ContainerEntity;
 import com.x.base.core.entity.annotation.Flag;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.ListTools;
+import org.apache.openjpa.persistence.PersistentCollection;
+import org.apache.openjpa.persistence.jdbc.Index;
+import org.apache.openjpa.persistence.jdbc.OrderColumn;
+import org.apache.openjpa.persistence.jdbc.*;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 栏目信息
@@ -199,6 +186,12 @@ public class AppInfo extends SliceJpaObject {
 	@Index(name = TABLE + IndexNameMiddle + sendNotify_FIELDNAME)
 	private Boolean sendNotify = true;
 
+	public static final String showAllDocuments_FIELDNAME = "showAllDocuments";
+	@FieldDescribe("栏目是否显示全部文档:true | false")
+	@Column(name = ColumnNamePrefix + showAllDocuments_FIELDNAME)
+	@CheckPersist(allowEmpty = true)
+	private Boolean showAllDocuments = true;
+
 	public static final String categoryList_FIELDNAME = "categoryList";
 	@FieldDescribe("分类列表")
 	@PersistentCollection(fetch = FetchType.EAGER)
@@ -776,4 +769,7 @@ public class AppInfo extends SliceJpaObject {
 		this.sendNotify = sendNotify;
 	}
 
+	public Boolean getShowAllDocuments() { return this.showAllDocuments == null? true : this.showAllDocuments; }
+
+	public void setShowAllDocuments(final Boolean showAllDocuments) { this.showAllDocuments = showAllDocuments; }
 }

+ 16 - 11
o2server/x_cms_core_entity/src/main/java/com/x/cms/core/entity/content/Data.java

@@ -1,14 +1,5 @@
 package com.x.cms.core.entity.content;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
-
-import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.collections4.map.ListOrderedMap;
-import org.apache.commons.lang3.StringUtils;
-
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
@@ -16,6 +7,14 @@ import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.tools.ListTools;
 import com.x.cms.core.entity.Document;
 import com.x.cms.core.entity.FileInfo;
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.collections4.map.ListOrderedMap;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
 
 public class Data extends ListOrderedMap<String, Object> {
 
@@ -30,6 +29,7 @@ public class Data extends ListOrderedMap<String, Object> {
 		if (null != document) {
 			DataDocument.documentCopier.copy(document, dataDocument);
 		}
+		dataDocument.setId( document.getId() );
 		dataDocument.setDocId(document.getId());
 		this.put(DOCUMENT_PROPERTY, dataDocument);
 	}
@@ -92,7 +92,8 @@ public class Data extends ListOrderedMap<String, Object> {
 
 		private static WrapCopier<Document, DataDocument> documentCopier = WrapCopierFactory.wo(Document.class, DataDocument.class, null,
 				JpaObject.FieldsInvisible);
-		
+
+		private String id;
 		private String docId;
 		private String title;
 		private String documentType;
@@ -113,7 +114,11 @@ public class Data extends ListOrderedMap<String, Object> {
 		private Date publishTime;
 		private Date modifyTime;
 		private Boolean isTop;
-		
+
+		public String getId() { return this.id; }
+		public void setId(final String id) { this.id = id; }
+		public Boolean getTop() { return this.isTop; }
+		public void setTop(final Boolean top) { this.isTop = top; }
 		public Boolean getIsTop() {
 			return isTop;
 		}

+ 11 - 13
o2server/x_cms_core_express/src/main/java/com/x/cms/core/express/permission/CmsPermissionService.java

@@ -1,16 +1,5 @@
 package com.x.cms.core.express.permission;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import org.apache.commons.lang3.StringUtils;
-
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.project.tools.ListTools;
 import com.x.cms.core.entity.AppInfo;
@@ -19,6 +8,15 @@ import com.x.cms.core.entity.Review;
 import com.x.cms.core.entity.Review_;
 import com.x.cms.core.entity.tools.CriteriaBuilderTools;
 import com.x.cms.core.entity.tools.filter.QueryFilter;
+import org.apache.commons.lang3.StringUtils;
+
+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 java.util.ArrayList;
+import java.util.List;
 
 /**
  * 对CMS栏目、分类、文档进行权限过滤查询,在CMS应用中会直接引用
@@ -800,7 +798,7 @@ public class CmsPermissionService {
 		cq.select(root.get(AppInfo.id_FIELDNAME));
 
 		Predicate p = cb.isTrue(root.get(AppInfo.allPeopleView_FIELDNAME));
-		if( StringUtils.isNotEmpty( appType ) && !"all".equalsIgnoreCase( appType )  ){
+		if( StringUtils.isNotEmpty( appType ) && !"all".equalsIgnoreCase( appType ) && !"全部".equalsIgnoreCase( appType )   ){
 			p = CriteriaBuilderTools.predicate_and(cb, p, cb.equal(root.get(AppInfo.appType_FIELDNAME), appType));
 		}
 		if (StringUtils.isNotEmpty(documentType) && !"全部".equals(documentType) && !"all".equalsIgnoreCase(documentType)) {
@@ -830,7 +828,7 @@ public class CmsPermissionService {
 		Root<AppInfo> root = cq.from(AppInfo.class);
 		cq.select(root.get(AppInfo.id_FIELDNAME));
 		Predicate p = cb.isTrue(root.get(AppInfo.allPeoplePublish_FIELDNAME));
-		if( StringUtils.isNotEmpty( appType ) && !"all".equalsIgnoreCase( appType )  ){
+		if( StringUtils.isNotEmpty( appType ) && !"all".equalsIgnoreCase( appType ) && !"全部".equalsIgnoreCase( appType )  ){
 			p = CriteriaBuilderTools.predicate_and(cb, p, cb.equal(root.get(AppInfo.appType_FIELDNAME), appType));
 		}
 		if (StringUtils.isNotEmpty(documentType) && !"全部".equals(documentType) && !"all".equalsIgnoreCase(documentType)) {

+ 38 - 8
o2server/x_component_assemble_control/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

+ 6 - 8
o2server/x_console/src/main/java/com/x/server/console/CommandFactory.java

@@ -43,9 +43,6 @@ public class CommandFactory {
 
 	public static final Pattern exit_pattern = Pattern.compile("^ {0,}exit {0,}$", Pattern.CASE_INSENSITIVE);
 
-//	public static final Pattern update_pattern = Pattern.compile("^ {0,}update (true|false) (true|false) (.+)$",
-//			Pattern.CASE_INSENSITIVE);
-
 	public static final Pattern updateFile_pattern = Pattern.compile("^ {0,}update file (.+) (true|false) (.+)$",
 			Pattern.CASE_INSENSITIVE);
 
@@ -75,14 +72,15 @@ public class CommandFactory {
 	public static final Pattern show_cpu_pattern = Pattern.compile("^ {0,}show cpu ([1-9][0-9]*) ([1-9][0-9]*) {0,}$",
 			Pattern.CASE_INSENSITIVE);
 
-	public static final Pattern show_dataSource_pattern = Pattern
-			.compile("^ {0,}show dataSource ([1-9][0-9]*) ([1-9][0-9]*) {0,}$", Pattern.CASE_INSENSITIVE);
+	public static final Pattern show_http_thread_pattern = Pattern
+			.compile("^ {0,}show http thread ([1-9][0-9]*) ([1-9][0-9]*) {0,}$", Pattern.CASE_INSENSITIVE);
+//	public static final Pattern show_dataSource_pattern = Pattern
+//			.compile("^ {0,}show dataSource ([1-9][0-9]*) ([1-9][0-9]*) {0,}$", Pattern.CASE_INSENSITIVE);
 
 	public static final Pattern stack_pattern = Pattern.compile("^ {0,}stack ([1-9][0-9]*) ([1-9][0-9]*) (.+)$",
 			Pattern.CASE_INSENSITIVE);
-	
-	public static final Pattern heapDump_pattern = Pattern.compile("^ {0,}heap dump (.+)$",
-			Pattern.CASE_INSENSITIVE);
+
+	public static final Pattern heapDump_pattern = Pattern.compile("^ {0,}heap dump (.+)$", Pattern.CASE_INSENSITIVE);
 
 	public static void printStartHelp() {
 		try {

+ 16 - 0
o2server/x_console/src/main/java/com/x/server/console/Main.java

@@ -49,6 +49,7 @@ import com.x.server.console.action.ActionRestoreData;
 import com.x.server.console.action.ActionRestoreStorage;
 import com.x.server.console.action.ActionSetPassword;
 import com.x.server.console.action.ActionShowCpu;
+import com.x.server.console.action.ActionShowHttpThread;
 import com.x.server.console.action.ActionShowMemory;
 import com.x.server.console.action.ActionShowOs;
 import com.x.server.console.action.ActionShowThread;
@@ -192,6 +193,12 @@ public class Main {
 				continue;
 			}
 
+			matcher = CommandFactory.show_http_thread_pattern.matcher(cmd);
+			if (matcher.find()) {
+				showHttpThread(matcher.group(1), matcher.group(2));
+				continue;
+			}
+
 			matcher = CommandFactory.start_pattern.matcher(cmd);
 			if (matcher.find()) {
 				switch (matcher.group(1)) {
@@ -426,6 +433,15 @@ public class Main {
 		return true;
 	}
 
+	private static boolean showHttpThread(String interval, String repeat) {
+		try {
+			return new ActionShowHttpThread().execute(Integer.parseInt(interval, 10), Integer.parseInt(repeat, 10));
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return true;
+	}
+
 	private static boolean createEncryptKey(String password) {
 		try {
 			return new ActionCreateEncryptKey().execute(password);

+ 11 - 0
o2server/x_console/src/main/java/com/x/server/console/ResourceFactory.java

@@ -7,6 +7,8 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.TreeMap;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 import java.util.concurrent.LinkedBlockingQueue;
 
 import org.apache.commons.collections.MapUtils;
@@ -55,6 +57,7 @@ public class ResourceFactory {
 		} else {
 			internal();
 		}
+		processPlatformExecutors();
 	}
 
 	private static void node(ScanResult sr) throws Exception {
@@ -236,4 +239,12 @@ public class ResourceFactory {
 				new PrintStream(rolloverFileOutputStream, true, DefaultCharset.name_iso_utf_8));
 	}
 
+	private static void processPlatformExecutors() throws Exception {
+		ExecutorService[] services = new ExecutorService[Config.processPlatform().getExecutorCount()];
+		for (int i = 0; i < Config.processPlatform().getExecutorCount(); i++) {
+			services[i] = Executors.newSingleThreadExecutor();
+		}
+		new Resource(Config.RESOURCE_NODE_PROCESSPLATFORMEXECUTORS, services);
+	}
+
 }

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

@@ -82,7 +82,6 @@ public class ActionDumpData {
 				em.close();
 				emf.close();
 			}
-			System.gc();
 		}
 		FileUtils.write(new File(dir, "catalog.json"), pureGsonDateFormated.toJson(this.catalog),
 				DefaultCharset.charset);
@@ -121,6 +120,7 @@ public class ActionDumpData {
 				FileUtils.write(file, pureGsonDateFormated.toJson(list), DefaultCharset.charset);
 			}
 			em.clear();
+			System.gc();
 		} while (ListTools.isNotEmpty(list));
 		this.catalog.put(cls.getName(), count);
 	}

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

@@ -88,7 +88,6 @@ public class ActionDumpStorage {
 				em.close();
 				emf.close();
 			}
-			System.gc();
 		}
 		FileUtils.write(new File(dir, "catalog.json"), XGsonBuilder.instance().toJson(this.catalog),
 				DefaultCharset.charset);
@@ -200,6 +199,7 @@ public class ActionDumpStorage {
 				this.dumpWrite(file, normalList, emptyList, invalidStorageList);
 			}
 			em.clear();
+			System.gc();
 		} while (ListTools.isNotEmpty(list));
 		DumpRestoreStorageCatalogItem item = new DumpRestoreStorageCatalogItem();
 		item.setCount(count);

+ 61 - 0
o2server/x_console/src/main/java/com/x/server/console/action/ActionShowHttpThread.java

@@ -0,0 +1,61 @@
+package com.x.server.console.action;
+
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.server.console.server.Servers;
+
+public class ActionShowHttpThread extends ActionBase {
+
+	private static Logger logger = LoggerFactory.getLogger(ActionShowHttpThread.class);
+
+	public boolean execute(Integer interval, Integer repeat) {
+		try {
+			final Integer interval_adjust = Math.min(Math.max(interval, 1), 20);
+			final Integer repeat_repeat = Math.min(Math.max(repeat, 1), 200);
+			new Thread() {
+				public void run() {
+					try {
+						for (int i = 0; i < repeat_repeat; i++) {
+							show();
+							Thread.sleep(interval_adjust * 1000);
+						}
+					} catch (InterruptedException e) {
+						e.printStackTrace();
+					}
+				}
+			}.start();
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+		return true;
+	}
+
+	private void show() {
+		StringBuffer sb = new StringBuffer();
+		if (Servers.centerServerIsRunning()) {
+			sb.append("center server:");
+			sb.append(String.format("thread pool size:%d, idle:%d. ", Servers.centerServer.getThreadPool().getThreads(),
+					Servers.centerServer.getThreadPool().getIdleThreads()));
+		} else {
+			sb.append("is not running. ");
+		}
+		if (Servers.applicationServerIsRunning()) {
+			sb.append("application server:");
+			sb.append(String.format("thread pool size:%d, idle:%d. ",
+					Servers.applicationServer.getThreadPool().getThreads(),
+					Servers.applicationServer.getThreadPool().getIdleThreads()));
+		} else {
+			sb.append("is not running. ");
+		}
+		if (Servers.webServerIsRunning()) {
+			sb.append("web server:");
+			sb.append(String.format("thread pool size:%d, idle:%d. ", Servers.webServer.getThreadPool().getThreads(),
+					Servers.webServer.getThreadPool().getIdleThreads()));
+		} else {
+			sb.append("is not running. ");
+		}
+		System.out.println(sb.toString());
+	}
+
+}

+ 11 - 7
o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java

@@ -29,6 +29,7 @@ import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.handler.HandlerList;
 import org.eclipse.jetty.server.handler.gzip.GzipHandler;
 import org.eclipse.jetty.servlet.FilterHolder;
+import org.eclipse.jetty.servlet.ServletHolder;
 import org.eclipse.jetty.util.thread.QueuedThreadPool;
 import org.w3c.dom.Document;
 
@@ -81,8 +82,8 @@ public class ApplicationServerTools extends JettySeverTools {
 
 	private static Logger logger = LoggerFactory.getLogger(ApplicationServerTools.class);
 
-	private static int APPLICATIONSERVER_THREAD_POOL_SIZE_MIN = 5;
-	private static int APPLICATIONSERVER_THREAD_POOL_SIZE_MAX = 100;
+	private static int APPLICATIONSERVER_THREAD_POOL_SIZE_MIN = 50;
+	private static int APPLICATIONSERVER_THREAD_POOL_SIZE_MAX = 500;
 
 	private static final List<String> OFFICIAL_MODULE_SORTED_TEMPLATE = ListTools.toList(
 			x_general_assemble_control.class.getName(), x_organization_assemble_authentication.class.getName(),
@@ -165,10 +166,12 @@ public class ApplicationServerTools extends JettySeverTools {
 				webApp.getInitParams().put("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
 				/* stat */
 				if (applicationServer.getStatEnable()) {
-					FilterHolder holder = new FilterHolder(new WebStatFilter());
-					holder.setInitParameter("exclusions", applicationServer.getStatExclusions());
-					webApp.addFilter(holder, "/*", EnumSet.of(DispatcherType.REQUEST));
-					webApp.addServlet(StatViewServlet.class, "/druid/*");
+					FilterHolder statFilterHolder = new FilterHolder(new WebStatFilter());
+					statFilterHolder.setInitParameter("exclusions", applicationServer.getStatExclusions());
+					webApp.addFilter(statFilterHolder, "/*", EnumSet.of(DispatcherType.REQUEST));
+					ServletHolder statServletHolder = new ServletHolder(StatViewServlet.class);
+					statServletHolder.setInitParameter("sessionStatEnable", "false");
+					webApp.addServlet(statServletHolder, "/druid/*");
 				}
 				/* stat end */
 				handlers.addHandler(webApp);
@@ -181,7 +184,7 @@ public class ApplicationServerTools extends JettySeverTools {
 		threadPool.setMinThreads(APPLICATIONSERVER_THREAD_POOL_SIZE_MIN);
 		threadPool.setMaxThreads(APPLICATIONSERVER_THREAD_POOL_SIZE_MAX);
 		Server server = new Server(threadPool);
-		server.setAttribute("maxFormContentSize", 1024 * 1024 * 1024 * 10);
+		server.setAttribute("maxFormContentSize", applicationServer.getMaxFormContent() * 1024 * 1024);
 
 		if (applicationServer.getSslEnable()) {
 			addHttpsConnector(server, applicationServer.getPort());
@@ -198,6 +201,7 @@ public class ApplicationServerTools extends JettySeverTools {
 		server.setStopAtShutdown(true);
 
 		server.start();
+
 		System.out.println("****************************************");
 		System.out.println("* application server start completed.");
 		System.out.println("* port: " + applicationServer.getPort() + ".");

+ 10 - 7
o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java

@@ -13,6 +13,7 @@ import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.handler.HandlerList;
 import org.eclipse.jetty.server.handler.gzip.GzipHandler;
 import org.eclipse.jetty.servlet.FilterHolder;
+import org.eclipse.jetty.servlet.ServletHolder;
 import org.eclipse.jetty.util.thread.QueuedThreadPool;
 
 import com.alibaba.druid.support.http.StatViewServlet;
@@ -30,8 +31,8 @@ public class CenterServerTools extends JettySeverTools {
 
 	private static Logger logger = LoggerFactory.getLogger(CenterServerTools.class);
 
-	private static int CENTERSERVER_THREAD_POOL_SIZE_MIN = 5;
-	private static int CENTERSERVER_THREAD_POOL_SIZE_MAX = 100;
+	private static int CENTERSERVER_THREAD_POOL_SIZE_MIN = 50;
+	private static int CENTERSERVER_THREAD_POOL_SIZE_MAX = 500;
 
 	public static Server start(CenterServer centerServer) throws Exception {
 
@@ -55,10 +56,12 @@ public class CenterServerTools extends JettySeverTools {
 			webApp.getInitParams().put("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
 			/* stat */
 			if (centerServer.getStatEnable()) {
-				FilterHolder holder = new FilterHolder(new WebStatFilter());
-				holder.setInitParameter("exclusions", centerServer.getStatExclusions());
-				webApp.addFilter(holder, "/*", EnumSet.of(DispatcherType.REQUEST));
-				webApp.addServlet(StatViewServlet.class, "/druid/*");
+				FilterHolder statFilterHolder = new FilterHolder(new WebStatFilter());
+				statFilterHolder.setInitParameter("exclusions", centerServer.getStatExclusions());
+				webApp.addFilter(statFilterHolder, "/*", EnumSet.of(DispatcherType.REQUEST));
+				ServletHolder statServletHolder = new ServletHolder(StatViewServlet.class);
+				statServletHolder.setInitParameter("sessionStatEnable", "false");
+				webApp.addServlet(statServletHolder, "/druid/*");
 			}
 			/* stat end */
 			handlers.addHandler(webApp);
@@ -70,7 +73,7 @@ public class CenterServerTools extends JettySeverTools {
 		threadPool.setMinThreads(CENTERSERVER_THREAD_POOL_SIZE_MIN);
 		threadPool.setMaxThreads(CENTERSERVER_THREAD_POOL_SIZE_MAX);
 		Server server = new Server(threadPool);
-		server.setAttribute("maxFormContentSize", 1024 * 1024 * 1024 * 10);
+		server.setAttribute("maxFormContentSize", centerServer.getMaxFormContent() * 1024 * 1024);
 
 		if (centerServer.getSslEnable()) {
 			addHttpsConnector(server, centerServer.getPort());

+ 37 - 11
o2server/x_console/src/main/java/com/x/server/console/server/web/WebServerTools.java

@@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.handler.gzip.GzipHandler;
 import org.eclipse.jetty.servlet.FilterHolder;
+import org.eclipse.jetty.servlet.ServletHolder;
 import org.eclipse.jetty.util.resource.Resource;
 import org.eclipse.jetty.util.thread.QueuedThreadPool;
 import org.eclipse.jetty.webapp.WebAppContext;
@@ -38,8 +39,8 @@ public class WebServerTools extends JettySeverTools {
 
 	private static Logger logger = LoggerFactory.getLogger(WebServerTools.class);
 
-	private static int WEBSERVER_THREAD_POOL_SIZE_MIN = 10;
-	private static int WEBSERVER_THREAD_POOL_SIZE_MAX = 100;
+	private static int WEBSERVER_THREAD_POOL_SIZE_MIN = 50;
+	private static int WEBSERVER_THREAD_POOL_SIZE_MAX = 500;
 
 	public static Server start(WebServer webServer) throws Exception {
 
@@ -47,7 +48,13 @@ public class WebServerTools extends JettySeverTools {
 		 * 更新x_desktop的center指向
 		 */
 		updateCenterConfigJson();
-		/** 创建index.html */
+		/**
+		 * 更新 favicon.ico
+		 */
+		updateFavicon();
+		/**
+		 * 创建index.html
+		 */
 		createIndexPage();
 
 		QueuedThreadPool threadPool = new QueuedThreadPool();
@@ -65,17 +72,28 @@ public class WebServerTools extends JettySeverTools {
 		// context.setResourceBase(".");
 		context.setParentLoaderPriority(true);
 		context.setExtractWAR(false);
-		context.setDefaultsDescriptor(new File(Config.base(), "commons/webdefault_w.xml").getAbsolutePath());
+		// context.setDefaultsDescriptor(new File(Config.base(),
+		// "commons/webdefault_w.xml").getAbsolutePath());
 		context.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", "" + webServer.getDirAllowed());
+		context.setInitParameter("org.eclipse.jetty.servlet.Default.useFileMappedBuffer", "false");
+		if (webServer.getCacheControlMaxAge() > 0) {
+			context.setInitParameter("org.eclipse.jetty.servlet.Default.cacheControl",
+					"max-age=" + webServer.getCacheControlMaxAge());	
+		}
+		context.setInitParameter("org.eclipse.jetty.servlet.Default.maxCacheSize", "256000000");
+		context.setInitParameter("org.eclipse.jetty.servlet.Default.maxCachedFileSize", "200000000");
 		context.setWelcomeFiles(new String[] { "default.html", "index.html" });
 		context.setGzipHandler(new GzipHandler());
 		context.setParentLoaderPriority(true);
+		context.getMimeTypes().addMimeMapping("wcss", "application/json");
 		/* stat */
 		if (webServer.getStatEnable()) {
-			FilterHolder holder = new FilterHolder(new WebStatFilter());
-			holder.setInitParameter("exclusions", webServer.getStatExclusions());
-			context.addFilter(holder, "/*", EnumSet.of(DispatcherType.REQUEST));
-			context.addServlet(StatViewServlet.class, "/druid/*");
+			FilterHolder statFilterHolder = new FilterHolder(new WebStatFilter());
+			statFilterHolder.setInitParameter("exclusions", webServer.getStatExclusions());
+			context.addFilter(statFilterHolder, "/*", EnumSet.of(DispatcherType.REQUEST));
+			ServletHolder statServletHolder = new ServletHolder(StatViewServlet.class);
+			statServletHolder.setInitParameter("sessionStatEnable", "false");
+			context.addServlet(statServletHolder, "/druid/*");
 		}
 		/* stat end */
 		server.setHandler(context);
@@ -83,9 +101,7 @@ public class WebServerTools extends JettySeverTools {
 		server.setDumpBeforeStop(false);
 		server.setStopAtShutdown(true);
 		server.start();
-		/* 添加wcss支持mimeType必须在server.start()之后执行 */
-		// MimeTypes mimeTypes = new MimeTypes();
-		// mimeTypes.addMimeMapping("wcss", "application/json;charset=utf-8");
+
 		context.setMimeTypes(Config.mimeTypes());
 		System.out.println("****************************************");
 		System.out.println("* web server start completed.");
@@ -94,6 +110,16 @@ public class WebServerTools extends JettySeverTools {
 		return server;
 	}
 
+	private static void updateFavicon() throws Exception {
+
+		File file = new File(Config.dir_config(), "favicon.ico");
+
+		if (file.exists() && file.isFile()) {
+			FileUtils.copyFile(file, new File(Config.dir_servers_webServer(), "favicon.ico"));
+		}
+
+	}
+
 	private static void updateCenterConfigJson() throws Exception {
 		File dir = new File(Config.base(), "servers/webServer/x_desktop/res/config");
 		FileUtils.forceMkdir(dir);

+ 38 - 8
o2server/x_file_assemble_control/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

+ 38 - 8
o2server/x_general_assemble_control/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

+ 38 - 8
o2server/x_hotpic_assemble_control/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

+ 38 - 8
o2server/x_meeting_assemble_control/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

+ 2 - 0
o2server/x_meeting_core_entity/src/main/java/com/x/meeting/core/entity/Meeting.java

@@ -34,6 +34,7 @@ import com.x.base.core.entity.annotation.CheckPersist;
 import com.x.base.core.entity.annotation.CitationExist;
 import com.x.base.core.entity.annotation.ContainerEntity;
 import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.annotation.FieldTypeDescribe;
 import com.x.base.core.project.tools.ListTools;
 
 @Entity
@@ -200,6 +201,7 @@ public class Meeting extends SliceJpaObject {
 	@Column(length = JpaObject.length_8B, name = ColumnNamePrefix + confirmStatus_FIELDNAME)
 	@Index(name = TABLE + IndexNameMiddle + confirmStatus_FIELDNAME)
 	@CheckPersist(allowEmpty = false)
+	@FieldTypeDescribe(fieldType="enum",fieldValue="allow|deny|wait",fieldTypeName = "com.x.meeting.core.entity.ConfirmStatus")
 	private ConfirmStatus confirmStatus;
 
 	public static final String manualCompleted_FIELDNAME = "manualCompleted";

+ 38 - 8
o2server/x_message_assemble_communicate/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

+ 38 - 8
o2server/x_mind_assemble_control/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

+ 38 - 8
o2server/x_okr_assemble_control/src/main/webapp/jest/describe.js

@@ -204,7 +204,12 @@ Describe.createSampleMootools = function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										  if(i.fieldType =='enum'){
+												   strSample += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											  }else{
+												  
+													strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+											  }
 									}
 							}
 						}
@@ -313,7 +318,11 @@ Describe.createSampleJSO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+										  strSample += '       data["'+i.name+'"] = "'+ i.fieldValue + '";' + "\n";
+										}else{
+										  strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
 									}
 							}
 						}
@@ -402,7 +411,13 @@ Describe.createSampleO2= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+									
 									}
 							}
 						}
@@ -494,7 +509,14 @@ Describe.createSample= function(m) {
 										  strSample += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										if(i.fieldType =='enum'){
+											 
+											strSample += '       data["'+i.name+'"] = "'+i.fieldValue+'"\n';
+										}else{
+											strSample += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										}
+										
+										
 									}
 							}
 						}
@@ -605,7 +627,13 @@ Describe.createSampleCommon= function(m,className) {
 										  body += '       data["'+i.name+'"] = [{"参数1":"value1","参数2":"value2"}];'+"\n";
 										}
 									}else{
-										body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 if(i.fieldType =='enum'){
+											 body += '       data["'+i.name+'"] = "'+ i.fieldValue +'";'+"\n";	
+											 body +=(i.fieldSample ? "  "+'<span style="color:red">//注解:'+i.fieldSample +'</span>\n':"");
+								
+										 }else{
+										   body += '       data["'+i.name+'"] = {"参数1":"value1","参数2":"value2"};'+"\n";
+										 }
 									}
 							}
 						}
@@ -761,11 +789,13 @@ Describe.prototype = {
 										if (i.isCollection) {
 											
 											txt += '<tr><td><textarea id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':' + i.description +(i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
-											'</td></tr>';
+											+'</td></tr>';
 										} else {
 											txt += '<tr><td><input type="text" id="' + i.name + '" style="width:600px; padding:1px; border:1px #000000 solid"/></td><td>' + i.name + ':'
-													+ i.description
-											'</td></tr>';
+											
+													+ i.description+ (i.fieldValue ? "  "+'。数据格式:<span style="color:red">'+i.fieldValue +'</span>':"") + (i.fieldSample ? "  "+'<span style="color:red">'+i.fieldSample +'</span>':"") 
+													+'</td></tr>';
+						
 										}
 									});
 									txt += '</table>';

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels