roo00 6 سال پیش
والد
کامیت
0f222bccd3
100فایلهای تغییر یافته به همراه1976 افزوده شده و 905 حذف شده
  1. BIN
      o2server/commons/ext/ant.jar
  2. BIN
      o2server/commons/ext/classgraph-4.8.4.jar
  3. BIN
      o2server/commons/ext/classgraph-4.8.47.jar
  4. BIN
      o2server/commons/ext/commons-beanutils-1.9.4.jar
  5. BIN
      o2server/commons/ext/commons-codec-1.13.jar
  6. 0 3
      o2server/commons/ext/commons-codec-1.8.jar
  7. BIN
      o2server/commons/ext/commons-collections4-4.3.jar
  8. BIN
      o2server/commons/ext/commons-collections4-4.4.jar
  9. BIN
      o2server/commons/ext/commons-dbcp2-2.6.0.jar
  10. BIN
      o2server/commons/ext/commons-dbcp2-2.7.0.jar
  11. BIN
      o2server/commons/ext/commons-lang3-3.8.1.jar
  12. BIN
      o2server/commons/ext/commons-lang3-3.9.jar
  13. BIN
      o2server/commons/ext/commons-pool2-2.6.0.jar
  14. BIN
      o2server/commons/ext/commons-pool2-2.7.0.jar
  15. BIN
      o2server/commons/ext/commons-text-1.6.jar
  16. BIN
      o2server/commons/ext/commons-text-1.8.jar
  17. 0 3
      o2server/commons/ext/commons-vfs2-2.1.jar
  18. BIN
      o2server/commons/ext/commons-vfs2-2.4.1.jar
  19. 0 3
      o2server/commons/ext/cxf-core-3.1.1.jar
  20. BIN
      o2server/commons/ext/cxf-core-3.3.3.jar
  21. 0 3
      o2server/commons/ext/cxf-rt-frontend-jaxws-3.1.1.jar
  22. BIN
      o2server/commons/ext/cxf-rt-frontend-jaxws-3.3.3.jar
  23. 0 3
      o2server/commons/ext/cxf-rt-frontend-simple-3.1.1.jar
  24. BIN
      o2server/commons/ext/cxf-rt-frontend-simple-3.3.3.jar
  25. 0 3
      o2server/commons/ext/cxf-rt-wsdl-3.1.1.jar
  26. BIN
      o2server/commons/ext/cxf-rt-wsdl-3.3.3.jar
  27. 0 3
      o2server/commons/ext/fontbox-2.0.11.jar
  28. BIN
      o2server/commons/ext/fontbox-2.0.16.jar
  29. BIN
      o2server/commons/ext/hanlp-portable-1.7.4.jar
  30. BIN
      o2server/commons/ext/jetty-all-9.4.18.v20190429-uber.jar
  31. BIN
      o2server/commons/ext/jetty-all-9.4.20.v20190813-uber.jar
  32. 2 2
      o2server/commons/ext/manifest.cfg
  33. BIN
      o2server/commons/ext/mssql-jdbc-7.2.2.jre8.jar
  34. 0 3
      o2server/commons/ext/neuroph-adapters-2.94.jar
  35. BIN
      o2server/commons/ext/neuroph-adapters-2.96.jar
  36. 0 3
      o2server/commons/ext/neuroph-contrib-2.94.jar
  37. BIN
      o2server/commons/ext/neuroph-contrib-2.96.jar
  38. 0 3
      o2server/commons/ext/neuroph-core-2.94.jar
  39. BIN
      o2server/commons/ext/neuroph-core-2.96.jar
  40. 0 3
      o2server/commons/ext/neuroph-imgrec-2.94.jar
  41. BIN
      o2server/commons/ext/neuroph-imgrec-2.96.jar
  42. 0 3
      o2server/commons/ext/neuroph-ocr-2.94.jar
  43. BIN
      o2server/commons/ext/neuroph-ocr-2.96.jar
  44. 0 3
      o2server/commons/ext/pdfbox-2.0.11.jar
  45. BIN
      o2server/commons/ext/pdfbox-2.0.16.jar
  46. 0 3
      o2server/commons/ext/pdfbox-tools-2.0.11.jar
  47. BIN
      o2server/commons/ext/pdfbox-tools-2.0.16.jar
  48. BIN
      o2server/commons/ext/poi-4.1.0.jar
  49. BIN
      o2server/commons/ext/poi-examples-4.0.1.jar
  50. BIN
      o2server/commons/ext/poi-excelant-4.1.0.jar
  51. BIN
      o2server/commons/ext/poi-ooxml-4.1.0.jar
  52. BIN
      o2server/commons/ext/poi-ooxml-schemas-4.1.0.jar
  53. BIN
      o2server/commons/ext/poi-scratchpad-4.0.1.jar
  54. 0 3
      o2server/commons/ext/preflight-2.0.11.jar
  55. BIN
      o2server/commons/ext/preflight-2.0.16.jar
  56. 0 3
      o2server/commons/ext/slf4j-api-1.7.25.jar
  57. BIN
      o2server/commons/ext/slf4j-api-1.7.28.jar
  58. 0 3
      o2server/commons/ext/slf4j-simple-1.7.25.jar
  59. BIN
      o2server/commons/ext/slf4j-simple-1.7.28.jar
  60. 0 3
      o2server/commons/ext/tess4j-3.4.8.jar
  61. BIN
      o2server/commons/ext/tess4j-4.4.0.jar
  62. BIN
      o2server/commons/ext/tika-core-1.22.jar
  63. BIN
      o2server/commons/ext/tika-parsers-1.22.jar
  64. 0 3
      o2server/commons/ext/xmpbox-2.0.11.jar
  65. BIN
      o2server/commons/ext/xmpbox-2.0.16.jar
  66. 0 3
      o2server/commons/ext/xmpcore-5.1.2.jar
  67. BIN
      o2server/commons/ext/xmpcore-6.1.10.jar
  68. 0 3
      o2server/commons/ext/zxing-core-3.3.0.jar
  69. BIN
      o2server/commons/ext/zxing-core-3.4.0.jar
  70. 377 545
      o2server/pom.xml
  71. 57 3
      o2server/x_attendance_assemble_control/pom.xml
  72. 2 2
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/ThisApplication.java
  73. 15 0
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/factory/AttendanceDetailFactory.java
  74. 25 0
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/factory/AttendanceDetailMobileFactory.java
  75. 14 2
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/jaxrs/attendancedetail/ActionReciveAttendanceMobile.java
  76. 2 0
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/jaxrs/attendancedetail/BaseAction.java
  77. 0 3
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/schedule/AttendanceStatisticTask.java
  78. 26 19
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceDetailAnalyseService.java
  79. 5 0
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceDetailMobileService.java
  80. 11 0
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceDetailService.java
  81. 118 1
      o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceDetailServiceAdv.java
  82. 63 11
      o2server/x_attendance_core_entity/pom.xml
  83. 0 0
      o2server/x_attendance_core_entity/src/main/resources/SQL.sql
  84. 53 14
      o2server/x_base_core_project/pom.xml
  85. 15 5
      o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java
  86. 76 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/tools/EnhanceBaseBuilder.java
  87. 116 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/tools/EnhanceBuilder.java
  88. 114 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/tools/MetaModelBuilder.java
  89. 0 48
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/Compile.java
  90. 0 5
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/CompileA.java
  91. 0 5
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/CompileC.java
  92. 0 5
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/CompileM.java
  93. 764 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/annotation/DescribeBuilder.java
  94. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/CheckAssemble.java
  95. 1 24
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/CheckCore.java
  96. 2 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/CheckService.java
  97. 8 108
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/CreateWebXml.java
  98. 49 19
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Config.java
  99. 4 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ExternalDataSource.java
  100. 56 17
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ProcessPlatform.java

BIN
o2server/commons/ext/ant.jar


BIN
o2server/commons/ext/classgraph-4.8.4.jar


BIN
o2server/commons/ext/classgraph-4.8.47.jar


BIN
o2server/commons/ext/commons-beanutils-1.9.3.jar → o2server/commons/ext/commons-beanutils-1.9.4.jar


BIN
o2server/commons/ext/commons-codec-1.13.jar


+ 0 - 3
o2server/commons/ext/commons-codec-1.8.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:599b40b94b4a39c2550a4b5106df071aa03199b71ad5423207e2e7356aa4f8bb
-size 263865

BIN
o2server/commons/ext/commons-collections4-4.3.jar


BIN
o2server/commons/ext/commons-collections4-4.4.jar


BIN
o2server/commons/ext/commons-dbcp2-2.6.0.jar


BIN
o2server/commons/ext/commons-dbcp2-2.7.0.jar


BIN
o2server/commons/ext/commons-lang3-3.8.1.jar


BIN
o2server/commons/ext/commons-lang3-3.9.jar


BIN
o2server/commons/ext/commons-pool2-2.6.0.jar


BIN
o2server/commons/ext/commons-pool2-2.7.0.jar


BIN
o2server/commons/ext/commons-text-1.6.jar


BIN
o2server/commons/ext/commons-text-1.8.jar


+ 0 - 3
o2server/commons/ext/commons-vfs2-2.1.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4fe72e0ae7dac78fd7fb1b1684144c88f60fb4b7f0090516b42894ac6ff8ccc2
-size 441849

BIN
o2server/commons/ext/commons-vfs2-2.4.1.jar


+ 0 - 3
o2server/commons/ext/cxf-core-3.1.1.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:94d54874a86cb76b5095509783e2f828ee118e70936b5ea69765c70eac3b5ac2
-size 1340495

BIN
o2server/commons/ext/cxf-core-3.3.3.jar


+ 0 - 3
o2server/commons/ext/cxf-rt-frontend-jaxws-3.1.1.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8eb60c7a3146883c0a903b00fc4e3a42424df90c007a8fb4fdfda3daa9a942ba
-size 340895

BIN
o2server/commons/ext/cxf-rt-frontend-jaxws-3.3.3.jar


+ 0 - 3
o2server/commons/ext/cxf-rt-frontend-simple-3.1.1.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8f1c004190cfec2ec5ebbda3c50654981d6ff2e6b8be7de8602777e2edc94ebe
-size 101162

BIN
o2server/commons/ext/cxf-rt-frontend-simple-3.3.3.jar


+ 0 - 3
o2server/commons/ext/cxf-rt-wsdl-3.1.1.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f5e550e0155d5f9193b77c57dbec4544b44e3f4f2621d45723ae73feae92e9e8
-size 172386

BIN
o2server/commons/ext/cxf-rt-wsdl-3.3.3.jar


+ 0 - 3
o2server/commons/ext/fontbox-2.0.11.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5cc9968bc41417f88995fad1de15204f3b9481588cc79e9c627c596cc8faefde
-size 1557078

BIN
o2server/commons/ext/fontbox-2.0.16.jar


BIN
o2server/commons/ext/hanlp-portable-1.7.1.jar → o2server/commons/ext/hanlp-portable-1.7.4.jar


BIN
o2server/commons/ext/jetty-all-9.4.18.v20190429-uber.jar


BIN
o2server/commons/ext/jetty-all-9.4.20.v20190813-uber.jar


+ 2 - 2
o2server/commons/ext/manifest.cfg

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:1ae2dd62d6268692f1e43007c0ffad6a572bc9ef67582177da5d33db07f84119
-size 2819
+oid sha256:1af7aedf97b016f21f4c2a1748acf10fb7fe52c3a9abed97b2986dbd9775f65b
+size 2790

BIN
o2server/commons/ext/mssql-jdbc-7.2.2.jre8.jar


+ 0 - 3
o2server/commons/ext/neuroph-adapters-2.94.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:88f82e2ed29ef6d15a453a25546bdabc3019b5baee820adb4be1ffe6641f1349
-size 18090

BIN
o2server/commons/ext/neuroph-adapters-2.96.jar


+ 0 - 3
o2server/commons/ext/neuroph-contrib-2.94.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b5840f969f2f8e32c45943d56c77e50ebd7d25d8d27192551b5e51307b562465
-size 95146

BIN
o2server/commons/ext/neuroph-contrib-2.96.jar


+ 0 - 3
o2server/commons/ext/neuroph-core-2.94.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c074d7f68ec2ba6142fb82b0e854650f994a0abba0e85d0b9f5a65fe389e7940
-size 233263

BIN
o2server/commons/ext/neuroph-core-2.96.jar


+ 0 - 3
o2server/commons/ext/neuroph-imgrec-2.94.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d6bc6b3dd6a6dca048231425148f0f005895f5877844d7f80135c08e7761ffed
-size 89953

BIN
o2server/commons/ext/neuroph-imgrec-2.96.jar


+ 0 - 3
o2server/commons/ext/neuroph-ocr-2.94.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:59976f4fc1adb4f3b97b13120603b21236ab7bd78bc050ebfd7162e74d267428
-size 36639

BIN
o2server/commons/ext/neuroph-ocr-2.96.jar


+ 0 - 3
o2server/commons/ext/pdfbox-2.0.11.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:756785cafdd309e7d464c3e54228e25674ec6dece7a1e8100e8fde353fa1ce95
-size 2524580

BIN
o2server/commons/ext/pdfbox-2.0.16.jar


+ 0 - 3
o2server/commons/ext/pdfbox-tools-2.0.11.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:979a94672cf55cdfc5528b44176d32c3dcb19440d96a177de9889accfe58d8c2
-size 72756

BIN
o2server/commons/ext/pdfbox-tools-2.0.16.jar


BIN
o2server/commons/ext/poi-4.0.1.jar → o2server/commons/ext/poi-4.1.0.jar


BIN
o2server/commons/ext/poi-examples-4.0.1.jar


BIN
o2server/commons/ext/poi-excelant-4.0.1.jar → o2server/commons/ext/poi-excelant-4.1.0.jar


BIN
o2server/commons/ext/poi-ooxml-4.0.1.jar → o2server/commons/ext/poi-ooxml-4.1.0.jar


BIN
o2server/commons/ext/poi-ooxml-schemas-4.0.1.jar → o2server/commons/ext/poi-ooxml-schemas-4.1.0.jar


BIN
o2server/commons/ext/poi-scratchpad-4.0.1.jar


+ 0 - 3
o2server/commons/ext/preflight-2.0.11.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b6906e2a816b12eb85502d20e1f91240dc7c6841c3ac548f00c334631454cc6a
-size 245970

BIN
o2server/commons/ext/preflight-2.0.16.jar


+ 0 - 3
o2server/commons/ext/slf4j-api-1.7.25.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:89a3fb0d09e65450e2107dd50697a1bb1d2e59dcb9dbca35a8e6cc76c327f861
-size 41203

BIN
o2server/commons/ext/slf4j-api-1.7.28.jar


+ 0 - 3
o2server/commons/ext/slf4j-simple-1.7.25.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:bd6ad9ace5da38cb95224b3fad58bf4b4672b46dc713998fd9d230f42a93876e
-size 15257

BIN
o2server/commons/ext/slf4j-simple-1.7.28.jar


+ 0 - 3
o2server/commons/ext/tess4j-3.4.8.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:22856e30f00b22239d567a58494db0c8f6574b50b98d7b5b4dbf23dd8c451af4
-size 5212199

BIN
o2server/commons/ext/tess4j-4.4.0.jar


BIN
o2server/commons/ext/tika-core-1.20.jar → o2server/commons/ext/tika-core-1.22.jar


BIN
o2server/commons/ext/tika-parsers-1.20.jar → o2server/commons/ext/tika-parsers-1.22.jar


+ 0 - 3
o2server/commons/ext/xmpbox-2.0.11.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5b4c6c76342f0e4b3038427d0c3266a4844ea2b8bbe5f21920e9ccfd9f464b41
-size 131862

BIN
o2server/commons/ext/xmpbox-2.0.16.jar


+ 0 - 3
o2server/commons/ext/xmpcore-5.1.2.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0adcd63003aaff0a87b938f6accc2d890a2169c751a9b36881237f8546287090
-size 117333

BIN
o2server/commons/ext/xmpcore-6.1.10.jar


+ 0 - 3
o2server/commons/ext/zxing-core-3.3.0.jar

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:bba7724e02a997cec38213af77133ee8e24b0d5cf5fa7ecbc16a4fa93f11ee0d
-size 541078

BIN
o2server/commons/ext/zxing-core-3.4.0.jar


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 377 - 545
o2server/pom.xml


+ 57 - 3
o2server/x_attendance_assemble_control/pom.xml

@@ -28,15 +28,55 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-antrun-plugin</artifactId>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>exec-maven-plugin</artifactId>
 				<executions>
 					<execution>
-						<id>describe</id>
+						<id>describeBuilder</id>
 						<phase>prepare-package</phase>
+						<goals>
+							<goal>java</goal>
+						</goals>
+						<configuration>
+							<addOutputToClasspath>true</addOutputToClasspath>
+							<includePluginDependencies>true</includePluginDependencies>
+							<includeProjectDependencies>true</includeProjectDependencies>
+							<mainClass>com.x.base.core.project.annotation.DescribeBuilder</mainClass>
+							<arguments>
+								<argument>${basedir}</argument>
+								<argument>${project.build.sourceDirectory}</argument>
+							</arguments>
+						</configuration>
 					</execution>
 					<execution>
 						<id>checkAssemble</id>
 						<phase>prepare-package</phase>
+						<goals>
+							<goal>java</goal>
+						</goals>
+						<configuration>
+							<addOutputToClasspath>true</addOutputToClasspath>
+							<includePluginDependencies>true</includePluginDependencies>
+							<includeProjectDependencies>true</includeProjectDependencies>
+							<mainClass>com.x.base.core.project.build.CheckAssemble</mainClass>
+						</configuration>
+					</execution>
+					<execution>
+						<id>createWebXml</id>
+						<phase>prepare-package</phase>
+						<goals>
+							<goal>java</goal>
+						</goals>
+						<configuration>
+							<addOutputToClasspath>true</addOutputToClasspath>
+							<includePluginDependencies>true</includePluginDependencies>
+							<includeProjectDependencies>true</includeProjectDependencies>
+							<mainClass>com.x.base.core.project.build.CreateWebXml</mainClass>
+							<arguments>
+								<argument>${basedir}</argument>
+								<argument>${project.artifactId}</argument>
+							</arguments>
+						</configuration>
 					</execution>
 				</executions>
 			</plugin>
@@ -46,9 +86,23 @@
 					<execution>
 						<id>copy-war</id>
 						<phase>verify</phase>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<configuration>
+							<outputDirectory>../store</outputDirectory>
+							<resources>
+								<resource>
+									<directory>target</directory>
+									<includes>
+										<include>${project.artifactId}.war</include>
+									</includes>
+								</resource>
+							</resources>
+						</configuration>
 					</execution>
 				</executions>
 			</plugin>
 		</plugins>
 	</build>
-</project>
+</project>

+ 2 - 2
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/ThisApplication.java

@@ -19,7 +19,7 @@ public class ThisApplication {
 		try {
 			new AttendanceSettingService().initAllSystemConfig();
 			context.schedule(AttendanceStatisticTask.class, "0 0 0/4 * * ?");
-			context.schedule(MobileRecordAnalyseTask.class, "0 0 1/4 * * ?");
+			context.schedule(MobileRecordAnalyseTask.class, "0 0/10 * * * ?");
 
 		} catch (Exception e) {
 			e.printStackTrace();
@@ -38,4 +38,4 @@ public class ThisApplication {
 			e.printStackTrace();
 		}
 	}
-}
+}

+ 15 - 0
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/factory/AttendanceDetailFactory.java

@@ -79,6 +79,21 @@ public class AttendanceDetailFactory extends AbstractFactory {
 		return em.createQuery(cq.where( p )).getResultList();
 	}
 	
+	//@MethodDescribe("根据员工姓名和打卡日期列示AttendanceDetail信息列表")
+	public List<AttendanceDetail> listDetailByEmployeeNameAndDate( String employeeName, String recordDateString ) throws Exception {
+		
+		if( employeeName == null || recordDateString == null ){
+			return null;
+		}		
+		EntityManager em = this.entityManagerContainer().get(AttendanceDetail.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<AttendanceDetail> cq = cb.createQuery(AttendanceDetail.class);
+		Root<AttendanceDetail> root = cq.from( AttendanceDetail.class);
+		Predicate p = cb.equal( root.get(AttendanceDetail_.empName),  employeeName );
+		p = cb.and( p, cb.equal( root.get(AttendanceDetail_.recordDateString ),  recordDateString ) );
+		return em.createQuery(cq.where( p )).getResultList();
+	}
+	
 	//@MethodDescribe("列示指定Id的AttendanceDetail信息列表")
 	public List<AttendanceDetail> list(List<String> ids) throws Exception {
 		List<AttendanceDetail> resultList = null;

+ 25 - 0
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/factory/AttendanceDetailMobileFactory.java

@@ -45,6 +45,29 @@ public class AttendanceDetailMobileFactory extends AbstractFactory {
 		return em.createQuery(cq.where( p )).getResultList();
 	}
 	
+	/**
+	 * 列示指定人员指定日期的所有移动打卡信息
+	 * @param empName
+	 * @param recordDateString
+	 * @return
+	 * @throws Exception
+	 */
+	public List<AttendanceDetailMobile> listAttendanceDetailMobileWithEmployee( String empName, String recordDateString) throws Exception {
+		if( empName == null || empName.isEmpty() ){
+			throw new Exception("empName is null!");
+		}
+		if( recordDateString == null || recordDateString.isEmpty() ){
+			throw new Exception("recordDateString is null!");
+		}
+		EntityManager em = this.entityManagerContainer().get(AttendanceDetailMobile.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<AttendanceDetailMobile> cq = cb.createQuery(AttendanceDetailMobile.class);
+		Root<AttendanceDetailMobile> root = cq.from( AttendanceDetailMobile.class);
+		Predicate p = cb.equal( root.get(AttendanceDetailMobile_.empName),  empName );
+		p = cb.and( p, cb.equal( root.get(AttendanceDetailMobile_.recordDateString ),  recordDateString ) );
+		return em.createQuery(cq.where( p )).getResultList();
+	}
+	
 	//@MethodDescribe("列示指定Id的AttendanceDetailMobile信息列表")
 	public List<AttendanceDetailMobile> list(List<String> ids) throws Exception {
 		List<AttendanceDetailMobile> resultList = null;
@@ -132,4 +155,6 @@ public class AttendanceDetailMobileFactory extends AbstractFactory {
 		return em.createQuery(cq.where( p )).getResultList();
 	}
 
+	
+
 }

+ 14 - 2
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/jaxrs/attendancedetail/ActionReciveAttendanceMobile.java

@@ -1,6 +1,7 @@
 package com.x.attendance.assemble.control.jaxrs.attendancedetail;
 
 import java.util.Date;
+import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 
@@ -13,6 +14,7 @@ import com.x.attendance.assemble.control.jaxrs.attendancedetail.exception.Except
 import com.x.attendance.assemble.control.jaxrs.attendancedetail.exception.ExceptionAttendanceDetailProcess;
 import com.x.attendance.assemble.control.jaxrs.attendancedetail.exception.ExceptionLatitudeEmpty;
 import com.x.attendance.assemble.control.jaxrs.attendancedetail.exception.ExceptionLongitudeEmpty;
+import com.x.attendance.entity.AttendanceDetail;
 import com.x.attendance.entity.AttendanceDetailMobile;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.http.ActionResult;
@@ -95,11 +97,11 @@ public class ActionReciveAttendanceMobile extends BaseAction {
 			if( StringUtils.isNotEmpty( wrapIn.getRecordDateString() ) ){
 				try{
 					datetime = dateOperation.getDateFromString( wrapIn.getRecordDateString() );
+					attendanceDetailMobile.setRecordDate( datetime );
 					attendanceDetailMobile.setRecordDateString( dateOperation.getDateStringFromDate( datetime, "yyyy-MM-dd") ); //打卡时间
 				}catch( Exception e ){
 					check = false;
-					Exception exception = new ExceptionAttendanceDetailProcess( e, 
-							"员工手机打卡信息中打卡日期格式异常,格式: yyyy-mm-dd. 日期:" + wrapIn.getRecordDateString() );
+					Exception exception = new ExceptionAttendanceDetailProcess( e,  "员工手机打卡信息中打卡日期格式异常,格式: yyyy-mm-dd. 日期:" + wrapIn.getRecordDateString() );
 					result.error( exception );
 					logger.error( e, currentPerson, request, null);
 				}				
@@ -111,6 +113,7 @@ public class ActionReciveAttendanceMobile extends BaseAction {
 			if( StringUtils.isNotEmpty( wrapIn.getId() )){
 				attendanceDetailMobile.setId( wrapIn.getId() );
 			}
+			
 			attendanceDetailMobile.setSignDescription( wrapIn.getSignDescription() );
 			try {
 				attendanceDetailMobile = attendanceDetailServiceAdv.save( attendanceDetailMobile );
@@ -121,6 +124,15 @@ public class ActionReciveAttendanceMobile extends BaseAction {
 				result.error( exception );
 				logger.error( e, currentPerson, request, null);
 			}
+		}
+		
+		if( check ){
+			//对该员工的所有移动考勤数据进行一个整合
+			attendanceDetailServiceAdv.pushToDetail( currentPerson.getDistinguishedName(), attendanceDetailMobile.getRecordDateString() );
+			
+			
+			
+			  
 		}
 		return result;
 	}

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

@@ -1,6 +1,7 @@
 package com.x.attendance.assemble.control.jaxrs.attendancedetail;
 
 import com.x.attendance.assemble.control.service.AttendanceDetailAnalyseServiceAdv;
+import com.x.attendance.assemble.control.service.AttendanceDetailMobileAnalyseServiceAdv;
 import com.x.attendance.assemble.control.service.AttendanceDetailServiceAdv;
 import com.x.attendance.assemble.control.service.AttendanceEmployeeConfigServiceAdv;
 import com.x.attendance.assemble.control.service.AttendanceScheduleSettingServiceAdv;
@@ -20,4 +21,5 @@ public class BaseAction extends StandardJaxrsAction{
 	protected AttendanceEmployeeConfigServiceAdv attendanceEmployeeConfigServiceAdv = new AttendanceEmployeeConfigServiceAdv();
 	protected AttendanceSelfHolidayServiceAdv attendanceSelfHolidayServiceAdv = new AttendanceSelfHolidayServiceAdv();
 	protected AttendanceScheduleSettingServiceAdv attendanceScheduleSettingServiceAdv = new AttendanceScheduleSettingServiceAdv();
+	protected AttendanceDetailMobileAnalyseServiceAdv attendanceDetailMobileAnalyseServiceAdv = new AttendanceDetailMobileAnalyseServiceAdv();
 }

+ 0 - 3
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/schedule/AttendanceStatisticTask.java

@@ -17,9 +17,6 @@ import com.x.base.core.project.logger.LoggerFactory;
 public class AttendanceStatisticTask implements Job {
 
 	private static Logger logger = LoggerFactory.getLogger(AttendanceStatisticTask.class);
-
-
-
  
 	public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
 		AttendanceStatisticServiceAdv attendanceStatisticServiceAdv = new AttendanceStatisticServiceAdv();

+ 26 - 19
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceDetailAnalyseService.java

@@ -1024,25 +1024,32 @@ public class AttendanceDetailAnalyseService {
 						}
 					}
 				}else{
-					logger.debug( debugger, ">>>>>>>>>>员工下午未打卡,属于异常状态......" );
-					//员工未签退,算缺勤了半天,出勤率: - 0.5
-					if( detail.getIsGetSelfHolidays()  && ("下午".equalsIgnoreCase(detail.getSelfHolidayDayTime()) || "全天".equalsIgnoreCase( detail.getSelfHolidayDayTime() ))){
-						logger.debug( debugger, ">>>>>>>>>>请幸运,请假不计考勤,不需要打卡,不算异常状态" );
-						detail.setLeaveEarlierTimeDuration( 0L );
-						detail.setIsLeaveEarlier( false );
-						//detail.setAttendance( detail.getAttendance() - 0.5 );
-					}else{
-						if( ( detail.getIsWeekend() && !detail.getIsWorkday()) //周末,并且未调休为工作日
-								|| detail.getIsHoliday() //或者是节假日
-							){
-							logger.debug( debugger, ">>>>>>>>>>休息天,不算异常" );
-							detail.setAbnormalDutyDayTime("无");
-							detail.setIsAbnormalDuty(false);
+					//如果打卡是今天,但是还没有到下班打卡时间
+					if(  detail.getRecordDateString().equals( dateOperation.getNowDate() )  && dateOperation.getDateFromString( detail.getRecordDateString() + " " + detail.getOffWorkTime()).after( new Date() ) ) {
+						detail.setAbnormalDutyDayTime("无");
+						detail.setIsAbnormalDuty(false);
+						logger.debug( debugger, ">>>>>>>>>>还没有到下班打卡时间,先不分析结果。" );
+					}else {
+						logger.debug( debugger, ">>>>>>>>>>员工下午未打卡,属于异常状态......" );
+						//员工未签退,算缺勤了半天,出勤率: - 0.5
+						if( detail.getIsGetSelfHolidays()  && ("下午".equalsIgnoreCase(detail.getSelfHolidayDayTime()) || "全天".equalsIgnoreCase( detail.getSelfHolidayDayTime() ))){
+							logger.debug( debugger, ">>>>>>>>>>请幸运,请假不计考勤,不需要打卡,不算异常状态" );
+							detail.setLeaveEarlierTimeDuration( 0L );
+							detail.setIsLeaveEarlier( false );
+							//detail.setAttendance( detail.getAttendance() - 0.5 );
 						}else{
-							detail.setAbnormalDutyDayTime("下午");
-							detail.setIsAbnormalDuty(true);
-							logger.debug( debugger, ">>>>>>>>>>呵呵,没请假,未打卡,算异常状态。" );
-						}
+							if( ( detail.getIsWeekend() && !detail.getIsWorkday()) //周末,并且未调休为工作日
+									|| detail.getIsHoliday() //或者是节假日
+								){
+								logger.debug( debugger, ">>>>>>>>>>休息天,不算异常" );
+								detail.setAbnormalDutyDayTime("无");
+								detail.setIsAbnormalDuty(false);
+							}else{
+								detail.setAbnormalDutyDayTime("下午");
+								detail.setIsAbnormalDuty(true);
+								logger.debug( debugger, ">>>>>>>>>>呵呵,没请假,未打卡,算异常状态。" );
+							}
+						}						
 					}
 					logger.debug( debugger, ">>>>>>>>>>全天工作时长,[下午未打卡,只算上午的工作时长] :minutes=" + detail.getWorkTimeDuration() + "分钟。" );
 				}
@@ -1070,6 +1077,7 @@ public class AttendanceDetailAnalyseService {
 					}
 				}
 			}
+			
 			detail.setRecordStatus( 1 );
 		}
 	}
@@ -1085,5 +1093,4 @@ public class AttendanceDetailAnalyseService {
 		emc.check( detail, CheckPersistType.all );
 		emc.commit();
 	}
-
 }

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

@@ -31,5 +31,10 @@ public class AttendanceDetailMobileService {
 		return business.getAttendanceDetailMobileFactory().listAllAnalyseWithStatus(status);
 	}
 
+	public List<AttendanceDetailMobile> listAttendanceDetailMobileWithEmployee(EntityManagerContainer emc, String distinguishedName, String recordDateString) throws Exception {
+		Business business =  new Business( emc );
+		return business.getAttendanceDetailMobileFactory().listAttendanceDetailMobileWithEmployee( distinguishedName, recordDateString );
+	}
+
 	
 }

+ 11 - 0
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceDetailService.java

@@ -13,6 +13,7 @@ import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.annotation.CheckPersistType;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.tools.ListTools;
 
 
 public class AttendanceDetailService {
@@ -293,5 +294,15 @@ public class AttendanceDetailService {
 	public List<String> getAllAnalysenessPersonNames(EntityManagerContainer emc, String startDate, String endDate) throws Exception {
 		Business business =  new Business( emc );
 		return business.getAttendanceDetailFactory().getAllAnalysenessPersonNames( startDate, endDate );
+	}
+
+	public AttendanceDetail listDetailWithEmployee(EntityManagerContainer emc, String employeeName, String recordDateString) throws Exception {
+		Business business =  new Business( emc );
+		List<AttendanceDetail> details =  business.getAttendanceDetailFactory().listDetailByEmployeeNameAndDate(employeeName, recordDateString);
+		if( ListTools.isNotEmpty( details )) {
+			return  details.get(0);
+		}else {
+			return null;
+		}
 	}	
 }

+ 118 - 1
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/service/AttendanceDetailServiceAdv.java

@@ -2,22 +2,33 @@ package com.x.attendance.assemble.control.service;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
 
 import com.x.attendance.assemble.common.date.DateOperation;
 import com.x.attendance.assemble.control.Business;
+import com.x.attendance.assemble.control.jaxrs.attendancedetail.exception.ExceptionAttendanceDetailProcess;
 import com.x.attendance.entity.AttendanceDetail;
 import com.x.attendance.entity.AttendanceDetailMobile;
 import com.x.attendance.entity.AttendanceEmployeeConfig;
+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;
+import com.x.base.core.entity.annotation.CheckPersistType;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.tools.ListTools;
 
 public class AttendanceDetailServiceAdv {
-	
+	private DateOperation dateOperation = new DateOperation();
 	private static  Logger logger = LoggerFactory.getLogger( AttendanceDetailServiceAdv.class );
 	private AttendanceDetailService attendanceDetailService = new AttendanceDetailService();
 	private AttendanceDetailMobileService attendanceDetailMobileService = new AttendanceDetailMobileService();
+	protected AttendanceDetailAnalyseServiceAdv attendanceDetailAnalyseServiceAdv = new AttendanceDetailAnalyseServiceAdv();
+	protected AttendanceWorkDayConfigServiceAdv attendanceWorkDayConfigServiceAdv = new AttendanceWorkDayConfigServiceAdv();
+	protected AttendanceStatisticalCycleServiceAdv attendanceStatisticCycleServiceAdv = new AttendanceStatisticalCycleServiceAdv();
 	
 	public AttendanceDetail get( String id ) throws Exception {
 		if( id == null || id.isEmpty() ){
@@ -213,4 +224,110 @@ public class AttendanceDetailServiceAdv {
 			throw e;
 		}
 	}
+
+	public void pushToDetail(String distinguishedName, String recordDateString ) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			List<AttendanceDetailMobile> mobileDetails = attendanceDetailMobileService.listAttendanceDetailMobileWithEmployee( emc, distinguishedName, recordDateString );
+			if( ListTools.isNotEmpty( mobileDetails )) {
+				AttendanceDetailMobile mobileDetail = mobileDetails.get( 0 );
+				String onDutyTime = getOnDutyTime( mobileDetails );
+				String offDutyTime = getOffDutyTime( mobileDetails );
+				
+				AttendanceDetail detail = attendanceDetailService.listDetailWithEmployee( emc, distinguishedName, recordDateString );
+				if( detail == null ) {
+					detail = new AttendanceDetail();
+					detail.setEmpNo( mobileDetail.getEmpNo() );
+					detail.setEmpName( mobileDetail.getEmpName() );
+					if( mobileDetail.getRecordDate() != null ) {
+						detail.setYearString( dateOperation.getYear( mobileDetail.getRecordDate() ) );
+						detail.setMonthString( dateOperation.getMonth( mobileDetail.getRecordDate() ) );
+					}
+					detail.setRecordDateString( mobileDetail.getRecordDateString() );
+					detail.setOnDutyTime( onDutyTime );
+					detail.setOffDutyTime( offDutyTime );
+					detail.setRecordStatus( 0 );
+					detail.setBatchName( "FromMobile_" + dateOperation.getNowTimeChar() );	
+					
+					emc.beginTransaction( AttendanceDetail.class );
+					emc.persist( detail , CheckPersistType.all );
+					emc.commit();
+				}else {
+					detail.setEmpNo( mobileDetail.getEmpNo() );
+					detail.setEmpName( mobileDetail.getEmpName() );
+					if( mobileDetail.getRecordDate() != null ) {
+						detail.setYearString( dateOperation.getYear( mobileDetail.getRecordDate() ) );
+						detail.setMonthString( dateOperation.getMonth( mobileDetail.getRecordDate() ) );
+					}
+					detail.setRecordDateString( mobileDetail.getRecordDateString() );
+					detail.setOnDutyTime( onDutyTime );
+					detail.setOffDutyTime( offDutyTime );
+					detail.setRecordStatus( 0 );
+					detail.setBatchName( "FromMobile_" + dateOperation.getNowTimeChar() );	
+					
+					emc.beginTransaction( AttendanceDetail.class );
+					emc.check( detail , CheckPersistType.all );
+					emc.commit();
+				}
+
+				emc.beginTransaction( AttendanceDetailMobile.class );
+				for( AttendanceDetailMobile detailMobile : mobileDetails ) {
+					detailMobile.setRecordStatus(1);
+					emc.check( detailMobile , CheckPersistType.all );
+				}
+				emc.commit();
+				
+				List<AttendanceWorkDayConfig> attendanceWorkDayConfigList = null;
+				Map<String, Map<String, List<AttendanceStatisticalCycle>>> topUnitAttendanceStatisticalCycleMap = null;
+				try {
+					attendanceWorkDayConfigList = attendanceWorkDayConfigServiceAdv.listAll();
+					topUnitAttendanceStatisticalCycleMap = attendanceStatisticCycleServiceAdv.getCycleMapFormAllCycles( false );
+					
+					attendanceDetailAnalyseServiceAdv.analyseAttendanceDetail( detail, attendanceWorkDayConfigList, topUnitAttendanceStatisticalCycleMap, false );
+					logger.info( ">>>>>>>>>>attendance detail analyse completed.person:" + detail.getEmpName() + ", date:" + detail.getRecordDateString());
+					
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	private String getOffDutyTime( List<AttendanceDetailMobile> mobileDetails ) throws Exception {
+		Date offDutyTime = null;
+		Date signTime = null;
+		String offDutyTimeString = null;
+		if( ListTools.isNotEmpty( mobileDetails ) && mobileDetails.size() >=2 ) {
+			for( AttendanceDetailMobile detailMobile : mobileDetails ) {
+				signTime = dateOperation.getDateFromString(detailMobile.getSignTime() );
+				if( offDutyTime != null && signTime != null && offDutyTime.before( signTime )) {
+					offDutyTime = signTime;
+					offDutyTimeString = detailMobile.getSignTime();
+				}else if( offDutyTime == null ){
+					offDutyTime = signTime;
+					offDutyTimeString = detailMobile.getSignTime();
+				}
+			}
+		}
+		return offDutyTimeString;
+	}
+
+	private String getOnDutyTime(List<AttendanceDetailMobile> mobileDetails) throws Exception {
+		Date onDutyTime = null;
+		Date signTime = null;
+		String onDutyTimeString = null;
+		for( AttendanceDetailMobile detailMobile : mobileDetails ) {
+			signTime = dateOperation.getDateFromString(detailMobile.getSignTime() );
+			if( onDutyTime != null && signTime != null && onDutyTime.after( signTime )) {
+				onDutyTime = signTime;
+				onDutyTimeString = detailMobile.getSignTime();
+			}else if( onDutyTime == null ){
+				onDutyTime = signTime;
+				onDutyTimeString = detailMobile.getSignTime();
+			}
+		}
+		return onDutyTimeString;
+	}
+	
 }

+ 63 - 11
o2server/x_attendance_core_entity/pom.xml

@@ -20,38 +20,90 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-antrun-plugin</artifactId>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>exec-maven-plugin</artifactId>
 				<executions>
 					<execution>
-						<id>metamodel</id>
+						<id>metaModelBuilder</id>
 						<phase>generate-sources</phase>
+						<goals>
+							<goal>java</goal>
+						</goals>
+						<configuration>
+							<addOutputToClasspath>true</addOutputToClasspath>
+							<includePluginDependencies>true</includePluginDependencies>
+							<includeProjectDependencies>true</includeProjectDependencies>
+							<mainClass>com.x.base.core.entity.tools.MetaModelBuilder</mainClass>
+							<arguments>
+								<argument>${basedir}</argument>
+								<argument>${project.build.sourceDirectory}</argument>
+								<argument>${project.build.outputDirectory}</argument>
+							</arguments>
+						</configuration>
 					</execution>
 					<execution>
-						<id>createEnhancePersistenceXml</id>
-						<phase>generate-resources</phase>
+						<id>enhanceBuilder</id>
+						<phase>process-classes</phase>
+						<goals>
+							<goal>java</goal>
+						</goals>
+						<configuration>
+							<addOutputToClasspath>true</addOutputToClasspath>
+							<includePluginDependencies>true</includePluginDependencies>
+							<includeProjectDependencies>true</includeProjectDependencies>
+							<mainClass>com.x.base.core.entity.tools.EnhanceBuilder</mainClass>
+							<arguments>
+								<argument>${project.build.directory}</argument>
+								<argument>${project.build.outputDirectory}</argument>
+							</arguments>
+						</configuration>
 					</execution>
 					<execution>
 						<id>checkCore</id>
 						<phase>prepare-package</phase>
+						<goals>
+							<goal>java</goal>
+						</goals>
+						<configuration>
+							<addOutputToClasspath>true</addOutputToClasspath>
+							<includePluginDependencies>true</includePluginDependencies>
+							<includeProjectDependencies>true</includeProjectDependencies>
+							<mainClass>com.x.base.core.project.build.CheckCore</mainClass>
+						</configuration>
 					</execution>
 				</executions>
 			</plugin>
 			<plugin>
-				<groupId>org.apache.openjpa</groupId>
-				<artifactId>openjpa-maven-plugin</artifactId>
+				<artifactId>maven-resources-plugin</artifactId>
 				<executions>
 					<execution>
-						<id>enhancer</id>
-						<phase>process-classes</phase>
+						<id>copy-jar</id>
+						<phase>verify</phase>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<configuration>
+							<outputDirectory>../store/jars</outputDirectory>
+							<resources>
+								<resource>
+									<directory>target</directory>
+									<includes>
+										<include>${project.artifactId}.jar</include>
+									</includes>
+								</resource>
+							</resources>
+						</configuration>
 					</execution>
 				</executions>
 			</plugin>
 			<plugin>
-				<artifactId>maven-resources-plugin</artifactId>
+				<artifactId>maven-compiler-plugin</artifactId>
 				<executions>
 					<execution>
-						<id>copy-jar</id>
-						<phase>verify</phase>
+						<phase>initialize</phase>
+						<goals>
+							<goal>compile</goal>
+						</goals>
 					</execution>
 				</executions>
 			</plugin>

+ 0 - 0
o2server/x_attendance_core_entity/src/main/resources/SQL.sql


+ 53 - 14
o2server/x_base_core_project/pom.xml

@@ -16,38 +16,77 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-antrun-plugin</artifactId>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>exec-maven-plugin</artifactId>
 				<executions>
 					<execution>
-						<id>metamodel</id>
+						<id>metaModelBuilder</id>
 						<phase>generate-sources</phase>
+						<goals>
+							<goal>java</goal>
+						</goals>
+						<configuration>
+							<addOutputToClasspath>true</addOutputToClasspath>
+							<includePluginDependencies>true</includePluginDependencies>
+							<includeProjectDependencies>true</includeProjectDependencies>
+							<mainClass>com.x.base.core.entity.tools.MetaModelBuilder</mainClass>
+							<arguments>
+								<argument>${basedir}</argument>
+								<argument>${project.build.sourceDirectory}</argument>
+								<argument>${project.build.outputDirectory}</argument>
+							</arguments>
+						</configuration>
 					</execution>
 					<execution>
-						<id>createEnhancePersistenceXml</id>
+						<id>enhanceBaseBuilder</id>
 						<phase>process-classes</phase>
-					</execution>
-					<execution>
-						<id>checkCore</id>
-						<phase>prepare-package</phase>
+						<goals>
+							<goal>java</goal>
+						</goals>
+						<configuration>
+							<addOutputToClasspath>true</addOutputToClasspath>
+							<includePluginDependencies>true</includePluginDependencies>
+							<includeProjectDependencies>true</includeProjectDependencies>
+							<mainClass>com.x.base.core.entity.tools.EnhanceBaseBuilder</mainClass>
+							<arguments>
+								<argument>${project.build.directory}</argument>
+								<argument>${project.build.outputDirectory}</argument>
+							</arguments>
+						</configuration>
 					</execution>
 				</executions>
 			</plugin>
 			<plugin>
-				<groupId>org.apache.openjpa</groupId>
-				<artifactId>openjpa-maven-plugin</artifactId>
+				<artifactId>maven-resources-plugin</artifactId>
 				<executions>
 					<execution>
-						<id>enhancer</id>
-						<phase>prepare-package</phase>
+						<id>copy-jar</id>
+						<phase>verify</phase>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<configuration>
+							<outputDirectory>../store/jars</outputDirectory>
+							<resources>
+								<resource>
+									<directory>target</directory>
+									<includes>
+										<include>${project.artifactId}.jar</include>
+									</includes>
+								</resource>
+							</resources>
+						</configuration>
 					</execution>
 				</executions>
 			</plugin>
 			<plugin>
-				<artifactId>maven-resources-plugin</artifactId>
+				<artifactId>maven-compiler-plugin</artifactId>
 				<executions>
 					<execution>
-						<id>copy-jar</id>
-						<phase>verify</phase>
+						<phase>initialize</phase>
+						<goals>
+							<goal>compile</goal>
+						</goals>
 					</execution>
 				</executions>
 			</plugin>

+ 15 - 5
o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java

@@ -28,7 +28,6 @@ import org.apache.commons.lang3.reflect.FieldUtils;
 
 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.annotation.CheckPersist;
 import com.x.base.core.entity.annotation.CheckPersistType;
 import com.x.base.core.entity.annotation.CheckRemove;
@@ -443,6 +442,17 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		return new ArrayList<T>(query.getResultList());
 	}
 
+	public <T extends JpaObject, W extends Object> List<T> listBetweenAndEqual(Class<T> cls, String attribute,
+			Object start, Object end, String equalAttribute, Object equalValue) throws Exception {
+		EntityManager em = this.get(cls);
+		Query query = em.createQuery("select o from " + cls.getName() + " o where ((o." + attribute
+				+ " between ?1 and ?2) and (o." + equalAttribute + " = ?3))");
+		query.setParameter(1, start);
+		query.setParameter(2, end);
+		query.setParameter(3, equalValue);
+		return new ArrayList<T>(query.getResultList());
+	}
+
 	public <T extends JpaObject> Long count(Class<T> cls) throws Exception {
 		EntityManager em = this.get(cls);
 		CriteriaBuilder cb = em.getCriteriaBuilder();
@@ -1351,9 +1361,9 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		Root<T> root = cq.from(clz);
 		Predicate p = cb.equal(root.get(equalAttribute), equalValue);
 		if (StringUtils.isNotEmpty(sequence)) {
-			p = cb.and(p, cb.greaterThan(root.get(JpaObject_.sequence), sequence));
+			p = cb.and(p, cb.greaterThan(root.get(JpaObject.sequence_FIELDNAME), sequence));
 		}
-		cq.select(root).where(p).orderBy(cb.asc(root.get(JpaObject_.sequence)));
+		cq.select(root).where(p).orderBy(cb.asc(root.get(JpaObject.sequence_FIELDNAME)));
 		List<T> os = em.createQuery(cq).setMaxResults((count != null && count > 0) ? count : 100).getResultList();
 		List<T> list = new ArrayList<>(os);
 		return list;
@@ -1369,9 +1379,9 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		Predicate p = cb.equal(root.get(oneEqualAttribute), oneEqualValue);
 		p = cb.and(p, cb.equal(root.get(twoEqualAttribute), twoEqualValue));
 		if (StringUtils.isNotEmpty(sequence)) {
-			p = cb.and(p, cb.greaterThan(root.get(JpaObject_.sequence), sequence));
+			p = cb.and(p, cb.greaterThan(root.get(JpaObject.sequence_FIELDNAME), sequence));
 		}
-		cq.select(root).where(p).orderBy(cb.asc(root.get(JpaObject_.sequence)));
+		cq.select(root).where(p).orderBy(cb.asc(root.get(JpaObject.sequence_FIELDNAME)));
 		List<T> os = em.createQuery(cq).setMaxResults((count != null && count > 0) ? count : 100).getResultList();
 		List<T> list = new ArrayList<>(os);
 		return list;

+ 76 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/tools/EnhanceBaseBuilder.java

@@ -0,0 +1,76 @@
+package com.x.base.core.entity.tools;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+
+import org.apache.openjpa.enhance.PCEnhancer;
+import org.apache.openjpa.lib.util.Options;
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.QName;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.XMLWriter;
+
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.entity.SliceJpaObject;
+import com.x.base.core.entity.StorageObject;
+
+public class EnhanceBaseBuilder {
+
+	public static void main(String[] args) throws Exception {
+
+		File directory = new File(args[0]);
+		File outputdir = new File(args[1]);
+
+		List<Class<?>> classes = new ArrayList<>();
+
+		classes.add(JpaObject.class);
+		classes.add(SliceJpaObject.class);
+		classes.add(StorageObject.class);
+
+		File xml = createPernsistenceXml(classes, directory);
+
+		Options opts = new Options();
+		opts.setFromCmdLine(new String[] { "-p", xml.getAbsolutePath() });
+
+		PCEnhancer.run(toPath(classes, outputdir), opts);
+
+	}
+
+	private static File createPernsistenceXml(List<Class<?>> classes, File directory) throws Exception {
+		Document document = DocumentHelper.createDocument();
+		Element persistence = document.addElement("persistence", "http://java.sun.com/xml/ns/persistence");
+		persistence.addAttribute(QName.get("schemaLocation", "xsi", "http://www.w3.org/2001/XMLSchema-instance"),
+				"http://java.sun.com/xml/ns/persistence  http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd");
+		persistence.addAttribute("version", "2.0");
+		Element unit = persistence.addElement("persistence-unit");
+		unit.addAttribute("name", "enhance");
+		for (Class<?> o : classes) {
+			Element element = unit.addElement("class");
+			element.addText(o.getCanonicalName());
+		}
+		OutputFormat format = OutputFormat.createPrettyPrint();
+		format.setEncoding("UTF-8");
+		File file = new File(directory, "persistence.xml");
+		XMLWriter writer = new XMLWriter(new FileWriter(file), format);
+		writer.write(document);
+		writer.close();
+		return file;
+	}
+
+	private static String[] toPath(List<Class<?>> classes, File outputdir) throws Exception {
+		List<String> list = new ArrayList<>();
+		for (Class<?> cls : classes) {
+			File file = new File(outputdir,
+					cls.getName().replaceAll("\\.", Matcher.quoteReplacement(File.separator)) + ".class");
+			list.add(file.getAbsolutePath());
+		}
+		String[] arr = new String[list.size()];
+		return list.toArray(arr);
+	}
+
+}

+ 116 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/tools/EnhanceBuilder.java

@@ -0,0 +1,116 @@
+package com.x.base.core.entity.tools;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.stream.Collectors;
+
+import javax.persistence.Entity;
+import javax.persistence.MappedSuperclass;
+
+import org.apache.openjpa.enhance.PCEnhancer;
+import org.apache.openjpa.lib.util.Options;
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.QName;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.XMLWriter;
+
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.entity.SliceJpaObject;
+import com.x.base.core.entity.StorageObject;
+
+import io.github.classgraph.ClassGraph;
+import io.github.classgraph.ClassInfo;
+import io.github.classgraph.ScanResult;
+
+public class EnhanceBuilder {
+
+	public static void main(String[] args) throws Exception {
+
+		File directory = new File(args[0]);
+		File outputdir = new File(args[1]);
+
+		List<Class<?>> classes = scanEnhanceClass();
+
+		if (!classes.isEmpty()) {
+
+			File xml = createPernsistenceXml(classes, directory);
+
+			Options opts = new Options();
+			opts.setFromCmdLine(new String[] { "-p", xml.getAbsolutePath() });
+
+			PCEnhancer.run(toPath(classes, outputdir), opts);
+
+		}
+	}
+
+	private static File createPernsistenceXml(List<Class<?>> classes, File directory) throws Exception {
+		Document document = DocumentHelper.createDocument();
+		Element persistence = document.addElement("persistence", "http://java.sun.com/xml/ns/persistence");
+		persistence.addAttribute(QName.get("schemaLocation", "xsi", "http://www.w3.org/2001/XMLSchema-instance"),
+				"http://java.sun.com/xml/ns/persistence  http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd");
+		persistence.addAttribute("version", "2.0");
+		Element unit = persistence.addElement("persistence-unit");
+		unit.addAttribute("name", "enhance");
+		Set<Class<?>> set = new HashSet<>();
+		for (Class<?> o : classes) {
+			set.addAll(scanMappedSuperclass(o));
+		}
+		for (Class<?> o : set) {
+			Element element = unit.addElement("class");
+			element.addText(o.getCanonicalName());
+		}
+		OutputFormat format = OutputFormat.createPrettyPrint();
+		format.setEncoding("UTF-8");
+		File file = new File(directory, "persistence.xml");
+		XMLWriter writer = new XMLWriter(new FileWriter(file), format);
+		writer.write(document);
+		writer.close();
+		return file;
+	}
+
+	private static String[] toPath(List<Class<?>> classes, File outputdir) throws Exception {
+		List<String> list = new ArrayList<>();
+		for (Class<?> cls : classes) {
+			File file = new File(outputdir,
+					cls.getTypeName().replaceAll("\\.", Matcher.quoteReplacement(File.separator)) + ".class");
+			list.add(file.getAbsolutePath());
+		}
+		String[] arr = new String[list.size()];
+		return list.toArray(arr);
+	}
+
+	private static List<Class<?>> scanEnhanceClass() throws Exception {
+		List<Class<?>> list = new ArrayList<Class<?>>();
+		try (ScanResult sr = new ClassGraph().enableAnnotationInfo().disableJarScanning().scan()) {
+			for (ClassInfo info : sr.getClassesWithAnnotation(Entity.class.getName())) {
+				list.add(Class.forName(info.getName()));
+			}
+			for (ClassInfo info : sr.getClassesWithAnnotation(MappedSuperclass.class.getName())) {
+				list.add(Class.forName(info.getName()));
+			}
+			return list.stream().sorted(Comparator.comparing(Class::getName)).collect(Collectors.toList());
+		}
+	}
+
+	private static Set<Class<?>> scanMappedSuperclass(Class<?> clz) throws Exception {
+		Set<Class<?>> set = new HashSet<Class<?>>();
+		set.add(clz);
+		Class<?> s = clz.getSuperclass();
+		while (null != s) {
+			if (null != s.getAnnotation(MappedSuperclass.class)) {
+				set.add(s);
+			}
+			s = s.getSuperclass();
+		}
+		return set;
+	}
+
+}

+ 114 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/tools/MetaModelBuilder.java

@@ -0,0 +1,114 @@
+package com.x.base.core.entity.tools;
+
+import java.io.File;
+import java.io.OutputStreamWriter;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.stream.Collectors;
+
+import javax.persistence.Entity;
+import javax.persistence.MappedSuperclass;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+import javax.tools.ToolProvider;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.filefilter.DirectoryFileFilter;
+import org.apache.commons.io.filefilter.IOFileFilter;
+import org.apache.commons.io.filefilter.WildcardFileFilter;
+import org.apache.commons.lang3.StringUtils;
+
+import io.github.classgraph.ClassGraph;
+import io.github.classgraph.ClassInfo;
+import io.github.classgraph.ClassInfoList;
+import io.github.classgraph.ScanResult;
+
+public class MetaModelBuilder {
+
+	public static void main(String[] args) {
+		try {
+
+			File basedir = new File(args[0]);
+			File sourcedir = new File(args[1]);
+			File outputdir = new File(args[2]);
+			File o2oadir = basedir.getParentFile().getParentFile();
+
+			JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+			StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, Charset.forName("UTF-8"));
+			fileManager.setLocation(StandardLocation.SOURCE_PATH, Arrays.asList(sourcedir));
+			fileManager.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(sourcedir));
+			fileManager.setLocation(StandardLocation.CLASS_PATH, classpath(o2oadir, outputdir));
+
+			List<JavaFileObject> res = new ArrayList<>();
+
+			List<String> paths = scanEntityJava(sourcedir);
+
+			fileManager.list(StandardLocation.SOURCE_PATH, "", EnumSet.of(JavaFileObject.Kind.SOURCE), true)
+					.forEach(o -> {
+						if (StringUtils.endsWith(o.getName(), "_.java")) {
+							o.delete();
+						} else if (paths.contains(o.getName())) {
+							res.add(o);
+						}
+					});
+
+			compiler.getTask(new OutputStreamWriter(System.out), fileManager, null,
+					Arrays.asList("-Aopenjpa.metamodel=true", "-Aopenjpa.log=TRACE"), null, res).call();
+
+			removeClassFile(basedir);
+
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
+	}
+
+	private static List<File> classpath(File o2oadir, File outputdir) {
+		List<File> cp = new ArrayList<>();
+
+		cp.add(outputdir);
+
+		IOFileFilter filter = new WildcardFileFilter("x_base_core_project.jar");
+		for (File o : FileUtils.listFiles(new File(o2oadir, "o2server/store/jars"), filter, null)) {
+			cp.add(o);
+		}
+
+		filter = new WildcardFileFilter("*.jar");
+		for (File o : FileUtils.listFiles(new File(o2oadir, "o2server/commons/ext"), filter, null)) {
+			cp.add(o);
+		}
+		return cp;
+	}
+
+	private static void removeClassFile(File sourcedir) {
+		for (File o : FileUtils.listFiles(sourcedir, new WildcardFileFilter("*.class"),
+				DirectoryFileFilter.DIRECTORY)) {
+			o.delete();
+		}
+	}
+
+	private static List<String> scanEntityJava(File sourcedir) throws Exception {
+		List<String> list = new ArrayList<String>();
+		try (ScanResult sr = new ClassGraph().enableAnnotationInfo().disableJarScanning().scan()) {
+			ClassInfoList infos = new ClassInfoList();
+			for (ClassInfo info : sr.getClassesWithAnnotation(Entity.class.getName())) {
+				infos.add(info);
+			}
+			for (ClassInfo info : sr.getClassesWithAnnotation(MappedSuperclass.class.getName())) {
+				infos.add(info);
+			}
+			for (ClassInfo info : infos) {
+				File file = new File(sourcedir,
+						info.getName().replaceAll("\\.", Matcher.quoteReplacement(File.separator)) + ".java");
+				list.add(file.getAbsolutePath());
+			}
+			return list.stream().sorted().collect(Collectors.toList());
+		}
+	}
+}

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

@@ -1,48 +0,0 @@
-package com.x.base.core.project;
-
-import java.io.File;
-
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.ProjectHelper;
-
-import com.x.base.core.project.tools.MainTools;
-
-public class Compile {
-	public static void main(String[] args) throws Exception {
-		Argument arg = MainTools.parseArgument(args[0], Argument.class);
-		compile(arg.getName(), arg.getProjectPath());
-	}
-
-	public static void compile(String name, String projectPath) throws Exception {
-		File buildFile = new File(projectPath, name + "_build.xml");
-		Project antProject = new Project();
-		antProject.setBasedir(projectPath);
-		antProject.setUserProperty("ant.file", buildFile.getAbsolutePath());
-		antProject.init();
-		ProjectHelper helper = ProjectHelper.getProjectHelper();
-		antProject.addReference("ant.projectHelper", helper);
-		helper.parse(antProject, buildFile);
-		antProject.executeTarget(antProject.getDefaultTarget());
-	}
-
-	public class Argument {
-		private String name;
-		private String projectPath;
-
-		public String getName() {
-			return name;
-		}
-
-		public void setName(String name) {
-			this.name = name;
-		}
-
-		public String getProjectPath() {
-			return projectPath;
-		}
-
-		public void setProjectPath(String projectPath) {
-			this.projectPath = projectPath;
-		}
-	}
-}

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

@@ -1,5 +0,0 @@
-package com.x.base.core.project;
-
-public class CompileA {
-
-}

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

@@ -1,5 +0,0 @@
-package com.x.base.core.project;
-
-public class CompileC {
-
-}

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

@@ -1,5 +0,0 @@
-package com.x.base.core.project;
-
-public class CompileM {
-	 
-}

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

@@ -0,0 +1,764 @@
+package com.x.base.core.project.annotation;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Parameter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.OPTIONS;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.commons.collections4.list.SetUniqueList;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.ClassUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import org.apache.commons.lang3.reflect.MethodUtils;
+import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
+import org.glassfish.jersey.media.multipart.FormDataParam;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.gson.XGsonBuilder;
+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 com.x.base.core.project.tools.DefaultCharset;
+import com.x.base.core.project.tools.ListTools;
+
+import io.github.classgraph.ClassGraph;
+import io.github.classgraph.ClassInfo;
+import io.github.classgraph.ScanResult;
+
+public class DescribeBuilder {
+
+	private static Logger logger = LoggerFactory.getLogger(DescribeBuilder.class);
+
+	public static void main(String[] args) throws IOException {
+
+		File basedir = new File(args[0]);
+
+		File sourcedir = new File(args[1]);
+
+		File dir = new File(basedir, "src/main/webapp/describe");
+
+		FileUtils.forceMkdir(dir);
+
+		DescribeBuilder builder = new DescribeBuilder();
+
+		builder.scan(dir);
+
+		FileUtils.copyDirectory(sourcedir, new File(dir, "sources"));
+
+	}
+
+	private void scan(File dir) {
+		try {
+			List<JaxrsClass> jaxrsClasses = new ArrayList<>();
+			List<Class<?>> classes = this.scanJaxrsClass();
+			for (Class<?> clz : classes) {
+				if (StandardJaxrsAction.class.isAssignableFrom(clz)) {
+					jaxrsClasses.add(this.jaxrsClass(clz));
+				}
+			}
+			LinkedHashMap<String, List<?>> map = new LinkedHashMap<>();
+			jaxrsClasses = jaxrsClasses.stream().sorted(Comparator.comparing(JaxrsClass::getName))
+					.collect(Collectors.toList());
+			map.put("jaxrs", jaxrsClasses);
+			File file = new File(dir, "describe.json");
+			FileUtils.writeStringToFile(file, XGsonBuilder.toJson(map), DefaultCharset.charset);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	private List<Class<?>> scanJaxrsClass() throws Exception {
+		try (ScanResult scanResult = new ClassGraph().disableJarScanning().enableAnnotationInfo().scan()) {
+			SetUniqueList<Class<?>> classes = SetUniqueList.setUniqueList(new ArrayList<Class<?>>());
+			for (ClassInfo info : scanResult.getClassesWithAnnotation(ApplicationPath.class.getName())) {
+				Class<?> applicationPathClass = ClassUtils.getClass(info.getName());
+				for (Class<?> o : (Set<Class<?>>) MethodUtils.invokeMethod(applicationPathClass.newInstance(),
+						"getClasses")) {
+					Path path = o.getAnnotation(Path.class);
+					JaxrsDescribe jaxrsDescribe = o.getAnnotation(JaxrsDescribe.class);
+					if (null != path && null != jaxrsDescribe) {
+						classes.add(o);
+					}
+				}
+			}
+			return classes;
+		}
+	}
+
+	private JaxrsClass jaxrsClass(Class<?> clz) throws Exception {
+		logger.print("describe class:{}.", clz.getName());
+		JaxrsDescribe jaxrsDescribe = clz.getAnnotation(JaxrsDescribe.class);
+		JaxrsClass jaxrsClass = new JaxrsClass();
+		jaxrsClass.setClassName(clz.getName());
+		jaxrsClass.setName(clz.getSimpleName());
+		jaxrsClass.setDescription(jaxrsDescribe.value());
+		for (Method method : clz.getMethods()) {
+			JaxrsMethodDescribe jaxrsMethodDescribe = method.getAnnotation(JaxrsMethodDescribe.class);
+			if (null != jaxrsMethodDescribe) {
+				jaxrsClass.getMethods().add(this.jaxrsMethod(clz, method));
+			}
+		}
+		jaxrsClass.setMethods(jaxrsClass.getMethods().stream().sorted(Comparator.comparing(JaxrsMethod::getName))
+				.collect(Collectors.toList()));
+		return jaxrsClass;
+	}
+
+	private JaxrsMethod jaxrsMethod(Class<?> clz, Method method) throws Exception {
+		JaxrsMethodDescribe jaxrsMethodDescribe = method.getAnnotation(JaxrsMethodDescribe.class);
+		JaxrsMethod jaxrsMethod = new JaxrsMethod();
+		jaxrsMethod.setName(method.getName());
+		jaxrsMethod.setDescription(jaxrsMethodDescribe.value());
+		Class<?> actionClass = jaxrsMethodDescribe.action();
+		jaxrsMethod.setClassName(actionClass.getName());
+		if (null != method.getAnnotation(GET.class)) {
+			jaxrsMethod.setType("GET");
+		} else if (null != method.getAnnotation(POST.class)) {
+			jaxrsMethod.setType("POST");
+		} else if (null != method.getAnnotation(PUT.class)) {
+			jaxrsMethod.setType("PUT");
+		} else if (null != method.getAnnotation(DELETE.class)) {
+			jaxrsMethod.setType("DELETE");
+		} else if (null != method.getAnnotation(OPTIONS.class)) {
+			jaxrsMethod.setType("OPTIONS");
+		} else if (null != method.getAnnotation(HEAD.class)) {
+			jaxrsMethod.setType("HEAD");
+		}
+		Class<?> woClass = this.getWoClass(actionClass);
+		if (null != woClass) {
+			jaxrsMethod.setOuts(this.jaxrsOutField(woClass));
+		}
+		Class<?> wiClass = this.getWiClass(actionClass);
+		if (null != wiClass) {
+			jaxrsMethod.setIns(this.jaxrsInField(wiClass));
+		} else {
+			if (StringUtils.equals("POST", jaxrsMethod.getType()) || StringUtils.equals("PUT", jaxrsMethod.getType())) {
+				/** 如果没有定义Wi对象,那么有可能使用的是jsonElement对象 */
+				if (ArrayUtils.contains(method.getParameterTypes(), JsonElement.class)) {
+					jaxrsMethod.setUseJsonElementParameter(true);
+				} else {
+					jaxrsMethod.setUseStringParameter(true);
+				}
+			}
+		}
+		Consumes consumes = method.getAnnotation(Consumes.class);
+		if (null != consumes) {
+			jaxrsMethod.setContentType(consumes.value()[0]);
+		} else {
+			jaxrsMethod.setContentType(MediaType.APPLICATION_JSON);
+		}
+		Produces produces = method.getAnnotation(Produces.class);
+		if (null != produces) {
+			jaxrsMethod.setResultContentType(produces.value()[0]);
+			jaxrsMethod.setResultContentType(produces.value()[0]);
+		}
+		Path path = method.getAnnotation(Path.class);
+		if (null == path) {
+			jaxrsMethod.setPath("jaxrs/" + clz.getAnnotation(Path.class).value());
+		} else {
+			jaxrsMethod.setPath("jaxrs/" + clz.getAnnotation(Path.class).value() + "/" + path.value());
+		}
+		for (Parameter o : method.getParameters()) {
+			FormDataParam formDataParam = o.getAnnotation(FormDataParam.class);
+			FormParam formParam = o.getAnnotation(FormParam.class);
+			PathParam pathParam = o.getAnnotation(PathParam.class);
+			QueryParam queryParam = o.getAnnotation(QueryParam.class);
+			if (null != formDataParam) {
+				jaxrsMethod.getFormParameters().add(this.jaxrsFormDataParameter(clz, method, o));
+			} else if (null != formParam) {
+				jaxrsMethod.getFormParameters().add(this.jaxrsFormParameter(clz, method, o));
+			} else if (null != queryParam) {
+				jaxrsMethod.getQueryParameters().add(this.jaxrsQueryParameter(clz, method, o));
+			} else if (null != pathParam) {
+				jaxrsMethod.getPathParameters().add(this.jaxrsPathParameter(clz, method, o));
+			}
+		}
+		jaxrsMethod.setFormParameters(jaxrsMethod.getFormParameters().stream().filter(Objects::nonNull)
+				.sorted(Comparator.comparing(JaxrsFormParameter::getName, Comparator.nullsLast(String::compareTo)))
+				.collect(Collectors.toList()));
+		jaxrsMethod.setQueryParameters(jaxrsMethod.getQueryParameters().stream().filter(Objects::nonNull)
+				.sorted(Comparator.comparing(JaxrsQueryParameter::getName, Comparator.nullsLast(String::compareTo)))
+				.collect(Collectors.toList()));
+		jaxrsMethod.setPathParameters(jaxrsMethod.getPathParameters().stream().filter(Objects::nonNull)
+				.sorted(Comparator.comparing(JaxrsPathParameter::getName, Comparator.nullsLast(String::compareTo)))
+				.collect(Collectors.toList()));
+		return jaxrsMethod;
+	}
+
+	private JaxrsFormParameter jaxrsFormDataParameter(Class<?> clz, Method method, Parameter parameter) {
+		JaxrsParameterDescribe jaxrsParameterDescribe = parameter.getAnnotation(JaxrsParameterDescribe.class);
+		FormDataParam formDataParam = parameter.getAnnotation(FormDataParam.class);
+		if (StringUtils.equalsIgnoreCase("file", formDataParam.value())) {
+			if (parameter.getType() == FormDataContentDisposition.class) {
+				/** 单独处理附件 */
+				JaxrsFormParameter o = new JaxrsFormParameter();
+				o.setType("File");
+				o.setName(formDataParam.value());
+				if (null != jaxrsParameterDescribe) {
+					o.setDescription(jaxrsParameterDescribe.value());
+				} else {
+					logger.print("类: {}, 方法: {} ,未设置参数 {} 的JaxrsParameterDescribe.", clz.getName(), method.getName(),
+							formDataParam.value());
+					o.setDescription("");
+				}
+				return o;
+			}
+		} else {
+			JaxrsFormParameter o = new JaxrsFormParameter();
+			o.setType(this.simpleType(parameter.getType().toString()));
+			o.setName(formDataParam.value());
+			if (null != jaxrsParameterDescribe) {
+				o.setDescription(jaxrsParameterDescribe.value());
+			} else {
+				logger.print("类: {}, 方法: {} ,未设置参数 {} 的JaxrsParameterDescribe.", clz.getName(), method.getName(),
+						formDataParam.value());
+				o.setDescription("");
+			}
+			return o;
+		}
+		return null;
+	}
+
+	private JaxrsFormParameter jaxrsFormParameter(Class<?> clz, Method method, Parameter parameter) {
+		JaxrsParameterDescribe jaxrsParameterDescribe = parameter.getAnnotation(JaxrsParameterDescribe.class);
+		FormParam formParam = parameter.getAnnotation(FormParam.class);
+		JaxrsFormParameter o = new JaxrsFormParameter();
+		o.setType(this.simpleType(parameter.getType().toString()));
+		o.setName(formParam.value());
+		if (null != jaxrsParameterDescribe) {
+			o.setDescription(jaxrsParameterDescribe.value());
+		} else {
+			logger.print("类: {}, 方法: {} ,未设置参数 {} 的JaxrsParameterDescribe.", clz.getName(), method.getName(),
+					formParam.value());
+			o.setDescription("");
+		}
+		return o;
+	}
+
+	private JaxrsQueryParameter jaxrsQueryParameter(Class<?> clz, Method method, Parameter parameter) {
+		JaxrsParameterDescribe jaxrsParameterDescribe = parameter.getAnnotation(JaxrsParameterDescribe.class);
+		QueryParam queryParam = parameter.getAnnotation(QueryParam.class);
+		JaxrsQueryParameter o = new JaxrsQueryParameter();
+		if (null != jaxrsParameterDescribe) {
+			o.setDescription(jaxrsParameterDescribe.value());
+		} else {
+			logger.print("类: {}, 方法: {} ,未设置参数 {} 的JaxrsParameterDescribe.", clz.getName(), method.getName(),
+					queryParam.value());
+			o.setDescription("");
+		}
+		o.setName(queryParam.value());
+		o.setType(this.simpleType(parameter.getType().getName()));
+		return o;
+	}
+
+	private JaxrsPathParameter jaxrsPathParameter(Class<?> clz, Method method, Parameter parameter) throws Exception {
+		JaxrsParameterDescribe jaxrsParameterDescribe = parameter.getAnnotation(JaxrsParameterDescribe.class);
+		PathParam pathParam = parameter.getAnnotation(PathParam.class);
+		JaxrsPathParameter o = new JaxrsPathParameter();
+		o.setName(pathParam.value());
+		if (null != jaxrsParameterDescribe) {
+			o.setDescription(jaxrsParameterDescribe.value());
+		} else {
+			logger.print("类: {}, 方法: {} ,未设置参数 {} 的JaxrsParameterDescribe.", clz.getName(), method.getName(),
+					pathParam.value());
+			o.setDescription("");
+		}
+		o.setType(this.getJaxrsParameterType(parameter));
+		return o;
+	}
+
+	private Class<?> getWiClass(Class<?> actionClass) {
+		for (Class<?> c : actionClass.getDeclaredClasses()) {
+			if (StringUtils.equals(c.getSimpleName(), "Wi")) {
+				return c;
+			}
+		}
+		return null;
+	}
+
+	private Class<?> getWoClass(Class<?> actionClass) {
+		for (Class<?> c : actionClass.getDeclaredClasses()) {
+			if (StringUtils.equals(c.getSimpleName(), "Wo")) {
+				return c;
+			}
+		}
+		return null;
+	}
+
+	private List<JaxrsField> jaxrsInField(Class<?> clz) throws Exception {
+		List<JaxrsField> list = new ArrayList<>();
+		List<Field> fields = FieldUtils.getAllFieldsList(clz);
+		List<String> copierCopyFields = this.listCopierCopyFields(clz);
+		if (ListTools.isNotEmpty(copierCopyFields)) {
+			List<Field> os = new ArrayList<>();
+			for (Field o : fields) {
+				FieldDescribe fieldDescribe = o.getAnnotation(FieldDescribe.class);
+				if ((null != fieldDescribe)
+						&& (copierCopyFields.contains(o.getName()) || this.inWiNotInEntity(o.getName(), clz))) {
+					os.add(o);
+				}
+				fields = os;
+			}
+		}
+		for (Field o : fields) {
+			FieldDescribe fieldDescribe = o.getAnnotation(FieldDescribe.class);
+			if (null != fieldDescribe) {
+				JaxrsField jaxrsField = new JaxrsField();
+				jaxrsField.setName(o.getName());
+				jaxrsField.setDescription(fieldDescribe.value());
+				jaxrsField.setType(this.getJaxrsFieldType(o));
+				jaxrsField.setIsBaseType(false);
+				if (Collection.class.isAssignableFrom(o.getType())) {
+					jaxrsField.setIsCollection(true);
+					if (StringUtils.containsAny(jaxrsField.getType(), "<String>", "<Boolean>", "<Date>", "<Integer>",
+							"<Double>", "<Long>", "<Float>")) {
+						jaxrsField.setIsBaseType(true);
+					}
+				} else {
+					// O2LEE,String[]未被判断为collection导致组织的JSON格式不符合wrapIn要求
+					if (StringUtils.equalsAnyIgnoreCase("String[]", jaxrsField.getType())) {
+						jaxrsField.setIsCollection(true);
+					} else {
+						jaxrsField.setIsCollection(false);
+					}
+					if (StringUtils.startsWithAny(jaxrsField.getType(), "String", "Boolean", "Date", "Integer",
+							"Double", "Long", "Float")) {
+						jaxrsField.setIsBaseType(true);
+					}
+				}
+				list.add(jaxrsField);
+			}
+		}
+		return list;
+	}
+
+	private List<JaxrsField> jaxrsOutField(Class<?> clz) throws Exception {
+		List<JaxrsField> list = new ArrayList<>();
+		List<Field> fields = FieldUtils.getAllFieldsList(clz);
+		List<String> copierEraseFields = this.listCopierEraseFields(clz);
+		if (ListTools.isNotEmpty(copierEraseFields)) {
+			List<Field> os = new ArrayList<>();
+			for (Field o : fields) {
+				FieldDescribe fieldDescribe = o.getAnnotation(FieldDescribe.class);
+				if ((null != fieldDescribe) && (!copierEraseFields.contains(o.getName()))) {
+					os.add(o);
+				}
+			}
+			fields = os;
+		}
+		for (Field o : fields) {
+			FieldDescribe fieldDescribe = o.getAnnotation(FieldDescribe.class);
+			if (null != fieldDescribe) {
+				JaxrsField jaxrsField = new JaxrsField();
+				jaxrsField.setName(o.getName());
+				jaxrsField.setDescription(fieldDescribe.value());
+				jaxrsField.setType(this.getJaxrsFieldType(o));
+				if (Collection.class.isAssignableFrom(o.getType())) {
+					jaxrsField.setIsCollection(true);
+				} else {
+					jaxrsField.setIsCollection(false);
+				}
+				list.add(jaxrsField);
+			}
+		}
+		return list;
+	}
+
+	private String getJaxrsFieldType(Field o) {
+		String value = o.getGenericType().getTypeName();
+		return this.simpleType(value);
+	}
+
+	private String getJaxrsParameterType(Parameter o) {
+		String value = o.getType().getTypeName();
+		return this.simpleType(value);
+	}
+
+	private String simpleType(String value) {
+		value = value.replaceAll(" ", "");
+		String[] ss = value.split("[,|<|>]");
+		for (String s : ss) {
+			String[] ns = s.split("[.|\\$]");
+			value = value.replace(s, ns[ns.length - 1]);
+		}
+		return value;
+	}
+
+	private List<String> listCopierEraseFields(Class<?> clz) {
+		try {
+			Object o = FieldUtils.readStaticField(clz, "copier", true);
+			WrapCopier copier = (WrapCopier) o;
+			return copier.getEraseFields();
+		} catch (Exception e) {
+			return null;
+		}
+	}
+
+	private List<String> listCopierCopyFields(Class<?> clz) {
+		try {
+			Object o = FieldUtils.readStaticField(clz, "copier", true);
+			WrapCopier copier = (WrapCopier) o;
+			return copier.getCopyFields();
+		} catch (Exception e) {
+			return null;
+		}
+	}
+
+	/** 判断字段是否在Wi中但是没有在Entity类中说明是Wi新增字段,需要进行描述 */
+	private Boolean inWiNotInEntity(String field, Class<?> clz) {
+		try {
+			Object o = FieldUtils.readStaticField(clz, "copier", true);
+			WrapCopier copier = (WrapCopier) o;
+			if ((null != FieldUtils.getField(copier.getOrigClass(), field, true))
+					&& (null == FieldUtils.getField(copier.getDestClass(), field, true))) {
+				return true;
+			}
+			return false;
+		} catch (Exception e) {
+			return null;
+		}
+	}
+
+	public class JaxrsClass {
+
+		private String name;
+		private String className;
+		private String description;
+		private List<JaxrsMethod> methods = new ArrayList<>();
+
+		public String getClassName() {
+			return className;
+		}
+
+		public void setClassName(String className) {
+			this.className = className;
+		}
+
+		public List<JaxrsMethod> getMethods() {
+			return methods;
+		}
+
+		public void setMethods(List<JaxrsMethod> methods) {
+			this.methods = methods;
+		}
+
+		public String getDescription() {
+			return description;
+		}
+
+		public void setDescription(String description) {
+			this.description = description;
+		}
+
+		public String getName() {
+			return name;
+		}
+
+		public void setName(String name) {
+			this.name = name;
+		}
+	}
+
+	public class JaxrsMethod {
+		private String name;
+		private String className;
+		private String description;
+		private String type;
+		private String path;
+		private String contentType;
+		private String resultContentType;
+		private Boolean useJsonElementParameter = false;
+		private Boolean useStringParameter = false;
+		private List<JaxrsPathParameter> pathParameters = new ArrayList<>();
+		private List<JaxrsFormParameter> formParameters = new ArrayList<>();
+		private List<JaxrsQueryParameter> queryParameters = new ArrayList<>();
+		private List<JaxrsField> ins = new ArrayList<>();
+		private List<JaxrsField> outs = new ArrayList<>();
+
+		public String getType() {
+			return type;
+		}
+
+		public void setType(String type) {
+			this.type = type;
+		}
+
+		public String getPath() {
+			return path;
+		}
+
+		public void setPath(String path) {
+			this.path = path;
+		}
+
+		public String getName() {
+			return name;
+		}
+
+		public void setName(String name) {
+			this.name = name;
+		}
+
+		public List<JaxrsField> getIns() {
+			return ins;
+		}
+
+		public void setIns(List<JaxrsField> ins) {
+			this.ins = ins;
+		}
+
+		public List<JaxrsField> getOuts() {
+			return outs;
+		}
+
+		public void setOuts(List<JaxrsField> outs) {
+			this.outs = outs;
+		}
+
+		public String getContentType() {
+			return contentType;
+		}
+
+		public void setContentType(String contentType) {
+			this.contentType = contentType;
+		}
+
+		public String getDescription() {
+			return description;
+		}
+
+		public void setDescription(String description) {
+			this.description = description;
+		}
+
+		public String getClassName() {
+			return className;
+		}
+
+		public void setClassName(String className) {
+			this.className = className;
+		}
+
+		public List<JaxrsPathParameter> getPathParameters() {
+			return pathParameters;
+		}
+
+		public void setPathParameters(List<JaxrsPathParameter> pathParameters) {
+			this.pathParameters = pathParameters;
+		}
+
+		public List<JaxrsFormParameter> getFormParameters() {
+			return formParameters;
+		}
+
+		public void setFormParameters(List<JaxrsFormParameter> formParameters) {
+			this.formParameters = formParameters;
+		}
+
+		public List<JaxrsQueryParameter> getQueryParameters() {
+			return queryParameters;
+		}
+
+		public void setQueryParameters(List<JaxrsQueryParameter> queryParameters) {
+			this.queryParameters = queryParameters;
+		}
+
+		public Boolean getUseJsonElementParameter() {
+			return useJsonElementParameter;
+		}
+
+		public void setUseJsonElementParameter(Boolean useJsonElementParameter) {
+			this.useJsonElementParameter = useJsonElementParameter;
+		}
+
+		public String getResultContentType() {
+			return resultContentType;
+		}
+
+		public void setResultContentType(String resultContentType) {
+			this.resultContentType = resultContentType;
+		}
+
+		public Boolean getUseStringParameter() {
+			return useStringParameter;
+		}
+
+		public void setUseStringParameter(Boolean useStringParameter) {
+			this.useStringParameter = useStringParameter;
+		}
+
+	}
+
+	public class JaxrsField {
+
+		private String name;
+		private String type;
+		private Boolean isCollection;
+		private String description;
+		private Boolean isBaseType;
+
+		public String getName() {
+			return name;
+		}
+
+		public void setName(String name) {
+			this.name = name;
+		}
+
+		public String getDescription() {
+			return description;
+		}
+
+		public void setDescription(String description) {
+			this.description = description;
+		}
+
+		public String getType() {
+			return type;
+		}
+
+		public void setType(String type) {
+			this.type = type;
+		}
+
+		public Boolean getIsCollection() {
+			return isCollection;
+		}
+
+		public void setIsCollection(Boolean isCollection) {
+			this.isCollection = isCollection;
+		}
+
+		public Boolean getIsBaseType() {
+			return isBaseType;
+		}
+
+		public void setIsBaseType(Boolean isBaseType) {
+			this.isBaseType = isBaseType;
+		}
+
+	}
+
+	public class JaxrsPathParameter {
+
+		private String name;
+		private String type;
+		private String description;
+
+		public String getName() {
+			return name;
+		}
+
+		public void setName(String name) {
+			this.name = name;
+		}
+
+		public String getDescription() {
+			return description;
+		}
+
+		public void setDescription(String description) {
+			this.description = description;
+		}
+
+		public String getType() {
+			return type;
+		}
+
+		public void setType(String type) {
+			this.type = type;
+		}
+
+	}
+
+	public class JaxrsFormParameter {
+
+		private String name;
+		private String type;
+		private String description;
+
+		public String getName() {
+			return name;
+		}
+
+		public void setName(String name) {
+			this.name = name;
+		}
+
+		public String getDescription() {
+			return description;
+		}
+
+		public void setDescription(String description) {
+			this.description = description;
+		}
+
+		public String getType() {
+			return type;
+		}
+
+		public void setType(String type) {
+			this.type = type;
+		}
+
+	}
+
+	public class JaxrsQueryParameter {
+
+		private String name;
+		private String type;
+		private String description;
+
+		public String getName() {
+			return name;
+		}
+
+		public void setName(String name) {
+			this.name = name;
+		}
+
+		public String getDescription() {
+			return description;
+		}
+
+		public void setDescription(String description) {
+			this.description = description;
+		}
+
+		public String getType() {
+			return type;
+		}
+
+		public void setType(String type) {
+			this.type = type;
+		}
+
+	}
+
+}

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

@@ -17,7 +17,7 @@ public class CheckAssemble {
 
 	public static void main(String... args) throws Exception {
 		List<ClassInfo> list = new ArrayList<>();
-		try (ScanResult scanResult = new ClassGraph().enableAllInfo().whitelistPackages("com.x").scan()) {
+		try (ScanResult scanResult = new ClassGraph().disableJarScanning().enableAllInfo().scan()) {
 			ClassInfoList classInfoList = scanResult.getAllClasses();
 			for (ClassInfo info : classInfoList) {
 				if (StringUtils.endsWith(info.getSimpleName(), "$Wi")) {

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

@@ -31,9 +31,7 @@ import io.github.classgraph.ScanResult;
 public class CheckCore {
 
 	public static void main(String... args) throws Exception {
-		Argument arg = MainTools.parseArgument(args[0], Argument.class);
-		String packageName = packageName(arg.getProject());
-		try (ScanResult sr = new ClassGraph().whitelistPackages(packageName).enableAnnotationInfo().scan()) {
+		try (ScanResult sr = new ClassGraph().disableJarScanning().enableAnnotationInfo().scan()) {
 			List<ClassInfo> classInfos = sr.getClassesWithAnnotation(ContainerEntity.class.getName());
 			List<Class<?>> classes = new ArrayList<>();
 			for (ClassInfo info : classInfos) {
@@ -236,25 +234,4 @@ public class CheckCore {
 			}
 		}
 	}
-
-	public class Argument {
-		private String path;
-		private String project;
-
-		public String getPath() {
-			return path;
-		}
-
-		public void setPath(String path) {
-			this.path = path;
-		}
-
-		public String getProject() {
-			return project;
-		}
-
-		public void setProject(String project) {
-			this.project = project;
-		}
-	}
 }

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

@@ -17,7 +17,7 @@ public class CheckService {
 
 	public static void main(String... args) throws Exception {
 		List<ClassInfo> list = new ArrayList<>();
-		try (ScanResult scanResult = new ClassGraph().enableAllInfo().whitelistPackages("com.x").scan()) {
+		try (ScanResult scanResult = new ClassGraph().disableJarScanning().enableAllInfo().scan()) {
 			ClassInfoList classInfoList = scanResult.getAllClasses();
 			for (ClassInfo info : classInfoList) {
 				if (StringUtils.endsWith(info.getSimpleName(), "$Wi")) {
@@ -32,4 +32,4 @@ public class CheckService {
 			}
 		}
 	}
-}
+}

+ 8 - 108
o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/CreateWebXml.java

@@ -21,79 +21,20 @@ import io.github.classgraph.ScanResult;
 
 public class CreateWebXml {
 	public static void main(String[] args) throws Exception {
-		Argument arg = MainTools.parseArgument(args[0], Argument.class);
-		String thisApplicationClassName = thisApplicationClassName(arg.getProject());
-//		String xml = metadataCompleteTrue(arg.getPath(), arg.getProject(), thisApplicationClassName);
-		String xml = metadataCompleteFalse(arg.getPath(), arg.getProject(), thisApplicationClassName);
-		File dir = new File(arg.getPath(), "src/main/webapp/WEB-INF");
+
+		File directory = new File(args[0]);
+		String project = args[1];
+
+		String thisApplicationClassName = thisApplicationClassName(project);
+		String xml = metadataCompleteFalse(project, thisApplicationClassName);
+		File dir = new File(directory, "src/main/webapp/WEB-INF");
 		FileUtils.forceMkdir(dir);
 		File file = new File(dir, "web.xml");
 		FileUtils.writeStringToFile(file, xml, DefaultCharset.charset_utf_8);
 		System.out.println("create web.xml:" + file.getAbsolutePath());
 	}
 
-	private static String metadataCompleteTrue(String path, String project, String thisApplicationClassName)
-			throws Exception {
-		Class<?> thisApplication = Class.forName(thisApplicationClassName);
-		try (ScanResult scanResult = new ClassGraph().enableAnnotationInfo()
-				.whitelistPackages(thisApplication.getPackage().getName(), Compilable.class.getPackage().getName())
-				.scan()) {
-			StringBuffer sb = new StringBuffer();
-			String moduleClassName = moduleClassName(scanResult, project);
-			sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
-			sb.append("<web-app id=\"" + project + "\" metadata-complete=\"true\" version=\"3.0\">");
-			sb.append("<display-name>" + project + "</display-name>");
-			sb.append("<context-param>");
-			sb.append("<param-name>project</param-name>");
-			sb.append("<param-value>" + moduleClassName + "</param-value>");
-			sb.append("</context-param>");
-			sb.append("<listener>");
-			sb.append("<listener-class>" + thisApplication.getPackage().getName()
-					+ ".ApplicationServletContextListener</listener-class>");
-			sb.append("</listener>");
-			sb.append("<servlet>");
-			sb.append("<servlet-name>ActionApplication</servlet-name>");
-			sb.append("<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>");
-			sb.append("<async-supported>true</async-supported>");
-			sb.append("<init-param>");
-			sb.append("<param-name>javax.ws.rs.Application</param-name>");
-			sb.append("<param-value>" + thisApplication.getPackage().getName()
-					+ ".jaxrs.ActionApplication</param-value>");
-			sb.append("</init-param>");
-			sb.append("</servlet>");
-			for (String str : listWebFilter(scanResult, path)) {
-				Class<?> cls = Class.forName(str);
-				WebFilter webFilter = cls.getAnnotation(WebFilter.class);
-				sb.append("<filter>");
-				sb.append("<filter-name>" + cls.getSimpleName() + "</filter-name>");
-				sb.append("<filter-class>" + cls.getName() + "</filter-class>");
-				sb.append("<async-supported>true</async-supported>");
-				sb.append("</filter>");
-				sb.append("<filter-mapping>");
-				sb.append("<filter-name>" + cls.getSimpleName() + "</filter-name>");
-				sb.append("<url-pattern>" + StringUtils.join(webFilter.urlPatterns(), ",") + "</url-pattern>");
-				sb.append("</filter-mapping>");
-			}
-			for (String str : listWebServlet(scanResult, path)) {
-				Class<?> cls = Class.forName(str);
-				WebServlet webServlet = cls.getAnnotation(WebServlet.class);
-				sb.append("<servlet>");
-				sb.append("<servlet-name>" + cls.getSimpleName() + "</servlet-name>");
-				sb.append("<servlet-class>" + cls.getName() + "</servlet-class>");
-				sb.append("<async-supported>true</async-supported>");
-				sb.append("</servlet>");
-				sb.append("<servlet-mapping>");
-				sb.append("<servlet-name>" + cls.getSimpleName() + "</servlet-name>");
-				sb.append("<url-pattern>" + StringUtils.join(webServlet.urlPatterns(), ",") + "</url-pattern>");
-				sb.append("<servlet-mapping>");
-			}
-			sb.append("</web-app>");
-			return sb.toString();
-		}
-	}
-
-	private static String metadataCompleteFalse(String path, String project, String thisApplicationClassName)
-			throws Exception {
+	private static String metadataCompleteFalse(String project, String thisApplicationClassName) throws Exception {
 		Class<?> thisApplication = Class.forName(thisApplicationClassName);
 		try (ScanResult scanResult = new ClassGraph().enableAnnotationInfo()
 				.whitelistPackages(thisApplication.getPackage().getName(), Compilable.class.getPackage().getName())
@@ -122,27 +63,6 @@ public class CreateWebXml {
 		return null;
 	}
 
-	private static List<String> listWebServlet(ScanResult scanResult, String project) throws Exception {
-		List<String> list = new ArrayList<>();
-		List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(WebServlet.class.getName());
-		for (ClassInfo info : classInfos) {
-			list.add(info.getName());
-		}
-		return list;
-	}
-
-	private static List<String> listWebFilter(ScanResult scanResult, String project) throws Exception {
-		List<String> list = new ArrayList<>();
-//		list.add(CacheJaxrsFilter.class.getName());
-//		list.add(LoggerJaxrsFilter.class.getName());
-//		list.add(EchoJaxrsFilter.class.getName());
-		List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(WebFilter.class.getName());
-		for (ClassInfo info : classInfos) {
-			list.add(info.getName());
-		}
-		return list;
-	}
-
 	private static String thisApplicationClassName(String project) throws Exception {
 		try (ScanResult scanResult = new ClassGraph().enableAnnotationInfo().scan()) {
 			List<ClassInfo> classInfos = scanResult.getClassesWithAnnotation(Module.class.getName());
@@ -157,24 +77,4 @@ public class CreateWebXml {
 		}
 	}
 
-	public class Argument {
-		private String path;
-		private String project;
-
-		public String getPath() {
-			return path;
-		}
-
-		public void setPath(String path) {
-			this.path = path;
-		}
-
-		public String getProject() {
-			return project;
-		}
-
-		public void setProject(String project) {
-			this.project = project;
-		}
-	}
 }

+ 49 - 19
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 DIR_JVM_LINUX = "jvm/linux";
 	public static final String DIR_JVM_MACOS = "jvm/macos";
 	public static final String DIR_JVM_WINDOWS = "jvm/windows";
+	public static final String DIR_JVM_NEOKYLIN_LOONGSON = "jvm/neokylin_loongson";
 	public static final String DIR_LOCAL = "local";
 	public static final String DIR_LOCAL_BACKUP = "local/backup";
 	public static final String DIR_LOCAL_UPDATE = "local/update";
@@ -79,6 +80,7 @@ public class Config {
 	public static final String DIR_LOCAL_TEMP_DYNAMIC = "local/temp/dynamic";
 	public static final String DIR_LOCAL_TEMP_DYNAMIC_SRC = "local/temp/dynamic/src";
 	public static final String DIR_LOCAL_TEMP_DYNAMIC_TARGET = "local/temp/dynamic/target";
+	public static final String DIR_LOCAL_TEMP_DYNAMIC_RESOURCES = "local/temp/dynamic/resources";
 	public static final String DIR_LOCALSAMPLE = "localSample";
 	public static final String DIR_LOGS = "logs";
 	public static final String DIR_SERVERS = "servers";
@@ -228,6 +230,10 @@ public class Config {
 	public static File dir_jvm_linux() throws Exception {
 		return new File(base(), DIR_JVM_LINUX);
 	}
+	
+	public static File dir_jvm_neokylin_loongson() throws Exception {
+		return new File(base(), DIR_JVM_NEOKYLIN_LOONGSON);
+	}
 
 	public static File dir_jvm_macos() throws Exception {
 		return new File(base(), DIR_JVM_MACOS);
@@ -285,12 +291,8 @@ public class Config {
 		return new File(base(), DIR_LOCAL_TEMP_DYNAMIC);
 	}
 
-	public static File dir_local_temp_dynamic_src() throws Exception {
-		return dir_local_temp_dynamic_src(false);
-	}
-
-	public static File dir_local_temp_dynamic_src(Boolean force) throws Exception {
-		File dir = new File(base(), DIR_LOCAL_TEMP_DYNAMIC_SRC);
+	public static File dir_local_temp_dynamic(Boolean force) throws Exception {
+		File dir = new File(base(), DIR_LOCAL_TEMP_DYNAMIC);
 		if (force) {
 			if ((!dir.exists()) || dir.isFile()) {
 				FileUtils.forceMkdir(dir);
@@ -299,19 +301,47 @@ public class Config {
 		return dir;
 	}
 
-	public static File dir_local_temp_dynamic_target() throws Exception {
-		return dir_local_temp_dynamic_target(false);
-	}
-
-	public static File dir_local_temp_dynamic_target(Boolean force) throws Exception {
-		File dir = new File(base(), DIR_LOCAL_TEMP_DYNAMIC_TARGET);
-		if (force) {
-			if ((!dir.exists()) || dir.isFile()) {
-				FileUtils.forceMkdir(dir);
-			}
-		}
-		return dir;
-	}
+//	public static File dir_local_temp_dynamic_src() throws Exception {
+//		return dir_local_temp_dynamic_src(false);
+//	}
+//
+//	public static File dir_local_temp_dynamic_src(Boolean force) throws Exception {
+//		File dir = new File(base(), DIR_LOCAL_TEMP_DYNAMIC_SRC);
+//		if (force) {
+//			if ((!dir.exists()) || dir.isFile()) {
+//				FileUtils.forceMkdir(dir);
+//			}
+//		}
+//		return dir;
+//	}
+
+//	public static File dir_local_temp_dynamic_target() throws Exception {
+//		return dir_local_temp_dynamic_target(false);
+//	}
+//
+//	public static File dir_local_temp_dynamic_target(Boolean force) throws Exception {
+//		File dir = new File(base(), DIR_LOCAL_TEMP_DYNAMIC_TARGET);
+//		if (force) {
+//			if ((!dir.exists()) || dir.isFile()) {
+//				FileUtils.forceMkdir(dir);
+//			}
+//		}
+//		return dir;
+//	}
+
+//	public static File dir_local_temp_dynamic_resources() throws Exception {
+//		return dir_local_temp_dynamic_resources(false);
+//	}
+//
+//	public static File dir_local_temp_dynamic_resources(Boolean force) throws Exception {
+//		File dir = new File(base(), DIR_LOCAL_TEMP_DYNAMIC_RESOURCES);
+//		if (force) {
+//			if ((!dir.exists()) || dir.isFile()) {
+//				FileUtils.forceMkdir(dir);
+//			}
+//		}
+//		return dir;
+//	}
 
 	public static File dir_logs() throws Exception {
 		return new File(base(), DIR_LOGS);

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

@@ -19,6 +19,10 @@ public class ExternalDataSource extends ConfigObject {
 		this.password = "";
 		this.includes = new ArrayList<>();
 		this.excludes = new ArrayList<>();
+		this.driverClassName = "";
+		this.dictionary = "";
+		this.maxTotal = DEFAULT_MAXTOTAL;
+		this.logLevel = LogLevel.WARN;
 	}
 
 	public static ExternalDataSource defaultInstance() {
@@ -135,5 +139,4 @@ public class ExternalDataSource extends ConfigObject {
 		this.logLevel = logLevel;
 	}
 
- 
 }

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

@@ -22,6 +22,7 @@ public class ProcessPlatform extends ConfigObject {
 		this.expire = new Expire();
 		this.delay = new Delay();
 		this.reorganize = new Reorganize();
+		this.dataMerge = new DataMerge();
 		this.maintenanceIdentity = "";
 	}
 
@@ -40,6 +41,9 @@ public class ProcessPlatform extends ConfigObject {
 	@FieldDescribe("整理任务设置,将执行4个独立任务,1.删除无效的待办,2.删除流程或者应用不存在的工作,3.将活动节点错误的工作调度到开始节点,4.触发滞留时间过长的工作.")
 	private Reorganize reorganize;
 
+	@FieldDescribe("合并任务设置,定时触发合并任务,将已完成工作的Data从Item表中提取合并到WorkCompleted的Data字段中,默认工作完成后2年开始进行合并.")
+	private DataMerge dataMerge;
+
 	@FieldDescribe("维护身份,当工作发生意外错误,无法找到对应的处理人情况下,先尝试将工作分配给创建身份,如果创建身份也不可获取,那么分配给指定人员,默认情况下这个值为空.")
 	private String maintenanceIdentity;
 
@@ -63,6 +67,14 @@ public class ProcessPlatform extends ConfigObject {
 		return this.reorganize == null ? new Reorganize() : this.reorganize;
 	}
 
+	public DataMerge getDataMerge() {
+		return this.dataMerge == null ? new DataMerge() : this.dataMerge;
+	}
+
+	public String getMaintenanceIdentity() {
+		return maintenanceIdentity;
+	}
+
 	public void save() throws Exception {
 		File file = new File(Config.base(), Config.PATH_CONFIG_PROCESSPLATFORM);
 		FileUtils.write(file, XGsonBuilder.toJson(this), DefaultCharset.charset);
@@ -287,28 +299,55 @@ public class ProcessPlatform extends ConfigObject {
 
 	}
 
-	public void setUrge(Urge urge) {
-		this.urge = urge;
-	}
+	public static class DataMerge extends ConfigObject {
 
-	public void setExpire(Expire expire) {
-		this.expire = expire;
-	}
+		public static DataMerge defaultInstance() {
+			DataMerge o = new DataMerge();
+			return o;
+		}
 
-	public void setDelay(Delay delay) {
-		this.delay = delay;
-	}
+		public final static Boolean DEFAULT_ENABLE = false;
 
-	public void setReorganize(Reorganize reorganize) {
-		this.reorganize = reorganize;
-	}
+		public final static String DEFAULT_CRON = "30 30 6 * * ?";
 
-	public String getMaintenanceIdentity() {
-		return maintenanceIdentity;
-	}
+		public final static Integer DEFAULT_PERIOD = 365 * 2;
+
+		@FieldDescribe("是否启用")
+		private Boolean enable = DEFAULT_ENABLE;
+
+		@FieldDescribe("定时cron表达式")
+		private String cron = DEFAULT_CRON;
+
+		@FieldDescribe("期限,已完成工作结束间隔指定时间进行merge,默认两年后进行merge")
+		private Integer period = DEFAULT_PERIOD;
 
-	public void setMaintenanceIdentity(String maintenanceIdentity) {
-		this.maintenanceIdentity = maintenanceIdentity;
+		public String getCron() {
+			if (StringUtils.isNotEmpty(this.cron) && CronExpression.isValidExpression(this.cron)) {
+				return this.cron;
+			} else {
+				return DEFAULT_CRON;
+			}
+		}
+
+		public Boolean getEnable() {
+			return BooleanUtils.isTrue(this.enable) && (null != this.period) && (this.period > -1);
+		}
+
+		public void setCron(String cron) {
+			this.cron = cron;
+		}
+
+		public void setEnable(Boolean enable) {
+			this.enable = enable;
+		}
+
+		public Integer getPeriod() {
+			return period;
+		}
+
+		public void setPeriod(Integer period) {
+			this.period = period;
+		}
 	}
 
 }

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است