Pārlūkot izejas kodu

Merge branch 'wrdp' into 'feature/script_evel'

# Conflicts:
#   gulpfile.js
#   o2web/gulpfile.js
#   o2web/source/x_component_process_Work/Main.js
#   o2web/source/x_desktop/js/base.js
胡起 5 gadi atpakaļ
vecāks
revīzija
eb26d2c6de
100 mainītis faili ar 1662 papildinājumiem un 503 dzēšanām
  1. 18 18
      build.xml
  2. 61 44
      gulpfile.js
  3. 2 2
      o2server/configSample/externalDataSources_mysql.json
  4. 10 1
      o2server/configSample/processPlatform.json
  5. 29 30
      o2server/pom.xml
  6. 16 0
      o2server/restart_linux.sh
  7. 1 1
      o2server/x_attendance_assemble_control/pom.xml
  8. 1 1
      o2server/x_attendance_core_entity/pom.xml
  9. 1 1
      o2server/x_base_core_project/pom.xml
  10. 2 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/container/factory/PersistenceXmlHelper.java
  11. 8 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/tools/MetaModelBuilder.java
  12. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ApplicationServer.java
  13. 3 3
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ExternalDataSource.java
  14. 57 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ProcessPlatform.java
  15. 1 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_query_assemble_designer.java
  16. 1 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_query_assemble_surface.java
  17. 1 1
      o2server/x_bbs_assemble_control/pom.xml
  18. 1 1
      o2server/x_bbs_core_entity/pom.xml
  19. 1 1
      o2server/x_calendar_assemble_control/pom.xml
  20. 1 1
      o2server/x_calendar_core_entity/pom.xml
  21. 1 1
      o2server/x_cms_assemble_control/pom.xml
  22. 56 56
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/view/ActionListNextPageViewData.java
  23. 46 46
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/CmsBatchOperationProcessService.java
  24. 1 1
      o2server/x_cms_core_entity/pom.xml
  25. 1 1
      o2server/x_cms_core_express/pom.xml
  26. 1 1
      o2server/x_component_assemble_control/pom.xml
  27. 1 1
      o2server/x_component_core_entity/pom.xml
  28. 1 1
      o2server/x_console/pom.xml
  29. 4 2
      o2server/x_console/src/main/java/com/x/server/console/CommandFactory.java
  30. 103 12
      o2server/x_console/src/main/java/com/x/server/console/Main.java
  31. 25 2
      o2server/x_console/src/main/java/com/x/server/console/NodeAgent.java
  32. 1 1
      o2server/x_file_assemble_control/pom.xml
  33. 3 2
      o2server/x_file_assemble_control/src/main/java/com/x/file/assemble/control/jaxrs/attachment2/ActionGetImageScaleBase64.java
  34. 3 2
      o2server/x_file_assemble_control/src/main/java/com/x/file/assemble/control/jaxrs/attachment2/ActionGetImageWidthHeightBase64.java
  35. 1 1
      o2server/x_file_core_entity/pom.xml
  36. 1 1
      o2server/x_general_assemble_control/pom.xml
  37. 1 1
      o2server/x_general_core_entity/pom.xml
  38. 1 1
      o2server/x_hotpic_assemble_control/pom.xml
  39. 1 1
      o2server/x_hotpic_core_entity/pom.xml
  40. 1 1
      o2server/x_jpush_assemble_control/pom.xml
  41. 1 1
      o2server/x_jpush_core_entity/pom.xml
  42. 1 1
      o2server/x_meeting_assemble_control/pom.xml
  43. 1 1
      o2server/x_meeting_core_entity/pom.xml
  44. 1 1
      o2server/x_message_assemble_communicate/pom.xml
  45. 1 1
      o2server/x_message_core_entity/pom.xml
  46. 1 1
      o2server/x_mind_assemble_control/pom.xml
  47. 1 1
      o2server/x_mind_core_entity/pom.xml
  48. 1 1
      o2server/x_organization_assemble_authentication/pom.xml
  49. 55 0
      o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/oauth/OauthAction.java
  50. 1 1
      o2server/x_organization_assemble_control/pom.xml
  51. 6 6
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/Business.java
  52. 7 7
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/UnitFactory.java
  53. 29 26
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/ActionDelete.java
  54. 243 0
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/ActionDeleteV2.java
  55. 2 2
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/ActionListPinyinInitial.java
  56. 7 2
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/BaseAction.java
  57. 19 1
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/PersonAction.java
  58. 14 11
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/unit/ActionCreate.java
  59. 37 31
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/unit/ActionEdit.java
  60. 1 1
      o2server/x_organization_assemble_express/pom.xml
  61. 27 0
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/Business.java
  62. 5 5
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/factory/UnitFactory.java
  63. 7 1
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/identity/ActionListWithGroup.java
  64. 7 1
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/identity/ActionListWithGroupObject.java
  65. 320 0
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionGet.java
  66. 121 0
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListFilterPaging.java
  67. 40 18
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListWithUnitSubDirectLikeObject.java
  68. 25 15
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListWithUnitSubDirectObject.java
  69. 44 22
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListWithUnitSubNestedLikeObject.java
  70. 21 14
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListWithUnitSubNestedObject.java
  71. 37 1
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/BaseAction.java
  72. 12 0
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ExceptionPersonNotExist.java
  73. 40 6
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/PersonAction.java
  74. 6 2
      o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/unit/ActionListObject.java
  75. 1 1
      o2server/x_organization_assemble_personal/pom.xml
  76. 5 5
      o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/factory/UnitFactory.java
  77. 1 1
      o2server/x_organization_core_entity/pom.xml
  78. 1 1
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Bind.java
  79. 3 3
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Custom.java
  80. 1 3
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Definition.java
  81. 1 1
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Group.java
  82. 1 1
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Identity.java
  83. 1 1
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/OauthCode.java
  84. 1 1
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/PermissionSetting.java
  85. 3 2
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Person.java
  86. 1 2
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/PersonAttribute.java
  87. 1 20
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/PersonCard.java
  88. 1 2
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Role.java
  89. 19 19
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Unit.java
  90. 1 2
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/UnitAttribute.java
  91. 1 2
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/UnitDuty.java
  92. 1 1
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/accredit/Empower.java
  93. 1 1
      o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/accredit/EmpowerLog.java
  94. 1 1
      o2server/x_organization_core_express/pom.xml
  95. 1 1
      o2server/x_portal_assemble_designer/pom.xml
  96. 1 1
      o2server/x_portal_assemble_surface/pom.xml
  97. 1 1
      o2server/x_portal_core_entity/pom.xml
  98. 1 1
      o2server/x_processplatform_assemble_bam/pom.xml
  99. 1 1
      o2server/x_processplatform_assemble_designer/pom.xml
  100. 1 1
      o2server/x_processplatform_assemble_surface/pom.xml

+ 18 - 18
build.xml

@@ -5,8 +5,8 @@
 	<property name="targetdir" value="target"/>
 	<property name="targetdir" value="target"/>
 	<target name="default" depends="md5code" />
 	<target name="default" depends="md5code" />
 	<target name="md5code" depends="default_zip">
 	<target name="md5code" depends="default_zip">
-		<checksum file="${preName}-${VERSION}-windows.zip" property="build_win.sha" algorithm="SHA-256" />
-		<length file="${preName}-${VERSION}-windows.zip" property="length_win"/>
+		<checksum file="${preName}-${VERSION}-windows-x64.zip" property="build_win.sha" algorithm="SHA-256" />
+		<length file="${preName}-${VERSION}-windows-x64.zip" property="length_win"/>
 		<script language="javascript">
 		<script language="javascript">
 			<![CDATA[
 			<![CDATA[
 			var length_win_bytes = project.getProperty("length_win");
 			var length_win_bytes = project.getProperty("length_win");
@@ -15,8 +15,8 @@
 			project.setNewProperty("length_win_mb", length_win_mbytes);
 			project.setNewProperty("length_win_mb", length_win_mbytes);
 		]]>
 		]]>
 		</script>
 		</script>
-		<checksum file="${preName}-${VERSION}-linux-x86.zip" property="build_linux.sha" algorithm="SHA-256" />
-		<length file="${preName}-${VERSION}-linux-x86.zip" property="length_linux"/>
+		<checksum file="${preName}-${VERSION}-linux-x64.zip" property="build_linux.sha" algorithm="SHA-256" />
+		<length file="${preName}-${VERSION}-linux-x64.zip" property="length_linux"/>
 		<script language="javascript">
 		<script language="javascript">
 			<![CDATA[
 			<![CDATA[
 			var length_linux_bytes = project.getProperty("length_linux");
 			var length_linux_bytes = project.getProperty("length_linux");
@@ -82,20 +82,20 @@
 			{
 			{
 			"windows": {
 			"windows": {
 			"system": "windows",
 			"system": "windows",
-			"name": "o2server-${VERSION}-windows",
-			"fileName": "o2server-${VERSION}-windows.zip",
+			"name": "o2server-${VERSION}-windows-x64",
+			"fileName": "o2server-${VERSION}-windows-x64.zip",
 			"fileSize": "${length_win_mb}MB",
 			"fileSize": "${length_win_mb}MB",
 			"updateTime": "${TODAY}",
 			"updateTime": "${TODAY}",
-			"url": "/download/o2server-${VERSION}-windows.zip",
+			"url": "/download/o2server-${VERSION}-windows-x64.zip",
 			"sha256": "${build_win.sha}"
 			"sha256": "${build_win.sha}"
 			},
 			},
 			"linux": {
 			"linux": {
 			"system": "linux",
 			"system": "linux",
-			"name": o2server-${VERSION}-linux-x86",
-			"fileName": "o2server-${VERSION}-linux-x86.zip",
+			"name": o2server-${VERSION}-linux-x64",
+			"fileName": "o2server-${VERSION}-linux-x64.zip",
 			"fileSize": "${length_linux_mb}MB",
 			"fileSize": "${length_linux_mb}MB",
 			"updateTime": "${TODAY}",
 			"updateTime": "${TODAY}",
-			"url": "/download/o2server-${VERSION}-linux-x86.zip",
+			"url": "/download/o2server-${VERSION}-linux-x64.zip",
 			"sha256": "${build_linux.sha}"
 			"sha256": "${build_linux.sha}"
 			},
 			},
 			"macos": {
 			"macos": {
@@ -151,20 +151,20 @@
 			"publishTime": "${TODAY}",
 			"publishTime": "${TODAY}",
 			"windows": {
 			"windows": {
 			"system": "windows",
 			"system": "windows",
-			"name": "o2server-${VERSION}-windows",
-			"fileName": "o2server-${VERSION}-windows.zip",
+			"name": "o2server-${VERSION}-windows-x64",
+			"fileName": "o2server-${VERSION}-windows-x64.zip",
 			"fileSize": "${length_win_mb}MB",
 			"fileSize": "${length_win_mb}MB",
 			"updateTime": "${TODAY}",
 			"updateTime": "${TODAY}",
-			"url": "/download/o2server-${VERSION}-windows.zip",
+			"url": "/download/o2server-${VERSION}-windows-x64.zip",
 			"sha256": "${build_win.sha}"
 			"sha256": "${build_win.sha}"
 			},
 			},
 			"linux": {
 			"linux": {
 			"system": "linux",
 			"system": "linux",
-			"name": "o2server-${VERSION}-linux-x86",
-			"fileName": "o2server-${VERSION}-linux-x86.zip",
+			"name": "o2server-${VERSION}-linux-x64",
+			"fileName": "o2server-${VERSION}-linux-x64.zip",
 			"fileSize": "${length_linux_mb}MB",
 			"fileSize": "${length_linux_mb}MB",
 			"updateTime": "${TODAY}",
 			"updateTime": "${TODAY}",
-			"url": "/download/o2server-${VERSION}-linux-x86.zip",
+			"url": "/download/o2server-${VERSION}-linux-x64.zip",
 			"sha256": "${build_linux.sha}"
 			"sha256": "${build_linux.sha}"
 			},
 			},
 			"macos": {
 			"macos": {
@@ -228,7 +228,7 @@
 		<echo file="${targetdir}/o2server/version.o2">{"version":"${VERSION}","date":"${TODAY}"}</echo>
 		<echo file="${targetdir}/o2server/version.o2">{"version":"${VERSION}","date":"${TODAY}"}</echo>
 	</target>
 	</target>
 	<target name="zip_windows">
 	<target name="zip_windows">
-		<zip encoding="utf-8" destfile="${preName}-${VERSION}-windows.zip" update="false">
+		<zip encoding="utf-8" destfile="${preName}-${VERSION}-windows-x64.zip" update="false">
 			<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
 			<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
 				<include name="commons/"/>
 				<include name="commons/"/>
 				<include name="configSample/"/>
 				<include name="configSample/"/>
@@ -249,7 +249,7 @@
 		</zip>
 		</zip>
 	</target>
 	</target>
 	<target name="zip_linux">
 	<target name="zip_linux">
-		<zip encoding="utf-8" destfile="${preName}-${VERSION}-linux-x86.zip" update="false">
+		<zip encoding="utf-8" destfile="${preName}-${VERSION}-linux-x64.zip" update="false">
 			<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
 			<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
 				<include name="commons/"/>
 				<include name="commons/"/>
 				<include name="configSample/"/>
 				<include name="configSample/"/>

+ 61 - 44
gulpfile.js

@@ -14,7 +14,7 @@ var gulp = require('gulp'),
     changed = require('gulp-changed'),
     changed = require('gulp-changed'),
     gulpif = require('gulp-if'),
     gulpif = require('gulp-if'),
     http = require('http');
     http = require('http');
-    concat = require('gulp-concat');
+concat = require('gulp-concat');
 var fg = require('fast-glob');
 var fg = require('fast-glob');
 var logger = require('gulp-logger');
 var logger = require('gulp-logger');
 var assetRev = require('gulp-tm-asset-rev');
 var assetRev = require('gulp-tm-asset-rev');
@@ -115,49 +115,49 @@ function downloadFile_progress(path, filename, headcb, progresscb, cb){
     //         progresscb({transferred:1});
     //         progresscb({transferred:1});
     //         cb();
     //         cb();
     //     }else{
     //     }else{
-            let stream = fs.createWriteStream(dest);
-            var options = { url:protocol+"://"+downloadHost+path };
-            var fileHost = downloadHost;
-            var filePath =  path;
-            stream.on('finish', () => {
-                //gutil.log("download", ":", gutil.colors.green(filename), " completed!");
-                cb();
-            });
-            stream.on('error', (err) => {
-                gutil.log(gutil.colors.red("download error"), ":", gutil.colors.red(filename), err);
+    let stream = fs.createWriteStream(dest);
+    var options = { url:protocol+"://"+downloadHost+path };
+    var fileHost = downloadHost;
+    var filePath =  path;
+    stream.on('finish', () => {
+        //gutil.log("download", ":", gutil.colors.green(filename), " completed!");
+        cb();
+    });
+    stream.on('error', (err) => {
+        gutil.log(gutil.colors.red("download error"), ":", gutil.colors.red(filename), err);
+    });
+
+    var req = http.request({
+        host:fileHost,
+        path:filePath,
+        method:'HEAD'
+    },function (res){
+        if (res.statusCode == 200) {
+            res.setEncoding(null);
+            var time = 0;
+            var l = res.headers['content-length'];
+            var str = progress({
+                length: l,
+                time: 100 /* ms */
             });
             });
+            headcb(l);
 
 
-            var req = http.request({
-                host:fileHost,
-                path:filePath,
-                method:'HEAD'
-            },function (res){
-                if (res.statusCode == 200) {
-                    res.setEncoding(null);
-                    var time = 0;
-                    var l = res.headers['content-length'];
-                    var str = progress({
-                        length: l,
-                        time: 100 /* ms */
-                    });
-                    headcb(l);
-
-                    str.on('progress', function(progress) {
-                        if (pb){
-                            progresscb(progress);
-                            pb.render({ completed: currentLength, total: totalLength, time: time+=100 });
-                        }
-
-                    });
-                    request.get(options).pipe(str).pipe(stream);
-                } else {
-                    gutil.log(gutil.colors.red("download error"), ":", gutil.colors.red(filename), "statusCode:"+res.statusCode);
+            str.on('progress', function(progress) {
+                if (pb){
+                    progresscb(progress);
+                    pb.render({ completed: currentLength, total: totalLength, time: time+=100 });
                 }
                 }
-            })
-            req.on('error', (e) => {
-                gutil.log(gutil.colors.red("download error"), ":", gutil.colors.red(filename), e);
+
             });
             });
-            req.end();
+            request.get(options).pipe(str).pipe(stream);
+        } else {
+            gutil.log(gutil.colors.red("download error"), ":", gutil.colors.red(filename), "statusCode:"+res.statusCode);
+        }
+    })
+    req.on('error', (e) => {
+        gutil.log(gutil.colors.red("download error"), ":", gutil.colors.red(filename), e);
+    });
+    req.end();
     //    }
     //    }
     //});
     //});
 }
 }
@@ -204,7 +204,7 @@ function downloadFile(path, filename, headcb, progresscb, cb){
     //             }
     //             }
     //
     //
     //         });
     //         });
-             request.get(options).pipe(stream);
+    request.get(options).pipe(stream);
     //     } else {
     //     } else {
     //         gutil.log(gutil.colors.red("download error"), ":", gutil.colors.red(filename), "statusCode:"+res.statusCode);
     //         gutil.log(gutil.colors.red("download error"), ":", gutil.colors.red(filename), "statusCode:"+res.statusCode);
     //     }
     //     }
@@ -286,11 +286,11 @@ function decompress_commons_and_jvm(cb){
             src: 'o2server/commons_git.tar.gz',
             src: 'o2server/commons_git.tar.gz',
             dest: 'o2server',
             dest: 'o2server',
             tar: {map: function(header){
             tar: {map: function(header){
-                count++;
+                    count++;
                     var d = new Date();
                     var d = new Date();
                     slog("["+dateFormat(d, "HH:MM:ss")+"] " + count +" "+ header.name+" ...");
                     slog("["+dateFormat(d, "HH:MM:ss")+"] " + count +" "+ header.name+" ...");
-                //gutil.log(gutil.colors.cyan(header.name), gutil.colors.yellow("..."));
-            }}
+                    //gutil.log(gutil.colors.cyan(header.name), gutil.colors.yellow("..."));
+                }}
         }, function(err){
         }, function(err){
             if(err) {
             if(err) {
                 gutil.log(gutil.colors.red("decompress error"), ":", gutil.colors.red("common.tar.gz "), err);
                 gutil.log(gutil.colors.red("decompress error"), ":", gutil.colors.red("common.tar.gz "), err);
@@ -424,6 +424,21 @@ function build_concat_o2(){
         .pipe(sourceMap.write(""))
         .pipe(sourceMap.write(""))
         .pipe(gulp.dest(dest))
         .pipe(gulp.dest(dest))
 }
 }
+function build_concat_base(){
+    var src = [
+        'o2web/source/x_desktop/js/base.js'
+    ];
+    var dest = 'target/o2server/servers/webServer/x_desktop/js/';
+    return gulp.src(src)
+        .pipe(sourceMap.init())
+        //.pipe(concat('o2.js'))
+        .pipe(gulp.dest(dest))
+        .pipe(concat('base.min.js'))
+        .pipe(uglify())
+        //.pipe(rename({ extname: '.min.js' }))
+        .pipe(sourceMap.write(""))
+        .pipe(gulp.dest(dest))
+}
 function build_concat_desktop(){
 function build_concat_desktop(){
     let path = "o2_core";
     let path = "o2_core";
     var src = [
     var src = [
@@ -771,6 +786,7 @@ function build_concat_baseportal_body() {
 
 
 exports.build_concat = gulp.parallel(
 exports.build_concat = gulp.parallel(
     build_concat_o2,
     build_concat_o2,
+    build_concat_base,
     build_concat_desktop,
     build_concat_desktop,
     build_concat_xform,
     build_concat_xform,
     build_bundle,
     build_bundle,
@@ -873,6 +889,7 @@ exports.build_web = gulp.series(
     build_web_move,
     build_web_move,
     gulp.parallel(
     gulp.parallel(
         build_concat_o2,
         build_concat_o2,
+        build_concat_base,
         build_concat_desktop,
         build_concat_desktop,
         build_concat_xform,
         build_concat_xform,
         gulp.series(build_concat_basework_style, build_concat_basework_action, build_concat_basework_body,build_concat_basework_clean),
         gulp.series(build_concat_basework_style, build_concat_basework_action, build_concat_basework_body,build_concat_basework_clean),

+ 2 - 2
o2server/configSample/externalDataSources_mysql.json

@@ -1,10 +1,10 @@
 [
 [
 	{
 	{
-		"url":"jdbc:mysql://127.0.0.1:3306/X?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8",      
+		"url":"jdbc:mysql://127.0.0.1:3306/X?autoReconnect=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8",
 		"username" : "root",
 		"username" : "root",
 		"password" :"password",
 		"password" :"password",
 		"includes": [],
 		"includes": [],
 		"excludes": [],
 		"excludes": [],
 		"enable" : true
 		"enable" : true
 	}
 	}
-]
+]

+ 10 - 1
o2server/configSample/processPlatform.json

@@ -59,6 +59,14 @@
     "###thresholdMinutes": "当工作滞留设定时间后,将尝试触发工作流转,可以自动处理由于人员变动的引起的工作滞留,默认24*60分钟.###"
     "###thresholdMinutes": "当工作滞留设定时间后,将尝试触发工作流转,可以自动处理由于人员变动的引起的工作滞留,默认24*60分钟.###"
   },
   },
   "processingSignalPersistEnable": false,
   "processingSignalPersistEnable": false,
+  "attachmentConfig": {
+    "fileSize": 0.0,
+    "fileTypeIncludes": [],
+    "fileTypeExcludes": [],
+    "###fileSize": "附件大小限制(单位M,默认不限制).###",
+    "###fileTypeIncludes": "只允许上传的文件后缀###",
+    "###fileTypeExcludes": "不允许上传的文件后缀###"
+  },
   "###maintenanceIdentity": "维护身份,当工作发生意外错误,无法找到对应的处理人情况下,先尝试将工作分配给创建身份,如果创建身份也不可获取,那么分配给指定人员,默认情况下这个值为空.###",
   "###maintenanceIdentity": "维护身份,当工作发生意外错误,无法找到对应的处理人情况下,先尝试将工作分配给创建身份,如果创建身份也不可获取,那么分配给指定人员,默认情况下这个值为空.###",
   "###formVersionCount": "表单历史版本保留数量,0为不保留.###",
   "###formVersionCount": "表单历史版本保留数量,0为不保留.###",
   "###processVersionCount": "流程历史版本保留数量,0为不保留.###",
   "###processVersionCount": "流程历史版本保留数量,0为不保留.###",
@@ -96,5 +104,6 @@
     "###count": "提醒数量限制.###"
     "###count": "提醒数量限制.###"
   },
   },
   "###extensionEvents": "事件扩充.###",
   "###extensionEvents": "事件扩充.###",
-  "###processingSignalPersistEnable": "是否保存工作处理信号内容,默认false.###"
+  "###processingSignalPersistEnable": "是否保存工作处理信号内容,默认false.###",
+  "###attachmentConfig": "流程附件上传限制大小或者类型.###"
 }
 }

+ 29 - 30
o2server/pom.xml

@@ -4,7 +4,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>o2oa</groupId>
 	<groupId>o2oa</groupId>
 	<artifactId>o2server</artifactId>
 	<artifactId>o2server</artifactId>
-	<version>${revision}</version>
+	<version>5.3</version>
 	<packaging>pom</packaging>
 	<packaging>pom</packaging>
 	<properties>
 	<properties>
 		<maven.compiler.source>1.8</maven.compiler.source>
 		<maven.compiler.source>1.8</maven.compiler.source>
@@ -12,7 +12,6 @@
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<project.reporting.outputEncoding>UTF-8
 		<project.reporting.outputEncoding>UTF-8
 		</project.reporting.outputEncoding>
 		</project.reporting.outputEncoding>
-		<revision>5.3</revision>
 	</properties>
 	</properties>
 	<modules>
 	<modules>
 		<module>x_base_core_project</module>
 		<module>x_base_core_project</module>
@@ -866,142 +865,142 @@
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_base_core_project</artifactId>
 				<artifactId>x_base_core_project</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_attendance_core_entity</artifactId>
 				<artifactId>x_attendance_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_bbs_core_entity</artifactId>
 				<artifactId>x_bbs_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_calendar_core_entity</artifactId>
 				<artifactId>x_calendar_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_cms_core_entity</artifactId>
 				<artifactId>x_cms_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_cms_core_express</artifactId>
 				<artifactId>x_cms_core_express</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_component_core_entity</artifactId>
 				<artifactId>x_component_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_file_core_entity</artifactId>
 				<artifactId>x_file_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_general_core_entity</artifactId>
 				<artifactId>x_general_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_hotpic_core_entity</artifactId>
 				<artifactId>x_hotpic_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_meeting_core_entity</artifactId>
 				<artifactId>x_meeting_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_message_core_entity</artifactId>
 				<artifactId>x_message_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_mind_core_entity</artifactId>
 				<artifactId>x_mind_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_organization_core_entity</artifactId>
 				<artifactId>x_organization_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_jpush_core_entity</artifactId>
 				<artifactId>x_jpush_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_organization_core_express</artifactId>
 				<artifactId>x_organization_core_express</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_portal_core_entity</artifactId>
 				<artifactId>x_portal_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_processplatform_core_entity</artifactId>
 				<artifactId>x_processplatform_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_processplatform_core_express</artifactId>
 				<artifactId>x_processplatform_core_express</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_query_core_entity</artifactId>
 				<artifactId>x_query_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_query_core_express</artifactId>
 				<artifactId>x_query_core_express</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_report_core_entity</artifactId>
 				<artifactId>x_report_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_strategydeploy_core_entity</artifactId>
 				<artifactId>x_strategydeploy_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_strategydeploy_assemble_control</artifactId>
 				<artifactId>x_strategydeploy_assemble_control</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_program_center</artifactId>
 				<artifactId>x_program_center</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_program_center_core_entity</artifactId>
 				<artifactId>x_program_center_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_teamwork_core_entity</artifactId>
 				<artifactId>x_teamwork_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 			<dependency>
 			<dependency>
 				<groupId>o2oa</groupId>
 				<groupId>o2oa</groupId>
 				<artifactId>x_workschedu_core_entity</artifactId>
 				<artifactId>x_workschedu_core_entity</artifactId>
-				<version>${revision}</version>
+				<version>5.3</version>
 			</dependency>
 			</dependency>
 		</dependencies>
 		</dependencies>
 	</dependencyManagement>
 	</dependencyManagement>

+ 16 - 0
o2server/restart_linux.sh

@@ -0,0 +1,16 @@
+echo ready to stop server $(cd "$(dirname "$0")"; pwd)
+$(cd "$(dirname "$0")"; pwd)/jvm/linux/bin/java -javaagent:$(cd "$(dirname "$0")"; pwd)/console.jar -cp $(cd "$(dirname "$0")"; pwd)/console.jar com.x.server.console.swapcommand.Exit
+echo 'check server stoped wait 2s-10s'
+sleep 2
+PID=`ps -ef | grep "$(cd "$(dirname "$0")"; pwd)"  | grep -v grep | awk '{print $2}'`
+if [ "X$PID" != "X" ]
+then
+        sleep 8
+        if [ "X$PID" != "X" ]
+        then
+                echo ready to kill server $PID
+                kill -9 $PID
+        fi
+fi
+echo 'server stoped ready to start'
+$(cd "$(dirname "$0")"; pwd)/start_linux.sh

+ 1 - 1
o2server/x_attendance_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_attendance_assemble_control</artifactId>
 	<artifactId>x_attendance_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_attendance_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_attendance_core_entity</artifactId>
 	<artifactId>x_attendance_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_base_core_project/pom.xml

@@ -6,7 +6,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_base_core_project</artifactId>
 	<artifactId>x_base_core_project</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 2 - 2
o2server/x_base_core_project/src/main/java/com/x/base/core/container/factory/PersistenceXmlHelper.java

@@ -282,8 +282,8 @@ public class PersistenceXmlHelper {
 		properties.put("openjpa.QueryCompilationCache", "false");
 		properties.put("openjpa.QueryCompilationCache", "false");
 		properties.put("openjpa.LockManager", "none");
 		properties.put("openjpa.LockManager", "none");
 		properties.put("openjpa.jdbc.ResultSetType", "scroll-insensitive");
 		properties.put("openjpa.jdbc.ResultSetType", "scroll-insensitive");
-		//使用false,使用ture支持多线程访问,但是是通过lock同步执行的.
-		properties.put("openjpa.Multithreaded", "false");
+		// 使用ture支持多线程访问,但是是通过lock同步执行的.
+		properties.put("openjpa.Multithreaded", "true");
 		/* 如果启用本地初始化会导致classLoad的问题 */
 		/* 如果启用本地初始化会导致classLoad的问题 */
 		properties.put("openjpa.DynamicEnhancementAgent", "false");
 		properties.put("openjpa.DynamicEnhancementAgent", "false");
 		properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=false)");
 		properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=false)");

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

@@ -1,6 +1,7 @@
 package com.x.base.core.entity.tools;
 package com.x.base.core.entity.tools;
 
 
 import java.io.File;
 import java.io.File;
+import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.io.OutputStreamWriter;
 import java.net.URL;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.net.URLClassLoader;
@@ -40,7 +41,7 @@ public class MetaModelBuilder {
 			File sourcedir = new File(args[1]);
 			File sourcedir = new File(args[1]);
 			File outputdir = new File(args[2]);
 			File outputdir = new File(args[2]);
 
 
-			File o2oadir = basedir.getParentFile().getParentFile();
+			File o2oadir = basedir.getParentFile();
 
 
 			JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
 			JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
 			StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, Charset.forName("UTF-8"));
 			StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, Charset.forName("UTF-8"));
@@ -72,12 +73,17 @@ public class MetaModelBuilder {
 	}
 	}
 
 
 	private static List<File> classpath(File o2oadir, File outputdir) {
 	private static List<File> classpath(File o2oadir, File outputdir) {
+
 		List<File> cp = new ArrayList<>();
 		List<File> cp = new ArrayList<>();
 
 
 		cp.add(outputdir);
 		cp.add(outputdir);
 
 
 		IOFileFilter filter = new WildcardFileFilter("x_base_core_project.jar");
 		IOFileFilter filter = new WildcardFileFilter("x_base_core_project.jar");
-		for (File o : FileUtils.listFiles(new File(o2oadir, "o2server/store/jars"), filter, null)) {
+		File storeDir = new File(o2oadir, "store/jars");
+		if(!storeDir.exists() || !storeDir.isDirectory()){
+			storeDir = new File(o2oadir.getParent(), "o2server/store/jars");
+		}
+		for (File o : FileUtils.listFiles(storeDir, filter, null)) {
 			cp.add(o);
 			cp.add(o);
 		}
 		}
 
 

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

@@ -73,7 +73,7 @@ public class ApplicationServer extends ConfigObject {
 	@FieldDescribe("暴露jest接口.")
 	@FieldDescribe("暴露jest接口.")
 	private Boolean exposeJest;
 	private Boolean exposeJest;
 
 
-	@FieldDescribe("是否启用长连接,默认false.")
+	@FieldDescribe("是否启用长连接,默认true.")
 	private Boolean persistentConnectionsEnable;
 	private Boolean persistentConnectionsEnable;
 
 
 	public Boolean getPersistentConnectionsEnable() {
 	public Boolean getPersistentConnectionsEnable() {

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

@@ -67,7 +67,7 @@ public class ExternalDataSource extends ConfigObject {
 	private List<String> excludes;
 	private List<String> excludes;
 	@FieldDescribe("默认日志级别,FATAL, ERROR, WARN, INFO, TRACE. 完成的配置为DefaultLevel=WARN, Tool=TRACE, Enhance=TRACE, METADATA=TRACE, Runtime=TRACE, Query=TRACE, DataCache=TRACE, JDBC=TRACE, SQL=TRACE")
 	@FieldDescribe("默认日志级别,FATAL, ERROR, WARN, INFO, TRACE. 完成的配置为DefaultLevel=WARN, Tool=TRACE, Enhance=TRACE, METADATA=TRACE, Runtime=TRACE, Query=TRACE, DataCache=TRACE, JDBC=TRACE, SQL=TRACE")
 	private String logLevel = DEFAULT_LOGLEVEL;
 	private String logLevel = DEFAULT_LOGLEVEL;
-	@FieldDescribe("事务隔离级别:default,none,read-committed,read-uncommitted,repeatable-read,serializable.默认使用default(数据库设置的事务级别).")
+	@FieldDescribe("事务隔离级别:default,none,read-uncommitted,read-committed,repeatable-read,serializable.默认使用default(数据库设置的事务级别).")
 	private String transactionIsolation;
 	private String transactionIsolation;
 	@FieldDescribe("测试入池连接,默认false.")
 	@FieldDescribe("测试入池连接,默认false.")
 	private Boolean testConnectionOnCheckin;
 	private Boolean testConnectionOnCheckin;
@@ -76,7 +76,7 @@ public class ExternalDataSource extends ConfigObject {
 	@FieldDescribe("空闲阈值,默认300秒.")
 	@FieldDescribe("空闲阈值,默认300秒.")
 	private Integer maxIdleTime;
 	private Integer maxIdleTime;
 
 
-	public static final Integer DEFAULT_MAXTOTAL = 50;
+	public static final Integer DEFAULT_MAXTOTAL = 100;
 
 
 	public static final Integer DEFAULT_MAXIDLE = 0;
 	public static final Integer DEFAULT_MAXIDLE = 0;
 
 
@@ -88,7 +88,7 @@ public class ExternalDataSource extends ConfigObject {
 
 
 	public static final String DEFAULT_LOGLEVEL = "WARN";
 	public static final String DEFAULT_LOGLEVEL = "WARN";
 
 
-	public static final String DEFAULT_TRANSACTIONISOLATION = "default";
+	public static final String DEFAULT_TRANSACTIONISOLATION = "read-committed";
 
 
 	public static final Boolean DEFAULT_TESTCONNECTIONONCHECKIN = false;
 	public static final Boolean DEFAULT_TESTCONNECTIONONCHECKIN = false;
 
 

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

@@ -75,6 +75,7 @@ public class ProcessPlatform extends ConfigObject {
 		this.deleteDraft = new DeleteDraft();
 		this.deleteDraft = new DeleteDraft();
 		this.passExpired = new PassExpired();
 		this.passExpired = new PassExpired();
 		this.processingSignalPersistEnable = DEFAULT_PROCESSINGSIGNALPERSISTENABLE;
 		this.processingSignalPersistEnable = DEFAULT_PROCESSINGSIGNALPERSISTENABLE;
+		this.attachmentConfig = new AttachmentConfig();
 	}
 	}
 
 
 	public Integer getExecutorCount() {
 	public Integer getExecutorCount() {
@@ -170,6 +171,10 @@ public class ProcessPlatform extends ConfigObject {
 	@FieldDescribe("是否保存工作处理信号内容,默认false.")
 	@FieldDescribe("是否保存工作处理信号内容,默认false.")
 	private Boolean processingSignalPersistEnable;
 	private Boolean processingSignalPersistEnable;
 
 
+	@FieldDescribe("流程附件上传限制大小或者类型.")
+	private AttachmentConfig attachmentConfig;
+
+
 	public Boolean getProcessingSignalPersistEnable() {
 	public Boolean getProcessingSignalPersistEnable() {
 		if (processingSignalPersistEnable == null) {
 		if (processingSignalPersistEnable == null) {
 			this.processingSignalPersistEnable = DEFAULT_PROCESSINGSIGNALPERSISTENABLE;
 			this.processingSignalPersistEnable = DEFAULT_PROCESSINGSIGNALPERSISTENABLE;
@@ -184,6 +189,14 @@ public class ProcessPlatform extends ConfigObject {
 		return extensionEvents;
 		return extensionEvents;
 	}
 	}
 
 
+	public AttachmentConfig getAttachmentConfig() {
+		return this.attachmentConfig == null ? new AttachmentConfig() : attachmentConfig;
+	}
+
+	public void setAttachmentConfig(AttachmentConfig attachmentConfig) {
+		this.attachmentConfig = attachmentConfig;
+	}
+
 	public Urge getUrge() {
 	public Urge getUrge() {
 		return this.urge == null ? new Urge() : this.urge;
 		return this.urge == null ? new Urge() : this.urge;
 	}
 	}
@@ -593,6 +606,49 @@ public class ProcessPlatform extends ConfigObject {
 
 
 	}
 	}
 
 
+	public static class AttachmentConfig extends ConfigObject {
+
+		public static AttachmentConfig defaultInstance() {
+			AttachmentConfig o = new AttachmentConfig();
+			return o;
+		}
+
+		public static final Integer DEFAULT_FILE_SIZE = 0;
+
+		@FieldDescribe("附件大小限制(单位M,默认不限制).")
+		private Integer fileSize = DEFAULT_FILE_SIZE;
+
+		@FieldDescribe("只允许上传的文件后缀")
+		private List<String> fileTypeIncludes = new ArrayList<>();
+
+		@FieldDescribe("不允许上传的文件后缀")
+		private List<String> fileTypeExcludes = new ArrayList<>();
+
+		public Integer getFileSize() {
+			return fileSize;
+		}
+
+		public void setFileSize(Integer fileSize) {
+			this.fileSize = fileSize;
+		}
+
+		public List<String> getFileTypeIncludes() {
+			return fileTypeIncludes;
+		}
+
+		public void setFileTypeIncludes(List<String> fileTypeIncludes) {
+			this.fileTypeIncludes = fileTypeIncludes;
+		}
+
+		public List<String> getFileTypeExcludes() {
+			return fileTypeExcludes;
+		}
+
+		public void setFileTypeExcludes(List<String> fileTypeExcludes) {
+			this.fileTypeExcludes = fileTypeExcludes;
+		}
+	}
+
 	public static class ExtensionEvents {
 	public static class ExtensionEvents {
 
 
 		@FieldDescribe("工作附件上传.")
 		@FieldDescribe("工作附件上传.")
@@ -841,4 +897,4 @@ public class ProcessPlatform extends ConfigObject {
 
 
 	}
 	}
 
 
-}
+}

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

@@ -18,6 +18,7 @@ import com.x.base.core.project.annotation.ModuleType;
 		"com.x.processplatform.core.entity.content.ReadCompleted","com.x.processplatform.core.entity.element.Process",
 		"com.x.processplatform.core.entity.content.ReadCompleted","com.x.processplatform.core.entity.element.Process",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.cms.core.entity.Document",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.cms.core.entity.Document",
 		"com.x.cms.core.entity.AppInfo", "com.x.cms.core.entity.CategoryInfo", "com.x.cms.core.entity.Review",
 		"com.x.cms.core.entity.AppInfo", "com.x.cms.core.entity.CategoryInfo", "com.x.cms.core.entity.Review",
+		"com.x.organization.core.entity.Person", "com.x.organization.core.entity.Unit", "com.x.organization.core.entity.Group",
 		"com.x.query.dynamic.entity.*" }, storageTypes = { StorageType.processPlatform }, storeJars = {
 		"com.x.query.dynamic.entity.*" }, storageTypes = { StorageType.processPlatform }, storeJars = {
 				"x_query_core_entity", "x_organization_core_entity", "x_organization_core_express",
 				"x_query_core_entity", "x_organization_core_entity", "x_organization_core_express",
 				"x_processplatform_core_entity", "x_cms_core_entity",
 				"x_processplatform_core_entity", "x_cms_core_entity",

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

@@ -19,6 +19,7 @@ import com.x.base.core.project.annotation.ModuleType;
 		"com.x.processplatform.core.entity.content.WorkCompleted","com.x.processplatform.core.entity.element.Process",
 		"com.x.processplatform.core.entity.content.WorkCompleted","com.x.processplatform.core.entity.element.Process",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.cms.core.entity.Document",
 		"com.x.processplatform.core.entity.content.Attachment", "com.x.cms.core.entity.Document",
 		"com.x.cms.core.entity.Review", "com.x.cms.core.entity.AppInfo", "com.x.cms.core.entity.CategoryInfo",
 		"com.x.cms.core.entity.Review", "com.x.cms.core.entity.AppInfo", "com.x.cms.core.entity.CategoryInfo",
+		"com.x.organization.core.entity.Person", "com.x.organization.core.entity.Unit", "com.x.organization.core.entity.Group",
 		"com.x.query.dynamic.entity.*" }, storageTypes = { StorageType.processPlatform, StorageType.cms }, storeJars = {
 		"com.x.query.dynamic.entity.*" }, storageTypes = { StorageType.processPlatform, StorageType.cms }, storeJars = {
 				"x_query_core_entity", "x_organization_core_entity", "x_organization_core_express",
 				"x_query_core_entity", "x_organization_core_entity", "x_organization_core_express",
 				"x_processplatform_core_entity", "x_cms_core_entity",
 				"x_processplatform_core_entity", "x_cms_core_entity",

+ 1 - 1
o2server/x_bbs_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_bbs_assemble_control</artifactId>
 	<artifactId>x_bbs_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_bbs_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_bbs_core_entity</artifactId>
 	<artifactId>x_bbs_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_calendar_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_calendar_assemble_control</artifactId>
 	<artifactId>x_calendar_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_calendar_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_calendar_core_entity</artifactId>
 	<artifactId>x_calendar_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_cms_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_cms_assemble_control</artifactId>
 	<artifactId>x_cms_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 56 - 56
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/view/ActionListNextPageViewData.java

@@ -30,9 +30,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
 public class ActionListNextPageViewData extends BaseAction {
 public class ActionListNextPageViewData extends BaseAction {
-	
+
 	private static  Logger logger = LoggerFactory.getLogger( ActionListNextPageViewData.class );
 	private static  Logger logger = LoggerFactory.getLogger( ActionListNextPageViewData.class );
-	
+
 	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson, String lastDocId, Integer pageSize, JsonElement jsonElement ) throws Exception {
 	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson, String lastDocId, Integer pageSize, JsonElement jsonElement ) throws Exception {
 		ActionResult<List<Wo>> result = new ActionResult<>();
 		ActionResult<List<Wo>> result = new ActionResult<>();
 		List<Wo> wos = new ArrayList<>();
 		List<Wo> wos = new ArrayList<>();
@@ -54,15 +54,15 @@ public class ActionListNextPageViewData extends BaseAction {
 		List<String> sortableFieldNames = null;
 		List<String> sortableFieldNames = null;
 		List<String> sortableFieldNames_upperCase = null;
 		List<String> sortableFieldNames_upperCase = null;
 		QueryFilter queryFilter = null;
 		QueryFilter queryFilter = null;
-		
+
 		if( pageSize <= 0 || pageSize == null ){
 		if( pageSize <= 0 || pageSize == null ){
 			pageSize = 12;
 			pageSize = 12;
 		}
 		}
-		
+
 		if( "(0)".equals( lastDocId ) || StringUtils.isEmpty( lastDocId ) ){
 		if( "(0)".equals( lastDocId ) || StringUtils.isEmpty( lastDocId ) ){
 			lastDocId = null;
 			lastDocId = null;
 		}
 		}
-		
+
 		try {
 		try {
 			wi = this.convertToWrapIn( jsonElement, Wi.class );
 			wi = this.convertToWrapIn( jsonElement, Wi.class );
 		} catch (Exception e ) {
 		} catch (Exception e ) {
@@ -71,19 +71,19 @@ public class ActionListNextPageViewData extends BaseAction {
 			result.error( exception );
 			result.error( exception );
 			logger.error( e, effectivePerson, request, null );
 			logger.error( e, effectivePerson, request, null );
 		}
 		}
-		
+
 		if( StringUtils.isEmpty( wi.getCategoryId() ) ) {
 		if( StringUtils.isEmpty( wi.getCategoryId() ) ) {
 			check = false;
 			check = false;
 			Exception exception = new ExceptionViewDateQueryCategoryIdEmpty();
 			Exception exception = new ExceptionViewDateQueryCategoryIdEmpty();
 			result.error( exception );
 			result.error( exception );
 		}
 		}
-		
+
 		if( StringUtils.isEmpty( wi.getViewId() ) ) {
 		if( StringUtils.isEmpty( wi.getViewId() ) ) {
 			check = false;
 			check = false;
 			Exception exception = new ExceptionViewDataQueryViewIdEmpty();
 			Exception exception = new ExceptionViewDataQueryViewIdEmpty();
 			result.error( exception );
 			result.error( exception );
 		}
 		}
-		
+
 		try {
 		try {
 			isManager = userManagerService.isManager(effectivePerson );
 			isManager = userManagerService.isManager(effectivePerson );
 		} catch (Exception e) {
 		} catch (Exception e) {
@@ -108,7 +108,7 @@ public class ActionListNextPageViewData extends BaseAction {
 				logger.error( e, effectivePerson, request, null);
 				logger.error( e, effectivePerson, request, null);
 			}
 			}
 		}
 		}
-		
+
 		if( check ){
 		if( check ){
 			try{
 			try{
 				view = viewServiceAdv.get( wi.getViewId() );
 				view = viewServiceAdv.get( wi.getViewId() );
@@ -133,7 +133,7 @@ public class ActionListNextPageViewData extends BaseAction {
 				result.error( exception );
 				result.error( exception );
 			}
 			}
 		}
 		}
-		
+
 		if( check ){
 		if( check ){
 			try{
 			try{
 				//检查当前Category与View的关联是否存在
 				//检查当前Category与View的关联是否存在
@@ -151,7 +151,7 @@ public class ActionListNextPageViewData extends BaseAction {
 				logger.error( e, effectivePerson, request, null);
 				logger.error( e, effectivePerson, request, null);
 			}
 			}
 		}
 		}
-		
+
 		if( check ){//设置查询条件的默认值,如果不传入则使用列表设置的值
 		if( check ){//设置查询条件的默认值,如果不传入则使用列表设置的值
 			if( StringUtils.isEmpty( wi.getOrderField() ) ) {
 			if( StringUtils.isEmpty( wi.getOrderField() ) ) {
 				wi.setOrderField(view.getOrderField());
 				wi.setOrderField(view.getOrderField());
@@ -184,7 +184,7 @@ public class ActionListNextPageViewData extends BaseAction {
 				}
 				}
 			}
 			}
 		}
 		}
-		
+
 		if (check) {
 		if (check) {
 			try {
 			try {
 				queryFilter = wi.getQueryFilter();
 				queryFilter = wi.getQueryFilter();
@@ -195,12 +195,12 @@ public class ActionListNextPageViewData extends BaseAction {
 				logger.error(e, effectivePerson, request, null);
 				logger.error(e, effectivePerson, request, null);
 			}
 			}
 		}
 		}
-		
+
 		if( check ) {
 		if( check ) {
 			if( StringUtils.isNotEmpty( lastDocId )) {
 			if( StringUtils.isNotEmpty( lastDocId )) {
 				document = documentQueryService.get( lastDocId );
 				document = documentQueryService.get( lastDocId );
 			}
 			}
-			
+
 			//判断一下,如果排序的列不是Document的常规列, 需要从Item里查出符合条件的DocumentID列表
 			//判断一下,如果排序的列不是Document的常规列, 需要从Item里查出符合条件的DocumentID列表
 			//从正常的Document属性列和全大写的属性列中都需要判断一下, sortableFieldNames and sortableFieldNames_upperCase
 			//从正常的Document属性列和全大写的属性列中都需要判断一下, sortableFieldNames and sortableFieldNames_upperCase
 			//如果sortableFieldNames and sortableFieldNames_upperCase都没有,那么就属性业务属性数据了,需要从item里去查询
 			//如果sortableFieldNames and sortableFieldNames_upperCase都没有,那么就属性业务属性数据了,需要从item里去查询
@@ -209,20 +209,20 @@ public class ActionListNextPageViewData extends BaseAction {
 				List<String> viewableDocList = null;
 				List<String> viewableDocList = null;
 				if( isManager ) {
 				if( isManager ) {
 					documentCount = documentQueryService.countWithConditionOutofPermission( queryFilter );
 					documentCount = documentQueryService.countWithConditionOutofPermission( queryFilter );
-					viewableDocList = documentQueryService.listIdsByCategoryId( category.getId(), wi.getOrderField(), wi.getOrderField(), 2000 );
+					viewableDocList = documentQueryService.listIdsByCategoryId( category.getId(), wi.getOrderField(), wi.getOrderType(), 2000 );
 				}else {
 				}else {
 					documentCount = documentQueryService.countWithConditionInReview( personName, queryFilter );
 					documentCount = documentQueryService.countWithConditionInReview( personName, queryFilter );
-					viewableDocList = documentQueryService.listDocIdsWithConditionInReview( personName, wi.getOrderField(), wi.getOrderField(), queryFilter, 2000 );
+					viewableDocList = documentQueryService.listDocIdsWithConditionInReview( personName, wi.getOrderField(), wi.getOrderType(), queryFilter, 2000 );
 				}
 				}
-				
+				logger.debug("documentCount:{}===viewableDocListCount:{}",documentCount,viewableDocList.size());
 				//以所有可见的DocId为基准,从Item里查询出2000个排序好的对象,拼成 dataObjList ( docId, sortFieldValue )返回
 				//以所有可见的DocId为基准,从Item里查询出2000个排序好的对象,拼成 dataObjList ( docId, sortFieldValue )返回
 				List<SimpleItemObj> simpleItems = documentQueryService.listSortObjWithOrderFieldInData( viewableDocList, wi.getOrderField(), wi.getOrderField(), wi.getOrderType() );
 				List<SimpleItemObj> simpleItems = documentQueryService.listSortObjWithOrderFieldInData( viewableDocList, wi.getOrderField(), wi.getOrderField(), wi.getOrderType() );
-			
+
 				if( ListTools.isNotEmpty( simpleItems )) {
 				if( ListTools.isNotEmpty( simpleItems )) {
 					String sequence = null;
 					String sequence = null;
 					Boolean  pickDocument = false;
 					Boolean  pickDocument = false;
-					documentList = new ArrayList<>();
-					for( SimpleItemObj item : simpleItems ) {				
+					searchResultList = new ArrayList<>();
+					for( SimpleItemObj item : simpleItems ) {
 						//填充Document数据
 						//填充Document数据
 						sequence = documentQueryService.getSequence( item.getId() );
 						sequence = documentQueryService.getSequence( item.getId() );
 						if( StringUtils.isNotEmpty( sequence)) {
 						if( StringUtils.isNotEmpty( sequence)) {
@@ -232,10 +232,10 @@ public class ActionListNextPageViewData extends BaseAction {
 								}
 								}
 							}else {
 							}else {
 								pickDocument = true;//取第1页的pageSize个document
 								pickDocument = true;//取第1页的pageSize个document
-							}							
+							}
 							if( pickDocument ) {
 							if( pickDocument ) {
-								if( documentList.size() < pageSize ) {
-									documentList.add( documentQueryService.get( item.getId() ));
+								if( searchResultList.size() < pageSize ) {
+									searchResultList.add( documentQueryService.get( item.getId() ));
 								}else {//数据够一页了
 								}else {//数据够一页了
 									break;
 									break;
 								}
 								}
@@ -297,10 +297,10 @@ public class ActionListNextPageViewData extends BaseAction {
 							}
 							}
 						}
 						}
 					}
 					}
-				}	
+				}
 			}
 			}
-		}		
-		
+		}
+
 		if( check ){
 		if( check ){
 			//补充业务数据
 			//补充业务数据
 			if( searchResultList != null && searchResultList.size() > 0 ){
 			if( searchResultList != null && searchResultList.size() > 0 ){
@@ -334,7 +334,7 @@ public class ActionListNextPageViewData extends BaseAction {
 							result.error( exception );
 							result.error( exception );
 							logger.error( e, effectivePerson, request, null);
 							logger.error( e, effectivePerson, request, null);
 						}
 						}
-					}					
+					}
 					wos.add( wo );
 					wos.add( wo );
 				}
 				}
 			}
 			}
@@ -342,36 +342,36 @@ public class ActionListNextPageViewData extends BaseAction {
 			result.setData( wos );
 			result.setData( wos );
 			result.setCount( documentCount );
 			result.setCount( documentCount );
 		}
 		}
-		
+
 		return result;
 		return result;
 	}
 	}
 
 
 	public class Wi {
 	public class Wi {
-		
+
 		@FieldDescribe( "是否置顶:ALL|TOP|UNTOP." )
 		@FieldDescribe( "是否置顶:ALL|TOP|UNTOP." )
 		private String topFlag = "ALL";
 		private String topFlag = "ALL";
-		
+
 		@FieldDescribe("需要过滤文档的分类ID")
 		@FieldDescribe("需要过滤文档的分类ID")
 		private String categoryId;
 		private String categoryId;
 
 
 		@FieldDescribe("需要查询的列表ID")
 		@FieldDescribe("需要查询的列表ID")
 		private String viewId;
 		private String viewId;
-		
+
 		@FieldDescribe("当前查询用于排序的列名,默认以列表配置为主")
 		@FieldDescribe("当前查询用于排序的列名,默认以列表配置为主")
 		private String orderField;
 		private String orderField;
 
 
 		@FieldDescribe("当前排序方式:DESC|ASC,默认以列表配置为主")
 		@FieldDescribe("当前排序方式:DESC|ASC,默认以列表配置为主")
 		private String orderType;
 		private String orderType;
-		
+
 		@FieldDescribe("值类别:支持string | date | time | datetime | boolean | boolean | text")
 		@FieldDescribe("值类别:支持string | date | time | datetime | boolean | boolean | text")
 		private String fieldType;
 		private String fieldType;
-		
+
 		@FieldDescribe("查询文档类型: 全部 | 信息 | 数据 ")
 		@FieldDescribe("查询文档类型: 全部 | 信息 | 数据 ")
 		private String documentType;
 		private String documentType;
-		
+
 		@FieldDescribe("需要查询的文档状态:published | draft | archived")
 		@FieldDescribe("需要查询的文档状态:published | draft | archived")
 		private String docStatus;
 		private String docStatus;
-		
+
 		public String getFieldType() {
 		public String getFieldType() {
 			return fieldType;
 			return fieldType;
 		}
 		}
@@ -427,7 +427,7 @@ public class ActionListNextPageViewData extends BaseAction {
 		public void setDocumentType(String documentType) {
 		public void setDocumentType(String documentType) {
 			this.documentType = documentType;
 			this.documentType = documentType;
 		}
 		}
-		
+
 		public String getTopFlag() {
 		public String getTopFlag() {
 			return topFlag;
 			return topFlag;
 		}
 		}
@@ -439,27 +439,27 @@ public class ActionListNextPageViewData extends BaseAction {
 		/**
 		/**
 		 * 根据传入的查询参数,组织一个完整的QueryFilter对象
 		 * 根据传入的查询参数,组织一个完整的QueryFilter对象
 		 * @return
 		 * @return
-		 * @throws Exception 
+		 * @throws Exception
 		 */
 		 */
 		public QueryFilter getQueryFilter() throws Exception {
 		public QueryFilter getQueryFilter() throws Exception {
-			QueryFilter queryFilter = new QueryFilter();		
+			QueryFilter queryFilter = new QueryFilter();
 			queryFilter.setJoinType( "and" );
 			queryFilter.setJoinType( "and" );
-			
+
 			if( StringUtils.isNotEmpty( this.getCategoryId() )) {
 			if( StringUtils.isNotEmpty( this.getCategoryId() )) {
 				queryFilter.addEqualsTerm( new EqualsTerm( "categoryId", this.getCategoryId() ) );
 				queryFilter.addEqualsTerm( new EqualsTerm( "categoryId", this.getCategoryId() ) );
 			}
 			}
-			
+
 			//文档类型:全部 | 信息 | 数据
 			//文档类型:全部 | 信息 | 数据
-			if( StringUtils.isNotEmpty( this.getDocumentType())) {			
+			if( StringUtils.isNotEmpty( this.getDocumentType())) {
 				if( "信息".equals( this.getDocumentType() )) {
 				if( "信息".equals( this.getDocumentType() )) {
 					queryFilter.addEqualsTerm( new EqualsTerm( "documentType", this.getDocumentType() ) );
 					queryFilter.addEqualsTerm( new EqualsTerm( "documentType", this.getDocumentType() ) );
 				}else if( "数据".equals( this.getDocumentType() )) {
 				}else if( "数据".equals( this.getDocumentType() )) {
 					queryFilter.addEqualsTerm( new EqualsTerm( "documentType", this.getDocumentType() ) );
 					queryFilter.addEqualsTerm( new EqualsTerm( "documentType", this.getDocumentType() ) );
 				}
 				}
 			}
 			}
-			
+
 			//是否置顶:ALL|TOP|UNTOP
 			//是否置顶:ALL|TOP|UNTOP
-			if( StringUtils.isNotEmpty( this.getTopFlag())) {			
+			if( StringUtils.isNotEmpty( this.getTopFlag())) {
 				if( "TOP".equals( this.getTopFlag() )) {
 				if( "TOP".equals( this.getTopFlag() )) {
 					queryFilter.addIsTrueTerm( new IsTrueTerm( "isTop" ) );
 					queryFilter.addIsTrueTerm( new IsTrueTerm( "isTop" ) );
 				}else if( "UNTOP".equals( this.getDocumentType() )) {
 				}else if( "UNTOP".equals( this.getDocumentType() )) {
@@ -470,20 +470,20 @@ public class ActionListNextPageViewData extends BaseAction {
 			if( StringUtils.isNotEmpty( this.getDocStatus())) {
 			if( StringUtils.isNotEmpty( this.getDocStatus())) {
 				queryFilter.addEqualsTerm( new EqualsTerm( "docStatus", this.getDocStatus() ) );
 				queryFilter.addEqualsTerm( new EqualsTerm( "docStatus", this.getDocStatus() ) );
 			}
 			}
-			
+
 			return queryFilter;
 			return queryFilter;
 		}
 		}
 
 
 	}
 	}
-	
+
 	public static class Wo extends GsonPropertyObject {
 	public static class Wo extends GsonPropertyObject {
-		
+
 		@FieldDescribe( "文档对象的序列." )
 		@FieldDescribe( "文档对象的序列." )
 		private String sequence = null;
 		private String sequence = null;
-		
+
 		@FieldDescribe( "文档对象的ID." )
 		@FieldDescribe( "文档对象的ID." )
 		private String id = null;
 		private String id = null;
-		
+
 		@FieldDescribe( "排序列的值." )
 		@FieldDescribe( "排序列的值." )
 		private String orderFieldValue = null;
 		private String orderFieldValue = null;
 
 
@@ -531,21 +531,21 @@ public class ActionListNextPageViewData extends BaseAction {
 
 
 		public void setOrderFieldValue(String orderFieldValue) {
 		public void setOrderFieldValue(String orderFieldValue) {
 			this.orderFieldValue = orderFieldValue;
 			this.orderFieldValue = orderFieldValue;
-		}		
+		}
 	}
 	}
-	
+
 	public static class WoDocument extends Document {
 	public static class WoDocument extends Document {
-		
+
 		private static final long serialVersionUID = -5076990764713538973L;
 		private static final long serialVersionUID = -5076990764713538973L;
-		
+
 		public static WrapCopier<Document, WoDocument> copier = WrapCopierFactory.wo( Document.class, WoDocument.class, null, JpaObject.FieldsInvisible);
 		public static WrapCopier<Document, WoDocument> copier = WrapCopierFactory.wo( Document.class, WoDocument.class, null, JpaObject.FieldsInvisible);
 
 
 		@FieldDescribe("创建者姓名(简称)")
 		@FieldDescribe("创建者姓名(简称)")
 		private String creatorPersonShort = null;
 		private String creatorPersonShort = null;
-		
+
 		@FieldDescribe("创建者所属组织(简称)")
 		@FieldDescribe("创建者所属组织(简称)")
 		private String creatorUnitNameShort = null;
 		private String creatorUnitNameShort = null;
-		
+
 		@FieldDescribe("创建者顶层组织(简称)")
 		@FieldDescribe("创建者顶层组织(简称)")
 		private String creatorTopUnitNameShort = null;
 		private String creatorTopUnitNameShort = null;
 
 
@@ -571,6 +571,6 @@ public class ActionListNextPageViewData extends BaseAction {
 
 
 		public void setCreatorTopUnitNameShort(String creatorTopUnitNameShort) {
 		public void setCreatorTopUnitNameShort(String creatorTopUnitNameShort) {
 			this.creatorTopUnitNameShort = creatorTopUnitNameShort;
 			this.creatorTopUnitNameShort = creatorTopUnitNameShort;
-		}		
+		}
 	}
 	}
-}
+}

+ 46 - 46
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/CmsBatchOperationProcessService.java

@@ -25,14 +25,14 @@ import com.x.cms.core.entity.Review;
  * 批处理操作执行
  * 批处理操作执行
  */
  */
 public class CmsBatchOperationProcessService {
 public class CmsBatchOperationProcessService {
-	
+
 	public static String OPT_OBJ_DOCUMENT = "DOCUMENT";
 	public static String OPT_OBJ_DOCUMENT = "DOCUMENT";
 	public static String OPT_OBJ_CATEGORY = "CATEGORY";
 	public static String OPT_OBJ_CATEGORY = "CATEGORY";
 	public static String OPT_OBJ_APPINFO = "APPINFO";
 	public static String OPT_OBJ_APPINFO = "APPINFO";
 	public static String OPT_TYPE_PERMISSION = "PERMISSION";
 	public static String OPT_TYPE_PERMISSION = "PERMISSION";
 	public static String OPT_TYPE_UPDATENAME = "UPDATENAME";
 	public static String OPT_TYPE_UPDATENAME = "UPDATENAME";
 	public static String OPT_TYPE_DELETE = "DELETE";
 	public static String OPT_TYPE_DELETE = "DELETE";
-	
+
 	private static  Logger logger = LoggerFactory.getLogger( CmsBatchOperationProcessService.class );
 	private static  Logger logger = LoggerFactory.getLogger( CmsBatchOperationProcessService.class );
 	private DocumentInfoService documentInfoService = new DocumentInfoService();
 	private DocumentInfoService documentInfoService = new DocumentInfoService();
 	private ReviewService reviewService = new ReviewService();
 	private ReviewService reviewService = new ReviewService();
@@ -40,7 +40,7 @@ public class CmsBatchOperationProcessService {
 	 * 批处理操作执行
 	 * 批处理操作执行
 	 * @param cmsBatchOperation
 	 * @param cmsBatchOperation
 	 * @return
 	 * @return
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	 */
 	public String process( CmsBatchOperation cmsBatchOperation ) throws Exception {
 	public String process( CmsBatchOperation cmsBatchOperation ) throws Exception {
 		logger.debug( "process -> Cms processing batch operation: " + cmsBatchOperation.toString() );
 		logger.debug( "process -> Cms processing batch operation: " + cmsBatchOperation.toString() );
@@ -53,11 +53,11 @@ public class CmsBatchOperationProcessService {
 				emc.check( cmsBatchOperation, CheckPersistType.all );
 				emc.check( cmsBatchOperation, CheckPersistType.all );
 				emc.commit();
 				emc.commit();
 				logger.debug( "process -> cms change batch operation running......: " );
 				logger.debug( "process -> cms change batch operation running......: " );
-			}			
+			}
 		} catch (Exception e) {
 		} catch (Exception e) {
 			throw e;
 			throw e;
 		}
 		}
-		
+
 		if( "DOCUMENT".equalsIgnoreCase( cmsBatchOperation.getObjType() )) {
 		if( "DOCUMENT".equalsIgnoreCase( cmsBatchOperation.getObjType() )) {
 			if( "PERMISSION".equalsIgnoreCase( cmsBatchOperation.getOptType() )) {//文档处理
 			if( "PERMISSION".equalsIgnoreCase( cmsBatchOperation.getOptType() )) {//文档处理
 				//将categoryName是旧分类名称的所有文档的分类和栏目相关的信息更新掉,最后删除当前的批处理信息
 				//将categoryName是旧分类名称的所有文档的分类和栏目相关的信息更新掉,最后删除当前的批处理信息
@@ -75,7 +75,7 @@ public class CmsBatchOperationProcessService {
 				}
 				}
 			}else if( "PERMISSION".equalsIgnoreCase( cmsBatchOperation.getOptType()  )) {
 			}else if( "PERMISSION".equalsIgnoreCase( cmsBatchOperation.getOptType()  )) {
 				//分类修改权限
 				//分类修改权限
-				refreshDocumentReviewInCagetory( cmsBatchOperation.getId(), cmsBatchOperation.getBundle() );				
+				refreshDocumentReviewInCagetory( cmsBatchOperation.getId(), cmsBatchOperation.getBundle() );
 			}else if( "DELETE".equalsIgnoreCase( cmsBatchOperation.getOptType()  )) {
 			}else if( "DELETE".equalsIgnoreCase( cmsBatchOperation.getOptType()  )) {
 				//删除文档,并且修改分类所属的栏目中的分类数量和文档数量
 				//删除文档,并且修改分类所属的栏目中的分类数量和文档数量
 				deleteDocumentInCategory( cmsBatchOperation.getId(), cmsBatchOperation.getBundle() );
 				deleteDocumentInCategory( cmsBatchOperation.getId(), cmsBatchOperation.getBundle() );
@@ -89,7 +89,7 @@ public class CmsBatchOperationProcessService {
 				}
 				}
 			}else if( "PERMISSION".equalsIgnoreCase( cmsBatchOperation.getOptType()  )) {
 			}else if( "PERMISSION".equalsIgnoreCase( cmsBatchOperation.getOptType()  )) {
 				//栏目修改权限
 				//栏目修改权限
-				refreshDocumentReviewInAppInfo( cmsBatchOperation.getId(), cmsBatchOperation.getBundle() );		
+				refreshDocumentReviewInAppInfo( cmsBatchOperation.getId(), cmsBatchOperation.getBundle() );
 			}else if( "DELETE".equalsIgnoreCase( cmsBatchOperation.getOptType()  )) {
 			}else if( "DELETE".equalsIgnoreCase( cmsBatchOperation.getOptType()  )) {
 				//删除分类以及文档,并且修改分类所属的栏目中的分类数量和文档数量
 				//删除分类以及文档,并且修改分类所属的栏目中的分类数量和文档数量
 				deleteDocumentInApp( cmsBatchOperation.getId(), cmsBatchOperation.getBundle() );
 				deleteDocumentInApp( cmsBatchOperation.getId(), cmsBatchOperation.getBundle() );
@@ -130,12 +130,12 @@ public class CmsBatchOperationProcessService {
 							document.setAppAlias( appInfo.getAppName() );
 							document.setAppAlias( appInfo.getAppName() );
 						}
 						}
 						emc.check( document, CheckPersistType.all );
 						emc.check( document, CheckPersistType.all );
-						emc.commit();						
-						cmsBatchOperationPersistService.addOperation( 
-								CmsBatchOperationProcessService.OPT_OBJ_DOCUMENT, 
+						emc.commit();
+						cmsBatchOperationPersistService.addOperation(
+								CmsBatchOperationProcessService.OPT_OBJ_DOCUMENT,
 								CmsBatchOperationProcessService.OPT_TYPE_PERMISSION, document.getId(), document.getId(), "栏目权限变更引起文档Review变更:ID=" + document.getId() );
 								CmsBatchOperationProcessService.OPT_TYPE_PERMISSION, document.getId(), document.getId(), "栏目权限变更引起文档Review变更:ID=" + document.getId() );
 					}
 					}
-					
+
 				}
 				}
 				ids = null;
 				ids = null;
 				documentList = null;
 				documentList = null;
@@ -164,7 +164,7 @@ public class CmsBatchOperationProcessService {
 			Long count = business.getDocumentFactory().countByCategoryId(categoryId);
 			Long count = business.getDocumentFactory().countByCategoryId(categoryId);
 			Long maxTimes = count/maxQueryCount + 2;
 			Long maxTimes = count/maxQueryCount + 2;
 			logger.info( "refreshDocumentReviewInCagetory -> There are : " + count + " documents need to refresh review, maxTimes=" + maxTimes  );
 			logger.info( "refreshDocumentReviewInCagetory -> There are : " + count + " documents need to refresh review, maxTimes=" + maxTimes  );
-			
+
 			for( int i=0; i<=maxTimes; i++ ) {
 			for( int i=0; i<=maxTimes; i++ ) {
 				ids = business.getDocumentFactory().listReviewedIdsByCategoryId(categoryId, maxQueryCount );
 				ids = business.getDocumentFactory().listReviewedIdsByCategoryId(categoryId, maxQueryCount );
 				if(ListTools.isNotEmpty( ids )) {
 				if(ListTools.isNotEmpty( ids )) {
@@ -177,13 +177,13 @@ public class CmsBatchOperationProcessService {
 						document.setReviewed( false );
 						document.setReviewed( false );
 						emc.check( document, CheckPersistType.all );
 						emc.check( document, CheckPersistType.all );
 						emc.commit();
 						emc.commit();
-						
+
 						logger.info( "refreshDocumentReviewInCagetory -> Send docment permission operation to queue[queueBatchOperation], document:" + document.getTitle()  );
 						logger.info( "refreshDocumentReviewInCagetory -> Send docment permission operation to queue[queueBatchOperation], document:" + document.getTitle()  );
-						cmsBatchOperationPersistService.addOperation( 
-								CmsBatchOperationProcessService.OPT_OBJ_DOCUMENT, 
+						cmsBatchOperationPersistService.addOperation(
+								CmsBatchOperationProcessService.OPT_OBJ_DOCUMENT,
 								CmsBatchOperationProcessService.OPT_TYPE_PERMISSION, document.getId(), document.getId(), "分类权限变更引起文档Review变更:ID=" + document.getId() );
 								CmsBatchOperationProcessService.OPT_TYPE_PERMISSION, document.getId(), document.getId(), "分类权限变更引起文档Review变更:ID=" + document.getId() );
 					}
 					}
-					
+
 				}
 				}
 				ids = null;
 				ids = null;
 				documentList = null;
 				documentList = null;
@@ -200,7 +200,7 @@ public class CmsBatchOperationProcessService {
 	}
 	}
 
 
 	private void deleteDocumentReview(String id, String docId) throws Exception {
 	private void deleteDocumentReview(String id, String docId) throws Exception {
-		CmsBatchOperation cmsBatchOperation = null;		
+		CmsBatchOperation cmsBatchOperation = null;
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			cmsBatchOperation = emc.find( id, CmsBatchOperation.class );
 			cmsBatchOperation = emc.find( id, CmsBatchOperation.class );
 			logger.info( "deleteDocumentReview -> delete all reviews for document: " + docId );
 			logger.info( "deleteDocumentReview -> delete all reviews for document: " + docId );
@@ -223,16 +223,16 @@ public class CmsBatchOperationProcessService {
 	 * 全部删除,然后再重新插入Review记录
 	 * 全部删除,然后再重新插入Review记录
 	 * @param id
 	 * @param id
 	 * @param docId
 	 * @param docId
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	 */
 	private void refreshDocumentReview( String id, String docId ) throws Exception {
 	private void refreshDocumentReview( String id, String docId ) throws Exception {
 		CmsBatchOperation cmsBatchOperation = null;
 		CmsBatchOperation cmsBatchOperation = null;
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			cmsBatchOperation = emc.find( id, CmsBatchOperation.class );
 			cmsBatchOperation = emc.find( id, CmsBatchOperation.class );
-			
+
 			reviewService.refreshDocumentReview( emc, docId );
 			reviewService.refreshDocumentReview( emc, docId );
 
 
-			/*Document document = emc.find( docId, Document.class );
+			Document document = emc.find( docId, Document.class );
 			if( document != null ) {
 			if( document != null ) {
 				emc.beginTransaction( Document.class );
 				emc.beginTransaction( Document.class );
 				document.setReviewed( true );
 				document.setReviewed( true );
@@ -261,8 +261,8 @@ public class CmsBatchOperationProcessService {
 
 
 				emc.check( document, CheckPersistType.all );
 				emc.check( document, CheckPersistType.all );
 				emc.commit();
 				emc.commit();
-			}*/
-			
+			}
+
 			if( cmsBatchOperation != null ) {
 			if( cmsBatchOperation != null ) {
 				emc.beginTransaction( CmsBatchOperation.class );
 				emc.beginTransaction( CmsBatchOperation.class );
 				emc.remove( cmsBatchOperation, CheckRemoveType.all );
 				emc.remove( cmsBatchOperation, CheckRemoveType.all );
@@ -330,7 +330,7 @@ public class CmsBatchOperationProcessService {
 	 * 将栏目下所有的文档删除,最后删除当前的批处理信息
 	 * 将栏目下所有的文档删除,最后删除当前的批处理信息
 	 * @param id
 	 * @param id
 	 * @param bundle
 	 * @param bundle
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	 */
 	private void deleteDocumentInApp(String id, String bundle) throws Exception {
 	private void deleteDocumentInApp(String id, String bundle) throws Exception {
 		Long docCount = 0L;
 		Long docCount = 0L;
@@ -341,12 +341,12 @@ public class CmsBatchOperationProcessService {
 		List<String> categoryIds = null;
 		List<String> categoryIds = null;
 		CmsBatchOperation cmsBatchOperation = null;
 		CmsBatchOperation cmsBatchOperation = null;
 		CategoryInfo categoryInfo = null;
 		CategoryInfo categoryInfo = null;
-		
+
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			Business business = new Business(emc);
 			Business business = new Business(emc);
 			cmsBatchOperation = emc.find( id, CmsBatchOperation.class );
 			cmsBatchOperation = emc.find( id, CmsBatchOperation.class );
 			categoryIds = business.getCategoryInfoFactory().listByAppId( bundle );
 			categoryIds = business.getCategoryInfoFactory().listByAppId( bundle );
-			
+
 			if( ListTools.isNotEmpty( categoryIds )) {
 			if( ListTools.isNotEmpty( categoryIds )) {
 				for( String categoryId : categoryIds ) {
 				for( String categoryId : categoryIds ) {
 					categoryInfo = emc.find( categoryId, CategoryInfo.class );
 					categoryInfo = emc.find( categoryId, CategoryInfo.class );
@@ -356,19 +356,19 @@ public class CmsBatchOperationProcessService {
 						logger.info( "deleteDocumentInApp -> Cms processing batch operation: remove category: " + categoryInfo.getId() + ", alias: " + categoryInfo.getCategoryAlias() );
 						logger.info( "deleteDocumentInApp -> Cms processing batch operation: remove category: " + categoryInfo.getId() + ", alias: " + categoryInfo.getCategoryAlias() );
 						emc.commit();
 						emc.commit();
 					}
 					}
-					
+
 					//将该目录下所有的文档删除
 					//将该目录下所有的文档删除
 					docCount = business.getDocumentFactory().countByCategoryId( categoryId );
 					docCount = business.getDocumentFactory().countByCategoryId( categoryId );
 					if( docCount > 0 ) {
 					if( docCount > 0 ) {
 						totalWhileCount = (int) (docCount/queryMaxCount) + 1;
 						totalWhileCount = (int) (docCount/queryMaxCount) + 1;
 						if( totalWhileCount > 0 ) {
 						if( totalWhileCount > 0 ) {
-							while( docCount > 0 && currenteWhileCount <= totalWhileCount ) {//查询1000个文档进行操作						
-								document_ids = business.getDocumentFactory().listByCategoryId( bundle, queryMaxCount );														
-								for( String docId : document_ids ){									
+							while( docCount > 0 && currenteWhileCount <= totalWhileCount ) {//查询1000个文档进行操作
+								document_ids = business.getDocumentFactory().listByCategoryId( bundle, queryMaxCount );
+								for( String docId : document_ids ){
 									try {
 									try {
 										documentInfoService.delete( emc, docId );
 										documentInfoService.delete( emc, docId );
-										new CmsBatchOperationPersistService().addOperation( 
-												CmsBatchOperationProcessService.OPT_OBJ_DOCUMENT, 
+										new CmsBatchOperationPersistService().addOperation(
+												CmsBatchOperationProcessService.OPT_OBJ_DOCUMENT,
 												CmsBatchOperationProcessService.OPT_TYPE_DELETE, id, id, "栏目删除引起文档删除:ID=" + id );
 												CmsBatchOperationProcessService.OPT_TYPE_DELETE, id, id, "栏目删除引起文档删除:ID=" + id );
 										logger.info( "deleteDocumentInApp -> cms processing batch operation: remove document("+ currenteWhileCount +"/" + totalWhileCount + "): " + docId );
 										logger.info( "deleteDocumentInApp -> cms processing batch operation: remove document("+ currenteWhileCount +"/" + totalWhileCount + "): " + docId );
 									}catch( Exception e ) {
 									}catch( Exception e ) {
@@ -403,7 +403,7 @@ public class CmsBatchOperationProcessService {
 	 * @param id
 	 * @param id
 	 * @param bundle
 	 * @param bundle
 	 * @param oldInfo
 	 * @param oldInfo
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	 */
 	private void changeAppNameInCategory( String id, String bundle, String oldName ) throws Exception {
 	private void changeAppNameInCategory( String id, String bundle, String oldName ) throws Exception {
 		Long docCount = 0L;
 		Long docCount = 0L;
@@ -415,7 +415,7 @@ public class CmsBatchOperationProcessService {
 		AppInfo appInfo = null;
 		AppInfo appInfo = null;
 		CategoryInfo categoryInfo = null;
 		CategoryInfo categoryInfo = null;
 		CmsBatchOperation cmsBatchOperation = null;
 		CmsBatchOperation cmsBatchOperation = null;
-		
+
 		//先查询该栏目下的所有分类信息列表
 		//先查询该栏目下的所有分类信息列表
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			Business business = new Business(emc);
 			Business business = new Business(emc);
@@ -432,7 +432,7 @@ public class CmsBatchOperationProcessService {
 						categoryInfo.setAppName( appInfo.getAppName() );
 						categoryInfo.setAppName( appInfo.getAppName() );
 						if( StringUtils.isEmpty( categoryInfo.getCategoryAlias() )) {
 						if( StringUtils.isEmpty( categoryInfo.getCategoryAlias() )) {
 							categoryInfo.setCategoryAlias( appInfo.getAppName() + "-" + categoryInfo.getCategoryName() );
 							categoryInfo.setCategoryAlias( appInfo.getAppName() + "-" + categoryInfo.getCategoryName() );
-						}						
+						}
 						emc.beginTransaction( CategoryInfo.class );
 						emc.beginTransaction( CategoryInfo.class );
 						emc.check( categoryInfo, CheckPersistType.all );
 						emc.check( categoryInfo, CheckPersistType.all );
 						logger.info( "changeAppNameInCategory -> cms processing batch operation: change category: " + categoryInfo.getId() + ", app_name: " + oldName + " -> " + categoryInfo.getAppName() );
 						logger.info( "changeAppNameInCategory -> cms processing batch operation: change category: " + categoryInfo.getId() + ", app_name: " + oldName + " -> " + categoryInfo.getAppName() );
@@ -445,7 +445,7 @@ public class CmsBatchOperationProcessService {
 						if( totalWhileCount > 0 ) {
 						if( totalWhileCount > 0 ) {
 							while( docCount > 0 && currenteWhileCount <= totalWhileCount ) {
 							while( docCount > 0 && currenteWhileCount <= totalWhileCount ) {
 								//查询1000个文档进行操作
 								//查询1000个文档进行操作
-								document_ids = business.getDocumentFactory().listByCategoryIdAndNotEqualAppName( categoryInfo.getId(), appInfo.getAppName(), queryMaxCount );							
+								document_ids = business.getDocumentFactory().listByCategoryIdAndNotEqualAppName( categoryInfo.getId(), appInfo.getAppName(), queryMaxCount );
 								changeDocumentInfoWithCategory( emc, document_ids, categoryInfo );
 								changeDocumentInfoWithCategory( emc, document_ids, categoryInfo );
 								logger.info( "changeAppNameInCategory -> cms processing batch operation: update app and category info for document, batch("+ currenteWhileCount +"/" + totalWhileCount + ") " );
 								logger.info( "changeAppNameInCategory -> cms processing batch operation: update app and category info for document, batch("+ currenteWhileCount +"/" + totalWhileCount + ") " );
 								//当前循环次数+1
 								//当前循环次数+1
@@ -472,7 +472,7 @@ public class CmsBatchOperationProcessService {
 	 * 将分类下所有的文档删除,最后删除当前的批处理信息
 	 * 将分类下所有的文档删除,最后删除当前的批处理信息
 	 * @param id
 	 * @param id
 	 * @param bundle
 	 * @param bundle
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	 */
 	private void deleteDocumentInCategory( String id, String bundle ) throws Exception {
 	private void deleteDocumentInCategory( String id, String bundle ) throws Exception {
 		Long docCount = 0L;
 		Long docCount = 0L;
@@ -482,31 +482,31 @@ public class CmsBatchOperationProcessService {
 		List<String> document_ids = null;
 		List<String> document_ids = null;
 		CmsBatchOperation cmsBatchOperation = null;
 		CmsBatchOperation cmsBatchOperation = null;
 		CategoryInfo categoryInfo = null;
 		CategoryInfo categoryInfo = null;
-		
+
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			Business business = new Business(emc);
 			Business business = new Business(emc);
 			cmsBatchOperation = emc.find( id, CmsBatchOperation.class );
 			cmsBatchOperation = emc.find( id, CmsBatchOperation.class );
 			categoryInfo = emc.find( bundle, CategoryInfo.class );
 			categoryInfo = emc.find( bundle, CategoryInfo.class );
-			
+
 			if( categoryInfo != null ) {
 			if( categoryInfo != null ) {
 				emc.beginTransaction( CategoryInfo.class );
 				emc.beginTransaction( CategoryInfo.class );
 				emc.remove( categoryInfo, CheckRemoveType.all );
 				emc.remove( categoryInfo, CheckRemoveType.all );
 				logger.info( "deleteDocumentInCategory -> cms processing batch operation: remove category, id:"+ bundle );
 				logger.info( "deleteDocumentInCategory -> cms processing batch operation: remove category, id:"+ bundle );
 				emc.commit();
 				emc.commit();
 			}
 			}
-			
+
 			//将该目录下所有的文档删除
 			//将该目录下所有的文档删除
 			docCount = business.getDocumentFactory().countByCategoryId( bundle );
 			docCount = business.getDocumentFactory().countByCategoryId( bundle );
 			if( docCount > 0 ) {
 			if( docCount > 0 ) {
 				totalWhileCount = (int) (docCount/queryMaxCount) + 1;
 				totalWhileCount = (int) (docCount/queryMaxCount) + 1;
 				if( totalWhileCount > 0 ) {
 				if( totalWhileCount > 0 ) {
-					while( docCount > 0 && currenteWhileCount <= totalWhileCount ) {//查询1000个文档进行操作						
+					while( docCount > 0 && currenteWhileCount <= totalWhileCount ) {//查询1000个文档进行操作
 						document_ids = business.getDocumentFactory().listByCategoryId( bundle, queryMaxCount );
 						document_ids = business.getDocumentFactory().listByCategoryId( bundle, queryMaxCount );
 						for( String docId : document_ids ){
 						for( String docId : document_ids ){
 							try {
 							try {
 								documentInfoService.delete( emc, docId );
 								documentInfoService.delete( emc, docId );
-								new CmsBatchOperationPersistService().addOperation( 
-										CmsBatchOperationProcessService.OPT_OBJ_DOCUMENT, 
+								new CmsBatchOperationPersistService().addOperation(
+										CmsBatchOperationProcessService.OPT_OBJ_DOCUMENT,
 										CmsBatchOperationProcessService.OPT_TYPE_DELETE, id, id, "分类删除引起文档删除:ID=" + id );
 										CmsBatchOperationProcessService.OPT_TYPE_DELETE, id, id, "分类删除引起文档删除:ID=" + id );
 								logger.info( "deleteDocumentInCategory -> cms processing batch operation: remove document("+ currenteWhileCount +"/" + totalWhileCount + "): " + docId );
 								logger.info( "deleteDocumentInCategory -> cms processing batch operation: remove document("+ currenteWhileCount +"/" + totalWhileCount + "): " + docId );
 							}catch( Exception e ) {
 							}catch( Exception e ) {
@@ -519,7 +519,7 @@ public class CmsBatchOperationProcessService {
 						docCount = business.getDocumentFactory().countByCategoryId( categoryInfo.getId() );
 						docCount = business.getDocumentFactory().countByCategoryId( categoryInfo.getId() );
 					}
 					}
 				}
 				}
-			}			
+			}
 			if( cmsBatchOperation != null ) {
 			if( cmsBatchOperation != null ) {
 				emc.beginTransaction( CmsBatchOperation.class );
 				emc.beginTransaction( CmsBatchOperation.class );
 				emc.remove( cmsBatchOperation, CheckRemoveType.all );
 				emc.remove( cmsBatchOperation, CheckRemoveType.all );
@@ -538,7 +538,7 @@ public class CmsBatchOperationProcessService {
 	 * @param id 批处理信息ID
 	 * @param id 批处理信息ID
 	 * @param bundle  绑定的分类信息ID
 	 * @param bundle  绑定的分类信息ID
 	 * @param oldName 分类使用的旧名称
 	 * @param oldName 分类使用的旧名称
-	 * @throws Exception 
+	 * @throws Exception
 	 */
 	 */
 	private void changeCategoryNameInDocument( String id, String bundle, String oldName ) throws Exception {
 	private void changeCategoryNameInDocument( String id, String bundle, String oldName ) throws Exception {
 		Long docCount = 0L;
 		Long docCount = 0L;
@@ -560,8 +560,8 @@ public class CmsBatchOperationProcessService {
 					if( totalWhileCount > 0 ) {
 					if( totalWhileCount > 0 ) {
 						while( docCount > 0 && currenteWhileCount <= totalWhileCount ) {
 						while( docCount > 0 && currenteWhileCount <= totalWhileCount ) {
 							//查询1000个文档进行操作
 							//查询1000个文档进行操作
-							document_ids = business.getDocumentFactory().listByCategoryIdAndCategoryName(bundle, categoryInfo.getCategoryName(), queryMaxCount );							
-							changeDocumentInfoWithCategory( emc, document_ids, categoryInfo );			
+							document_ids = business.getDocumentFactory().listByCategoryIdAndCategoryName(bundle, categoryInfo.getCategoryName(), queryMaxCount );
+							changeDocumentInfoWithCategory( emc, document_ids, categoryInfo );
 							logger.info( "changeCategoryNameInDocument -> cms processing batch operation: update app and category info for document, batch("+ currenteWhileCount +"/" + totalWhileCount + ") " );
 							logger.info( "changeCategoryNameInDocument -> cms processing batch operation: update app and category info for document, batch("+ currenteWhileCount +"/" + totalWhileCount + ") " );
 							//当前循环次数+1
 							//当前循环次数+1
 							currenteWhileCount ++;
 							currenteWhileCount ++;

+ 1 - 1
o2server/x_cms_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_cms_core_entity</artifactId>
 	<artifactId>x_cms_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_cms_core_express/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_cms_core_express</artifactId>
 	<artifactId>x_cms_core_express</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_component_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_component_assemble_control</artifactId>
 	<artifactId>x_component_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_component_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_component_core_entity</artifactId>
 	<artifactId>x_component_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_console/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_console</artifactId>
 	<artifactId>x_console</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 4 - 2
o2server/x_console/src/main/java/com/x/server/console/CommandFactory.java

@@ -18,10 +18,10 @@ public class CommandFactory {
 	public static final Pattern test_pattern = Pattern.compile("^ {0,}test {0,}$", Pattern.CASE_INSENSITIVE);
 	public static final Pattern test_pattern = Pattern.compile("^ {0,}test {0,}$", Pattern.CASE_INSENSITIVE);
 
 
 	//public static final Pattern create_encrypt_key_pattern = Pattern.compile("^ {0,}create encrypt key{0,}$",Pattern.CASE_INSENSITIVE);
 	//public static final Pattern create_encrypt_key_pattern = Pattern.compile("^ {0,}create encrypt key{0,}$",Pattern.CASE_INSENSITIVE);
-	
+
 	public static final Pattern create_encrypt_key_pattern = Pattern.compile("^ {0,}create encrypt key {0,}$",
 	public static final Pattern create_encrypt_key_pattern = Pattern.compile("^ {0,}create encrypt key {0,}$",
 			Pattern.CASE_INSENSITIVE);
 			Pattern.CASE_INSENSITIVE);
-	
+
 	public static final Pattern start_pattern = Pattern
 	public static final Pattern start_pattern = Pattern
 			.compile("^ {0,}start {0,}(data|storage|center|application|web|all|) {0,}$", Pattern.CASE_INSENSITIVE);
 			.compile("^ {0,}start {0,}(data|storage|center|application|web|all|) {0,}$", Pattern.CASE_INSENSITIVE);
 
 
@@ -50,6 +50,8 @@ public class CommandFactory {
 
 
 	public static final Pattern exit_pattern = Pattern.compile("^ {0,}exit {0,}$", Pattern.CASE_INSENSITIVE);
 	public static final Pattern exit_pattern = Pattern.compile("^ {0,}exit {0,}$", Pattern.CASE_INSENSITIVE);
 
 
+	public static final Pattern restart_pattern = Pattern.compile("^ {0,}restart {0,}$", Pattern.CASE_INSENSITIVE);
+
 	// public static final Pattern updateFile_pattern = Pattern.compile("^ {0,}update file (.+) (true|false) {0,}$",
 	// public static final Pattern updateFile_pattern = Pattern.compile("^ {0,}update file (.+) (true|false) {0,}$",
 	// 		Pattern.CASE_INSENSITIVE);
 	// 		Pattern.CASE_INSENSITIVE);
 
 

+ 103 - 12
o2server/x_console/src/main/java/com/x/server/console/Main.java

@@ -1,14 +1,10 @@
 package com.x.server.console;
 package com.x.server.console;
 
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.RandomAccessFile;
+import java.io.*;
 import java.lang.management.ManagementFactory;
 import java.lang.management.ManagementFactory;
 import java.lang.management.RuntimeMXBean;
 import java.lang.management.RuntimeMXBean;
 import java.lang.reflect.Method;
 import java.lang.reflect.Method;
+import java.net.Socket;
 import java.net.URL;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.net.URLClassLoader;
 import java.nio.MappedByteBuffer;
 import java.nio.MappedByteBuffer;
@@ -19,12 +15,12 @@ import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.nio.file.Paths;
 import java.nio.file.StandardOpenOption;
 import java.nio.file.StandardOpenOption;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.regex.Matcher;
 import java.util.regex.Matcher;
 
 
+import com.x.base.core.project.gson.XGsonBuilder;
+import com.x.base.core.project.tools.Crypto;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.BooleanUtils;
@@ -52,6 +48,7 @@ public class Main {
 	private static final String MANIFEST_FILENAME = "manifest.cfg";
 	private static final String MANIFEST_FILENAME = "manifest.cfg";
 	private static final String GITIGNORE_FILENAME = ".gitignore";
 	private static final String GITIGNORE_FILENAME = ".gitignore";
 	private static final LinkedBlockingQueue<String> commandQueue = new LinkedBlockingQueue<>();
 	private static final LinkedBlockingQueue<String> commandQueue = new LinkedBlockingQueue<>();
+	private static NodeAgent nodeAgent;
 
 
 	private static final Thread swapCommandThread = new Thread(() -> {
 	private static final Thread swapCommandThread = new Thread(() -> {
 		// 文件中的命令输出到解析器
 		// 文件中的命令输出到解析器
@@ -122,7 +119,7 @@ public class Main {
 		swapCommandThread.start();
 		swapCommandThread.start();
 		consoleCommandThread.start();
 		consoleCommandThread.start();
 		if (BooleanUtils.isTrue(Config.currentNode().nodeAgentEnable())) {
 		if (BooleanUtils.isTrue(Config.currentNode().nodeAgentEnable())) {
-			NodeAgent nodeAgent = new NodeAgent();
+			nodeAgent = new NodeAgent();
 			nodeAgent.setCommandQueue(commandQueue);
 			nodeAgent.setCommandQueue(commandQueue);
 			nodeAgent.setDaemon(true);
 			nodeAgent.setDaemon(true);
 			nodeAgent.start();
 			nodeAgent.start();
@@ -234,6 +231,12 @@ public class Main {
 			if (matcher.find()) {
 			if (matcher.find()) {
 				exit();
 				exit();
 			}
 			}
+
+			matcher = CommandFactory.restart_pattern.matcher(cmd);
+			if (matcher.find()) {
+				restart();
+				continue;
+			}
 			System.out.println("unknown command:" + cmd);
 			System.out.println("unknown command:" + cmd);
 		}
 		}
 		// 关闭定时器
 		// 关闭定时器
@@ -421,6 +424,94 @@ public class Main {
 		System.exit(0);
 		System.exit(0);
 	}
 	}
 
 
+	private static void restart() {
+		try {
+			System.out.println("ready to restart...");
+			stopAll();
+			stopAllThreads();
+			String osName = System.getProperty("os.name");
+			//System.out.println("当前操作系统是:"+osName);
+			File file = new File(Config.base(), "start_linux.sh");
+			if (osName.toLowerCase().startsWith("mac")){
+				file = new File(Config.base(), "start_macos.sh");
+			}else if (osName.toLowerCase().startsWith("windows")) {
+				file = new File(Config.base(), "start_windows.bat");
+			}else if(!file.exists()) {
+				file  = new File("start_aix.sh");
+				if(!file.exists()) {
+					file  = new File("start_arm.sh");
+					if(!file.exists()) {
+						file  = new File("start_mips.sh");
+						if(!file.exists()) {
+							file  = new File("start_raspi.sh");
+						}
+					}
+				}
+			}
+			if(file.exists()) {
+                System.out.println("server will start in new process!");
+				Process ps = Runtime.getRuntime().exec(file.getAbsolutePath());
+				Thread.sleep(2000);
+				if(!Config.currentNode().autoStart()) {
+					for (int i = 0; i < 5; i++) {
+						try (Socket socket = new Socket(Config.node(), Config.currentNode().nodeAgentPort())) {
+							socket.setKeepAlive(true);
+							socket.setSoTimeout(2000);
+							try (DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
+								 DataInputStream dis = new DataInputStream(socket.getInputStream())) {
+								Map<String, Object> commandObject = new HashMap<>();
+								commandObject.put("command", "command:start");
+								commandObject.put("credential", Crypto.rsaEncrypt("o2@", Config.publicKey()));
+								dos.writeUTF(XGsonBuilder.toJson(commandObject));
+								dos.flush();
+								break;
+							}
+						} catch (Exception ex) {
+							try {
+								Thread.sleep(1000);
+							} catch (InterruptedException e) {
+							}
+						}
+					}
+				}
+			}else{
+				System.out.println("not support restart in current operating system!start server failure!");
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		} finally {
+			System.exit(0);
+		}
+	}
+
+	private static void stopAllThreads(){
+		if(swapCommandThread!=null){
+			try {
+				swapCommandThread.interrupt();
+			} catch (Exception e) {
+			}
+		}
+		if(consoleCommandThread!=null){
+			try {
+				consoleCommandThread.interrupt();
+			} catch (Exception e) {
+			}
+		}
+		if(nodeAgent!=null){
+			try {
+				nodeAgent.stopAgent();
+				try {
+					Thread.sleep(1000);
+				} catch (InterruptedException e) {
+				}
+				nodeAgent.interrupt();
+				nodeAgent = null;
+			} catch (Exception e) {
+			}
+		}
+
+	}
+
 	private static void stopAll() {
 	private static void stopAll() {
 		try {
 		try {
 			WebServer webServer = Config.currentNode().getWeb();
 			WebServer webServer = Config.currentNode().getWeb();
@@ -466,7 +557,7 @@ public class Main {
 
 
 	/**
 	/**
 	 * 检查store目录下的war文件是否全部在manifest.cfg中
 	 * 检查store目录下的war文件是否全部在manifest.cfg中
-	 * 
+	 *
 	 * @param base o2server的根目录
 	 * @param base o2server的根目录
 	 */
 	 */
 	private static void scanWar(String base) throws Exception {
 	private static void scanWar(String base) throws Exception {
@@ -621,4 +712,4 @@ public class Main {
 		Files.write(path, Long.toString(pid).getBytes(), StandardOpenOption.CREATE,
 		Files.write(path, Long.toString(pid).getBytes(), StandardOpenOption.CREATE,
 				StandardOpenOption.TRUNCATE_EXISTING);
 				StandardOpenOption.TRUNCATE_EXISTING);
 	}
 	}
-}
+}

+ 25 - 2
o2server/x_console/src/main/java/com/x/server/console/NodeAgent.java

@@ -92,11 +92,16 @@ public class NodeAgent extends Thread {
 		this.commandQueue = commandQueue;
 		this.commandQueue = commandQueue;
 	}
 	}
 
 
+	private volatile boolean runFlag = true;
+
+	private ServerSocket serverSocket = null;
+
 	@Override
 	@Override
 	public void run() {
 	public void run() {
-		try (ServerSocket serverSocket = new ServerSocket(Config.currentNode().nodeAgentPort())) {
+		try{
+			serverSocket = new ServerSocket(Config.currentNode().nodeAgentPort());
 			Matcher matcher;
 			Matcher matcher;
-			while (true) {
+			while (runFlag) {
 				try (Socket socket = serverSocket.accept()) {
 				try (Socket socket = serverSocket.accept()) {
 					try (DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
 					try (DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
 							DataInputStream dis = new DataInputStream(socket.getInputStream())) {
 							DataInputStream dis = new DataInputStream(socket.getInputStream())) {
@@ -261,6 +266,24 @@ public class NodeAgent extends Thread {
 			}
 			}
 		} catch (Exception e) {
 		} catch (Exception e) {
 			e.printStackTrace();
 			e.printStackTrace();
+		} finally {
+			if(serverSocket!=null){
+				try {
+					serverSocket.close();
+				} catch (IOException e) {
+				}
+			}
+		}
+	}
+
+	public void stopAgent(){
+		try {
+			this.runFlag = false;
+			if(serverSocket!=null) {
+				this.serverSocket.close();
+				this.serverSocket = null;
+			}
+		} catch (Exception e) {
 		}
 		}
 	}
 	}
 
 

+ 1 - 1
o2server/x_file_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_file_assemble_control</artifactId>
 	<artifactId>x_file_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 3 - 2
o2server/x_file_assemble_control/src/main/java/com/x/file/assemble/control/jaxrs/attachment2/ActionGetImageScaleBase64.java

@@ -8,6 +8,7 @@ import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WrapString;
 import com.x.base.core.project.jaxrs.WrapString;
 import com.x.file.assemble.control.ThisApplication;
 import com.x.file.assemble.control.ThisApplication;
+import com.x.file.core.entity.open.FileType;
 import com.x.file.core.entity.open.OriginFile;
 import com.x.file.core.entity.open.OriginFile;
 import com.x.file.core.entity.personal.Attachment2;
 import com.x.file.core.entity.personal.Attachment2;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.codec.binary.Base64;
@@ -30,7 +31,7 @@ class ActionGetImageScaleBase64 extends BaseAction {
 				throw new Exception("person{name:" + effectivePerson.getDistinguishedName() + "} access attachment{id:"
 				throw new Exception("person{name:" + effectivePerson.getDistinguishedName() + "} access attachment{id:"
 						+ id + "} denied.");
 						+ id + "} denied.");
 			}
 			}
-			if (!ArrayUtils.contains(IMAGE_EXTENSIONS, attachment.getExtension())) {
+			if (!FileType.getExtType(attachment.getExtension()).equals(FileType.image.name())) {
 				throw new Exception("attachment not image file.");
 				throw new Exception("attachment not image file.");
 			}
 			}
 			if (scale < 0 || scale > 100) {
 			if (scale < 0 || scale > 100) {
@@ -64,4 +65,4 @@ class ActionGetImageScaleBase64 extends BaseAction {
 
 
 	public static class Wo extends WrapString {
 	public static class Wo extends WrapString {
 	}
 	}
-}
+}

+ 3 - 2
o2server/x_file_assemble_control/src/main/java/com/x/file/assemble/control/jaxrs/attachment2/ActionGetImageWidthHeightBase64.java

@@ -11,6 +11,7 @@ import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WrapString;
 import com.x.base.core.project.jaxrs.WrapString;
 import com.x.file.assemble.control.ThisApplication;
 import com.x.file.assemble.control.ThisApplication;
+import com.x.file.core.entity.open.FileType;
 import com.x.file.core.entity.open.OriginFile;
 import com.x.file.core.entity.open.OriginFile;
 import com.x.file.core.entity.personal.Attachment2;
 import com.x.file.core.entity.personal.Attachment2;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.codec.binary.Base64;
@@ -36,7 +37,7 @@ class ActionGetImageWidthHeightBase64 extends BaseAction {
 				throw new Exception("person{name:" + effectivePerson.getDistinguishedName() + "} access attachment{id:"
 				throw new Exception("person{name:" + effectivePerson.getDistinguishedName() + "} access attachment{id:"
 						+ id + "} denied.");
 						+ id + "} denied.");
 			}
 			}
-			if (!ArrayUtils.contains(IMAGE_EXTENSIONS, attachment.getExtension())) {
+			if (!FileType.getExtType(attachment.getExtension()).equals(FileType.image.name())) {
 				throw new Exception("attachment not image file.");
 				throw new Exception("attachment not image file.");
 			}
 			}
 			if (width < 0 || width > 5000) {
 			if (width < 0 || width > 5000) {
@@ -89,4 +90,4 @@ class ActionGetImageWidthHeightBase64 extends BaseAction {
 	public static class Wo extends WrapString {
 	public static class Wo extends WrapString {
 
 
 	}
 	}
-}
+}

+ 1 - 1
o2server/x_file_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_file_core_entity</artifactId>
 	<artifactId>x_file_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_general_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_general_assemble_control</artifactId>
 	<artifactId>x_general_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_general_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_general_core_entity</artifactId>
 	<artifactId>x_general_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_hotpic_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_hotpic_assemble_control</artifactId>
 	<artifactId>x_hotpic_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_hotpic_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_hotpic_core_entity</artifactId>
 	<artifactId>x_hotpic_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_jpush_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_jpush_assemble_control</artifactId>
 	<artifactId>x_jpush_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_jpush_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_jpush_core_entity</artifactId>
 	<artifactId>x_jpush_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_meeting_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_meeting_assemble_control</artifactId>
 	<artifactId>x_meeting_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_meeting_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_meeting_core_entity</artifactId>
 	<artifactId>x_meeting_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_message_assemble_communicate/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_message_assemble_communicate</artifactId>
 	<artifactId>x_message_assemble_communicate</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_message_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_message_core_entity</artifactId>
 	<artifactId>x_message_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_mind_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_mind_assemble_control</artifactId>
 	<artifactId>x_mind_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_mind_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_mind_core_entity</artifactId>
 	<artifactId>x_mind_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_organization_assemble_authentication/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_organization_assemble_authentication</artifactId>
 	<artifactId>x_organization_assemble_authentication</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 55 - 0
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/oauth/OauthAction.java

@@ -71,6 +71,25 @@ public class OauthAction extends StandardJaxrsAction {
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 	}
 
 
+	@JaxrsMethodDescribe(value = "POST方法实现oauth认证token方法,适配jira.", action = ActionToken.class)
+	@POST
+	@Path("token/jira")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes({ MediaType.MULTIPART_FORM_DATA, MediaType.APPLICATION_FORM_URLENCODED, MediaType.APPLICATION_JSON })
+	public void postTokenJira(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@Context HttpServletResponse response, @FormParam("code") String code,
+			@FormParam("grant_type") String grant_type) {
+		ActionResult<ActionToken.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionToken().execute(effectivePerson, code, grant_type, MediaType.APPLICATION_JSON);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
 	@JaxrsMethodDescribe(value = "GET方法实现oauth认证token方法", action = ActionToken.class)
 	@JaxrsMethodDescribe(value = "GET方法实现oauth认证token方法", action = ActionToken.class)
 	@GET
 	@GET
 	@Path("token")
 	@Path("token")
@@ -107,6 +126,24 @@ public class OauthAction extends StandardJaxrsAction {
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 	}
 
 
+	@JaxrsMethodDescribe(value = "POST方法实现oauth认证info方法,适配jira.", action = ActionInfo.class)
+	@POST
+	@Path("info/jira")
+	@Consumes({ MediaType.MULTIPART_FORM_DATA, MediaType.APPLICATION_FORM_URLENCODED })
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	public void postInfoJira(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@Context HttpServletResponse response, @FormParam("access_token") String access_token) {
+		ActionResult<ActionInfo.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionInfo().execute(request, effectivePerson, access_token, MediaType.APPLICATION_JSON);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
 	@JaxrsMethodDescribe(value = "GET方法实现oauth认证info方法.", action = ActionInfo.class)
 	@JaxrsMethodDescribe(value = "GET方法实现oauth认证info方法.", action = ActionInfo.class)
 	@GET
 	@GET
 	@Path("info")
 	@Path("info")
@@ -125,4 +162,22 @@ public class OauthAction extends StandardJaxrsAction {
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 	}
 
 
+	@JaxrsMethodDescribe(value = "GET方法实现oauth认证info方法,适配jira.", action = ActionInfo.class)
+	@GET
+	@Path("info/jira")
+	@Consumes({ MediaType.MULTIPART_FORM_DATA, MediaType.APPLICATION_FORM_URLENCODED })
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	public void getInfoJira(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@Context HttpServletResponse response, @QueryParam("access_token") String access_token) {
+		ActionResult<ActionInfo.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionInfo().execute(request, effectivePerson, access_token, MediaType.APPLICATION_JSON);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
 }
 }

+ 1 - 1
o2server/x_organization_assemble_control/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_organization_assemble_control</artifactId>
 	<artifactId>x_organization_assemble_control</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 6 - 6
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/Business.java

@@ -53,8 +53,8 @@ public class Business {
 
 
 	public Business(EntityManagerContainer emc) throws Exception {
 	public Business(EntityManagerContainer emc) throws Exception {
 		this.emc = emc;
 		this.emc = emc;
-		this.cacheCategory = new CacheCategory(Group.class, Role.class, Person.class, PersonAttribute.class,
-				Unit.class, UnitDuty.class, UnitAttribute.class, Identity.class);
+		this.cacheCategory = new CacheCategory(Group.class, Role.class, Person.class, PersonAttribute.class, Unit.class,
+				UnitDuty.class, UnitAttribute.class, Identity.class);
 	}
 	}
 
 
 	public EntityManagerContainer entityManagerContainer() {
 	public EntityManagerContainer entityManagerContainer() {
@@ -128,9 +128,9 @@ public class Business {
 
 
 	public RoleFactory role() throws ExceptionRoleFactory {
 	public RoleFactory role() throws ExceptionRoleFactory {
 		if (null == this.role) {
 		if (null == this.role) {
-			try{
+			try {
 				this.role = new RoleFactory(this);
 				this.role = new RoleFactory(this);
-			} catch (Exception e){
+			} catch (Exception e) {
 				throw new ExceptionRoleFactory(e);
 				throw new ExceptionRoleFactory(e);
 			}
 			}
 		}
 		}
@@ -214,8 +214,8 @@ public class Business {
 				return true;
 				return true;
 			}
 			}
 		}
 		}
-		if (ListTools.isNotEmpty(unit.getInheritedControllerList())) {
-			List<Person> os = this.person().pick(unit.getInheritedControllerList());
+		for (Unit u : unit().pick(unit().listSupNested(unit.getId()))) {
+			List<Person> os = this.person().pick(u.getControllerList());
 			List<String> list = ListTools.extractProperty(os, JpaObject.DISTINGUISHEDNAME, String.class, true, true);
 			List<String> list = ListTools.extractProperty(os, JpaObject.DISTINGUISHEDNAME, String.class, true, true);
 			if (ListTools.contains(list, effectivePerson.getDistinguishedName())) {
 			if (ListTools.contains(list, effectivePerson.getDistinguishedName())) {
 				return true;
 				return true;

+ 7 - 7
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/UnitFactory.java

@@ -219,13 +219,13 @@ public class UnitFactory extends AbstractFactory {
 			// Collections.reverse(names);
 			// Collections.reverse(names);
 			names.add(o.getName());
 			names.add(o.getName());
 			o.setLevelName(StringUtils.join(names, PersistenceProperties.Unit.levelNameSplit));
 			o.setLevelName(StringUtils.join(names, PersistenceProperties.Unit.levelNameSplit));
-			List<String> inheritControllerList = new ArrayList<>();
-			for (Unit u : list) {
-				if (ListTools.isNotEmpty(u.getControllerList())) {
-					inheritControllerList.addAll(u.getControllerList());
-				}
-			}
-			o.setInheritedControllerList(ListTools.trim(inheritControllerList, true, true));
+//			List<String> inheritControllerList = new ArrayList<>();
+//			for (Unit u : list) {
+//				if (ListTools.isNotEmpty(u.getControllerList())) {
+//					inheritControllerList.addAll(u.getControllerList());
+//				}
+//			}
+//			o.setInheritedControllerList(ListTools.trim(inheritControllerList, true, true));
 		}
 		}
 	}
 	}
 
 

+ 29 - 26
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/ActionDelete.java

@@ -33,20 +33,7 @@ import com.x.organization.assemble.control.ThisApplication;
 import com.x.organization.assemble.control.message.OrgBodyMessage;
 import com.x.organization.assemble.control.message.OrgBodyMessage;
 import com.x.organization.assemble.control.message.OrgMessage;
 import com.x.organization.assemble.control.message.OrgMessage;
 import com.x.organization.assemble.control.message.OrgMessageFactory;
 import com.x.organization.assemble.control.message.OrgMessageFactory;
-import com.x.organization.core.entity.Group;
-import com.x.organization.core.entity.Group_;
-import com.x.organization.core.entity.Identity;
-import com.x.organization.core.entity.Identity_;
-import com.x.organization.core.entity.Person;
-import com.x.organization.core.entity.PersonAttribute;
-import com.x.organization.core.entity.PersonAttribute_;
-import com.x.organization.core.entity.Person_;
-import com.x.organization.core.entity.Role;
-import com.x.organization.core.entity.Role_;
-import com.x.organization.core.entity.Unit;
-import com.x.organization.core.entity.UnitDuty;
-import com.x.organization.core.entity.UnitDuty_;
-import com.x.organization.core.entity.Unit_;
+import com.x.organization.core.entity.*;
 
 
 class ActionDelete extends BaseAction {
 class ActionDelete extends BaseAction {
 	private static Logger logger = LoggerFactory.getLogger(ActionDelete.class);
 	private static Logger logger = LoggerFactory.getLogger(ActionDelete.class);
@@ -80,6 +67,9 @@ class ActionDelete extends BaseAction {
 				/** 删除个人属性 */
 				/** 删除个人属性 */
 				emc.beginTransaction(PersonAttribute.class);
 				emc.beginTransaction(PersonAttribute.class);
 				this.removePersonAttribute(business, person);
 				this.removePersonAttribute(business, person);
+				/** 删除个人自定义信息 */
+				emc.beginTransaction(Custom.class);
+				this.removePersonCustom(business, person);
 				/** 删除群组成员 */
 				/** 删除群组成员 */
 				emc.beginTransaction(Group.class);
 				emc.beginTransaction(Group.class);
 				this.removeMemberOfGroup(business, person);
 				this.removeMemberOfGroup(business, person);
@@ -102,12 +92,12 @@ class ActionDelete extends BaseAction {
 				CacheManager.notify(Person.class);
 				CacheManager.notify(Person.class);
 				/** 通知x_collect_service_transmit同步数据到collect */
 				/** 通知x_collect_service_transmit同步数据到collect */
 				business.instrument().collect().person();
 				business.instrument().collect().person();
-				
+
 				/**创建 组织变更org消息通信 */
 				/**创建 组织变更org消息通信 */
 				//createMessageCommunicate(person,  effectivePerson);
 				//createMessageCommunicate(person,  effectivePerson);
 				OrgMessageFactory  orgMessageFactory = new OrgMessageFactory();
 				OrgMessageFactory  orgMessageFactory = new OrgMessageFactory();
 				orgMessageFactory.createMessageCommunicate("delete", "person", person, effectivePerson);
 				orgMessageFactory.createMessageCommunicate("delete", "person", person, effectivePerson);
-				
+
 				Wo wo = new Wo();
 				Wo wo = new Wo();
 				wo.setId(person.getId());
 				wo.setId(person.getId());
 				result.setData(wo);
 				result.setData(wo);
@@ -149,11 +139,11 @@ class ActionDelete extends BaseAction {
 		CriteriaQuery<Unit> cq = cb.createQuery(Unit.class);
 		CriteriaQuery<Unit> cq = cb.createQuery(Unit.class);
 		Root<Unit> root = cq.from(Unit.class);
 		Root<Unit> root = cq.from(Unit.class);
 		Predicate p = cb.isMember(person.getId(), root.get(Unit_.controllerList));
 		Predicate p = cb.isMember(person.getId(), root.get(Unit_.controllerList));
-		p = cb.or(cb.isMember(person.getId(), root.get(Unit_.inheritedControllerList)));
+		//p = cb.or(cb.isMember(person.getId(), root.get(Unit_.inheritedControllerList)));
 		List<Unit> os = em.createQuery(cq.select(root).where(p)).getResultList().stream().distinct().collect(Collectors.toList());
 		List<Unit> os = em.createQuery(cq.select(root).where(p)).getResultList().stream().distinct().collect(Collectors.toList());
 		for (Unit o : os) {
 		for (Unit o : os) {
 			o.getControllerList().remove(person.getId());
 			o.getControllerList().remove(person.getId());
-			o.getInheritedControllerList().remove(person.getId());
+			//o.getInheritedControllerList().remove(person.getId());
 		}
 		}
 	}
 	}
 
 
@@ -193,6 +183,19 @@ class ActionDelete extends BaseAction {
 		}
 		}
 	}
 	}
 
 
+	private void removePersonCustom(Business business, Person person) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Custom.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Custom> cq = cb.createQuery(Custom.class);
+		Root<Custom> root = cq.from(Custom.class);
+		Predicate p = cb.equal(root.get(Custom_.person), person.getId());
+		p = cb.or(p, cb.equal(root.get(Custom_.person), person.getDistinguishedName()));
+		List<Custom> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		for (Custom o : os) {
+			business.entityManagerContainer().remove(o, CheckRemoveType.all);
+		}
+	}
+
 	private void removeMemberOfGroup(Business business, Person person) throws Exception {
 	private void removeMemberOfGroup(Business business, Person person) throws Exception {
 		EntityManager em = business.entityManagerContainer().get(Group.class);
 		EntityManager em = business.entityManagerContainer().get(Group.class);
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaBuilder cb = em.getCriteriaBuilder();
@@ -216,14 +219,14 @@ class ActionDelete extends BaseAction {
 			o.getPersonList().remove(person.getId());
 			o.getPersonList().remove(person.getId());
 		}
 		}
 	}
 	}
-	
+
 	/**创建 组织变更org消息通信 */
 	/**创建 组织变更org消息通信 */
 	private boolean createMessageCommunicate(Person person, EffectivePerson effectivePerson) {
 	private boolean createMessageCommunicate(Person person, EffectivePerson effectivePerson) {
 		try{
 		try{
 			Gson gson = new Gson();
 			Gson gson = new Gson();
 			String strPerson = gson.toJson(person);
 			String strPerson = gson.toJson(person);
 			OrgMessage orgMessage = new OrgMessage();
 			OrgMessage orgMessage = new OrgMessage();
-			
+
 			orgMessage.setOperType("delete");
 			orgMessage.setOperType("delete");
 			orgMessage.setOrgType("person");
 			orgMessage.setOrgType("person");
 			orgMessage.setOperUerId(effectivePerson.getDistinguishedName());
 			orgMessage.setOperUerId(effectivePerson.getDistinguishedName());
@@ -231,26 +234,26 @@ class ActionDelete extends BaseAction {
 			orgMessage.setReceiveSystem("");
 			orgMessage.setReceiveSystem("");
 			orgMessage.setConsumed(false);
 			orgMessage.setConsumed(false);
 			orgMessage.setConsumedModule("");
 			orgMessage.setConsumedModule("");
-			
+
 			OrgBodyMessage orgBodyMessage = new OrgBodyMessage();
 			OrgBodyMessage orgBodyMessage = new OrgBodyMessage();
 			orgBodyMessage.setOriginalData(strPerson);
 			orgBodyMessage.setOriginalData(strPerson);
 			orgMessage.setBody( gson.toJson(orgBodyMessage));
 			orgMessage.setBody( gson.toJson(orgBodyMessage));
-			
+
 			Applications applications = new Applications();
 			Applications applications = new Applications();
 			String path ="org/create";
 			String path ="org/create";
 		     //String address = "http://127.0.0.1:20020/x_message_assemble_communicate/jaxrs/org/create";
 		     //String address = "http://127.0.0.1:20020/x_message_assemble_communicate/jaxrs/org/create";
 		     //ActionResponse resp = CipherConnectionAction.post(false, address, body);
 		     //ActionResponse resp = CipherConnectionAction.post(false, address, body);
-		     
+
 			ActionResponse resp =  ThisApplication.context().applications()
 			ActionResponse resp =  ThisApplication.context().applications()
 						.postQuery(x_message_assemble_communicate.class, path, orgMessage);
 						.postQuery(x_message_assemble_communicate.class, path, orgMessage);
-		
+
 			String mess = resp.getMessage();
 			String mess = resp.getMessage();
 			String data = resp.getData().toString();
 			String data = resp.getData().toString();
 			return true;
 			return true;
 			}catch(Exception e) {
 			}catch(Exception e) {
 				logger.print(e.toString());
 				logger.print(e.toString());
 				return false;
 				return false;
-			}	
+			}
 	}
 	}
 
 
-}
+}

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

@@ -0,0 +1,243 @@
+package com.x.organization.assemble.control.jaxrs.person;
+
+import com.google.gson.Gson;
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.entity.annotation.CheckRemoveType;
+import com.x.base.core.project.Applications;
+import com.x.base.core.project.cache.CacheManager;
+import com.x.base.core.project.config.Config;
+import com.x.base.core.project.connection.ActionResponse;
+import com.x.base.core.project.exception.ExceptionAccessDenied;
+import com.x.base.core.project.exception.ExceptionEntityNotExist;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WoId;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.tools.ListTools;
+import com.x.base.core.project.x_message_assemble_communicate;
+import com.x.organization.assemble.control.Business;
+import com.x.organization.assemble.control.ThisApplication;
+import com.x.organization.assemble.control.message.OrgBodyMessage;
+import com.x.organization.assemble.control.message.OrgMessage;
+import com.x.organization.core.entity.*;
+
+import javax.persistence.EntityManager;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class ActionDeleteV2 extends BaseAction {
+	private static Logger logger = LoggerFactory.getLogger(ActionDeleteV2.class);
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			ActionResult<Wo> result = new ActionResult<>();
+			if (Config.token().isInitialManager(flag)) {
+				throw new ExceptionDenyDeleteInitialManager();
+			} else {
+				Business business = new Business(emc);
+				Person person = business.person().pick(flag);
+				if (null == person) {
+					throw new ExceptionEntityNotExist(flag, Person.class);
+				}
+				/** 从内存中取到人 */
+				person = emc.find(person.getId(), Person.class);
+				if (!this.editable(business, effectivePerson, person)) {
+					throw new ExceptionAccessDenied(effectivePerson);
+				}
+				List<Identity> identities = this.listIdentity(business, person);
+				/** 删除身份组织职务成员,提交后才可以删除身份 */
+				emc.beginTransaction(UnitDuty.class);
+				this.removeMemberOfUnitDuty(business, identities);
+				emc.commit();
+				/** 删除身份 */
+				emc.beginTransaction(Identity.class);
+				for (Identity o : identities) {
+					emc.remove(o, CheckRemoveType.all);
+				}
+				emc.commit();
+				/** 删除个人自定义信息 */
+				emc.beginTransaction(Custom.class);
+				this.removePersonCustom(business, person);
+				/** 删除群组成员 */
+				emc.beginTransaction(Group.class);
+				this.removeMemberOfGroup(business, person);
+				/** 删除角色成员 */
+				emc.beginTransaction(Role.class);
+				this.removeMemberOfRole(business, person);
+				/** 删除组织的管理个人以及继承的管理个人 */
+				emc.beginTransaction(Unit.class);
+				this.removeMemberOfUnitController(business, person);
+				/** 删除个人管理者成员 */
+				this.removeMemberOfPersonController(business, person);
+				/** 删除汇报人员为将要删除的人 */
+				this.removeMemberOfPersonSuperior(business, person);
+				emc.beginTransaction(Person.class);
+				/** 先进行一次提交,通过check */
+				emc.commit();
+				CacheManager.notify(Person.class);
+
+				Wo wo = new Wo();
+				wo.setId(person.getId());
+				result.setData(wo);
+			}
+			return result;
+		}
+	}
+
+	public static class Wo extends WoId {
+
+	}
+
+	private List<Identity> listIdentity(Business business, Person person) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Identity.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Identity> cq = cb.createQuery(Identity.class);
+		Root<Identity> root = cq.from(Identity.class);
+		Predicate p = cb.equal(root.get(Identity_.person), person.getId());
+		List<Identity> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		return os;
+	}
+
+	private void removeMemberOfUnitDuty(Business business, List<Identity> identities) throws Exception {
+		List<String> ids = ListTools.extractProperty(identities, JpaObject.id_FIELDNAME, String.class, true, true);
+		EntityManager em = business.entityManagerContainer().get(UnitDuty.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<UnitDuty> cq = cb.createQuery(UnitDuty.class);
+		Root<UnitDuty> root = cq.from(UnitDuty.class);
+		Predicate p = root.get(UnitDuty_.identityList).in(ids);
+		List<UnitDuty> os = em.createQuery(cq.select(root).where(p)).getResultList().stream().distinct().collect(Collectors.toList());
+		for (UnitDuty o : os) {
+			o.getIdentityList().removeAll(ids);
+		}
+	}
+
+	private void removeMemberOfUnitController(Business business, Person person) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Unit.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Unit> cq = cb.createQuery(Unit.class);
+		Root<Unit> root = cq.from(Unit.class);
+		Predicate p = cb.isMember(person.getId(), root.get(Unit_.controllerList));
+		//p = cb.or(cb.isMember(person.getId(), root.get(Unit_.inheritedControllerList)));
+		List<Unit> os = em.createQuery(cq.select(root).where(p)).getResultList().stream().distinct().collect(Collectors.toList());
+		for (Unit o : os) {
+			o.getControllerList().remove(person.getId());
+			//o.getInheritedControllerList().remove(person.getId());
+		}
+	}
+
+	private void removeMemberOfPersonController(Business business, Person person) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Person.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Person> cq = cb.createQuery(Person.class);
+		Root<Person> root = cq.from(Person.class);
+		Predicate p = cb.isMember(person.getId(), root.get(Person_.controllerList));
+		List<Person> os = em.createQuery(cq.select(root).where(p)).getResultList().stream().distinct().collect(Collectors.toList());
+		for (Person o : os) {
+			o.getControllerList().remove(person.getId());
+		}
+	}
+
+	private void removeMemberOfPersonSuperior(Business business, Person person) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Person.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Person> cq = cb.createQuery(Person.class);
+		Root<Person> root = cq.from(Person.class);
+		Predicate p = cb.equal(root.get(Person_.superior), person.getId());
+		List<Person> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		for (Person o : os) {
+			o.setSuperior("");
+		}
+	}
+
+	private void removePersonAttribute(Business business, Person person) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(PersonAttribute.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<PersonAttribute> cq = cb.createQuery(PersonAttribute.class);
+		Root<PersonAttribute> root = cq.from(PersonAttribute.class);
+		Predicate p = cb.equal(root.get(PersonAttribute_.person), person.getId());
+		List<PersonAttribute> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		for (PersonAttribute o : os) {
+			business.entityManagerContainer().remove(o, CheckRemoveType.all);
+		}
+	}
+
+	private void removePersonCustom(Business business, Person person) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Custom.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Custom> cq = cb.createQuery(Custom.class);
+		Root<Custom> root = cq.from(Custom.class);
+		Predicate p = cb.equal(root.get(Custom_.person), person.getId());
+		p = cb.or(p, cb.equal(root.get(Custom_.person), person.getDistinguishedName()));
+		List<Custom> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		for (Custom o : os) {
+			business.entityManagerContainer().remove(o, CheckRemoveType.all);
+		}
+	}
+
+	private void removeMemberOfGroup(Business business, Person person) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Group.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Group> cq = cb.createQuery(Group.class);
+		Root<Group> root = cq.from(Group.class);
+		Predicate p = cb.isMember(person.getId(), root.get(Group_.personList));
+		List<Group> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		for (Group o : os) {
+			o.getPersonList().remove(person.getId());
+		}
+	}
+
+	private void removeMemberOfRole(Business business, Person person) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Role.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Role> cq = cb.createQuery(Role.class);
+		Root<Role> root = cq.from(Role.class);
+		Predicate p = cb.isMember(person.getId(), root.get(Role_.personList));
+		List<Role> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		for (Role o : os) {
+			o.getPersonList().remove(person.getId());
+		}
+	}
+
+	/**创建 组织变更org消息通信 */
+	private boolean createMessageCommunicate(Person person, EffectivePerson effectivePerson) {
+		try{
+			Gson gson = new Gson();
+			String strPerson = gson.toJson(person);
+			OrgMessage orgMessage = new OrgMessage();
+
+			orgMessage.setOperType("delete");
+			orgMessage.setOrgType("person");
+			orgMessage.setOperUerId(effectivePerson.getDistinguishedName());
+			orgMessage.setOperDataId(person.getId());
+			orgMessage.setReceiveSystem("");
+			orgMessage.setConsumed(false);
+			orgMessage.setConsumedModule("");
+
+			OrgBodyMessage orgBodyMessage = new OrgBodyMessage();
+			orgBodyMessage.setOriginalData(strPerson);
+			orgMessage.setBody( gson.toJson(orgBodyMessage));
+
+			Applications applications = new Applications();
+			String path ="org/create";
+		     //String address = "http://127.0.0.1:20020/x_message_assemble_communicate/jaxrs/org/create";
+		     //ActionResponse resp = CipherConnectionAction.post(false, address, body);
+
+			ActionResponse resp =  ThisApplication.context().applications()
+						.postQuery(x_message_assemble_communicate.class, path, orgMessage);
+
+			String mess = resp.getMessage();
+			String data = resp.getData().toString();
+			return true;
+			}catch(Exception e) {
+				logger.print(e.toString());
+				return false;
+			}
+	}
+
+}

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

@@ -18,6 +18,8 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
 import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.cache.Cache.CacheKey;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.EffectivePerson;
@@ -26,8 +28,6 @@ import com.x.base.core.project.tools.StringTools;
 import com.x.organization.assemble.control.Business;
 import com.x.organization.assemble.control.Business;
 import com.x.organization.core.entity.Person;
 import com.x.organization.core.entity.Person;
 import com.x.organization.core.entity.Person_;
 import com.x.organization.core.entity.Person_;
-import com.x.base.core.project.cache.Cache.CacheKey;
-import com.x.base.core.project.cache.CacheManager;
 
 
 class ActionListPinyinInitial extends BaseAction {
 class ActionListPinyinInitial extends BaseAction {
 
 

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

@@ -1,5 +1,6 @@
 package com.x.organization.assemble.control.jaxrs.person;
 package com.x.organization.assemble.control.jaxrs.person;
 
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.regex.Pattern;
@@ -162,12 +163,16 @@ abstract class BaseAction extends StandardJaxrsAction {
 			if (null != person && t.getControllerList().contains(person.getId())) {
 			if (null != person && t.getControllerList().contains(person.getId())) {
 				List<Identity> identities = this.listIdentity(business, t);
 				List<Identity> identities = this.listIdentity(business, t);
 				List<Unit> units = this.listUnit(business, identities);
 				List<Unit> units = this.listUnit(business, identities);
+				List<Unit> supUnits = new ArrayList<>();
+				for (Unit u : units) {
+					supUnits.addAll(business.unit().listSupNestedObject(u));
+				}
+				units.addAll(supUnits);
 				if (ListTools.isNotEmpty(units)) {
 				if (ListTools.isNotEmpty(units)) {
 					allowEdit = false;
 					allowEdit = false;
 					allowDelete = true;
 					allowDelete = true;
 					for (Unit o : units) {
 					for (Unit o : units) {
-						if (o.getControllerList().contains(person.getId())
-								|| o.getInheritedControllerList().contains(person.getId())) {
+						if (o.getControllerList().contains(person.getId())) {
 							allowEdit = true;
 							allowEdit = true;
 						} else {
 						} else {
 							allowDelete = false;
 							allowDelete = false;

+ 19 - 1
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/person/PersonAction.java

@@ -108,6 +108,24 @@ public class PersonAction extends StandardJaxrsAction {
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 	}
 
 
+	@JaxrsMethodDescribe(value = "删除个人关联信息(身份、角色等),但保留人员(企业离退休人员需要能登录平台但不能做业务处理).", action = ActionDeleteV2.class)
+	@DELETE
+	@Path("{flag}/v2")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void deleteV2(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+					   @JaxrsParameterDescribe("人员标识") @PathParam("flag") String flag) {
+		ActionResult<ActionDeleteV2.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionDeleteV2().execute(effectivePerson, flag);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
 	@JaxrsMethodDescribe(value = "列示个人,下一页.", action = ActionListNext.class)
 	@JaxrsMethodDescribe(value = "列示个人,下一页.", action = ActionListNext.class)
 	@GET
 	@GET
 	@Path("list/{flag}/next/{count}")
 	@Path("list/{flag}/next/{count}")
@@ -346,4 +364,4 @@ public class PersonAction extends StandardJaxrsAction {
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 	}
 
 
-}
+}

+ 14 - 11
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/unit/ActionCreate.java

@@ -22,7 +22,7 @@ import org.apache.commons.lang3.StringUtils;
 
 
 class ActionCreate extends BaseAction {
 class ActionCreate extends BaseAction {
 	private static Logger logger = LoggerFactory.getLogger(ActionCreate.class);
 	private static Logger logger = LoggerFactory.getLogger(ActionCreate.class);
-	
+
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			ActionResult<Wo> result = new ActionResult<>();
 			ActionResult<Wo> result = new ActionResult<>();
@@ -55,7 +55,7 @@ class ActionCreate extends BaseAction {
 			if (this.duplicateUniqueWhenNotEmpty(business, unit)) {
 			if (this.duplicateUniqueWhenNotEmpty(business, unit)) {
 				throw new ExceptionDuplicateUnique(unit.getName(), unit.getUnique());
 				throw new ExceptionDuplicateUnique(unit.getName(), unit.getUnique());
 			}
 			}
-			if (this.checkNameInvalid(business,unit)){
+			if (this.checkNameInvalid(business, unit)) {
 				throw new ExceptionNameInvalid(unit.getName());
 				throw new ExceptionNameInvalid(unit.getName());
 			}
 			}
 			/** 判断同一级别下name不重复 */
 			/** 判断同一级别下name不重复 */
@@ -64,14 +64,14 @@ class ActionCreate extends BaseAction {
 			}
 			}
 			emc.beginTransaction(Unit.class);
 			emc.beginTransaction(Unit.class);
 			business.unit().adjustInherit(unit);
 			business.unit().adjustInherit(unit);
-			emc.persist(unit,CheckPersistType.all);
+			emc.persist(unit, CheckPersistType.all);
 			emc.commit();
 			emc.commit();
 			CacheManager.notify(Unit.class);
 			CacheManager.notify(Unit.class);
-			
-			/**创建 组织变更org消息通信 */
-			OrgMessageFactory  orgMessageFactory = new OrgMessageFactory();
+
+			/** 创建 组织变更org消息通信 */
+			OrgMessageFactory orgMessageFactory = new OrgMessageFactory();
 			orgMessageFactory.createMessageCommunicate("add", "unit", unit, effectivePerson);
 			orgMessageFactory.createMessageCommunicate("add", "unit", unit, effectivePerson);
-			
+
 			Wo wo = new Wo();
 			Wo wo = new Wo();
 			wo.setId(unit.getId());
 			wo.setId(unit.getId());
 			result.setData(wo);
 			result.setData(wo);
@@ -86,11 +86,14 @@ class ActionCreate extends BaseAction {
 
 
 		private static final long serialVersionUID = -6314932919066148113L;
 		private static final long serialVersionUID = -6314932919066148113L;
 
 
+//		static WrapCopier<Wi, Unit> copier = WrapCopierFactory.wi(Wi.class, Unit.class, null,
+//				ListTools.toList(JpaObject.FieldsUnmodify, Unit.pinyin_FIELDNAME,
+//						Unit.pinyinInitial_FIELDNAME, Unit.level_FIELDNAME, Unit.levelName_FIELDNAME,
+//						Unit.inheritedControllerList_FIELDNAME));
+
 		static WrapCopier<Wi, Unit> copier = WrapCopierFactory.wi(Wi.class, Unit.class, null,
 		static WrapCopier<Wi, Unit> copier = WrapCopierFactory.wi(Wi.class, Unit.class, null,
-				ListTools.toList(JpaObject.FieldsUnmodify, Unit.pinyin_FIELDNAME,
-						Unit.pinyinInitial_FIELDNAME, Unit.level_FIELDNAME, Unit.levelName_FIELDNAME,
-						Unit.inheritedControllerList_FIELDNAME));
+				ListTools.toList(JpaObject.FieldsUnmodify, Unit.pinyin_FIELDNAME, Unit.pinyinInitial_FIELDNAME,
+						Unit.level_FIELDNAME, Unit.levelName_FIELDNAME));
 	}
 	}
-	
 
 
 }
 }

+ 37 - 31
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/unit/ActionEdit.java

@@ -46,7 +46,7 @@ class ActionEdit extends BaseAction {
 			Unit unit = business.unit().pick(flag);
 			Unit unit = business.unit().pick(flag);
 			Unit oldUnit = unit;
 			Unit oldUnit = unit;
 			boolean checkFlag = false;
 			boolean checkFlag = false;
-			
+
 			if (null == unit) {
 			if (null == unit) {
 				throw new ExceptionUnitNotExist(flag);
 				throw new ExceptionUnitNotExist(flag);
 			}
 			}
@@ -62,15 +62,16 @@ class ActionEdit extends BaseAction {
 			unit = emc.find(unit.getId(), Unit.class);
 			unit = emc.find(unit.getId(), Unit.class);
 			Gson gsontool = new Gson();
 			Gson gsontool = new Gson();
 			String strOriginalUnit = gsontool.toJson(unit);
 			String strOriginalUnit = gsontool.toJson(unit);
-			
-			unit.setControllerList(ListTools.extractProperty(business.person().pick(ListTools.trim(unit.getControllerList(), true, true)),
+
+			unit.setControllerList(ListTools.extractProperty(
+					business.person().pick(ListTools.trim(unit.getControllerList(), true, true)),
 					JpaObject.id_FIELDNAME, String.class, true, true));
 					JpaObject.id_FIELDNAME, String.class, true, true));
 			Wi.copier.copy(wi, unit);
 			Wi.copier.copy(wi, unit);
 			/** 如果唯一标识不为空,要检查唯一标识是否唯一 */
 			/** 如果唯一标识不为空,要检查唯一标识是否唯一 */
 			if (this.duplicateUniqueWhenNotEmpty(business, unit)) {
 			if (this.duplicateUniqueWhenNotEmpty(business, unit)) {
 				throw new ExceptionDuplicateUnique(unit.getName(), unit.getUnique());
 				throw new ExceptionDuplicateUnique(unit.getName(), unit.getUnique());
 			}
 			}
-			if (this.checkNameInvalid(business,unit)){
+			if (this.checkNameInvalid(business, unit)) {
 				throw new ExceptionNameInvalid(unit.getName());
 				throw new ExceptionNameInvalid(unit.getName());
 			}
 			}
 			/** 判断同一级别下name不重复 */
 			/** 判断同一级别下name不重复 */
@@ -78,23 +79,23 @@ class ActionEdit extends BaseAction {
 				throw new ExceptionDuplicateName(unit.getName());
 				throw new ExceptionDuplicateName(unit.getName());
 			}
 			}
 			/** 判断是否修改了组织级别或组织名称,如果修改了,需要重新计算当前组织及下属组织的组织级别 */
 			/** 判断是否修改了组织级别或组织名称,如果修改了,需要重新计算当前组织及下属组织的组织级别 */
-			checkFlag = this.checkUnitTypeName(oldUnit,unit);
-			if(checkFlag){
+			checkFlag = this.checkUnitTypeName(oldUnit, unit);
+			if (checkFlag) {
 				business.unit().adjustInherit(unit);
 				business.unit().adjustInherit(unit);
 			}
 			}
 			emc.check(unit, CheckPersistType.all);
 			emc.check(unit, CheckPersistType.all);
 			emc.commit();
 			emc.commit();
 			CacheManager.notify(Unit.class);
 			CacheManager.notify(Unit.class);
-			
+
 			/** 判断是否修改了组织级别或组织名称,如果修改了,需要重新计算当前组织及下属组织成员的身份(组织名称,组织级别名称) */
 			/** 判断是否修改了组织级别或组织名称,如果修改了,需要重新计算当前组织及下属组织成员的身份(组织名称,组织级别名称) */
-			if(checkFlag){
+			if (checkFlag) {
 				this.updateIdentityUnitNameAndUnitLevelName(effectivePerson, flag, jsonElement);
 				this.updateIdentityUnitNameAndUnitLevelName(effectivePerson, flag, jsonElement);
 			}
 			}
 
 
-			/**创建 组织变更org消息通信 */
-			OrgMessageFactory  orgMessageFactory = new OrgMessageFactory();
-			orgMessageFactory.createMessageCommunicate("modfiy", "unit",strOriginalUnit, unit, effectivePerson);
-			
+			/** 创建 组织变更org消息通信 */
+			OrgMessageFactory orgMessageFactory = new OrgMessageFactory();
+			orgMessageFactory.createMessageCommunicate("modfiy", "unit", strOriginalUnit, unit, effectivePerson);
+
 			Wo wo = new Wo();
 			Wo wo = new Wo();
 			wo.setId(unit.getId());
 			wo.setId(unit.getId());
 			result.setData(wo);
 			result.setData(wo);
@@ -111,18 +112,23 @@ class ActionEdit extends BaseAction {
 
 
 		private static final long serialVersionUID = -7527954993386512109L;
 		private static final long serialVersionUID = -7527954993386512109L;
 
 
-		//		static WrapCopier<Wi, Unit> copier = WrapCopierFactory.wi(Wi.class, Unit.class, null,
-		//				ListTools.toList(JpaObject.FieldsUnmodify, Unit.superior_FIELDNAME, Unit.pinyin_FIELDNAME,
-		//						Unit.pinyinInitial_FIELDNAME, Unit.level_FIELDNAME, Unit.levelName_FIELDNAME,
-		//						Unit.inheritedControllerList_FIELDNAME));
+		// static WrapCopier<Wi, Unit> copier = WrapCopierFactory.wi(Wi.class,
+		// Unit.class, null,
+		// ListTools.toList(JpaObject.FieldsUnmodify, Unit.superior_FIELDNAME,
+		// Unit.pinyin_FIELDNAME,
+		// Unit.pinyinInitial_FIELDNAME, Unit.level_FIELDNAME, Unit.levelName_FIELDNAME,
+		// Unit.inheritedControllerList_FIELDNAME));
+//		static WrapCopier<Wi, Unit> copier = WrapCopierFactory.wi(Wi.class, Unit.class, null,
+//				ListTools.toList(JpaObject.FieldsUnmodify, Unit.pinyin_FIELDNAME, Unit.pinyinInitial_FIELDNAME, Unit.level_FIELDNAME,
+//						Unit.levelName_FIELDNAME, Unit.inheritedControllerList_FIELDNAME));
 		static WrapCopier<Wi, Unit> copier = WrapCopierFactory.wi(Wi.class, Unit.class, null,
 		static WrapCopier<Wi, Unit> copier = WrapCopierFactory.wi(Wi.class, Unit.class, null,
-				ListTools.toList(JpaObject.FieldsUnmodify, Unit.pinyin_FIELDNAME, Unit.pinyinInitial_FIELDNAME, Unit.level_FIELDNAME,
-						Unit.levelName_FIELDNAME, Unit.inheritedControllerList_FIELDNAME));
+				ListTools.toList(JpaObject.FieldsUnmodify, Unit.pinyin_FIELDNAME, Unit.pinyinInitial_FIELDNAME,
+						Unit.level_FIELDNAME, Unit.levelName_FIELDNAME));
 	}
 	}
 
 
-	//根据组织标志列出身份列表
+	// 根据组织标志列出身份列表
 	private List<Identity> listIdentityByUnitFlag(Business business, Unit unit) throws Exception {
 	private List<Identity> listIdentityByUnitFlag(Business business, Unit unit) throws Exception {
-		//Unit unit = business.unit().pick(unitFlag);
+		// Unit unit = business.unit().pick(unitFlag);
 		if (null == unit.getId() || StringUtils.isEmpty(unit.getId()) || null == unit) {
 		if (null == unit.getId() || StringUtils.isEmpty(unit.getId()) || null == unit) {
 			throw new ExceptionUnitNotExist(unit.getId());
 			throw new ExceptionUnitNotExist(unit.getId());
 		}
 		}
@@ -135,9 +141,9 @@ class ActionEdit extends BaseAction {
 		return os;
 		return os;
 	}
 	}
 
 
-	//列出所有递归下级组织(包含当前组织)
+	// 列出所有递归下级组织(包含当前组织)
 	private List<Unit> listUnit(Business business, String flag) throws Exception {
 	private List<Unit> listUnit(Business business, String flag) throws Exception {
-		//Unit unit = business.unit().pick(flag);
+		// Unit unit = business.unit().pick(flag);
 
 
 		EntityManager em = business.entityManagerContainer().get(Unit.class);
 		EntityManager em = business.entityManagerContainer().get(Unit.class);
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaBuilder cb = em.getCriteriaBuilder();
@@ -158,17 +164,18 @@ class ActionEdit extends BaseAction {
 			throw new ExceptionUnitNotExist(flag);
 			throw new ExceptionUnitNotExist(flag);
 		}
 		}
 
 
-		//所有下级组织
+		// 所有下级组织
 		List<Unit> os = business.unit().listSubNestedObject(unit);
 		List<Unit> os = business.unit().listSubNestedObject(unit);
 
 
-		//把当前组织加入到os
+		// 把当前组织加入到os
 		List<Unit> _currentUnitSingleArray = new ArrayList<Unit>();
 		List<Unit> _currentUnitSingleArray = new ArrayList<Unit>();
 		_currentUnitSingleArray.add(unit);
 		_currentUnitSingleArray.add(unit);
 		os = ListTools.add(_currentUnitSingleArray, true, true, os);
 		os = ListTools.add(_currentUnitSingleArray, true, true, os);
 		return os;
 		return os;
 	}
 	}
 
 
-	void updateIdentityUnitNameAndUnitLevelName(EffectivePerson effectivePerson, String flag, JsonElement jsonElement) throws Exception {
+	void updateIdentityUnitNameAndUnitLevelName(EffectivePerson effectivePerson, String flag, JsonElement jsonElement)
+			throws Exception {
 		CacheManager.notify(Unit.class);
 		CacheManager.notify(Unit.class);
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			Business business = new Business(emc);
 			Business business = new Business(emc);
@@ -185,7 +192,7 @@ class ActionEdit extends BaseAction {
 			}
 			}
 			/*
 			/*
 			 * 同时更新unit下的所有身份的UnitLevelName,UnitName
 			 * 同时更新unit下的所有身份的UnitLevelName,UnitName
-			 * */
+			 */
 			List<Unit> unitList = this.listUnit(business, flag);
 			List<Unit> unitList = this.listUnit(business, flag);
 
 
 			for (Unit u : unitList) {
 			for (Unit u : unitList) {
@@ -209,17 +216,16 @@ class ActionEdit extends BaseAction {
 
 
 		}
 		}
 	}
 	}
-	
+
 	private boolean checkUnitTypeName(Unit oldUnit, Unit unit) throws Exception {
 	private boolean checkUnitTypeName(Unit oldUnit, Unit unit) throws Exception {
 		List<String> oldUnitType = oldUnit.getTypeList();
 		List<String> oldUnitType = oldUnit.getTypeList();
 		List<String> unitType = unit.getTypeList();
 		List<String> unitType = unit.getTypeList();
-		//判断两个list是否相同
-		if (oldUnitType.retainAll(unitType) || (!StringUtils.equals(oldUnit.getName(), unit.getName())) || (!StringUtils.equals(oldUnit.getSuperior(), unit.getSuperior()))) {
+		// 判断两个list是否相同
+		if (oldUnitType.retainAll(unitType) || (!StringUtils.equals(oldUnit.getName(), unit.getName()))
+				|| (!StringUtils.equals(oldUnit.getSuperior(), unit.getSuperior()))) {
 			return true;
 			return true;
 		}
 		}
 		return false;
 		return false;
 	}
 	}
-	
-	
 
 
 }
 }

+ 1 - 1
o2server/x_organization_assemble_express/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_organization_assemble_express</artifactId>
 	<artifactId>x_organization_assemble_express</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 27 - 0
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/Business.java

@@ -1,6 +1,7 @@
 package com.x.organization.assemble.express;
 package com.x.organization.assemble.express;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.List;
 
 
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManager;
@@ -10,6 +11,7 @@ import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 import javax.persistence.criteria.Root;
 
 
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.tools.ListTools;
 import com.x.base.core.project.tools.ListTools;
 import com.x.organization.assemble.express.factory.GroupFactory;
 import com.x.organization.assemble.express.factory.GroupFactory;
 import com.x.organization.assemble.express.factory.IdentityFactory;
 import com.x.organization.assemble.express.factory.IdentityFactory;
@@ -27,6 +29,7 @@ import com.x.organization.core.entity.Person;
 import com.x.organization.core.entity.Role;
 import com.x.organization.core.entity.Role;
 import com.x.organization.core.entity.Role_;
 import com.x.organization.core.entity.Role_;
 import com.x.organization.core.entity.Unit;
 import com.x.organization.core.entity.Unit;
+import org.apache.commons.collections4.CollectionUtils;
 
 
 public class Business {
 public class Business {
 
 
@@ -366,4 +369,28 @@ public class Business {
 		return this.person().listPersonDistinguishedNameSorted(expendUnitToPersonId(unitList));
 		return this.person().listPersonDistinguishedNameSorted(expendUnitToPersonId(unitList));
 	}
 	}
 
 
+	public boolean hasAnyRole(EffectivePerson effectivePerson, String... roleFlags) throws Exception {
+		/** 如果不加这个xadmin会报错 */
+		if (effectivePerson.isManager()) {
+			return true;
+		}
+		Person person = this.person().pick(effectivePerson.getDistinguishedName());
+		if (null != person) {
+			List<String> groupIds = this.group().listSupNestedWithPerson(person.getId());
+			if (null != person) {
+				List<Role> roles = this.role().pick(Arrays.asList(roleFlags));
+				for (Role o : roles) {
+					if (o.getPersonList().contains(person.getId())) {
+						return true;
+					}
+					if (CollectionUtils.containsAny(o.getGroupList(), groupIds)) {
+						return true;
+					}
+				}
+
+			}
+		}
+		return false;
+	}
+
 }
 }

+ 5 - 5
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/factory/UnitFactory.java

@@ -221,11 +221,11 @@ public class UnitFactory extends AbstractFactory {
 			names = names.stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList());
 			names = names.stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList());
 			names.add(o.getName());
 			names.add(o.getName());
 			o.setLevelName(StringUtils.join(names, "/"));
 			o.setLevelName(StringUtils.join(names, "/"));
-			List<String> inheritControllerList = new ArrayList<>();
-			for (Unit u : list) {
-				inheritControllerList.addAll(u.getControllerList());
-			}
-			o.setInheritedControllerList(ListTools.trim(inheritControllerList, true, true));
+//			List<String> inheritControllerList = new ArrayList<>();
+//			for (Unit u : list) {
+//				inheritControllerList.addAll(u.getControllerList());
+//			}
+//			o.setInheritedControllerList(ListTools.trim(inheritControllerList, true, true));
 		}
 		}
 	}
 	}
 
 

+ 7 - 1
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/identity/ActionListWithGroup.java

@@ -68,11 +68,13 @@ class ActionListWithGroup extends BaseAction {
 		}
 		}
 		List<String> personIds = new ArrayList<>();
 		List<String> personIds = new ArrayList<>();
 		List<String> unitIds = new ArrayList<>();
 		List<String> unitIds = new ArrayList<>();
+		List<String> identityIds = new ArrayList<>();
 		for (Group o : list) {
 		for (Group o : list) {
 			personIds.addAll(o.getPersonList());
 			personIds.addAll(o.getPersonList());
 			if (ListTools.isNotEmpty(o.getUnitList())) {
 			if (ListTools.isNotEmpty(o.getUnitList())) {
 				unitIds.addAll(o.getUnitList());
 				unitIds.addAll(o.getUnitList());
 			}
 			}
+			identityIds.addAll(o.getIdentityList());
 		}
 		}
 		/* 先解析组织 */
 		/* 先解析组织 */
 		List<Identity> identities = new ArrayList<>();
 		List<Identity> identities = new ArrayList<>();
@@ -91,6 +93,10 @@ class ActionListWithGroup extends BaseAction {
 				identities.add(o);
 				identities.add(o);
 			}
 			}
 		}
 		}
+
+		/* 最后把身份解析处理 */
+		identities.addAll(business.identity().pick(identityIds));
+
 		identities = ListTools.trim(identities, true, true);
 		identities = ListTools.trim(identities, true, true);
 		Wo wo = new Wo();
 		Wo wo = new Wo();
 		wo.getIdentityList().addAll(ListTools.extractProperty(business.identity().sort(identities),
 		wo.getIdentityList().addAll(ListTools.extractProperty(business.identity().sort(identities),
@@ -98,4 +104,4 @@ class ActionListWithGroup extends BaseAction {
 		return wo;
 		return wo;
 	}
 	}
 
 
-}
+}

+ 7 - 1
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/identity/ActionListWithGroupObject.java

@@ -69,11 +69,13 @@ class ActionListWithGroupObject extends BaseAction {
 		}
 		}
 		List<String> personIds = new ArrayList<>();
 		List<String> personIds = new ArrayList<>();
 		List<String> unitIds = new ArrayList<>();
 		List<String> unitIds = new ArrayList<>();
+		List<String> identityIds = new ArrayList<>();
 		for (Group o : list) {
 		for (Group o : list) {
 			personIds.addAll(o.getPersonList());
 			personIds.addAll(o.getPersonList());
 			if (ListTools.isNotEmpty(o.getUnitList())) {
 			if (ListTools.isNotEmpty(o.getUnitList())) {
 				unitIds.addAll(o.getUnitList());
 				unitIds.addAll(o.getUnitList());
 			}
 			}
+			identityIds.addAll(o.getIdentityList());
 		}
 		}
 		/* 先解析组织 */
 		/* 先解析组织 */
 		List<Identity> identities = new ArrayList<>();
 		List<Identity> identities = new ArrayList<>();
@@ -92,10 +94,14 @@ class ActionListWithGroupObject extends BaseAction {
 				identities.add(o);
 				identities.add(o);
 			}
 			}
 		}
 		}
+
+		/* 最后把身份解析处理 */
+		identities.addAll(business.identity().pick(identityIds));
+
 		identities = ListTools.trim(identities, true, true);
 		identities = ListTools.trim(identities, true, true);
 		for (Identity o : identities) {
 		for (Identity o : identities) {
 			wos.add(this.convert(business, o, Wo.class));
 			wos.add(this.convert(business, o, Wo.class));
 		}
 		}
 		return wos;
 		return wos;
 	}
 	}
-}
+}

+ 320 - 0
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionGet.java

@@ -0,0 +1,320 @@
+package com.x.organization.assemble.express.jaxrs.person;
+
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.cache.Cache.CacheKey;
+import com.x.base.core.project.cache.CacheManager;
+import com.x.base.core.project.config.Config;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.tools.ListTools;
+import com.x.organization.assemble.express.Business;
+import com.x.organization.core.entity.*;
+import org.apache.commons.collections4.set.ListOrderedSet;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.EntityManager;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.util.List;
+import java.util.Optional;
+
+class ActionGet extends BaseAction {
+
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			Business business = new Business(emc);
+			ActionResult<Wo> result = new ActionResult<>();
+			CacheKey cacheKey = new CacheKey(this.getClass(), flag);
+			Optional<?> optional = CacheManager.get(cacheCategory, cacheKey);
+			if (optional.isPresent()) {
+				result.setData((Wo) optional.get());
+			} else {
+				if (Config.token().isInitialManager(flag)) {
+					/** 如果是xadmin单独处理 */
+					Wo wo = new Wo();
+					Config.token().initialManagerInstance().copyTo(wo, "password");
+					result.setData(wo);
+				} else {
+					Person person = business.person().pick(flag);
+					if (null == person) {
+						throw new ExceptionPersonNotExist(flag);
+					}
+					Wo wo = Wo.copier.copy(person);
+					this.referencePersonAttribute(business, wo);
+					this.referenceIdentity(business, wo);
+					this.referenceRole(business, wo);
+					this.referenceGroup(business, wo);
+					CacheManager.put(cacheCategory, cacheKey, wo);
+					result.setData(wo);
+				}
+			}
+			this.hide(effectivePerson, business, result.getData());
+			return result;
+		}
+	}
+
+	private void referencePersonAttribute(Business business, Wo wo) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(PersonAttribute.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<PersonAttribute> cq = cb.createQuery(PersonAttribute.class);
+		Root<PersonAttribute> root = cq.from(PersonAttribute.class);
+		Predicate p = cb.equal(root.get(PersonAttribute_.person), wo.getId());
+		List<PersonAttribute> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		List<WoPersonAttribute> wos = WoPersonAttribute.copier.copy(os);
+		wos = business.personAttribute().sort(wos);
+		wo.setWoPersonAttributeList(wos);
+	}
+
+	private void referenceIdentity(Business business, Wo wo) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Identity.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Identity> cq = cb.createQuery(Identity.class);
+		Root<Identity> root = cq.from(Identity.class);
+		Predicate p = cb.equal(root.get(Identity_.person), wo.getId());
+		List<Identity> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		List<WoIdentity> wos = WoIdentity.copier.copy(os);
+		wos = business.identity().sort(wos);
+		wo.setWoIdentityList(wos);
+		for (WoIdentity o : wo.getWoIdentityList()) {
+			this.referenceUnit(business, o);
+			this.referenceUnitDuty(business, o);
+		}
+	}
+
+	private void referenceRole(Business business, Wo wo) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Role.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Role> cq = cb.createQuery(Role.class);
+		Root<Role> root = cq.from(Role.class);
+		Predicate p = cb.isMember(wo.getId(), root.get(Role_.personList));
+		List<Role> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		List<WoRole> wos = WoRole.copier.copy(os);
+		wos = business.role().sort(wos);
+		wo.setWoRoleList(wos);
+	}
+
+	private void referenceGroup(Business business, Wo wo) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Group.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Group> cq = cb.createQuery(Group.class);
+		Root<Group> root = cq.from(Group.class);
+		Predicate p = cb.isMember(wo.getId(), root.get(Group_.personList));
+		if(ListTools.isNotEmpty(wo.getWoIdentityList())){
+			List<String> identities = ListTools.extractField(wo.getWoIdentityList(), JpaObject.id_FIELDNAME, String.class, true, true);
+			p = cb.or(p, root.get(Group_.identityList).in(identities));
+		}
+		List<Group> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		ListOrderedSet<Group> set = new ListOrderedSet<>();
+		os.stream().forEach(o -> {
+			set.add(o);
+			try {
+				set.addAll(business.group().listSupNestedObject(o));
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+		});
+		List<WoGroup> wos = WoGroup.copier.copy(set.asList());
+		wos = business.group().sort(wos);
+		wo.setWoGroupList(wos);
+	}
+
+	private void referenceUnit(Business business, WoIdentity woIdentity) throws Exception {
+		if (StringUtils.isNotEmpty(woIdentity.getUnit())) {
+			Unit unit = business.unit().pick(woIdentity.getUnit());
+			if (null != unit) {
+				WoUnit wo = WoUnit.copier.copy(unit);
+				woIdentity.setWoUnit(wo);
+			}
+
+		}
+	}
+
+	private void referenceUnitDuty(Business business, WoIdentity woIdentity) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(UnitDuty.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<UnitDuty> cq = cb.createQuery(UnitDuty.class);
+		Root<UnitDuty> root = cq.from(UnitDuty.class);
+		Predicate p = cb.isMember(woIdentity.getId(), root.get(UnitDuty_.identityList));
+		List<UnitDuty> os = em.createQuery(cq.select(root).where(p)).getResultList();
+		List<WoUnitDuty> wos = WoUnitDuty.copier.copy(os);
+		wos = business.unitDuty().sort(wos);
+		for (WoUnitDuty woUnitDuty : wos) {
+			this.referenceUnit(business, woUnitDuty);
+		}
+		woIdentity.setWoUnitDutyList(wos);
+	}
+
+	private void referenceUnit(Business business, WoUnitDuty woUnitDuty) throws Exception {
+		if (StringUtils.isNotEmpty(woUnitDuty.getUnit())) {
+			Unit unit = business.unit().pick(woUnitDuty.getUnit());
+			if (null != unit) {
+				WoUnit wo = WoUnit.copier.copy(unit);
+				woUnitDuty.setWoUnit(wo);
+			}
+		}
+	}
+
+	public static class Wo extends Person {
+
+		private static final long serialVersionUID = -8456354949288335211L;
+
+		static WrapCopier<Person, Wo> copier = WrapCopierFactory.wo(Person.class, Wo.class, null,
+				person_fieldsInvisible);
+
+		@FieldDescribe("身份对象")
+		private List<WoIdentity> woIdentityList;
+
+		@FieldDescribe("角色对象")
+		private List<WoRole> woRoleList;
+
+		@FieldDescribe("群组对象")
+		private List<WoGroup> woGroupList;
+
+		@FieldDescribe("个人属性对象")
+		private List<WoPersonAttribute> woPersonAttributeList;
+
+		public List<WoIdentity> getWoIdentityList() {
+			return woIdentityList;
+		}
+
+		public void setWoIdentityList(List<WoIdentity> woIdentityList) {
+			this.woIdentityList = woIdentityList;
+		}
+
+		public List<WoRole> getWoRoleList() {
+			return woRoleList;
+		}
+
+		public void setWoRoleList(List<WoRole> woRoleList) {
+			this.woRoleList = woRoleList;
+		}
+
+		public List<WoGroup> getWoGroupList() {
+			return woGroupList;
+		}
+
+		public void setWoGroupList(List<WoGroup> woGroupList) {
+			this.woGroupList = woGroupList;
+		}
+
+		public List<WoPersonAttribute> getWoPersonAttributeList() {
+			return woPersonAttributeList;
+		}
+
+		public void setWoPersonAttributeList(List<WoPersonAttribute> woPersonAttributeList) {
+			this.woPersonAttributeList = woPersonAttributeList;
+		}
+
+	}
+
+	public static class WoIdentity extends Identity {
+
+		private static final long serialVersionUID = 6193615461099768815L;
+
+		static WrapCopier<Identity, WoIdentity> copier = WrapCopierFactory.wo(Identity.class, WoIdentity.class, null,
+				ListTools.toList(JpaObject.FieldsInvisible));
+
+		@FieldDescribe("组织对象")
+		private WoUnit woUnit;
+
+		@FieldDescribe("组织职务对象")
+		private List<WoUnitDuty> woUnitDutyList;
+
+		public WoUnit getWoUnit() {
+			return woUnit;
+		}
+
+		public void setWoUnit(WoUnit woUnit) {
+			this.woUnit = woUnit;
+		}
+
+		public List<WoUnitDuty> getWoUnitDutyList() {
+			return woUnitDutyList;
+		}
+
+		public void setWoUnitDutyList(List<WoUnitDuty> woUnitDutyList) {
+			this.woUnitDutyList = woUnitDutyList;
+		}
+
+	}
+
+	public static class WoGroup extends Group {
+
+		private static final long serialVersionUID = 4503618773692247688L;
+
+		static WrapCopier<Group, WoGroup> copier = WrapCopierFactory.wo(Group.class, WoGroup.class, null,
+				ListTools.toList(JpaObject.FieldsInvisible));
+
+	}
+
+	public static class WoRole extends Role {
+
+		private static final long serialVersionUID = -3903028273062897622L;
+
+		static WrapCopier<Role, WoRole> copier = WrapCopierFactory.wo(Role.class, WoRole.class, null,
+				ListTools.toList(JpaObject.FieldsInvisible));
+
+	}
+
+	public static class WoUnit extends Unit {
+
+		private static final long serialVersionUID = 6172047743675016186L;
+
+		private Long subDirectUnitCount;
+		private Long subDirectIdentityCount;
+
+		static WrapCopier<Unit, WoUnit> copier = WrapCopierFactory.wo(Unit.class, WoUnit.class, null,
+				ListTools.toList(JpaObject.FieldsInvisible));
+
+		public Long getSubDirectUnitCount() {
+			return subDirectUnitCount;
+		}
+
+		public void setSubDirectUnitCount(Long subDirectUnitCount) {
+			this.subDirectUnitCount = subDirectUnitCount;
+		}
+
+		public Long getSubDirectIdentityCount() {
+			return subDirectIdentityCount;
+		}
+
+		public void setSubDirectIdentityCount(Long subDirectIdentityCount) {
+			this.subDirectIdentityCount = subDirectIdentityCount;
+		}
+	}
+
+	public static class WoUnitDuty extends UnitDuty {
+
+		private static final long serialVersionUID = 3145496265299807549L;
+
+		@FieldDescribe("组织对象")
+		private WoUnit woUnit;
+
+		static WrapCopier<UnitDuty, WoUnitDuty> copier = WrapCopierFactory.wo(UnitDuty.class, WoUnitDuty.class, null,
+				ListTools.toList(JpaObject.FieldsInvisible));
+
+		public WoUnit getWoUnit() {
+			return woUnit;
+		}
+
+		public void setWoUnit(WoUnit woUnit) {
+			this.woUnit = woUnit;
+		}
+	}
+
+	public static class WoPersonAttribute extends PersonAttribute {
+
+		private static final long serialVersionUID = -3155093360276871418L;
+
+		static WrapCopier<PersonAttribute, WoPersonAttribute> copier = WrapCopierFactory.wo(PersonAttribute.class,
+				WoPersonAttribute.class, null, ListTools.toList(JpaObject.FieldsInvisible));
+	}
+
+}

+ 121 - 0
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListFilterPaging.java

@@ -0,0 +1,121 @@
+package com.x.organization.assemble.express.jaxrs.person;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.gson.GsonPropertyObject;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.tools.StringTools;
+import com.x.organization.assemble.express.Business;
+import com.x.organization.core.entity.Person;
+import com.x.organization.core.entity.Person_;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.EntityManager;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.util.List;
+
+class ActionListFilterPaging extends BaseAction {
+	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, Integer page, Integer size, JsonElement jsonElement) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			Business business = new Business(emc);
+			ActionResult<List<Wo>> result = new ActionResult<>();
+			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
+			Predicate p = this.toFilterPredicate(business, wi);
+			List<Wo> wos = emc.fetchAscPaging(Person.class, Wo.copier, p, page, size, Person.pinyin_FIELDNAME);
+			this.hide(effectivePerson, business, wos);
+			result.setData(wos);
+			result.setCount(emc.count(Person.class, p));
+			return result;
+		}
+	}
+
+	private Predicate toFilterPredicate(Business business,  Wi wi) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Person.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Person> cq = cb.createQuery(Person.class);
+		Root<Person> root = cq.from(Person.class);
+		Predicate p = cb.conjunction();
+		if (StringUtils.isNotBlank(wi.getEmployee())) {
+			p = cb.and(p, cb.equal(root.get(Person_.employee), wi.getEmployee()));
+		}
+		if (StringUtils.isNotBlank(wi.getMobile())) {
+			p = cb.and(p, cb.equal(root.get(Person_.mobile), wi.getMobile()));
+		}
+		if (StringUtils.isNotBlank(wi.getUnique())) {
+			p = cb.and(p, cb.equal(root.get(Person_.unique), wi.getUnique()));
+		}
+		if (StringUtils.isNoneBlank(wi.getName())) {
+			String key = StringTools.escapeSqlLikeKey(wi.getName());
+			p = cb.and(p, cb.like(root.get(Person_.name), "%" + key + "%", StringTools.SQL_ESCAPE_CHAR));
+		}
+
+		return p;
+	}
+
+	public class Wi extends GsonPropertyObject {
+
+		private static final long serialVersionUID = -2991229948693512630L;
+
+		@FieldDescribe("名称")
+		private String name;
+
+		@FieldDescribe("工号")
+		private String employee;
+
+		@FieldDescribe("唯一标识")
+		private String unique;
+
+		@FieldDescribe("手机号.")
+		private String mobile;
+
+		public String getName() {
+			return name;
+		}
+
+		public void setName(String name) {
+			this.name = name;
+		}
+
+		public String getEmployee() {
+			return employee;
+		}
+
+		public void setEmployee(String employee) {
+			this.employee = employee;
+		}
+
+		public String getUnique() {
+			return unique;
+		}
+
+		public void setUnique(String unique) {
+			this.unique = unique;
+		}
+
+		public String getMobile() {
+			return mobile;
+		}
+
+		public void setMobile(String mobile) {
+			this.mobile = mobile;
+		}
+	}
+
+	public static class Wo extends Person {
+
+		private static final long serialVersionUID = 1847108296662273067L;
+
+		static WrapCopier<Person, Wo> copier = WrapCopierFactory.wo(Person.class, Wo.class,
+				JpaObject.singularAttributeField(Person.class, true, true), null);
+
+	}
+}

+ 40 - 18
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListWithUnitSubDirectLikeObject.java

@@ -1,8 +1,6 @@
 package com.x.organization.assemble.express.jaxrs.person;
 package com.x.organization.assemble.express.jaxrs.person;
 
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
+import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManager;
@@ -82,39 +80,63 @@ class ActionListWithUnitSubDirectLikeObject extends BaseAction {
 
 
 	}
 	}
 
 
-	private List<Wo> list(Business business, Wi wi, List<String> ids) throws Exception {
+	private List<Wo> list(Business business, Wi wi, List<Identity> identityList) throws Exception {
 		List<Wo> wos = new ArrayList<>();
 		List<Wo> wos = new ArrayList<>();
-		String str = StringUtils.lowerCase(StringTools.escapeSqlLikeKey(wi.getKey()));
 		EntityManager em = business.entityManagerContainer().get(Person.class);
 		EntityManager em = business.entityManagerContainer().get(Person.class);
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaQuery<String> cq = cb.createQuery(String.class);
 		CriteriaQuery<String> cq = cb.createQuery(String.class);
 		Root<Person> root = cq.from(Person.class);
 		Root<Person> root = cq.from(Person.class);
-		Predicate p = cb.like(cb.lower(root.get(Person_.name)), "%" + str + "%", StringTools.SQL_ESCAPE_CHAR);
-		p = cb.or(p, cb.like(cb.lower(root.get(Person_.unique)), "%" + str + "%", StringTools.SQL_ESCAPE_CHAR));
-		p = cb.or(p, cb.like(cb.lower(root.get(Person_.pinyin)), str + "%", StringTools.SQL_ESCAPE_CHAR));
-		p = cb.or(p, cb.like(cb.lower(root.get(Person_.pinyinInitial)), str + "%", StringTools.SQL_ESCAPE_CHAR));
-		p = cb.or(p, cb.like(cb.lower(root.get(Person_.mobile)), str + "%", StringTools.SQL_ESCAPE_CHAR));
-		p = cb.or(p, cb.like(cb.lower(root.get(Person_.distinguishedName)), str + "%", StringTools.SQL_ESCAPE_CHAR));
-		p = cb.and(p, cb.isMember(root.get(Person_.id), cb.literal(ids)));
+		Predicate p = cb.conjunction();
+		if(StringUtils.isNotBlank(wi.getKey())) {
+			String str = StringUtils.lowerCase(StringTools.escapeSqlLikeKey(wi.getKey()));
+			p = cb.like(cb.lower(root.get(Person_.name)), "%" + str + "%", StringTools.SQL_ESCAPE_CHAR);
+			p = cb.or(p, cb.like(cb.lower(root.get(Person_.unique)), "%" + str + "%", StringTools.SQL_ESCAPE_CHAR));
+			p = cb.or(p, cb.like(cb.lower(root.get(Person_.pinyin)), str + "%", StringTools.SQL_ESCAPE_CHAR));
+			p = cb.or(p, cb.like(cb.lower(root.get(Person_.pinyinInitial)), str + "%", StringTools.SQL_ESCAPE_CHAR));
+			p = cb.or(p, cb.like(cb.lower(root.get(Person_.mobile)), str + "%", StringTools.SQL_ESCAPE_CHAR));
+			p = cb.or(p, cb.like(cb.lower(root.get(Person_.distinguishedName)), str + "%", StringTools.SQL_ESCAPE_CHAR));
+		}
+		Map<String,Integer> map = new HashMap<>();
+		if(ListTools.isNotEmpty(identityList)) {
+			for(Identity identity : identityList){
+				map.put(identity.getPerson(), identity.getOrderNumber());
+			}
+			p = cb.and(p, cb.isMember(root.get(Person_.id), cb.literal(map.keySet())));
+		}
 		List<String> list = em.createQuery(cq.select(root.get(Person_.id)).where(p))
 		List<String> list = em.createQuery(cq.select(root.get(Person_.id)).where(p))
 				.getResultList().stream().distinct().collect(Collectors.toList());
 				.getResultList().stream().distinct().collect(Collectors.toList());
 		for (Person o : business.person().pick(list)) {
 		for (Person o : business.person().pick(list)) {
+			if(!map.isEmpty()){
+				o.setOrderNumber(map.get(o.getId()));
+			}
 			wos.add(this.convert(business, o, Wo.class));
 			wos.add(this.convert(business, o, Wo.class));
 		}
 		}
+		wos = wos.stream()
+				.sorted(Comparator.comparing(Wo::getOrderNumber, Comparator.nullsLast(Integer::compareTo))
+						.thenComparing(Comparator
+								.comparing(Wo::getName, Comparator.nullsFirst(String::compareTo)).reversed()))
+				.collect(Collectors.toList());
 		return wos;
 		return wos;
 	}
 	}
 
 
-	private List<String> people(Business business, Wi wi) throws Exception {
-		List<Unit> os = business.unit().pick(wi.getUnitList());
-		List<String> unitIds = ListTools.extractField(os, Unit.id_FIELDNAME, String.class, true, true);
-		EntityManager em = business.entityManagerContainer().get(Identity.class);
+	private List<Identity> people(Business business, Wi wi) throws Exception {
+		List<Identity> list = new ArrayList<>();
+		if(ListTools.isNotEmpty(wi.getUnitList())) {
+			List<Unit> os = business.unit().pick(wi.getUnitList());
+			List<String> unitIds = ListTools.extractField(os, Unit.id_FIELDNAME, String.class, true, true);
+			if (ListTools.isNotEmpty(unitIds)) {
+				list = business.entityManagerContainer().fetchIn(Identity.class,
+						ListTools.toList(Identity.id_FIELDNAME, Identity.person_FIELDNAME, Identity.orderNumber_FIELDNAME), Identity.unit_FIELDNAME, unitIds);
+			}
+		}
+		/*EntityManager em = business.entityManagerContainer().get(Identity.class);
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaQuery<String> cq = cb.createQuery(String.class);
 		CriteriaQuery<String> cq = cb.createQuery(String.class);
 		Root<Identity> root = cq.from(Identity.class);
 		Root<Identity> root = cq.from(Identity.class);
 		Predicate p = root.get(Identity_.unit).in(unitIds);
 		Predicate p = root.get(Identity_.unit).in(unitIds);
 		List<String> list = em.createQuery(cq.select(root.get(Identity_.person)).where(p))
 		List<String> list = em.createQuery(cq.select(root.get(Identity_.person)).where(p))
-				.getResultList().stream().distinct().collect(Collectors.toList());
+				.getResultList().stream().distinct().collect(Collectors.toList());*/
 		return list;
 		return list;
 	}
 	}
 
 
-}
+}

+ 25 - 15
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListWithUnitSubDirectObject.java

@@ -1,8 +1,6 @@
 package com.x.organization.assemble.express.jaxrs.person;
 package com.x.organization.assemble.express.jaxrs.person;
 
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
+import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManager;
@@ -72,20 +70,32 @@ class ActionListWithUnitSubDirectObject extends BaseAction {
 		List<Unit> os = business.unit().pick(wi.getUnitList());
 		List<Unit> os = business.unit().pick(wi.getUnitList());
 		List<String> unitIds = new ArrayList<>();
 		List<String> unitIds = new ArrayList<>();
 		for (Unit o : os) {
 		for (Unit o : os) {
-			unitIds.add(o.getId());
+			if(!unitIds.contains(o.getId())) {
+				unitIds.add(o.getId());
+			}
+		}
+		unitIds = ListTools.trim(unitIds, true, true);
+		List<Identity> list = new ArrayList<>();
+		if(ListTools.isNotEmpty(unitIds)) {
+			list = business.entityManagerContainer().fetchIn(Identity.class,
+					ListTools.toList(Identity.id_FIELDNAME, Identity.person_FIELDNAME, Identity.orderNumber_FIELDNAME), Identity.unit_FIELDNAME, unitIds);
 		}
 		}
-		EntityManager em = business.entityManagerContainer().get(Identity.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Identity> root = cq.from(Identity.class);
-		Predicate p = root.get(Identity_.unit).in(unitIds);
-		List<String> personIds = em.createQuery(cq.select(root.get(Identity_.person)).where(p))
-				.getResultList().stream().distinct().collect(Collectors.toList());
-		personIds = ListTools.trim(personIds, true, true);
-		for (Person o : business.person().pick(personIds)) {
-			wos.add(this.convert(business, o, Wo.class));
+		if(ListTools.isNotEmpty(list)) {
+			Map<String,Integer> map = new HashMap<>();
+			for(Identity identity : list){
+				map.put(identity.getPerson(), identity.getOrderNumber());
+			}
+			for (Person o : business.person().pick(new ArrayList<>(map.keySet()))) {
+				o.setOrderNumber(map.get(o.getId()));
+				wos.add(this.convert(business, o, Wo.class));
+			}
+			wos = wos.stream()
+					.sorted(Comparator.comparing(Wo::getOrderNumber, Comparator.nullsLast(Integer::compareTo))
+							.thenComparing(Comparator
+									.comparing(Wo::getName, Comparator.nullsFirst(String::compareTo)).reversed()))
+					.collect(Collectors.toList());
 		}
 		}
 		return wos;
 		return wos;
 	}
 	}
 
 
-}
+}

+ 44 - 22
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListWithUnitSubNestedLikeObject.java

@@ -1,8 +1,6 @@
 package com.x.organization.assemble.express.jaxrs.person;
 package com.x.organization.assemble.express.jaxrs.person;
 
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
+import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManager;
@@ -82,44 +80,68 @@ class ActionListWithUnitSubNestedLikeObject extends BaseAction {
 
 
 	}
 	}
 
 
-	private List<Wo> list(Business business, Wi wi, List<String> ids) throws Exception {
+	private List<Wo> list(Business business, Wi wi, List<Identity> identityList) throws Exception {
 		List<Wo> wos = new ArrayList<>();
 		List<Wo> wos = new ArrayList<>();
-		String str = StringUtils.lowerCase(StringTools.escapeSqlLikeKey(wi.getKey()));
 		EntityManager em = business.entityManagerContainer().get(Person.class);
 		EntityManager em = business.entityManagerContainer().get(Person.class);
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaQuery<String> cq = cb.createQuery(String.class);
 		CriteriaQuery<String> cq = cb.createQuery(String.class);
 		Root<Person> root = cq.from(Person.class);
 		Root<Person> root = cq.from(Person.class);
-		Predicate p = cb.like(cb.lower(root.get(Person_.name)), "%" + str + "%", StringTools.SQL_ESCAPE_CHAR);
-		p = cb.or(p, cb.like(cb.lower(root.get(Person_.unique)), "%" + str + "%", StringTools.SQL_ESCAPE_CHAR));
-		p = cb.or(p, cb.like(cb.lower(root.get(Person_.pinyin)), str + "%", StringTools.SQL_ESCAPE_CHAR));
-		p = cb.or(p, cb.like(cb.lower(root.get(Person_.pinyinInitial)), str + "%", StringTools.SQL_ESCAPE_CHAR));
-		p = cb.or(p, cb.like(cb.lower(root.get(Person_.mobile)), str + "%", StringTools.SQL_ESCAPE_CHAR));
-		p = cb.or(p, cb.like(cb.lower(root.get(Person_.distinguishedName)), str + "%", StringTools.SQL_ESCAPE_CHAR));
-		p = cb.and(p, cb.isMember(root.get(Person_.id), cb.literal(ids)));
+		Predicate p = cb.conjunction();
+		if(StringUtils.isNotBlank(wi.getKey())) {
+			String str = StringUtils.lowerCase(StringTools.escapeSqlLikeKey(wi.getKey()));
+			p = cb.like(cb.lower(root.get(Person_.name)), "%" + str + "%", StringTools.SQL_ESCAPE_CHAR);
+			p = cb.or(p, cb.like(cb.lower(root.get(Person_.unique)), "%" + str + "%", StringTools.SQL_ESCAPE_CHAR));
+			p = cb.or(p, cb.like(cb.lower(root.get(Person_.pinyin)), str + "%", StringTools.SQL_ESCAPE_CHAR));
+			p = cb.or(p, cb.like(cb.lower(root.get(Person_.pinyinInitial)), str + "%", StringTools.SQL_ESCAPE_CHAR));
+			p = cb.or(p, cb.like(cb.lower(root.get(Person_.mobile)), str + "%", StringTools.SQL_ESCAPE_CHAR));
+			p = cb.or(p, cb.like(cb.lower(root.get(Person_.distinguishedName)), str + "%", StringTools.SQL_ESCAPE_CHAR));
+		}
+		Map<String,Integer> map = new HashMap<>();
+		if(ListTools.isNotEmpty(identityList)) {
+			for(Identity identity : identityList){
+				map.put(identity.getPerson(), identity.getOrderNumber());
+			}
+			p = cb.and(p, cb.isMember(root.get(Person_.id), cb.literal(map.keySet())));
+		}
 		List<String> list = em.createQuery(cq.select(root.get(Person_.id)).where(p))
 		List<String> list = em.createQuery(cq.select(root.get(Person_.id)).where(p))
 				.getResultList().stream().distinct().collect(Collectors.toList());
 				.getResultList().stream().distinct().collect(Collectors.toList());
 		for (Person o : business.person().pick(list)) {
 		for (Person o : business.person().pick(list)) {
+			if(!map.isEmpty()){
+				o.setOrderNumber(map.get(o.getId()));
+			}
 			wos.add(this.convert(business, o, Wo.class));
 			wos.add(this.convert(business, o, Wo.class));
 		}
 		}
+		wos = wos.stream()
+				.sorted(Comparator.comparing(Wo::getOrderNumber, Comparator.nullsLast(Integer::compareTo))
+						.thenComparing(Comparator
+								.comparing(Wo::getName, Comparator.nullsFirst(String::compareTo)).reversed()))
+				.collect(Collectors.toList());
 		return wos;
 		return wos;
 	}
 	}
 
 
-	private List<String> people(Business business, Wi wi) throws Exception {
-		List<Unit> os = business.unit().pick(wi.getUnitList());
-		List<String> unitIds = new ArrayList<>();
-		for (Unit o : os) {
-			unitIds.add(o.getId());
-			unitIds.addAll(business.unit().listSubNested(o.getId()));
+	private List<Identity> people(Business business, Wi wi) throws Exception {
+		List<Identity> list = new ArrayList<>();
+		if(ListTools.isNotEmpty(wi.getUnitList())) {
+			List<Unit> os = business.unit().pick(wi.getUnitList());
+			List<String> unitIds = new ArrayList<>();
+			for (Unit o : os) {
+				unitIds.add(o.getId());
+				unitIds.addAll(business.unit().listSubNested(o.getId()));
+			}
+			unitIds = ListTools.trim(unitIds, true, true);
+			if (ListTools.isNotEmpty(unitIds)) {
+				list = business.entityManagerContainer().fetchIn(Identity.class,
+						ListTools.toList(Identity.id_FIELDNAME, Identity.person_FIELDNAME, Identity.orderNumber_FIELDNAME), Identity.unit_FIELDNAME, unitIds);
+			}
 		}
 		}
-		unitIds = ListTools.trim(unitIds, true, true);
-		EntityManager em = business.entityManagerContainer().get(Identity.class);
+		/*EntityManager em = business.entityManagerContainer().get(Identity.class);
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaQuery<String> cq = cb.createQuery(String.class);
 		CriteriaQuery<String> cq = cb.createQuery(String.class);
 		Root<Identity> root = cq.from(Identity.class);
 		Root<Identity> root = cq.from(Identity.class);
 		Predicate p = root.get(Identity_.unit).in(unitIds);
 		Predicate p = root.get(Identity_.unit).in(unitIds);
 		List<String> list = em.createQuery(cq.select(root.get(Identity_.person)).where(p))
 		List<String> list = em.createQuery(cq.select(root.get(Identity_.person)).where(p))
-				.getResultList().stream().distinct().collect(Collectors.toList());
+				.getResultList().stream().distinct().collect(Collectors.toList());*/
 		return list;
 		return list;
 	}
 	}
 
 
-}
+}

+ 21 - 14
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListWithUnitSubNestedObject.java

@@ -1,8 +1,6 @@
 package com.x.organization.assemble.express.jaxrs.person;
 package com.x.organization.assemble.express.jaxrs.person;
 
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
+import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManager;
@@ -76,18 +74,27 @@ class ActionListWithUnitSubNestedObject extends BaseAction {
 			unitIds.addAll(business.unit().listSubNested(o.getId()));
 			unitIds.addAll(business.unit().listSubNested(o.getId()));
 		}
 		}
 		unitIds = ListTools.trim(unitIds, true, true);
 		unitIds = ListTools.trim(unitIds, true, true);
-		EntityManager em = business.entityManagerContainer().get(Identity.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Identity> root = cq.from(Identity.class);
-		Predicate p = root.get(Identity_.unit).in(unitIds);
-		List<String> personIds = em.createQuery(cq.select(root.get(Identity_.person)).where(p))
-				.getResultList().stream().distinct().collect(Collectors.toList());
-		personIds = ListTools.trim(personIds, true, true);
-		for (Person o : business.person().pick(personIds)) {
-			wos.add(this.convert(business, o, Wo.class));
+		List<Identity> list = new ArrayList<>();
+		if(ListTools.isNotEmpty(unitIds)) {
+			list = business.entityManagerContainer().fetchIn(Identity.class,
+					ListTools.toList(Identity.id_FIELDNAME, Identity.person_FIELDNAME, Identity.orderNumber_FIELDNAME), Identity.unit_FIELDNAME, unitIds);
+		}
+		if(ListTools.isNotEmpty(list)) {
+			Map<String,Integer> map = new HashMap<>();
+			for(Identity identity : list){
+				map.put(identity.getPerson(), identity.getOrderNumber());
+			}
+			for (Person o : business.person().pick(new ArrayList<>(map.keySet()))) {
+				o.setOrderNumber(map.get(o.getId()));
+				wos.add(this.convert(business, o, Wo.class));
+			}
+			wos = wos.stream()
+					.sorted(Comparator.comparing(Wo::getOrderNumber, Comparator.nullsLast(Integer::compareTo))
+							.thenComparing(Comparator
+									.comparing(Wo::getName, Comparator.nullsFirst(String::compareTo)).reversed()))
+					.collect(Collectors.toList());
 		}
 		}
 		return wos;
 		return wos;
 	}
 	}
 
 
-}
+}

+ 37 - 1
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/BaseAction.java

@@ -3,6 +3,11 @@ package com.x.organization.assemble.express.jaxrs.person;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.organization.OrganizationDefinition;
+import com.x.base.core.project.tools.ListTools;
+import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 
 
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.annotation.FieldDescribe;
@@ -74,4 +79,35 @@ class BaseAction extends StandardJaxrsAction {
 
 
 	}
 	}
 
 
-}
+	protected static List<String> person_fieldsInvisible = ListTools.toList(JpaObject.FieldsInvisible,
+			Person.password_FIELDNAME, Person.icon_FIELDNAME);
+
+	protected <T extends Person> void hide(EffectivePerson effectivePerson, Business business, List<T> list)
+			throws Exception {
+		if (!effectivePerson.isManager() && (!effectivePerson.isCipher())) {
+			if (!business.hasAnyRole(effectivePerson, OrganizationDefinition.OrganizationManager,
+					OrganizationDefinition.Manager)) {
+				for (Person o : list) {
+					if (BooleanUtils.isTrue(o.getHiddenMobile()) && (!StringUtils
+							.equals(effectivePerson.getDistinguishedName(), o.getDistinguishedName()))) {
+						o.setMobile(Person.HIDDENMOBILESYMBOL);
+					}
+				}
+			}
+		}
+	}
+
+	protected <T extends Person> void hide(EffectivePerson effectivePerson, Business business, T t)
+			throws Exception {
+		if (!effectivePerson.isManager() && (!effectivePerson.isCipher())) {
+			if (!business.hasAnyRole(effectivePerson, OrganizationDefinition.OrganizationManager,
+					OrganizationDefinition.Manager)) {
+				if (BooleanUtils.isTrue(t.getHiddenMobile())
+						&& (!StringUtils.equals(effectivePerson.getDistinguishedName(), t.getDistinguishedName()))) {
+					t.setMobile(Person.HIDDENMOBILESYMBOL);
+				}
+			}
+		}
+	}
+
+}

+ 12 - 0
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ExceptionPersonNotExist.java

@@ -0,0 +1,12 @@
+package com.x.organization.assemble.express.jaxrs.person;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionPersonNotExist extends PromptException {
+
+	private static final long serialVersionUID = -3439770681867963457L;
+
+	ExceptionPersonNotExist(String name) {
+		super("用户: {} 不存在.", name);
+	}
+}

+ 40 - 6
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/PersonAction.java

@@ -3,11 +3,7 @@ package com.x.organization.assemble.express.jaxrs.person;
 import java.util.List;
 import java.util.List;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
+import javax.ws.rs.*;
 import javax.ws.rs.container.AsyncResponse;
 import javax.ws.rs.container.AsyncResponse;
 import javax.ws.rs.container.Suspended;
 import javax.ws.rs.container.Suspended;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.Context;
@@ -16,6 +12,7 @@ import javax.ws.rs.core.MediaType;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonElement;
 import com.x.base.core.project.annotation.JaxrsDescribe;
 import com.x.base.core.project.annotation.JaxrsDescribe;
 import com.x.base.core.project.annotation.JaxrsMethodDescribe;
 import com.x.base.core.project.annotation.JaxrsMethodDescribe;
+import com.x.base.core.project.annotation.JaxrsParameterDescribe;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.http.HttpMediaType;
@@ -30,6 +27,24 @@ public class PersonAction extends StandardJaxrsAction {
 
 
 	private static Logger logger = LoggerFactory.getLogger(PersonAction.class);
 	private static Logger logger = LoggerFactory.getLogger(PersonAction.class);
 
 
+	@JaxrsMethodDescribe(value = "获取个人,附带身份,身份所在的组织,个人所在群组,个人拥有角色.", action = ActionGet.class)
+	@GET
+	@Path("{flag}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+					@JaxrsParameterDescribe("人员标识") @PathParam("flag") String flag) {
+		ActionResult<ActionGet.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionGet().execute(effectivePerson, flag);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
 	@JaxrsMethodDescribe(value = "判断个人是否拥有指定角色中的一个或者多个", action = ActionHasRole.class)
 	@JaxrsMethodDescribe(value = "判断个人是否拥有指定角色中的一个或者多个", action = ActionHasRole.class)
 	@POST
 	@POST
 	@Path("has/role")
 	@Path("has/role")
@@ -622,4 +637,23 @@ public class PersonAction extends StandardJaxrsAction {
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 	}
 
 
-}
+	@JaxrsMethodDescribe(value = "分页查询用户信息.", action = ActionListFilterPaging.class)
+	@POST
+	@Path("list/filter/{page}/size/{size}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listFilterPaging(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+								   @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
+								   @JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
+		ActionResult<List<ActionListFilterPaging.Wo>> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionListFilterPaging().execute(effectivePerson, page, size, jsonElement);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, jsonElement);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+}

+ 6 - 2
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/unit/ActionListObject.java

@@ -34,6 +34,7 @@ import javax.persistence.criteria.Root;
 
 
 class ActionListObject extends BaseAction {
 class ActionListObject extends BaseAction {
 	private static Logger logger = LoggerFactory.getLogger(ActionListObject.class);
 	private static Logger logger = LoggerFactory.getLogger(ActionListObject.class);
+
 	@SuppressWarnings("unchecked")
 	@SuppressWarnings("unchecked")
 	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
 	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
 
 
@@ -81,8 +82,11 @@ class ActionListObject extends BaseAction {
 		@FieldDescribe("直接下级身份数量")
 		@FieldDescribe("直接下级身份数量")
 		private Long subDirectIdentityCount = 0L;
 		private Long subDirectIdentityCount = 0L;
 
 
+//		static WrapCopier<Unit, Wo> copier = WrapCopierFactory.wo(Unit.class, Wo.class, null,
+//				ListTools.toList(JpaObject.FieldsInvisible,Unit.controllerList_FIELDNAME,Unit.inheritedControllerList_FIELDNAME));
+
 		static WrapCopier<Unit, Wo> copier = WrapCopierFactory.wo(Unit.class, Wo.class, null,
 		static WrapCopier<Unit, Wo> copier = WrapCopierFactory.wo(Unit.class, Wo.class, null,
-				ListTools.toList(JpaObject.FieldsInvisible,Unit.controllerList_FIELDNAME,Unit.inheritedControllerList_FIELDNAME));
+				ListTools.toList(JpaObject.FieldsInvisible, Unit.controllerList_FIELDNAME));
 
 
 		public String getMatchKey() {
 		public String getMatchKey() {
 			return matchKey;
 			return matchKey;
@@ -114,7 +118,7 @@ class ActionListObject extends BaseAction {
 		List<Wo> wos = new ArrayList<>();
 		List<Wo> wos = new ArrayList<>();
 		for (String str : wi.getUnitList()) {
 		for (String str : wi.getUnitList()) {
 			Unit o = business.unit().pick(str);
 			Unit o = business.unit().pick(str);
-			if(o!=null){
+			if (o != null) {
 				Wo wo = Wo.copier.copy(o);
 				Wo wo = Wo.copier.copy(o);
 				wo.setMatchKey(str);
 				wo.setMatchKey(str);
 				if (StringUtils.isNotEmpty(wo.getSuperior())) {
 				if (StringUtils.isNotEmpty(wo.getSuperior())) {

+ 1 - 1
o2server/x_organization_assemble_personal/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_organization_assemble_personal</artifactId>
 	<artifactId>x_organization_assemble_personal</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 5 - 5
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/factory/UnitFactory.java

@@ -210,11 +210,11 @@ public class UnitFactory extends AbstractFactory {
 			// Collections.reverse(names);
 			// Collections.reverse(names);
 			names.add(o.getName());
 			names.add(o.getName());
 			o.setLevelName(StringUtils.join(names, PersistenceProperties.Unit.levelNameSplit));
 			o.setLevelName(StringUtils.join(names, PersistenceProperties.Unit.levelNameSplit));
-			List<String> inheritControllerList = new ArrayList<>();
-			for (Unit u : list) {
-				inheritControllerList.addAll(u.getControllerList());
-			}
-			o.setInheritedControllerList(ListTools.trim(inheritControllerList, true, true));
+//			List<String> inheritControllerList = new ArrayList<>();
+//			for (Unit u : list) {
+//				inheritControllerList.addAll(u.getControllerList());
+//			}
+//			o.setInheritedControllerList(ListTools.trim(inheritControllerList, true, true));
 		}
 		}
 	}
 	}
 
 

+ 1 - 1
o2server/x_organization_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_organization_core_entity</artifactId>
 	<artifactId>x_organization_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Bind.java

@@ -17,7 +17,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.annotation.FieldDescribe;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Bind.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.Bind.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.Bind.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.Bind.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 3 - 3
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Custom.java

@@ -22,7 +22,7 @@ import com.x.base.core.entity.annotation.Flag;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.annotation.FieldDescribe;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Custom.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.Custom.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.Custom.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.Custom.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
@@ -61,7 +61,7 @@ public class Custom extends SliceJpaObject {
 
 
 	public static final String person_FIELDNAME = "person";
 	public static final String person_FIELDNAME = "person";
 	@FieldDescribe("属性所属个人,不可为空.")
 	@FieldDescribe("属性所属个人,不可为空.")
-	@Column(length = JpaObject.length_id, name = ColumnNamePrefix + person_FIELDNAME)
+	@Column(length = length_255B, name = ColumnNamePrefix + person_FIELDNAME)
 	@Index(name = TABLE + IndexNameMiddle + person_FIELDNAME)
 	@Index(name = TABLE + IndexNameMiddle + person_FIELDNAME)
 	@CheckPersist(allowEmpty = false)
 	@CheckPersist(allowEmpty = false)
 	private String person;
 	private String person;
@@ -103,4 +103,4 @@ public class Custom extends SliceJpaObject {
 		this.name = name;
 		this.name = name;
 	}
 	}
 
 
-}
+}

+ 1 - 3
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Definition.java

@@ -1,7 +1,5 @@
 package com.x.organization.core.entity;
 package com.x.organization.core.entity;
 
 
-import java.util.Date;
-
 import javax.persistence.Basic;
 import javax.persistence.Basic;
 import javax.persistence.Column;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Entity;
@@ -25,7 +23,7 @@ import com.x.base.core.entity.annotation.Flag;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.annotation.FieldDescribe;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Definition.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.Definition.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.Definition.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.Definition.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 1 - 1
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Group.java

@@ -34,7 +34,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.DateTools;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Group.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.Group.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.Group.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.Group.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 1 - 1
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Identity.java

@@ -28,7 +28,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.DateTools;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Identity.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.Identity.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.Identity.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.Identity.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 1 - 1
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/OauthCode.java

@@ -18,7 +18,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.StringTools;
 import com.x.base.core.project.tools.StringTools;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.OauthCode.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.OauthCode.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.OauthCode.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.OauthCode.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 1 - 1
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/PermissionSetting.java

@@ -28,7 +28,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.DateTools;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.PermissionSetting.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.PermissionSetting.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.PermissionSetting.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.PermissionSetting.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 3 - 2
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Person.java

@@ -45,7 +45,7 @@ import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.StringTools;
 import com.x.base.core.project.tools.StringTools;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Person.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.Person.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.Person.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.Person.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
@@ -115,7 +115,8 @@ public class Person extends SliceJpaObject {
 	@FieldDescribe("性别.男:m,女:f,未知:d")
 	@FieldDescribe("性别.男:m,女:f,未知:d")
 	@Enumerated(EnumType.STRING)
 	@Enumerated(EnumType.STRING)
 	@Column(length = GenderType.length, name = ColumnNamePrefix + genderType_FIELDNAME)
 	@Column(length = GenderType.length, name = ColumnNamePrefix + genderType_FIELDNAME)
-	@Index(name = TABLE + IndexNameMiddle + genderType_FIELDNAME)
+	//Enum类型不需要进行索引
+	//@Index(name = TABLE + IndexNameMiddle + genderType_FIELDNAME)
 	@CheckPersist(allowEmpty = false)
 	@CheckPersist(allowEmpty = false)
 	private GenderType genderType;
 	private GenderType genderType;
 
 

+ 1 - 2
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/PersonAttribute.java

@@ -1,6 +1,5 @@
 package com.x.organization.core.entity;
 package com.x.organization.core.entity;
 
 
-import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 import javax.persistence.Column;
 import javax.persistence.Column;
@@ -34,7 +33,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.DateTools;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.PersonAttribute.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.PersonAttribute.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.PersonAttribute.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.PersonAttribute.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 1 - 20
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/PersonCard.java

@@ -1,31 +1,16 @@
 package com.x.organization.core.entity;
 package com.x.organization.core.entity;
 
 
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-
-import javax.persistence.Basic;
 import javax.persistence.Column;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Entity;
 import javax.persistence.EnumType;
 import javax.persistence.EnumType;
 import javax.persistence.Enumerated;
 import javax.persistence.Enumerated;
-import javax.persistence.FetchType;
 import javax.persistence.Id;
 import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.InheritanceType;
-import javax.persistence.Lob;
-import javax.persistence.OrderColumn;
 import javax.persistence.Table;
 import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 import javax.persistence.UniqueConstraint;
 
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.time.DateUtils;
-import org.apache.openjpa.persistence.PersistentCollection;
-import org.apache.openjpa.persistence.jdbc.ContainerTable;
-import org.apache.openjpa.persistence.jdbc.ElementColumn;
-import org.apache.openjpa.persistence.jdbc.ElementIndex;
 import org.apache.openjpa.persistence.jdbc.Index;
 import org.apache.openjpa.persistence.jdbc.Index;
 
 
 import com.github.stuxuhai.jpinyin.PinyinFormat;
 import com.github.stuxuhai.jpinyin.PinyinFormat;
@@ -34,18 +19,14 @@ import com.x.base.core.entity.AbstractPersistenceProperties;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.SliceJpaObject;
 import com.x.base.core.entity.annotation.CheckPersist;
 import com.x.base.core.entity.annotation.CheckPersist;
-import com.x.base.core.entity.annotation.CheckRemove;
-import com.x.base.core.entity.annotation.CitationExist;
-import com.x.base.core.entity.annotation.CitationNotExist;
 import com.x.base.core.entity.annotation.ContainerEntity;
 import com.x.base.core.entity.annotation.ContainerEntity;
 import com.x.base.core.entity.annotation.Flag;
 import com.x.base.core.entity.annotation.Flag;
 import com.x.base.core.entity.type.GenderType;
 import com.x.base.core.entity.type.GenderType;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.DateTools;
-import com.x.base.core.project.tools.StringTools;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.PersonCard.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.PersonCard.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.PersonCard.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.PersonCard.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 1 - 2
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Role.java

@@ -1,7 +1,6 @@
 package com.x.organization.core.entity;
 package com.x.organization.core.entity;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 import javax.persistence.Column;
 import javax.persistence.Column;
@@ -34,7 +33,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.DateTools;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Role.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.Role.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.Role.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.Role.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 19 - 19
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/Unit.java

@@ -35,7 +35,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.DateTools;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Unit.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.Unit.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.Unit.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.Unit.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
@@ -189,17 +189,17 @@ public class Unit extends SliceJpaObject {
 	@CheckPersist(allowEmpty = true, citationExists = @CitationExist(type = Person.class))
 	@CheckPersist(allowEmpty = true, citationExists = @CitationExist(type = Person.class))
 	private List<String> controllerList;
 	private List<String> controllerList;
 
 
-	public static final String inheritedControllerList_FIELDNAME = "inheritedControllerList";
-	@FieldDescribe("继承自上级组织的管理人员.")
-	@PersistentCollection(fetch = FetchType.EAGER)
-	@OrderColumn(name = ORDERCOLUMNCOLUMN)
-	@ContainerTable(name = TABLE + ContainerTableNameMiddle
-			+ inheritedControllerList_FIELDNAME, joinIndex = @Index(name = TABLE + IndexNameMiddle
-					+ inheritedControllerList_FIELDNAME + JoinIndexNameSuffix))
-	@ElementColumn(length = JpaObject.length_id, name = ColumnNamePrefix + inheritedControllerList_FIELDNAME)
-	@ElementIndex(name = TABLE + IndexNameMiddle + inheritedControllerList_FIELDNAME + ElementIndexNameSuffix)
-	@CheckPersist(allowEmpty = true, citationExists = @CitationExist(type = Person.class))
-	private List<String> inheritedControllerList;
+//	public static final String inheritedControllerList_FIELDNAME = "inheritedControllerList";
+//	@FieldDescribe("继承自上级组织的管理人员.")
+//	@PersistentCollection(fetch = FetchType.EAGER)
+//	@OrderColumn(name = ORDERCOLUMNCOLUMN)
+//	@ContainerTable(name = TABLE + ContainerTableNameMiddle
+//			+ inheritedControllerList_FIELDNAME, joinIndex = @Index(name = TABLE + IndexNameMiddle
+//					+ inheritedControllerList_FIELDNAME + JoinIndexNameSuffix))
+//	@ElementColumn(length = JpaObject.length_id, name = ColumnNamePrefix + inheritedControllerList_FIELDNAME)
+//	@ElementIndex(name = TABLE + IndexNameMiddle + inheritedControllerList_FIELDNAME + ElementIndexNameSuffix)
+//	@CheckPersist(allowEmpty = true, citationExists = @CitationExist(type = Person.class))
+//	private List<String> inheritedControllerList;
 
 
 	public static final String dingdingId_FIELDNAME = "dingdingId";
 	public static final String dingdingId_FIELDNAME = "dingdingId";
 	@FieldDescribe("钉钉部门ID.")
 	@FieldDescribe("钉钉部门ID.")
@@ -351,13 +351,13 @@ public class Unit extends SliceJpaObject {
 		this.distinguishedName = distinguishedName;
 		this.distinguishedName = distinguishedName;
 	}
 	}
 
 
-	public List<String> getInheritedControllerList() {
-		return inheritedControllerList;
-	}
-
-	public void setInheritedControllerList(List<String> inheritedControllerList) {
-		this.inheritedControllerList = inheritedControllerList;
-	}
+//	public List<String> getInheritedControllerList() {
+//		return inheritedControllerList;
+//	}
+//
+//	public void setInheritedControllerList(List<String> inheritedControllerList) {
+//		this.inheritedControllerList = inheritedControllerList;
+//	}
 
 
 	public String getDescription() {
 	public String getDescription() {
 		return description;
 		return description;

+ 1 - 2
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/UnitAttribute.java

@@ -1,6 +1,5 @@
 package com.x.organization.core.entity;
 package com.x.organization.core.entity;
 
 
-import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 import javax.persistence.Column;
 import javax.persistence.Column;
@@ -34,7 +33,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.DateTools;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.UnitAttribute.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.UnitAttribute.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.UnitAttribute.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.UnitAttribute.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 1 - 2
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/UnitDuty.java

@@ -1,6 +1,5 @@
 package com.x.organization.core.entity;
 package com.x.organization.core.entity;
 
 
-import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 import javax.persistence.Column;
 import javax.persistence.Column;
@@ -34,7 +33,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.DateTools;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.UnitDuty.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.UnitDuty.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.UnitDuty.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.UnitDuty.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 1 - 1
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/accredit/Empower.java

@@ -23,7 +23,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.organization.core.entity.PersistenceProperties;
 import com.x.organization.core.entity.PersistenceProperties;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Accredit.Empower.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.Accredit.Empower.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.Accredit.Empower.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.Accredit.Empower.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

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

@@ -23,7 +23,7 @@ import com.x.base.core.project.tools.StringTools;
 import com.x.organization.core.entity.PersistenceProperties;
 import com.x.organization.core.entity.PersistenceProperties;
 
 
 @Entity
 @Entity
-@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
+@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
 @Table(name = PersistenceProperties.Accredit.EmpowerLog.table, uniqueConstraints = {
 @Table(name = PersistenceProperties.Accredit.EmpowerLog.table, uniqueConstraints = {
 		@UniqueConstraint(name = PersistenceProperties.Accredit.EmpowerLog.table + JpaObject.IndexNameMiddle
 		@UniqueConstraint(name = PersistenceProperties.Accredit.EmpowerLog.table + JpaObject.IndexNameMiddle
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
 				+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,

+ 1 - 1
o2server/x_organization_core_express/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_organization_core_express</artifactId>
 	<artifactId>x_organization_core_express</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_portal_assemble_designer/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_portal_assemble_designer</artifactId>
 	<artifactId>x_portal_assemble_designer</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_portal_assemble_surface/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_portal_assemble_surface</artifactId>
 	<artifactId>x_portal_assemble_surface</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_portal_core_entity/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_portal_core_entity</artifactId>
 	<artifactId>x_portal_core_entity</artifactId>
 	<packaging>jar</packaging>
 	<packaging>jar</packaging>

+ 1 - 1
o2server/x_processplatform_assemble_bam/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_processplatform_assemble_bam</artifactId>
 	<artifactId>x_processplatform_assemble_bam</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_processplatform_assemble_designer/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_processplatform_assemble_designer</artifactId>
 	<artifactId>x_processplatform_assemble_designer</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

+ 1 - 1
o2server/x_processplatform_assemble_surface/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 	<parent>
 		<groupId>o2oa</groupId>
 		<groupId>o2oa</groupId>
 		<artifactId>o2server</artifactId>
 		<artifactId>o2server</artifactId>
-		<version>${revision}</version>
+		<version>5.3</version>
 	</parent>
 	</parent>
 	<artifactId>x_processplatform_assemble_surface</artifactId>
 	<artifactId>x_processplatform_assemble_surface</artifactId>
 	<packaging>war</packaging>
 	<packaging>war</packaging>

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