Bläddra i källkod

整理o2server

huqi 5 år sedan
förälder
incheckning
81d47b59b1
100 ändrade filer med 1556 tillägg och 248 borttagningar
  1. 0 1
      o2server/.gitignore
  2. 22 0
      o2server/.gitlab-ci.yml
  3. 2 1
      o2server/gulpfile.js
  4. 1 1
      o2server/package.json
  5. 24 0
      o2server/pom.xml
  6. 1 1
      o2server/start_windows_debug.bat
  7. 1 0
      o2server/store/.gitignore
  8. 24 0
      o2server/store/jars/manifest.cfg
  9. BIN
      o2server/store/jars/x_attendance_core_entity.jar
  10. BIN
      o2server/store/jars/x_base_core_project.jar
  11. BIN
      o2server/store/jars/x_bbs_core_entity.jar
  12. BIN
      o2server/store/jars/x_calendar_core_entity.jar
  13. BIN
      o2server/store/jars/x_cms_core_entity.jar
  14. BIN
      o2server/store/jars/x_cms_core_express.jar
  15. BIN
      o2server/store/jars/x_component_core_entity.jar
  16. BIN
      o2server/store/jars/x_file_core_entity.jar
  17. BIN
      o2server/store/jars/x_general_core_entity.jar
  18. BIN
      o2server/store/jars/x_hotpic_core_entity.jar
  19. BIN
      o2server/store/jars/x_jpush_core_entity.jar
  20. BIN
      o2server/store/jars/x_meeting_core_entity.jar
  21. BIN
      o2server/store/jars/x_message_core_entity.jar
  22. BIN
      o2server/store/jars/x_mind_core_entity.jar
  23. BIN
      o2server/store/jars/x_okr_core_entity.jar
  24. BIN
      o2server/store/jars/x_organization_core_entity.jar
  25. BIN
      o2server/store/jars/x_organization_core_express.jar
  26. BIN
      o2server/store/jars/x_portal_core_entity.jar
  27. BIN
      o2server/store/jars/x_processplatform_core_entity.jar
  28. BIN
      o2server/store/jars/x_processplatform_core_express.jar
  29. BIN
      o2server/store/jars/x_program_center_core_entity.jar
  30. BIN
      o2server/store/jars/x_query_core_entity.jar
  31. BIN
      o2server/store/jars/x_query_core_express.jar
  32. BIN
      o2server/store/jars/x_teamwork_core_entity.jar
  33. 28 0
      o2server/store/manifest.cfg
  34. 1 1
      o2server/version.o2
  35. 22 12
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/factory/AttendanceSelfHolidayFactory.java
  36. 12 20
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/jaxrs/attendancestatisticalcycle/ActionCycleDetail.java
  37. 68 37
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/jaxrs/selfholiday/ActionSave.java
  38. 2 1
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/jaxrs/selfholiday/BaseAction.java
  39. 3 0
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/jaxrs/selfholiday/exception/ExceptionSelfHolidayProcess.java
  40. 5 8
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceDetailAnalyseServiceAdv.java
  41. 7 2
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceSelfHolidayService.java
  42. 10 2
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceSelfHolidayServiceAdv.java
  43. 4 5
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/UserManagerService.java
  44. 12 18
      o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceSelfHoliday.java
  45. 42 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java
  46. 4 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainerBasic.java
  47. 3 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/container/FieldType.java
  48. 5 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/JpaObject.java
  49. 19 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/JsonProperties.java
  50. 6 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/StorageObject.java
  51. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/StorageProtocol.java
  52. 81 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/annotation/JsonPropertiesValueHandler.java
  53. 8 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dataitem/ItemType.java
  54. 4 4
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/AbstractContext.java
  55. 11 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/Applications.java
  56. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/Context.java
  57. 12 13
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/CreateConfigSample.java
  58. 1 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/PackageO2server.java
  59. 10 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/CenterServers.java
  60. 17 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Collect.java
  61. 18 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Config.java
  62. 0 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Dingding.java
  63. 0 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ExternalStorageSource.java
  64. 9 4
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/LogLevel.java
  65. 4 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Messages.java
  66. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Node.java
  67. 84 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Portal.java
  68. 0 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Qiyeweixin.java
  69. 62 35
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Query.java
  70. 45 9
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Token.java
  71. 9 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/connection/CipherConnectionAction.java
  72. 61 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/connection/ConnectionAction.java
  73. 13 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/exception/ExceptionEntityNotExist.java
  74. 4 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/http/HttpToken.java
  75. 2 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/AbstractActionApplication.java
  76. 8 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/SysResourceJaxrsFilter.java
  77. 62 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/sysresource/ActionListResource.java
  78. 65 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/sysresource/ActionUploadResource.java
  79. 7 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/sysresource/BaseAction.java
  80. 69 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/sysresource/SysResourceAction.java
  81. 6 6
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/logger/Audit.java
  82. 3 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/message/MessageConnector.java
  83. 199 4
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/DocumentTools.java
  84. 111 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/FileTools.java
  85. 48 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/JarTools.java
  86. 12 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/StringTools.java
  87. 19 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/URLTools.java
  88. 3 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_message_assemble_communicate.java
  89. 10 8
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_assemble_designer.java
  90. 10 9
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_assemble_surface.java
  91. 10 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_core_express.java
  92. 6 6
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_service_processing.java
  93. 10 9
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_query_assemble_designer.java
  94. 11 10
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_query_assemble_surface.java
  95. 11 11
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_query_service_processing.java
  96. 17 1
      o2server/x_base_core_project/src/test/java/com/x/base/core/project/gson/TestClient.java
  97. 7 0
      o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/gson/TestClient.java
  98. 55 0
      o2server/x_base_core_project/src/test/java/com/x/base/core/project/test/hanlp/TestClient.java
  99. 1 0
      o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/jaxrs/replyinfo/ActionListWithSubjectForPage.java
  100. 10 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionListNextWithFilter.java

+ 0 - 1
o2server/.gitignore

@@ -9,7 +9,6 @@
 /x_build/
 /x_build/
 /servers/
 /servers/
 command.swap
 command.swap
-/store/
 /node_modules/
 /node_modules/
 **/src/main/resources/META-INF/persistence.xml
 **/src/main/resources/META-INF/persistence.xml
 **/src/main/resources/META-INF/x_persistence.xml
 **/src/main/resources/META-INF/x_persistence.xml

+ 22 - 0
o2server/.gitlab-ci.yml

@@ -0,0 +1,22 @@
+stages:
+  - build
+
+cache:
+  paths:
+    - commons/
+    - jvm/
+    - common.tar.gz
+    - jvm.tar.gz
+
+before_script:
+  - mvn clean
+  - cp /data/commons.tar.gz .
+  - cp /data/jvm.tar.gz .
+  - tar -zxf commons.tar.gz
+  - tar -zxf jvm.tar.gz 
+
+build:
+  stage: build
+  script:
+    - mvn clean
+    - mvn install

+ 2 - 1
o2server/gulpfile.js

@@ -52,6 +52,7 @@ var apps = [
     {"folder": "x_component_ForumPerson",                   "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_ForumSearch",                   "tasks": ["move", "min", "clean", "watch"]},
     {"folder": "x_component_ForumSection",                  "tasks": ["move", "min", "clean", "watch"]},
     {"folder": "x_component_ForumSection",                  "tasks": ["move", "min", "clean", "watch"]},
+    {"folder": "x_component_Homepage",                      "tasks": ["move", "min", "clean", "watch"]},
     {"folder": "x_component_HotArticle",                    "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_IM",                            "tasks": ["move", "min", "clean", "watch"]},
     {"folder": "x_component_LogViewer",                     "tasks": ["move", "min", "clean", "watch"]},
     {"folder": "x_component_LogViewer",                     "tasks": ["move", "min", "clean", "watch"]},
@@ -432,4 +433,4 @@ gulp.task("o2:new-v:o2", function () {
 });
 });
 gulp.task("o2:new-v", gulp.parallel("o2:new-v:o2", "o2:new-v:html"));
 gulp.task("o2:new-v", gulp.parallel("o2:new-v:o2", "o2:new-v:html"));
 
 
-gulp.task("default", gulp.series("clean", gulp.series(minTasks, moveTasks, 'index'), "o2:new-v"));
+gulp.task("default", gulp.series("clean", gulp.parallel(minTasks, moveTasks, 'index'), "o2:new-v"));

+ 1 - 1
o2server/package.json

@@ -4,7 +4,7 @@
   "description": "a javascript library",
   "description": "a javascript library",
   "main": "o2.js",
   "main": "o2.js",
   "scripts": {
   "scripts": {
-    "test": "gulp",
+    "build": "gulp",
     "report-coverage": "codecov"
     "report-coverage": "codecov"
   },
   },
   "repository": {
   "repository": {

+ 24 - 0
o2server/pom.xml

@@ -32,6 +32,7 @@
 		<module>x_program_center_core_entity</module>
 		<module>x_program_center_core_entity</module>
 		<module>x_organization_core_express</module>
 		<module>x_organization_core_express</module>
 		<module>x_query_core_express</module>
 		<module>x_query_core_express</module>
+		<module>x_processplatform_core_express</module>
 		<module>x_bbs_assemble_control</module>
 		<module>x_bbs_assemble_control</module>
 		<module>x_calendar_assemble_control</module>
 		<module>x_calendar_assemble_control</module>
 		<module>x_cms_assemble_control</module>
 		<module>x_cms_assemble_control</module>
@@ -303,6 +304,14 @@
 			<groupId>com.alibaba</groupId>
 			<groupId>com.alibaba</groupId>
 			<artifactId>druid</artifactId>
 			<artifactId>druid</artifactId>
 		</dependency>
 		</dependency>
+		<dependency>
+			<groupId>com.itextpdf</groupId>
+			<artifactId>html2pdf</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.itextpdf</groupId>
+			<artifactId>font-asian</artifactId>
+		</dependency>
 	</dependencies>
 	</dependencies>
 
 
 	<build>
 	<build>
@@ -712,6 +721,16 @@
 				<artifactId>druid</artifactId>
 				<artifactId>druid</artifactId>
 				<version>1.1.21</version>
 				<version>1.1.21</version>
 			</dependency>
 			</dependency>
+			<dependency>
+				<groupId>com.itextpdf</groupId>
+				<artifactId>html2pdf</artifactId>
+				<version>2.1.6</version>
+			</dependency>
+			<dependency>
+				<groupId>com.itextpdf</groupId>
+				<artifactId>font-asian</artifactId>
+				<version>7.1.9</version>
+			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_base_core_project</artifactId>
 				<artifactId>x_base_core_project</artifactId>
@@ -802,6 +821,11 @@
 				<artifactId>x_processplatform_core_entity</artifactId>
 				<artifactId>x_processplatform_core_entity</artifactId>
 				<version>${project.version}</version>
 				<version>${project.version}</version>
 			</dependency>
 			</dependency>
+			<dependency>
+				<groupId>o2oa</groupId>
+				<artifactId>x_processplatform_core_express</artifactId>
+				<version>${project.version}</version>
+			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_query_core_entity</artifactId>
 				<artifactId>x_query_core_entity</artifactId>

+ 1 - 1
o2server/start_windows_debug.bat

@@ -144,5 +144,5 @@ if exist "%~dp0local\update" (
 	)
 	)
 )
 )
 @echo on
 @echo on
-"%~dp0jvm\windows\bin\java" -server -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=20000 -Xms2g -Xmx8g -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -jar "%~dp0console.jar"
+"%~dp0jvm\windows\bin\java" -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=20000 -Xms2g -Xmx8g -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -jar "%~dp0console.jar"
 pause
 pause

+ 1 - 0
o2server/store/.gitignore

@@ -0,0 +1 @@
+*.war

+ 24 - 0
o2server/store/jars/manifest.cfg

@@ -0,0 +1,24 @@
+x_attendance_core_entity.jar
+x_base_core_project.jar
+x_bbs_core_entity.jar
+x_calendar_core_entity.jar
+x_cms_core_entity.jar
+x_cms_core_express.jar
+x_component_core_entity.jar
+x_file_core_entity.jar
+x_general_core_entity.jar
+x_hotpic_core_entity.jar
+x_meeting_core_entity.jar
+x_message_core_entity.jar
+x_mind_core_entity.jar
+x_okr_core_entity.jar
+x_organization_core_entity.jar
+x_organization_core_express.jar
+x_portal_core_entity.jar
+x_processplatform_core_entity.jar
+x_processplatform_core_express.jar
+x_program_center_core_entity.jar
+x_query_core_entity.jar
+x_query_core_express.jar
+x_teamwork_core_entity.jar
+x_jpush_core_entity.jar

BIN
o2server/store/jars/x_attendance_core_entity.jar


BIN
o2server/store/jars/x_base_core_project.jar


BIN
o2server/store/jars/x_bbs_core_entity.jar


BIN
o2server/store/jars/x_calendar_core_entity.jar


BIN
o2server/store/jars/x_cms_core_entity.jar


BIN
o2server/store/jars/x_cms_core_express.jar


BIN
o2server/store/jars/x_component_core_entity.jar


BIN
o2server/store/jars/x_file_core_entity.jar


BIN
o2server/store/jars/x_general_core_entity.jar


BIN
o2server/store/jars/x_hotpic_core_entity.jar


BIN
o2server/store/jars/x_jpush_core_entity.jar


BIN
o2server/store/jars/x_meeting_core_entity.jar


BIN
o2server/store/jars/x_message_core_entity.jar


BIN
o2server/store/jars/x_mind_core_entity.jar


BIN
o2server/store/jars/x_okr_core_entity.jar


BIN
o2server/store/jars/x_organization_core_entity.jar


BIN
o2server/store/jars/x_organization_core_express.jar


BIN
o2server/store/jars/x_portal_core_entity.jar


BIN
o2server/store/jars/x_processplatform_core_entity.jar


BIN
o2server/store/jars/x_processplatform_core_express.jar


BIN
o2server/store/jars/x_program_center_core_entity.jar


BIN
o2server/store/jars/x_query_core_entity.jar


BIN
o2server/store/jars/x_query_core_express.jar


BIN
o2server/store/jars/x_teamwork_core_entity.jar


+ 28 - 0
o2server/store/manifest.cfg

@@ -0,0 +1,28 @@
+x_attendance_assemble_control.war
+x_bbs_assemble_control.war
+x_calendar_assemble_control.war
+x_cms_assemble_control.war
+x_component_assemble_control.war
+x_file_assemble_control.war
+x_general_assemble_control.war
+x_hotpic_assemble_control.war
+x_meeting_assemble_control.war
+x_message_assemble_communicate.war
+x_mind_assemble_control.war
+x_okr_assemble_control.war
+x_organization_assemble_authentication.war
+x_organization_assemble_control.war
+x_organization_assemble_express.war
+x_organization_assemble_personal.war
+x_portal_assemble_designer.war
+x_portal_assemble_surface.war
+x_processplatform_assemble_bam.war
+x_processplatform_assemble_designer.war
+x_processplatform_assemble_surface.war
+x_processplatform_service_processing.war
+x_program_center.war
+x_query_assemble_designer.war
+x_query_assemble_surface.war
+x_query_service_processing.war
+x_teamwork_assemble_control.war
+x_jpush_assemble_control.war

+ 1 - 1
o2server/version.o2

@@ -1 +1 @@
-2020-02-07 17:43:19
+2020-03-04 21:31:24

+ 22 - 12
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/factory/AttendanceSelfHolidayFactory.java

@@ -1,8 +1,12 @@
 package com.x.attendance.assemble.control.factory;
 package com.x.attendance.assemble.control.factory;
 
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import com.x.attendance.assemble.control.AbstractFactory;
+import com.x.attendance.assemble.control.Business;
+import com.x.attendance.assemble.control.jaxrs.selfholiday.WrapInFilter;
+import com.x.attendance.entity.AttendanceSelfHoliday;
+import com.x.attendance.entity.AttendanceSelfHoliday_;
+import com.x.base.core.project.exception.ExceptionWhen;
+import org.apache.commons.lang3.StringUtils;
 
 
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManager;
 import javax.persistence.Query;
 import javax.persistence.Query;
@@ -10,15 +14,9 @@ import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 import javax.persistence.criteria.Root;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.attendance.assemble.control.AbstractFactory;
-import com.x.attendance.assemble.control.Business;
-import com.x.attendance.assemble.control.jaxrs.selfholiday.WrapInFilter;
-import com.x.attendance.entity.AttendanceSelfHoliday;
-import com.x.attendance.entity.AttendanceSelfHoliday_;
-import com.x.base.core.project.exception.ExceptionWhen;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
 /**
 /**
  * 系统配置信息表基础功能服务类
  * 系统配置信息表基础功能服务类
  * @author liyi
  * @author liyi
@@ -57,6 +55,18 @@ public class AttendanceSelfHolidayFactory extends AbstractFactory {
 		return em.createQuery(cq.where(p)).getResultList();
 		return em.createQuery(cq.where(p)).getResultList();
 	}
 	}
 
 
+	public List<AttendanceSelfHoliday> listWithBatchFlag( String batchFlag ) throws Exception {
+		if( StringUtils.isEmpty( batchFlag )){
+			return null;
+		}
+		EntityManager em = this.entityManagerContainer().get(AttendanceSelfHoliday.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<AttendanceSelfHoliday> cq = cb.createQuery(AttendanceSelfHoliday.class);
+		Root<AttendanceSelfHoliday> root = cq.from(AttendanceSelfHoliday.class);
+		Predicate p = cb.equal( root.get(AttendanceSelfHoliday_.batchFlag), batchFlag );
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+
 	//@MethodDescribe("列示单个员工的AttendanceSelfHoliday信息列表")
 	//@MethodDescribe("列示单个员工的AttendanceSelfHoliday信息列表")
 	public List<String> getByEmployeeName(String empName) throws Exception {
 	public List<String> getByEmployeeName(String empName) throws Exception {
 		EntityManager em = this.entityManagerContainer().get(AttendanceSelfHoliday.class);
 		EntityManager em = this.entityManagerContainer().get(AttendanceSelfHoliday.class);

+ 12 - 20
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/jaxrs/attendancestatisticalcycle/ActionCycleDetail.java

@@ -1,18 +1,8 @@
 package com.x.attendance.assemble.control.jaxrs.attendancestatisticalcycle;
 package com.x.attendance.assemble.control.jaxrs.attendancestatisticalcycle;
 
 
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
+import com.alibaba.druid.util.StringUtils;
 import com.x.attendance.assemble.control.exception.PersonHasNoIdentityException;
 import com.x.attendance.assemble.control.exception.PersonHasNoIdentityException;
-import com.x.attendance.assemble.control.jaxrs.attendancestatisticalcycle.exception.ExceptionCanNotFindTopUnitNameByPerson;
-import com.x.attendance.assemble.control.jaxrs.attendancestatisticalcycle.exception.ExceptionCanNotFindUnitNameByPerson;
-import com.x.attendance.assemble.control.jaxrs.attendancestatisticalcycle.exception.ExceptionCycleMonthEmpty;
-import com.x.attendance.assemble.control.jaxrs.attendancestatisticalcycle.exception.ExceptionCycleYearEmpty;
-import com.x.attendance.assemble.control.jaxrs.attendancestatisticalcycle.exception.ExceptionGetTopUnitNameByPerson;
-import com.x.attendance.assemble.control.jaxrs.attendancestatisticalcycle.exception.ExceptionGetUnitNameByPerson;
-import com.x.attendance.assemble.control.jaxrs.attendancestatisticalcycle.exception.ExceptionStatisticCycleProcess;
+import com.x.attendance.assemble.control.jaxrs.attendancestatisticalcycle.exception.*;
 import com.x.attendance.assemble.control.service.AttendanceStatisticalCycleServiceAdv;
 import com.x.attendance.assemble.control.service.AttendanceStatisticalCycleServiceAdv;
 import com.x.attendance.entity.AttendanceStatisticalCycle;
 import com.x.attendance.entity.AttendanceStatisticalCycle;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.JpaObject;
@@ -23,6 +13,10 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.logger.LoggerFactory;
 
 
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+import java.util.Map;
+
 public class ActionCycleDetail extends BaseAction {
 public class ActionCycleDetail extends BaseAction {
 
 
 	private static  Logger logger = LoggerFactory.getLogger(ActionCycleDetail.class);
 	private static  Logger logger = LoggerFactory.getLogger(ActionCycleDetail.class);
@@ -53,11 +47,11 @@ public class ActionCycleDetail extends BaseAction {
 		}
 		}
 		if (check) {
 		if (check) {
 			try {
 			try {
+				logger.info("++++++++尝试获取人员的顶级组织:personName:" + effectivePerson.getDistinguishedName() );
 				topUnitName = userManagerService.getTopUnitNameWithPersonName(effectivePerson.getDistinguishedName());
 				topUnitName = userManagerService.getTopUnitNameWithPersonName(effectivePerson.getDistinguishedName());
-				if (topUnitName == null || topUnitName.isEmpty()) {
+				if ( StringUtils.isEmpty( topUnitName ) ) {
 					check = false;
 					check = false;
-					Exception exception = new ExceptionCanNotFindTopUnitNameByPerson(
-							effectivePerson.getDistinguishedName());
+					Exception exception = new ExceptionCanNotFindTopUnitNameByPerson( effectivePerson.getDistinguishedName());
 					result.error(exception);
 					result.error(exception);
 				}
 				}
 			} catch (PersonHasNoIdentityException e) {
 			} catch (PersonHasNoIdentityException e) {
@@ -74,10 +68,9 @@ public class ActionCycleDetail extends BaseAction {
 		if (check) {
 		if (check) {
 			try {
 			try {
 				unitName = userManagerService.getUnitNameWithPersonName(effectivePerson.getDistinguishedName());
 				unitName = userManagerService.getUnitNameWithPersonName(effectivePerson.getDistinguishedName());
-				if (unitName == null || unitName.isEmpty()) {
+				if ( StringUtils.isEmpty( unitName ) ) {
 					check = false;
 					check = false;
-					Exception exception = new ExceptionCanNotFindUnitNameByPerson(
-							effectivePerson.getDistinguishedName());
+					Exception exception = new ExceptionCanNotFindUnitNameByPerson( effectivePerson.getDistinguishedName());
 					result.error(exception);
 					result.error(exception);
 				}
 				}
 			} catch (PersonHasNoIdentityException e) {
 			} catch (PersonHasNoIdentityException e) {
@@ -93,8 +86,7 @@ public class ActionCycleDetail extends BaseAction {
 		}
 		}
 		if (check) {
 		if (check) {
 			try {
 			try {
-				allCycleMap = attendanceStatisticalCycleServiceAdv
-						.getCycleMapFormAllCycles(effectivePerson.getDebugger());
+				allCycleMap = attendanceStatisticalCycleServiceAdv.getCycleMapFormAllCycles(effectivePerson.getDebugger());
 			} catch (Exception e) {
 			} catch (Exception e) {
 				check = false;
 				check = false;
 				Exception exception = new ExceptionStatisticCycleProcess(e, "系统在查询并且组织所有的统计周期时发生异常.");
 				Exception exception = new ExceptionStatisticCycleProcess(e, "系统在查询并且组织所有的统计周期时发生异常.");

+ 68 - 37
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/jaxrs/selfholiday/ActionSave.java

@@ -1,10 +1,5 @@
 package com.x.attendance.assemble.control.jaxrs.selfholiday;
 package com.x.attendance.assemble.control.jaxrs.selfholiday;
 
 
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
 import com.google.gson.JsonElement;
 import com.google.gson.JsonElement;
 import com.x.attendance.assemble.control.ExceptionWrapInConvert;
 import com.x.attendance.assemble.control.ExceptionWrapInConvert;
 import com.x.attendance.assemble.control.jaxrs.selfholiday.exception.ExceptionSelfHolidayProcess;
 import com.x.attendance.assemble.control.jaxrs.selfholiday.exception.ExceptionSelfHolidayProcess;
@@ -12,24 +7,31 @@ import com.x.attendance.entity.AttendanceSelfHoliday;
 import com.x.attendance.entity.AttendanceStatisticalCycle;
 import com.x.attendance.entity.AttendanceStatisticalCycle;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.annotation.CheckPersistType;
 import com.x.base.core.entity.annotation.CheckPersistType;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.entity.annotation.CheckRemoveType;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
 import com.x.base.core.project.jaxrs.WoId;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.tools.ListTools;
+import org.apache.commons.lang3.StringUtils;
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+import java.util.Map;
 
 
 public class ActionSave extends BaseAction {
 public class ActionSave extends BaseAction {
 	
 	
 	private static  Logger logger = LoggerFactory.getLogger( ActionSave.class );
 	private static  Logger logger = LoggerFactory.getLogger( ActionSave.class );
 	
 	
 	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement ) throws Exception {
 	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement ) throws Exception {
+		logger.info("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" );
+		logger.info("++++++++++++++++++++++调用接口:com.x.attendance.assemble.control.jaxrs.selfholiday.ActionSave......" );
 		ActionResult<Wo> result = new ActionResult<>();
 		ActionResult<Wo> result = new ActionResult<>();
 		Wi wrapIn = null;
 		Wi wrapIn = null;
+		List<AttendanceSelfHoliday> holidayList = null;
 		Map<String, Map<String, List<AttendanceStatisticalCycle>>> topUnitAttendanceStatisticalCycleMap = null;
 		Map<String, Map<String, List<AttendanceStatisticalCycle>>> topUnitAttendanceStatisticalCycleMap = null;
+
 		//获取到当前用户信息
 		//获取到当前用户信息
 		EffectivePerson currentPerson = this.effectivePerson(request);
 		EffectivePerson currentPerson = this.effectivePerson(request);
 		Boolean check = true;
 		Boolean check = true;
@@ -45,40 +47,62 @@ public class ActionSave extends BaseAction {
 		
 		
 		if( check ){
 		if( check ){
 			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-				AttendanceSelfHoliday _attendanceSelfHoliday = null;
-				AttendanceSelfHoliday attendanceSelfHoliday = new AttendanceSelfHoliday();
-				if( wrapIn != null && wrapIn.getId() !=null && wrapIn.getId().length() > 10 ){
-					
-					if( wrapIn.getId() !=null && wrapIn.getId().length() > 10 ){
+				AttendanceSelfHoliday attendanceSelfHoliday = null;
+//				AttendanceSelfHoliday attendanceSelfHoliday = new AttendanceSelfHoliday();
+
+				if( wrapIn != null && StringUtils.isNoneEmpty( wrapIn.getEmployeeName() )
+						&& StringUtils.isNoneEmpty( wrapIn.getEmployeeNumber() )
+						&& StringUtils.isNoneEmpty( wrapIn.getLeaveType() )
+						&& wrapIn.getStartTime() != null
+						&& wrapIn.getEndTime() != null
+				){
+					emc.beginTransaction( AttendanceSelfHoliday.class );
+					//先根据batchFlag删除原来的数据,然后再进行新数据的保存
+					if(StringUtils.isNotEmpty( wrapIn.getBatchFlag() ) ){
+						holidayList = attendanceSelfHolidayServiceAdv.listWithBatchFlag( wrapIn.getBatchFlag() );
+						if(ListTools.isNotEmpty( holidayList )){
+							logger.info("++++++++先根据batchFlag删除原来的数据,然后再进行新数据的保存+++++++++" );
+							for( AttendanceSelfHoliday holiday : holidayList ){
+								emc.remove( emc.find(holiday.getId(), AttendanceSelfHoliday.class ), CheckRemoveType.all );
+							}
+							logger.info("++++++++删除" + holidayList.size() + "条旧请假信息数据。" );
+						}
+					}
+
+					if(StringUtils.isNotEmpty( wrapIn.getId() ) ){
 						//根据ID查询信息是否存在,如果存在就update,如果不存在就create
 						//根据ID查询信息是否存在,如果存在就update,如果不存在就create
-						_attendanceSelfHoliday = emc.find( wrapIn.getId(), AttendanceSelfHoliday.class );
-						if( _attendanceSelfHoliday != null ){
-							//更新
-							emc.beginTransaction( AttendanceSelfHoliday.class );
-							Wi.copier.copy( wrapIn, _attendanceSelfHoliday );
-							emc.check( _attendanceSelfHoliday, CheckPersistType.all);	
-							emc.commit();
-							result.setData( new Wo( _attendanceSelfHoliday.getId() ) );
+						attendanceSelfHoliday = emc.find( wrapIn.getId(), AttendanceSelfHoliday.class );
+						if( attendanceSelfHoliday != null ){
+							//更新已经存在的信息
+							wrapIn.copyTo( attendanceSelfHoliday );
+							attendanceSelfHoliday.setBatchFlag(wrapIn.getBatchFlag());
+							logger.info("++++++++更新:gson.toJson( attendanceSelfHoliday ) = " + gson.toJson( attendanceSelfHoliday ) );
+							emc.check( attendanceSelfHoliday, CheckPersistType.all);
 						}else{
 						}else{
-							emc.beginTransaction( AttendanceSelfHoliday.class );
-							Wi.copier.copy( wrapIn, attendanceSelfHoliday );
-							attendanceSelfHoliday.setId( wrapIn.getId() );//使用参数传入的ID作为记录的ID
-							emc.persist( attendanceSelfHoliday, CheckPersistType.all);	
-							emc.commit();
-							result.setData( new Wo( attendanceSelfHoliday.getId() ) );
+							attendanceSelfHoliday = new AttendanceSelfHoliday();
+							wrapIn.copyTo( attendanceSelfHoliday );
+							//使用参数传入的ID作为记录的ID
+							attendanceSelfHoliday.setId( wrapIn.getId() );
+							attendanceSelfHoliday.setBatchFlag(wrapIn.getBatchFlag());
+							logger.info("++++++++新增:gson.toJson( attendanceSelfHoliday ) = " + gson.toJson( attendanceSelfHoliday ) );
+							emc.persist( attendanceSelfHoliday, CheckPersistType.all);
 						}
 						}
 					}else{
 					}else{
 						//没有传入指定的ID
 						//没有传入指定的ID
-						emc.beginTransaction( AttendanceSelfHoliday.class );
-						Wi.copier.copy( wrapIn, attendanceSelfHoliday );
-						emc.persist( attendanceSelfHoliday, CheckPersistType.all);	
-						emc.commit();
+						attendanceSelfHoliday = new AttendanceSelfHoliday();
+
+						wrapIn.copyTo( attendanceSelfHoliday );
+						attendanceSelfHoliday.setBatchFlag(wrapIn.getBatchFlag());
+						logger.info("++++++++新增,无ID:gson.toJson( attendanceSelfHoliday ) = " + gson.toJson( attendanceSelfHoliday ) );
+						emc.persist( attendanceSelfHoliday, CheckPersistType.all);
 						result.setData( new Wo( attendanceSelfHoliday.getId() ) );
 						result.setData( new Wo( attendanceSelfHoliday.getId() ) );
 					}
 					}
+					emc.commit();
+					result.setData( new Wo( attendanceSelfHoliday.getId() ) );
 					
 					
 					//根据员工休假数据来记录与这条数据相关的统计需求记录
 					//根据员工休假数据来记录与这条数据相关的统计需求记录
 					//new AttendanceDetailAnalyseService().recordStatisticRequireLog( attendanceSelfHoliday );
 					//new AttendanceDetailAnalyseService().recordStatisticRequireLog( attendanceSelfHoliday );
-					
+					logger.info("++++++++休假数据有变动,对该员工的该请假时间内的所有打卡记录进行分析......" );
 					//休假数据有更新,对该员工的该请假时间内的所有打卡记录进行分析
 					//休假数据有更新,对该员工的该请假时间内的所有打卡记录进行分析
 					List<String> ids = attendanceDetailAnalyseServiceAdv.getAnalyseAttendanceDetailIds( attendanceSelfHoliday.getEmployeeName(), attendanceSelfHoliday.getStartTime(), attendanceSelfHoliday.getEndTime() );
 					List<String> ids = attendanceDetailAnalyseServiceAdv.getAnalyseAttendanceDetailIds( attendanceSelfHoliday.getEmployeeName(), attendanceSelfHoliday.getStartTime(), attendanceSelfHoliday.getEndTime() );
 					if( ids != null && ids.size() > 0 ){
 					if( ids != null && ids.size() > 0 ){
@@ -91,6 +115,17 @@ public class ActionSave extends BaseAction {
 						}
 						}
 						attendanceDetailAnalyseServiceAdv.analyseAttendanceDetails( attendanceSelfHoliday.getEmployeeName(), attendanceSelfHoliday.getStartTime(), attendanceSelfHoliday.getEndTime(), topUnitAttendanceStatisticalCycleMap, effectivePerson.getDebugger()  );
 						attendanceDetailAnalyseServiceAdv.analyseAttendanceDetails( attendanceSelfHoliday.getEmployeeName(), attendanceSelfHoliday.getStartTime(), attendanceSelfHoliday.getEndTime(), topUnitAttendanceStatisticalCycleMap, effectivePerson.getDebugger()  );
 					}
 					}
+				}else{
+					if( jsonElement == null ){
+						logger.info("++++++++传入的员工请假信息JSON数据为空......" );
+						Exception exception = new ExceptionSelfHolidayProcess( "传入的员工请假信息JSON数据为空,无法保存数据信息,请检查数据内容!" );
+						result.error( exception );
+					}else {
+						logger.info("++++++++传入的数据不符合请假数据接口要求......" );
+						Exception exception = new ExceptionSelfHolidayProcess( "传入的数据不符合请假数据接口要求,请检查数据内容:" + jsonElement.getAsString() );
+						result.error( exception );
+					}
+
 				}
 				}
 			} catch ( Exception e ) {
 			} catch ( Exception e ) {
 				Exception exception = new ExceptionSelfHolidayProcess( e, "系统在保存员工请假记录信息时发生异常." );
 				Exception exception = new ExceptionSelfHolidayProcess( e, "系统在保存员工请假记录信息时发生异常." );
@@ -98,16 +133,12 @@ public class ActionSave extends BaseAction {
 				logger.error( e, currentPerson, request, null);
 				logger.error( e, currentPerson, request, null);
 			}
 			}
 		}
 		}
+		logger.info("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" );
 		return result;
 		return result;
 	}
 	}
 	
 	
 	public static class Wi extends AttendanceSelfHoliday {
 	public static class Wi extends AttendanceSelfHoliday {
-		
 		private static final long serialVersionUID = -5076990764713538973L;
 		private static final long serialVersionUID = -5076990764713538973L;
-		
-		public static WrapCopier< Wi, AttendanceSelfHoliday > copier = 
-				WrapCopierFactory.wi( Wi.class, AttendanceSelfHoliday.class, null, JpaObject.FieldsUnmodify );
-		
 	}
 	}
 	
 	
 	public static class Wo extends WoId {
 	public static class Wo extends WoId {

+ 2 - 1
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/jaxrs/selfholiday/BaseAction.java

@@ -1,6 +1,7 @@
 package com.x.attendance.assemble.control.jaxrs.selfholiday;
 package com.x.attendance.assemble.control.jaxrs.selfholiday;
 
 
 import com.x.attendance.assemble.control.service.AttendanceDetailAnalyseServiceAdv;
 import com.x.attendance.assemble.control.service.AttendanceDetailAnalyseServiceAdv;
+import com.x.attendance.assemble.control.service.AttendanceSelfHolidayServiceAdv;
 import com.x.attendance.assemble.control.service.AttendanceStatisticalCycleServiceAdv;
 import com.x.attendance.assemble.control.service.AttendanceStatisticalCycleServiceAdv;
 import com.x.attendance.assemble.control.service.UserManagerService;
 import com.x.attendance.assemble.control.service.UserManagerService;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
@@ -10,5 +11,5 @@ public class BaseAction extends StandardJaxrsAction{
 	protected UserManagerService userManagerService = new UserManagerService();
 	protected UserManagerService userManagerService = new UserManagerService();
 	protected AttendanceStatisticalCycleServiceAdv attendanceStatisticCycleServiceAdv = new AttendanceStatisticalCycleServiceAdv();
 	protected AttendanceStatisticalCycleServiceAdv attendanceStatisticCycleServiceAdv = new AttendanceStatisticalCycleServiceAdv();
 	protected AttendanceDetailAnalyseServiceAdv attendanceDetailAnalyseServiceAdv = new AttendanceDetailAnalyseServiceAdv();
 	protected AttendanceDetailAnalyseServiceAdv attendanceDetailAnalyseServiceAdv = new AttendanceDetailAnalyseServiceAdv();
-	
+	protected AttendanceSelfHolidayServiceAdv attendanceSelfHolidayServiceAdv = new AttendanceSelfHolidayServiceAdv();
 }
 }

+ 3 - 0
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/jaxrs/selfholiday/exception/ExceptionSelfHolidayProcess.java

@@ -9,4 +9,7 @@ public class ExceptionSelfHolidayProcess extends PromptException {
 	public ExceptionSelfHolidayProcess( Throwable e, String message ) {
 	public ExceptionSelfHolidayProcess( Throwable e, String message ) {
 		super("用户在进行考勤统计处理时发生异常!message:" + message, e );
 		super("用户在进行考勤统计处理时发生异常!message:" + message, e );
 	}
 	}
+	public ExceptionSelfHolidayProcess( String message ) {
+		super( message );
+	}
 }
 }

+ 5 - 8
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceDetailAnalyseServiceAdv.java

@@ -1,17 +1,13 @@
 package com.x.attendance.assemble.control.service;
 package com.x.attendance.assemble.control.service;
 
 
+import com.x.attendance.entity.*;
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
-import com.x.attendance.entity.AttendanceDetail;
-import com.x.attendance.entity.AttendanceScheduleSetting;
-import com.x.attendance.entity.AttendanceSelfHoliday;
-import com.x.attendance.entity.AttendanceStatisticalCycle;
-import com.x.attendance.entity.AttendanceWorkDayConfig;
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-
 /**
 /**
  * 考勤打卡记录分析服务类
  * 考勤打卡记录分析服务类
  * @author LIYI
  * @author LIYI
@@ -54,4 +50,5 @@ public class AttendanceDetailAnalyseServiceAdv {
 			throw e;
 			throw e;
 		}
 		}
 	}
 	}
+
 }
 }

+ 7 - 2
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceSelfHolidayService.java

@@ -1,11 +1,11 @@
 package com.x.attendance.assemble.control.service;
 package com.x.attendance.assemble.control.service;
 
 
-import java.util.List;
-
 import com.x.attendance.assemble.control.Business;
 import com.x.attendance.assemble.control.Business;
 import com.x.attendance.entity.AttendanceSelfHoliday;
 import com.x.attendance.entity.AttendanceSelfHoliday;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.EntityManagerContainer;
 
 
+import java.util.List;
+
 
 
 public class AttendanceSelfHolidayService {
 public class AttendanceSelfHolidayService {
 
 
@@ -33,4 +33,9 @@ public class AttendanceSelfHolidayService {
 		Business business =  new Business( emc );
 		Business business =  new Business( emc );
 		return business.getAttendanceSelfHolidayFactory().getByPersonName( personName );
 		return business.getAttendanceSelfHolidayFactory().getByPersonName( personName );
 	}
 	}
+
+	public List<AttendanceSelfHoliday> listWithBatchFlag(EntityManagerContainer emc, String batchFlag) throws Exception {
+		Business business = new Business(emc);
+		return business.getAttendanceSelfHolidayFactory().listWithBatchFlag( batchFlag );
+	}
 }
 }

+ 10 - 2
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceSelfHolidayServiceAdv.java

@@ -1,11 +1,11 @@
 package com.x.attendance.assemble.control.service;
 package com.x.attendance.assemble.control.service;
 
 
-import java.util.List;
-
 import com.x.attendance.entity.AttendanceSelfHoliday;
 import com.x.attendance.entity.AttendanceSelfHoliday;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 
 
+import java.util.List;
+
 
 
 public class AttendanceSelfHolidayServiceAdv {
 public class AttendanceSelfHolidayServiceAdv {
 	
 	
@@ -41,6 +41,14 @@ public class AttendanceSelfHolidayServiceAdv {
 		}
 		}
 	}
 	}
 
 
+	public List<AttendanceSelfHoliday> listWithBatchFlag( String batchFlag) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return attendanceSelfHolidayService.listWithBatchFlag( emc, batchFlag );
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
 	public List<String> getByPersonName(String personName) throws Exception {
 	public List<String> getByPersonName(String personName) throws Exception {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			return attendanceSelfHolidayService.getByPersonName( emc, personName );
 			return attendanceSelfHolidayService.getByPersonName( emc, personName );

+ 4 - 5
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/UserManagerService.java

@@ -1,15 +1,14 @@
 package com.x.attendance.assemble.control.service;
 package com.x.attendance.assemble.control.service;
 
 
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-
 import com.x.attendance.assemble.control.Business;
 import com.x.attendance.assemble.control.Business;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.project.organization.Person;
 import com.x.base.core.project.organization.Person;
 import com.x.base.core.project.organization.Unit;
 import com.x.base.core.project.organization.Unit;
 import com.x.base.core.project.tools.ListTools;
 import com.x.base.core.project.tools.ListTools;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.List;
 
 
 /**
 /**
  * 用户组织顶层组织信息管理服务类
  * 用户组织顶层组织信息管理服务类
@@ -117,7 +116,7 @@ public class UserManagerService {
 	
 	
 	/**
 	/**
 	 * 根据员工姓名获取顶层组织名称,多个身份只取第一个身份
 	 * 根据员工姓名获取顶层组织名称,多个身份只取第一个身份
-	 * @param employeeName
+	 * @param personName
 	 * @return
 	 * @return
 	 * @throws Exception 
 	 * @throws Exception 
 	 */
 	 */

+ 12 - 18
o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceSelfHoliday.java

@@ -1,29 +1,14 @@
 package com.x.attendance.entity;
 package com.x.attendance.entity;
 
 
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Inheritance;
-import javax.persistence.InheritanceType;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.UniqueConstraint;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.openjpa.persistence.jdbc.Index;
-
 import com.x.base.core.entity.AbstractPersistenceProperties;
 import com.x.base.core.entity.AbstractPersistenceProperties;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
 import com.x.base.core.entity.annotation.CheckPersist;
 import com.x.base.core.entity.annotation.ContainerEntity;
 import com.x.base.core.entity.annotation.ContainerEntity;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.base.core.project.tools.DateTools;
+
+import javax.persistence.*;
+import java.util.Date;
 
 
 @ContainerEntity
 @ContainerEntity
 @Entity
 @Entity
@@ -126,6 +111,15 @@ public class AttendanceSelfHoliday extends SliceJpaObject {
 	@CheckPersist(allowEmpty = true)
 	@CheckPersist(allowEmpty = true)
 	private String description;
 	private String description;
 
 
+	@FieldDescribe("录入批次标识:可以填写流程workId,jobId, CMS的文档ID,或者自定义信息,数据保存时会先根据batchFlag做删除,然后再保存新的数据")
+	@Column(name = "xbatchFlag", length = JpaObject.length_id)
+	@CheckPersist(allowEmpty = true)
+	private String batchFlag;
+
+	public String getBatchFlag() { return this.batchFlag; }
+
+	public void setBatchFlag(final String batchFlag) { this.batchFlag = batchFlag; }
+
 	public String getUnitName() {
 	public String getUnitName() {
 		return unitName;
 		return unitName;
 	}
 	}

+ 42 - 2
o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java

@@ -470,6 +470,19 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		return list;
 		return list;
 	}
 	}
 
 
+	public <T extends JpaObject, W extends Object> List<T> listEqualAndNotIn(Class<T> cls, String attribute,
+			Object value, String otherAttribute, Collection<W> otherValues) throws Exception {
+		EntityManager em = this.get(cls);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<T> cq = cb.createQuery(cls);
+		Root<T> root = cq.from(cls);
+		Predicate p = cb.equal(root.get(attribute), value);
+		p = cb.and(p, cb.isNotMember(root.get(otherAttribute), cb.literal(otherValues)));
+		List<T> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		List<T> list = new ArrayList<>(os);
+		return list;
+	}
+
 	public <T extends JpaObject, W extends Object> List<T> listEqualAndEqualAndIn(Class<T> cls, String firstAttribute,
 	public <T extends JpaObject, W extends Object> List<T> listEqualAndEqualAndIn(Class<T> cls, String firstAttribute,
 			Object firstValue, String secondAttribute, Object secondValue, String thirdAttribute,
 			Object firstValue, String secondAttribute, Object secondValue, String thirdAttribute,
 			Collection<W> thirdValues) throws Exception {
 			Collection<W> thirdValues) throws Exception {
@@ -485,6 +498,21 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		return list;
 		return list;
 	}
 	}
 
 
+	public <T extends JpaObject, W extends Object> List<T> listEqualAndEqualAndNotIn(Class<T> cls,
+			String firstAttribute, Object firstValue, String secondAttribute, Object secondValue, String thirdAttribute,
+			Collection<W> thirdValues) throws Exception {
+		EntityManager em = this.get(cls);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<T> cq = cb.createQuery(cls);
+		Root<T> root = cq.from(cls);
+		Predicate p = cb.equal(root.get(firstAttribute), firstValue);
+		p = cb.and(p, cb.equal(root.get(secondAttribute), secondValue));
+		p = cb.and(p, cb.isNotMember(root.get(thirdAttribute), cb.literal(thirdValues)));
+		List<T> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		List<T> list = new ArrayList<>(os);
+		return list;
+	}
+
 	public <T extends JpaObject, W extends Object> List<T> listEqualAndInAndNotEqual(Class<T> cls,
 	public <T extends JpaObject, W extends Object> List<T> listEqualAndInAndNotEqual(Class<T> cls,
 			String firstAttribute, Object firstValue, String secondAttribute, Collection<W> secondValues,
 			String firstAttribute, Object firstValue, String secondAttribute, Collection<W> secondValues,
 			String thirdAttribute, Object thirdValue) throws Exception {
 			String thirdAttribute, Object thirdValue) throws Exception {
@@ -577,6 +605,18 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		return os.isEmpty() ? null : os.get(0);
 		return os.isEmpty() ? null : os.get(0);
 	}
 	}
 
 
+	public <T extends JpaObject> T firstEqualAndEqualAndEqual(Class<T> cls, String attribute, Object value,
+			String otherAttribute, Object otherValue, String thirdAttribute, Object thirdValue) 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.and(cb.equal(root.get(attribute), value),
+				cb.equal(root.get(otherAttribute), otherValue), cb.equal(root.get(thirdAttribute), thirdValue)));
+		List<T> os = em.createQuery(cq).setMaxResults(1).getResultList();
+		return os.isEmpty() ? null : os.get(0);
+	}
+
 	public <T extends JpaObject> Long count(Class<T> cls) throws Exception {
 	public <T extends JpaObject> Long count(Class<T> cls) throws Exception {
 		EntityManager em = this.get(cls);
 		EntityManager em = this.get(cls);
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaBuilder cb = em.getCriteriaBuilder();
@@ -1059,8 +1099,7 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 	}
 	}
 
 
 	/* 仅在单一数据库可用 */
 	/* 仅在单一数据库可用 */
-	public <T extends JpaObject> List<T> fetch(Class<T> clz, Predicate predicate)
-			throws Exception {
+	public <T extends JpaObject> List<T> fetch(Class<T> clz, Predicate predicate) throws Exception {
 		List<T> os = fetch(clz, JpaObject.singularAttributeField(clz, true, true), predicate);
 		List<T> os = fetch(clz, JpaObject.singularAttributeField(clz, true, true), predicate);
 		return os;
 		return os;
 	}
 	}
@@ -1784,4 +1823,5 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		return list;
 		return list;
 	}
 	}
 
 
+
 }
 }

+ 4 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainerBasic.java

@@ -12,6 +12,7 @@ import javax.persistence.FlushModeType;
 
 
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.JpaObject;
+import com.x.base.core.entity.JsonProperties;
 
 
 public abstract class EntityManagerContainerBasic implements AutoCloseable {
 public abstract class EntityManagerContainerBasic implements AutoCloseable {
 
 
@@ -152,6 +153,9 @@ public abstract class EntityManagerContainerBasic implements AutoCloseable {
 		if (field.getType().isEnum()) {
 		if (field.getType().isEnum()) {
 			return FieldType.enumValue;
 			return FieldType.enumValue;
 		}
 		}
+		if (JsonProperties.class.isAssignableFrom(field.getType())) {
+			return FieldType.JsonPropertiesValue;
+		}
 		throw new Exception("unknow filed type{name:" + field.getName() + "}.");
 		throw new Exception("unknow filed type{name:" + field.getName() + "}.");
 	}
 	}
 }
 }

+ 3 - 1
o2server/x_base_core_project/src/main/java/com/x/base/core/container/FieldType.java

@@ -18,5 +18,7 @@ public enum FieldType {
 	/* byte */
 	/* byte */
 	byteValueArray,
 	byteValueArray,
 	/* enum */
 	/* enum */
-	enumValue;
+	enumValue,
+	/* JsonProperties */
+	JsonPropertiesValue;
 }
 }

+ 5 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/JpaObject.java

@@ -82,6 +82,8 @@ public abstract class JpaObject extends GsonPropertyObject implements Serializab
 
 
 	public static final String scratchInteger_FIELDNAME = "scratchInteger";
 	public static final String scratchInteger_FIELDNAME = "scratchInteger";
 
 
+	public static final String JsonPropertiesValueHandler = "com.x.base.core.entity.annotation.JsonPropertiesValueHandler";
+
 	public static final List<String> FieldsUnmodify = ListUtils.unmodifiableList(Arrays.asList(id_FIELDNAME,
 	public static final List<String> FieldsUnmodify = ListUtils.unmodifiableList(Arrays.asList(id_FIELDNAME,
 			distributeFactor_FIELDNAME, createTime_FIELDNAME, updateTime_FIELDNAME, sequence_FIELDNAME,
 			distributeFactor_FIELDNAME, createTime_FIELDNAME, updateTime_FIELDNAME, sequence_FIELDNAME,
 			scratchString_FIELDNAME, scratchBoolean_FIELDNAME, scratchDate_FIELDNAME, scratchInteger_FIELDNAME));
 			scratchString_FIELDNAME, scratchBoolean_FIELDNAME, scratchDate_FIELDNAME, scratchInteger_FIELDNAME));
@@ -353,4 +355,7 @@ public abstract class JpaObject extends GsonPropertyObject implements Serializab
 		return t;
 		return t;
 	}
 	}
 
 
+	public abstract static class EntityProperties {
+	}
+
 }
 }

+ 19 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/JsonProperties.java

@@ -0,0 +1,19 @@
+package com.x.base.core.entity;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.x.base.core.project.gson.GsonPropertyObject;
+
+public abstract class JsonProperties extends GsonPropertyObject {
+
+	public boolean equals(Object o) {
+		if (null == o) {
+			return false;
+		}
+		if (!(o instanceof JsonProperties)) {
+			return false;
+		} else {
+			return StringUtils.equals(this.toString(), o.toString());
+		}
+	}
+}

+ 6 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/StorageObject.java

@@ -271,6 +271,10 @@ public abstract class StorageObject extends SliceJpaObject {
 					+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
 					+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
 					+ mapping.getPort();
 					+ mapping.getPort();
 			break;
 			break;
+		case file:
+			// [file://] absolute-path
+			prefix = "file://";
+			break;
 		default:
 		default:
 			break;
 			break;
 		}
 		}
@@ -330,6 +334,8 @@ public abstract class StorageObject extends SliceJpaObject {
 			webdavBuilder.setUrlCharset(opts, DefaultCharset.name);
 			webdavBuilder.setUrlCharset(opts, DefaultCharset.name);
 			// webdavBuilder.setVersioning(opts, true);
 			// webdavBuilder.setVersioning(opts, true);
 			break;
 			break;
+		case file:
+			break;
 		default:
 		default:
 			break;
 			break;
 		}
 		}

+ 1 - 1
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/StorageProtocol.java

@@ -1,6 +1,6 @@
 package com.x.base.core.entity;
 package com.x.base.core.entity;
 
 
 public enum StorageProtocol {
 public enum StorageProtocol {
-	ftp, ftps, webdav, cifs;
+	ftp, ftps, webdav, cifs, file;
 	public static final int length = JpaObject.length_16B;
 	public static final int length = JpaObject.length_16B;
 }
 }

+ 81 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/annotation/JsonPropertiesValueHandler.java

@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.x.base.core.entity.annotation;
+
+import org.apache.openjpa.jdbc.identifier.DBIdentifier;
+import org.apache.openjpa.jdbc.kernel.JDBCStore;
+import org.apache.openjpa.jdbc.meta.ValueMapping;
+import org.apache.openjpa.jdbc.meta.strats.AbstractValueHandler;
+import org.apache.openjpa.jdbc.schema.Column;
+import org.apache.openjpa.jdbc.schema.ColumnIO;
+import org.apache.openjpa.jdbc.sql.DBDictionary;
+import org.apache.openjpa.meta.JavaTypes;
+import org.apache.openjpa.util.InternalException;
+
+import com.google.gson.Gson;
+import com.x.base.core.project.gson.XGsonBuilder;
+
+public class JsonPropertiesValueHandler extends AbstractValueHandler {
+
+	private static final long serialVersionUID = 1L;
+	private static final String PROXY_SUFFIX = "$proxy";
+
+	private Gson gson = XGsonBuilder.instance();
+
+	/**
+	 * @deprecated
+	 */
+	@Deprecated
+	@Override
+	public Column[] map(ValueMapping vm, String name, ColumnIO io, boolean adapt) {
+		DBDictionary dict = vm.getMappingRepository().getDBDictionary();
+		DBIdentifier colName = DBIdentifier.newColumn(name, dict != null ? dict.delimitAll() : false);
+		return map(vm, colName, io, adapt);
+	}
+
+	public Column[] map(ValueMapping vm, DBIdentifier name, ColumnIO io, boolean adapt) {
+		Column col = new Column();
+		col.setIdentifier(name);
+		col.setJavaType(JavaTypes.STRING);
+		col.setSize(-1);
+		return new Column[] { col };
+	}
+
+	@Override
+	public Object toDataStoreValue(ValueMapping vm, Object val, JDBCStore store) {
+		// check for null value.
+		if (val == null) {
+			return null;
+		}
+		return gson.toJson(val);
+	}
+
+	@Override
+	public Object toObjectValue(ValueMapping vm, Object val) {
+		if (val == null)
+			return null;
+		try {
+			String className = vm.getDeclaredType().getName();
+			Class<?> cls = Class.forName(className);
+			return gson.fromJson(val.toString(), cls);
+		} catch (ClassNotFoundException e) {
+			throw new InternalException(e);
+		}
+	}
+}

+ 8 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dataitem/ItemType.java

@@ -3,6 +3,14 @@ package com.x.base.core.entity.dataitem;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.JpaObject;
 
 
 public enum ItemType {
 public enum ItemType {
+	/*
+	 * JSONElement的类型,
+	 * 2020年3月11日: Simon Wu
+	 * o:JsonObject
+	 * a:JsonArray
+	 * p:JsonPrimitive 基本类型
+	 * n:JsonNull
+	 * */
 	o, a, p, n;
 	o, a, p, n;
 	public static final int length = JpaObject.length_1B;
 	public static final int length = JpaObject.length_1B;
 }
 }

+ 4 - 4
o2server/x_base_core_project/src/main/java/com/x/base/core/project/AbstractContext.java

@@ -10,10 +10,10 @@ public abstract class AbstractContext {
 
 
 	public abstract Applications applications() throws Exception;
 	public abstract Applications applications() throws Exception;
 
 
-	protected static String getName(Class<?> clz) throws Exception {
-		Module module = clz.getAnnotation(Module.class);
-		return module.name();
-	}
+//	protected static String getName(Class<?> clz) throws Exception {
+//		Module module = clz.getAnnotation(Module.class);
+//		return module.name();
+//	}
 
 
 	/* 应用类 */
 	/* 应用类 */
 	protected Class<?> clazz;
 	protected Class<?> clazz;

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

@@ -282,6 +282,17 @@ public class Applications extends ConcurrentHashMap<String, CopyOnWriteArrayList
 		return null;
 		return null;
 	}
 	}
 
 
+	public Application findOneAppByNode(String node) throws Exception {
+		for(List<Application> apps : this.values()){
+			for (Application app : apps){
+				if(app.getNode().equals(node)){
+					return app;
+				}
+			}
+		}
+		return null;
+	}
+
 	public Application randomWithWeight(String className) throws Exception {
 	public Application randomWithWeight(String className) throws Exception {
 		List<Application> list = this.get(className);
 		List<Application> list = this.get(className);
 		if (ListTools.isNotEmpty(list)) {
 		if (ListTools.isNotEmpty(list)) {

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

@@ -195,7 +195,7 @@ public class Context extends AbstractContext {
 		context.contextPath = servletContext.getContextPath();
 		context.contextPath = servletContext.getContextPath();
 		context.clazz = Class.forName(servletContext.getInitParameter(INITPARAMETER_PORJECT));
 		context.clazz = Class.forName(servletContext.getInitParameter(INITPARAMETER_PORJECT));
 		context.module = context.clazz.getAnnotation(Module.class);
 		context.module = context.clazz.getAnnotation(Module.class);
-		context.name = getName(context.clazz);
+		context.name = context.module.name();
 		context.path = servletContext.getRealPath("");
 		context.path = servletContext.getRealPath("");
 		context.servletContext = servletContext;
 		context.servletContext = servletContext;
 		context.servletContextName = servletContext.getServletContextName();
 		context.servletContextName = servletContext.getServletContextName();

+ 12 - 13
o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/CreateConfigSample.java

@@ -16,7 +16,6 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.reflect.FieldUtils;
 import org.apache.commons.lang3.reflect.FieldUtils;
 import org.apache.commons.lang3.reflect.MethodUtils;
 import org.apache.commons.lang3.reflect.MethodUtils;
 
 
-import com.google.gson.JsonElement;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.config.AppStyle;
 import com.x.base.core.project.config.AppStyle;
 import com.x.base.core.project.config.CenterServer;
 import com.x.base.core.project.config.CenterServer;
@@ -71,7 +70,7 @@ public class CreateConfigSample {
 		classes.add(Vfs.class);
 		classes.add(Vfs.class);
 		classes.add(WorkTime.class);
 		classes.add(WorkTime.class);
 		classes.add(ZhengwuDingding.class);
 		classes.add(ZhengwuDingding.class);
-		classes.add(ExternalDataSource.class);
+		//classes.add(ExternalDataSource.class);
 		classes.add(Exmail.class);
 		classes.add(Exmail.class);
 		classes.add(Communicate.class);
 		classes.add(Communicate.class);
 
 
@@ -91,20 +90,20 @@ public class CreateConfigSample {
 			logger.print("create file:{}.", file.getAbsoluteFile());
 			logger.print("create file:{}.", file.getAbsoluteFile());
 			FileUtils.write(file, XGsonBuilder.toJson(map), DefaultCharset.charset);
 			FileUtils.write(file, XGsonBuilder.toJson(map), DefaultCharset.charset);
 		}
 		}
-		convertExternalDataSource2ExternalDataSources(dir);
+		//convertExternalDataSource2ExternalDataSources(dir);
 		renameNode(dir);
 		renameNode(dir);
 	}
 	}
 
 
-	private static void convertExternalDataSource2ExternalDataSources(File dir) throws Exception, IOException {
-		File file_externalDataSource = new File(dir, "externalDataSource.json");
-		File file_externalDataSources = new File(dir, "externalDataSources.json");
-		JsonElement jsonElement = XGsonBuilder.instance().fromJson(
-				FileUtils.readFileToString(file_externalDataSource, DefaultCharset.charset), JsonElement.class);
-		List<JsonElement> list = new ArrayList<>();
-		list.add(jsonElement);
-		FileUtils.writeStringToFile(file_externalDataSources, XGsonBuilder.toJson(list), DefaultCharset.charset);
-		file_externalDataSource.delete();
-	}
+//	private static void convertExternalDataSource2ExternalDataSources(File dir) throws Exception, IOException {
+//		File file_externalDataSource = new File(dir, "externalDataSources.json");
+//		File file_externalDataSources = new File(dir, "externalDataSources.json");
+//		JsonElement jsonElement = XGsonBuilder.instance().fromJson(
+//				FileUtils.readFileToString(file_externalDataSource, DefaultCharset.charset), JsonElement.class);
+//		List<JsonElement> list = new ArrayList<>();
+//		list.add(jsonElement);
+//		FileUtils.writeStringToFile(file_externalDataSources, XGsonBuilder.toJson(list), DefaultCharset.charset);
+//		file_externalDataSource.delete();
+//	}
 
 
 	private static void renameNode(File dir) throws Exception, IOException {
 	private static void renameNode(File dir) throws Exception, IOException {
 		File file_node = new File(dir, "node.json");
 		File file_node = new File(dir, "node.json");

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

@@ -30,6 +30,7 @@ public class PackageO2server {
 		CreateConfigSample.main(base.getAbsolutePath());
 		CreateConfigSample.main(base.getAbsolutePath());
 		CreateLocalSample.main(base.getAbsolutePath());
 		CreateLocalSample.main(base.getAbsolutePath());
 		File file = new File(base, "o2server.zip");
 		File file = new File(base, "o2server.zip");
+		FileUtils.forceMkdir(new File(base.getAbsolutePath(), "servers"));
 		try (ZipOutputStream outputStream = new ZipOutputStream(new FileOutputStream(file))) {
 		try (ZipOutputStream outputStream = new ZipOutputStream(new FileOutputStream(file))) {
 			compress(outputStream, base.getAbsolutePath(), "configSample");
 			compress(outputStream, base.getAbsolutePath(), "configSample");
 			compress(outputStream, base.getAbsolutePath(), "jvm");
 			compress(outputStream, base.getAbsolutePath(), "jvm");

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

@@ -45,6 +45,16 @@ public class CenterServers extends ConcurrentSkipListMap<String, CenterServer> {
 
 
 	}
 	}
 
 
+	public Entry<String, CenterServer> findByNode(String node) {
+
+		for(Entry<String, CenterServer> entry : this.entrySet()){
+			if(entry.getKey().equals(node)){
+				return entry;
+			}
+		}
+		return null;
+	}
+
 	public CenterServer pirmary() throws Exception {
 	public CenterServer pirmary() throws Exception {
 		return this.get(Config.resource_node_centersPirmaryNode());
 		return this.get(Config.resource_node_centersPirmaryNode());
 	}
 	}

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

@@ -8,6 +8,8 @@ import java.net.URL;
 import java.nio.charset.StandardCharsets;
 import java.nio.charset.StandardCharsets;
 import java.util.Objects;
 import java.util.Objects;
 
 
+import com.x.base.core.project.connection.ActionResponse;
+import com.x.base.core.project.http.ActionResult;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.BooleanUtils;
@@ -157,7 +159,7 @@ public class Collect extends ConfigObject {
 	public boolean validate()
 	public boolean validate()
 			throws ExceptionCollectConnectError, ExceptionCollectDisable, ExceptionCollectValidateFailure, Exception {
 			throws ExceptionCollectConnectError, ExceptionCollectDisable, ExceptionCollectValidateFailure, Exception {
 
 
-		if (Config.collect().getEnable()) {
+		if (!Config.collect().getEnable()) {
 			throw new ExceptionCollectDisable();
 			throw new ExceptionCollectDisable();
 		}
 		}
 
 
@@ -199,6 +201,20 @@ public class Collect extends ConfigObject {
 		return true;
 		return true;
 	}
 	}
 
 
+	public boolean connect() throws Exception{
+		if (!Config.collect().getEnable()) {
+			throw new ExceptionCollectDisable();
+		}
+
+		String url = Config.collect().url("/o2_collect_assemble/jaxrs/echo");
+		ActionResponse actionResponse = ConnectionAction.get(url, null);
+		if (Objects.equals(ActionResult.Type.success, actionResponse.getType())) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
 	public String url() {
 	public String url() {
 		String url = this.getSslEnable() ? "https://" : "http://";
 		String url = this.getSslEnable() ? "https://" : "http://";
 		url += this.getServer();
 		url += this.getServer();

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

@@ -71,6 +71,7 @@ public class Config {
 	public static final String PATH_CONFIG_JPUSH = "config/jpushConfig.json";
 	public static final String PATH_CONFIG_JPUSH = "config/jpushConfig.json";
 	public static final String PATH_CONFIG_COMMUNICATE = "config/communicate.json";
 	public static final String PATH_CONFIG_COMMUNICATE = "config/communicate.json";
 	public static final String PATH_CONFIG_EXMAIL = "config/exmail.json";
 	public static final String PATH_CONFIG_EXMAIL = "config/exmail.json";
+	public static final String PATH_CONFIG_PORTAL = "config/portal.json";
 
 
 	public static final String DIR_COMMONS = "commons";
 	public static final String DIR_COMMONS = "commons";
 	public static final String DIR_COMMONS_TESS4J_TESSDATA = "commons/tess4j/tessdata";
 	public static final String DIR_COMMONS_TESS4J_TESSDATA = "commons/tess4j/tessdata";
@@ -1195,6 +1196,23 @@ public class Config {
 		return instance().exmail;
 		return instance().exmail;
 	}
 	}
 
 
+	public Portal portal;
+
+	public static Portal portal() throws Exception {
+		if (null == instance().portal) {
+			synchronized (Config.class) {
+				if (null == instance().portal) {
+					Portal obj = BaseTools.readConfigObject(PATH_CONFIG_PORTAL, Portal.class);
+					if (null == obj) {
+						obj = Portal.defaultInstance();
+					}
+					instance().portal = obj;
+				}
+			}
+		}
+		return instance().portal;
+	}
+
 	public static Object resource(String name) throws Exception {
 	public static Object resource(String name) throws Exception {
 		return initialContext().lookup(name);
 		return initialContext().lookup(name);
 	}
 	}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Dingding.java


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

@@ -18,7 +18,6 @@ public class ExternalStorageSource extends ConfigObject {
 		this.weight = default_weight;
 		this.weight = default_weight;
 		this.name = default_name;
 		this.name = default_name;
 		this.deepPath = default_deepPath;
 		this.deepPath = default_deepPath;
-
 	}
 	}
 
 
 	public static ExternalStorageSource defaultInstance() {
 	public static ExternalStorageSource defaultInstance() {

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

@@ -262,8 +262,8 @@ public class LogLevel extends ConfigObject {
 		@FieldDescribe("审计日志归属系统名称")
 		@FieldDescribe("审计日志归属系统名称")
 		private String systemName;
 		private String systemName;
 
 
-		@FieldDescribe("审计日志归属省份")
-		private String companycode;
+		@FieldDescribe("扩展字段1")
+		private String extend1;
 
 
 		public Boolean enable() {
 		public Boolean enable() {
 			return BooleanUtils.isTrue(this.enable);
 			return BooleanUtils.isTrue(this.enable);
@@ -286,8 +286,13 @@ public class LogLevel extends ConfigObject {
 
 
 		public void setSystemName(String systemName) { this.systemName = systemName; }
 		public void setSystemName(String systemName) { this.systemName = systemName; }
 
 
-		public String getCompanycode() { return companycode; }
 
 
-		public void setCompanycode(String companycode) { this.companycode = companycode; }
+		public String getExtend1() {
+			return extend1;
+		}
+
+		public void setExtend1(String extend1) {
+			this.extend1 = extend1;
+		}
 	}
 	}
 }
 }

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

@@ -119,6 +119,10 @@ public class Messages extends ConcurrentSkipListMap<String, Message> {
 		o.put(MessageConnector.TYPE_MIND_FILESEND,
 		o.put(MessageConnector.TYPE_MIND_FILESEND,
 				new Message(MessageConnector.CONSUME_WS, MessageConnector.CONSUME_PMS));
 				new Message(MessageConnector.CONSUME_WS, MessageConnector.CONSUME_PMS));
 
 
+		/* im聊天消息发送 */
+		o.put(MessageConnector.TYPE_IM_CREATE,
+				new Message(MessageConnector.CONSUME_WS));
+
 		return o;
 		return o;
 	}
 	}
 
 

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

@@ -27,7 +27,7 @@ public class Node extends ConfigObject {
 		o.dumpStorage = new ScheduleDumpStorage();
 		o.dumpStorage = new ScheduleDumpStorage();
 		o.restoreData = new ScheduleRestoreData();
 		o.restoreData = new ScheduleRestoreData();
 		o.restoreStorage = new ScheduleRestoreStorage();
 		o.restoreStorage = new ScheduleRestoreStorage();
-		o.nodeAgentEnable = false;
+		o.nodeAgentEnable = true;
 		o.nodeAgentEncrypt = true;
 		o.nodeAgentEncrypt = true;
 		o.nodeAgentPort = default_nodeAgentPort;
 		o.nodeAgentPort = default_nodeAgentPort;
 		o.quickStartWebApp = false;
 		o.quickStartWebApp = false;

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

@@ -0,0 +1,84 @@
+package com.x.base.core.project.config;
+
+import java.io.File;
+
+import org.apache.commons.io.FileUtils;
+
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.gson.XGsonBuilder;
+import com.x.base.core.project.tools.DefaultCharset;
+
+public class Portal extends ConfigObject {
+
+	public static Portal defaultInstance() {
+		return new Portal();
+	}
+
+	public Portal() {
+		this.indexPage = new IndexPage();
+	}
+
+	@FieldDescribe("定制首页面设置.")
+	private IndexPage indexPage;
+
+	public IndexPage getIndexPage() {
+		if (null == indexPage) {
+			this.indexPage = new IndexPage();
+		}
+		return this.indexPage;
+	}
+
+	public void setIndexPage(IndexPage indexPage) {
+		this.indexPage = indexPage;
+	}
+
+	public static class IndexPage extends ConfigObject {
+
+		public static IndexPage defaultInstance() {
+			return new IndexPage();
+		}
+
+		public IndexPage() {
+			this.enable = false;
+			this.portal = "";
+			this.page = "";
+		}
+
+		@FieldDescribe("是否启用定制的首页面.")
+		private Boolean enable;
+		@FieldDescribe("指定首页面所属的portal,可以用id,name,alias.")
+		private String portal;
+		@FieldDescribe("指定的首页面,可以使用name,alias,id")
+		private String page;
+
+		public Boolean getEnable() {
+			return enable;
+		}
+
+		public void setEnable(Boolean enable) {
+			this.enable = enable;
+		}
+
+		public String getPortal() {
+			return portal;
+		}
+
+		public void setPortal(String portal) {
+			this.portal = portal;
+		}
+
+		public String getPage() {
+			return page;
+		}
+
+		public void setPage(String page) {
+			this.page = page;
+		}
+
+	}
+
+	public void save() throws Exception {
+		File file = new File(Config.base(), Config.PATH_CONFIG_PORTAL);
+		FileUtils.write(file, XGsonBuilder.toJson(this), DefaultCharset.charset);
+	}
+}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Qiyeweixin.java


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

@@ -97,19 +97,19 @@ public class Query extends ConfigObject {
 		File file = new File(Config.base(), Config.PATH_CONFIG_QUERY);
 		File file = new File(Config.base(), Config.PATH_CONFIG_QUERY);
 		FileUtils.write(file, XGsonBuilder.toJson(this), DefaultCharset.charset);
 		FileUtils.write(file, XGsonBuilder.toJson(this), DefaultCharset.charset);
 	}
 	}
+	
+	public static class CrawlCms extends ConfigObject {
 
 
-	public static class CrawlWork extends ConfigObject {
-
-		public static CrawlWork defaultInstance() {
-			CrawlWork o = new CrawlWork();
+		public static CrawlCms defaultInstance() {
+			CrawlCms o = new CrawlCms();
 			return o;
 			return o;
 		}
 		}
 
 
 		public final static Boolean DEFAULT_ENABLE = true;
 		public final static Boolean DEFAULT_ENABLE = true;
 
 
-		public final static String DEFAULT_CRON = "45 45 * * * ?";
+		public final static String DEFAULT_CRON = "30 30 7-21 * * ?";
 
 
-		public final static Integer DEFAULT_CONUT = 1000;
+		public final static Integer DEFAULT_CONUT = 100;
 
 
 		public final static Integer DEFAULT_MAXATTACHMENTSIZE = 1024 * 1024 * 5;
 		public final static Integer DEFAULT_MAXATTACHMENTSIZE = 1024 * 1024 * 5;
 
 
@@ -119,15 +119,12 @@ public class Query extends ConfigObject {
 		@FieldDescribe("定时cron表达式.")
 		@FieldDescribe("定时cron表达式.")
 		private String cron = DEFAULT_CRON;
 		private String cron = DEFAULT_CRON;
 
 
-		@FieldDescribe("每次处理的数量,默认为1000,同时每次将重爬最旧的25%以提高数据质量.")
+		@FieldDescribe("每次处理的数量,默认每小时处理所以默认为100,同时每次将重爬最旧的50%,按时间轮询50%.")
 		private Integer count = DEFAULT_CONUT;
 		private Integer count = DEFAULT_CONUT;
 
 
 		@FieldDescribe("忽略附件名称.")
 		@FieldDescribe("忽略附件名称.")
 		private List<String> excludeAttachment = new ArrayList<>();
 		private List<String> excludeAttachment = new ArrayList<>();
 
 
-		@FieldDescribe("忽略附件位置.")
-		private List<String> excludeSite = new ArrayList<>();
-
 		@FieldDescribe("最大附件大小.")
 		@FieldDescribe("最大附件大小.")
 		private Integer maxAttachmentSize = DEFAULT_MAXATTACHMENTSIZE;
 		private Integer maxAttachmentSize = DEFAULT_MAXATTACHMENTSIZE;
 
 
@@ -143,10 +140,6 @@ public class Query extends ConfigObject {
 			return excludeAttachment;
 			return excludeAttachment;
 		}
 		}
 
 
-		public List<String> getExcludeSite() {
-			return excludeSite;
-		}
-
 		public Integer getMaxAttachmentSize() {
 		public Integer getMaxAttachmentSize() {
 			return this.maxAttachmentSize == null ? DEFAULT_MAXATTACHMENTSIZE : this.maxAttachmentSize;
 			return this.maxAttachmentSize == null ? DEFAULT_MAXATTACHMENTSIZE : this.maxAttachmentSize;
 		}
 		}
@@ -175,28 +168,24 @@ public class Query extends ConfigObject {
 			this.excludeAttachment = excludeAttachment;
 			this.excludeAttachment = excludeAttachment;
 		}
 		}
 
 
-		public void setExcludeSite(List<String> excludeSite) {
-			this.excludeSite = excludeSite;
-		}
-
 		public void setMaxAttachmentSize(Integer maxAttachmentSize) {
 		public void setMaxAttachmentSize(Integer maxAttachmentSize) {
 			this.maxAttachmentSize = maxAttachmentSize;
 			this.maxAttachmentSize = maxAttachmentSize;
 		}
 		}
-
 	}
 	}
 
 
-	public static class CrawlWorkCompleted extends ConfigObject {
+	public static class CrawlWork extends ConfigObject {
 
 
-		public static CrawlWorkCompleted defaultInstance() {
-			CrawlWorkCompleted o = new CrawlWorkCompleted();
+		public static CrawlWork defaultInstance() {
+			CrawlWork o = new CrawlWork();
 			return o;
 			return o;
 		}
 		}
 
 
 		public final static Boolean DEFAULT_ENABLE = true;
 		public final static Boolean DEFAULT_ENABLE = true;
 
 
-		public final static String DEFAULT_CRON = "50 50 21 * * ?";
+		public final static String DEFAULT_CRON = "40 40 7-21 * * ?";
 
 
-		public final static Integer DEFAULT_CONUT = 5000;
+		/* 由于每小时运行,那么每次更新100份 */
+		public final static Integer DEFAULT_CONUT = 100;
 
 
 		public final static Integer DEFAULT_MAXATTACHMENTSIZE = 1024 * 1024 * 5;
 		public final static Integer DEFAULT_MAXATTACHMENTSIZE = 1024 * 1024 * 5;
 
 
@@ -206,7 +195,7 @@ public class Query extends ConfigObject {
 		@FieldDescribe("定时cron表达式.")
 		@FieldDescribe("定时cron表达式.")
 		private String cron = DEFAULT_CRON;
 		private String cron = DEFAULT_CRON;
 
 
-		@FieldDescribe("每次处理的数量,默认为5000,同时每次将重爬最旧的10%以提高数据质量.")
+		@FieldDescribe("每次处理的数量,默认每小时处理所以默认为100,同时每次将重爬最旧的50%,按时间轮询50%.")
 		private Integer count = DEFAULT_CONUT;
 		private Integer count = DEFAULT_CONUT;
 
 
 		@FieldDescribe("忽略附件名称.")
 		@FieldDescribe("忽略附件名称.")
@@ -230,14 +219,14 @@ public class Query extends ConfigObject {
 			return excludeAttachment;
 			return excludeAttachment;
 		}
 		}
 
 
-		public Integer getMaxAttachmentSize() {
-			return this.maxAttachmentSize == null ? DEFAULT_MAXATTACHMENTSIZE : this.maxAttachmentSize;
-		}
-
 		public List<String> getExcludeSite() {
 		public List<String> getExcludeSite() {
 			return excludeSite;
 			return excludeSite;
 		}
 		}
 
 
+		public Integer getMaxAttachmentSize() {
+			return this.maxAttachmentSize == null ? DEFAULT_MAXATTACHMENTSIZE : this.maxAttachmentSize;
+		}
+
 		public Boolean getEnable() {
 		public Boolean getEnable() {
 			return BooleanUtils.isTrue(this.enable);
 			return BooleanUtils.isTrue(this.enable);
 		}
 		}
@@ -272,18 +261,20 @@ public class Query extends ConfigObject {
 
 
 	}
 	}
 
 
-	public static class CrawlCms extends ConfigObject {
+	public static class CrawlWorkCompleted extends ConfigObject {
 
 
-		public static CrawlCms defaultInstance() {
-			CrawlCms o = new CrawlCms();
+		public static CrawlWorkCompleted defaultInstance() {
+			CrawlWorkCompleted o = new CrawlWorkCompleted();
 			return o;
 			return o;
 		}
 		}
 
 
 		public final static Boolean DEFAULT_ENABLE = true;
 		public final static Boolean DEFAULT_ENABLE = true;
 
 
-		public final static String DEFAULT_CRON = "55 55 8/2 * * ?";
+		public final static String DEFAULT_CRON = "50 50 22 * * ?";
+
+		public final static Integer DEFAULT_CONUT = 2000;
 
 
-		public final static Integer DEFAULT_CONUT = 1000;
+		public final static Integer DEFAULT_MAXATTACHMENTSIZE = 1024 * 1024 * 5;
 
 
 		@FieldDescribe("是否启用")
 		@FieldDescribe("是否启用")
 		private Boolean enable = DEFAULT_ENABLE;
 		private Boolean enable = DEFAULT_ENABLE;
@@ -291,9 +282,18 @@ public class Query extends ConfigObject {
 		@FieldDescribe("定时cron表达式.")
 		@FieldDescribe("定时cron表达式.")
 		private String cron = DEFAULT_CRON;
 		private String cron = DEFAULT_CRON;
 
 
-		@FieldDescribe("每次处理的数量,默认为1000,同时每次将重爬最旧的10%以提高数据质量.")
+		@FieldDescribe("每次处理的数量,默认每小时处理所以默认为2000,同时每次将重爬最旧的25%,按时间轮询25%.")
 		private Integer count = DEFAULT_CONUT;
 		private Integer count = DEFAULT_CONUT;
 
 
+		@FieldDescribe("忽略附件名称.")
+		private List<String> excludeAttachment = new ArrayList<>();
+
+		@FieldDescribe("忽略附件位置.")
+		private List<String> excludeSite = new ArrayList<>();
+
+		@FieldDescribe("最大附件大小.")
+		private Integer maxAttachmentSize = DEFAULT_MAXATTACHMENTSIZE;
+
 		public String getCron() {
 		public String getCron() {
 			if (StringUtils.isNotEmpty(this.cron) && CronExpression.isValidExpression(this.cron)) {
 			if (StringUtils.isNotEmpty(this.cron) && CronExpression.isValidExpression(this.cron)) {
 				return this.cron;
 				return this.cron;
@@ -302,6 +302,18 @@ public class Query extends ConfigObject {
 			}
 			}
 		}
 		}
 
 
+		public List<String> getExcludeAttachment() {
+			return excludeAttachment;
+		}
+
+		public Integer getMaxAttachmentSize() {
+			return this.maxAttachmentSize == null ? DEFAULT_MAXATTACHMENTSIZE : this.maxAttachmentSize;
+		}
+
+		public List<String> getExcludeSite() {
+			return excludeSite;
+		}
+
 		public Boolean getEnable() {
 		public Boolean getEnable() {
 			return BooleanUtils.isTrue(this.enable);
 			return BooleanUtils.isTrue(this.enable);
 		}
 		}
@@ -321,8 +333,23 @@ public class Query extends ConfigObject {
 		public void setCount(Integer count) {
 		public void setCount(Integer count) {
 			this.count = count;
 			this.count = count;
 		}
 		}
+
+		public void setExcludeAttachment(List<String> excludeAttachment) {
+			this.excludeAttachment = excludeAttachment;
+		}
+
+		public void setExcludeSite(List<String> excludeSite) {
+			this.excludeSite = excludeSite;
+		}
+
+		public void setMaxAttachmentSize(Integer maxAttachmentSize) {
+			this.maxAttachmentSize = maxAttachmentSize;
+		}
+
 	}
 	}
 
 
+	
+
 	public void setCrawlWorkCompleted(CrawlWorkCompleted crawlWorkCompleted) {
 	public void setCrawlWorkCompleted(CrawlWorkCompleted crawlWorkCompleted) {
 		this.crawlWorkCompleted = crawlWorkCompleted;
 		this.crawlWorkCompleted = crawlWorkCompleted;
 	}
 	}

+ 45 - 9
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Token.java

@@ -26,8 +26,8 @@ public class Token extends ConfigObject {
 
 
 	public static final String initPassword = "o2";
 	public static final String initPassword = "o2";
 
 
-	public static final String defaultSslKeyStorePassword = "12345678";
-	public static final String defaultSslKeyManagerPassword = "12345678";
+	public static final String defaultSslKeyStorePassword = "123456";
+	public static final String defaultSslKeyManagerPassword = "123456";
 
 
 	public static Token defaultInstance() {
 	public static Token defaultInstance() {
 		Token o = new Token();
 		Token o = new Token();
@@ -221,6 +221,8 @@ public class Token extends ConfigObject {
 		private String qq;
 		private String qq;
 		private String weibo;
 		private String weibo;
 		private String mobile;
 		private String mobile;
+		private String pinyin;
+		private String pinyinInitial;
 		// private String icon;
 		// private String icon;
 		private List<String> roleList;
 		private List<String> roleList;
 
 
@@ -304,13 +306,7 @@ public class Token extends ConfigObject {
 			this.roleList = roleList;
 			this.roleList = roleList;
 		}
 		}
 
 
-		// public String getIcon() {
-		// return icon;
-		// }
-		//
-		// public void setIcon(String icon) {
-		// this.icon = icon;
-		// }
+ 
 
 
 		public String getUnique() {
 		public String getUnique() {
 			return unique;
 			return unique;
@@ -328,6 +324,22 @@ public class Token extends ConfigObject {
 			this.distinguishedName = distinguishedName;
 			this.distinguishedName = distinguishedName;
 		}
 		}
 
 
+		public String getPinyin() {
+			return pinyin;
+		}
+
+		public void setPinyin(String pinyin) {
+			this.pinyin = pinyin;
+		}
+
+		public String getPinyinInitial() {
+			return pinyinInitial;
+		}
+
+		public void setPinyinInitial(String pinyinInitial) {
+			this.pinyinInitial = pinyinInitial;
+		}
+
 	}
 	}
 
 
 	public Oauth findOauth(String clientId) {
 	public Oauth findOauth(String clientId) {
@@ -359,6 +371,7 @@ public class Token extends ConfigObject {
 			this.enable = false;
 			this.enable = false;
 			this.clientId = "";
 			this.clientId = "";
 			this.mapping = new LinkedHashMap<String, String>();
 			this.mapping = new LinkedHashMap<String, String>();
+
 		}
 		}
 
 
 		@FieldDescribe("是否启用")
 		@FieldDescribe("是否启用")
@@ -367,6 +380,12 @@ public class Token extends ConfigObject {
 		@FieldDescribe("客户端名称")
 		@FieldDescribe("客户端名称")
 		private String clientId;
 		private String clientId;
 
 
+		@FieldDescribe("密钥")
+		private String clientSecret;
+
+		@FieldDescribe("登录地址")
+		private String loginUrl;
+
 		@FieldDescribe("返回值")
 		@FieldDescribe("返回值")
 		private Map<String, String> mapping;
 		private Map<String, String> mapping;
 
 
@@ -396,6 +415,23 @@ public class Token extends ConfigObject {
 		public void setEnable(Boolean enable) {
 		public void setEnable(Boolean enable) {
 			this.enable = enable;
 			this.enable = enable;
 		}
 		}
+
+		public String getClientSecret() {
+			return clientSecret;
+		}
+
+		public void setClientSecret(String clientSecret) {
+			this.clientSecret = clientSecret;
+		}
+
+		public String getLoginUrl() {
+			return loginUrl;
+		}
+
+		public void setLoginUrl(String loginUrl) {
+			this.loginUrl = loginUrl;
+		}
+
 	}
 	}
 
 
 	public static class OauthClient extends ConfigObject {
 	public static class OauthClient extends ConfigObject {

+ 9 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/connection/CipherConnectionAction.java

@@ -1,6 +1,7 @@
 package com.x.base.core.project.connection;
 package com.x.base.core.project.connection;
 
 
 import java.util.List;
 import java.util.List;
+import java.util.Map;
 
 
 import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -69,6 +70,14 @@ public class CipherConnectionAction {
 		return put(xdebugger, addr, body);
 		return put(xdebugger, addr, body);
 	}
 	}
 
 
+	public static ActionResponse multiFormPost(Boolean xdebugger, String address, String fileName, byte[] bytes, Map<String, String> map) throws Exception{
+		List<NameValuePair> headers = cipher();
+		if (BooleanUtils.isTrue(xdebugger)) {
+			headers.add(new NameValuePair(HttpToken.X_Debugger, true));
+		}
+		return ConnectionAction.multiFormPost(address, headers, fileName, bytes, map);
+	}
+
 	public static List<NameValuePair> cipher() throws Exception {
 	public static List<NameValuePair> cipher() throws Exception {
 		EffectivePerson effectivePerson = EffectivePerson.cipher(Config.token().getCipher());
 		EffectivePerson effectivePerson = EffectivePerson.cipher(Config.token().getCipher());
 		return ListTools.toList(new NameValuePair(HttpToken.X_Token, effectivePerson.getToken()));
 		return ListTools.toList(new NameValuePair(HttpToken.X_Token, effectivePerson.getToken()));

+ 61 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/connection/ConnectionAction.java

@@ -1,5 +1,6 @@
 package com.x.base.core.project.connection;
 package com.x.base.core.project.connection;
 
 
+import java.io.File;
 import java.io.IOException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStream;
@@ -11,6 +12,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map;
 import java.util.Objects;
 import java.util.Objects;
 
 
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 
 
@@ -22,6 +24,14 @@ import com.x.base.core.project.gson.XGsonBuilder;
 import com.x.base.core.project.http.WrapOutBoolean;
 import com.x.base.core.project.http.WrapOutBoolean;
 import com.x.base.core.project.tools.DefaultCharset;
 import com.x.base.core.project.tools.DefaultCharset;
 import com.x.base.core.project.tools.ListTools;
 import com.x.base.core.project.tools.ListTools;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.mime.MultipartEntityBuilder;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
 
 
 public class ConnectionAction {
 public class ConnectionAction {
 
 
@@ -188,6 +198,57 @@ public class ConnectionAction {
 		return read(response, connection);
 		return read(response, connection);
 	}
 	}
 
 
+	public static ActionResponse multiFormPost(String address, List<NameValuePair> heads, String fileName, byte[] bytes, Map<String, String> map) throws Exception {
+		ActionResponse response = new ActionResponse();
+		try {
+			CloseableHttpClient httpClient = HttpClients.createDefault();
+			HttpPost uploadFile = new HttpPost(address);
+			MultipartEntityBuilder builder = MultipartEntityBuilder.create();
+			builder.addTextBody("fileName", fileName, ContentType.TEXT_PLAIN);
+			if(map!=null){
+				for(String key : map.keySet()){
+					builder.addTextBody(key, map.get(key), ContentType.TEXT_PLAIN);
+				}
+			}
+			builder.addBinaryBody(
+					"file",
+					bytes,
+					ContentType.APPLICATION_OCTET_STREAM,
+					fileName
+			);
+			HttpEntity multipart = builder.build();
+			uploadFile.setEntity(multipart);
+			if (ListTools.isNotEmpty(heads)) {
+				String name;
+				String value;
+				for (NameValuePair o : heads) {
+					name = Objects.toString(o.getName(), "");
+					value = Objects.toString(o.getValue(), "");
+					if (StringUtils.isNotEmpty(name) && StringUtils.isNotEmpty(value)) {
+						uploadFile.addHeader(name, value);
+					}
+				}
+			}
+			CloseableHttpResponse httpResponse = httpClient.execute(uploadFile);
+			HttpEntity responseEntity = httpResponse.getEntity();
+			String value= EntityUtils.toString(responseEntity, DefaultCharset.name);
+			try {
+				response = gson.fromJson(value, ActionResponse.class);
+			} catch (Exception e) {
+				response.setType(ActionResponse.Type.connectFatal);
+				response.setMessage("convert to json error, address:" + address
+						+ ", method: multiFormPost, because:" + e.getMessage() + ", value:"
+						+ value + ".");
+			}
+		} catch (Exception e) {
+			response.setType(ActionResponse.Type.connectFatal);
+			response.setMessage(
+					"ConnectionAction multiFormPost output error: [" + address + "], " + e.getClass().getName() + ".");
+			return response;
+		}
+		return response;
+	}
+
 	private static String extractErrorMessageIfExist(String str) {
 	private static String extractErrorMessageIfExist(String str) {
 		if (StringUtils.isBlank(str)) {
 		if (StringUtils.isBlank(str)) {
 			return "";
 			return "";

+ 13 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/exception/ExceptionEntityNotExist.java

@@ -1,5 +1,9 @@
 package com.x.base.core.project.exception;
 package com.x.base.core.project.exception;
 
 
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.JpaObject;
 
 
 public class ExceptionEntityNotExist extends PromptException {
 public class ExceptionEntityNotExist extends PromptException {
@@ -14,6 +18,11 @@ public class ExceptionEntityNotExist extends PromptException {
 		super("标识为:{} 的 {} 对象不存在.", flag, (null == cls) ? null : cls.getSimpleName());
 		super("标识为:{} 的 {} 对象不存在.", flag, (null == cls) ? null : cls.getSimpleName());
 	}
 	}
 
 
+	public <T extends JpaObject> ExceptionEntityNotExist(List<String> ids, Class<T> cls) {
+		super("标识为:{} 的 {} 对象不存在.", (null == ids) ? null : StringUtils.join(ids, ","),
+				(null == cls) ? null : cls.getSimpleName());
+	}
+
 	public <T extends JpaObject> ExceptionEntityNotExist(String flag, String name) {
 	public <T extends JpaObject> ExceptionEntityNotExist(String flag, String name) {
 		super("标识为:{} 的 {} 对象不存在.", flag, name);
 		super("标识为:{} 的 {} 对象不存在.", flag, name);
 	}
 	}
@@ -22,4 +31,8 @@ public class ExceptionEntityNotExist extends PromptException {
 		super("标识为:{} 的对象不存在.", flag);
 		super("标识为:{} 的对象不存在.", flag);
 	}
 	}
 
 
+	public <T extends JpaObject> ExceptionEntityNotExist(Class<T> cls) {
+		super("类型为: {} 的对象不存在.", cls.getSimpleName());
+	}
+
 }
 }

+ 4 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/http/HttpToken.java

@@ -20,6 +20,7 @@ import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.tools.Crypto;
 import com.x.base.core.project.tools.Crypto;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.DomainTools;
 import com.x.base.core.project.tools.DomainTools;
+import com.x.base.core.project.tools.URLTools;
 
 
 public class HttpToken {
 public class HttpToken {
 
 
@@ -152,6 +153,9 @@ public class HttpToken {
 		if (StringUtils.isEmpty(token)) {
 		if (StringUtils.isEmpty(token)) {
 			token = request.getHeader(X_Authorization);
 			token = request.getHeader(X_Authorization);
 		}
 		}
+		if (StringUtils.isEmpty(token)) {
+			token = URLTools.getQueryStringParameter(request.getQueryString(), X_Token);
+		}
 		// 此代码将导致input被关闭.
 		// 此代码将导致input被关闭.
 //		if (StringUtils.isEmpty(token)) {
 //		if (StringUtils.isEmpty(token)) {
 //			token = request.getParameter(X_Token);
 //			token = request.getParameter(X_Token);

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

@@ -5,6 +5,7 @@ import java.util.Set;
 
 
 import javax.ws.rs.core.Application;
 import javax.ws.rs.core.Application;
 
 
+import com.x.base.core.project.jaxrs.sysresource.SysResourceAction;
 import org.glassfish.jersey.media.multipart.MultiPartFeature;
 import org.glassfish.jersey.media.multipart.MultiPartFeature;
 
 
 import com.x.base.core.project.jaxrs.cache.CacheAction;
 import com.x.base.core.project.jaxrs.cache.CacheAction;
@@ -21,6 +22,7 @@ public abstract class AbstractActionApplication extends Application {
 		classes.add(CacheAction.class);
 		classes.add(CacheAction.class);
 		classes.add(LoggerAction.class);
 		classes.add(LoggerAction.class);
 		classes.add(FireScheduleAction.class);
 		classes.add(FireScheduleAction.class);
+		classes.add(SysResourceAction.class);
 		// providers
 		// providers
 		classes.add(MessageBodyReaderImpl.class);
 		classes.add(MessageBodyReaderImpl.class);
 		classes.add(MultiPartFeature.class);
 		classes.add(MultiPartFeature.class);

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

@@ -0,0 +1,8 @@
+package com.x.base.core.project.jaxrs;
+
+import javax.servlet.annotation.WebFilter;
+
+@WebFilter(urlPatterns = { "/jaxrs/sysresource/*" }, asyncSupported = true)
+public class SysResourceJaxrsFilter extends CipherManagerJaxrsFilter {
+
+}

+ 62 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/sysresource/ActionListResource.java

@@ -0,0 +1,62 @@
+package com.x.base.core.project.jaxrs.sysresource;
+
+import com.x.base.core.project.config.Config;
+import com.x.base.core.project.gson.GsonPropertyObject;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.tools.FileTools;
+import org.apache.commons.lang3.StringUtils;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+class ActionListResource extends BaseAction {
+
+	private static Logger logger = LoggerFactory.getLogger(ActionListResource.class);
+
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, String filePath) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		File dist = new File(Config.base(), Config.DIR_SERVERS_WEBSERVER);
+		if(StringUtils.isNotEmpty(filePath) && !filePath.equals(EMPTY_SYMBOL)){
+			dist = new File(dist, filePath);
+			if(!dist.exists()){
+				throw new Exception("filePath not exist!");
+			}
+		}
+
+		Map<String, List<FileTools.FileInfo>> fileMap = FileTools.getFiles(dist.getAbsolutePath(), null, Config.DIR_SERVERS_WEBSERVER);
+
+		Wo wo = new Wo();
+		wo.setFiles(fileMap.get("files"));
+		wo.setFolders(fileMap.get("folders"));
+		result.setData(wo);
+		return result;
+	}
+
+	public static class Wo extends GsonPropertyObject {
+
+		private List<FileTools.FileInfo> files;
+
+		private List<FileTools.FileInfo> folders;
+
+
+		public List<FileTools.FileInfo> getFiles() {
+			return files;
+		}
+
+		public void setFiles(List<FileTools.FileInfo> files) {
+			this.files = files;
+		}
+
+		public List<FileTools.FileInfo> getFolders() {
+			return folders;
+		}
+
+		public void setFolders(List<FileTools.FileInfo> folders) {
+			this.folders = folders;
+		}
+	}
+}

+ 65 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/sysresource/ActionUploadResource.java

@@ -0,0 +1,65 @@
+package com.x.base.core.project.jaxrs.sysresource;
+
+import com.x.base.core.project.config.Config;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WrapBoolean;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.tools.JarTools;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+class ActionUploadResource extends BaseAction {
+
+	private static Logger logger = LoggerFactory.getLogger(ActionUploadResource.class);
+
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, Boolean asNew,String fileName,String filePath,byte[] bytes,
+			FormDataContentDisposition disposition) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		if (StringUtils.isEmpty(fileName)) {
+			fileName = this.fileName(disposition);
+		}
+		if(!fileName.toLowerCase().endsWith(".zip")){
+			throw new Exception("file must be zip file!");
+		}
+		if(bytes==null || bytes.length==0){
+			throw new Exception("file must be not empty zip file!");
+		}
+
+		File tempFile = new File(Config.base(), "local/temp/upload");
+		FileUtils.forceMkdirParent(tempFile);
+		FileUtils.forceMkdir(tempFile);
+		FileUtils.cleanDirectory(tempFile);
+
+		File zipFile = new File(tempFile.getAbsolutePath(), fileName);
+		FileUtils.writeByteArrayToFile(zipFile, bytes);
+		File dist = new File(Config.base(), Config.DIR_SERVERS_WEBSERVER);
+		if(StringUtils.isNotEmpty(filePath)){
+			dist = new File(dist, filePath);
+			FileUtils.forceMkdirParent(dist);
+			FileUtils.forceMkdir(dist);
+		}
+		List<String> subs = new ArrayList<>();
+		subs.add("x_");
+		subs.add("o2_");
+		logger.print("{}上传静态资源:{},资源大小:{},到:{}", effectivePerson.getDistinguishedName(), fileName, bytes.length, dist.getAbsolutePath());
+		JarTools.unjar(zipFile, subs, dist, asNew);
+
+		FileUtils.cleanDirectory(tempFile);
+
+		Wo wo = new Wo();
+		wo.setValue(true);
+		result.setData(wo);
+		return result;
+	}
+
+	public static class Wo extends WrapBoolean {
+
+	}
+}

+ 7 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/sysresource/BaseAction.java

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

+ 69 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/sysresource/SysResourceAction.java

@@ -0,0 +1,69 @@
+package com.x.base.core.project.jaxrs.sysresource;
+
+import com.x.base.core.project.annotation.JaxrsDescribe;
+import com.x.base.core.project.annotation.JaxrsMethodDescribe;
+import com.x.base.core.project.annotation.JaxrsParameterDescribe;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.http.HttpMediaType;
+import com.x.base.core.project.jaxrs.ResponseFactory;
+import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
+import org.glassfish.jersey.media.multipart.FormDataParam;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.*;
+import javax.ws.rs.container.AsyncResponse;
+import javax.ws.rs.container.Suspended;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+
+@Path("sysresource")
+@JaxrsDescribe("系统资源")
+public class SysResourceAction extends StandardJaxrsAction {
+
+	private static Logger logger = LoggerFactory.getLogger(SysResourceAction.class);
+
+	@JaxrsMethodDescribe(value = "上传静态资源(仅上传到当前服务器)", action = ActionUploadResource.class)
+	@POST
+	@Path("upload/resource/as/new/{asNew}")
+	@Consumes(MediaType.MULTIPART_FORM_DATA)
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	public void uploadResource(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+							   @JaxrsParameterDescribe("覆盖类型:true删除原文件然后上传,false覆盖原文件") @PathParam("asNew") Boolean asNew,
+							   @JaxrsParameterDescribe("附件名称") @FormDataParam(FILENAME_FIELD) String fileName,
+							   @JaxrsParameterDescribe("附件存放目录(可以为空)") @FormDataParam("filePath") String filePath,
+							   @JaxrsParameterDescribe("附件标识") @FormDataParam(FILE_FIELD) final byte[] bytes,
+							   @JaxrsParameterDescribe("上传文件") @FormDataParam(FILE_FIELD) final FormDataContentDisposition disposition) {
+		ActionResult<ActionUploadResource.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionUploadResource().execute(effectivePerson, asNew, fileName, filePath, bytes, disposition);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "获取静态资源信息.", action = ActionListResource.class)
+	@GET
+	@Path("filePath/{filePath}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listResource(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+					@JaxrsParameterDescribe("查找路径(根路径:(0))") @PathParam("filePath") String filePath) {
+		ActionResult<ActionListResource.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionListResource().execute(effectivePerson, filePath);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+}

+ 6 - 6
o2server/x_base_core_project/src/main/java/com/x/base/core/project/logger/Audit.java

@@ -96,7 +96,7 @@ public class Audit {
 				String hostName = addr.getHostName();
 				String hostName = addr.getHostName();
 				String system = Objects.toString(Config.logLevel().audit().getSystem(), "OA");
 				String system = Objects.toString(Config.logLevel().audit().getSystem(), "OA");
 				String systemName = Objects.toString(Config.logLevel().audit().getSystemName(), "OA系统");
 				String systemName = Objects.toString(Config.logLevel().audit().getSystemName(), "OA系统");
-				String companycode = Objects.toString(Config.logLevel().audit().getCompanycode(), "");
+				String extend1 = Objects.toString(Config.logLevel().audit().getExtend1(), "");
 				/*String mode = this.uri;
 				/*String mode = this.uri;
 				if(this.uri!=null) {
 				if(this.uri!=null) {
 					String[] uris = this.uri.split("/");
 					String[] uris = this.uri.split("/");
@@ -106,7 +106,7 @@ public class Audit {
 				}*/
 				}*/
 				PrintStream stream = (PrintStream) Config.resource(Config.RESOURCE_AUDITLOGPRINTSTREAM);
 				PrintStream stream = (PrintStream) Config.resource(Config.RESOURCE_AUDITLOGPRINTSTREAM);
 				stream.printf("%tF %tT|2.0||1||%s|%s|%s|%s|%s||%s|true|%s|%d|%d|true|%s|%s|%s|%s|%s||", end, end, this.userId,
 				stream.printf("%tF %tT|2.0||1||%s|%s|%s|%s|%s||%s|true|%s|%d|%d|true|%s|%s|%s|%s|%s||", end, end, this.userId,
-						this.userId, systemName, system, this.uri, op, this.getParameter(op, system, companycode), end.getTime(), elapsed, hostAddress, hostName,
+						this.userId, systemName, system, this.uri, op, this.getParameter(op, system, extend1), end.getTime(), elapsed, hostAddress, hostName,
 						getTerminal(), this.remoteAddress, this.userAgent);
 						getTerminal(), this.remoteAddress, this.userAgent);
 				stream.println();
 				stream.println();
 			}
 			}
@@ -135,17 +135,17 @@ public class Audit {
 		return "PC";
 		return "PC";
 	}
 	}
 
 
-	public String getParameter(String op,String system,String companycode){
+	public String getParameter(String op,String system,String extend1){
 		StringBuffer parameter =new StringBuffer();
 		StringBuffer parameter =new StringBuffer();
 		if("登录".equals(op)){
 		if("登录".equals(op)){
 			parameter.append("LOG_RESULT=0&interfacename=").append(system).append("_")
 			parameter.append("LOG_RESULT=0&interfacename=").append(system).append("_")
-					.append(getTerminal()).append("_LOGIN&errorCode=ok&companycode=").append(companycode).append("&LOGIN_ENTRY=0");
+					.append(getTerminal()).append("_LOGIN&errorCode=ok&extend1=").append(extend1).append("&LOGIN_ENTRY=0");
 		}else if("注销".equals(op)){
 		}else if("注销".equals(op)){
 			parameter.append("LOG_RESULT=0&interfacename=").append(system).append("_")
 			parameter.append("LOG_RESULT=0&interfacename=").append(system).append("_")
-					.append(getTerminal()).append("_LOGOUT&errorCode=ok&companycode=").append(companycode).append("&LOGOUT_ENTRY=0");
+					.append(getTerminal()).append("_LOGOUT&errorCode=ok&extend1=").append(extend1).append("&LOGOUT_ENTRY=0");
 		}else{
 		}else{
 			parameter.append("LOG_RESULT=0&interfacename=").append(system).append("_")
 			parameter.append("LOG_RESULT=0&interfacename=").append(system).append("_")
-					.append(getTerminal()).append("_OPERATION&errorCode=ok&companycode=").append(companycode);
+					.append(getTerminal()).append("_OPERATION&errorCode=ok&extend1=").append(extend1);
 		}
 		}
 		return parameter.toString();
 		return parameter.toString();
 	}
 	}

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

@@ -116,6 +116,9 @@ public class MessageConnector {
 
 
 	public static final String TYPE_MIND_FILESHARE = "mind_fileShare";
 	public static final String TYPE_MIND_FILESHARE = "mind_fileShare";
 
 
+	//IM 聊天消息发送
+	public static final String TYPE_IM_CREATE = "im_create";
+
 	public static final String CONSUME_WS = "ws";
 	public static final String CONSUME_WS = "ws";
 
 
 	public static final String CONSUME_PMS = "pms";
 	public static final String CONSUME_PMS = "pms";

+ 199 - 4
o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/DocumentTools.java

@@ -1,14 +1,14 @@
 package com.x.base.core.project.tools;
 package com.x.base.core.project.tools;
 
 
-import java.io.BufferedWriter;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
+import java.io.*;
 import java.net.HttpURLConnection;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.net.URL;
 import java.util.Objects;
 import java.util.Objects;
 
 
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.tika.Tika;
 import org.apache.tika.Tika;
@@ -23,6 +23,8 @@ import com.x.base.core.project.jaxrs.WrapString;
 
 
 public class DocumentTools {
 public class DocumentTools {
 
 
+	private static Logger logger = LoggerFactory.getLogger(DocumentTools.class);
+
 	private static final String CRLF = StringUtils.CR + StringUtils.LF;
 	private static final String CRLF = StringUtils.CR + StringUtils.LF;
 	private static final String twoHyphens = "--";
 	private static final String twoHyphens = "--";
 
 
@@ -240,4 +242,197 @@ public class DocumentTools {
 		}
 		}
 	}
 	}
 
 
+	public static byte[] toHtml(String fileName, byte[] bytes) throws Exception {
+
+		String type = FilenameUtils.getExtension(fileName);
+		if(StringUtils.isEmpty(type)){
+			return null;
+		}else{
+			type = type.toLowerCase();
+		}
+		String toHtmlType = "#doc#docx#xls#xlsx#ppt#pptx";
+		if(toHtmlType.indexOf(type) == -1){
+			return null;
+		}
+		try {
+			if(!Config.collect().connect()){
+				return null;
+			}
+
+			URL serverUrl = new URL(Config.collect().url() + "/o2_collect_assemble/jaxrs/document/to/html");
+
+			HttpURLConnection connection = (HttpURLConnection) serverUrl.openConnection();
+
+			String boundary = "----" + StringTools.uniqueToken();
+
+			connection.setRequestMethod("POST");
+			connection.setDoOutput(true);
+			connection.setUseCaches(false);
+			connection.addRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
+
+			try (OutputStream out = connection.getOutputStream();
+				 BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out))) {
+				writer.write(twoHyphens + boundary);
+				writer.write(CRLF);
+				writer.write("Content-Disposition: form-data; name=\"file\"; filename=\""
+						+ (StringUtils.isEmpty(fileName) ? StringTools.uniqueToken() : fileName) + "\"");
+				writer.write(CRLF);
+				writer.write("Content-Type: " + HttpMediaType.APPLICATION_OCTET_STREAM);
+				writer.write(CRLF);
+				writer.write(CRLF);
+				writer.flush();
+				out.write(bytes);
+				out.flush();
+				writer.write(CRLF);
+				writer.write(twoHyphens + boundary);
+
+				writer.write(CRLF);
+				writer.write("Content-Disposition: form-data; name=\"name\"");
+				writer.write(CRLF);
+				writer.write("Content-Type: " + HttpMediaType.TEXT_PLAIN);
+				writer.write(CRLF);
+				writer.write(CRLF);
+				writer.write(Config.collect().getName());
+				writer.write(CRLF);
+				writer.write(twoHyphens + boundary);
+
+				writer.write(CRLF);
+				writer.write("Content-Disposition: form-data; name=\"password\"");
+				writer.write(CRLF);
+				writer.write("Content-Type: " + HttpMediaType.TEXT_PLAIN);
+				writer.write(CRLF);
+				writer.write(CRLF);
+				writer.write(Config.collect().getPassword());
+				writer.write(CRLF);
+				writer.write(twoHyphens + boundary);
+
+				writer.write(CRLF);
+				writer.write("Content-Disposition: form-data; name=\"type\"");
+				writer.write(CRLF);
+				writer.write("Content-Type: " + HttpMediaType.TEXT_PLAIN);
+				writer.write(CRLF);
+				writer.write(CRLF);
+				writer.write(type);
+				writer.write(CRLF);
+				writer.write(twoHyphens + boundary);
+
+				writer.write(twoHyphens);
+				writer.flush();
+			}
+
+			String respText = null;
+
+			try (InputStream in = connection.getInputStream()) {
+				respText = IOUtils.toString(in, DefaultCharset.charset_utf_8);
+			}
+
+			if (StringUtils.isNotEmpty(respText)) {
+				ActionResponse response = XGsonBuilder.instance().fromJson(respText, ActionResponse.class);
+				WrapString wrap = XGsonBuilder.instance().fromJson(response.getData(), WrapString.class);
+				return Base64.decodeBase64(wrap.getValue());
+			}
+		} catch (Exception e) {
+			logger.warn(fileName+"-转换html异常:"+e.getMessage());
+			return null;
+		}
+		return null;
+	}
+
+	public static byte[] toPdf2(String fileName, byte[] bytes) throws Exception {
+
+		String type = FilenameUtils.getExtension(fileName);
+		if(StringUtils.isEmpty(type)){
+			return null;
+		}else{
+			type = type.toLowerCase();
+		}
+		String toHtmlType = "#doc#docx#xls#xlsx#ppt#pptx";
+		if(toHtmlType.indexOf(type) == -1){
+			return null;
+		}
+		try {
+			if(!Config.collect().connect()){
+				return null;
+			}
+
+			URL serverUrl = new URL(Config.collect().url() + "/o2_collect_assemble/jaxrs/document/to/pdf2");
+
+			HttpURLConnection connection = (HttpURLConnection) serverUrl.openConnection();
+
+			String boundary = "----" + StringTools.uniqueToken();
+
+			connection.setRequestMethod("POST");
+			connection.setDoOutput(true);
+			connection.setUseCaches(false);
+			connection.addRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
+
+			try (OutputStream out = connection.getOutputStream();
+				 BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out))) {
+				writer.write(twoHyphens + boundary);
+				writer.write(CRLF);
+				writer.write("Content-Disposition: form-data; name=\"file\"; filename=\""
+						+ (StringUtils.isEmpty(fileName) ? StringTools.uniqueToken() : fileName) + "\"");
+				writer.write(CRLF);
+				writer.write("Content-Type: " + HttpMediaType.APPLICATION_OCTET_STREAM);
+				writer.write(CRLF);
+				writer.write(CRLF);
+				writer.flush();
+				out.write(bytes);
+				out.flush();
+				writer.write(CRLF);
+				writer.write(twoHyphens + boundary);
+
+				writer.write(CRLF);
+				writer.write("Content-Disposition: form-data; name=\"name\"");
+				writer.write(CRLF);
+				writer.write("Content-Type: " + HttpMediaType.TEXT_PLAIN);
+				writer.write(CRLF);
+				writer.write(CRLF);
+				writer.write(Config.collect().getName());
+				writer.write(CRLF);
+				writer.write(twoHyphens + boundary);
+
+				writer.write(CRLF);
+				writer.write("Content-Disposition: form-data; name=\"password\"");
+				writer.write(CRLF);
+				writer.write("Content-Type: " + HttpMediaType.TEXT_PLAIN);
+				writer.write(CRLF);
+				writer.write(CRLF);
+				writer.write(Config.collect().getPassword());
+				writer.write(CRLF);
+				writer.write(twoHyphens + boundary);
+
+				writer.write(CRLF);
+				writer.write("Content-Disposition: form-data; name=\"type\"");
+				writer.write(CRLF);
+				writer.write("Content-Type: " + HttpMediaType.TEXT_PLAIN);
+				writer.write(CRLF);
+				writer.write(CRLF);
+				writer.write(type);
+				writer.write(CRLF);
+				writer.write(twoHyphens + boundary);
+
+				writer.write(twoHyphens);
+				writer.flush();
+			}
+
+			String respText = null;
+
+			try (InputStream in = connection.getInputStream()) {
+				respText = IOUtils.toString(in, DefaultCharset.charset_utf_8);
+			}
+
+			if (StringUtils.isNotEmpty(respText)) {
+				ActionResponse response = XGsonBuilder.instance().fromJson(respText, ActionResponse.class);
+				WrapString wrap = XGsonBuilder.instance().fromJson(response.getData(), WrapString.class);
+				return Base64.decodeBase64(wrap.getValue());
+			}
+		} catch (Exception e) {
+			logger.warn(fileName+"-转换pdf异常:"+e.getMessage());
+			return null;
+		}
+		return null;
+	}
+
+
 }
 }

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

@@ -1,7 +1,10 @@
 package com.x.base.core.project.tools;
 package com.x.base.core.project.tools;
 
 
 import java.io.File;
 import java.io.File;
+import java.util.*;
 
 
+import com.x.base.core.project.gson.GsonPropertyObject;
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 
 
 public class FileTools {
 public class FileTools {
@@ -15,8 +18,116 @@ public class FileTools {
 		}
 		}
 	}
 	}
 
 
+	/**
+	 * 创建目录-递归父级
+	 * @param dist
+	 * @throws Exception
+	 */
+	public static void forceMkdir(File dist) throws Exception {
+		if(!dist.exists()){
+			File parent = dist.getParentFile();
+			forceMkdir(parent);
+			FileUtils.forceMkdir(dist);
+		}
+	}
+
+	/**
+	 * 获取文件夹下所有的文件 + 模糊查询(当不需要模糊查询时,queryStr传空或null即可)
+	 * @param folderPath 路径
+	 * @param queryStr 模糊查询字符串
+	 * @return
+	 */
+	public static Map<String, List<FileInfo>> getFiles(String folderPath, String queryStr, String splitPath) {
+		Map<String, List<FileInfo>> map = new HashMap<>();
+		List<FileInfo> files = new ArrayList<>();
+		List<FileInfo> folders = new ArrayList<>();
+		File f = new File(folderPath);
+		if (f.exists()) {
+			if(!f.isDirectory()){ //路径为文件
+				String path = f.getAbsolutePath().replaceAll("\\\\","/");
+				if(StringUtils.isNotEmpty(splitPath) && f.getAbsolutePath().indexOf(splitPath) > -1){
+					path = StringUtils.substringAfter(path, splitPath);
+				}
+				if(StringUtils.isEmpty(queryStr) || f.getName().indexOf(queryStr)!=-1) {
+					files.add(new FileInfo(path, f.getName(), "file", f.lastModified()));
+				}
+			}else{ //路径为文件夹
+				File fa[] = f.listFiles();
+				for (int i = 0; i < fa.length; i++) {
+					File fs = fa[i];
+					String path = fs.getAbsolutePath().replaceAll("\\\\","/");
+					if(StringUtils.isNotEmpty(splitPath) && path.indexOf(splitPath) > -1){
+						path = StringUtils.substringAfter(path, splitPath);
+					}
+					if(StringUtils.isEmpty(queryStr) || fs.getName().indexOf(queryStr)!=-1){
+						if (fs.isDirectory()) {
+							folders.add(new FileInfo(path, fs.getName(), "folder", f.lastModified()));
+						} else {
+							files.add(new FileInfo(path, fs.getName(), "file", f.lastModified()));
+						}
+					}
+				}
+			}
+		}
+		map.put("files", files);
+		map.put("folders", folders);
+		return map;
+	}
+
 	public static File parent(File file) {
 	public static File parent(File file) {
 		return new File(parent(file.getAbsolutePath()));
 		return new File(parent(file.getAbsolutePath()));
 	}
 	}
 
 
+	public static class FileInfo extends GsonPropertyObject {
+
+		private String filePath;
+
+		private String fileName;
+
+		private String fileType;
+
+		private Date lastModifyTime;
+
+		public FileInfo(){}
+
+		public FileInfo(String filePath, String fileName, String fileType, long time){
+			this.filePath = filePath;
+			this.fileName = fileName;
+			this.fileType = fileType;
+			this.lastModifyTime = new Date(time);
+		}
+
+		public String getFilePath() {
+			return filePath;
+		}
+
+		public void setFilePath(String filePath) {
+			this.filePath = filePath;
+		}
+
+		public String getFileName() {
+			return fileName;
+		}
+
+		public void setFileName(String fileName) {
+			this.fileName = fileName;
+		}
+
+		public String getFileType() {
+			return fileType;
+		}
+
+		public void setFileType(String fileType) {
+			this.fileType = fileType;
+		}
+
+		public Date getLastModifyTime() {
+			return lastModifyTime;
+		}
+
+		public void setLastModifyTime(Date lastModifyTime) {
+			this.lastModifyTime = lastModifyTime;
+		}
+	}
+
 }
 }

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

@@ -102,6 +102,50 @@ public class JarTools {
 		}
 		}
 	}
 	}
 
 
+	public static void unjar(File source, List<String> subs, File dist, boolean asNew) {
+		try (JarFile jarFile = new JarFile(source)) {
+			Enumeration<? extends JarEntry> entrys = jarFile.entries();
+			while (entrys.hasMoreElements()) {
+				JarEntry entry = entrys.nextElement();
+				String name = entry.getName();
+				if (name.length() < 2) {
+					continue;
+				}
+				if (subs != null) {
+					boolean flag = false;
+					for (String sub : subs) {
+						if (StringUtils.startsWith(name, sub)) {
+							flag = true;
+							break;
+						}
+					}
+					if (flag) {
+						continue;
+					}
+				}
+				if (entry.isDirectory()) {
+					File dir = new File(dist, name);
+					if (dir.exists() && name.indexOf("/") == name.lastIndexOf("/") && asNew) {
+						FileUtils.cleanDirectory(dir);
+					}
+					FileUtils.forceMkdir(dir);
+				} else {
+					File file = new File(dist, name);
+					if (file.exists()) {
+						file.delete();
+					}
+					if (!file.exists()) {
+						try (InputStream in = jarFile.getInputStream(entry)) {
+							FileUtils.copyInputStreamToFile(in, file);
+						}
+					}
+				}
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
 	public static byte[] jar(File source) {
 	public static byte[] jar(File source) {
 		try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
 		try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
 				JarOutputStream jos = new JarOutputStream(baos)) {
 				JarOutputStream jos = new JarOutputStream(baos)) {
@@ -217,6 +261,10 @@ public class JarTools {
 	public static void main(String[] args) throws Exception {
 	public static void main(String[] args) throws Exception {
 		System.out.println(StringUtils.startsWith("asdfasdf", ""));
 		System.out.println(StringUtils.startsWith("asdfasdf", ""));
 		System.out.println(StringUtils.startsWith("asdfasdf", null));
 		System.out.println(StringUtils.startsWith("asdfasdf", null));
+		File file = new File("/Users/chengjian/Desktop/temp/temp/cmcc.zip");
+		File dest = new File("/Users/chengjian/Desktop/temp/temp/update");
+		JarTools.unjar(file, "", dest, true);
+		System.out.println(StringUtils.startsWith("asdfasdf", ""));
 	}
 	}
 
 
 }
 }

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

@@ -26,6 +26,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.reflect.FieldUtils;
 import org.apache.commons.lang3.reflect.FieldUtils;
+import org.junit.Test;
 import org.slf4j.helpers.MessageFormatter;
 import org.slf4j.helpers.MessageFormatter;
 
 
 public class StringTools {
 public class StringTools {
@@ -45,6 +46,8 @@ public class StringTools {
 	public static final Pattern UUID_REGEX = Pattern
 	public static final Pattern UUID_REGEX = Pattern
 			.compile("^[a-zA-Z_0-9]{8}-[a-zA-Z_0-9]{4}-[a-zA-Z_0-9]{4}-[a-zA-Z_0-9]{4}-[a-zA-Z_0-9]{12}$");
 			.compile("^[a-zA-Z_0-9]{8}-[a-zA-Z_0-9]{4}-[a-zA-Z_0-9]{4}-[a-zA-Z_0-9]{4}-[a-zA-Z_0-9]{12}$");
 
 
+	public static final Pattern PERCENT_REGEX = Pattern.compile("^-?\\d+\\.?\\d*\\%?$");
+
 	public static final String[] SQL_LIKE = new String[] { "_", "%" };
 	public static final String[] SQL_LIKE = new String[] { "_", "%" };
 
 
 	public static final String[] SQL_LIKE_SHIFT = new String[] { "^_", "^%" };
 	public static final String[] SQL_LIKE_SHIFT = new String[] { "^_", "^%" };
@@ -168,6 +171,14 @@ public class StringTools {
 		return false;
 		return false;
 	}
 	}
 
 
+	public static boolean isPercent(String str) {
+		Matcher matcher = PERCENT_REGEX.matcher(str);
+		if (matcher.find()) {
+			return true;
+		}
+		return false;
+	}
+
 	public static boolean isMail(String str) {
 	public static boolean isMail(String str) {
 		Matcher matcher = MAIL_REGEX.matcher(str);
 		Matcher matcher = MAIL_REGEX.matcher(str);
 		if (matcher.find()) {
 		if (matcher.find()) {
@@ -439,4 +450,5 @@ public class StringTools {
 		}
 		}
 		return false;
 		return false;
 	}
 	}
+
 }
 }

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

@@ -0,0 +1,19 @@
+package com.x.base.core.project.tools;
+
+import org.apache.commons.lang3.StringUtils;
+import org.junit.Test;
+
+public class URLTools {
+
+	public static String getQueryStringParameter(String queryString, String name) {
+		String value = StringUtils.substringAfter(queryString, name + "=");
+		if (StringUtils.contains(value, "&")) {
+			return StringUtils.substringBefore(value, "&");
+		} else if (StringUtils.contains(value, "!")) {
+			return StringUtils.substringBefore(value, "!");
+		} else {
+			return value;
+		}
+	}
+
+}

+ 3 - 1
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_message_assemble_communicate.java

@@ -6,7 +6,9 @@ import com.x.base.core.project.annotation.ModuleType;
 
 
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "消息通讯", packageName = "com.x.message.assemble.communicate", containerEntities = {
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "消息通讯", packageName = "com.x.message.assemble.communicate", containerEntities = {
 		"com.x.message.core.entity.Instant", "com.x.message.core.entity.Message",
 		"com.x.message.core.entity.Instant", "com.x.message.core.entity.Message",
-		"com.x.message.core.entity.Mass" }, storeJars = { "x_message_core_entity", "x_meeting_core_entity",
+		"com.x.message.core.entity.Mass", "com.x.message.core.entity.Org",
+		"com.x.message.core.entity.IMMsg", "com.x.message.core.entity.IMConversation",
+		"com.x.message.core.entity.IMConversationExt" }, storeJars = { "x_message_core_entity", "x_meeting_core_entity",
 				"x_processplatform_core_entity", "x_organization_core_express" })
 				"x_processplatform_core_entity", "x_organization_core_express" })
 public class x_message_assemble_communicate extends Deployable {
 public class x_message_assemble_communicate extends Deployable {
 }
 }

+ 10 - 8
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_assemble_designer.java

@@ -6,16 +6,17 @@ import com.x.base.core.project.annotation.ModuleCategory;
 import com.x.base.core.project.annotation.ModuleType;
 import com.x.base.core.project.annotation.ModuleType;
 
 
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "流程设计", packageName = "com.x.processplatform.assemble.designer", containerEntities = {
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "流程设计", packageName = "com.x.processplatform.assemble.designer", containerEntities = {
+		"com.x.processplatform.core.entity.content.DocumentVersion", "com.x.processplatform.core.entity.content.Draft",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.processplatform.core.entity.content.Read",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.processplatform.core.entity.content.Read",
 		"com.x.processplatform.core.entity.content.ReadCompleted", "com.x.processplatform.core.entity.content.Review",
 		"com.x.processplatform.core.entity.content.ReadCompleted", "com.x.processplatform.core.entity.content.Review",
-		"com.x.processplatform.core.entity.content.Hint", "com.x.processplatform.core.entity.content.SerialNumber",
+		"com.x.processplatform.core.entity.content.Record", "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.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.Work", "com.x.processplatform.core.entity.content.WorkCompleted",
-		"com.x.processplatform.core.entity.content.WorkLog", "com.x.processplatform.core.entity.element.Invoke",
-		"com.x.processplatform.core.entity.element.Message", "com.x.processplatform.core.entity.element.Split",
-		"com.x.processplatform.core.entity.element.File", "com.x.processplatform.core.entity.element.Form",
-		"com.x.processplatform.core.entity.element.FormVersion", "com.x.processplatform.core.entity.element.FormField",
-		"com.x.processplatform.core.entity.element.TemplateForm",
+		"com.x.processplatform.core.entity.content.WorkLog", "com.x.processplatform.core.entity.content.Record",
+		"com.x.processplatform.core.entity.element.Invoke", "com.x.processplatform.core.entity.element.Message",
+		"com.x.processplatform.core.entity.element.Split", "com.x.processplatform.core.entity.element.File",
+		"com.x.processplatform.core.entity.element.Form", "com.x.processplatform.core.entity.element.FormVersion",
+		"com.x.processplatform.core.entity.element.FormField", "com.x.processplatform.core.entity.element.TemplateForm",
 		"com.x.processplatform.core.entity.element.Application", "com.x.processplatform.core.entity.element.Script",
 		"com.x.processplatform.core.entity.element.Application", "com.x.processplatform.core.entity.element.Script",
 		"com.x.processplatform.core.entity.element.ScriptVersion", "com.x.processplatform.core.entity.element.Merge",
 		"com.x.processplatform.core.entity.element.ScriptVersion", "com.x.processplatform.core.entity.element.Merge",
 		"com.x.processplatform.core.entity.element.Agent", "com.x.processplatform.core.entity.element.Process",
 		"com.x.processplatform.core.entity.element.Agent", "com.x.processplatform.core.entity.element.Process",
@@ -29,8 +30,9 @@ import com.x.base.core.project.annotation.ModuleType;
 		"com.x.processplatform.core.entity.element.QueryView", "com.x.processplatform.core.entity.element.QueryStat",
 		"com.x.processplatform.core.entity.element.QueryView", "com.x.processplatform.core.entity.element.QueryStat",
 		"com.x.processplatform.core.entity.element.Mapping", "com.x.query.core.entity.Item",
 		"com.x.processplatform.core.entity.element.Mapping", "com.x.query.core.entity.Item",
 		"com.x.query.dynamic.entity.*" }, storeJars = { "x_organization_core_entity", "x_organization_core_express",
 		"com.x.query.dynamic.entity.*" }, storeJars = { "x_organization_core_entity", "x_organization_core_express",
-				"x_processplatform_core_entity", "x_query_core_entity" }, dynamicJars = {
-						"x_query_dynamic_entity" }, storageTypes = { StorageType.processPlatform })
+				"x_processplatform_core_entity", "x_processplatform_core_express",
+				"x_query_core_entity" }, dynamicJars = {
+						"x_query_dynamic_entity", }, storageTypes = { StorageType.processPlatform })
 public class x_processplatform_assemble_designer extends Deployable {
 public class x_processplatform_assemble_designer extends Deployable {
 
 
 }
 }

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

@@ -6,14 +6,15 @@ import com.x.base.core.project.annotation.ModuleCategory;
 import com.x.base.core.project.annotation.ModuleType;
 import com.x.base.core.project.annotation.ModuleType;
 
 
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "流程", packageName = "com.x.processplatform.assemble.surface", containerEntities = {
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "流程", packageName = "com.x.processplatform.assemble.surface", containerEntities = {
-		"com.x.processplatform.core.entity.content.Attachment", "com.x.processplatform.core.entity.content.Read",
-		"com.x.processplatform.core.entity.content.ReadCompleted", "com.x.processplatform.core.entity.content.Review",
-		"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.content.KeyLock",
-		"com.x.processplatform.core.entity.content.DocumentVersion",
-		"com.x.processplatform.core.entity.element.Agent", "com.x.processplatform.core.entity.element.Application",
+		"com.x.processplatform.core.entity.content.Draft", "com.x.processplatform.core.entity.content.Attachment",
+		"com.x.processplatform.core.entity.content.Read", "com.x.processplatform.core.entity.content.ReadCompleted",
+		"com.x.processplatform.core.entity.content.Review", "com.x.processplatform.core.entity.content.Record",
+		"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.content.Record", "com.x.processplatform.core.entity.content.KeyLock",
+		"com.x.processplatform.core.entity.content.DocumentVersion", "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.ApplicationDict",
 		"com.x.processplatform.core.entity.element.ApplicationDictItem",
 		"com.x.processplatform.core.entity.element.ApplicationDictItem",
 		"com.x.processplatform.core.entity.element.Begin", "com.x.processplatform.core.entity.element.Cancel",
 		"com.x.processplatform.core.entity.element.Begin", "com.x.processplatform.core.entity.element.Cancel",
@@ -29,6 +30,6 @@ import com.x.base.core.project.annotation.ModuleType;
 		"com.x.processplatform.core.entity.element.QueryStat", "com.x.processplatform.core.entity.element.Mapping",
 		"com.x.processplatform.core.entity.element.QueryStat", "com.x.processplatform.core.entity.element.Mapping",
 		"com.x.query.core.entity.Item" }, storageTypes = { StorageType.processPlatform }, storeJars = {
 		"com.x.query.core.entity.Item" }, storageTypes = { StorageType.processPlatform }, storeJars = {
 				"x_organization_core_entity", "x_organization_core_express", "x_processplatform_core_entity",
 				"x_organization_core_entity", "x_organization_core_express", "x_processplatform_core_entity",
-				"x_query_core_entity" })
+				"x_processplatform_core_express", "x_query_core_entity" })
 public class x_processplatform_assemble_surface extends Deployable {
 public class x_processplatform_assemble_surface extends Deployable {
 }
 }

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

@@ -0,0 +1,10 @@
+package com.x.base.core.project;
+
+import com.x.base.core.project.annotation.Module;
+import com.x.base.core.project.annotation.ModuleCategory;
+import com.x.base.core.project.annotation.ModuleType;
+
+@Module(type = ModuleType.EXPRESS, category = ModuleCategory.OFFICIAL, name = "流程接口", packageName = "com.x.processplatform.core.express")
+public class x_processplatform_core_express extends Compilable {
+
+}

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

@@ -6,13 +6,13 @@ import com.x.base.core.project.annotation.ModuleCategory;
 import com.x.base.core.project.annotation.ModuleType;
 import com.x.base.core.project.annotation.ModuleType;
 
 
 @Module(type = ModuleType.SERVICE, category = ModuleCategory.OFFICIAL, name = "流程服务", packageName = "com.x.processplatform.service.processing", containerEntities = {
 @Module(type = ModuleType.SERVICE, category = ModuleCategory.OFFICIAL, name = "流程服务", packageName = "com.x.processplatform.service.processing", containerEntities = {
-		"com.x.processplatform.core.entity.content.Attachment",
+		"com.x.processplatform.core.entity.content.Draft", "com.x.processplatform.core.entity.content.Attachment",
 		"com.x.processplatform.core.entity.content.TaskCompleted",
 		"com.x.processplatform.core.entity.content.TaskCompleted",
 		"com.x.processplatform.core.entity.content.ReadCompleted", "com.x.processplatform.core.entity.content.Review",
 		"com.x.processplatform.core.entity.content.ReadCompleted", "com.x.processplatform.core.entity.content.Review",
-		"com.x.processplatform.core.entity.content.Hint", "com.x.processplatform.core.entity.content.WorkCompleted",
-		"com.x.processplatform.core.entity.content.WorkLog", "com.x.processplatform.core.entity.content.Task",
-		"com.x.processplatform.core.entity.content.Work", "com.x.processplatform.core.entity.content.Read",
-		"com.x.processplatform.core.entity.content.DocumentVersion",
+		"com.x.processplatform.core.entity.content.Record", "com.x.processplatform.core.entity.content.WorkCompleted",
+		"com.x.processplatform.core.entity.content.WorkLog", "com.x.processplatform.core.entity.content.Record",
+		"com.x.processplatform.core.entity.content.Task", "com.x.processplatform.core.entity.content.Work",
+		"com.x.processplatform.core.entity.content.Read", "com.x.processplatform.core.entity.content.DocumentVersion",
 		"com.x.processplatform.core.entity.content.SerialNumber", "com.x.processplatform.core.entity.element.End",
 		"com.x.processplatform.core.entity.content.SerialNumber", "com.x.processplatform.core.entity.element.End",
 		"com.x.processplatform.core.entity.element.Application",
 		"com.x.processplatform.core.entity.element.Application",
 		"com.x.processplatform.core.entity.element.ApplicationDict",
 		"com.x.processplatform.core.entity.element.ApplicationDict",
@@ -30,7 +30,7 @@ import com.x.base.core.project.annotation.ModuleType;
 		"com.x.processplatform.core.entity.log.ProcessingError", "com.x.query.core.entity.Item",
 		"com.x.processplatform.core.entity.log.ProcessingError", "com.x.query.core.entity.Item",
 		"com.x.query.dynamic.entity.*" }, storageTypes = { StorageType.processPlatform }, storeJars = {
 		"com.x.query.dynamic.entity.*" }, storageTypes = { StorageType.processPlatform }, storeJars = {
 				"x_organization_core_entity", "x_organization_core_express", "x_processplatform_core_entity",
 				"x_organization_core_entity", "x_organization_core_express", "x_processplatform_core_entity",
-				"x_query_core_entity" }, dynamicJars = { "x_query_dynamic_entity" })
+				"x_processplatform_core_express", "x_query_core_entity" }, dynamicJars = { "x_query_dynamic_entity" })
 public class x_processplatform_service_processing extends Deployable {
 public class x_processplatform_service_processing extends Deployable {
 
 
 }
 }

+ 10 - 9
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_query_assemble_designer.java

@@ -6,15 +6,16 @@ import com.x.base.core.project.annotation.ModuleCategory;
 import com.x.base.core.project.annotation.ModuleType;
 import com.x.base.core.project.annotation.ModuleType;
 
 
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "数据查询设计", packageName = "com.x.query.assemble.designer", containerEntities = {
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "数据查询设计", packageName = "com.x.query.assemble.designer", containerEntities = {
-		"com.x.query.core.entity.Item", "com.x.query.core.entity.Query", "com.x.query.core.entity.View",
-		"com.x.query.core.entity.Stat", "com.x.query.core.entity.Reveal", "com.x.query.core.entity.neural.Entry",
-		"com.x.query.core.entity.neural.InText", "com.x.query.core.entity.neural.OutText",
-		"com.x.query.core.entity.neural.InValue", "com.x.query.core.entity.neural.OutValue",
-		"com.x.query.core.entity.neural.Model", "com.x.query.core.entity.schema.Table",
-		"com.x.query.core.entity.schema.Statement", "com.x.processplatform.core.entity.content.Review",
-		"com.x.processplatform.core.entity.content.Work", "com.x.processplatform.core.entity.content.WorkCompleted",
-		"com.x.processplatform.core.entity.content.Task", "com.x.processplatform.core.entity.content.TaskCompleted",
-		"com.x.processplatform.core.entity.content.Read", "com.x.processplatform.core.entity.content.ReadCompleted",
+		"com.x.query.core.entity.program.Argument", "com.x.query.core.entity.Item", "com.x.query.core.entity.Query",
+		"com.x.query.core.entity.View", "com.x.query.core.entity.Stat", "com.x.query.core.entity.Reveal",
+		"com.x.query.core.entity.neural.Entry", "com.x.query.core.entity.neural.InText",
+		"com.x.query.core.entity.neural.OutText", "com.x.query.core.entity.neural.InValue",
+		"com.x.query.core.entity.neural.OutValue", "com.x.query.core.entity.neural.Model",
+		"com.x.query.core.entity.schema.Table", "com.x.query.core.entity.schema.Statement",
+		"com.x.processplatform.core.entity.content.Review", "com.x.processplatform.core.entity.content.Work",
+		"com.x.processplatform.core.entity.content.WorkCompleted", "com.x.processplatform.core.entity.content.Task",
+		"com.x.processplatform.core.entity.content.TaskCompleted", "com.x.processplatform.core.entity.content.Read",
+		"com.x.processplatform.core.entity.content.ReadCompleted",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.cms.core.entity.Document",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.cms.core.entity.Document",
 		"com.x.cms.core.entity.AppInfo", "com.x.cms.core.entity.CategoryInfo", "com.x.cms.core.entity.Review",
 		"com.x.cms.core.entity.AppInfo", "com.x.cms.core.entity.CategoryInfo", "com.x.cms.core.entity.Review",
 		"com.x.query.dynamic.entity.*" }, storageTypes = { StorageType.processPlatform }, storeJars = {
 		"com.x.query.dynamic.entity.*" }, storageTypes = { StorageType.processPlatform }, storeJars = {

+ 11 - 10
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_query_assemble_surface.java

@@ -6,16 +6,17 @@ import com.x.base.core.project.annotation.ModuleCategory;
 import com.x.base.core.project.annotation.ModuleType;
 import com.x.base.core.project.annotation.ModuleType;
 
 
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "数据查询", packageName = "com.x.query.assemble.surface", containerEntities = {
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "数据查询", packageName = "com.x.query.assemble.surface", containerEntities = {
-		"com.x.query.core.entity.Item", "com.x.query.core.entity.Query", "com.x.query.core.entity.View",
-		"com.x.query.core.entity.Stat", "com.x.query.core.entity.Reveal", "com.x.query.core.entity.segment.Word",
-		"com.x.query.core.entity.segment.Entry", "com.x.query.core.entity.neural.Entry",
-		"com.x.query.core.entity.neural.InText", "com.x.query.core.entity.neural.OutText",
-		"com.x.query.core.entity.neural.InValue", "com.x.query.core.entity.neural.OutValue",
-		"com.x.query.core.entity.neural.Model", "com.x.query.core.entity.schema.Table",
-		"com.x.query.core.entity.schema.Statement", "com.x.processplatform.core.entity.content.Task",
-		"com.x.processplatform.core.entity.content.TaskCompleted", "com.x.processplatform.core.entity.content.Read",
-		"com.x.processplatform.core.entity.content.ReadCompleted", "com.x.processplatform.core.entity.content.Review",
-		"com.x.processplatform.core.entity.content.Work", "com.x.processplatform.core.entity.content.WorkCompleted",
+		"com.x.query.core.entity.program.Argument", "com.x.query.core.entity.Item", "com.x.query.core.entity.Query",
+		"com.x.query.core.entity.View", "com.x.query.core.entity.Stat", "com.x.query.core.entity.Reveal",
+		"com.x.query.core.entity.segment.Word", "com.x.query.core.entity.segment.Entry",
+		"com.x.query.core.entity.neural.Entry", "com.x.query.core.entity.neural.InText",
+		"com.x.query.core.entity.neural.OutText", "com.x.query.core.entity.neural.InValue",
+		"com.x.query.core.entity.neural.OutValue", "com.x.query.core.entity.neural.Model",
+		"com.x.query.core.entity.schema.Table", "com.x.query.core.entity.schema.Statement",
+		"com.x.processplatform.core.entity.content.Task", "com.x.processplatform.core.entity.content.TaskCompleted",
+		"com.x.processplatform.core.entity.content.Read", "com.x.processplatform.core.entity.content.ReadCompleted",
+		"com.x.processplatform.core.entity.content.Review", "com.x.processplatform.core.entity.content.Work",
+		"com.x.processplatform.core.entity.content.WorkCompleted",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.cms.core.entity.Document",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.cms.core.entity.Document",
 		"com.x.cms.core.entity.Review", "com.x.cms.core.entity.AppInfo", "com.x.cms.core.entity.CategoryInfo",
 		"com.x.cms.core.entity.Review", "com.x.cms.core.entity.AppInfo", "com.x.cms.core.entity.CategoryInfo",
 		"com.x.query.dynamic.entity.*" }, storageTypes = { StorageType.processPlatform, StorageType.cms }, storeJars = {
 		"com.x.query.dynamic.entity.*" }, storageTypes = { StorageType.processPlatform, StorageType.cms }, storeJars = {

+ 11 - 11
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_query_service_processing.java

@@ -6,20 +6,20 @@ import com.x.base.core.project.annotation.ModuleCategory;
 import com.x.base.core.project.annotation.ModuleType;
 import com.x.base.core.project.annotation.ModuleType;
 
 
 @Module(type = ModuleType.SERVICE, category = ModuleCategory.OFFICIAL, name = "数据查询服务", packageName = "com.x.query.service.processing", containerEntities = {
 @Module(type = ModuleType.SERVICE, category = ModuleCategory.OFFICIAL, name = "数据查询服务", packageName = "com.x.query.service.processing", containerEntities = {
-
-		"com.x.query.core.entity.Item", "com.x.query.core.entity.Query", "com.x.query.core.entity.View",
-		"com.x.query.core.entity.Stat", "com.x.query.core.entity.Reveal", "com.x.query.core.entity.segment.Word",
-		"com.x.query.core.entity.segment.Entry", "com.x.query.core.entity.neural.Entry",
-		"com.x.query.core.entity.neural.InText", "com.x.query.core.entity.neural.OutText",
-		"com.x.query.core.entity.neural.InValue", "com.x.query.core.entity.neural.OutValue",
-		"com.x.query.core.entity.neural.Model", "com.x.query.core.entity.schema.*",
-		"com.x.processplatform.core.entity.content.Review", "com.x.processplatform.core.entity.content.Work",
-		"com.x.processplatform.core.entity.content.WorkCompleted",
+		"com.x.query.core.entity.program.Argument", "com.x.query.core.entity.Item", "com.x.query.core.entity.Query",
+		"com.x.query.core.entity.View", "com.x.query.core.entity.Stat", "com.x.query.core.entity.Reveal",
+		"com.x.query.core.entity.segment.Word", "com.x.query.core.entity.segment.Entry",
+		"com.x.query.core.entity.neural.Entry", "com.x.query.core.entity.neural.InText",
+		"com.x.query.core.entity.neural.OutText", "com.x.query.core.entity.neural.InValue",
+		"com.x.query.core.entity.neural.OutValue", "com.x.query.core.entity.neural.Model",
+		"com.x.query.core.entity.schema.*", "com.x.processplatform.core.entity.content.Review",
+		"com.x.processplatform.core.entity.content.Work", "com.x.processplatform.core.entity.content.WorkCompleted",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.cms.core.entity.Document",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.cms.core.entity.Document",
 		"com.x.cms.core.entity.FileInfo", "com.x.cms.core.entity.AppInfo",
 		"com.x.cms.core.entity.FileInfo", "com.x.cms.core.entity.AppInfo",
 		"com.x.cms.core.entity.CategoryInfo" }, storageTypes = { StorageType.processPlatform,
 		"com.x.cms.core.entity.CategoryInfo" }, storageTypes = { StorageType.processPlatform,
-				StorageType.cms }, storeJars = { "x_query_core_entity", "x_organization_core_entity",
-						"x_organization_core_express", "x_processplatform_core_entity", "x_cms_core_entity" })
+				StorageType.cms }, storeJars = { "x_query_core_express", "x_query_core_entity",
+						"x_organization_core_entity", "x_organization_core_express", "x_processplatform_core_entity",
+						"x_cms_core_entity" })
 public class x_query_service_processing extends Deployable {
 public class x_query_service_processing extends Deployable {
 
 
 }
 }

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

@@ -1,6 +1,8 @@
 package com.x.base.core.project.gson;
 package com.x.base.core.project.gson;
 
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.Date;
+import java.util.List;
 
 
 import org.junit.Test;
 import org.junit.Test;
 
 
@@ -11,11 +13,25 @@ public class TestClient {
 	public void test() throws Exception {
 	public void test() throws Exception {
 		System.out.println(Crypto.encrypt("张学良#" + (new Date()).getTime(), "12345678"));
 		System.out.println(Crypto.encrypt("张学良#" + (new Date()).getTime(), "12345678"));
 	}
 	}
-	
+
 	@Test
 	@Test
 	public void test1() throws Exception {
 	public void test1() throws Exception {
 		System.out.println(String.class.getTypeName());
 		System.out.println(String.class.getTypeName());
 	}
 	}
 
 
+	@Test
+	public void test2() throws Exception {
+
+		List<String> aaa = new ArrayList<>();
+		aaa.add("abc");
+		aaa.add("efg");
+		aaa.add("hij");
+		System.out.println(aaa);
+	
+		aaa.remove(0);
+		for (String s : aaa) {
+			System.out.println(s);
+		}
+	}
 
 
 }
 }

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

@@ -1,5 +1,7 @@
 package com.x.base.core.project.test.gson;
 package com.x.base.core.project.test.gson;
 
 
+import java.util.Date;
+
 import org.junit.Test;
 import org.junit.Test;
 
 
 import com.google.gson.JsonElement;
 import com.google.gson.JsonElement;
@@ -14,4 +16,9 @@ public class TestClient {
 		JsonElement b = XGsonBuilder.instance().fromJson(bbb, JsonElement.class);
 		JsonElement b = XGsonBuilder.instance().fromJson(bbb, JsonElement.class);
 		System.out.println(XGsonBuilder.merge(a, b));
 		System.out.println(XGsonBuilder.merge(a, b));
 	}
 	}
+	@Test
+	public void test1() throws Exception {
+		Date date = new Date();
+		System.out.println(date.getTime());
+	}
 }
 }

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

@@ -0,0 +1,55 @@
+package com.x.base.core.project.test.hanlp;
+
+import java.io.File;
+import java.util.List;
+
+import org.apache.commons.io.FileUtils;
+import org.junit.Test;
+
+import com.hankcs.hanlp.HanLP;
+import com.x.base.core.project.tools.DefaultCharset;
+
+public class TestClient {
+	@Test
+	public void test() throws Exception {
+		String value = FileUtils.readFileToString(new File("d:/aaa.txt"), DefaultCharset.charset_utf_8);
+		List<String> list = HanLP.extractSummary(value, 10);
+		System.out.println(list);
+	}
+
+//	@Test
+//	public void test1() throws Exception {
+//		String value = FileUtils.readFileToString(new File("d:/aaa.txt"), DefaultCharset.charset_utf_8);
+//		String str = HanLP.extractKeyword(document, size)(value, 10);
+//		System.out.println(str);
+//	}
+	
+	@Test
+	public void test2() throws Exception {
+		String value = FileUtils.readFileToString(new File("d:/aaa.txt"), DefaultCharset.charset_utf_8);
+		List<String> list = HanLP.extractKeyword(value, 10);
+		System.out.println(list);
+	}
+	
+	
+	@Test
+	public void test3() throws Exception {
+		String value = FileUtils.readFileToString(new File("d:/aaa.txt"), DefaultCharset.charset_utf_8);
+		List<String> list = HanLP.extractPhrase(value, 10);
+		System.out.println(list);
+	}
+	
+	@Test
+	public void test4() throws Exception {
+		String value = FileUtils.readFileToString(new File("d:/aaa.txt"), DefaultCharset.charset_utf_8);
+		List<String> list = HanLP.extractSummary(value, 10);
+		System.out.println(list);
+	}
+	
+	@Test
+	public void test5() throws Exception {
+		String value = FileUtils.readFileToString(new File("d:/aaa.txt"), DefaultCharset.charset_utf_8);
+		System.out.println( HanLP.getSummary(value, 10," "));
+	}
+
+}

+ 1 - 0
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/jaxrs/replyinfo/ActionListWithSubjectForPage.java

@@ -154,6 +154,7 @@ public class ActionListWithSubjectForPage extends BaseAction {
 
 
 		@FieldDescribe("主题Id")
 		@FieldDescribe("主题Id")
 		private String subjectId = null;
 		private String subjectId = null;
+		
 		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
 		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
 
 
 		public String getSubjectId() {
 		public String getSubjectId() {

+ 10 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionListNextWithFilter.java

@@ -90,6 +90,16 @@ public class ActionListNextWithFilter extends BaseAction {
 		@FieldDescribe("扩展信息JSON内容")
 		@FieldDescribe("扩展信息JSON内容")
 		private String extContent = null;
 		private String extContent = null;
 
 
+		private Long rank;
+
+		public Long getRank() {
+			return rank;
+		}
+
+		public void setRank(Long rank) {
+			this.rank = rank;
+		}
+		
 		public String getExtContent() {
 		public String getExtContent() {
 			return extContent;
 			return extContent;
 		}
 		}

Vissa filer visades inte eftersom för många filer har ändrats