Просмотр исходного кода

Merge branch 'wrdp' into 'feature/async_form'

# Conflicts:
#   o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/CmsBatchOperationPersistService.java
#   o2web/gulpfile.js
#   o2web/source/o2_core/o2.js
#   o2web/source/o2_core/o2/xDesktop/Common.js
胡起 5 лет назад
Родитель
Сommit
3c2d6918c8
100 измененных файлов с 4298 добавлено и 1471 удалено
  1. 15 15
      build.xml
  2. 235 11
      gulpfile.js
  3. 3 1
      o2server/configSample/centerServer.json
  4. 1 1
      o2server/configSample/dingding.json
  5. 24 0
      o2server/configSample/externalStorageSources.json
  6. 2 1
      o2server/configSample/manifest.cfg
  7. 13 7
      o2server/configSample/node_127.0.0.1.json
  8. 1 1
      o2server/configSample/qiyeweixin.json
  9. 3 0
      o2server/configSample/vfs.json
  10. 4 0
      o2server/configSample/web.json
  11. 1 1
      o2server/configSample/zhengwuDingding.json
  12. 6 0
      o2server/pom.xml
  13. 6 0
      o2server/x_attendance_assemble_control/pom.xml
  14. 57 3
      o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java
  15. 5 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/container/factory/PersistenceXmlHelper.java
  16. 10 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/JpaObject.java
  17. 21 67
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/StorageObject.java
  18. 2 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/StorageProtocol.java
  19. 15 15
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dynamic/DynamicEntityBuilder.java
  20. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/openjpa/jdbc/sql/Kingbase8Dictionary.java
  21. 0 64
      o2server/x_base_core_project/src/main/java/com/x/base/core/openjpa/jdbc/sql/Kingbase8DictionaryBack.java
  22. 254 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/openjpa/jdbc/sql/Kingbase8R6Dictionary.java
  23. 5 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/openjpa/jdbc/sql/OscarDictionary.java
  24. 910 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/annotation/ApiAllBuilder.java
  25. 30 32
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/annotation/ApiBuilder.java
  26. 1 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/CreateConfigSample.java
  27. 10 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ApplicationServer.java
  28. 10 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/CenterServer.java
  29. 271 412
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Config.java
  30. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/DataServer.java
  31. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Dingding.java
  32. 36 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ExternalDataSource.java
  33. 28 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ExternalDataSources.java
  34. 3 3
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Node.java
  35. 2 4
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Qiyeweixin.java
  36. 20 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Vfs.java
  37. 214 217
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/WeLink.java
  38. 10 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/WebServer.java
  39. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ZhengwuDingding.java
  40. 1 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/http/FilterTools.java
  41. 5 6
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/http/HttpToken.java
  42. 47 22
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/ResponseFactory.java
  43. 1 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/WoFile.java
  44. 28 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/WoMaxAgeFastETag.java
  45. 15 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/WoText.java
  46. 2 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/logger/Logger.java
  47. 15 18
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/script/ScriptFactory.java
  48. 198 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/EscapeStringTools.java
  49. 24 5
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/PropertyTools.java
  50. 26 22
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/tools/StringTools.java
  51. 8 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/utils/time/WorkTime.java
  52. 2 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_organization_assemble_control.java
  53. 3 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_portal_assemble_designer.java
  54. 4 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_portal_assemble_surface.java
  55. 3 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_processplatform_service_processing.java
  56. 6 0
      o2server/x_bbs_assemble_control/pom.xml
  57. 6 0
      o2server/x_calendar_assemble_control/pom.xml
  58. 6 0
      o2server/x_cms_assemble_control/pom.xml
  59. 2 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/ActionApplication.java
  60. 3 2
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/CmsJaxrsFilter.java
  61. 2 1
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appdictdesign/ActionCreate.java
  62. 2 1
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appdictdesign/ActionDelete.java
  63. 2 1
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appdictdesign/ActionEdit.java
  64. 23 29
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoAction.java
  65. 2 6
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoAnonymousAction.java
  66. 2 5
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoConfigAction.java
  67. 1 4
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoExportAction.java
  68. 1 4
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoImportAction.java
  69. 5 4
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionDelete.java
  70. 6 5
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionSave.java
  71. 15 18
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/CategoryInfoAction.java
  72. 6 9
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/CategoryInfoAnonymousAction.java
  73. 53 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/commend/ActionGet.java
  74. 61 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/commend/ActionListPaging.java
  75. 12 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/commend/BaseAction.java
  76. 64 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/commend/DocumentCommendAction.java
  77. 3 2
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/comment/ActionSave.java
  78. 8 11
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/comment/DocumentCommentInfoAction.java
  79. 2 1
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistChangeCategory.java
  80. 2 1
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishAndNotify.java
  81. 3 4
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java
  82. 100 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionQueryGetDocumentData.java
  83. 131 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionQueryListDocumentData.java
  84. 10 114
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionQueryPermissionReadDocument.java
  85. 80 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/BaseAction.java
  86. 281 229
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/DocumentAction.java
  87. 718 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/DocumentAction2.java
  88. 13 16
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/file/FileAction.java
  89. 3 2
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/fileinfo/ActionDelete.java
  90. 6 5
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/fileinfo/ActionFileUpdate.java
  91. 1 1
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/fileinfo/ActionFileUpdateCallback.java
  92. 4 3
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/fileinfo/ActionFileUploadCallback.java
  93. 12 15
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/fileinfo/FileInfoAction.java
  94. 11 14
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/form/FormAction.java
  95. 2 5
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/image/ImageAction.java
  96. 4 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/input/ActionCover.java
  97. 2 4
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/output/OutputAction.java
  98. 2 1
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionAppInfoManagerSave.java
  99. 3 2
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionAppInfoPublisherSave.java
  100. 3 2
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionAppInfoViewerSave.java

+ 15 - 15
build.xml

@@ -45,14 +45,14 @@
 			project.setNewProperty("length_aix_mb", length_aix_mbytes);
 		]]>
 		</script>
-		<checksum file="${preName}-${VERSION}-raspi.zip" property="build_raspberrypi.sha" algorithm="SHA-256" />
-		<length file="${preName}-${VERSION}-raspi.zip" property="length_raspberrypi"/>
+		<checksum file="${preName}-${VERSION}-raspi.zip" property="build_raspi.sha" algorithm="SHA-256" />
+		<length file="${preName}-${VERSION}-raspi.zip" property="length_raspi"/>
 		<script language="javascript">
 			<![CDATA[
-			var length_raspberrypi_bytes = project.getProperty("length_raspberrypi");
-			var length_raspberrypi_kbytes = Math.round((length_raspberrypi_bytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
-			var length_raspberrypi_mbytes = Math.round((length_raspberrypi_kbytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
-			project.setNewProperty("length_raspberrypi_mb", length_raspberrypi_mbytes);
+			var length_raspi_bytes = project.getProperty("length_raspi");
+			var length_raspi_kbytes = Math.round((length_raspi_bytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
+			var length_raspi_mbytes = Math.round((length_raspi_kbytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
+			project.setNewProperty("length_raspi_mb", length_raspi_mbytes);
 		]]>
 		</script>
 		<checksum file="${preName}-${VERSION}-linux-mips.zip" property="build_mips.sha" algorithm="SHA-256" />
@@ -116,14 +116,14 @@
 			"url": "/download/o2server-${VERSION}-aix.zip",
 			"sha256": "${build_aix.sha}"
 			},
-			"raspberrypi": {
+			"raspi": {
 			"system": "raspberrypi",
 			"name": "o2server-${VERSION}-raspi.zip",
 			"fileName": "o2server-${VERSION}-raspi.zip",
 			"fileSize": "${length_raspberrypi_mb}MB",
 			"updateTime": "${TODAY}",
 			"url": "/download/o2server-${VERSION}-raspi.zip",
-			"sha256": "${build_raspberrypi.sha}"
+			"sha256": "${build_raspi.sha}"
 			},
 			"mips": {
 			"system": "mips",
@@ -185,14 +185,14 @@
 			"url": "/download/o2server-${VERSION}-aix.zip",
 			"sha256": "${build_aix.sha}"
 			},
-			"raspberrypi": {
-			"system": "raspberrypi",
+			"raspi": {
+			"system": "raspi",
 			"name": "o2server-${VERSION}-raspi.zip",
 			"fileName": "o2server-${VERSION}-raspi.zip",
-			"fileSize": "${length_raspberrypi_mb}MB",
+			"fileSize": "${length_raspi_mb}MB",
 			"updateTime": "${TODAY}",
 			"url": "/download/o2server-${VERSION}-raspi.zip",
-			"sha256": "${build_raspberrypi.sha}"
+			"sha256": "${build_raspi.sha}"
 			},
 			"mips": {
 			"system": "mips",
@@ -220,7 +220,7 @@
 			}
 			}</echo>
 	</target>
-	<target name="default_zip" depends="version_o2,zip_windows,zip_linux,zip_macos,zip_aix,zip_raspberrypi,zip_mips,zip_arm" />
+	<target name="default_zip" depends="version_o2,zip_windows,zip_linux,zip_macos,zip_aix,zip_raspi,zip_mips,zip_arm" />
 	<target name="version_o2">
 		<tstamp>
 			<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss"/>
@@ -308,7 +308,7 @@
 			</zipfileset>
 		</zip>
 	</target>
-	<target name="zip_raspberrypi">
+	<target name="zip_raspi">
 		<zip encoding="utf-8" destfile="${preName}-${VERSION}-raspi.zip" update="false">
 			<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
 				<include name="commons/"/>
@@ -320,7 +320,7 @@
 				<include name="index.html"/>
 				<include name="version.o2"/>
 				<include name="console.jar"/>
-				<include name="jvm/raspberrypi/"/>
+				<include name="jvm/raspi/"/>
 				<include name="start_raspi.sh"/>
 				<include name="start_raspi_debug.sh"/>
 				<include name="console_raspi.sh"/>

+ 235 - 11
gulpfile.js

@@ -19,6 +19,8 @@ var fg = require('fast-glob');
 var logger = require('gulp-logger');
 var assetRev = require('gulp-tm-asset-rev');
 const os = require('os');
+var through2 = require('through2');
+var path = require('path');
 
 //var downloadHost = "download.o2oa.net";
 // var downloadHost = "release.o2oa.net";
@@ -46,7 +48,7 @@ var jvmUrls = {
     "arm": "/o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/arm",
     "macos": "/o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/macos",
     "risc": "/o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/risc",
-    "raspberrypi": "/o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/raspberrypi",
+    "raspi": "/o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/raspi",
     "windows": "/o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/windows"
 };
 
@@ -57,15 +59,16 @@ var scripts = {
     "arm": ["o2server/*arm*", "o2server/*.jar", "o2server/*.html", "o2server/version.o2"],
     "macos": ["o2server/*macos*", "o2server/*.jar", "o2server/*.html", "o2server/version.o2"],
     "risc": ["o2server/*risc*", "o2server/*.jar", "o2server/*.html", "o2server/version.o2"],
-    "raspberrypi": ["o2server/*raspberrypi*", "o2server/*.jar", "o2server/*.html", "o2server/version.o2"],
+    "raspi": ["o2server/*raspi*", "o2server/*.jar", "o2server/*.html", "o2server/version.o2"],
     "windows": ["o2server/*windows*", "o2server/*.jar", "o2server/*.html", "o2server/version.o2"]
 };
 
 var o_options = minimist(process.argv.slice(2), {//upload: local ftp or sftp
-    string: ["e"]
+    string: ["e", "lp"]
 });
 var options = {};
 options.ev = o_options.e || "all";
+options.lp = o_options.lp || "zh-cn";
 var jvmUrl = jvmUrls[options.ev];
 var scriptSource = scripts[options.ev];
 
@@ -460,6 +463,8 @@ function build_concat_xform(){
         'o2web/source/' + path + '/DatagridPC.js',
         'o2web/source/' + path + '/Textfield.js',
         'o2web/source/' + path + '/Personfield.js',
+        'o2web/source/' + path + '/Button.js',
+        'o2web/source/' + path + '/ViewSelector.js',
         'o2web/source/' + path + '/*.js',
         'o2web/source/x_component_process_Work/Processor.js',
         '!o2web/source/' + path + '/Office.js'
@@ -491,9 +496,100 @@ function build_bundle(){
         .pipe(gulp.dest(dest))
 }
 
-function build_concat_basework() {
+
+function concat_Actions(){
+    return through2.obj(function (file, enc, cb) {
+        if (file.isNull()) {
+            this.push(file);
+            return cb();
+        }
+
+        if (file.isStream()) {
+            this.emit('error', new gutil.PluginError(PLUGIN_NAME, 'Streaming not supported'));
+            return cb();
+        }
+        var content = file.contents.toString();
+
+        var o = path.parse(file.path);
+        var name = o.name;
+        content = "var actionJson = "+content;
+        content = content+"\nif (!o2.xAction.RestActions.Action[\""+name+"\"]) o2.xAction.RestActions.Action[\""+name+"\"] = new Class({Extends: o2.xAction.RestActions.Action});";
+        content = content+"\no2.Actions.actions[\""+name+"\"] = new o2.xAction.RestActions.Action[\""+name+"\"](\""+name+"\", actionJson);";
+
+        file.contents = new Buffer.from(content);
+        this.push(file);
+        cb();
+    });
+}
+function concat_Style(){
+    return through2.obj(function (file, enc, cb) {
+        if (file.isNull()) {
+            this.push(file);
+            return cb();
+        }
+
+        if (file.isStream()) {
+            this.emit('error', new gutil.PluginError(PLUGIN_NAME, 'Streaming not supported'));
+            return cb();
+        }
+        var content = file.contents.toString();
+        var name = file.path.replace(process.cwd(), "").replace(/\\/g, "/")
+        name = ".."+name.substring(name.indexOf("/source")+7);
+        content = "var csskey = encodeURIComponent(\""+name+"\");\no2.widget.css[csskey]="+content;
+
+        file.contents = new Buffer.from(content);
+        this.push(file);
+        cb();
+    });
+}
+
+function build_concat_basework_style(){
+    return gulp.src([
+        "o2web/source/x_component_process_Work/$Main/default/css.wcss",
+        "o2web/source/x_component_process_Xform/$Form/default/css.wcss",
+        "o2web/source/o2_core/o2/widget/$Tab/mobileForm/css.wcss",
+        "o2web/source/o2_core/o2/widget/$Menu/tab/css.wcss",
+        "o2web/source/o2_core/o2/widget/$Tab/form/css.wcss",
+        "o2web/source/x_component_process_Xform/$Form/default/doc.wcss",
+        "o2web/source/o2_core/o2/widget/$Toolbar/documentEdit/css.wcss",
+        "o2web/source/o2_core/o2/widget/$Toolbar/documentEdit_side/css.wcss",
+        "o2web/source/x_component_process_Xform/$Form/default/css.wcss"
+    ])
+        .pipe(concat_Style())
+        .pipe(concat('js/base_work_style_temp.js'))
+        .pipe(gulp.dest('o2web/source/x_desktop/'));
+}
+
+function build_concat_basework_action(){
+    return gulp.src([
+        "o2web/source/o2_core/o2/xAction/services/x_organization_assemble_authentication.json",
+        "o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_surface.json",
+        "o2web/source/o2_core/o2/xAction/services/x_organization_assemble_control.json",
+        "o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.json",
+        "o2web/source/o2_core/o2/xAction/services/x_cms_assemble_control.json",
+        "o2web/source/o2_core/o2/xAction/services/x_program_center.json",
+        "o2web/source/o2_core/o2/xAction/services/x_organization_assemble_personal.json"
+    ])
+        .pipe(concat_Actions())
+        .pipe(concat('js/base_work_actions_temp.js'))
+        .pipe(gulp.dest('o2web/source/x_desktop/'));
+}
+
+function build_concat_basework_clean(cb) {
+    var dest = [
+        'o2web/source/x_desktop/js/base_work_actions_temp.js',
+        'o2web/source/x_desktop/js/base_work_style_temp.js'
+    ];
+    return del(dest, cb);
+}
+
+function build_concat_basework_body() {
     var src = [
-        'o2web/source/x_desktop/js/base_work_begin.js',
+        'o2web/source/x_desktop/js/base_concat_head.js',
+        'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
+
+        'o2web/source/x_desktop/js/base_work_style_temp.js',
+
         'o2web/source/o2_core/o2/widget/Common.js',
         'o2web/source/o2_core/o2/widget/Dialog.js',
         'o2web/source/o2_core/o2/widget/UUID.js',
@@ -511,6 +607,12 @@ function build_concat_basework() {
         'o2web/source/o2_core/o2/xDesktop/Dialog.js',
         'o2web/source/o2_core/o2/xDesktop/Window.js',
         'o2web/source/x_component_Common/Main.js',
+
+        'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
+        'o2web/source/x_component_process_Work/lp/'+(options.lp || 'zh-cn')+'.js',
+        'o2web/source/x_component_process_Xform/lp/'+(options.lp || 'zh-cn')+'.js',
+        'o2web/source/x_component_Selector/lp/'+(options.lp || 'zh-cn')+'.js',
+
         'o2web/source/x_component_process_Work/Main.js',
         'o2web/source/x_component_Selector/package.js',
         'o2web/source/x_component_Selector/Person.js',
@@ -526,13 +628,16 @@ function build_concat_basework() {
         'o2web/source/o2_core/o2/xScript/Environment.js',
         'o2web/source/x_component_Template/MTooltips.js',
         'o2web/source/x_component_Template/MSelector.js',
+
         'o2web/source/o2_core/o2/xAction/services/x_organization_assemble_authentication.js',
         'o2web/source/o2_core/o2/xAction/services/x_processplatform_assemble_surface.js',
         'o2web/source/o2_core/o2/xAction/services/x_cms_assemble_control.js',
         'o2web/source/o2_core/o2/xAction/services/x_organization_assemble_control.js',
         'o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.js',
         'o2web/source/o2_core/o2/xAction/services/x_organization_assemble_personal.js',
-        'o2web/source/x_desktop/js/base_work_end.js',
+
+        'o2web/source/x_desktop/js/base_work_actions_temp.js',
+
         'o2web/source/x_desktop/js/base.js'
     ];
     var dest = 'target/o2server/servers/webServer/x_desktop/js/';
@@ -543,10 +648,116 @@ function build_concat_basework() {
         .pipe(rename({ extname: '.min.js' }))
         .pipe(gulp.dest(dest));
 }
-// function build_concat(){
-//     return gulp.parallel(build_concat_o2, build_concat_desktop, build_concat_xform);
-// }
-exports.build_concat = gulp.parallel(build_concat_o2, build_concat_desktop, build_concat_xform, build_bundle, build_concat_basework);
+
+function build_concat_baseportal_style(){
+    return gulp.src([
+        "o2web/source/x_component_process_Work/$Main/default/css.wcss",
+        "o2web/source/x_component_portal_Portal/$Main/default/css.wcss",
+        "o2web/source/x_component_process_Xform/$Form/default/css.wcss",
+        "o2web/source/o2_core/o2/widget/$Tab/mobileForm/css.wcss",
+        "o2web/source/o2_core/o2/widget/$Menu/tab/css.wcss",
+    ])
+        .pipe(concat_Style())
+        .pipe(concat('js/base_portal_style_temp.js'))
+        .pipe(gulp.dest('o2web/source/x_desktop/'));
+}
+
+function build_concat_baseportal_action(){
+    return gulp.src([
+        "o2web/source/o2_core/o2/xAction/services/x_organization_assemble_authentication.json",
+        "o2web/source/o2_core/o2/xAction/services/x_portal_assemble_surface.json",
+        "o2web/source/o2_core/o2/xAction/services/x_organization_assemble_control.json",
+        "o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.json",
+        "o2web/source/o2_core/o2/xAction/services/x_cms_assemble_control.json",
+        "o2web/source/o2_core/o2/xAction/services/x_program_center.json",
+        "o2web/source/o2_core/o2/xAction/services/x_organization_assemble_personal.json"
+    ])
+        .pipe(concat_Actions())
+        .pipe(concat('js/base_portal_actions_temp.js'))
+        .pipe(gulp.dest('o2web/source/x_desktop/'));
+}
+
+function build_concat_baseportal_clean(cb) {
+    var dest = [
+        'o2web/source/x_desktop/js/base_portal_actions_temp.js',
+        'o2web/source/x_desktop/js/base_portal_style_temp.js'
+    ];
+    return del(dest, cb);
+}
+
+function build_concat_baseportal_body() {
+    var src = [
+        'o2web/source/x_desktop/js/base_concat_head.js',
+        'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
+
+        'o2web/source/x_desktop/js/base_portal_style_temp.js',
+
+        'o2web/source/o2_core/o2/widget/Common.js',
+        'o2web/source/o2_core/o2/widget/Dialog.js',
+        'o2web/source/o2_core/o2/widget/UUID.js',
+        'o2web/source/o2_core/o2/widget/Menu.js',
+        'o2web/source/o2_core/o2/widget/Toolbar.js',
+        'o2web/source/o2_core/o2/xDesktop/Common.js',
+        'o2web/source/o2_core/o2/xDesktop/Actions/RestActions.js',
+        'o2web/source/o2_core/o2/xAction/RestActions.js',
+        'o2web/source/o2_core/o2/xDesktop/Access.js',
+        'o2web/source/o2_core/o2/xDesktop/Dialog.js',
+        'o2web/source/o2_core/o2/xDesktop/Menu.js',
+        'o2web/source/o2_core/o2/xDesktop/UserData.js',
+        'o2web/source/x_component_Template/MPopupForm.js',
+        'o2web/source/o2_core/o2/xDesktop/Authentication.js',
+        'o2web/source/o2_core/o2/xDesktop/Window.js',
+
+        'o2web/source/x_component_Common/Main.js',
+
+        'o2web/source/x_component_process_Work/lp/'+(options.lp || 'zh-cn')+'.js',
+        'o2web/source/x_component_portal_Portal/lp/'+(options.lp || 'zh-cn')+'.js',
+        'o2web/source/x_component_process_Xform/lp/'+(options.lp || 'zh-cn')+'.js',
+        'o2web/source/x_component_Selector/lp/'+(options.lp || 'zh-cn')+'.js',
+
+        'o2web/source/x_component_portal_Portal/Main.js',
+
+        'o2web/source/x_component_Selector/package.js',
+        'o2web/source/x_component_Selector/Person.js',
+        'o2web/source/x_component_Selector/Identity.js',
+        'o2web/source/x_component_Selector/Unit.js',
+        'o2web/source/x_component_Selector/IdentityWidthDuty.js',
+        'o2web/source/x_component_Selector/IdentityWidthDutyCategoryByUnit.js',
+        'o2web/source/x_component_Selector/UnitWithType.js',
+
+        'o2web/source/o2_core/o2/xScript/Actions/UnitActions.js',
+        'o2web/source/o2_core/o2/xScript/Actions/ScriptActions.js',
+        'o2web/source/o2_core/o2/xScript/Actions/CMSScriptActions.js',
+        'o2web/source/o2_core/o2/xScript/Actions/PortalScriptActions.js',
+        'o2web/source/o2_core/o2/xScript/PageEnvironment.js',
+
+        'o2web/source/o2_core/o2/xAction/services/x_organization_assemble_authentication.js',
+        'o2web/source/o2_core/o2/xAction/services/x_cms_assemble_control.js',
+        'o2web/source/o2_core/o2/xAction/services/x_organization_assemble_control.js',
+        'o2web/source/o2_core/o2/xAction/services/x_query_assemble_surface.js',
+        'o2web/source/o2_core/o2/xAction/services/x_organization_assemble_personal.js',
+
+        'o2web/source/x_desktop/js/base_portal_actions_temp.js',
+
+        'o2web/source/x_desktop/js/base.js'
+    ];
+    var dest = 'target/o2server/servers/webServer/x_desktop/js/';
+    return gulp.src(src)
+        .pipe(concat('base_portal.js'))
+        .pipe(gulp.dest(dest))
+        .pipe(uglify())
+        .pipe(rename({ extname: '.min.js' }))
+        .pipe(gulp.dest(dest));
+}
+
+exports.build_concat = gulp.parallel(
+    build_concat_o2,
+    build_concat_desktop,
+    build_concat_xform,
+    build_bundle,
+    gulp.series(build_concat_basework_style, build_concat_basework_action, build_concat_basework_body,build_concat_basework_clean),
+    gulp.series(build_concat_baseportal_style, build_concat_baseportal_action, build_concat_baseportal_body,build_concat_baseportal_clean)
+);
 
 
 function build_web_v_html() {
@@ -638,7 +849,20 @@ function chmod_sh(){
 function chmod_servers(){
     return (shell.task('chmod 777 -R target/o2server/servers'))();
 }
-exports.build_web = gulp.series(build_web_minimize, build_web_move, gulp.parallel(build_concat_o2, build_concat_desktop, build_concat_xform, build_bundle, build_concat_basework), build_web_v_html, build_web_v_o2);
+exports.build_web = gulp.series(
+    build_web_minimize,
+    build_web_move,
+    gulp.parallel(
+        build_concat_o2,
+        build_concat_desktop,
+        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_baseportal_style, build_concat_baseportal_action, build_concat_baseportal_body,build_concat_baseportal_clean),
+        build_bundle
+    ),
+    build_web_v_html,
+    build_web_v_o2);
+
 if (os.platform().indexOf("win")==-1){
     exports.deploy = gulp.series(deploy_server, chmod_jvm, chmod_commons, chmod_sh, chmod_servers);
 }else{

+ 3 - 1
o2server/configSample/centerServer.json

@@ -13,6 +13,7 @@
   "statExclusions": "*.js,*.gif,*.jpg,*.png,*.css,*.ico",
   "maxFormContent": 20.0,
   "exposeJest": true,
+  "persistentConnectionsEnable": true,
   "###enable": "是否启用###",
   "###order": "center节点顺序,顺序排列0,1,2...###",
   "###sslEnable": "是否启用ssl传输加密,如果启用将使用config/keystore文件作为密钥文件.使用config/token.json文件中的sslKeyStorePassword字段为密钥密码,sslKeyManagerPassword为管理密码.###",
@@ -27,5 +28,6 @@
   "###statEnable": "启用统计,默认启用统计.###",
   "###statExclusions": "统计忽略路径,默认忽略*.js,*.gif,*.jpg,*.png,*.css,*.ico###",
   "###maxFormContent": "最大提交数据限制(M),限制有所上传的内容大小,包括附件.###",
-  "###exposeJest": "暴露jest接口.###"
+  "###exposeJest": "暴露jest接口.###",
+  "###persistentConnectionsEnable": "是否启用长连接,默认false.###"
 }

+ 1 - 1
o2server/configSample/dingding.json

@@ -19,7 +19,7 @@
   "###agentId": "agentId###",
   "###appKey": "应用的key,唯一标识###",
   "###appSecret": "应用的密钥###",
-  "###syncCron": "组织同步cron,默认每10分钟同步一次.###",
+  "###syncCron": "回调信号触发同步检查,默认每10分钟运行一次,如果期间内有钉钉回调信号接收到,那么触发同步任务进行人员同步.###",
   "###forceSyncCron": "强制拉入同步cron,默认在每天的8点和12点强制进行同步.###",
   "###oapiAddress": "oapi服务器地址###",
   "###workUrl": "钉钉消息打开工作的url地址,如:http://dev.o2oa.net/x_desktop/###",

+ 24 - 0
o2server/configSample/externalStorageSources.json

@@ -286,5 +286,29 @@
       "###name": "存储节点名,对应存储名称,谨慎修改.###",
       "###deepPath": "是否使用更深的路径.###"
     }
+  ],
+  "general": [
+    {
+      "protocol": "webdav",
+      "username": "admin",
+      "password": "admin",
+      "host": "127.0.0.1",
+      "port": 8080.0,
+      "prefix": "",
+      "enable": true,
+      "weight": 100.0,
+      "name": "251",
+      "deepPath": false,
+      "###protocol": "协议,可选值ftp,webdav###",
+      "###username": "登录用户名.###",
+      "###password": "登录密码.###",
+      "###host": "主机地址.###",
+      "###port": "端口.###",
+      "###prefix": "前缀路径.###",
+      "###enable": "是否启用###",
+      "###weight": "设置权重.###",
+      "###name": "存储节点名,对应存储名称,谨慎修改.###",
+      "###deepPath": "是否使用更深的路径.###"
+    }
   ]
 }

+ 2 - 1
o2server/configSample/manifest.cfg

@@ -33,5 +33,6 @@
  "vfs.json":"虚拟文件存储配置",
  "welink.json":"华为WeLink配置",
  "workTime.json":"工作时间配置",
- "zhengwuDingding.json":"政务钉钉配置"
+ "zhengwuDingding.json":"政务钉钉配置",
+ "web.json":"前端相关配置"
 }

+ 13 - 7
o2server/configSample/node_127.0.0.1.json

@@ -16,6 +16,7 @@
     "statExclusions": "*.js,*.gif,*.jpg,*.png,*.css,*.ico",
     "maxFormContent": 20.0,
     "exposeJest": true,
+    "persistentConnectionsEnable": true,
     "###enable": "是否启用###",
     "###order": "center节点顺序,顺序排列0,1,2...###",
     "###sslEnable": "是否启用ssl传输加密,如果启用将使用config/keystore文件作为密钥文件.使用config/token.json文件中的sslKeyStorePassword字段为密钥密码,sslKeyManagerPassword为管理密码.###",
@@ -30,7 +31,8 @@
     "###statEnable": "启用统计,默认启用统计.###",
     "###statExclusions": "统计忽略路径,默认忽略*.js,*.gif,*.jpg,*.png,*.css,*.ico###",
     "###maxFormContent": "最大提交数据限制(M),限制有所上传的内容大小,包括附件.###",
-    "###exposeJest": "暴露jest接口.###"
+    "###exposeJest": "暴露jest接口.###",
+    "###persistentConnectionsEnable": "是否启用长连接,默认false.###"
   },
   "application": {
     "enable": true,
@@ -48,6 +50,7 @@
     "statExclusions": "*.js,*.gif,*.jpg,*.png,*.css,*.ico",
     "maxFormContent": 20.0,
     "exposeJest": true,
+    "persistentConnectionsEnable": true,
     "###enable": "是否启用###",
     "###port": "http/https端口,负责向前端提供数据访问接口.默认为20020端口.###",
     "###sslEnable": "是否启用ssl传输加密,如果启用将使用config/keystore文件作为密钥文件.使用config/token.json文件中的sslKeyStorePassword字段为密钥密码,sslKeyManagerPassword为管理密码.###",
@@ -62,7 +65,8 @@
     "###statEnable": "启用统计,默认启用统计.###",
     "###statExclusions": "统计忽略路径,默认忽略*.js,*.gif,*.jpg,*.png,*.css,*.ico###",
     "###maxFormContent": "最大提交数据限制(M),限制有所上传的内容大小,包括附件.###",
-    "###exposeJest": "暴露jest接口.###"
+    "###exposeJest": "暴露jest接口.###",
+    "###persistentConnectionsEnable": "是否启用长连接,默认false.###"
   },
   "web": {
     "enable": true,
@@ -73,6 +77,7 @@
     "statEnable": false,
     "statExclusions": "*.gif,*.jpg,*.png,*.ico",
     "cacheControlMaxAge": 0.0,
+    "persistentConnectionsEnable": true,
     "###enable": "是否启用###",
     "###port": "http/https端口,用户输入网址后实际访问的第一个端口.http协议默认为80端口,https默认为443端口.###",
     "###sslEnable": "是否启用ssl传输加密,如果启用将使用config/keystore文件作为密钥文件.使用config/token.json文件中的sslKeyStorePassword字段为密钥密码,sslKeyManagerPassword为管理密码.###",
@@ -84,7 +89,8 @@
     "###statExclusions": "统计忽略路径,默认忽略*.gif,*.jpg,*.png,*.ico###",
     "###cacheControlMaxAge": "服务器max-age缓存时间(秒)###",
     "###proxyCenterEnable": "是否启用center服务器代理.###",
-    "###proxyApplicationEnable": "是否启用application服务器代理###"
+    "###proxyApplicationEnable": "是否启用application服务器代理###",
+    "###persistentConnectionsEnable": "是否启用长连接,默认true.###"
   },
   "data": {
     "enable": true,
@@ -108,7 +114,7 @@
     "###excludes": "在此节点上不存储的类,和includes一起设置实际存储的类,可以使用通配符*###",
     "###jmxEnable": "是否启动jmx,如果启用,可以通过本地的jmx客户端进行访问,不支持远程jmx客户端.###",
     "###cacheSize": "H2数据库缓存大小,设置H2用于作为缓存的内存大小,以M作为单位,这里默认为512M.###",
-    "###logLevel": "默认日志级别,FATAL, ERROR, WARN, INFO, TRACE. 完的配置为DefaultLevel\u003dWARN, Tool\u003dTRACE, Enhance\u003dTRACE, METADATA\u003dTRACE, Runtime\u003dTRACE, Query\u003dTRACE, DataCache\u003dTRACE, JDBC\u003dTRACE, SQL\u003dTRACE###",
+    "###logLevel": "默认日志级别,FATAL, ERROR, WARN, INFO, TRACE. 完的配置为DefaultLevel\u003dWARN, Tool\u003dTRACE, Enhance\u003dTRACE, METADATA\u003dTRACE, Runtime\u003dTRACE, Query\u003dTRACE, DataCache\u003dTRACE, JDBC\u003dTRACE, SQL\u003dTRACE###",
     "###maxTotal": "最大使用连接数###",
     "###maxIdle": "最大空闲连接数###",
     "###statEnable": "启用统计,默认启用###",
@@ -135,12 +141,12 @@
   },
   "logLevel": "warn",
   "dumpData": {
-    "enable": true,
+    "enable": false,
     "cron": "",
     "size": 7.0,
     "path": "",
-    "###enable": "是否启用,默认每天凌晨2点进行备份.###",
-    "###cron": "定时任务cron表达式###",
+    "###enable": "是否启用,默认禁用.###",
+    "###cron": "定时任务cron表达式,默认每天凌晨2点进行备份.###",
     "###size": "最大保留份数,超过将自动删除最久的数据.###",
     "###path": "备份路径###"
   },

+ 1 - 1
o2server/configSample/qiyeweixin.json

@@ -17,7 +17,7 @@
   "attendanceSyncAgentId": "",
   "attendanceSyncSecret": "",
   "###enable": "是否启用.###",
-  "###syncCron": "拉入同步cron,默认每10分钟同步一次.###",
+  "###syncCron": "回调信号触发同步检查,默认每10分钟运行一次,如果期间内有企业微信回调信号接收到,那么触发同步任务进行人员同步.###",
   "###forceSyncCron": "强制拉入同步cron,默认在每天的8点和12点强制进行同步.###",
   "###apiAddress": "api服务器地址###",
   "###corpId": "企业微信corpId###",

+ 3 - 0
o2server/configSample/vfs.json

@@ -4,5 +4,8 @@
   },
   "ftps": {
     "passive": true
+  },
+  "sftp": {
+    "passive": true
   }
 }

+ 4 - 0
o2server/configSample/web.json

@@ -0,0 +1,4 @@
+{
+  "mock": {},
+  "###mock": "使用Post模拟Put,Get模拟Delete的模块.###"
+}

+ 1 - 1
o2server/configSample/zhengwuDingding.json

@@ -21,7 +21,7 @@
   "###appId": "政务钉钉appId###",
   "###appSecret": "政务钉钉appSecret###",
   "###agentId": "政务钉钉agentId###",
-  "###syncCron": "拉入同步cron,默认每10分钟同步一次.###",
+  "###syncCron": "回调信号触发同步检查,默认每10分钟运行一次,如果期间内有政务钉钉回调信号接收到,那么触发同步任务进行人员同步.###",
   "###forceSyncCron": "强制拉入同步cron,默认在每天的8点和12点强制进行同步.###",
   "###oapiAddress": "oapi服务器地址###",
   "###corpId": "政务钉钉corpId###",

+ 6 - 0
o2server/pom.xml

@@ -1017,4 +1017,10 @@
 			</snapshots>
 		</repository>
 	</repositories>
+	<distributionManagement>
+		<repository>
+			<id>o2oa-release</id>
+			<url>http://maven.o2oa.net/repository/o2oa-release/</url>
+		</repository>
+	</distributionManagement>
 </project>

+ 6 - 0
o2server/x_attendance_assemble_control/pom.xml

@@ -128,6 +128,12 @@
 					</execution>
 				</executions>
 			</plugin>
+			<plugin>
+				<artifactId>maven-deploy-plugin</artifactId>
+				<configuration>
+					<skip>true</skip>
+				</configuration>
+			</plugin>
 		</plugins>
 	</build>
 </project>

+ 57 - 3
o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java

@@ -10,6 +10,7 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map.Entry;
 import java.util.Objects;
+import java.util.Optional;
 import java.util.stream.Collectors;
 
 import javax.persistence.EntityManager;
@@ -17,7 +18,6 @@ import javax.persistence.Query;
 import javax.persistence.Tuple;
 import javax.persistence.TypedQuery;
 import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaDelete;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
@@ -644,6 +644,61 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		return os.stream().findFirst().orElse(null);
 	}
 
+	public <T extends JpaObject> Optional<T> firstEqualAndLessThanOrEqualTo(Class<T> cls, String attribute,
+			Object value, String otherAttribute, Comparable otherValue) throws Exception {
+		EntityManager em = this.get(cls);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<T> cq = cb.createQuery(cls);
+		Root<T> root = cq.from(cls);
+		cq.select(root)
+				.where(cb.and(cb.equal(root.get(attribute), value),
+						cb.lessThanOrEqualTo(root.get(otherAttribute), otherValue)))
+				.orderBy(cb.desc(root.get(otherAttribute)));
+		List<T> os = em.createQuery(cq).setMaxResults(1).getResultList();
+		return os.stream().findFirst();
+	}
+
+	public <T extends JpaObject> Optional<T> firstEqualAndLessThan(Class<T> cls, String attribute, Object value,
+			String otherAttribute, Comparable otherValue) throws Exception {
+		EntityManager em = this.get(cls);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<T> cq = cb.createQuery(cls);
+		Root<T> root = cq.from(cls);
+		cq.select(root)
+				.where(cb.and(cb.equal(root.get(attribute), value), cb.lessThan(root.get(otherAttribute), otherValue)))
+				.orderBy(cb.desc(root.get(otherAttribute)));
+		List<T> os = em.createQuery(cq).setMaxResults(1).getResultList();
+		return os.stream().findFirst();
+	}
+
+	public <T extends JpaObject> Optional<T> firstEqualAndGreaterThanOrEqualTo(Class<T> cls, String attribute,
+			Object value, String otherAttribute, Comparable otherValue) throws Exception {
+		EntityManager em = this.get(cls);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<T> cq = cb.createQuery(cls);
+		Root<T> root = cq.from(cls);
+		cq.select(root)
+				.where(cb.and(cb.equal(root.get(attribute), value),
+						cb.greaterThanOrEqualTo(root.get(otherAttribute), otherValue)))
+				.orderBy(cb.asc(root.get(otherAttribute)));
+		List<T> os = em.createQuery(cq).setMaxResults(1).getResultList();
+		return os.stream().findFirst();
+	}
+
+	public <T extends JpaObject> Optional<T> firstEqualAndGreaterThan(Class<T> cls, String attribute, Object value,
+			String otherAttribute, Comparable otherValue) throws Exception {
+		EntityManager em = this.get(cls);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<T> cq = cb.createQuery(cls);
+		Root<T> root = cq.from(cls);
+		cq.select(root)
+				.where(cb.and(cb.equal(root.get(attribute), value),
+						cb.greaterThan(root.get(otherAttribute), otherValue)))
+				.orderBy(cb.asc(root.get(otherAttribute)));
+		List<T> os = em.createQuery(cq).setMaxResults(1).getResultList();
+		return os.stream().findFirst();
+	}
+
 	public <T extends JpaObject> Long count(Class<T> cls) throws Exception {
 		EntityManager em = this.get(cls);
 		CriteriaBuilder cb = em.getCriteriaBuilder();
@@ -888,8 +943,7 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		CriteriaQuery<String> cq = cb.createQuery(String.class);
 		Root<T> root = cq.from(cls);
 		cq.select(root.get(JpaObject.id_FIELDNAME)).where(cb.isMember(root.get(attribute), cb.literal(values)));
-		return new ArrayList<>(
-				em.createQuery(cq).getResultList().stream().distinct().collect(Collectors.toList()));
+		return new ArrayList<>(em.createQuery(cq).getResultList().stream().distinct().collect(Collectors.toList()));
 	}
 
 	public <T extends JpaObject, W extends Object> List<String> idsNotIn(Class<T> cls, String attribute,

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

@@ -172,7 +172,7 @@ public class PersistenceXmlHelper {
 					mapped_element.addText(o.getName());
 				}
 			}
-			if(dynamicFlag) {
+			if (dynamicFlag) {
 				for (String className : names) {
 					if (className.startsWith(DynamicEntity.CLASS_PACKAGE)) {
 						dyClasses.add(className);
@@ -192,7 +192,7 @@ public class PersistenceXmlHelper {
 						mapped_element.addText(dyClass);
 					}
 					for (Class<?> o : JpaObjectTools.scanMappedSuperclass(DynamicBaseEntity.class)) {
-						if(!o.getName().equals(DynamicBaseEntity.class.getName())) {
+						if (!o.getName().equals(DynamicBaseEntity.class.getName())) {
 							Element mapped_element = unit.addElement("class");
 							mapped_element.addText(o.getName());
 						}
@@ -296,6 +296,9 @@ public class PersistenceXmlHelper {
 		if (Config.externalDataSources().hasSchema()) {
 			properties.put("openjpa.jdbc.Schema", JpaObject.default_schema);
 		}
+		if (StringUtils.isNotEmpty(Config.externalDataSources().getTransactionIsolation())) {
+			properties.put("openjpa.jdbc.TransactionIsolation", Config.externalDataSources().getTransactionIsolation());
+		}
 		for (String name : Config.externalDataSources().findNamesOfContainerEntity(className)) {
 			properties.put("openjpa.ConnectionFactoryName", Config.RESOURCE_JDBC_PREFIX + name);
 			properties.put("openjpa.Log", Config.externalDataSources().log(name));

+ 10 - 2
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/JpaObject.java

@@ -20,6 +20,7 @@ import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.reflect.FieldUtils;
 import org.apache.openjpa.persistence.jdbc.ContainerTable;
+import org.apache.openjpa.persistence.jdbc.Strategy;
 
 import com.x.base.core.entity.annotation.Flag;
 import com.x.base.core.entity.annotation.RestrictFlag;
@@ -309,8 +310,15 @@ public abstract class JpaObject extends GsonPropertyObject implements Serializab
 				if (BooleanUtils.isTrue(excludeInvisible) && FieldsInvisible.contains(field.getName())) {
 					continue;
 				}
-				if (BooleanUtils.isTrue(excludeLob) && (null != field.getAnnotation(Lob.class))) {
-					continue;
+				if (BooleanUtils.isTrue(excludeLob)) {
+					if (null != field.getAnnotation(Lob.class)) {
+						continue;
+					} else {
+						Strategy strategy = field.getAnnotation(Strategy.class);
+						if ((null != strategy) && StringUtils.equals(JsonPropertiesValueHandler, strategy.value())) {
+							continue;
+						}
+					}
 				}
 				names.add(field.getName());
 			}

+ 21 - 67
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/StorageObject.java

@@ -117,14 +117,6 @@ public abstract class StorageObject extends SliceJpaObject {
 		return this.updateContent(mapping, input);
 	}
 
-	// /** 更新Content内容 */
-	// public Long updateContent(StorageMapping mapping, byte[] bytes) throws
-	// Exception {
-	// try (ByteArrayInputStream bais = new ByteArrayInputStream(bytes)) {
-	// return updateContent(mapping, bais);
-	// }
-	// }
-
 	/** 更新Content内容 */
 	public Long updateContent(StorageMapping mapping, byte[] bytes, String name) throws Exception {
 		try (ByteArrayInputStream bais = new ByteArrayInputStream(bytes)) {
@@ -148,64 +140,6 @@ public abstract class StorageObject extends SliceJpaObject {
 	/** 更新Content内容 */
 	public Long updateContent(StorageMapping mapping, InputStream input) throws Exception {
 		return updateContent(mapping, IOUtils.toByteArray(input));
-		// long length = -1L;
-		// FileSystemManager manager = this.getFileSystemManager();
-		// String prefix = this.getPrefix(mapping);
-		// String path = this.path();
-		// if (StringUtils.isEmpty(path)) {
-		// throw new Exception("path can not be empty.");
-		// }
-		// FileSystemOptions options = this.getOptions(mapping);
-		// try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
-		// /* 由于可以在传输过程中取消传输,先拷贝到内存 */
-		// IOUtils.copyLarge(input, baos);
-		// FileObject fo = null;
-		// OutputStream output = null;
-		// try {
-		// /*
-		// * 需要进行两次判断,在前端使用nginx分发的情况下,可能同时触发多个文件的上传,多个文件同时上传可能会同时创建文件的存储目录,会在后台导致错误
-		// * org.apache.commons.vfs2.FileSystemException: Could not create folder
-		// *
-		// "ftp://processPlatform:***@o2.server01.com:20040/20200601/1beb018a-5009-4baa-a9ef-7e903f9d48ef".
-		// * 这种情况下再次发起请求尝试获取文件可以解决这个问题.
-		// */
-		// try {
-		// fo = manager.resolveFile(prefix + PATHSEPARATOR + path, options);
-		// output = fo.getContent().getOutputStream();
-		// } catch (FileSystemException fse) {
-		// // 此段代码全部关闭对象,并要进行webdav判断进行关闭。
-		// if (null != output) {
-		// output.close();
-		// }
-		// if (null != fo) {
-		// if (!Objects.equals(StorageProtocol.webdav, mapping.getProtocol())) {
-		// /* webdav关闭会试图去关闭commons.httpClient */
-		// manager.closeFileSystem(fo.getFileSystem());
-		// }
-		// fo.close();
-		// }
-		// fo = manager.resolveFile(prefix + PATHSEPARATOR + path, options);
-		// output = fo.getContent().getOutputStream();
-		// }
-		// length = IOUtils.copyLarge(new ByteArrayInputStream(baos.toByteArray()),
-		// output);
-		// this.setLength(length);
-		// if (!Objects.equals(StorageProtocol.webdav, mapping.getProtocol())) {
-		// /* webdav关闭会试图去关闭commons.httpClient */
-		// manager.closeFileSystem(fo.getFileSystem());
-		// }
-		// } finally {
-		// if (null != output) {
-		// output.close();
-		// }
-		// if (null != fo) {
-		// fo.close();
-		// }
-		// }
-		// }
-		// this.setStorage(mapping.getName());
-		// this.setLastUpdateTime(new Date());
-		// return length;
 	}
 
 	/** 更新Content内容 */
@@ -229,7 +163,8 @@ public abstract class StorageObject extends SliceJpaObject {
 					OutputStream output = fo.getContent().getOutputStream()) {
 				length = IOUtils.copyLarge(new ByteArrayInputStream(bytes), output);
 				this.setLength(length);
-				if (!Objects.equals(StorageProtocol.webdav, mapping.getProtocol())) {
+				if ((!Objects.equals(StorageProtocol.webdav, mapping.getProtocol()))
+						&& (!Objects.equals(StorageProtocol.sftp, mapping.getProtocol()))) {
 					/* webdav关闭会试图去关闭commons.httpClient */
 					manager.closeFileSystem(fo.getFileSystem());
 				}
@@ -339,6 +274,12 @@ public abstract class StorageObject extends SliceJpaObject {
 					+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
 					+ mapping.getPort();
 			break;
+		case sftp:
+			// ftps://[ username[: password]@] hostname[: port][ relative-path]
+			prefix = "sftp://" + URLEncoder.encode(mapping.getUsername(), DefaultCharset.name) + ":"
+					+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
+					+ mapping.getPort();
+			break;
 		case cifs:
 			// smb://[ username[: password]@] hostname[: port][ absolute-path]
 			prefix = "smb://" + URLEncoder.encode(mapping.getUsername(), DefaultCharset.name) + ":"
@@ -369,6 +310,19 @@ public abstract class StorageObject extends SliceJpaObject {
 		switch (mapping.getProtocol()) {
 		// bzip2,file, ftp, ftps, gzip, hdfs, http, https, jar, ram, res, sftp,
 		// tar, temp, webdav, zip, cifs, mime;
+		case sftp:
+			FtpFileSystemConfigBuilder sftpBuilder = FtpFileSystemConfigBuilder.getInstance();
+			sftpBuilder.setPassiveMode(opts, Config.vfs().getSftp().getPassive());
+			/** 强制不校验IP */
+			sftpBuilder.setRemoteVerification(opts, false);
+			sftpBuilder.setFileType(opts, FtpFileType.BINARY);
+			sftpBuilder.setConnectTimeout(opts, 10000);
+			sftpBuilder.setSoTimeout(opts, 10000);
+			sftpBuilder.setControlEncoding(opts, DefaultCharset.name);
+			// By default, the path is relative to the user's home directory. This can be
+			// changed with:
+			sftpBuilder.setUserDirIsRoot(opts, false);
+			break;
 		case ftp:
 			FtpFileSystemConfigBuilder ftpBuilder = FtpFileSystemConfigBuilder.getInstance();
 			/*

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

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

+ 15 - 15
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dynamic/DynamicEntityBuilder.java

@@ -16,7 +16,6 @@ import javax.persistence.OrderColumn;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.openjpa.persistence.PersistentCollection;
 import org.apache.openjpa.persistence.PersistentMap;
 import org.apache.openjpa.persistence.jdbc.ContainerTable;
@@ -42,6 +41,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
 import com.x.base.core.entity.dynamic.DynamicEntity.Field;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.ListTools;
+import com.x.base.core.project.tools.StringTools;
 
 public class DynamicEntityBuilder {
 
@@ -196,10 +196,10 @@ public class DynamicEntityBuilder {
 		FieldSpec fieldSpec = FieldSpec.builder(typeClass, field.getName(), Modifier.PRIVATE)
 				.addAnnotation(this.fieldDescribe(field)).addAnnotation(this.index(field))
 				.addAnnotation(this.checkPersist(field)).addAnnotation(column).build();
-		MethodSpec get = MethodSpec.methodBuilder("get" + StringUtils.capitalize(field.getName()))
+		MethodSpec get = MethodSpec.methodBuilder(StringTools.getMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(typeClass).addStatement("return this." + field.getName())
 				.build();
-		MethodSpec set = MethodSpec.methodBuilder("set" + StringUtils.capitalize(field.getName()))
+		MethodSpec set = MethodSpec.methodBuilder(StringTools.setMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(void.class).addParameter(typeClass, field.getName())
 				.addStatement("this." + field.getName() + " = " + field.getName()).build();
 		builder.addField(this.fieldName(field)).addField(fieldSpec).addMethod(get).addMethod(set);
@@ -222,10 +222,10 @@ public class DynamicEntityBuilder {
 		FieldSpec fieldSpec = FieldSpec.builder(Date.class, field.getName(), Modifier.PRIVATE)
 				.addAnnotation(this.fieldDescribe(field)).addAnnotation(this.index(field))
 				.addAnnotation(this.checkPersist(field)).addAnnotation(column).addAnnotation(temporal).build();
-		MethodSpec get = MethodSpec.methodBuilder("get" + StringUtils.capitalize(field.getName()))
+		MethodSpec get = MethodSpec.methodBuilder(StringTools.getMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(Date.class).addStatement("return this." + field.getName())
 				.build();
-		MethodSpec set = MethodSpec.methodBuilder("set" + StringUtils.capitalize(field.getName()))
+		MethodSpec set = MethodSpec.methodBuilder(StringTools.setMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(void.class).addParameter(Date.class, field.getName())
 				.addStatement("this." + field.getName() + " = " + field.getName()).build();
 		builder.addField(this.fieldName(field)).addField(fieldSpec).addMethod(get).addMethod(set);
@@ -249,10 +249,10 @@ public class DynamicEntityBuilder {
 		FieldSpec fieldSpec = FieldSpec.builder(Date.class, field.getName(), Modifier.PRIVATE)
 				.addAnnotation(this.fieldDescribe(field)).addAnnotation(this.index(field))
 				.addAnnotation(this.checkPersist(field)).addAnnotation(column).addAnnotation(temporal).build();
-		MethodSpec get = MethodSpec.methodBuilder("get" + StringUtils.capitalize(field.getName()))
+		MethodSpec get = MethodSpec.methodBuilder(StringTools.getMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(Date.class).addStatement("return this." + field.getName())
 				.build();
-		MethodSpec set = MethodSpec.methodBuilder("set" + StringUtils.capitalize(field.getName()))
+		MethodSpec set = MethodSpec.methodBuilder(StringTools.setMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(void.class).addParameter(Date.class, field.getName())
 				.addStatement("this." + field.getName() + " = " + field.getName()).build();
 		builder.addField(this.fieldName(field)).addField(fieldSpec).addMethod(get).addMethod(set);
@@ -276,10 +276,10 @@ public class DynamicEntityBuilder {
 		FieldSpec fieldSpec = FieldSpec.builder(Date.class, field.getName(), Modifier.PRIVATE)
 				.addAnnotation(this.fieldDescribe(field)).addAnnotation(this.index(field))
 				.addAnnotation(this.checkPersist(field)).addAnnotation(column).addAnnotation(temporal).build();
-		MethodSpec get = MethodSpec.methodBuilder("get" + StringUtils.capitalize(field.getName()))
+		MethodSpec get = MethodSpec.methodBuilder(StringTools.getMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(Date.class).addStatement("return this." + field.getName())
 				.build();
-		MethodSpec set = MethodSpec.methodBuilder("set" + StringUtils.capitalize(field.getName()))
+		MethodSpec set = MethodSpec.methodBuilder(StringTools.setMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(void.class).addParameter(Date.class, field.getName())
 				.addStatement("this." + field.getName() + " = " + field.getName()).build();
 		builder.addField(this.fieldName(field)).addField(fieldSpec).addMethod(get).addMethod(set);
@@ -365,10 +365,10 @@ public class DynamicEntityBuilder {
 		FieldSpec fieldSpec = FieldSpec.builder(list_type, field.getName(), Modifier.PRIVATE)
 				.addAnnotation(this.fieldDescribe(field)).addAnnotation(containerTable).addAnnotation(elementIndex)
 				.addAnnotation(persistentCollection).addAnnotation(orderColumn).addAnnotation(elementColumn).build();
-		MethodSpec get = MethodSpec.methodBuilder("get" + StringUtils.capitalize(field.getName()))
+		MethodSpec get = MethodSpec.methodBuilder(StringTools.getMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(list_type).addStatement("return this." + field.getName())
 				.build();
-		MethodSpec set = MethodSpec.methodBuilder("set" + StringUtils.capitalize(field.getName()))
+		MethodSpec set = MethodSpec.methodBuilder(StringTools.setMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(void.class).addParameter(list_type, field.getName())
 				.addStatement("this." + field.getName() + " = " + field.getName()).build();
 		builder.addField(this.fieldName(field)).addField(fieldSpec).addMethod(get).addMethod(set);
@@ -401,10 +401,10 @@ public class DynamicEntityBuilder {
 		FieldSpec fieldSpec = FieldSpec.builder(String.class, field.getName(), Modifier.PRIVATE)
 				.addAnnotation(this.fieldDescribe(field)).addAnnotation(lob).addAnnotation(basic).addAnnotation(column)
 				.build();
-		MethodSpec get = MethodSpec.methodBuilder("get" + StringUtils.capitalize(field.getName()))
+		MethodSpec get = MethodSpec.methodBuilder(StringTools.getMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(String.class).addStatement("return this." + field.getName())
 				.build();
-		MethodSpec set = MethodSpec.methodBuilder("set" + StringUtils.capitalize(field.getName()))
+		MethodSpec set = MethodSpec.methodBuilder(StringTools.setMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(void.class).addParameter(String.class, field.getName())
 				.addStatement("this." + field.getName() + " = " + field.getName()).build();
 		builder.addField(this.fieldName(field)).addField(fieldSpec).addMethod(get).addMethod(set);
@@ -467,9 +467,9 @@ public class DynamicEntityBuilder {
 				.addAnnotation(keyColumn).addAnnotation(elementColumn).addAnnotation(elementIndex)
 				.addAnnotation(keyIndex).build();
 
-		MethodSpec get = MethodSpec.methodBuilder("get" + StringUtils.capitalize(field.getName()))
+		MethodSpec get = MethodSpec.methodBuilder(StringTools.getMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(map_type).addStatement("return this." + field.getName()).build();
-		MethodSpec set = MethodSpec.methodBuilder("set" + StringUtils.capitalize(field.getName()))
+		MethodSpec set = MethodSpec.methodBuilder(StringTools.setMethodName(field.getName()))
 				.addModifiers(Modifier.PUBLIC).returns(void.class).addParameter(map_type, field.getName())
 				.addStatement("this." + field.getName() + " = " + field.getName()).build();
 		builder.addField(this.fieldName(field)).addField(fieldSpec).addMethod(get).addMethod(set);

+ 1 - 1
o2server/x_base_core_project/src/main/java/com/x/base/core/openjpa/jdbc/sql/Kingbase8Dictionary.java

@@ -27,7 +27,7 @@ public class Kingbase8Dictionary extends DBDictionary {
 	public String namedSequenceFromOneSchemaSQL = "select SYS_NAMESPACE.NSPNAME as SEQUENCE_SCHEMA, SYS_CLASS.RELNAME as SEQUENCE_NAME from SYS_NAMESPACE,SYS_CLASS where  SYS_NAMESPACE.OID=SYS_CLASS.RELNAMESPACE and SYS_CLASS.RELKIND='S' AND SYS_CLASS.RELNAME = ? AND SYS_NAMESPACE.NSPNAME = ?";
 
 	public Kingbase8Dictionary() {
-		this.platform = "KingbaseES";
+		this.platform = "KingbaseES8";
 		this.validationSQL = "SELECT NOW()";
 		this.supportsSelectStartIndex = true;
 		this.supportsSelectEndIndex = true;

+ 0 - 64
o2server/x_base_core_project/src/main/java/com/x/base/core/openjpa/jdbc/sql/Kingbase8DictionaryBack.java

@@ -1,64 +0,0 @@
-package com.x.base.core.openjpa.jdbc.sql;
-
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-import org.apache.openjpa.jdbc.schema.Column;
-import org.apache.openjpa.jdbc.sql.BooleanRepresentation;
-import org.apache.openjpa.jdbc.sql.BooleanRepresentationFactory;
-import org.apache.openjpa.jdbc.sql.DBDictionary;
-import org.apache.openjpa.lib.util.Localizer;
-
-public class Kingbase8DictionaryBack extends DBDictionary {
-
-	public static final String VENDOR_DAMENG = "Kingbase8";
-	private static final Localizer _loc = Localizer.forPackage(DMDictionary.class);
-
-	public Kingbase8DictionaryBack() {
-		this.platform = "Kingbase8";
-		supportsDeferredConstraints = false;
-	}
-
-	public void connectedConfiguration(Connection conn) throws SQLException {
-		super.connectedConfiguration(conn);
-		boolean requiresWarnings = true;
-		DatabaseMetaData meta = conn.getMetaData();
-		String driverName = meta.getDriverName();
-		String url = meta.getURL();
-		if (this.driverVendor == null) {
-			if ((driverName != null) && (driverName.equalsIgnoreCase("com.kingbase8.Driver"))) {
-				this.driverVendor = "Kingbase8JdbcDriver";
-				if ((url != null) && (url.startsWith("jdbc:kingbase8://"))) {
-					requiresWarnings = false;
-				}
-			} else {
-				this.driverVendor = "other";
-			}
-		}
-		if (("Kingbase8JdbcDriver".equalsIgnoreCase(this.driverVendor)) && (requiresWarnings)) {
-			this.log.warn(_loc.get("kingbase8 Jdbc connection", url));
-		}
-	}
-
-	protected BooleanRepresentation booleanRepresentation = BooleanRepresentationFactory.BOOLEAN;
-
-	/**
-	 * Convert the specified column of the SQL ResultSet to the proper java type.
-	 */
-	public boolean getBoolean(ResultSet rs, int column) throws SQLException {
-		return booleanRepresentation.getBoolean(rs, column);
-	}
-
-	/**
-	 * Set the given value as a parameter to the statement.
-	 */
-	public void setBoolean(PreparedStatement stmnt, int idx, boolean val, Column col) throws SQLException {
-		booleanRepresentation.setBoolean(stmnt, idx, val);
-	}
-
-	public String booleanTypeName = "BOOL";
-
-}

+ 254 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/openjpa/jdbc/sql/Kingbase8R6Dictionary.java

@@ -0,0 +1,254 @@
+package com.x.base.core.openjpa.jdbc.sql;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+
+import org.apache.openjpa.jdbc.kernel.exps.FilterValue;
+import org.apache.openjpa.jdbc.schema.Column;
+import org.apache.openjpa.jdbc.schema.Sequence;
+import org.apache.openjpa.jdbc.schema.Table;
+import org.apache.openjpa.jdbc.sql.BooleanRepresentation;
+import org.apache.openjpa.jdbc.sql.BooleanRepresentationFactory;
+import org.apache.openjpa.jdbc.sql.DBDictionary;
+import org.apache.openjpa.jdbc.sql.SQLBuffer;
+import org.apache.openjpa.lib.jdbc.DelegatingConnection;
+import org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement;
+
+public class Kingbase8R6Dictionary extends DBDictionary {
+	public String allSequencesSQL = "select SYS_NAMESPACE.NSPNAME as SEQUENCE_SCHEMA, SYS_CLASS.RELNAME as SEQUENCE_NAME from SYS_NAMESPACE,SYS_CLASS where SYS_NAMESPACE.OID=SYS_CLASS.RELNAMESPACE and SYS_CLASS.RELKIND='S'";
+	public String namedSequencesFromAllSchemasSQL = "select SYS_NAMESPACE.NSPNAME as SEQUENCE_SCHEMA, SYS_CLASS.RELNAME as SEQUENCE_NAME from SYS_NAMESPACE,SYS_CLASS where  SYS_NAMESPACE.OID=SYS_CLASS.RELNAMESPACE and SYS_CLASS.RELKIND='S' AND SYS_CLASS.RELNAME = ?";
+	public String allSequencesFromOneSchemaSQL = "select SYS_NAMESPACE.NSPNAME as SEQUENCE_SCHEMA, SYS_CLASS.RELNAME as SEQUENCE_NAME from SYS_NAMESPACE,SYS_CLASS where SYS_NAMESPACE.OID=SYS_CLASS.RELNAMESPACE and SYS_CLASS.RELKIND='S' AND SYS_NAMESPACE.NSPNAME = ?";
+	public String namedSequenceFromOneSchemaSQL = "select SYS_NAMESPACE.NSPNAME as SEQUENCE_SCHEMA, SYS_CLASS.RELNAME as SEQUENCE_NAME from SYS_NAMESPACE,SYS_CLASS where  SYS_NAMESPACE.OID=SYS_CLASS.RELNAMESPACE and SYS_CLASS.RELKIND='S' AND SYS_CLASS.RELNAME = ? AND SYS_NAMESPACE.NSPNAME = ?";
+
+	public Kingbase8R6Dictionary() {
+		this.platform = "KingbaseES8R6";
+		// 适配 V8R6
+		this.schemaCase = SCHEMA_CASE_LOWER;
+		// 适配 V8R6
+		this.doubleTypeName = "DOUBLE PRECISION";
+		this.validationSQL = "SELECT NOW()";
+		this.supportsSelectStartIndex = true;
+		this.supportsSelectEndIndex = true;
+		this.supportsLockingWithDistinctClause = false;
+		this.maxTableNameLength = 63;
+		this.maxColumnNameLength = 63;
+		this.maxIndexNameLength = 63;
+		this.maxConstraintNameLength = 63;
+		this.maxAutoAssignNameLength = 63;
+		this.lastGeneratedKeyQuery = "SELECT CURRVAL(''{2}'')";
+		this.supportsAutoAssign = true;
+		this.autoAssignTypeName = "INT IDENTITY";
+		this.nextSequenceQuery = "SELECT NEXTVAL(''{0}'')";
+		this.binaryTypeName = "BYTEA";
+		this.longVarbinaryTypeName = "BYTEA";
+		this.varbinaryTypeName = "BYTEA";
+		this.longVarcharTypeName = "TEXT";
+		this.charTypeName = "CHAR{0}";
+		this.varcharTypeName = "VARCHAR{0}";
+		/* add by Ray */
+		this.bitTypeName = "BOOL";
+		this.systemSchemaSet.addAll(Arrays.asList(new String[] { "INFORMATION_SCHEMA", "SYS_CATALOG" }));
+		this.fixedSizeTypeNameSet.addAll(Arrays.asList(new String[] { "TEXT", "XML", "INTERVAL YEAR", "INTERVAL MONTH",
+				"INTERVAL DAY", "INTERVAL HOUR", "INTERVAL MINUTE", "INTERVAL SECOND", " INTERVAL YEAR TO MONTH",
+				"INTERVAL DAY TO SECOND", "BIT VARYING", "BYTEA", "BOOLEAN" }));
+		this.reservedWordSet.addAll(Arrays.asList(new String[] { "ABORT", "ABSOLUTE", "ACCESS", "ACTION", "ADD",
+				"ADMIN", "AFTER", "AGGREGATE", "ALL", "ALSO", "ALTER", "ANALYSE", "ANALYZE", "AND", "ANY", "ARRAY",
+				"AS", "ASC", "ASSERTION", "ASSIGNMENT", "ASYMMETRIC", "AT", "AUTHID", "AUTHORIZATION", "BACKWARD",
+				"BEFORE", "BEGIN", "BETWEEN", "BIGINT", "BINARY", "BIT", "BODY", "BOOLEAN", "BOTH", "BY", "CACHE",
+				"CALL", "CALLED", "CASCADE", "CASCADED", "CASE", "CAST", "CHAIN", "CHAR", "CHARACTER",
+				"CHARACTERISTICS", "CHECK", "CHECKALLOCATE", "CHECKCATALOG", "CHECKDB", "CHECKINDEX", "CHECKPOINT",
+				"CHECKTABLE", "CHECKTABLESPACE", "CLASS", "CLOSE", "CLUSTER", "COALESCE", "COLLATE", "COLUMN",
+				"COMMENT", "COMMIT", "COMMITTED", "CONCURRENTLY", "CONNECTION", "CONSTANT", "CONSTRAINT", "CONSTRAINTS",
+				"CONVERSION", "CONVERT", "COPY", "CREATE", "CREATEDB", "CREATEROLE", "CREATEUSER", "CROSS", "CSV",
+				"CURRENT_DATE", "CURRENT_ROLE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "CURSOR", "CYCLE",
+				"DATABASE", "DATAFILE", "DATEADD", "DATEDIFF", "DATEPART", "DAY", "DBCC", "DEALLOCATE", "DEC",
+				"DECIMAL", "DECLARE", "DEFAULT", "DEFAULTS", "DEFERRABLE", "DEFERRED", "DEFINER", "DELETE", "DELIMITER",
+				"DELIMITERS", "DESC", "DISABLE", "DISTINCT", "DO", "DOMAIN", "DOUBLE", "DROP", "EACH", "ELSE", "ENABLE",
+				"ENCODING", "ENCRYPTED", "END", "ESCAPE", "EXCEPT", "EXCLUDING", "EXCLUSIVE", "EXECUTE", "EXISTS",
+				"EXPLAIN", "EXTERNAL", "EXTERNALLY", "EXTRACT", "FALSE", "FETCH", "FILEGROWTH", "FILENAME", "FIRST",
+				"FLOAT", "FOR", "FORCE", "FOREIGN", "FORWARD", "FREEZE", "FROM", "FULL", "FUNCTION", "GETDATE",
+				"GLOBAL", "GRANT", "GRANTED", "GREATEST", "GROUP", "HANDLER", "HAVING", "HOLD", "HOUR", "IDENTIFIED",
+				"IDENTITY", "IF", "IFNULL", "ILIKE", "IMMEDIATE", "IMMUTABLE", "IMPLICIT", "IN", "INCLUDING",
+				"INCREMENT", "INDEX", "INDEXES", "INHERIT", "INHERITS", "INITIALLY", "INNER", "INOUT", "INPUT",
+				"INSENSITIVE", "INSERT", "INSTEAD", "INT", "INTEGER", "INTERNAL", "INTERSECT", "INTERVAL", "INTO",
+				"INVOKER", "IS", "ISNULL", "ISOLATION", "JOIN", "KEY", "LANCOMPILER", "LANGUAGE", "LARGE", "LAST",
+				"LEADING", "LEAST", "LEFT", "LEVEL", "LIKE", "LIMIT", "LINK", "LIST", "LISTEN", "LOAD", "LOCAL",
+				"LOCALTIME", "LOCALTIMESTAMP", "LOCATION", "LOCK", "LOGFILE", "LOGIN", "MATCH", "MAXSIZE", "MAXVALUE",
+				"MINUTE", "MINVALUE", "MODE", "MODIFY", "MONTH", "MOVE", "NAME", "NAMES", "NATIONAL", "NATURAL",
+				"NCHAR", "NEW", "NEXT", "NO", "NOALLOCATE", "NOCONSTRAINT", "NOCREATEDB", "NOCREATEROLE",
+				"NOCREATEUSER", "NOINDEX", "NOINHERIT", "NOLOGIN", "NONE", "NOSUPERUSER", "NOT", "NOTHING", "NOTIFY",
+				"NOTNULL", "NOWAIT", "NULL", "NULLIF", "NUMERIC", "OBJECT", "OF", "OFF", "OFFSET", "OIDS", "OLD", "ON",
+				"ONLY", "OPERATOR", "OPTION", "OR", "ORDER", "OUT", "OUTER", "OVERLAPS", "OVERLAY", "OWNED", "OWNER",
+				"PACKAGE", "PARTIAL", "PASSWORD", "PERCENT", "PLACING", "POSITION", "PRECISION", "PREPARE", "PREPARED",
+				"PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURAL", "PROCEDURE", "QUOTE", "READ", "REAL",
+				"REASSIGN", "RECHECK", "REFERENCES", "REINDEX", "RELATIVE", "RELEASE", "REMOVE", "RENAME", "REPEATABLE",
+				"REPLACE", "RESET", "RESIZE", "RESTART", "RESTRICT", "RETURNING", "RETURNS", "REVOKE", "RIGHT", "ROLE",
+				"ROLLBACK", "ROW", "ROWNUM", "ROWS", "ROWTYPE", "RULE", "SAVEPOINT", "SCHEMA", "SCROLL", "SECOND",
+				"SECURITY", "SELECT", "SEQUENCE", "SERIALIZABLE", "SESSION", "SESSION_USER", "SET", "SETOF", "SHARE",
+				"SHOW", "SIMILAR", "SIMPLE", "SIZE", "SMALLINT", "SOME", "STABLE", "START", "STATEMENT", "STATISTICS",
+				"STDIN", "STDOUT", "STORAGE", "STRICT", "SUBSTRING", "SUPERUSER", "SWITCH", "SYMMETRIC", "SYSDATE",
+				"SYSID", "SYSTEM", "TABLE", "TABLESPACE", "TEMP", "TEMPFILE", "TEMPLATE", "TEMPORARY", "THEN", "TIME",
+				"TIMESTAMP", "TIMESTAMPADD", "TIMESTAMPDIFF", "TINYINT", "TO", "TOP", "TRAILING", "TRANSACTION",
+				"TREAT", "TRIGGER", "TRIM", "TRUE", "TRUNCATE", "TRUSTED", "TYPE", "UNCOMMITTED", "UNENCRYPTED",
+				"UNION", "UNIQUE", "UNKNOWN", "UNLISTEN", "UNTIL", "UPDATE", "USAGE", "USER", "USING", "VACUUM",
+				"VALID", "VALIDATOR", "VALUES", "VARCHAR", "VARCHAR2", "VARYING", "VERBOSE", "VIEW", "VOLATILE", "WHEN",
+				"WHERE", "WITH", "WITHOUT", "WORK", "WRITE", "YEAR", "ZONE", "BLOB", "BYTEA", "CLOB", "DATE", "TEXT",
+				"TIMESTAMPTZ", "TIMETZ", "RETURN", "ROWCOUNT", "CMAX", "CMIN", "CTID", "OID", "TABLEOID", "XMAX",
+				"XMIN" }));
+	}
+
+	public Date getDate(ResultSet paramResultSet, int paramInt) throws SQLException {
+		try {
+			return super.getDate(paramResultSet, paramInt);
+		} catch (StringIndexOutOfBoundsException localStringIndexOutOfBoundsException) {
+			String str = paramResultSet.getString(paramInt);
+			SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SS");
+			try {
+				return localSimpleDateFormat.parse(str);
+			} catch (ParseException localParseException) {
+				throw new SQLException(localParseException.toString());
+			}
+		}
+	}
+
+	/* add by Ray */
+	protected BooleanRepresentation booleanRepresentation = BooleanRepresentationFactory.BOOLEAN;
+
+	/**
+	 * Convert the specified column of the SQL ResultSet to the proper java type.
+	 */
+	public boolean getBoolean(ResultSet rs, int column) throws SQLException {
+		return booleanRepresentation.getBoolean(rs, column);
+	}
+
+	/**
+	 * Set the given value as a parameter to the statement.
+	 */
+	public void setBoolean(PreparedStatement stmnt, int idx, boolean val, Column col) throws SQLException {
+		booleanRepresentation.setBoolean(stmnt, idx, val);
+	}
+
+//	public void setBoolean(PreparedStatement paramPreparedStatement, int paramInt, boolean paramBoolean,
+//			Column paramColumn) throws SQLException {
+//		paramPreparedStatement.setBoolean(paramInt, paramBoolean);
+//	}
+
+	/* add by Ray end */
+
+	protected void appendSelectRange(SQLBuffer paramSQLBuffer, long paramLong1, long paramLong2, boolean paramBoolean) {
+		if (paramLong2 != Long.MAX_VALUE) {
+			paramSQLBuffer.append(" LIMIT ").appendValue(paramLong2 - paramLong1);
+		}
+		if (paramLong1 != 0L) {
+			paramSQLBuffer.append(" OFFSET ").appendValue(paramLong1);
+		}
+	}
+
+	public void indexOf(SQLBuffer paramSQLBuffer, FilterValue paramFilterValue1, FilterValue paramFilterValue2,
+			FilterValue paramFilterValue3) {
+		paramSQLBuffer.append("(POSITION(");
+		paramFilterValue2.appendTo(paramSQLBuffer);
+		paramSQLBuffer.append(" IN ");
+		if (paramFilterValue3 != null) {
+			substring(paramSQLBuffer, paramFilterValue1, paramFilterValue3, null);
+		} else {
+			paramFilterValue1.appendTo(paramSQLBuffer);
+		}
+		paramSQLBuffer.append(") - 1");
+		if (paramFilterValue3 != null) {
+			paramSQLBuffer.append(" + ");
+			paramFilterValue3.appendTo(paramSQLBuffer);
+		}
+		paramSQLBuffer.append(")");
+	}
+
+	public String[] getCreateSequenceSQL(Sequence paramSequence) {
+		String[] arrayOfString = super.getCreateSequenceSQL(paramSequence);
+		if (paramSequence.getAllocate() > 1) {
+			int tmp23_22 = 0;
+			String[] tmp23_21 = arrayOfString;
+			tmp23_21[tmp23_22] = (tmp23_21[tmp23_22] + " CACHE " + paramSequence.getAllocate());
+		}
+		return arrayOfString;
+	}
+
+	protected String getSequencesSQL(String paramString1, String paramString2) {
+		if ((paramString1 == null) && (paramString2 == null)) {
+			return this.allSequencesSQL;
+		}
+		if (paramString1 == null) {
+			return this.namedSequencesFromAllSchemasSQL;
+		}
+		if (paramString2 == null) {
+			return this.allSequencesFromOneSchemaSQL;
+		}
+		return this.namedSequenceFromOneSchemaSQL;
+	}
+
+	public boolean isSystemSequence(String paramString1, String paramString2, boolean paramBoolean) {
+		if (super.isSystemSequence(paramString1, paramString2, paramBoolean)) {
+			return true;
+		}
+		int i = paramString1.indexOf('_');
+		return (i != -1) && (i != paramString1.length() - 4) && (paramString1.toUpperCase().endsWith("_SEQ"));
+	}
+
+	public boolean isSystemTable(String paramString1, String paramString2, boolean paramBoolean) {
+		return (super.isSystemTable(paramString1, paramString2, paramBoolean))
+				|| ((paramString1 != null) && (paramString1.toLowerCase().startsWith("sys_")));
+	}
+
+	public boolean isSystemIndex(String paramString, Table paramTable) {
+		return (super.isSystemIndex(paramString, paramTable))
+				|| ((paramString != null) && (paramString.toLowerCase().startsWith("sys_")));
+	}
+
+	public Connection decorate(Connection paramConnection) throws SQLException {
+		return new KingbaseConnection(super.decorate(paramConnection), this);
+	}
+
+	private static class KingbasePreparedStatement extends DelegatingPreparedStatement {
+		public KingbasePreparedStatement(PreparedStatement paramPreparedStatement, Connection paramConnection,
+				Kingbase8R6Dictionary paramKingbaseDictionary) {
+			super(paramPreparedStatement, paramConnection);
+		}
+
+		protected ResultSet executeQuery(boolean paramBoolean) throws SQLException {
+			try {
+				return super.executeQuery(paramBoolean);
+			} catch (SQLException localSQLException) {
+				ResultSet localResultSet = getResultSet(paramBoolean);
+				if (localResultSet == null) {
+					throw localSQLException;
+				}
+				return localResultSet;
+			}
+		}
+	}
+
+	private static class KingbaseConnection extends DelegatingConnection {
+		private final Kingbase8R6Dictionary _dict;
+
+		public KingbaseConnection(Connection paramConnection, Kingbase8R6Dictionary paramKingbaseDictionary) {
+			super(paramConnection);
+			this._dict = paramKingbaseDictionary;
+		}
+
+		protected PreparedStatement prepareStatement(String paramString, boolean paramBoolean) throws SQLException {
+			return new Kingbase8R6Dictionary.KingbasePreparedStatement(super.prepareStatement(paramString, false), this,
+					this._dict);
+		}
+
+		protected PreparedStatement prepareStatement(String paramString, int paramInt1, int paramInt2,
+				boolean paramBoolean) throws SQLException {
+			return new Kingbase8R6Dictionary.KingbasePreparedStatement(
+					super.prepareStatement(paramString, paramInt1, paramInt2, false), this, this._dict);
+		}
+	}
+}

+ 5 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/openjpa/jdbc/sql/OscarDictionary.java

@@ -1,5 +1,6 @@
 package com.x.base.core.openjpa.jdbc.sql;
 
+import org.apache.openjpa.jdbc.sql.BooleanRepresentationFactory;
 import org.apache.openjpa.jdbc.sql.DBDictionary;
 import org.apache.openjpa.lib.util.Localizer;
 
@@ -18,6 +19,10 @@ public class OscarDictionary extends DBDictionary {
 		maxEmbeddedClobSize = -1;
 		maxEmbeddedBlobSize = -1;
 		doubleTypeName = "DOUBLE PRECISION";
+		booleanTypeName = "BOOL";
+		useGetStringForClobs = true;
+		useSetStringForClobs = true;
+		booleanRepresentation = BooleanRepresentationFactory.BOOLEAN;
 	}
 
 }

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

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

+ 30 - 32
o2server/x_base_core_project/src/main/java/com/x/base/core/project/annotation/ApiBuilder.java

@@ -9,11 +9,9 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.Objects;
 import java.util.Set;
 import java.util.stream.Collectors;
@@ -63,22 +61,45 @@ public class ApiBuilder {
 	private static Logger logger = LoggerFactory.getLogger(ApiBuilder.class);
 
 	public static void main(String[] args) throws IOException {
-		//System.out.println("ApiBuilder......");
 		File basedir = new File(args[0]);
 		File sourcedir = new File(args[1]);
 		
 		File dir = new File(basedir, "src/main/webapp/describe");
-
 		FileUtils.forceMkdir(dir);
-
 		ApiBuilder builder = new ApiBuilder();
-
 		builder.scan(dir);
 
-		//FileUtils.copyDirectory(sourcedir, new File(dir, "sources"));
-
+		String filePath = args[0];
+		String fileName = filePath.substring(filePath.lastIndexOf(File.separator), filePath.length());
+		filePath = filePath.substring(0, filePath.lastIndexOf(File.separator));
+		filePath = filePath + File.separator+"x_program_center";
+		dir = new File(filePath ,"src/main/webapp/describe/api");
+		FileUtils.forceMkdir(dir);
+		builder.scan(dir,fileName);
+	}
+	
+	private void scan(File dir,String fileName) {
+		try {
+			List<JaxrsClass> jaxrsClasses = new ArrayList<>();
+			List<Class<?>> classes = this.scanJaxrsClass();
+			for (Class<?> clz : classes) {
+				if (StandardJaxrsAction.class.isAssignableFrom(clz)) {
+					jaxrsClasses.add(this.jaxrsClass(clz));
+				}
+			}
+			
+			LinkedHashMap<String, List<?>> map = new LinkedHashMap<>();
+			jaxrsClasses = jaxrsClasses.stream().sorted(Comparator.comparing(JaxrsClass::getName))
+					.collect(Collectors.toList());
+			map.put("jaxrs", jaxrsClasses);
+			File file = new File(dir,  fileName + ".json");
+			FileUtils.writeStringToFile(file, XGsonBuilder.toJson(map), DefaultCharset.charset);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
 	}
 
+
 	private void scan(File dir) {
 		try {
 			List<JaxrsClass> jaxrsClasses = new ArrayList<>();
@@ -123,23 +144,13 @@ public class ApiBuilder {
 		logger.print("describe class:{}.", clz.getName());
 		JaxrsDescribe jaxrsDescribe = clz.getAnnotation(JaxrsDescribe.class);
 		JaxrsClass jaxrsClass = new JaxrsClass();
-		//jaxrsClass.setClassName(clz.getName());
 		jaxrsClass.setName(clz.getSimpleName());
-		//jaxrsClass.setDescription(jaxrsDescribe.value());
 		for (Method method : clz.getMethods()) {
 			JaxrsMethodDescribe jaxrsMethodDescribe = method.getAnnotation(JaxrsMethodDescribe.class);
 			if (null != jaxrsMethodDescribe) {
-				/*
-				Map<String, JaxrsApiMethod> map = new HashMap<String,JaxrsApiMethod>();
-				map.put(method.getName(), this.jaxrsApiMethod(clz, method));
-				jaxrsClass.getMethods().add(map);
-				*/
 				jaxrsClass.getMethods().add(this.jaxrsApiMethod(clz, method));
 			}
-		}
-		
-		//jaxrsClass.setMethods(this.getSortData("name",jaxrsClass.getMethods()));
-		
+		}		
 		return jaxrsClass;
 		
 	}
@@ -152,7 +163,6 @@ public class ApiBuilder {
                 this.keyName = keyName;
             }
             public int compare(Map<String, JaxrsApiMethod> mp1, Map<String, JaxrsApiMethod> mp2) {
-            	 System.out.println("this.keyName=" + mp1.keySet().toArray()[0]);
                  String d1 = mp1.keySet().toArray()[0].toString();
                  String d2 = mp2.keySet().toArray()[0].toString();
                 return d2.compareTo(d1);
@@ -167,9 +177,7 @@ public class ApiBuilder {
 		JaxrsMethodDescribe jaxrsMethodDescribe = method.getAnnotation(JaxrsMethodDescribe.class);
 		JaxrsApiMethod jaxrsMethod = new JaxrsApiMethod();
 		jaxrsMethod.setName(method.getName());
-		//jaxrsMethod.setDescription(jaxrsMethodDescribe.value());
 		Class<?> actionClass = jaxrsMethodDescribe.action();
-		//jaxrsMethod.setClassName(actionClass.getName());
 		if (null != method.getAnnotation(GET.class)) {
 			jaxrsMethod.setMethod("GET");
 		} else if (null != method.getAnnotation(POST.class)) {
@@ -541,23 +549,13 @@ public class ApiBuilder {
 		public String getName() {
 			return name;
 		}
-  /*
-		private List<Map<String,JaxrsApiMethod>> methods = new ArrayList<Map<String,JaxrsApiMethod>>();
-		public List<Map<String, JaxrsApiMethod>> getMethods() {
-			return methods;
-		}
 
-		public void setMethods(List<Map<String, JaxrsApiMethod>> methods) {
-			this.methods = methods;
-		}
-  */
 		public void setName(String name) {
 			this.name = name;
 		}
 	}
 	
     public class JaxrsApiMethod{
-		//private List<JaxsApiMethodProperty> name = new ArrayList<>();
     	private String name;
 		private String uri;
 		private String method;

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

@@ -80,6 +80,7 @@ public class CreateConfigSample {
 		classes.add(WorkTime.class);
 		classes.add(ZhengwuDingding.class);
 		classes.add(Cache.class);
+		//classes.add(Web.class);
 
 		Collections.sort(classes, new Comparator<Class<?>>() {
 			public int compare(Class<?> c1, Class<?> c2) {

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

@@ -21,6 +21,7 @@ public class ApplicationServer extends ConfigObject {
 	private static final String DEFAULT_STATEXCLUSIONS = "*.js,*.gif,*.jpg,*.png,*.css,*.ico";
 	private static final Integer DEFAULT_MAXFORMCONTENT = 20;
 	private static final Boolean DEFAULT_EXPOSEJEST = true;
+	private static final Boolean DEFAULT_PERSISTENTCONNECTIONSENABLE = true;
 
 	public ApplicationServer() {
 		this.enable = true;
@@ -38,6 +39,7 @@ public class ApplicationServer extends ConfigObject {
 		this.statExclusions = DEFAULT_STATEXCLUSIONS;
 		this.maxFormContent = DEFAULT_MAXFORMCONTENT;
 		this.exposeJest = DEFAULT_EXPOSEJEST;
+		this.persistentConnectionsEnable = DEFAULT_PERSISTENTCONNECTIONSENABLE;
 	}
 
 	@FieldDescribe("是否启用")
@@ -71,6 +73,14 @@ public class ApplicationServer extends ConfigObject {
 	@FieldDescribe("暴露jest接口.")
 	private Boolean exposeJest;
 
+	@FieldDescribe("是否启用长连接,默认false.")
+	private Boolean persistentConnectionsEnable;
+
+	public Boolean getPersistentConnectionsEnable() {
+		return persistentConnectionsEnable == null ? DEFAULT_PERSISTENTCONNECTIONSENABLE
+				: this.persistentConnectionsEnable;
+	}
+
 	public Boolean getExposeJest() {
 		return BooleanUtils.isNotFalse(this.exposeJest);
 	}

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

@@ -22,6 +22,7 @@ public class CenterServer extends ConfigObject {
 	private static final String DEFAULT_STATEXCLUSIONS = "*.js,*.gif,*.jpg,*.png,*.css,*.ico";
 	private static final Integer DEFAULT_MAXFORMCONTENT = 20;
 	private static final Boolean DEFAULT_EXPOSEJEST = true;
+	private static final Boolean DEFAULT_PERSISTENTCONNECTIONSENABLE = true;
 
 	public static CenterServer defaultInstance() {
 		return new CenterServer();
@@ -42,6 +43,7 @@ public class CenterServer extends ConfigObject {
 		this.statExclusions = DEFAULT_STATEXCLUSIONS;
 		this.maxFormContent = DEFAULT_MAXFORMCONTENT;
 		this.exposeJest = DEFAULT_EXPOSEJEST;
+		this.persistentConnectionsEnable = DEFAULT_PERSISTENTCONNECTIONSENABLE;
 	}
 
 	@FieldDescribe("是否启用")
@@ -75,6 +77,14 @@ public class CenterServer extends ConfigObject {
 	@FieldDescribe("暴露jest接口.")
 	private Boolean exposeJest;
 
+	@FieldDescribe("是否启用长连接,默认false.")
+	private Boolean persistentConnectionsEnable;
+
+	public Boolean getPersistentConnectionsEnable() {
+		return persistentConnectionsEnable == null ? DEFAULT_PERSISTENTCONNECTIONSENABLE
+				: this.persistentConnectionsEnable;
+	}
+
 	public Boolean getExposeJest() {
 		return BooleanUtils.isNotFalse(this.exposeJest);
 	}

Разница между файлами не показана из-за своего большого размера
+ 271 - 412
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Config.java


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

@@ -57,7 +57,7 @@ public class DataServer extends ConfigObject {
 	private Boolean jmxEnable;
 	@FieldDescribe("H2数据库缓存大小,设置H2用于作为缓存的内存大小,以M作为单位,这里默认为512M.")
 	private Integer cacheSize;
-	@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;
 	@FieldDescribe("最大使用连接数")
 	private Integer maxTotal;

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

@@ -31,7 +31,7 @@ public class Dingding extends ConfigObject {
 	@FieldDescribe("应用的密钥")
 	private String appSecret;
 
-	@FieldDescribe("组织同步cron,默认每10分钟同步一次.")
+	@FieldDescribe("回调信号触发同步检查,默认每10分钟运行一次,如果期间内有钉钉回调信号接收到,那么触发同步任务进行人员同步.")
 	private String syncCron;
 
 	@FieldDescribe("强制拉入同步cron,默认在每天的8点和12点强制进行同步.")

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

@@ -30,6 +30,9 @@ public class ExternalDataSource extends ConfigObject {
 		this.statEnable = DEFAULT_STATENABLE;
 		this.statFilter = DEFAULT_STATFILTER;
 		this.slowSqlMillis = DEFAULT_SLOWSQLMILLIS;
+		this.transactionIsolation = DEFAULT_TRANSACTIONISOLATION;
+		this.testConnectionOnCheckin = DEFAULT_TESTCONNECTIONONCHECKIN;
+		this.testConnectionOnCheckout = DEFAULT_TESTCONNECTIONONCHECKOUT;
 	}
 
 	public static ExternalDataSource defaultInstance() {
@@ -58,13 +61,20 @@ public class ExternalDataSource extends ConfigObject {
 	private String statFilter;
 	@FieldDescribe("执行缓慢sql毫秒数,默认2000毫秒,执行缓慢的sql将被单独记录.")
 	private Integer slowSqlMillis;
-
 	@FieldDescribe("设置此数据库存储的类,默认情况下存储所有类型,如果需要对每个类进行单独的控制以达到高性能,可以将不同的类存储到不同的节点上提高性能.可以使用通配符*")
 	private List<String> includes;
 	@FieldDescribe("在此节点上不存储的类,和includes一起设置实际存储的类,可以使用通配符*")
 	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")
 	private String logLevel = DEFAULT_LOGLEVEL;
+	@FieldDescribe("事务隔离级别:default,none,read-committed,read-uncommitted,repeatable-read,serializable.默认使用default(数据库设置的事务级别).")
+	private String transactionIsolation;
+	@FieldDescribe("测试入池连接,默认false.")
+	private Boolean testConnectionOnCheckin;
+	@FieldDescribe("测试出池连接,默认false.")
+	private Boolean testConnectionOnCheckout;
+	@FieldDescribe("空闲阈值,默认300秒.")
+	private Integer maxIdleTime;
 
 	public static final Integer DEFAULT_MAXTOTAL = 50;
 
@@ -78,6 +88,31 @@ public class ExternalDataSource extends ConfigObject {
 
 	public static final String DEFAULT_LOGLEVEL = "WARN";
 
+	public static final String DEFAULT_TRANSACTIONISOLATION = "default";
+
+	public static final Boolean DEFAULT_TESTCONNECTIONONCHECKIN = false;
+
+	public static final Boolean DEFAULT_TESTCONNECTIONONCHECKOUT = false;
+
+	public static final Integer DEFAULT_MAXIDLETIME = 300;
+
+	public Integer getMaxIdleTime() {
+		return maxIdleTime == null ? DEFAULT_MAXIDLETIME : this.maxIdleTime;
+	}
+
+	public Boolean getTestConnectionOnCheckin() {
+		return this.testConnectionOnCheckin == null ? DEFAULT_TESTCONNECTIONONCHECKIN : this.testConnectionOnCheckin;
+	}
+
+	public Boolean getTestConnectionOnCheckout() {
+		return this.testConnectionOnCheckout == null ? DEFAULT_TESTCONNECTIONONCHECKOUT : this.testConnectionOnCheckout;
+	}
+
+	public String getTransactionIsolation() {
+		return StringUtils.isEmpty(this.transactionIsolation) ? DEFAULT_TRANSACTIONISOLATION
+				: this.transactionIsolation;
+	}
+
 	public String getLogLevel() {
 		return StringUtils.isEmpty(this.logLevel) ? DEFAULT_LOGLEVEL : this.logLevel;
 	}

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

@@ -117,4 +117,32 @@ public class ExternalDataSources extends CopyOnWriteArrayList<ExternalDataSource
 		throw new Exception("hasSchema error.");
 	}
 
+	public String getTransactionIsolation() {
+		for (ExternalDataSource o : this) {
+			return o.getTransactionIsolation();
+		}
+		return null;
+	}
+
+	public Boolean getTestConnectionOnCheckin() {
+		for (ExternalDataSource o : this) {
+			return o.getTestConnectionOnCheckin();
+		}
+		return null;
+	}
+
+	public Boolean getTestConnectionOnCheckout() {
+		for (ExternalDataSource o : this) {
+			return o.getTestConnectionOnCheckout();
+		}
+		return null;
+	}
+
+	public Integer getMaxIdleTime() {
+		for (ExternalDataSource o : this) {
+			return o.getMaxIdleTime();
+		}
+		return null;
+	}
+
 }

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

@@ -180,10 +180,10 @@ public class Node extends ConfigObject {
 			return DateTools.cronAvailable(this.cron());
 		}
 
-		@FieldDescribe("是否启用,默认每天凌晨2点进行备份.")
-		private Boolean enable = true;
+		@FieldDescribe("是否启用,默认禁用.")
+		private Boolean enable = false;
 
-		@FieldDescribe("定时任务cron表达式")
+		@FieldDescribe("定时任务cron表达式,默认每天凌晨2点进行备份.")
 		private String cron = "";
 
 		@FieldDescribe("最大保留份数,超过将自动删除最久的数据.")

Разница между файлами не показана из-за своего большого размера
+ 2 - 4
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Qiyeweixin.java


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

@@ -8,9 +8,14 @@ public class Vfs extends ConfigObject {
 
 	private Ftp ftp = new Ftp();
 	private Ftps ftps = new Ftps();
+	private Sftp sftp = new Sftp();
 
 	public Vfs() {
 	}
+	
+	public Sftp getSftp() {
+		return ((null != this.sftp) ? this.sftp : new Sftp());
+	}
 
 	public Ftp getFtp() {
 		return ((null != this.ftp) ? this.ftp : new Ftp());
@@ -24,6 +29,21 @@ public class Vfs extends ConfigObject {
 		return new Vfs();
 	}
 
+	public static class Sftp extends ConfigObject {
+
+		@FieldDescribe("是否启用被动方式传输,默认true")
+		private Boolean passive = true;
+
+		public Boolean getPassive() {
+			return (!BooleanUtils.isFalse(this.passive));
+		}
+
+		public void setPassive(Boolean passive) {
+			this.passive = passive;
+		}
+
+	}
+
 	public static class Ftp extends ConfigObject {
 
 		@FieldDescribe("是否启用被动方式传输,默认true")

+ 214 - 217
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/WeLink.java

@@ -10,231 +10,228 @@ import java.util.Calendar;
 import java.util.Date;
 
 /**
- * Created by fancyLou on 2020-07-24.
- * Copyright © 2020 O2. All rights reserved.
+ * Created by fancyLou on 2020-07-24. Copyright © 2020 O2. All rights reserved.
  */
 public class WeLink extends ConfigObject {
 
-    @FieldDescribe("是否启用")
-    private Boolean enable;
+	@FieldDescribe("是否启用")
+	private Boolean enable;
 
-    @FieldDescribe("WeLink应用的client_id")
-    private String clientId;
+	@FieldDescribe("WeLink应用的client_id")
+	private String clientId;
 
-    @FieldDescribe("WeLink应用的client_secret")
-    private String clientSecret;
+	@FieldDescribe("WeLink应用的client_secret")
+	private String clientSecret;
 
+	@FieldDescribe("回调信号触发同步检查,默认每10分钟运行一次,如果期间内有WeLink回调信号接收到,那么触发同步任务进行人员同步.")
+	private String syncCron;
 
-    @FieldDescribe("组织同步cron,默认每10分钟同步一次.")
-    private String syncCron;
+	@FieldDescribe("强制拉入同步cron,默认在每天的8点和12点强制进行同步.")
+	private String forceSyncCron;
 
-    @FieldDescribe("强制拉入同步cron,默认在每天的8点和12点强制进行同步.")
-    private String forceSyncCron;
+	@FieldDescribe("WeLink api服务器地址")
+	private String oapiAddress;
 
-    @FieldDescribe("WeLink api服务器地址")
-    private String oapiAddress;
+	@FieldDescribe("是否启用消息推送")
+	private Boolean messageEnable;
 
-    @FieldDescribe("是否启用消息推送")
-    private Boolean messageEnable;
-
-    @FieldDescribe("WeLink消息打开工作的url地址,如:http://dev.o2oa.net/x_desktop/")
-    private String workUrl = "";
-
-    @FieldDescribe("WeLink消息处理完成后跳转到特定的门户页面的Id")
-    private String messageRedirectPortal = "";
-
-
-
-    public static WeLink defaultInstance() {
-        return new WeLink();
-    }
-
-    public static final Boolean default_enable = false;
-    public static final String default_clientId = "";
-    public static final String default_clientSecret = "";
-    public static final String default_syncCron = "10 0/10 * * * ?";
-    public static final String default_forceSyncCron = "10 45 8,12 * * ?";
-    public static final String default_oapiAddress = "https://open.welink.huaweicloud.com/api";
-    public static final Boolean default_messageEnable = false;
-    public static final String default_workUrl = "";
-    public static final String default_messageRedirectPortal = "";
-
-
-    public WeLink() {
-        this.enable = default_enable;
-        this.clientId = default_clientId;
-        this.clientSecret = default_clientSecret;
-        this.syncCron = default_syncCron;
-        this.forceSyncCron = default_forceSyncCron;
-        this.oapiAddress = default_oapiAddress;
-        this.messageEnable = default_messageEnable;
-        this.workUrl = default_workUrl;
-        this.messageRedirectPortal = default_messageRedirectPortal;
-    }
-
-    public static String WeLink_Auth_Head_Key = "x-wlk-Authorization";
-
-    private static String cachedAccessToken;
-    private static Date cachedAccessTokenDate;
-
-    public static class AccessTokenReq {
-       private String client_id;
-       private String client_secret;
-
-        public String getClient_id() {
-            return client_id;
-        }
-
-        public void setClient_id(String client_id) {
-            this.client_id = client_id;
-        }
-
-        public String getClient_secret() {
-            return client_secret;
-        }
-
-        public void setClient_secret(String client_secret) {
-            this.client_secret = client_secret;
-        }
-    }
-    public static class AccessTokenResp {
-
-        private String access_token;
-        private String code;
-        private String message;
-        private Integer expires_in;
-
-        public String getAccess_token() {
-            return access_token;
-        }
-
-        public void setAccess_token(String access_token) {
-            this.access_token = access_token;
-        }
-
-        public String getCode() {
-            return code;
-        }
-
-        public void setCode(String code) {
-            this.code = code;
-        }
-
-        public String getMessage() {
-            return message;
-        }
-
-        public void setMessage(String message) {
-            this.message = message;
-        }
-
-        public Integer getExpires_in() {
-            return expires_in;
-        }
-
-        public void setExpires_in(Integer expires_in) {
-            this.expires_in = expires_in;
-        }
-    }
-
-    /**
-     * 获取WeLink AccessToken
-     * @return
-     * @throws Exception
-     */
-    public String accessToken() throws Exception {
-        if ((StringUtils.isNotEmpty(cachedAccessToken) && (null != cachedAccessTokenDate))
-                && (cachedAccessTokenDate.after(new Date()))) {
-            return cachedAccessToken;
-        } else {
-            String address = this.getOapiAddress() + "/auth/v2/tickets";
-            AccessTokenReq req = new AccessTokenReq();
-            req.setClient_id(this.getClientId());
-            req.setClient_secret(this.getClientSecret());
-            AccessTokenResp resp = HttpConnection.postAsObject(address, null, XGsonBuilder.instance().toJson(req), AccessTokenResp.class);
-            if (!resp.getCode().equals("0")) {
-                throw new ExceptionWeLinkAccessToken(resp.getCode(), resp.getMessage());
-            }
-            cachedAccessToken = resp.getAccess_token();
-            Integer second = resp.expires_in;//过期时间 秒
-            Calendar cal = Calendar.getInstance();
-            cal.add(Calendar.SECOND, (second - 300));
-            cachedAccessTokenDate = cal.getTime();
-            return cachedAccessToken;
-        }
-    }
-
-
-
-    public Boolean getEnable() {
-        return BooleanUtils.isTrue(this.enable);
-    }
-
-    public void setEnable(Boolean enable) {
-        this.enable = enable;
-    }
-
-    public String getClientId() {
-        return StringUtils.isEmpty(this.clientId) ? default_clientId : this.clientId;
-    }
-
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    public String getClientSecret() {
-        return StringUtils.isEmpty(this.clientSecret) ? default_clientSecret : this.clientSecret;
-    }
-
-    public void setClientSecret(String clientSecret) {
-        this.clientSecret = clientSecret;
-    }
-
-    public String getSyncCron() {
-        return StringUtils.isEmpty(this.syncCron) ? default_syncCron : this.syncCron;
-    }
-
-    public void setSyncCron(String syncCron) {
-        this.syncCron = syncCron;
-    }
-
-    public String getForceSyncCron() {
-        return StringUtils.isEmpty(this.forceSyncCron) ? default_forceSyncCron : this.forceSyncCron;
-    }
-
-    public void setForceSyncCron(String forceSyncCron) {
-        this.forceSyncCron = forceSyncCron;
-    }
-
-    public String getOapiAddress() {
-        return StringUtils.isEmpty(this.oapiAddress) ? default_oapiAddress : this.oapiAddress;
-    }
-
-    public void setOapiAddress(String oapiAddress) {
-        this.oapiAddress = oapiAddress;
-    }
-
-    public Boolean getMessageEnable() {
-        return BooleanUtils.isTrue(this.messageEnable);
-    }
-
-    public void setMessageEnable(Boolean messageEnable) {
-        this.messageEnable = messageEnable;
-    }
-
-    public String getWorkUrl() {
-        return StringUtils.isEmpty(this.workUrl) ? default_workUrl : this.workUrl;
-    }
-
-    public void setWorkUrl(String workUrl) {
-        this.workUrl = workUrl;
-    }
-
-    public String getMessageRedirectPortal() {
-        return StringUtils.isEmpty(this.messageRedirectPortal) ? default_messageRedirectPortal : this.messageRedirectPortal;
-    }
-
-    public void setMessageRedirectPortal(String messageRedirectPortal) {
-        this.messageRedirectPortal = messageRedirectPortal;
-    }
+	@FieldDescribe("WeLink消息打开工作的url地址,如:http://dev.o2oa.net/x_desktop/")
+	private String workUrl = "";
+
+	@FieldDescribe("WeLink消息处理完成后跳转到特定的门户页面的Id")
+	private String messageRedirectPortal = "";
+
+	public static WeLink defaultInstance() {
+		return new WeLink();
+	}
+
+	public static final Boolean default_enable = false;
+	public static final String default_clientId = "";
+	public static final String default_clientSecret = "";
+	public static final String default_syncCron = "10 0/10 * * * ?";
+	public static final String default_forceSyncCron = "10 45 8,12 * * ?";
+	public static final String default_oapiAddress = "https://open.welink.huaweicloud.com/api";
+	public static final Boolean default_messageEnable = false;
+	public static final String default_workUrl = "";
+	public static final String default_messageRedirectPortal = "";
+
+	public WeLink() {
+		this.enable = default_enable;
+		this.clientId = default_clientId;
+		this.clientSecret = default_clientSecret;
+		this.syncCron = default_syncCron;
+		this.forceSyncCron = default_forceSyncCron;
+		this.oapiAddress = default_oapiAddress;
+		this.messageEnable = default_messageEnable;
+		this.workUrl = default_workUrl;
+		this.messageRedirectPortal = default_messageRedirectPortal;
+	}
+
+	public static String WeLink_Auth_Head_Key = "x-wlk-Authorization";
+
+	private static String cachedAccessToken;
+	private static Date cachedAccessTokenDate;
+
+	public static class AccessTokenReq {
+		private String client_id;
+		private String client_secret;
+
+		public String getClient_id() {
+			return client_id;
+		}
+
+		public void setClient_id(String client_id) {
+			this.client_id = client_id;
+		}
+
+		public String getClient_secret() {
+			return client_secret;
+		}
+
+		public void setClient_secret(String client_secret) {
+			this.client_secret = client_secret;
+		}
+	}
+
+	public static class AccessTokenResp {
+
+		private String access_token;
+		private String code;
+		private String message;
+		private Integer expires_in;
+
+		public String getAccess_token() {
+			return access_token;
+		}
+
+		public void setAccess_token(String access_token) {
+			this.access_token = access_token;
+		}
+
+		public String getCode() {
+			return code;
+		}
+
+		public void setCode(String code) {
+			this.code = code;
+		}
+
+		public String getMessage() {
+			return message;
+		}
+
+		public void setMessage(String message) {
+			this.message = message;
+		}
+
+		public Integer getExpires_in() {
+			return expires_in;
+		}
+
+		public void setExpires_in(Integer expires_in) {
+			this.expires_in = expires_in;
+		}
+	}
+
+	/**
+	 * 获取WeLink AccessToken
+	 * 
+	 * @return
+	 * @throws Exception
+	 */
+	public String accessToken() throws Exception {
+		if ((StringUtils.isNotEmpty(cachedAccessToken) && (null != cachedAccessTokenDate))
+				&& (cachedAccessTokenDate.after(new Date()))) {
+			return cachedAccessToken;
+		} else {
+			String address = this.getOapiAddress() + "/auth/v2/tickets";
+			AccessTokenReq req = new AccessTokenReq();
+			req.setClient_id(this.getClientId());
+			req.setClient_secret(this.getClientSecret());
+			AccessTokenResp resp = HttpConnection.postAsObject(address, null, XGsonBuilder.instance().toJson(req),
+					AccessTokenResp.class);
+			if (!resp.getCode().equals("0")) {
+				throw new ExceptionWeLinkAccessToken(resp.getCode(), resp.getMessage());
+			}
+			cachedAccessToken = resp.getAccess_token();
+			Integer second = resp.expires_in;// 过期时间 秒
+			Calendar cal = Calendar.getInstance();
+			cal.add(Calendar.SECOND, (second - 300));
+			cachedAccessTokenDate = cal.getTime();
+			return cachedAccessToken;
+		}
+	}
+
+	public Boolean getEnable() {
+		return BooleanUtils.isTrue(this.enable);
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+	public String getClientId() {
+		return StringUtils.isEmpty(this.clientId) ? default_clientId : this.clientId;
+	}
+
+	public void setClientId(String clientId) {
+		this.clientId = clientId;
+	}
+
+	public String getClientSecret() {
+		return StringUtils.isEmpty(this.clientSecret) ? default_clientSecret : this.clientSecret;
+	}
+
+	public void setClientSecret(String clientSecret) {
+		this.clientSecret = clientSecret;
+	}
+
+	public String getSyncCron() {
+		return StringUtils.isEmpty(this.syncCron) ? default_syncCron : this.syncCron;
+	}
+
+	public void setSyncCron(String syncCron) {
+		this.syncCron = syncCron;
+	}
+
+	public String getForceSyncCron() {
+		return StringUtils.isEmpty(this.forceSyncCron) ? default_forceSyncCron : this.forceSyncCron;
+	}
+
+	public void setForceSyncCron(String forceSyncCron) {
+		this.forceSyncCron = forceSyncCron;
+	}
+
+	public String getOapiAddress() {
+		return StringUtils.isEmpty(this.oapiAddress) ? default_oapiAddress : this.oapiAddress;
+	}
+
+	public void setOapiAddress(String oapiAddress) {
+		this.oapiAddress = oapiAddress;
+	}
+
+	public Boolean getMessageEnable() {
+		return BooleanUtils.isTrue(this.messageEnable);
+	}
+
+	public void setMessageEnable(Boolean messageEnable) {
+		this.messageEnable = messageEnable;
+	}
+
+	public String getWorkUrl() {
+		return StringUtils.isEmpty(this.workUrl) ? default_workUrl : this.workUrl;
+	}
+
+	public void setWorkUrl(String workUrl) {
+		this.workUrl = workUrl;
+	}
+
+	public String getMessageRedirectPortal() {
+		return StringUtils.isEmpty(this.messageRedirectPortal) ? default_messageRedirectPortal
+				: this.messageRedirectPortal;
+	}
+
+	public void setMessageRedirectPortal(String messageRedirectPortal) {
+		this.messageRedirectPortal = messageRedirectPortal;
+	}
 }

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

@@ -22,6 +22,7 @@ public class WebServer extends ConfigObject {
 		this.statEnable = DEFAULT_STATENABLE;
 		this.statExclusions = DEFAULT_STATEXCLUSIONS;
 		this.cacheControlMaxAge = DEFAULT_CACHECONTROLMAXAGE;
+		this.persistentConnectionsEnable = DEFAULT_PERSISTENTCONNECTIONSENABLE;
 	}
 
 	private static final Integer DEFAULT_HTTP_PORT = 80;
@@ -33,6 +34,7 @@ public class WebServer extends ConfigObject {
 	private static final Integer DEFAULT_CACHECONTROLMAXAGE = 0;
 	private static final Boolean DEFAULT_PROXYCENTERENABLE = true;
 	private static final Boolean DEFAULT_PROXYAPPLICATIONENABLE = true;
+	private static final Boolean DEFAULT_PERSISTENTCONNECTIONSENABLE = true;
 
 	@FieldDescribe("是否启用")
 	private Boolean enable;
@@ -61,6 +63,14 @@ public class WebServer extends ConfigObject {
 	@FieldDescribe("是否启用application服务器代理")
 	private Boolean proxyApplicationEnable;
 
+	@FieldDescribe("是否启用长连接,默认true.")
+	private Boolean persistentConnectionsEnable;
+
+	public Boolean getPersistentConnectionsEnable() {
+		return persistentConnectionsEnable == null ? DEFAULT_PERSISTENTCONNECTIONSENABLE
+				: this.persistentConnectionsEnable;
+	}
+
 	public Boolean getProxyCenterEnable() {
 		return proxyCenterEnable == null ? DEFAULT_PROXYCENTERENABLE : this.proxyCenterEnable;
 	}

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

@@ -22,7 +22,7 @@ public class ZhengwuDingding extends ConfigObject {
 	private String appSecret;
 	@FieldDescribe("政务钉钉agentId")
 	private String agentId;
-	@FieldDescribe("拉入同步cron,默认每10分钟同步一次.")
+	@FieldDescribe("回调信号触发同步检查,默认每10分钟运行一次,如果期间内有政务钉钉回调信号接收到,那么触发同步任务进行人员同步.")
 	private String syncCron;
 	@FieldDescribe("强制拉入同步cron,默认在每天的8点和12点强制进行同步.")
 	private String forceSyncCron;

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

@@ -12,7 +12,7 @@ public class FilterTools {
 	public static final String Access_Control_Allow_Methods = "Access-Control-Allow-Methods";
 	public static final String Access_Control_Allow_Methods_Value = "GET, POST, OPTIONS, PUT, DELETE, HEAD, TRACE";
 	public static final String Access_Control_Allow_Headers = "Access-Control-Allow-Headers";
-	public static final String Access_Control_Allow_Headers_Value = "x-requested-with, x-request, x-token, c-token, Content-Type, Content-Length, x-cipher, x-client, x-debugger, Authorization";
+	public static final String Access_Control_Allow_Headers_Value = "x-requested-with, x-request, x-token, c-token, Content-Type, Content-Length, x-cipher, x-client, x-debugger, Authorization, P-User-Id, P-Request-Id, P-Page-Id";
 	public static final String Access_Control_Allow_Credentials = "Access-Control-Allow-Credentials";
 	public static final String Access_Control_Expose_Headers = "Access-Control-Expose-Headers";
 	public static final String Access_Control_Max_Age = "Access-Control-Max-Age";

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

@@ -34,8 +34,6 @@ public class HttpToken {
 	public static final String X_Debugger = "x-debugger";
 	public static final String COOKIE_ANONYMOUS_VALUE = "anonymous";
 	public static final String SET_COOKIE = "Set-Cookie";
-	
-	
 
 	private static final String RegularExpression_IP = "([1-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3}";
 	private static final String RegularExpression_Token = "^(anonymous|user|manager|cipher)([2][0][1-2][0-9][0-1][0-9][0-3][0-9][0-5][0-9][0-5][0-9][0-5][0-9])(\\S{1,})$";
@@ -165,7 +163,11 @@ public class HttpToken {
 			token = request.getHeader(X_Token);
 		}
 		if (StringUtils.isEmpty(token)) {
-			token = request.getHeader(X_Authorization);
+			//如果使用oauth bearer 通过此传递认证信息.需要进行判断,格式为 Bearer xxxxxxx
+			String value = request.getHeader(X_Authorization);
+			if (!StringUtils.contains(value, " ")) {
+				token = value;
+			}
 		}
 		// 此代码将导致input被关闭.
 		// if (StringUtils.isEmpty(token)) {
@@ -205,8 +207,5 @@ public class HttpToken {
 	private String userAgent(HttpServletRequest request) {
 		return Objects.toString(request.getHeader("User-Agent"), "");
 	}
-	
-	
- 
 
 }

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

@@ -1,7 +1,6 @@
 package com.x.base.core.project.jaxrs;
 
 import java.net.URI;
-import java.util.Date;
 import java.util.Objects;
 import java.util.zip.CRC32;
 
@@ -81,7 +80,7 @@ public class ResponseFactory {
 			}
 		} else {
 			if ((null != result.getData()) && (result.getData() instanceof WoFile)) {
-				/* 附件,二进制流文件 */
+				// 附件,二进制流文件
 				WoFile wo = (WoFile) result.getData();
 				EntityTag tag = new EntityTag(etagWoFile(wo));
 				if (notModified(request, tag)) {
@@ -91,13 +90,13 @@ public class ResponseFactory {
 						.header(Content_Type, wo.getContentType()).header(Content_Length, wo.getBytes().length)
 						.header(Accept_Ranges, "bytes").tag(tag).build();
 			} else if ((null != result.getData()) && (result.getData() instanceof WoText)) {
-				/* 纯文本text */
+				// 纯文本text
 				WoText wo = (WoText) result.getData();
 				EntityTag tag = new EntityTag(etagWoText(wo));
 				if (notModified(request, tag)) {
 					return Response.notModified().tag(tag).build();
 				}
-				return Response.ok(wo.getText()).type(HttpMediaType.TEXT_PLAIN_UTF_8).tag(tag).build();
+				return Response.ok(wo.getText()).type(wo.getContentType()).tag(tag).build();
 			} else if ((null != result.getData()) && (result.getData() instanceof WoContentType)) {
 				WoContentType wo = (WoContentType) result.getData();
 				EntityTag tag = new EntityTag(etagWoContentType(wo));
@@ -106,10 +105,10 @@ public class ResponseFactory {
 				}
 				return Response.ok(wo.getBody()).type(wo.getContentType()).tag(tag).build();
 			} else if ((null != result.getData()) && (result.getData() instanceof WoCallback)) {
-				/* jsonp callback */
+				// jsonp callback
 				return Response.ok(callback((WoCallback) result.getData())).build();
 			} else if ((null != result.getData()) && (result.getData() instanceof WoSeeOther)) {
-				/* 303 */
+				// 303
 				WoSeeOther wo = (WoSeeOther) result.getData();
 				try {
 					return Response.seeOther(new URI(wo.getUrl())).build();
@@ -117,7 +116,7 @@ public class ResponseFactory {
 					return Response.serverError().entity(Objects.toString(wo.getUrl(), "")).build();
 				}
 			} else if ((null != result.getData()) && (result.getData() instanceof WoTemporaryRedirect)) {
-				/* 304 */
+				// 304
 				WoTemporaryRedirect wo = (WoTemporaryRedirect) result.getData();
 				try {
 					return Response.temporaryRedirect(new URI(wo.getUrl())).build();
@@ -125,29 +124,35 @@ public class ResponseFactory {
 					return Response.serverError().entity(Objects.toString(wo.getUrl(), "")).build();
 				}
 			} else {
-				/* default */
-				EntityTag tag = new EntityTag(etagDefault(result.getData()));
-				if (notModified(request, tag)) {
-					return Response.notModified().tag(tag).build();
+				// default
+				Integer maxAge = maxAgeDefault(result.getData());
+				if (null != maxAge) {
+					CacheControl cacheControl = new CacheControl();
+					cacheControl.setMaxAge(maxAge);
+					return Response.ok(result.toJson()).cacheControl(cacheControl).build();
+				} else {
+					EntityTag tag = new EntityTag(etagDefault(result.getData()));
+					if (notModified(request, tag)) {
+						return Response.notModified().tag(tag).build();
+					}
+					return Response.ok(result.toJson()).tag(tag).build();
 				}
-				return Response.ok(result.toJson()).tag(tag).build();
 			}
 		}
 	}
 
 	private static boolean notModified(HttpServletRequest request, EntityTag tag) {
-		String If_None_Match = request.getHeader(HttpHeader.IF_NONE_MATCH.toString());
-		if (StringUtils.isNotEmpty(If_None_Match)) {
-			if (StringUtils.equals(If_None_Match, "\"" + tag.getValue() + "\"")) {
-				return true;
-			}
-		}
-		return false;
+		String ifNoneMatch = request.getHeader(HttpHeader.IF_NONE_MATCH.toString());
+		return (StringUtils.isNotEmpty(ifNoneMatch) && StringUtils.equals(ifNoneMatch, "\"" + tag.getValue() + "\""));
 	}
 
 	private static String etagWoFile(WoFile wo) {
 		CRC32 crc = new CRC32();
-		crc.update(wo.getBytes());
+		if (StringUtils.isNotEmpty(wo.getFastETag())) {
+			crc.update(wo.getFastETag().getBytes(DefaultCharset.charset_utf_8));
+		} else {
+			crc.update(wo.getBytes());
+		}
 		return crc.getValue() + "";
 	}
 
@@ -159,16 +164,36 @@ public class ResponseFactory {
 
 	private static String etagWoText(WoText wo) {
 		CRC32 crc = new CRC32();
-		crc.update(wo.getText().getBytes(DefaultCharset.charset_utf_8));
+		if (StringUtils.isNotEmpty(wo.getFastETag())) {
+			crc.update(wo.getFastETag().getBytes(DefaultCharset.charset_utf_8));
+		} else {
+			crc.update(wo.getText().getBytes(DefaultCharset.charset_utf_8));
+		}
 		return crc.getValue() + "";
 	}
 
 	private static String etagDefault(Object o) {
 		CRC32 crc = new CRC32();
-		crc.update(XGsonBuilder.toJson(o).getBytes(DefaultCharset.charset_utf_8));
+		if (o instanceof WoMaxAgeFastETag) {
+			WoMaxAgeFastETag fast = ((WoMaxAgeFastETag) o);
+			if (StringUtils.isNotEmpty(fast.getFastETag())) {
+				crc.update(fast.getFastETag().getBytes(DefaultCharset.charset_utf_8));
+			} else {
+				crc.update(XGsonBuilder.toJson(o).getBytes(DefaultCharset.charset_utf_8));
+			}
+		} else {
+			crc.update(XGsonBuilder.toJson(o).getBytes(DefaultCharset.charset_utf_8));
+		}
 		return crc.getValue() + "";
 	}
 
+	private static Integer maxAgeDefault(Object o) {
+		if (o instanceof WoMaxAgeFastETag) {
+			return ((WoMaxAgeFastETag) o).getMaxAge();
+		}
+		return null;
+	}
+
 	private static String callback(WoCallback woCallback) {
 		ActionResult<Object> result = new ActionResult<>();
 		result.setData(woCallback.getObject());

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

@@ -1,9 +1,8 @@
 package com.x.base.core.project.jaxrs;
 
 import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.base.core.project.gson.GsonPropertyObject;
 
-public abstract class WoFile extends GsonPropertyObject {
+public abstract class WoFile extends WoMaxAgeFastETag {
 
 	private static final long serialVersionUID = -4566232046358204025L;
 	@FieldDescribe("说明")

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

@@ -0,0 +1,28 @@
+package com.x.base.core.project.jaxrs;
+
+import com.x.base.core.project.gson.GsonPropertyObject;
+
+public class WoMaxAgeFastETag extends GsonPropertyObject {
+
+	private static final long serialVersionUID = -8408799363043605326L;
+
+	private String fastETag;
+
+	private Integer maxAge = null;
+
+	public String getFastETag() {
+		return fastETag;
+	}
+
+	public void setFastETag(String fastETag) {
+		this.fastETag = fastETag;
+	}
+
+	public Integer getMaxAge() {
+		return maxAge;
+	}
+
+	public void setMaxAge(Integer maxAge) {
+		this.maxAge = maxAge;
+	}
+}

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

@@ -1,9 +1,11 @@
 package com.x.base.core.project.jaxrs;
 
+import org.apache.commons.lang3.StringUtils;
+
 import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.base.core.project.gson.GsonPropertyObject;
+import com.x.base.core.project.http.HttpMediaType;
 
-public class WoText  extends GsonPropertyObject {
+public class WoText extends WoMaxAgeFastETag {
 
 	public WoText() {
 	}
@@ -15,6 +17,17 @@ public class WoText  extends GsonPropertyObject {
 	@FieldDescribe("text")
 	private String text;
 
+	@FieldDescribe("返回Content_Type")
+	private String contentType;
+
+	public String getContentType() {
+		return StringUtils.isEmpty(this.contentType) ? HttpMediaType.TEXT_PLAIN_UTF_8 : this.contentType;
+	}
+
+	public void setContentType(String contentType) {
+		this.contentType = contentType;
+	}
+
 	public String getText() {
 		return text;
 	}

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

@@ -198,7 +198,8 @@ public class Logger {
 		sb.append(e.getMessage());
 		String headString = this.headToString(request);
 		String bodyString = this.bodyToString(body);
-		String requestUrl = request.getRequestURL().toString();
+		String requestUrl = request.getRequestURL().toString()
+				+ (StringUtils.isEmpty(request.getQueryString()) ? "" : "?" + request.getQueryString());
 		String stackTraceString = ExceptionUtils.getStackTrace(e);
 		Object[] arr = new String[] { effectivePerson.getDistinguishedName(), request.getMethod(), requestUrl,
 				request.getRemoteHost(), request.getRemoteAddr(), headString, bodyString };

+ 15 - 18
o2server/x_base_core_project/src/main/java/com/x/base/core/project/script/ScriptFactory.java

@@ -3,30 +3,26 @@ package com.x.base.core.project.script;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.Map;
 import java.util.Objects;
-import java.util.regex.Matcher;
 
 import javax.script.Compilable;
 import javax.script.CompiledScript;
-import javax.script.ScriptContext;
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineManager;
-import javax.script.ScriptException;
-import javax.script.SimpleScriptContext;
 
 import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.commons.lang3.BooleanUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.text.StringEscapeUtils;
 
 import com.google.gson.JsonArray;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.config.Config;
-import com.x.base.core.project.tools.StringTools;
+import com.x.base.core.project.tools.PropertyTools;
 
 import jdk.nashorn.api.scripting.ScriptObjectMirror;
+import jdk.nashorn.internal.runtime.ScriptObject;
 
 public class ScriptFactory {
 
@@ -242,10 +238,7 @@ public class ScriptFactory {
 						if (obj instanceof CharSequence) {
 							list.add(Objects.toString(obj, ""));
 						} else {
-							Object d = PropertyUtils.getProperty(obj, JpaObject.DISTINGUISHEDNAME);
-							if (null != d) {
-								list.add(Objects.toString(d, ""));
-							}
+							list.add(PropertyTools.getOrElse(obj, JpaObject.DISTINGUISHEDNAME, String.class, ""));
 						}
 					}
 				}
@@ -258,19 +251,23 @@ public class ScriptFactory {
 							if (obj instanceof CharSequence) {
 								list.add(Objects.toString(obj, ""));
 							} else {
-								Object d = PropertyUtils.getProperty(obj, JpaObject.DISTINGUISHEDNAME);
-								if (null != d) {
-									list.add(Objects.toString(d, ""));
+								if (obj instanceof ScriptObject) {
+									ScriptObject so = (ScriptObject) obj;
+									if (so.containsKey(JpaObject.DISTINGUISHEDNAME)) {
+										list.add(Objects.toString(so.get(JpaObject.DISTINGUISHEDNAME), ""));
+									}
+								} else {
+									list.add(PropertyTools.getOrElse(obj, JpaObject.DISTINGUISHEDNAME, String.class,
+											""));
 								}
 							}
 						}
 					}
 				} else {
-					Object d = PropertyUtils.getProperty(o, JpaObject.DISTINGUISHEDNAME);
-					if (null != d) {
-						list.add(Objects.toString(d, ""));
-					}
+					list.add(PropertyTools.getOrElse(o, JpaObject.DISTINGUISHEDNAME, String.class, ""));
 				}
+			} else {
+				list.add(Objects.toString(o, ""));
 			}
 		}
 		return list;

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

@@ -0,0 +1,198 @@
+package com.x.base.core.project.tools;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLDecoder;
+import java.nio.charset.Charset;
+import java.util.regex.Pattern;
+
+public class EscapeStringTools {
+    public static final Charset utf8Charset = Charset.forName("UTF-8");
+
+    protected static final String _allowableInUrl = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$&'()*+,-./:;=?@_~";
+
+    protected static final String _allowableInUrlQuery = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&'()*+,-./:;=?@_~";
+
+    private static final char _URIEscape = '%';
+
+    static final byte blank = 32;
+
+    static final byte plus = 43;
+
+    static final byte hexa = 97;
+
+    static final byte hexf = 102;
+
+    static final byte hexA = 65;
+
+    static final byte hexF = 70;
+
+    static final byte hex0 = 48;
+
+    static final byte hex9 = 57;
+
+    static final byte ten = 10;
+
+    private static String xescapeString(String in, String allowable, char esc, boolean spaceplus) {
+        try {
+            StringBuffer out = new StringBuffer();
+            if (in == null)
+                return null;
+            byte[] utf8 = in.getBytes(utf8Charset);
+            byte[] allow8 = allowable.getBytes(utf8Charset);
+            for (byte b : utf8) {
+                if (b == 32 && spaceplus) {
+                    out.append('+');
+                } else {
+                    boolean found = false;
+                    for (byte a : allow8) {
+                        if (a == b) {
+                            found = true;
+                            break;
+                        }
+                    }
+                    if (found) {
+                        out.append((char)b);
+                    } else {
+                        String c = Integer.toHexString(b);
+                        out.append(esc);
+                        if (c.length() < 2)
+                            out.append('0');
+                        out.append(c);
+                    }
+                }
+            }
+            return out.toString();
+        } catch (Exception e) {
+            return in;
+        }
+    }
+
+    private static String escapeString(String in, String allowable) {
+        return xescapeString(in, allowable, '%', false);
+    }
+
+    private static String xunescapeString(String in, char escape, boolean spaceplus) {
+        try {
+            if (in == null)
+                return null;
+            byte[] utf8 = in.getBytes(utf8Charset);
+            byte escape8 = (byte)escape;
+            byte[] out = new byte[utf8.length];
+            int index8 = 0;
+            for (int i = 0; i < utf8.length; ) {
+                byte b = utf8[i++];
+                if (b == 43 && spaceplus) {
+                    out[index8++] = 32;
+                } else if (b == escape8) {
+                    if (i + 2 <= utf8.length) {
+                        b = (byte)(fromHex(utf8[i]) << 4 | fromHex(utf8[i + 1]));
+                        i += 2;
+                    }
+                }
+                out[index8++] = b;
+            }
+            return new String(out, 0, index8, utf8Charset);
+        } catch (Exception e) {
+            return in;
+        }
+    }
+
+    private static String unescapeString(String in) {
+        return xunescapeString(in, '%', false);
+    }
+
+    private static byte fromHex(byte b) throws NumberFormatException {
+        if (b >= 48 && b <= 57)
+            return (byte)(b - 48);
+        if (b >= 97 && b <= 102)
+            return (byte)(10 + b - 97);
+        if (b >= 65 && b <= 70)
+            return (byte)(10 + b - 65);
+        throw new NumberFormatException("Illegal hex character: " + b);
+    }
+
+    private static final Pattern p = Pattern.compile("([\\w]+)://([.\\w]+(:[\\d]+)?)([/][^?#])?([?][^#]*)?([#].*)?");
+
+    public static String escapeURL(String surl) {
+        String protocol = null;
+        String authority = null;
+        String path = null;
+        String query = null;
+        String fragment = null;
+        URL u = null;
+        try {
+            u = new URL(surl);
+        } catch (MalformedURLException e) {
+            return null;
+        }
+        protocol = u.getProtocol();
+        authority = u.getAuthority();
+        path = u.getPath();
+        query = u.getQuery();
+        fragment = u.getRef();
+        StringBuilder url = new StringBuilder();
+        url.append(protocol);
+        url.append("://");
+        url.append(authority);
+        if (path != null && path.length() > 0) {
+            String[] pieces = path.split("[/]", -1);
+            for (int i = 0; i < pieces.length; i++) {
+                String p = pieces[i];
+                if (p == null)
+                    p = "";
+                if (i > 0)
+                    url.append("/");
+                url.append(urlEncode(p));
+            }
+        }
+        if (query != null && query.length() > 0) {
+            url.append("?");
+            url.append(escapeURLQuery(query));
+        }
+        if (fragment != null && fragment.length() > 0) {
+            url.append("#");
+            url.append(urlEncode(fragment));
+        }
+        return url.toString();
+    }
+
+    static int nextpiece(String s, int index, String sep) {
+        index = s.indexOf(sep, index);
+        if (index < 0)
+            index = s.length();
+        return index;
+    }
+
+    public static String escapeURLQuery(String ce) {
+        try {
+            ce = escapeString(ce, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&'()*+,-./:;=?@_~");
+        } catch (Exception e) {
+            ce = null;
+        }
+        return ce;
+    }
+
+    public static String unescapeURLQuery(String ce) {
+        try {
+            ce = unescapeString(ce);
+        } catch (Exception e) {
+            ce = null;
+        }
+        return ce;
+    }
+
+    public static String urlEncode(String s) {
+        s = escapeString(s, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$&'()*+,-./:;=?@_~");
+        return s;
+    }
+
+    public static String urlDecode(String s) {
+        try {
+            s = URLDecoder.decode(s, "UTF-8");
+        } catch (Exception e) {
+            s = null;
+        }
+        return s;
+    }
+}

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

@@ -1,16 +1,35 @@
 package com.x.base.core.project.tools;
 
+import java.lang.reflect.Field;
+
 import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.lang3.reflect.FieldUtils;
 
 public class PropertyTools {
 	@SuppressWarnings("unchecked")
 	public static <T> T getOrElse(Object bean, String name, Class<T> cls, T defaultObject) throws Exception {
-		if ((null != bean) && PropertyUtils.isReadable(bean, name)) {
-			Object o = PropertyUtils.getProperty(bean, name);
-			if (null != o) {
-				return (T) o;
+		if (null != bean) {
+			try {
+				// 如果使用PropertyUtils.isReadable那么Nested就会失效,无法获取map类型中的值.
+				// Object o = PropertyUtils.getNestedProperty(bean, name);
+				Object o = PropertyUtils.getProperty(bean, name);
+				if (null != o) {
+					return (T) o;
+				}
+			} catch (NoSuchMethodException e) {
+				// java.lang.NoSuchMethodException: Unknown property 'abc' on class 'class
+				// java.lang.Object'
+				// nothing pass
+			}
+			Field field = FieldUtils.getField(bean.getClass(), name, true);
+			if (null != field) {
+				Object o = FieldUtils.readField(field, bean, true);
+				if (null != o) {
+					return (T) o;
+				}
 			}
 		}
 		return defaultObject;
 	}
-}
+
+}

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

@@ -1,5 +1,7 @@
 package com.x.base.core.project.tools;
 
+import static java.util.Locale.ENGLISH;
+
 import java.io.ByteArrayInputStream;
 import java.io.InputStreamReader;
 import java.lang.reflect.Field;
@@ -29,6 +31,8 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.reflect.FieldUtils;
 import org.slf4j.helpers.MessageFormatter;
 
+import com.alibaba.druid.sql.visitor.functions.Char;
+
 public class StringTools {
 
 	// 脚本文本
@@ -365,28 +369,6 @@ public class StringTools {
 
 	public static boolean matchWildcard(String str, String pattern) {
 		return Objects.toString(str, "").matches(Objects.toString(pattern, "").replace("?", ".?").replace("*", ".*?"));
-		// if (StringUtils.isNotEmpty(str) && StringUtils.isNotEmpty(pattern) &&
-		// StringUtils.contains(pattern, "*")) {
-		// if (StringUtils.equals(pattern, "*")) {
-		// return true;
-		// }
-		// if (StringUtils.startsWith(pattern, "*")) {
-		// return StringUtils.endsWith(str, StringUtils.substringAfter(pattern, "*"));
-		// }
-		// if (StringUtils.endsWith(pattern, "*")) {
-		// return StringUtils.startsWith(str, StringUtils.substringBeforeLast(pattern,
-		// "*"));
-		// }
-		// String[] parts = StringUtils.split(pattern, "*", 2);
-		// if (StringUtils.startsWith(str, parts[0]) && StringUtils.endsWith(str,
-		// parts[1])) {
-		// return true;
-		// } else {
-		// return false;
-		// }
-		// } else {
-		// return StringUtils.equals(str, pattern);
-		// }
 	}
 
 	public static List<String> includesExcludesWithWildcard(List<String> list, Collection<String> includes,
@@ -544,4 +526,26 @@ public class StringTools {
 		return result.toArray(new String[result.size()]);
 	}
 
+	public static String getMethodName(String name) {
+		return methodName("get", name);
+	}
+
+	public static String setMethodName(String name) {
+		return methodName("set", name);
+	}
+
+	private static String methodName(String getOrSet, String name) {
+		if (StringUtils.isEmpty(name) || StringUtils.isEmpty(getOrSet)) {
+			return name;
+		}
+		StringBuilder sb = new StringBuilder();
+		sb.append(getOrSet);
+		if ((name.length() > 1) && (StringUtils.isAllLowerCase(name.substring(0, 1))
+				&& StringUtils.isAllUpperCase(name.substring(1, 2)))) {
+			sb.append(name);
+		} else {
+			sb.append(StringUtils.capitalize(name));
+		}
+		return sb.toString();
+	}
 }

+ 8 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/utils/time/WorkTime.java

@@ -85,4 +85,12 @@ public class WorkTime extends BaseWorkTime {
 		return false;
 	}
 
+	public boolean isWorkDay(Date d) {
+		return !this.isHoliday(DateUtils.toCalendar(d));
+	}
+
+	public boolean isWorkDay(Calendar c) {
+		return !this.isHoliday(c);
+	}
+
 }

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

@@ -1,5 +1,6 @@
 package com.x.base.core.project;
 
+import com.x.base.core.entity.StorageType;
 import com.x.base.core.project.annotation.Module;
 import com.x.base.core.project.annotation.ModuleCategory;
 import com.x.base.core.project.annotation.ModuleType;
@@ -10,6 +11,6 @@ import com.x.base.core.project.annotation.ModuleType;
 		"com.x.organization.core.entity.Identity", "com.x.organization.core.entity.PersonAttribute",
 		"com.x.organization.core.entity.Unit", "com.x.organization.core.entity.UnitAttribute",
 		"com.x.organization.core.entity.PersonCard","com.x.organization.core.entity.PermissionSetting",
-		"com.x.organization.core.entity.UnitDuty" }, storeJars = { "x_organization_core_entity" })
+		"com.x.organization.core.entity.UnitDuty", "com.x.general.core.entity.file.GeneralFile" },storageTypes = { StorageType.general},  storeJars = { "x_organization_core_entity" ,"x_general_core_entity"})
 public class x_organization_assemble_control extends Deployable {
 }

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

@@ -7,7 +7,8 @@ import com.x.base.core.project.annotation.ModuleType;
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "门户设计", packageName = "com.x.portal.assemble.designer", containerEntities = {
 		"com.x.portal.core.entity.Portal", "com.x.portal.core.entity.Widget", "com.x.portal.core.entity.Page",
 		"com.x.portal.core.entity.Script", "com.x.portal.core.entity.File",
-		"com.x.portal.core.entity.TemplatePage" }, storeJars = { "x_organization_core_entity",
-				"x_organization_core_express", "x_portal_core_entity" })
+		"com.x.portal.core.entity.TemplatePage", "com.x.cms.core.entity.element.Script",
+		"com.x.processplatform.core.entity.element.Script" }, storeJars = { "x_organization_core_entity",
+				"x_organization_core_express", "x_portal_core_entity", "x_cms_core_entity", "x_processplatform_core_entity" })
 public class x_portal_assemble_designer extends Deployable {
 }

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

@@ -6,7 +6,9 @@ import com.x.base.core.project.annotation.ModuleType;
 
 @Module(type = ModuleType.ASSEMBLE, category = ModuleCategory.OFFICIAL, name = "门户", packageName = "com.x.portal.assemble.surface", containerEntities = {
 		"com.x.portal.core.entity.Portal", "com.x.portal.core.entity.Widget", "com.x.portal.core.entity.Page",
-		"com.x.portal.core.entity.Script", "com.x.portal.core.entity.File" }, storeJars = {
-				"x_organization_core_entity", "x_organization_core_express", "x_portal_core_entity" })
+		"com.x.portal.core.entity.Script", "com.x.portal.core.entity.File", "com.x.cms.core.entity.element.Script",
+		"com.x.processplatform.core.entity.element.Script" }, storeJars = {
+		"x_organization_core_entity", "x_organization_core_express", "x_portal_core_entity", "x_cms_core_entity",
+		"x_processplatform_core_entity" })
 public class x_portal_assemble_surface extends Deployable {
 }

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

@@ -29,9 +29,11 @@ import com.x.base.core.project.annotation.ModuleType;
 		"com.x.processplatform.core.entity.element.Form", "com.x.processplatform.core.entity.element.FormField",
 		"com.x.processplatform.core.entity.element.Embed", "com.x.processplatform.core.entity.element.Mapping",
 		"com.x.processplatform.core.entity.log.SignalStackLog", "com.x.query.core.entity.Item",
+		"com.x.cms.core.entity.element.Script", "com.x.portal.core.entity.Script",
 		"com.x.query.dynamic.entity.*" }, storageTypes = { StorageType.processPlatform }, storeJars = {
 				"x_organization_core_entity", "x_organization_core_express", "x_processplatform_core_entity",
-				"x_processplatform_core_express", "x_query_core_entity" }, dynamicJars = { "x_query_dynamic_entity" })
+				"x_processplatform_core_express", "x_query_core_entity", "x_cms_core_entity",
+				"x_portal_core_entity" }, dynamicJars = { "x_query_dynamic_entity" })
 public class x_processplatform_service_processing extends Deployable {
 
 }

+ 6 - 0
o2server/x_bbs_assemble_control/pom.xml

@@ -124,6 +124,12 @@
 					</execution>
 				</executions>
 			</plugin>
+			<plugin>
+				<artifactId>maven-deploy-plugin</artifactId>
+				<configuration>
+					<skip>true</skip>
+				</configuration>
+			</plugin>
 		</plugins>
 	</build>
 </project>

+ 6 - 0
o2server/x_calendar_assemble_control/pom.xml

@@ -124,6 +124,12 @@
 					</execution>
 				</executions>
 			</plugin>
+			<plugin>
+				<artifactId>maven-deploy-plugin</artifactId>
+				<configuration>
+					<skip>true</skip>
+				</configuration>
+			</plugin>
 		</plugins>
 	</build>
 </project>

+ 6 - 0
o2server/x_cms_assemble_control/pom.xml

@@ -144,6 +144,12 @@
 					</execution>
 				</executions>
 			</plugin>
+			<plugin>
+				<artifactId>maven-deploy-plugin</artifactId>
+				<configuration>
+					<skip>true</skip>
+				</configuration>
+			</plugin>
 		</plugins>
 	</build>
 </project>

+ 2 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/ActionApplication.java

@@ -9,6 +9,7 @@ import com.x.cms.assemble.control.jaxrs.appinfo.AppInfoAnonymousAction;
 import com.x.cms.assemble.control.jaxrs.appinfo.AppInfoConfigAction;
 import com.x.cms.assemble.control.jaxrs.categoryinfo.CategoryInfoAction;
 import com.x.cms.assemble.control.jaxrs.categoryinfo.CategoryInfoAnonymousAction;
+import com.x.cms.assemble.control.jaxrs.commend.DocumentCommendAction;
 import com.x.cms.assemble.control.jaxrs.comment.DocumentCommentInfoAction;
 import com.x.cms.assemble.control.jaxrs.data.DataAction;
 import com.x.cms.assemble.control.jaxrs.document.DocumentAction;
@@ -85,6 +86,7 @@ public class ActionApplication extends AbstractActionApplication {
 		this.classes.add(FormAnonymousAction.class);
 		this.classes.add(ScriptAnonymousAction.class);
 		this.classes.add(DocumentCommentInfoAction.class);
+		this.classes.add(DocumentCommendAction.class);
 
 		return this.classes;
 	}

+ 3 - 2
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/CmsJaxrsFilter.java

@@ -1,6 +1,6 @@
 package com.x.cms.assemble.control.jaxrs;
 
-import com.x.base.core.project.jaxrs.ManagerUserJaxrsFilter;
+import com.x.base.core.project.jaxrs.CipherManagerUserJaxrsFilter;
 
 import javax.servlet.annotation.WebFilter;
 
@@ -37,8 +37,9 @@ import javax.servlet.annotation.WebFilter;
         "/jaxrs/permission/*",
         "/jaxrs/docpermission/*",
         "/jaxrs/comment/*",
+        "/jaxrs/commend/*",
         "/servlet/*"
 }, asyncSupported = true)
-public class CmsJaxrsFilter extends ManagerUserJaxrsFilter {
+public class CmsJaxrsFilter extends CipherManagerUserJaxrsFilter {
 
 }

+ 2 - 1
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appdictdesign/ActionCreate.java

@@ -13,6 +13,7 @@ import com.x.base.core.entity.dataitem.ItemCategory;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
 import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
@@ -47,7 +48,7 @@ class ActionCreate extends BaseAction {
 				emc.persist(o, CheckPersistType.all);
 			}
 			emc.commit();
-			ApplicationCache.notify(AppDict.class);
+			CacheManager.notify(AppDict.class);
 			Wo wo = new Wo();
 			wo.setId(appInfoDict.getId());
 			result.setData(wo);

+ 2 - 1
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appdictdesign/ActionDelete.java

@@ -6,6 +6,7 @@ import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.annotation.CheckRemoveType;
 import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
@@ -37,7 +38,7 @@ class ActionDelete extends BaseAction {
 			emc.beginTransaction(AppDict.class);
 			emc.remove(dict, CheckRemoveType.all);
 			emc.commit();
-			ApplicationCache.notify(AppDict.class);
+			CacheManager.notify(AppDict.class);
 			Wo wo = new Wo();
 			wo.setId(dict.getId());
 			result.setData(wo);

+ 2 - 1
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appdictdesign/ActionEdit.java

@@ -13,6 +13,7 @@ import com.x.base.core.entity.dataitem.ItemCategory;
 import com.x.base.core.project.bean.WrapCopier;
 import com.x.base.core.project.bean.WrapCopierFactory;
 import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
@@ -63,7 +64,7 @@ class ActionEdit extends BaseAction {
 				emc.persist(o, CheckPersistType.all);
 			}
 			emc.commit();
-			ApplicationCache.notify(AppDict.class);
+			CacheManager.notify(AppDict.class);
 			Wo wo = new Wo();
 			wo.setId(dict.getId());
 			result.setData(wo);

+ 23 - 29
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoAction.java

@@ -9,10 +9,8 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
 import org.glassfish.jersey.media.multipart.FormDataParam;
 
@@ -28,7 +26,6 @@ import java.util.List;
 @JaxrsDescribe("信息发布(CMS)-栏目(APPINFO)管理服务")
 public class AppInfoAction extends StandardJaxrsAction {
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private static  Logger logger = LoggerFactory.getLogger(AppInfoAction.class);
 
 	@JaxrsMethodDescribe(value = "创建新的栏目信息或者更新已存在的栏目信息。", action = ActionSave.class)
@@ -41,7 +38,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		Boolean check = true;
 		if (check) {
 			try {
-				result = ((ActionSave)proxy.getProxy(ActionSave.class)).execute( request, effectivePerson, jsonElement );
+				result = new ActionSave().execute( request, effectivePerson, jsonElement );
 			} catch (Exception e) {
 				result = new ActionResult<>();
 				Exception exception = new ExceptionAppInfoProcess(e, "栏目信息保存时发生异常。");
@@ -62,7 +59,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionDelete.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionDelete)proxy.getProxy(ActionDelete.class)).execute(request, effectivePerson, id);
+			result = new ActionDelete().execute(request, effectivePerson, id);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e, "根据ID删除CMS应用信息对象发生未知异常,ID:" + id);
@@ -84,7 +81,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		Boolean check = true;
 		if( check ){
 			try {
-				result = ((ActionQueryGetControl)proxy.getProxy(ActionQueryGetControl.class)).execute( request, id, effectivePerson );
+				result = new ActionQueryGetControl().execute( request, id, effectivePerson );
 			} catch (Exception e) {
 				result = new ActionResult<>();
 				result.error( e );
@@ -104,7 +101,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionEraseDocumentWithAppInfo.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionEraseDocumentWithAppInfo)proxy.getProxy(ActionEraseDocumentWithAppInfo.class)).execute(request, id, effectivePerson );
+			result = new ActionEraseDocumentWithAppInfo().execute(request, id, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e, "根据栏目ID删除所有的信息文档发生未知异常,ID:" + id);
@@ -124,7 +121,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<BaseAction.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionGet)proxy.getProxy(ActionGet.class)).execute( request, effectivePerson, flag );
+			result = new ActionGet().execute( request, effectivePerson, flag );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e, "根据指定ID查询应用栏目信息对象时发生异常。flag:" + flag );
@@ -143,7 +140,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<BaseAction.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionGetByAlias)proxy.getProxy(ActionGetByAlias.class)).execute(request, effectivePerson, alias);
+			result = new ActionGetByAlias().execute(request, effectivePerson, alias);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e, "根据指定应用唯一标识查询应用栏目信息对象时发生异常。ALIAS:" + alias);
@@ -163,7 +160,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionListWhatICanViewArticle_WithAppType.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanViewArticle_WithAppType)proxy.getProxy(ActionListWhatICanViewArticle_WithAppType.class)).execute(request, effectivePerson, appType );
+			result = new ActionListWhatICanViewArticle_WithAppType().execute(request, effectivePerson, appType );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -183,7 +180,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionListWhatICanViewArticle.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanViewArticle)proxy.getProxy(ActionListWhatICanViewArticle.class)).execute(request, effectivePerson);
+			result = new ActionListWhatICanViewArticle().execute(request, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -203,7 +200,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionListWhatICanViewData.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanViewData)proxy.getProxy(ActionListWhatICanViewData.class)).execute(request, effectivePerson);
+			result = new ActionListWhatICanViewData().execute(request, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -224,7 +221,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionListWhatICanViewData.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanViewData_WithAppType)proxy.getProxy(ActionListWhatICanViewData_WithAppType.class)).execute(request, effectivePerson, appType );
+			result = new ActionListWhatICanViewData_WithAppType().execute(request, effectivePerson, appType );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -245,7 +242,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionListWhatICanViewAllDocType.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanViewAllDocType_WithAppType)proxy.getProxy(ActionListWhatICanViewAllDocType_WithAppType.class)).execute( request, effectivePerson, appType );
+			result = new ActionListWhatICanViewAllDocType_WithAppType().execute( request, effectivePerson, appType );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -265,7 +262,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionListWhatICanViewAllDocType.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanViewAllDocType)proxy.getProxy(ActionListWhatICanViewAllDocType.class)).execute(request, effectivePerson);
+			result = new ActionListWhatICanViewAllDocType().execute(request, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -285,7 +282,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<BaseAction.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanPublish)proxy.getProxy(ActionListWhatICanPublish.class)).execute(request, effectivePerson);
+			result = new ActionListWhatICanPublish().execute(request, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -306,8 +303,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<BaseAction.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanPublish_WithAppType)proxy.getProxy(ActionListWhatICanPublish_WithAppType.class))
-					.execute(request, effectivePerson, appType );
+			result = new ActionListWhatICanPublish_WithAppType().execute(request, effectivePerson, appType );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -328,7 +324,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<BaseAction.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionGetPublishableAppInfo)proxy.getProxy(ActionGetPublishableAppInfo.class)).execute(request, effectivePerson, appId );
+			result = new ActionGetPublishableAppInfo().execute(request, effectivePerson, appId );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -348,7 +344,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionListAllAppType.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListAllAppType)proxy.getProxy(ActionListAllAppType.class)).execute(request, effectivePerson);
+			result = new ActionListAllAppType().execute(request, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -368,7 +364,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionListAllManageableAppType.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListAllManageableAppType)proxy.getProxy(ActionListAllManageableAppType.class)).execute(request, effectivePerson);
+			result = new ActionListAllManageableAppType().execute(request, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -388,8 +384,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<BaseAction.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanManage)proxy.getProxy(ActionListWhatICanManage.class))
-					.execute(request, effectivePerson);
+			result = new ActionListWhatICanManage().execute(request, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -410,8 +405,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<BaseAction.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanManage_WithAppType)proxy.getProxy(ActionListWhatICanManage_WithAppType.class))
-					.execute(request, effectivePerson, appType);
+			result = new ActionListWhatICanManage_WithAppType().execute(request, effectivePerson, appType);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e,
@@ -431,7 +425,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<BaseAction.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListAll)proxy.getProxy(ActionListAll.class)).execute(request, effectivePerson);
+			result = new ActionListAll().execute(request, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e, "查询所有应用栏目信息对象时发生异常");
@@ -453,7 +447,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionListNextWithFilter.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListNextWithFilter)proxy.getProxy(ActionListNextWithFilter.class)).execute(request, effectivePerson, id, count, jsonElement );
+			result = new ActionListNextWithFilter().execute(request, effectivePerson, id, count, jsonElement );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e, "查询栏目信息对象时发生异常");
@@ -475,7 +469,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionListPrevWithFilter.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListPrevWithFilter)proxy.getProxy(ActionListPrevWithFilter.class)).execute(request, effectivePerson, id, count, jsonElement);
+			result = new ActionListPrevWithFilter().execute(request, effectivePerson, id, count, jsonElement);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e, "查询栏目信息对象时发生异常");
@@ -499,7 +493,7 @@ public class AppInfoAction extends StandardJaxrsAction {
 		ActionResult<ActionAppIconUpload.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionAppIconUpload)proxy.getProxy(ActionAppIconUpload.class)).execute(request, effectivePerson, appId, size, bytes, disposition );
+			result = new ActionAppIconUpload().execute(request, effectivePerson, appId, size, bytes, disposition );
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);

+ 2 - 6
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoAnonymousAction.java

@@ -9,10 +9,8 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.*;
@@ -26,7 +24,6 @@ import java.util.List;
 @Path("anonymous/appinfo")
 public class AppInfoAnonymousAction extends StandardJaxrsAction {
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private static Logger logger = LoggerFactory.getLogger(AppInfoAnonymousAction.class);
 
 	@JaxrsMethodDescribe(value = "根据标识获取信息栏目信息对象.", action = ActionGetAnonymous.class)
@@ -38,7 +35,7 @@ public class AppInfoAnonymousAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<BaseAction.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionGetAnonymous)proxy.getProxy(ActionGetAnonymous.class)).execute( request, effectivePerson, flag );
+			result = new ActionGetAnonymous().execute( request, effectivePerson, flag );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e, "根据指定ID查询应用栏目信息对象时发生异常。flag:" + flag );
@@ -60,8 +57,7 @@ public class AppInfoAnonymousAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionListNextWithFilterAnonymous.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListNextWithFilterAnonymous)proxy.getProxy(ActionListNextWithFilterAnonymous.class))
-					.execute(request, effectivePerson, id, count, jsonElement );
+			result = new ActionListNextWithFilterAnonymous().execute(request, effectivePerson, id, count, jsonElement );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e, "查询栏目信息对象时发生异常");

+ 2 - 5
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoConfigAction.java

@@ -10,10 +10,8 @@ import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
 import com.x.base.core.project.jaxrs.WoText;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.*;
@@ -26,7 +24,6 @@ import javax.ws.rs.core.MediaType;
 @JaxrsDescribe("信息发布(CMS)-栏目配置支持信息(APPINFOCONFIG)管理服务")
 public class AppInfoConfigAction extends StandardJaxrsAction {
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private static  Logger logger = LoggerFactory.getLogger(AppInfoConfigAction.class);
 
 	@JaxrsMethodDescribe(value = "更新栏目配置支持信息,JSON格式。", action = ActionSaveConfig.class)
@@ -42,7 +39,7 @@ public class AppInfoConfigAction extends StandardJaxrsAction {
 		Boolean check = true;
 		if (check) {
 			try {
-				result = ((ActionSaveConfig)proxy.getProxy(ActionSaveConfig.class)).execute( request, effectivePerson, appId, jsonElement );
+				result = new ActionSaveConfig().execute( request, effectivePerson, appId, jsonElement );
 			} catch (Exception e) {
 				result = new ActionResult<>();
 				Exception exception = new ExceptionAppInfoProcess(e, "栏目信息保存时发生异常。");
@@ -63,7 +60,7 @@ public class AppInfoConfigAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<WoText> result = new ActionResult<>();
 		try {
-			result = ((ActionGetConfig)proxy.getProxy(ActionGetConfig.class)).execute( request, effectivePerson, id );
+			result = new ActionGetConfig().execute( request, effectivePerson, id );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionAppInfoProcess(e, "根据指定ID查询应用栏目配置支持信息时发生异常。id:" + id );

+ 1 - 4
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoExportAction.java

@@ -8,10 +8,8 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.*;
@@ -24,7 +22,6 @@ import javax.ws.rs.core.MediaType;
 @JaxrsDescribe("信息发布栏目导出服务")
 public class AppInfoExportAction extends StandardJaxrsAction {
 
-    private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private static  Logger logger = LoggerFactory.getLogger(AppInfoExportAction.class);
 
     @JaxrsMethodDescribe(value = "根据ID导出栏目信息对象所有设计.", action = ActionAppInfoExport.class)
@@ -36,7 +33,7 @@ public class AppInfoExportAction extends StandardJaxrsAction {
         EffectivePerson effectivePerson = this.effectivePerson(request);
         ActionResult<ActionAppInfoExport.Wo> result = new ActionResult<>();
         try {
-            result = ((ActionAppInfoExport)proxy.getProxy(ActionAppInfoExport.class)).execute( request, effectivePerson, id );
+            result = new ActionAppInfoExport().execute( request, effectivePerson, id );
         } catch (Exception e) {
             result = new ActionResult<>();
             Exception exception = new ExceptionAppInfoProcess(e, "根据指定ID导出栏目信息对象时发生异常。ID:" + id );

+ 1 - 4
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoImportAction.java

@@ -8,10 +8,8 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.*;
@@ -24,7 +22,6 @@ import javax.ws.rs.core.MediaType;
 @JaxrsDescribe("信息发布栏目导入服务")
 public class AppInfoImportAction extends StandardJaxrsAction {
 
-    private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private static  Logger logger = LoggerFactory.getLogger(AppInfoImportAction.class);
 
     @JaxrsMethodDescribe(value = "根据别名获取信息栏目信息对象.", action = ActionGetByAlias.class)
@@ -36,7 +33,7 @@ public class AppInfoImportAction extends StandardJaxrsAction {
         EffectivePerson effectivePerson = this.effectivePerson(request);
         ActionResult<BaseAction.Wo> result = new ActionResult<>();
         try {
-            result = ((ActionGetByAlias)proxy.getProxy(ActionGetByAlias.class)).execute(request, effectivePerson, id);
+            result = new ActionGetByAlias().execute(request, effectivePerson, id);
         } catch (Exception e) {
             result = new ActionResult<>();
             Exception exception = new ExceptionAppInfoProcess(e, "根据指定应用唯一标识查询应用栏目信息对象时发生异常。ALIAS:" + id);

+ 5 - 4
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionDelete.java

@@ -2,6 +2,7 @@ package com.x.cms.assemble.control.jaxrs.categoryinfo;
 
 import com.x.base.core.project.annotation.AuditLog;
 import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
@@ -71,10 +72,10 @@ public class ActionDelete extends BaseAction {
 						CmsBatchOperationProcessService.OPT_TYPE_DELETE, id, id, "删除分类:ID=" + id );
 				
 				new LogService().log(null, effectivePerson.getDistinguishedName(), categoryInfo.getAppName() + "-" + categoryInfo.getCategoryName(), id, "", "", "", "CATEGORY", "删除");
-				
-				ApplicationCache.notify( AppInfo.class );
-				ApplicationCache.notify( CategoryInfo.class );
-				ApplicationCache.notify( ViewCategory.class );
+
+				CacheManager.notify( AppInfo.class );
+				CacheManager.notify( CategoryInfo.class );
+				CacheManager.notify( ViewCategory.class );
 			} catch (Exception e) {
 				Exception exception = new ExceptionCategoryInfoProcess(e, "分类信息在删除时发生异常。ID:" + id);
 				result.error(exception);

+ 6 - 5
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionSave.java

@@ -7,6 +7,7 @@ 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.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
@@ -190,11 +191,11 @@ public class ActionSave extends BaseAction {
 				}else {
 					new LogService().log(null, effectivePerson.getDistinguishedName(), categoryInfo.getAppName() + "-" + categoryInfo.getCategoryName(), categoryInfo.getId(), "", "", "", "CATEGORY", "新增");
 				}
-				
-				ApplicationCache.notify(AppInfo.class);
-				ApplicationCache.notify(CategoryInfo.class);
-				ApplicationCache.notify(ViewCategory.class);
-				ApplicationCache.notify(Document.class);
+
+				CacheManager.notify(AppInfo.class);
+				CacheManager.notify(CategoryInfo.class);
+				CacheManager.notify(ViewCategory.class);
+				CacheManager.notify(Document.class);
 			} catch (Exception e) {
 				check = false;
 				Exception exception = new ExceptionCategoryInfoProcess(e, "分类信息在保存时发生异常.");

+ 15 - 18
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/CategoryInfoAction.java

@@ -9,10 +9,8 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.*;
@@ -27,7 +25,6 @@ import java.util.List;
 @JaxrsDescribe("信息发布内容分类管理")
 public class CategoryInfoAction extends StandardJaxrsAction{
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private static  Logger logger = LoggerFactory.getLogger( CategoryInfoAction.class );
 	
 	@JaxrsMethodDescribe(value = "创建或者更新信息分类信息对象.", action = ActionSave.class)
@@ -40,7 +37,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		Boolean check = true;
 		if( check ){
 			try {
-				result = ((ActionSave)proxy.getProxy(ActionSave.class)).execute( request, effectivePerson, jsonElement );
+				result = new ActionSave().execute( request, effectivePerson, jsonElement );
 			} catch (Exception e) {
 				result = new ActionResult<>();
 				Exception exception = new ExceptionCategoryInfoProcess( e, "分类信息在保存时发生异常." );
@@ -62,7 +59,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<ActionSaveImportView.Wo> result = null;
 		try {
-			result = ((ActionSaveImportView)proxy.getProxy(ActionSaveImportView.class)).execute( request, effectivePerson, categoryId, jsonElement );
+			result = new ActionSaveImportView().execute( request, effectivePerson, categoryId, jsonElement );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "为分类绑定导入数据的列表ID时发生异常。categoryId:"+ categoryId );
@@ -83,7 +80,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		Boolean check = true;
 		if( check ){
 			try {
-				result = ((ActionSaveExtContent)proxy.getProxy(ActionSaveExtContent.class)).execute( request, effectivePerson, jsonElement );
+				result = new ActionSaveExtContent().execute( request, effectivePerson, jsonElement );
 			} catch (Exception e) {
 				result = new ActionResult<>();
 				Exception exception = new ExceptionCategoryInfoProcess( e, "分类扩展信息在保存时发生异常." );
@@ -104,7 +101,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<ActionDelete.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionDelete)proxy.getProxy(ActionDelete.class)).execute( request, id, effectivePerson );
+			result = new ActionDelete().execute( request, id, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "分类信息在删除时发生异常。ID:" + id );
@@ -124,7 +121,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionEraseDocumentWithCategory.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionEraseDocumentWithCategory)proxy.getProxy(ActionEraseDocumentWithCategory.class)).execute(request, id, effectivePerson );
+			result = new ActionEraseDocumentWithCategory().execute(request, id, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess(e, "根据分类ID删除所有的信息文档发生未知异常,ID:" + id);
@@ -144,7 +141,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListWhatICanView_Article.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanView_Article)proxy.getProxy(ActionListWhatICanView_Article.class)).execute( request, appId, effectivePerson );
+			result = new ActionListWhatICanView_Article().execute( request, appId, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "根据指定应用栏目ID查询分类信息列表时发生异常。ID:" + appId );
@@ -164,7 +161,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListWhatICanView_Data.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanView_Data)proxy.getProxy(ActionListWhatICanView_Data.class)).execute( request, appId, effectivePerson );
+			result = new ActionListWhatICanView_Data().execute( request, appId, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "根据指定应用栏目ID查询分类信息列表时发生异常。ID:" + appId );
@@ -184,7 +181,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListWhatICanView_AllType.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanView_AllType)proxy.getProxy(ActionListWhatICanView_AllType.class)).execute( request, appId, effectivePerson );
+			result = new ActionListWhatICanView_AllType().execute( request, appId, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "根据指定应用栏目ID查询分类信息列表时发生异常。ID:" + appId );
@@ -204,7 +201,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListWhatICanPublish.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanPublish)proxy.getProxy(ActionListWhatICanPublish.class)).execute( request, appId, effectivePerson );
+			result = new ActionListWhatICanPublish().execute( request, appId, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "根据应用栏目ID查询分类信息对象时发生异常。AppId:" + appId );
@@ -223,7 +220,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListAll.Wo>> result = null;
 		try {
-			result = ((ActionListAll)proxy.getProxy(ActionListAll.class)).execute( request, effectivePerson );
+			result = new ActionListAll().execute( request, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "查询所有分类信息对象时发生异常。" );
@@ -243,7 +240,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<ActionGet.Wo> result = null;
 		try {
-			result = ((ActionGet)proxy.getProxy(ActionGet.class)).execute( request, flag, effectivePerson );
+			result = new ActionGet().execute( request, flag, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "根据ID查询分类信息对象时发生异常。flag:" + flag );
@@ -265,7 +262,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		Boolean check = true;
 		if( check ){
 			try {
-				result = ((ActionQueryGetControl)proxy.getProxy(ActionQueryGetControl.class)).execute( request, id, effectivePerson );
+				result = new ActionQueryGetControl().execute( request, id, effectivePerson );
 			} catch (Exception e) {
 				result = new ActionResult<>();
 				result.error( e );
@@ -285,7 +282,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<ActionGetByAlias.Wo> result = null;
 		try {
-			result = ((ActionGetByAlias)proxy.getProxy(ActionGetByAlias.class)).execute( request, alias, effectivePerson );
+			result = new ActionGetByAlias().execute( request, alias, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "根据标识查询分类信息对象时发生异常。ALIAS:"+ alias );
@@ -308,7 +305,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListNextWithFilter.Wo>> result = null;
 		try {
-			result = ((ActionListNextWithFilter)proxy.getProxy(ActionListNextWithFilter.class)).execute( request, effectivePerson, id, count, jsonElement);
+			result = new ActionListNextWithFilter().execute( request, effectivePerson, id, count, jsonElement);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "列示根据过滤条件的信息分类时发生异常。" );
@@ -331,7 +328,7 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListPrevWithFilter.Wo>> result = null;
 		try {
-			result = ((ActionListPrevWithFilter)proxy.getProxy(ActionListPrevWithFilter.class)).execute( request, effectivePerson, id, count, jsonElement);
+			result = new ActionListPrevWithFilter().execute( request, effectivePerson, id, count, jsonElement);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "列示根据过滤条件的信息分类时发生异常。" );

+ 6 - 9
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/CategoryInfoAnonymousAction.java

@@ -9,10 +9,8 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.*;
@@ -27,7 +25,6 @@ import java.util.List;
 @JaxrsDescribe("可匿名访问的信息发布内容分类管理服务")
 public class CategoryInfoAnonymousAction extends StandardJaxrsAction{
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private static  Logger logger = LoggerFactory.getLogger( CategoryInfoAnonymousAction.class );
 	
 	@JaxrsMethodDescribe(value = "根据Flag获取分类信息对象.", action = ActionGetAnonymous.class)
@@ -40,7 +37,7 @@ public class CategoryInfoAnonymousAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<ActionGetAnonymous.Wo> result = null;
 		try {
-			result = ((ActionGetAnonymous)proxy.getProxy(ActionGetAnonymous.class)).execute( request, flag, effectivePerson );
+			result = new ActionGetAnonymous().execute( request, flag, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "根据ID查询分类信息对象时发生异常。flag:" + flag );
@@ -63,7 +60,7 @@ public class CategoryInfoAnonymousAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListNextWithFilterAnonymous.Wo>> result = null;
 		try {
-			result = ((ActionListNextWithFilterAnonymous)proxy.getProxy(ActionListNextWithFilterAnonymous.class)).execute( request, effectivePerson, id, count, jsonElement);
+			result = new ActionListNextWithFilterAnonymous().execute( request, effectivePerson, id, count, jsonElement);
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "列示根据过滤条件的信息分类时发生异常。" );
@@ -83,7 +80,7 @@ public class CategoryInfoAnonymousAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListWhatICanView_Article.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanView_Article)proxy.getProxy(ActionListWhatICanView_Article.class)).execute( request, appId, effectivePerson );
+			result = new ActionListWhatICanView_Article().execute( request, appId, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "根据指定应用栏目ID查询分类信息列表时发生异常。ID:" + appId );
@@ -103,7 +100,7 @@ public class CategoryInfoAnonymousAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListWhatICanView_Data.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanView_Data)proxy.getProxy(ActionListWhatICanView_Data.class)).execute( request, appId, effectivePerson );
+			result = new ActionListWhatICanView_Data().execute( request, appId, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "根据指定应用栏目ID查询分类信息列表时发生异常。ID:" + appId );
@@ -123,7 +120,7 @@ public class CategoryInfoAnonymousAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListWhatICanView_AllType.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanView_AllType)proxy.getProxy(ActionListWhatICanView_AllType.class)).execute( request, appId, effectivePerson );
+			result = new ActionListWhatICanView_AllType().execute( request, appId, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "根据指定应用栏目ID查询分类信息列表时发生异常。ID:" + appId );
@@ -143,7 +140,7 @@ public class CategoryInfoAnonymousAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListWhatICanPublish.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListWhatICanPublish)proxy.getProxy(ActionListWhatICanPublish.class)).execute( request, appId, effectivePerson );
+			result = new ActionListWhatICanPublish().execute( request, appId, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCategoryInfoProcess( e, "根据应用栏目ID查询分类信息对象时发生异常。AppId:" + appId );

+ 53 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/commend/ActionGet.java

@@ -0,0 +1,53 @@
+package com.x.cms.assemble.control.jaxrs.commend;
+
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.cache.Cache;
+import com.x.base.core.project.cache.CacheManager;
+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.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.tools.ListTools;
+import com.x.cms.core.entity.DocumentCommend;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Optional;
+
+public class ActionGet extends BaseAction {
+
+	private static  Logger logger = LoggerFactory.getLogger( ActionGet.class );
+	
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wo = null;
+		Cache.CacheKey cacheKey = new Cache.CacheKey( this.getClass(), id );
+		Optional<?> optional = CacheManager.get(cacheCategory, cacheKey );
+
+		if (optional.isPresent()) {
+			result.setData((Wo)optional.get());
+		} else {
+			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+				DocumentCommend dc = emc.find(id, DocumentCommend.class);
+				if (null == dc) {
+					throw new ExceptionEntityNotExist(id, DocumentCommend.class);
+				}
+				wo = Wo.copier.copy( dc );
+				CacheManager.put(cacheCategory, cacheKey, wo);
+				result.setData( wo );
+			}
+		}
+		
+		return result;
+	}
+	
+	public static class Wo extends DocumentCommend {
+
+		static WrapCopier<DocumentCommend, Wo> copier = WrapCopierFactory.wo( DocumentCommend.class, Wo.class, null, ListTools.toList(JpaObject.FieldsInvisible));
+
+	}
+}

+ 61 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/commend/ActionListPaging.java

@@ -0,0 +1,61 @@
+package com.x.cms.assemble.control.jaxrs.commend;
+
+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.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.cms.core.entity.DocumentCommend;
+import com.x.cms.core.entity.DocumentCommend_;
+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 ActionListPaging extends BaseAction {
+	ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, Integer page, Integer size, JsonElement jsonElement) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			ActionResult<List<Wo>> result = new ActionResult<>();
+			Wi wi = this.convertToWrapIn(jsonElement, Wi.class);
+			EntityManager em = emc.get(DocumentCommend.class);
+			CriteriaBuilder cb = em.getCriteriaBuilder();
+			CriteriaQuery<DocumentCommend> cq = cb.createQuery(DocumentCommend.class);
+			Root<DocumentCommend> root = cq.from(DocumentCommend.class);
+			Predicate p = cb.conjunction();
+			if (StringUtils.isNotBlank(wi.getDocumentId())){
+				p = cb.and(p, root.get(DocumentCommend_.documentId).in(wi.getDocumentId()));
+			}
+			if (StringUtils.isNotBlank(wi.getCommendPerson())){
+				p = cb.and(p, root.get(DocumentCommend_.commendPerson).in(wi.getCommendPerson()));
+			}
+			List<Wo> wos = emc.fetchDescPaging(DocumentCommend.class, Wo.copier, p, page, size, DocumentCommend.sequence_FIELDNAME);
+			result.setData(wos);
+			result.setCount(emc.count(DocumentCommend.class, p));
+			return result;
+		}
+	}
+
+	public static class Wi extends DocumentCommend{
+
+		private static final long serialVersionUID = 8042740393049682505L;
+
+		static WrapCopier<Wi, DocumentCommend> copier = WrapCopierFactory.wi(Wi.class, DocumentCommend.class, null,
+				JpaObject.FieldsUnmodify);
+	}
+
+	public static class Wo extends DocumentCommend {
+
+		private static final long serialVersionUID = -1828627584254370972L;
+
+		static WrapCopier<DocumentCommend, Wo> copier = WrapCopierFactory.wo(DocumentCommend.class, Wo.class, null,
+				JpaObject.FieldsInvisible);
+
+	}
+}

+ 12 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/commend/BaseAction.java

@@ -0,0 +1,12 @@
+package com.x.cms.assemble.control.jaxrs.commend;
+
+import com.x.base.core.project.cache.Cache;
+import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.cms.core.entity.Document;
+import com.x.cms.core.entity.DocumentCommend;
+
+public class BaseAction extends StandardJaxrsAction {
+
+	protected Cache.CacheCategory cacheCategory = new Cache.CacheCategory(DocumentCommend.class, Document.class);
+	
+}

+ 64 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/commend/DocumentCommendAction.java

@@ -0,0 +1,64 @@
+package com.x.cms.assemble.control.jaxrs.commend;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.project.annotation.JaxrsDescribe;
+import com.x.base.core.project.annotation.JaxrsMethodDescribe;
+import com.x.base.core.project.annotation.JaxrsParameterDescribe;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.http.HttpMediaType;
+import com.x.base.core.project.jaxrs.ResponseFactory;
+import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.*;
+import javax.ws.rs.container.AsyncResponse;
+import javax.ws.rs.container.Suspended;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import java.util.List;
+
+@Path("commend")
+@JaxrsDescribe("点赞信息管理")
+public class DocumentCommendAction extends StandardJaxrsAction {
+
+	private Logger logger = LoggerFactory.getLogger(DocumentCommendAction.class);
+
+	@JaxrsMethodDescribe(value = "根据标识获取点赞对象.", action = ActionGet.class)
+	@GET
+	@Path("{id}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void get( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, @JaxrsParameterDescribe("评论ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionGet.Wo> result = new ActionResult<>();
+		try {
+			result = new ActionGet().execute( request, effectivePerson, id );
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "分页列示点赞对象.", action = ActionListPaging.class)
+	@POST
+	@Path("list/paging/{page}/size/{size}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listPaging(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+						   @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
+						   @JaxrsParameterDescribe("每页数量") @PathParam("size") Integer size, JsonElement jsonElement) {
+		ActionResult<List<ActionListPaging.Wo>> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionListPaging().execute(effectivePerson, page, size, jsonElement);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, jsonElement);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+}

+ 3 - 2
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/comment/ActionSave.java

@@ -7,6 +7,7 @@ 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.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
@@ -64,8 +65,8 @@ public class ActionSave extends BaseAction {
 				documentCommentInfo = documentCommentInfoPersistService.save( documentCommentInfo, wi.getContent(),  effectivePerson );
 				
 				// 更新缓存
-				ApplicationCache.notify( Document.class );
-				ApplicationCache.notify( DocumentCommentInfo.class );
+				CacheManager.notify( Document.class );
+				CacheManager.notify( DocumentCommentInfo.class );
 				
 				Wo wo = new Wo();
 				wo.setId( documentCommentInfo.getId() );

+ 8 - 11
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/comment/DocumentCommentInfoAction.java

@@ -9,10 +9,8 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.*;
@@ -26,7 +24,6 @@ import java.util.List;
 @JaxrsDescribe("评论信息管理")
 public class DocumentCommentInfoAction extends StandardJaxrsAction {
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private Logger logger = LoggerFactory.getLogger(DocumentCommentInfoAction.class);
 
 	@JaxrsMethodDescribe(value = "根据标识获取评论信息对象.", action = ActionGet.class)
@@ -38,7 +35,7 @@ public class DocumentCommentInfoAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<ActionGet.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionGet)proxy.getProxy(ActionGet.class)).execute( request, effectivePerson, id );
+			result = new ActionGet().execute( request, effectivePerson, id );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionCommentQuery(e, "根据指定ID查询评论信息对象时发生异常。id:" + id );
@@ -60,7 +57,7 @@ public class DocumentCommentInfoAction extends StandardJaxrsAction {
 		ActionResult<List<ActionListPageWithFilter.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionListPageWithFilter)proxy.getProxy(ActionListPageWithFilter.class)).execute(request, effectivePerson, page, size, jsonElement );
+			result = new ActionListPageWithFilter().execute(request, effectivePerson, page, size, jsonElement );
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -80,7 +77,7 @@ public class DocumentCommentInfoAction extends StandardJaxrsAction {
 		ActionResult<List<ActionListPrevWithFilter.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionListPrevWithFilter)proxy.getProxy(ActionListPrevWithFilter.class)).execute(request, effectivePerson, id, count, jsonElement);
+			result = new ActionListPrevWithFilter().execute(request, effectivePerson, id, count, jsonElement);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -100,7 +97,7 @@ public class DocumentCommentInfoAction extends StandardJaxrsAction {
 		ActionResult<List<ActionListNextWithFilter.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionListNextWithFilter)proxy.getProxy(ActionListNextWithFilter.class)).execute(request, effectivePerson, id, count, jsonElement);
+			result = new ActionListNextWithFilter().execute(request, effectivePerson, id, count, jsonElement);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -118,7 +115,7 @@ public class DocumentCommentInfoAction extends StandardJaxrsAction {
 		ActionResult<ActionSave.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionSave)proxy.getProxy(ActionSave.class)).execute(request, effectivePerson, jsonElement);
+			result = new ActionSave().execute(request, effectivePerson, jsonElement);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -137,7 +134,7 @@ public class DocumentCommentInfoAction extends StandardJaxrsAction {
 		ActionResult<ActionDelete.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionDelete)proxy.getProxy(ActionDelete.class)).execute(request, effectivePerson, id);
+			result = new ActionDelete().execute(request, effectivePerson, id);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -157,7 +154,7 @@ public class DocumentCommentInfoAction extends StandardJaxrsAction {
 		Boolean check = true;
 		if( check ){
 			try {
-				result = ((ActionPersistCommend)proxy.getProxy(ActionPersistCommend.class)).execute( request, id, effectivePerson );
+				result = new ActionPersistCommend().execute( request, id, effectivePerson );
 			} catch (Exception e) {
 				result = new ActionResult<>();
 				result.error( e );
@@ -179,7 +176,7 @@ public class DocumentCommentInfoAction extends StandardJaxrsAction {
 		Boolean check = true;
 		if( check ){
 			try {
-				result = ((ActionPersistUnCommend)proxy.getProxy(ActionPersistUnCommend.class)).execute( request, id, effectivePerson );
+				result = new ActionPersistUnCommend().execute( request, id, effectivePerson );
 			} catch (Exception e) {
 				result = new ActionResult<>();
 				result.error( e );

+ 2 - 1
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistChangeCategory.java

@@ -4,6 +4,7 @@ import com.google.gson.JsonElement;
 import com.x.base.core.project.annotation.AuditLog;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
@@ -123,7 +124,7 @@ public class ActionPersistChangeCategory extends BaseAction {
 				}
 				wo.setFailtureList( failture );
 				wo.setSuccessList( success );
-				ApplicationCache.notify(Document.class);
+				CacheManager.notify(Document.class);
 			}
 		}
 		result.setCount(Long.parseLong(  wo.getTotal().toString() ) );

+ 2 - 1
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishAndNotify.java

@@ -9,6 +9,7 @@ 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.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
@@ -214,7 +215,7 @@ public class ActionPersistPublishAndNotify extends BaseAction {
 			}
 		}
 
-		ApplicationCache.notify( Document.class );
+		CacheManager.notify( Document.class );
 
 		return result;
 	}

+ 3 - 4
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java

@@ -7,6 +7,7 @@ import java.util.*;
 import javax.servlet.http.HttpServletRequest;
 
 import com.x.base.core.entity.annotation.CheckPersistType;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.config.StorageMapping;
 import com.x.base.core.project.exception.ExceptionWhen;
 import com.x.processplatform.core.entity.content.Attachment;
@@ -16,12 +17,10 @@ import org.apache.commons.lang3.StringUtils;
 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.AuditLog;
 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.ApplicationCache;
 import com.x.base.core.project.gson.XGsonBuilder;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
@@ -416,8 +415,8 @@ public class ActionPersistPublishContent extends BaseAction {
 			}
 		}
 
-		ApplicationCache.notify(FileInfo.class);
-		ApplicationCache.notify(Document.class);
+		CacheManager.notify(FileInfo.class);
+		CacheManager.notify(Document.class);
 		return result;
 	}
 

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

@@ -0,0 +1,100 @@
+package com.x.cms.assemble.control.jaxrs.document;
+
+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;
+import com.x.base.core.project.cache.CacheManager;
+import com.x.base.core.project.gson.GsonPropertyObject;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.cms.core.entity.Document;
+import com.x.cms.core.entity.content.Data;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+public class ActionQueryGetDocumentData extends BaseAction {
+
+	private static  Logger logger = LoggerFactory.getLogger(ActionQueryGetDocumentData.class);
+
+	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, String id) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wo = getDocumentQueryResult(id);
+		result.setData(wo);
+		return result;			
+	}
+
+	private Wo getDocumentQueryResult(String id) throws Exception {
+		Wo wo = null;
+
+		Cache.CacheKey cacheKey = new Cache.CacheKey(this.getClass(), id);
+		Optional<?> optional = CacheManager.get(cacheCategory, cacheKey);
+		if (optional.isPresent()) {
+			wo = (Wo)optional.get();
+		} else {
+			Document document = documentQueryService.get(id);
+			wo = new Wo();
+			if(document!=null) {
+				WoDocument woOutDocument = WoDocument.copier.copy(document);
+				wo.setDocId(document.getId());
+				wo.setDocument(woOutDocument);
+				wo.setData(documentQueryService.getDocumentData(document));
+				CacheManager.put(cacheCategory, cacheKey, wo);
+			}
+		}
+		return wo;
+	}
+
+	public static class Wo extends GsonPropertyObject {
+		@FieldDescribe( "文档ID." )
+		private String docId;
+
+		@FieldDescribe( "作为输出的CMS文档数据对象." )
+		private WoDocument document;
+
+		@FieldDescribe( "文档所有数据信息." )
+		private Data data;
+
+		public String getDocId() {
+			return docId;
+		}
+
+		public void setDocId(String docId) {
+			this.docId = docId;
+		}
+
+		public WoDocument getDocument() {
+			return document;
+		}
+
+		public void setDocument( WoDocument document) {
+			this.document = document;
+		}
+
+		public Data getData() {
+			return data;
+		}
+
+		public void setData(Data data) {
+			this.data = data;
+		}
+
+	}
+	
+	public static class WoDocument extends Document {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		public static WrapCopier<Document, WoDocument> copier = WrapCopierFactory.wo( Document.class, WoDocument.class, null,JpaObject.FieldsInvisible);
+
+	}
+
+}

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

@@ -0,0 +1,131 @@
+package com.x.cms.assemble.control.jaxrs.document;
+
+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.cache.Cache;
+import com.x.base.core.project.cache.CacheManager;
+import com.x.base.core.project.gson.GsonPropertyObject;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.cms.assemble.control.Business;
+import com.x.cms.core.entity.Document;
+import com.x.cms.core.entity.content.Data;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+public class ActionQueryListDocumentData extends BaseAction {
+
+	private static  Logger logger = LoggerFactory.getLogger(ActionQueryListDocumentData.class);
+
+	protected ActionResult<List<Wo>> execute(HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
+		ActionResult<List<Wo>> result = new ActionResult<>();
+		Wi wi = this.convertToWrapIn( jsonElement, Wi.class );
+		Business business = null;
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			business = new Business(emc);
+		}
+		List<Wo> wos = new ArrayList<>();
+		if(wi.getDocIds()!=null && !wi.getDocIds().isEmpty()) {
+			wos = getDocumentQueryResult(business, wi.getDocIds(), effectivePerson);
+		}
+		result.setData(wos);
+		return result;			
+	}
+
+	private List<Wo> getDocumentQueryResult(Business business, List<String> ids, EffectivePerson effectivePerson) throws Exception {
+		List<Wo> wos = new ArrayList<>();
+		Wo wo = null;
+		List<Document> docs = documentQueryService.list(ids);
+		//先不考虑阅读权限的问题
+		/*List<String> unitNames = userManagerService.listUnitNamesWithPerson(effectivePerson.getDistinguishedName());
+		List<String> groupNames = userManagerService.listGroupNamesByPerson(effectivePerson.getDistinguishedName());*/
+		for (Document document : docs){
+			//if(this.hasReadPermission(business, document, unitNames, groupNames, effectivePerson, null)) {
+				Cache.CacheKey cacheKey = new Cache.CacheKey(this.getClass(), document.getId());
+				Optional<?> optional = CacheManager.get(cacheCategory, cacheKey);
+				if (optional.isPresent()) {
+					wo = (Wo)optional.get();
+				} else {
+					wo = new Wo();
+					WoDocument woOutDocument = WoDocument.copier.copy(document);
+					wo.setDocId(document.getId());
+					wo.setDocument(woOutDocument);
+					wo.setData(documentQueryService.getDocumentData(document));
+					CacheManager.put(cacheCategory, cacheKey, wo);
+				}
+				wos.add(wo);
+			//}
+		}
+		
+		return wos;
+	}
+
+	public static class Wo extends GsonPropertyObject {
+		@FieldDescribe( "文档ID." )
+		private String docId;
+
+		@FieldDescribe( "作为输出的CMS文档数据对象." )
+		private WoDocument document;
+
+		@FieldDescribe( "文档所有数据信息." )
+		private Data data;
+
+		public String getDocId() {
+			return docId;
+		}
+
+		public void setDocId(String docId) {
+			this.docId = docId;
+		}
+
+		public WoDocument getDocument() {
+			return document;
+		}
+
+		public void setDocument( WoDocument document) {
+			this.document = document;
+		}
+
+		public Data getData() {
+			return data;
+		}
+
+		public void setData(Data data) {
+			this.data = data;
+		}
+		
+	}
+	
+	public static class WoDocument extends Document {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		public static WrapCopier<Document, WoDocument> copier = WrapCopierFactory.wo( Document.class, WoDocument.class, null,JpaObject.FieldsInvisible);
+
+	}
+
+	public static class Wi extends GsonPropertyObject {
+		@FieldDescribe( "文档id" )
+		private List<String> docIds = new ArrayList<>();
+
+		public List<String> getDocIds() {
+			return docIds;
+		}
+
+		public void setDocIds(List<String> docIds) {
+			this.docIds = docIds;
+		}
+	}
+}

+ 10 - 114
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionQueryPermissionReadDocument.java

@@ -1,17 +1,14 @@
 package com.x.cms.assemble.control.jaxrs.document;
 
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WrapBoolean;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.organization.Person;
-import com.x.base.core.project.tools.ListTools;
-import com.x.cms.core.entity.AppInfo;
-import com.x.cms.core.entity.CategoryInfo;
+import com.x.cms.assemble.control.Business;
 import com.x.cms.core.entity.Document;
-import org.apache.commons.lang3.StringUtils;
-import java.util.List;
 
 public class ActionQueryPermissionReadDocument extends BaseAction {
 
@@ -19,6 +16,10 @@ public class ActionQueryPermissionReadDocument extends BaseAction {
 
 	protected ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String queryPerson) throws Exception {
 		ActionResult<Wo> result = new ActionResult<>();
+		Business business = null;
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			business = new Business(emc);
+		}
 		Wo wo = new Wo();
 		wo.setValue(false);
 		result.setData(wo);
@@ -26,115 +27,10 @@ public class ActionQueryPermissionReadDocument extends BaseAction {
 		if(document == null){
 			return result;
 		}
-		//匿名用户是否可读
-		if(effectivePerson.isAnonymous()){
-			AppInfo appInfo = appInfoServiceAdv.get( document.getAppId() );
-			CategoryInfo categoryInfo = categoryInfoServiceAdv.get(document.getCategoryId());
-			if(appInfo!=null && categoryInfo!=null){
-				boolean flag = true;
-				//检查这个文档所在的栏目和分类是否都是全员可见
-				if( ( ListTools.isNotEmpty( document.getReadPersonList() ) && !document.getReadPersonList().contains( "所有人" ) )
-						|| ListTools.isNotEmpty( document.getReadUnitList() ) || ListTools.isNotEmpty( document.getReadGroupList() ) ) {
-					flag = false;
-				}
-				//检查这个文档所在的栏目和分类是否都是全员可见
-				if( !appInfo.getAllPeopleView() ) {
-					//栏目不可见
-					flag = false;
-				}
-				//检查这个文档所在的栏目和分类是否都是全员可见
-				if( !categoryInfo.getAllPeopleView() ) {
-					//分类不可见
-					flag = false;
-				}
-				wo.setValue(flag);
-				return result;
-			}
-		}else{
-			String personName = effectivePerson.getDistinguishedName();
-			if(effectivePerson.isManager()){
-				if(StringUtils.isNotEmpty(queryPerson)){
-					Person person = userManagerService.getPerson(queryPerson);
-					if(person!=null){
-						personName = person.getDistinguishedName();
-					}else{
-						return result;
-					}
-				}else{
-					wo.setValue(true);
-					return result;
-				}
-			}
-			List<String> unitNames = userManagerService.listUnitNamesWithPerson(personName);
-			List<String> groupNames = userManagerService.listGroupNamesByPerson(personName);
-			//是否是读者
-			if(ListTools.contains(document.getReadPersonList(), getShortTargetFlag(personName)) ||
-					ListTools.contains(document.getReadPersonList(), "所有人")){
-				wo.setValue(true);
-				return result;
-			}
-			for(String unitName : unitNames){
-				if(ListTools.contains(document.getReadUnitList(), getShortTargetFlag(unitName))){
-					wo.setValue(true);
-					return result;
-				}
-			}
-			for(String groupName : groupNames){
-				if(ListTools.contains(document.getReadGroupList(), getShortTargetFlag(groupName))){
-					wo.setValue(true);
-					return result;
-				}
-			}
-			//是否是作者
-			if( ListTools.isNotEmpty( document.getAuthorPersonList() )) {
-				if( document.getAuthorPersonList().contains( personName ) ) {
-					wo.setValue(true);
-					return result;
-				}
-			}
-			if( ListTools.isNotEmpty( document.getAuthorUnitList() )) {
-				if( ListTools.containsAny( unitNames, document.getAuthorUnitList())) {
-					wo.setValue(true);
-					return result;
-				}
-			}
-			if( ListTools.isNotEmpty( document.getAuthorGroupList() )) {
-				if( ListTools.containsAny( groupNames, document.getAuthorGroupList())) {
-					wo.setValue(true);
-					return result;
-				}
-			}
-			//是否是分类的管理者
-			CategoryInfo categoryInfo = categoryInfoServiceAdv.get(document.getCategoryId());
-			if ( categoryInfoServiceAdv.isCategoryInfoManager( categoryInfo, personName, unitNames, groupNames )) {
-				wo.setValue(true);
-				return result;
-			}
-			//是否是栏目的管理者
-			AppInfo appInfo = appInfoServiceAdv.get( document.getAppId() );
-			if (appInfoServiceAdv.isAppInfoManager( appInfo, personName, unitNames, groupNames )) {
-				wo.setValue(true);
-				return result;
-			}
-		}
-		return result;			
-	}
+		wo.setValue(this.hasReadPermission(business, document, null, null, effectivePerson, queryPerson));
 
-	private String getShortTargetFlag(String distinguishedName) {
-		String target = null;
-		if( StringUtils.isNotEmpty( distinguishedName ) ){
-			String[] array = distinguishedName.split("@");
-			StringBuffer sb = new StringBuffer();
-			if( array.length == 3 ){
-				target = sb.append(array[1]).append("@").append(array[2]).toString();
-			}else if( array.length == 2 ){
-				//2段
-				target = sb.append(array[0]).append("@").append(array[1]).toString();
-			}else{
-				target = array[0];
-			}
-		}
-		return target;
+
+		return result;			
 	}
 
 	public static class Wo extends WrapBoolean {

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

@@ -6,9 +6,12 @@ import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.annotation.CheckPersistType;
 import com.x.base.core.project.cache.Cache;
+import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.base.core.project.organization.Person;
 import com.x.base.core.project.tools.ListTools;
 import com.x.cms.assemble.control.Business;
+import com.x.cms.assemble.control.ThisApplication;
 import com.x.cms.assemble.control.service.AppInfoServiceAdv;
 import com.x.cms.assemble.control.service.CategoryInfoServiceAdv;
 import com.x.cms.assemble.control.service.DocCommendPersistService;
@@ -23,6 +26,7 @@ import com.x.cms.assemble.control.service.QueryViewService;
 import com.x.cms.assemble.control.service.UserManagerService;
 import com.x.cms.core.entity.*;
 import com.x.query.core.entity.Item;
+import org.apache.commons.lang3.StringUtils;
 
 public class BaseAction extends StandardJaxrsAction {
 
@@ -208,6 +212,82 @@ public class BaseAction extends StandardJaxrsAction {
 		return false;
 	}
 
+	protected boolean hasReadPermission(Business business, Document document, List<String> unitNames, List<String> groupNames, EffectivePerson effectivePerson, String queryPerson) throws Exception{
+		String personName = effectivePerson.getDistinguishedName();
+		if(effectivePerson.isManager()){
+			if(StringUtils.isNotEmpty(queryPerson)){
+				Person person = userManagerService.getPerson(queryPerson);
+				if(person!=null){
+					personName = person.getDistinguishedName();
+				}else{
+					return false;
+				}
+			}else {
+				return true;
+			}
+		}
+		//是否是读者
+		if(ListTools.contains(document.getReadPersonList(), getShortTargetFlag(personName)) ||
+				ListTools.contains(document.getReadPersonList(), "所有人")){
+			return true;
+		}
+		if(unitNames == null){
+			unitNames = userManagerService.listUnitNamesWithPerson(personName);
+		}
+		for(String unitName : unitNames){
+			if(ListTools.contains(document.getReadUnitList(), getShortTargetFlag(unitName))){
+				return true;
+			}
+		}
+		if (groupNames == null){
+			groupNames = userManagerService.listGroupNamesByPerson(personName);
+		}
+		for(String groupName : groupNames){
+			if(ListTools.contains(document.getReadGroupList(), getShortTargetFlag(groupName))){
+				return true;
+			}
+		}
+		//是否是作者
+		if( ListTools.isNotEmpty( document.getAuthorPersonList() )) {
+			if( document.getAuthorPersonList().contains( personName ) ) {
+				return true;
+			}
+		}
+		if( ListTools.isNotEmpty( document.getAuthorUnitList() )) {
+			if( ListTools.containsAny( unitNames, document.getAuthorUnitList())) {
+				return true;
+			}
+		}
+		if( ListTools.isNotEmpty( document.getAuthorGroupList() )) {
+			if( ListTools.containsAny( groupNames, document.getAuthorGroupList())) {
+				return true;
+			}
+		}
+
+		if(business.isHasPlatformRole(personName, ThisApplication.ROLE_CMSManager)){
+			return true;
+		}
+
+		return false;
+	}
+
+	protected String getShortTargetFlag(String distinguishedName) {
+		String target = null;
+		if( StringUtils.isNotEmpty( distinguishedName ) ){
+			String[] array = distinguishedName.split("@");
+			StringBuffer sb = new StringBuffer();
+			if( array.length == 3 ){
+				target = sb.append(array[1]).append("@").append(array[2]).toString();
+			}else if( array.length == 2 ){
+				//2段
+				target = sb.append(array[0]).append("@").append(array[1]).toString();
+			}else{
+				target = array[0];
+			}
+		}
+		return target;
+	}
+
 
 
 //	/**

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

@@ -9,10 +9,8 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 import com.x.cms.assemble.control.queue.DataImportStatus;
 import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
 import org.glassfish.jersey.media.multipart.FormDataParam;
@@ -27,334 +25,341 @@ import java.util.List;
 
 @Path("document")
 @JaxrsDescribe("信息发布信息文档管理")
-public class DocumentAction extends StandardJaxrsAction{
+public class DocumentAction extends StandardJaxrsAction {
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
-	private static  Logger logger = LoggerFactory.getLogger( DocumentAction.class );
+	private static Logger logger = LoggerFactory.getLogger(DocumentAction.class);
 
 	@JaxrsMethodDescribe(value = "变更指定文档的分类信息.", action = ActionPersistChangeCategory.class)
 	@PUT
 	@Path("category/change")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_changeCategory( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, JsonElement jsonElement ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_changeCategory(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request, JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistChangeCategory.Wo> result = new ActionResult<>();
 		Boolean check = true;
-		
-		if( check ){
+
+		if (check) {
 			try {
-				result = ((ActionPersistChangeCategory)proxy.getProxy(ActionPersistChangeCategory.class)).execute( request, jsonElement, effectivePerson );
+				result = new ActionPersistChangeCategory().execute(request, jsonElement, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
-		
+
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "指修改指定文档的数据。", action = ActionPersistBatchModifyData.class)
 	@PUT
 	@Path("batch/data/modify")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_batchDataModify( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, JsonElement jsonElement ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_batchDataModify(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request, JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistBatchModifyData.Wo> result = new ActionResult<>();
 		Boolean check = true;
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionPersistBatchModifyData)proxy.getProxy(ActionPersistBatchModifyData.class)).execute( request, jsonElement, effectivePerson );
+				result = new ActionPersistBatchModifyData().execute(request, jsonElement, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "根据导入批次号查询导入状态信息.", action = ActionQueryImportStatusWithName.class)
 	@GET
 	@Path("batch/{batchName}/status")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_checkImportStatus( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+	public void query_checkImportStatus(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request,
 			@JaxrsParameterDescribe("导入批次号") @PathParam("batchName") String batchName) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<DataImportStatus> result = new ActionResult<>();
 		try {
-			result = ((ActionQueryImportStatusWithName)proxy.getProxy(ActionQueryImportStatusWithName.class)).execute( request, effectivePerson, batchName );
+			result = new ActionQueryImportStatusWithName().execute(request, effectivePerson, batchName);
 		} catch (Exception e) {
 			result = new ActionResult<>();
-			result.error( e );
-			logger.error( e, effectivePerson, request, null);
+			result.error(e);
+			logger.error(e, effectivePerson, request, null);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "查询所有的导入状态信息.", action = ActionQueryAllImportStatus.class)
 	@GET
 	@Path("batch/status")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_checkAllImportStatus( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_checkAllImportStatus(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<DataImportStatus>> result = new ActionResult<>();
 		try {
-			result = ((ActionQueryAllImportStatus)proxy.getProxy(ActionQueryAllImportStatus.class)).execute( request, effectivePerson );
+			result = new ActionQueryAllImportStatus().execute(request, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
-			result.error( e );
-			logger.error( e, effectivePerson, request, null);
+			result.error(e);
+			logger.error(e, effectivePerson, request, null);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "根据ID获取信息发布文档信息对象详细信息,包括附件列表,数据信息.", action = ActionQueryGetDocument.class)
 	@GET
 	@Path("{id}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_get( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+	public void query_get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
 			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionQueryGetDocument.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionQueryGetDocument)proxy.getProxy(ActionQueryGetDocument.class)).execute( request, id, effectivePerson );
+			result = new ActionQueryGetDocument().execute(request, id, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
-			result.error( e );
-			logger.error( e, effectivePerson, request, null);
+			result.error(e);
+			logger.error(e, effectivePerson, request, null);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "列示文档对象可供排序和展示使用的列名.", action = ActionQueryListDocumentFields.class)
 	@GET
 	@Path("document/fields")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_listDocumentFields( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_listDocumentFields(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionQueryListDocumentFields.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionQueryListDocumentFields)proxy.getProxy(ActionQueryListDocumentFields.class)).execute( request );
+			result = new ActionQueryListDocumentFields().execute(request);
 		} catch (Exception e) {
 			result = new ActionResult<>();
-			result.error( e );
-			logger.error( e, effectivePerson, request, null);
+			result.error(e);
+			logger.error(e, effectivePerson, request, null);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
-	
+
 	@JaxrsMethodDescribe(value = "根据ID访问信息发布文档信息对象详细信息,包括附件列表,数据信息.", action = ActionQueryViewDocument.class)
 	@GET
 	@Path("{id}/view")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_view( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+	public void query_view(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
 			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionQueryViewDocument.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionQueryViewDocument)proxy.getProxy(ActionQueryViewDocument.class)).execute( request, id, effectivePerson );
+			result = new ActionQueryViewDocument().execute(request, id, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
-			result.error( e );
-			logger.error( e, effectivePerson, request, null);
+			result.error(e);
+			logger.error(e, effectivePerson, request, null);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "根据ID获取信息发布文档信息被访问次数.", action = ActionQueryCountViewTimes.class)
 	@GET
 	@Path("{id}/view/count")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_getViewCount( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+	public void query_getViewCount(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
 			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionQueryCountViewTimes.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionQueryCountViewTimes)proxy.getProxy(ActionQueryCountViewTimes.class)).execute( request, id, effectivePerson );
+			result = new ActionQueryCountViewTimes().execute(request, id, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
-			result.error( e );
-			logger.error( e, effectivePerson, request, null);
+			result.error(e);
+			logger.error(e, effectivePerson, request, null);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "查询符合过滤条件的已发布的信息数量.", action = ActionQueryCountWithFilter.class)
 	@PUT
 	@Path("filter/count")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_countDocumentWithFilter( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, JsonElement jsonElement ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_countDocumentWithFilter(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request, JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionQueryCountWithFilter.Wo> result = new ActionResult<>();
 		Boolean check = true;
 
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionQueryCountWithFilter)proxy.getProxy(ActionQueryCountWithFilter.class)).execute( request,  jsonElement, effectivePerson );
+				result = new ActionQueryCountWithFilter().execute(request, jsonElement, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "根据ID删除信息发布文档信息.", action = ActionPersistDeleteDocument.class)
 	@DELETE
 	@Path("{id}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_delete( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {		
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_delete(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistDeleteDocument.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionPersistDeleteDocument)proxy.getProxy(ActionPersistDeleteDocument.class)).execute( request, id, effectivePerson );
+			result = new ActionPersistDeleteDocument().execute(request, id, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
-			result.error( e );
-			logger.error( e, effectivePerson, request, null);
+			result.error(e);
+			logger.error(e, effectivePerson, request, null);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "根据批次号删除信息发布文档信息.", action = ActionPersistDeleteWithBatch.class)
 	@DELETE
 	@Path("batch/{batchId}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_deleteWithBatchName( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("batchId") String batchId) {		
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_deleteWithBatchName(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request,
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("batchId") String batchId) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistDeleteWithBatch.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionPersistDeleteWithBatch)proxy.getProxy(ActionPersistDeleteWithBatch.class)).execute( request, batchId, effectivePerson );
+			result = new ActionPersistDeleteWithBatch().execute(request, batchId, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
-			result.error( e );
-			logger.error( e, effectivePerson, request, null);
+			result.error(e);
+			logger.error(e, effectivePerson, request, null);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "根据ID归档信息发布文档信息.", action = ActionPersistArchive.class)
 	@GET
 	@Path("achive/{id}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_achive( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {		
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_achive(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistArchive.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionPersistArchive)proxy.getProxy(ActionPersistArchive.class)).execute( request, id, effectivePerson );
+			result = new ActionPersistArchive().execute(request, id, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
-			result.error( e );
-			logger.error( e, effectivePerson, request, null);
+			result.error(e);
+			logger.error(e, effectivePerson, request, null);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "根据文档ID正式发布文档,并且使用Message通知所有的阅读者。", action = ActionPersistPublishAndNotify.class)
 	@PUT
 	@Path("publish/{id}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_publishAndNotify( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("文档ID") @PathParam("id") String id, JsonElement jsonElement ) {		
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_publishAndNotify(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request, @JaxrsParameterDescribe("文档ID") @PathParam("id") String id,
+			JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistPublishAndNotify.Wo> result = new ActionResult<>();
 		Boolean check = true;
 
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionPersistPublishAndNotify)proxy.getProxy(ActionPersistPublishAndNotify.class)).execute( request, id, effectivePerson, jsonElement );
+				result = new ActionPersistPublishAndNotify().execute(request, id, effectivePerson, jsonElement);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
-		
+
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "直接发布信息内容,创建新的信息发布文档并且直接发布.", action = ActionPersistPublishContent.class)
 	@PUT
 	@Path("publish/content")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_publishContent( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, JsonElement jsonElement ) {		
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_publishContent(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request, JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistPublishContent.Wo> result = new ActionResult<>();
 		Boolean check = true;
-		
-		if( check ){
-			System.out.println( "please wait, system try to publish content......" );
+
+		if (check) {
+			System.out.println("please wait, system try to publish content......");
 			try {
-				result = ((ActionPersistPublishContent)proxy.getProxy(ActionPersistPublishContent.class)).execute( request, jsonElement, effectivePerson );
-				System.out.println( "system publish content successful!" );
+				result = new ActionPersistPublishContent().execute(request, jsonElement, effectivePerson);
+				System.out.println("system publish content successful!");
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "根据ID取消信息内容发布状态,修改为草稿.", action = ActionPersistPublishCancel.class)
 	@PUT
 	@Path("publish/{id}/cancel")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_publishCancel( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {		
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_publishCancel(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistPublishCancel.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionPersistPublishCancel)proxy.getProxy(ActionPersistPublishCancel.class)).execute( request, id, effectivePerson );
+			result = new ActionPersistPublishCancel().execute(request, id, effectivePerson);
 		} catch (Exception e) {
 			result = new ActionResult<>();
-			result.error( e );
-			logger.error( e, effectivePerson, request, null);
+			result.error(e);
+			logger.error(e, effectivePerson, request, null);
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "列示符合过滤条件的已发布的信息内容, 下一页.", action = ActionQueryListNextWithFilter.class)
 	@PUT
 	@Path("filter/list/{id}/next/{count}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_listNextWithFilter( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id, 
-			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count, 
-			JsonElement jsonElement ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_listNextWithFilter(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request,
+			@JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id,
+			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count, JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionQueryListNextWithFilter.Wo>> result = new ActionResult<>();
 		Boolean check = true;
 
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionQueryListNextWithFilter)proxy.getProxy(ActionQueryListNextWithFilter.class)).execute( request, id, count, jsonElement, effectivePerson );
+				result = new ActionQueryListNextWithFilter().execute(request, id, count, jsonElement, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
@@ -365,46 +370,47 @@ public class DocumentAction extends StandardJaxrsAction{
 	@Path("filter/list/{id}/prev/{count}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_listPrevWithFilter( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-										  @JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id,
-										  @JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count,
-										  JsonElement jsonElement ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_listPrevWithFilter(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request,
+			@JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id,
+			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count, JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionQueryListPrevWithFilter.Wo>> result = new ActionResult<>();
 		Boolean check = true;
 
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionQueryListPrevWithFilter)proxy.getProxy(ActionQueryListPrevWithFilter.class)).execute( request, id, count, jsonElement, effectivePerson );
+				result = new ActionQueryListPrevWithFilter().execute(request, id, count, jsonElement, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "列示符合过滤条件的草稿信息内容, 下一页.", action = ActionQueryListDraftNextWithFilter.class)
 	@PUT
 	@Path("draft/list/{id}/next/{count}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_listDraftNextWithFilter( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id, 
-			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count, 
-			JsonElement jsonElement) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_listDraftNextWithFilter(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request,
+			@JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id,
+			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count, JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionQueryListDraftNextWithFilter.Wo>> result = new ActionResult<>();
 		Boolean check = true;
 
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionQueryListDraftNextWithFilter)proxy.getProxy(ActionQueryListDraftNextWithFilter.class)).execute( request, id, count, jsonElement, effectivePerson );
+				result = new ActionQueryListDraftNextWithFilter().execute(request, id, count, jsonElement,
+						effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
@@ -415,18 +421,18 @@ public class DocumentAction extends StandardJaxrsAction{
 	@Path("pictures/{id}/first")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_listFirstPictures( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_listFirstPictures(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request, @JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionQueryGetFirstPicture.Wo> result = new ActionResult<>();
 		Boolean check = true;
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionQueryGetFirstPicture)proxy.getProxy(ActionQueryGetFirstPicture.class)).execute( request, id, effectivePerson );
+				result = new ActionQueryGetFirstPicture().execute(request, id, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
@@ -437,38 +443,39 @@ public class DocumentAction extends StandardJaxrsAction{
 	@Path("pictures/{id}/all")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_listAllPictures( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_listAllPictures(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionQueryListAllPictures.Wo>> result = new ActionResult<>();
 		Boolean check = true;
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionQueryListAllPictures)proxy.getProxy(ActionQueryListAllPictures.class)).execute( request, id, effectivePerson );
+				result = new ActionQueryListAllPictures().execute(request, id, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "从Excel文件导入文档数据.", action = ActionPersistImportDataExcel.class)
 	@POST
 	@Path("import/category/{categoryId}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.MULTIPART_FORM_DATA)
-	public void persist_importDocumentFormExcel(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("分类ID") @PathParam("categoryId") String categoryId, 
+	public void persist_importDocumentFormExcel(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request,
+			@JaxrsParameterDescribe("分类ID") @PathParam("categoryId") String categoryId,
 			@JaxrsParameterDescribe("作为参数的JSON字符串") @FormDataParam("json_data") String json_data,
 			@FormDataParam(FILE_FIELD) final byte[] bytes,
 			@FormDataParam(FILE_FIELD) final FormDataContentDisposition disposition) {
 		ActionResult<ActionPersistImportDataExcel.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionPersistImportDataExcel)proxy.getProxy(ActionPersistImportDataExcel.class)).execute(request, effectivePerson, categoryId, bytes,  json_data, disposition);
+			result = new ActionPersistImportDataExcel().execute(request, effectivePerson, categoryId, bytes, json_data,
+					disposition);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -480,107 +487,108 @@ public class DocumentAction extends StandardJaxrsAction{
 	@POST
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_save( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, JsonElement jsonElement ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_save(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistSaveDocument.Wo> result = new ActionResult<>();
 		Boolean check = true;
-		
-		if( check ){
+
+		if (check) {
 			try {
-				result = ((ActionPersistSaveDocument)proxy.getProxy(ActionPersistSaveDocument.class)).execute( request, jsonElement, effectivePerson );
+				result = new ActionPersistSaveDocument().execute(request, jsonElement, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
-		
+
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "文档点赞.", action = ActionPersistCommend.class)
 	@GET
 	@Path("{id}/commend")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_commend( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_commend(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistCommend.Wo> result = new ActionResult<>();
 		Boolean check = true;
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionPersistCommend)proxy.getProxy(ActionPersistCommend.class)).execute( request, id, effectivePerson );
+				result = new ActionPersistCommend().execute(request, id, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "取消文档点赞.", action = ActionPersistUnCommend.class)
 	@GET
 	@Path("{id}/uncommend")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_unCommend( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_unCommend(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistUnCommend.Wo> result = new ActionResult<>();
 		Boolean check = true;
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionPersistUnCommend)proxy.getProxy(ActionPersistUnCommend.class)).execute( request, id, effectivePerson );
+				result = new ActionPersistUnCommend().execute(request, id, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "文档置顶.", action = ActionPersistTopDocument.class)
 	@GET
 	@Path("{id}/top")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_top( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_top(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistTopDocument.Wo> result = new ActionResult<>();
 		Boolean check = true;
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionPersistTopDocument)proxy.getProxy(ActionPersistTopDocument.class)).execute( request, id, effectivePerson );
+				result = new ActionPersistTopDocument().execute(request, id, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "取消文档置顶.", action = ActionPersistUnTopDocument.class)
 	@GET
 	@Path("{id}/unTop")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void persist_unTop( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void persist_unTop(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionPersistUnTopDocument.Wo> result = new ActionResult<>();
 		Boolean check = true;
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionPersistUnTopDocument)proxy.getProxy(ActionPersistUnTopDocument.class)).execute( request, id, effectivePerson );
+				result = new ActionPersistUnTopDocument().execute(request, id, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
@@ -591,64 +599,65 @@ public class DocumentAction extends StandardJaxrsAction{
 	@Path("filter/list/{page}/size/{size}")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_listWithFilterPaging( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-											@JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
-											@JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_listWithFilterPaging(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request, @JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
+			@JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<List<ActionQueryListWithFilterPaging.Wo>> result = new ActionResult<>();
 		Boolean check = true;
 
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionQueryListWithFilterPaging)proxy.getProxy(ActionQueryListWithFilterPaging.class)).execute( request, page, size, jsonElement, effectivePerson );
+				result = new ActionQueryListWithFilterPaging().execute(request, page, size, jsonElement,
+						effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "获取文件访问控制信息.", action = ActionQueryGetControl.class)
 	@GET
 	@Path("{id}/control")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_getControl( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_getControl(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionQueryGetControl.Wo> result = new ActionResult<>();
 		Boolean check = true;
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionQueryGetControl)proxy.getProxy(ActionQueryGetControl.class)).execute( request, id, effectivePerson );
+				result = new ActionQueryGetControl().execute(request, id, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-	
+
 	@JaxrsMethodDescribe(value = "获取文件可见范围内的所有人员.", action = ActionQueryListVisiblePersons.class)
 	@GET
 	@Path("{id}/persons")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_getVisiblePersons( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_getVisiblePersons(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request, @JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionQueryListVisiblePersons.Wo> result = new ActionResult<>();
 		Boolean check = true;
-		if( check ){
+		if (check) {
 			try {
-				result = ((ActionQueryListVisiblePersons)proxy.getProxy(ActionQueryListVisiblePersons.class)).execute( request, id, effectivePerson );
+				result = new ActionQueryListVisiblePersons().execute(request, id, effectivePerson);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
@@ -659,19 +668,62 @@ public class DocumentAction extends StandardJaxrsAction{
 	@Path("{id}/permission/read")
 	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
 	@Consumes(MediaType.APPLICATION_JSON)
-	public void query_PermissionReadDocument( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-											  @JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
+	public void query_PermissionReadDocument(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request, @JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
 		ActionResult<ActionQueryPermissionReadDocument.Wo> result = new ActionResult<>();
 		Boolean check = true;
 
-		if( check ){
+		if (check) {
 			try {
 				result = new ActionQueryPermissionReadDocument().execute(effectivePerson, id, null);
 			} catch (Exception e) {
 				result = new ActionResult<>();
-				result.error( e );
-				logger.error( e, effectivePerson, request, null);
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "列示文档数据.", action = ActionQueryListDocumentData.class)
+	@POST
+	@Path("list/document/data")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_listDocumentData(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request, JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		ActionResult<List<ActionQueryListDocumentData.Wo>> result = new ActionResult<>();
+
+		try {
+			result = new ActionQueryListDocumentData().execute(request, effectivePerson, jsonElement);
+		} catch (Exception e) {
+			result.error(e);
+			logger.error(e, effectivePerson, request, jsonElement);
+		}
+
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "查看文档数据.", action = ActionQueryGetDocumentData.class)
+	@GET
+	@Path("{id}/document/data")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_getDocumentData(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		ActionResult<ActionQueryGetDocumentData.Wo> result = new ActionResult<>();
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = new ActionQueryGetDocumentData().execute(request, effectivePerson, id);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
 			}
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));

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

@@ -0,0 +1,718 @@
+package com.x.cms.assemble.control.jaxrs.document;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.project.annotation.JaxrsDescribe;
+import com.x.base.core.project.annotation.JaxrsMethodDescribe;
+import com.x.base.core.project.annotation.JaxrsParameterDescribe;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.http.HttpMediaType;
+import com.x.base.core.project.jaxrs.ResponseFactory;
+import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.cms.assemble.control.queue.DataImportStatus;
+import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
+import org.glassfish.jersey.media.multipart.FormDataParam;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.*;
+import javax.ws.rs.container.AsyncResponse;
+import javax.ws.rs.container.Suspended;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import java.util.List;
+
+@Path("document")
+@JaxrsDescribe("信息发布信息文档管理")
+public class DocumentAction2 extends StandardJaxrsAction{
+
+	private static  Logger logger = LoggerFactory.getLogger( DocumentAction2.class );
+
+	@JaxrsMethodDescribe(value = "变更指定文档的分类信息.", action = ActionPersistChangeCategory.class)
+	@PUT
+	@Path("category/change")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_changeCategory( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, JsonElement jsonElement ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistChangeCategory.Wo> result = new ActionResult<>();
+		Boolean check = true;
+		
+		if( check ){
+			try {
+				result = new ActionPersistChangeCategory().execute( request, jsonElement, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "指修改指定文档的数据。", action = ActionPersistBatchModifyData.class)
+	@PUT
+	@Path("batch/data/modify")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_batchDataModify( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, JsonElement jsonElement ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistBatchModifyData.Wo> result = new ActionResult<>();
+		Boolean check = true;
+		if( check ){
+			try {
+				result = new ActionPersistBatchModifyData().execute( request, jsonElement, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "根据导入批次号查询导入状态信息.", action = ActionQueryImportStatusWithName.class)
+	@GET
+	@Path("batch/{batchName}/status")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_checkImportStatus( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("导入批次号") @PathParam("batchName") String batchName) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<DataImportStatus> result = new ActionResult<>();
+		try {
+			result = new ActionQueryImportStatusWithName().execute( request, effectivePerson, batchName );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			result.error( e );
+			logger.error( e, effectivePerson, request, null);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "查询所有的导入状态信息.", action = ActionQueryAllImportStatus.class)
+	@GET
+	@Path("batch/status")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_checkAllImportStatus( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<List<DataImportStatus>> result = new ActionResult<>();
+		try {
+			result = new ActionQueryAllImportStatus().execute( request, effectivePerson );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			result.error( e );
+			logger.error( e, effectivePerson, request, null);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "根据ID获取信息发布文档信息对象详细信息,包括附件列表,数据信息.", action = ActionQueryGetDocument.class)
+	@GET
+	@Path("{id}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_get( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionQueryGetDocument.Wo> result = new ActionResult<>();
+		try {
+			result = new ActionQueryGetDocument().execute( request, id, effectivePerson );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			result.error( e );
+			logger.error( e, effectivePerson, request, null);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "列示文档对象可供排序和展示使用的列名.", action = ActionQueryListDocumentFields.class)
+	@GET
+	@Path("document/fields")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_listDocumentFields( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionQueryListDocumentFields.Wo> result = new ActionResult<>();
+		try {
+			result = new ActionQueryListDocumentFields().execute( request );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			result.error( e );
+			logger.error( e, effectivePerson, request, null);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	
+	@JaxrsMethodDescribe(value = "根据ID访问信息发布文档信息对象详细信息,包括附件列表,数据信息.", action = ActionQueryViewDocument.class)
+	@GET
+	@Path("{id}/view")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_view( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionQueryViewDocument.Wo> result = new ActionResult<>();
+		try {
+			result = new ActionQueryViewDocument().execute( request, id, effectivePerson );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			result.error( e );
+			logger.error( e, effectivePerson, request, null);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "根据ID获取信息发布文档信息被访问次数.", action = ActionQueryCountViewTimes.class)
+	@GET
+	@Path("{id}/view/count")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_getViewCount( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionQueryCountViewTimes.Wo> result = new ActionResult<>();
+		try {
+			result = new ActionQueryCountViewTimes().execute( request, id, effectivePerson );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			result.error( e );
+			logger.error( e, effectivePerson, request, null);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "查询符合过滤条件的已发布的信息数量.", action = ActionQueryCountWithFilter.class)
+	@PUT
+	@Path("filter/count")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_countDocumentWithFilter( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, JsonElement jsonElement ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionQueryCountWithFilter.Wo> result = new ActionResult<>();
+		Boolean check = true;
+
+		if( check ){
+			try {
+				result = new ActionQueryCountWithFilter().execute( request,  jsonElement, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "根据ID删除信息发布文档信息.", action = ActionPersistDeleteDocument.class)
+	@DELETE
+	@Path("{id}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_delete( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {		
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistDeleteDocument.Wo> result = new ActionResult<>();
+		try {
+			result = new ActionPersistDeleteDocument().execute( request, id, effectivePerson );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			result.error( e );
+			logger.error( e, effectivePerson, request, null);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "根据批次号删除信息发布文档信息.", action = ActionPersistDeleteWithBatch.class)
+	@DELETE
+	@Path("batch/{batchId}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_deleteWithBatchName( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("batchId") String batchId) {		
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistDeleteWithBatch.Wo> result = new ActionResult<>();
+		try {
+			result = new ActionPersistDeleteWithBatch().execute( request, batchId, effectivePerson );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			result.error( e );
+			logger.error( e, effectivePerson, request, null);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "根据ID归档信息发布文档信息.", action = ActionPersistArchive.class)
+	@GET
+	@Path("achive/{id}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_achive( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {		
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistArchive.Wo> result = new ActionResult<>();
+		try {
+			result = new ActionPersistArchive().execute( request, id, effectivePerson );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			result.error( e );
+			logger.error( e, effectivePerson, request, null);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "根据文档ID正式发布文档,并且使用Message通知所有的阅读者。", action = ActionPersistPublishAndNotify.class)
+	@PUT
+	@Path("publish/{id}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_publishAndNotify( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("文档ID") @PathParam("id") String id, JsonElement jsonElement ) {		
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistPublishAndNotify.Wo> result = new ActionResult<>();
+		Boolean check = true;
+
+		if( check ){
+			try {
+				result = new ActionPersistPublishAndNotify().execute( request, id, effectivePerson, jsonElement );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "直接发布信息内容,创建新的信息发布文档并且直接发布.", action = ActionPersistPublishContent.class)
+	@PUT
+	@Path("publish/content")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_publishContent( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, JsonElement jsonElement ) {		
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistPublishContent.Wo> result = new ActionResult<>();
+		Boolean check = true;
+		
+		if( check ){
+			System.out.println( "please wait, system try to publish content......" );
+			try {
+				result = new ActionPersistPublishContent().execute( request, jsonElement, effectivePerson );
+				System.out.println( "system publish content successful!" );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "根据ID取消信息内容发布状态,修改为草稿.", action = ActionPersistPublishCancel.class)
+	@PUT
+	@Path("publish/{id}/cancel")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_publishCancel( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {		
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistPublishCancel.Wo> result = new ActionResult<>();
+		try {
+			result = new ActionPersistPublishCancel().execute( request, id, effectivePerson );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			result.error( e );
+			logger.error( e, effectivePerson, request, null);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "列示符合过滤条件的已发布的信息内容, 下一页.", action = ActionQueryListNextWithFilter.class)
+	@PUT
+	@Path("filter/list/{id}/next/{count}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_listNextWithFilter( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id, 
+			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count, 
+			JsonElement jsonElement ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<List<ActionQueryListNextWithFilter.Wo>> result = new ActionResult<>();
+		Boolean check = true;
+
+		if( check ){
+			try {
+				result = new ActionQueryListNextWithFilter().execute( request, id, count, jsonElement, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "列示符合过滤条件的已发布的信息内容, 上一页.", action = ActionQueryListPrevWithFilter.class)
+	@PUT
+	@Path("filter/list/{id}/prev/{count}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_listPrevWithFilter( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+										  @JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id,
+										  @JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count,
+										  JsonElement jsonElement ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<List<ActionQueryListPrevWithFilter.Wo>> result = new ActionResult<>();
+		Boolean check = true;
+
+		if( check ){
+			try {
+				result = new ActionQueryListPrevWithFilter().execute( request, id, count, jsonElement, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "列示符合过滤条件的草稿信息内容, 下一页.", action = ActionQueryListDraftNextWithFilter.class)
+	@PUT
+	@Path("draft/list/{id}/next/{count}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_listDraftNextWithFilter( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id, 
+			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count, 
+			JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<List<ActionQueryListDraftNextWithFilter.Wo>> result = new ActionResult<>();
+		Boolean check = true;
+
+		if( check ){
+			try {
+				result = new ActionQueryListDraftNextWithFilter().execute( request, id, count, jsonElement, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据信息发布文档ID查询文档第一张图片信息列表.", action = ActionQueryGetFirstPicture.class)
+	@GET
+	@Path("pictures/{id}/first")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_listFirstPictures( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionQueryGetFirstPicture.Wo> result = new ActionResult<>();
+		Boolean check = true;
+		if( check ){
+			try {
+				result = new ActionQueryGetFirstPicture().execute( request, id, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据信息发布文档ID查询文档所有的图片信息列表.", action = ActionQueryListAllPictures.class)
+	@GET
+	@Path("pictures/{id}/all")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_listAllPictures( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<List<ActionQueryListAllPictures.Wo>> result = new ActionResult<>();
+		Boolean check = true;
+		if( check ){
+			try {
+				result = new ActionQueryListAllPictures().execute( request, id, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "从Excel文件导入文档数据.", action = ActionPersistImportDataExcel.class)
+	@POST
+	@Path("import/category/{categoryId}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.MULTIPART_FORM_DATA)
+	public void persist_importDocumentFormExcel(@Suspended final AsyncResponse asyncResponse, 
+			@Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("分类ID") @PathParam("categoryId") String categoryId, 
+			@JaxrsParameterDescribe("作为参数的JSON字符串") @FormDataParam("json_data") String json_data,
+			@FormDataParam(FILE_FIELD) final byte[] bytes,
+			@FormDataParam(FILE_FIELD) final FormDataContentDisposition disposition) {
+		ActionResult<ActionPersistImportDataExcel.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionPersistImportDataExcel().execute(request, effectivePerson, categoryId, bytes,  json_data, disposition);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "保存信息发布文档信息对象.", action = ActionPersistSaveDocument.class)
+	@POST
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_save( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, JsonElement jsonElement ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistSaveDocument.Wo> result = new ActionResult<>();
+		Boolean check = true;
+		
+		if( check ){
+			try {
+				result = new ActionPersistSaveDocument().execute( request, jsonElement, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "文档点赞.", action = ActionPersistCommend.class)
+	@GET
+	@Path("{id}/commend")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_commend( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistCommend.Wo> result = new ActionResult<>();
+		Boolean check = true;
+		if( check ){
+			try {
+				result = new ActionPersistCommend().execute( request, id, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "取消文档点赞.", action = ActionPersistUnCommend.class)
+	@GET
+	@Path("{id}/uncommend")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_unCommend( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistUnCommend.Wo> result = new ActionResult<>();
+		Boolean check = true;
+		if( check ){
+			try {
+				result = new ActionPersistUnCommend().execute( request, id, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "文档置顶.", action = ActionPersistTopDocument.class)
+	@GET
+	@Path("{id}/top")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_top( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistTopDocument.Wo> result = new ActionResult<>();
+		Boolean check = true;
+		if( check ){
+			try {
+				result = new ActionPersistTopDocument().execute( request, id, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "取消文档置顶.", action = ActionPersistUnTopDocument.class)
+	@GET
+	@Path("{id}/unTop")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void persist_unTop( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionPersistUnTopDocument.Wo> result = new ActionResult<>();
+		Boolean check = true;
+		if( check ){
+			try {
+				result = new ActionPersistUnTopDocument().execute( request, id, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "分页查询符合过滤条件的已发布的信息内容.", action = ActionQueryListWithFilterPaging.class)
+	@PUT
+	@Path("filter/list/{page}/size/{size}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_listWithFilterPaging( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+											@JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
+											@JaxrsParameterDescribe("数量") @PathParam("size") Integer size, JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<List<ActionQueryListWithFilterPaging.Wo>> result = new ActionResult<>();
+		Boolean check = true;
+
+		if( check ){
+			try {
+				result = new ActionQueryListWithFilterPaging().execute( request, page, size, jsonElement, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "获取文件访问控制信息.", action = ActionQueryGetControl.class)
+	@GET
+	@Path("{id}/control")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_getControl( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionQueryGetControl.Wo> result = new ActionResult<>();
+		Boolean check = true;
+		if( check ){
+			try {
+				result = new ActionQueryGetControl().execute( request, id, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "获取文件可见范围内的所有人员.", action = ActionQueryListVisiblePersons.class)
+	@GET
+	@Path("{id}/persons")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_getVisiblePersons( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionQueryListVisiblePersons.Wo> result = new ActionResult<>();
+		Boolean check = true;
+		if( check ){
+			try {
+				result = new ActionQueryListVisiblePersons().execute( request, id, effectivePerson );
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "查询当前用户是否有阅读文档的权限.", action = ActionQueryPermissionReadDocument.class)
+	@GET
+	@Path("{id}/permission/read")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_PermissionReadDocument( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+											  @JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionQueryPermissionReadDocument.Wo> result = new ActionResult<>();
+		Boolean check = true;
+
+		if( check ){
+			try {
+				result = new ActionQueryPermissionReadDocument().execute(effectivePerson, id, null);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "列示文档数据.", action = ActionQueryListDocumentData.class)
+	@POST
+	@Path("list/document/data")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_listDocumentData( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, JsonElement jsonElement ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<List<ActionQueryListDocumentData.Wo>> result = new ActionResult<>();
+
+		try {
+			result = new ActionQueryListDocumentData().execute( request, effectivePerson, jsonElement );
+		} catch (Exception e) {
+			result.error( e );
+			logger.error( e, effectivePerson, request, jsonElement);
+		}
+
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "查看文档数据.", action = ActionQueryGetDocumentData.class)
+	@GET
+	@Path("{id}/document/data")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void query_getDocumentData( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+											  @JaxrsParameterDescribe("信息文档ID") @PathParam("id") String id) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionQueryGetDocumentData.Wo> result = new ActionResult<>();
+		Boolean check = true;
+
+		if( check ){
+			try {
+				result = new ActionQueryGetDocumentData().execute(request, effectivePerson, id);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				result.error( e );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+}

+ 13 - 16
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/file/FileAction.java

@@ -9,10 +9,8 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
 import org.glassfish.jersey.media.multipart.FormDataParam;
 
@@ -28,7 +26,6 @@ import java.util.List;
 @JaxrsDescribe("资源文件管理")
 public class FileAction extends StandardJaxrsAction {
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private static Logger logger = LoggerFactory.getLogger(FileAction.class);
 
 	@JaxrsMethodDescribe(value = "列示文件对象,下一页.", action = ActionListNext.class)
@@ -42,7 +39,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<List<ActionListNext.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionListNext)proxy.getProxy(ActionListNext.class)).execute(id, count);
+			result = new ActionListNext().execute(id, count);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -61,7 +58,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<List<ActionListPrev.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionListPrev)proxy.getProxy(ActionListPrev.class)).execute(id, count);
+			result = new ActionListPrev().execute(id, count);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -79,7 +76,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<ActionGet.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionGet)proxy.getProxy(ActionGet.class)).execute(effectivePerson, flag);
+			result = new ActionGet().execute(effectivePerson, flag);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -96,7 +93,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<ActionCreate.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionCreate)proxy.getProxy(ActionCreate.class)).execute(effectivePerson, jsonElement);
+			result = new ActionCreate().execute(effectivePerson, jsonElement);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, jsonElement);
 			result.error(e);
@@ -114,7 +111,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<ActionEdit.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionEdit)proxy.getProxy(ActionEdit.class)).execute(effectivePerson, id, jsonElement);
+			result = new ActionEdit().execute(effectivePerson, id, jsonElement);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, jsonElement);
 			result.error(e);
@@ -132,7 +129,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<ActionDelete.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionDelete)proxy.getProxy(ActionDelete.class)).execute(effectivePerson, flag);
+			result = new ActionDelete().execute(effectivePerson, flag);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -150,7 +147,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<List<ActionListWithApp.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionListWithApp)proxy.getProxy(ActionListWithApp.class)).execute(effectivePerson, appInfoFlag);
+			result = new ActionListWithApp().execute(effectivePerson, appInfoFlag);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -171,7 +168,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<ActionUpload.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionUpload)proxy.getProxy(ActionUpload.class)).execute(effectivePerson, id, fileName, bytes, disposition);
+			result = new ActionUpload().execute(effectivePerson, id, fileName, bytes, disposition);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -188,7 +185,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<ActionDownload.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionDownload)proxy.getProxy(ActionDownload.class)).execute(effectivePerson, id);
+			result = new ActionDownload().execute(effectivePerson, id);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -205,7 +202,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<ActionContent.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionContent)proxy.getProxy(ActionContent.class)).execute(effectivePerson, id);
+			result = new ActionContent().execute(effectivePerson, id);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -223,7 +220,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<ActionCopy.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionCopy)proxy.getProxy(ActionCopy.class)).execute(effectivePerson, flag, appInfoFlag);
+			result = new ActionCopy().execute(effectivePerson, flag, appInfoFlag);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -241,7 +238,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<ActionDownloadWithApp.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionDownloadWithApp)proxy.getProxy(ActionDownloadWithApp.class)).execute(effectivePerson, flag, appInfoFlag);
+			result = new ActionDownloadWithApp().execute(effectivePerson, flag, appInfoFlag);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -259,7 +256,7 @@ public class FileAction extends StandardJaxrsAction {
 		ActionResult<ActionContentWithApp.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionContentWithApp)proxy.getProxy(ActionContentWithApp.class)).execute(effectivePerson, flag, appInfoFlag);
+			result = new ActionContentWithApp().execute(effectivePerson, flag, appInfoFlag);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);

+ 3 - 2
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/fileinfo/ActionDelete.java

@@ -5,6 +5,7 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.annotation.CheckRemoveType;
 import com.x.base.core.project.annotation.AuditLog;
 import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.config.StorageMapping;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
@@ -76,12 +77,12 @@ public class ActionDelete extends BaseAction {
 			keys.add( "file.all" ); //清除文档的附件列表缓存
 			keys.add( "file." + id  ); //清除指定ID的附件信息缓存
 			keys.add( ApplicationCache.concreteCacheKey( "document", document.getId(), isAnonymous, isManager ) ); //清除文档的附件列表缓存
-			ApplicationCache.notify( FileInfo.class, keys );
+			CacheManager.notify( FileInfo.class, keys );
 			
 			keys.clear();
 			keys.add(  ApplicationCache.concreteCacheKey( document.getId(), "view", isAnonymous, isManager ) ); //清除文档阅读缓存
 			keys.add( ApplicationCache.concreteCacheKey( document.getId(), "get", isManager )  ); //清除文档信息获取缓存
-			ApplicationCache.notify( Document.class, keys );
+			CacheManager.notify( Document.class, keys );
 			
 			// 成功删除一个附件信息
 			logService.log(emc, effectivePerson.getDistinguishedName(), fileInfo.getName(), fileInfo.getAppId(),

+ 6 - 5
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/fileinfo/ActionFileUpdate.java

@@ -5,6 +5,7 @@ import java.util.UUID;
 
 import javax.servlet.http.HttpServletRequest;
 
+import com.x.base.core.project.cache.CacheManager;
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.tika.Tika;
@@ -125,7 +126,7 @@ public class ActionFileUpdate extends BaseAction {
 		
 		if (check) {
 			try {
-				if ( documentQueryService.getFileInfoManagerAssess( effectivePerson, document, categoryInfo, appInfo ) ) {
+				if ( !documentQueryService.getFileInfoManagerAssess( effectivePerson, document, categoryInfo, appInfo ) ) {
 					check = false;
 					Exception exception = new ExceptionDocumentAccessDenied(effectivePerson.getDistinguishedName(), document.getTitle(), document.getId());
 					result.error(exception);
@@ -191,7 +192,7 @@ public class ActionFileUpdate extends BaseAction {
 				}
 				
 				//文件存储				
-				attachment.saveContent( mapping, bytes, fileName );
+				attachment.updateContent( mapping, bytes, fileName );
 				//完成替换逻辑
 				attachment = fileInfoServiceAdv.updateAttachment( docId, old_attId, attachment, mapping );
 //				
@@ -205,9 +206,9 @@ public class ActionFileUpdate extends BaseAction {
 //				keys.add(  ApplicationCache.concreteCacheKey( document.getId(), "view", isAnonymous, isManager ) ); //清除文档阅读缓存
 //				keys.add( ApplicationCache.concreteCacheKey( document.getId(), "get", isManager )  ); //清除文档信息获取缓存
 //				ApplicationCache.notify( Document.class, keys );
-				
-				ApplicationCache.notify( FileInfo.class );
-				ApplicationCache.notify( Document.class );	
+
+				CacheManager.notify( FileInfo.class );
+				CacheManager.notify( Document.class );
 				
 				Wo wo = new Wo();
 				wo.setId( attachment.getId() );

+ 1 - 1
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/fileinfo/ActionFileUpdateCallback.java

@@ -124,7 +124,7 @@ public class ActionFileUpdateCallback extends BaseAction {
 							attachment.getText());
 				}
 				
-				attachment.saveContent(mapping, bytes, fileName);
+				attachment.updateContent(mapping, bytes, fileName);
 				attachment = fileInfoServiceAdv.updateAttachment( docId, old_attId, attachment, mapping );
 //				
 //				List<String> keys = new ArrayList<>();

+ 4 - 3
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/fileinfo/ActionFileUploadCallback.java

@@ -5,6 +5,7 @@ import java.util.UUID;
 
 import javax.servlet.http.HttpServletRequest;
 
+import com.x.base.core.project.cache.CacheManager;
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.tika.Tika;
@@ -128,9 +129,9 @@ public class ActionFileUploadCallback extends BaseAction {
 //				keys.add(  ApplicationCache.concreteCacheKey( document.getId(), "view", isAnonymous, isManager ) ); //清除文档阅读缓存
 //				keys.add( ApplicationCache.concreteCacheKey( document.getId(), "get", isManager )  ); //清除文档信息获取缓存
 //				ApplicationCache.notify( Document.class, keys );
-				
-				ApplicationCache.notify( FileInfo.class );
-				ApplicationCache.notify( Document.class );	
+
+				CacheManager.notify( FileInfo.class );
+				CacheManager.notify( Document.class );
 				
 				WoObject woObject = new WoObject();
 				woObject.setId(attachment.getId());

+ 12 - 15
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/fileinfo/FileInfoAction.java

@@ -10,10 +10,8 @@ import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.http.WrapOutString;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
 import org.glassfish.jersey.media.multipart.FormDataParam;
 
@@ -29,7 +27,6 @@ import java.util.List;
 @JaxrsDescribe("附件信息管理")
 public class FileInfoAction extends StandardJaxrsAction{
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private static  Logger logger = LoggerFactory.getLogger( FileInfoAction.class );
 	
 	@JaxrsMethodDescribe(value = "获取全部的文件或者附件列表.", action = ActionListAll.class)
@@ -41,7 +38,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListAll.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListAll)proxy.getProxy(ActionListAll.class)).execute( request, effectivePerson );
+			result = new ActionListAll().execute( request, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			result.error( e );
@@ -60,7 +57,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListByDocId.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListByDocId)proxy.getProxy(ActionListByDocId.class)).execute( request, effectivePerson, documentId );
+			result = new ActionListByDocId().execute( request, effectivePerson, documentId );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			result.error( e );
@@ -80,7 +77,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<ActionGet.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionGet)proxy.getProxy(ActionGet.class)).execute( request, effectivePerson, id, documentId );
+			result = new ActionGet().execute( request, effectivePerson, id, documentId );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			result.error( e );
@@ -99,7 +96,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<ActionDelete.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionDelete)proxy.getProxy(ActionDelete.class)).execute( request, effectivePerson, id );
+			result = new ActionDelete().execute( request, effectivePerson, id );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			result.error( e );
@@ -119,7 +116,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<WrapOutString> result = new ActionResult<>();
 		try {
-			result = ((ActionImageToBase64)proxy.getProxy(ActionImageToBase64.class)).execute( request, effectivePerson, id, size );
+			result = new ActionImageToBase64().execute( request, effectivePerson, id, size );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			result.error( e );
@@ -138,7 +135,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		ActionResult<ActionFileDownload.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionFileDownload)proxy.getProxy(ActionFileDownload.class)).execute(request, effectivePerson, id);
+			result = new ActionFileDownload().execute(request, effectivePerson, id);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -156,7 +153,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		ActionResult<ActionFileDownloadStream.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionFileDownloadStream)proxy.getProxy(ActionFileDownloadStream.class)).execute(request, effectivePerson, id );
+			result = new ActionFileDownloadStream().execute(request, effectivePerson, id );
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -175,7 +172,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		ActionResult<ActionFileEdit.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionFileEdit)proxy.getProxy(ActionFileEdit.class)).execute( request, effectivePerson, id, docId, jsonElement);
+			result = new ActionFileEdit().execute( request, effectivePerson, id, docId, jsonElement);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -198,7 +195,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		ActionResult<ActionFileUpload.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionFileUpload)proxy.getProxy(ActionFileUpload.class)).execute(request, effectivePerson, docId, site, fileName, bytes, disposition);
+			result = new ActionFileUpload().execute(request, effectivePerson, docId, site, fileName, bytes, disposition);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -222,7 +219,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		ActionResult<ActionFileUpdate.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionFileUpdate)proxy.getProxy(ActionFileUpdate.class)).execute(request, effectivePerson, docId, id, site, fileName, bytes, disposition);
+			result = new ActionFileUpdate().execute(request, effectivePerson, docId, id, site, fileName, bytes, disposition);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -245,7 +242,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		ActionResult<ActionFileUploadCallback.Wo<ActionFileUploadCallback.WoObject>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionFileUploadCallback)proxy.getProxy(ActionFileUploadCallback.class)).execute(request, effectivePerson, docId, callback, site, fileName, bytes, disposition);
+			result = new ActionFileUploadCallback().execute(request, effectivePerson, docId, callback, site, fileName, bytes, disposition);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -270,7 +267,7 @@ public class FileInfoAction extends StandardJaxrsAction{
 		ActionResult<ActionFileUpdateCallback.Wo<ActionFileUpdateCallback.WoObject>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionFileUpdateCallback)proxy.getProxy(ActionFileUpdateCallback.class)).execute(request, effectivePerson, docId, id, callback, site, fileName, bytes, disposition);
+			result = new ActionFileUpdateCallback().execute(request, effectivePerson, docId, id, callback, site, fileName, bytes, disposition);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);

+ 11 - 14
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/form/FormAction.java

@@ -7,10 +7,8 @@ import com.x.base.core.project.annotation.JaxrsParameterDescribe;
 import com.x.base.core.project.http.*;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.*;
@@ -24,7 +22,6 @@ import java.util.List;
 @JaxrsDescribe("表单信息管理")
 public class FormAction extends StandardJaxrsAction {
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private static  Logger logger = LoggerFactory.getLogger( FormAction.class );
 
 	@JaxrsMethodDescribe(value = "获取全部的表单模板列表.", action = ActionListAll.class)
@@ -36,7 +33,7 @@ public class FormAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListAll.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListAll)proxy.getProxy(ActionListAll.class)).execute( request, effectivePerson );
+			result = new ActionListAll().execute( request, effectivePerson );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionServiceLogic( e, "系统在查询所有CMS表单时发生异常。" );
@@ -56,7 +53,7 @@ public class FormAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListByApp.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListByApp)proxy.getProxy(ActionListByApp.class)).execute( request, effectivePerson, appId );
+			result = new ActionListByApp().execute( request, effectivePerson, appId );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionServiceLogic( e, "系统在根据栏目ID查询表单时发生异常。" );
@@ -76,7 +73,7 @@ public class FormAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<ActionGet.Wo> result = new ActionResult<>();
 		try {
-			result = ((ActionGet)proxy.getProxy(ActionGet.class)).execute( request, effectivePerson, id );
+			result = new ActionGet().execute( request, effectivePerson, id );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionServiceLogic( e, "系统在根据ID查询表单时发生异常。" );
@@ -97,7 +94,7 @@ public class FormAction extends StandardJaxrsAction {
 		ActionResult<ActionGetWithAppInfo.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionGetWithAppInfo)proxy.getProxy(ActionGetWithAppInfo.class)).execute(request, effectivePerson, appFlag, formFlag);
+			result = new ActionGetWithAppInfo().execute(request, effectivePerson, appFlag, formFlag);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -116,7 +113,7 @@ public class FormAction extends StandardJaxrsAction {
 		
 		if( check ){
 			try {
-				result = ((ActionSave)proxy.getProxy(ActionSave.class)).execute( request, effectivePerson, null, jsonElement );
+				result = new ActionSave().execute( request, effectivePerson, null, jsonElement );
 			} catch (Exception e) {
 				result = new ActionResult<>();
 				result.error( e );
@@ -139,7 +136,7 @@ public class FormAction extends StandardJaxrsAction {
 
 		if( check ){
 			try {
-				result = ((ActionSave)proxy.getProxy(ActionSave.class)).execute( request, effectivePerson, id, jsonElement );
+				result = new ActionSave().execute( request, effectivePerson, id, jsonElement );
 			} catch (Exception e) {
 				result = new ActionResult<>();
 				result.error( e );
@@ -159,7 +156,7 @@ public class FormAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<WrapOutId> result = new ActionResult<>();
 		try {
-			result = ((ActionDelete)proxy.getProxy(ActionDelete.class)).execute( request, effectivePerson, id );
+			result = new ActionDelete().execute( request, effectivePerson, id );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionServiceLogic( e, "系统在根据ID删除表单时发生异常。" );
@@ -182,7 +179,7 @@ public class FormAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListNextWithFilter.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListNextWithFilter)proxy.getProxy(ActionListNextWithFilter.class)).execute( request, effectivePerson, id, count, appId, jsonElement );
+			result = new ActionListNextWithFilter().execute( request, effectivePerson, id, count, appId, jsonElement );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionServiceLogic( e, "系统在查询所有CMS表单时发生异常。" );
@@ -205,7 +202,7 @@ public class FormAction extends StandardJaxrsAction {
 		EffectivePerson effectivePerson = this.effectivePerson( request );
 		ActionResult<List<ActionListPrevWithFilter.Wo>> result = new ActionResult<>();
 		try {
-			result = ((ActionListPrevWithFilter)proxy.getProxy(ActionListPrevWithFilter.class)).execute( request, effectivePerson, id, count, appId, jsonElement );
+			result = new ActionListPrevWithFilter().execute( request, effectivePerson, id, count, appId, jsonElement );
 		} catch (Exception e) {
 			result = new ActionResult<>();
 			Exception exception = new ExceptionServiceLogic( e, "系统在查询所有CMS表单时发生异常。" );
@@ -226,7 +223,7 @@ public class FormAction extends StandardJaxrsAction {
 		ActionResult<WrapOutMap> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionListFormFieldWithAppInfo)proxy.getProxy(ActionListFormFieldWithAppInfo.class)).execute(applicationId);
+			result = new ActionListFormFieldWithAppInfo().execute(applicationId);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -244,7 +241,7 @@ public class FormAction extends StandardJaxrsAction {
 		ActionResult<WrapOutMap> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionListFormFieldWithForm)proxy.getProxy(ActionListFormFieldWithForm.class)).execute(id);
+			result = new ActionListFormFieldWithForm().execute(id);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);

+ 2 - 5
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/image/ImageAction.java

@@ -9,10 +9,8 @@ import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.http.WrapOutString;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.assemble.control.ThisApplication;
 import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
 import org.glassfish.jersey.media.multipart.FormDataParam;
 
@@ -27,7 +25,6 @@ import javax.ws.rs.core.MediaType;
 @JaxrsDescribe("附件信息管理")
 public class ImageAction extends StandardJaxrsAction{
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
 	private static  Logger logger = LoggerFactory.getLogger( ImageAction.class );
 	
 	@JaxrsMethodDescribe(value = "将上传的图片传为base64.", action = ActionImageBase64Encode.class)
@@ -43,7 +40,7 @@ public class ImageAction extends StandardJaxrsAction{
 		ActionResult<WrapOutString> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionImageBase64Encode)proxy.getProxy(ActionImageBase64Encode.class)).execute(request, effectivePerson, size, bytes, disposition);
+			result = new ActionImageBase64Encode().execute(request, effectivePerson, size, bytes, disposition);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -64,7 +61,7 @@ public class ImageAction extends StandardJaxrsAction{
 		ActionResult<ActionImageChangeSize.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionImageChangeSize)proxy.getProxy(ActionImageChangeSize.class)).execute(request, effectivePerson, id, width, height);
+			result = new ActionImageChangeSize().execute(request, effectivePerson, id, width, height);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);

+ 4 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/input/ActionCover.java

@@ -59,6 +59,10 @@ class ActionCover extends BaseAction {
 			appInfo.setAppName(this.idleAppInfoName(business, appInfo.getAppName(), appInfo.getId()));
 			appInfo.setAppAlias(this.idleAppInfoAlias(business, appInfo.getAppAlias(), appInfo.getId()));
 			persistObjects.add(appInfo);
+		}else{
+			WrapCms.inCopier.copy(wi, appInfo);
+			appInfo.setAppName(this.idleAppInfoName(business, appInfo.getAppName(), appInfo.getId()));
+			appInfo.setAppAlias(this.idleAppInfoAlias(business, appInfo.getAppAlias(), appInfo.getId()));
 		}
 
 		//2020年1月16日 O2LEE 保存栏目信息对应的配置支持信息JSON ---->start

+ 2 - 4
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/output/OutputAction.java

@@ -26,8 +26,6 @@ import java.util.List;
 @JaxrsDescribe("导出CMS")
 public class OutputAction extends StandardJaxrsAction {
 
-	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
-
 	private static Logger logger = LoggerFactory.getLogger(OutputAction.class);
 
 	@JaxrsMethodDescribe(value = "选择栏目结构.", action = ActionSelect.class)
@@ -41,7 +39,7 @@ public class OutputAction extends StandardJaxrsAction {
 		ActionResult<ActionSelect.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionSelect)proxy.getProxy(ActionSelect.class)).execute(effectivePerson, appInfoFlag, jsonElement);
+			result = new ActionSelect().execute(effectivePerson, appInfoFlag, jsonElement);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, jsonElement);
 			result.error(e);
@@ -58,7 +56,7 @@ public class OutputAction extends StandardJaxrsAction {
 		ActionResult<List<ActionList.Wo>> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = ((ActionList)proxy.getProxy(ActionList.class)).execute(effectivePerson);
+			result = new ActionList().execute(effectivePerson);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);

+ 2 - 1
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionAppInfoManagerSave.java

@@ -4,6 +4,7 @@ import com.google.gson.JsonElement;
 import com.x.base.core.project.annotation.AuditLog;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
@@ -70,7 +71,7 @@ public class ActionAppInfoManagerSave extends BaseAction {
 		if( check ){
 			String description = "栏目:"+appId+"权限变更";
 			new LogService().log( null,  effectivePerson.getDistinguishedName(), description, appId, "", "", appId, "APPINFO_MANAGER", "管理权限变更" );
-			ApplicationCache.notify( AppInfo.class );
+			CacheManager.notify( AppInfo.class );
 			Wo wo = new Wo();
 			wo.setId( appId );
 			result.setData( wo );

+ 3 - 2
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionAppInfoPublisherSave.java

@@ -4,6 +4,7 @@ import com.google.gson.JsonElement;
 import com.x.base.core.project.annotation.AuditLog;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
@@ -70,8 +71,8 @@ public class ActionAppInfoPublisherSave extends BaseAction {
 		if( check ){
 			String description = "栏目:"+appId+"权限变更";
 			new LogService().log( null,  effectivePerson.getDistinguishedName(), description, appId, "", "", appId, "APPINFO_PUBLISHER", "发布权限变更" );
-			
-			ApplicationCache.notify( AppInfo.class );
+
+			CacheManager.notify( AppInfo.class );
 			Wo wo = new Wo();
 			wo.setId( appId );
 			result.setData( wo );

+ 3 - 2
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionAppInfoViewerSave.java

@@ -4,6 +4,7 @@ import com.google.gson.JsonElement;
 import com.x.base.core.project.annotation.AuditLog;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
@@ -70,8 +71,8 @@ public class ActionAppInfoViewerSave extends BaseAction {
 		if( check ){
 			String description = "栏目:"+appId+"权限变更";
 			new LogService().log( null,  effectivePerson.getDistinguishedName(), description, appId, "", "", appId, "APPINFO_VIEWER", "可见权限变更" );
-			
-			ApplicationCache.notify( AppInfo.class );
+
+			CacheManager.notify( AppInfo.class );
 			
 			Wo wo = new Wo();
 			wo.setId( appId );

Некоторые файлы не были показаны из-за большого количества измененных файлов