roo00 6 лет назад
Родитель
Сommit
b1c9504b62
20 измененных файлов с 225 добавлено и 138 удалено
  1. 1 1
      o2server/gulpfile.js
  2. 1 4
      o2server/package.json
  3. 1 1
      o2server/version.o2
  4. 1 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/PackageO2server.java
  5. 4 0
      o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/jaxrs/meeting/ActionConfirmAllow.java
  6. 13 3
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDownloadWithWork.java
  7. 13 3
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDownloadWithWorkCompleted.java
  8. 13 3
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDownloadWithWorkCompletedStream.java
  9. 13 3
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDownloadWithWorkStream.java
  10. 26 24
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/AttachmentAction.java
  11. 12 1
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionManageOpinion.java
  12. 12 1
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionManageOpinion.java
  13. 7 22
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionManageListFilterPaging.java
  14. 12 3
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionManageOpinion.java
  15. 8 26
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionManageListFilterPaging.java
  16. 16 3
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionManageOpinion.java
  17. 16 21
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionManageListFilterPaging.java
  18. 7 19
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionManageListFilterPaging.java
  19. 17 0
      o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkProperties.java
  20. 32 0
      o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/test/ActionTest1.java

+ 1 - 1
o2server/gulpfile.js

@@ -110,7 +110,7 @@ var apps = [
 ];
 
 var sourcePrefix = '../o2web/';
-var destDir = 'servers/webServer/';
+var destDir = 'target/o2server/servers/webServer/';
 
 var uploadOptions = {
     'location': 'E:/o2server/servers/webServer/',

+ 1 - 4
o2server/package.json

@@ -35,14 +35,11 @@
     "gulp-if": "^2.0.2",
     "gulp-rename": "^1.4.0",
     "gulp-sftp": "^0.1.5",
-    "gulp-tm-uglify": "3.0.1",
+    "gulp-tm-uglify": "^3.0.1",
     "karma": "^3.1.4",
     "karma-jasmine": "^2.0.1",
     "karma-phantomjs-launcher": "^1.0.4",
     "merge-stream": "^1.0.1",
     "minimist": "^1.2.0"
-  },
-  "dependencies": {
-    "assert": "^2.0.0"
   }
 }

+ 1 - 1
o2server/version.o2

@@ -1 +1 @@
-2020-01-07 17:19:55
+2020-01-07 22:22:27

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

@@ -68,6 +68,7 @@ public class PackageO2server {
 			compress(outputStream, base.getAbsolutePath(), "start_kylinos_phytium_debug.sh");
 			compress(outputStream, base.getAbsolutePath(), "stop_kylinos_phytium.sh");
 			compress(outputStream, base.getAbsolutePath(), "console_kylinos_phytium.sh");
+			compress(outputStream, base.getAbsolutePath(), "version.o2");
 		} catch (IOException e) {
 			e.printStackTrace();
 		}

+ 4 - 0
o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/jaxrs/meeting/ActionConfirmAllow.java

@@ -9,6 +9,7 @@ import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.jaxrs.WoId;
 import com.x.meeting.assemble.control.Business;
+import com.x.meeting.assemble.control.MessageFactory;
 import com.x.meeting.core.entity.ConfirmStatus;
 import com.x.meeting.core.entity.Meeting;
 import com.x.meeting.core.entity.Room;
@@ -38,6 +39,9 @@ class ActionConfirmAllow extends BaseAction {
 			meeting.setConfirmStatus(ConfirmStatus.allow);
 			emc.check(meeting, CheckPersistType.all);
 			emc.commit();
+			for (String _s : meeting.getInvitePersonList()) {
+				MessageFactory.meeting_invite(_s, meeting, room);
+			}
 			Wo wo = new Wo();
 			wo.setId(meeting.getId());
 			result.setData(wo);

+ 13 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDownloadWithWork.java

@@ -1,5 +1,6 @@
 package com.x.processplatform.assemble.surface.jaxrs.attachment;
 
+import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.lang3.BooleanUtils;
 
 import com.x.base.core.container.EntityManagerContainer;
@@ -15,9 +16,10 @@ import com.x.processplatform.assemble.surface.ThisApplication;
 import com.x.processplatform.assemble.surface.WorkControl;
 import com.x.processplatform.core.entity.content.Attachment;
 import com.x.processplatform.core.entity.content.Work;
+import org.apache.commons.lang3.StringUtils;
 
 class ActionDownloadWithWork extends BaseAction {
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String workId) throws Exception {
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String workId, String fileName) throws Exception {
 
 		ActionResult<Wo> result = new ActionResult<>();
 		Work work = null;
@@ -43,8 +45,16 @@ class ActionDownloadWithWork extends BaseAction {
 		}
 		StorageMapping mapping = ThisApplication.context().storageMappings().get(Attachment.class,
 				attachment.getStorage());
-		Wo wo = new Wo(attachment.readContent(mapping), this.contentType(false, attachment.getName()),
-				this.contentDisposition(false, attachment.getName()));
+		if(StringUtils.isBlank(fileName)){
+			fileName = attachment.getName();
+		}else{
+			String extension = FilenameUtils.getExtension(fileName);
+			if(StringUtils.isEmpty(extension)){
+				fileName = fileName+ "." + attachment.getExtension();
+			}
+		}
+		Wo wo = new Wo(attachment.readContent(mapping), this.contentType(false, fileName),
+				this.contentDisposition(false, fileName));
 		result.setData(wo);
 		return result;
 	}

+ 13 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDownloadWithWorkCompleted.java

@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.attachment;
 
 import java.util.List;
 
+import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.lang3.BooleanUtils;
 
 import com.x.base.core.container.EntityManagerContainer;
@@ -16,9 +17,10 @@ import com.x.processplatform.assemble.surface.ThisApplication;
 import com.x.processplatform.assemble.surface.WorkCompletedControl;
 import com.x.processplatform.core.entity.content.Attachment;
 import com.x.processplatform.core.entity.content.WorkCompleted;
+import org.apache.commons.lang3.StringUtils;
 
 class ActionDownloadWithWorkCompleted extends BaseAction {
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String workCompletedId) throws Exception {
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String workCompletedId, String fileName) throws Exception {
 		
 		ActionResult<Wo> result = new ActionResult<>();
 		WorkCompleted workCompleted = null;
@@ -47,8 +49,16 @@ class ActionDownloadWithWorkCompleted extends BaseAction {
 		}
 		StorageMapping mapping = ThisApplication.context().storageMappings().get(Attachment.class,
 				attachment.getStorage());
-		Wo wo = new Wo(attachment.readContent(mapping), this.contentType(false, attachment.getName()),
-				this.contentDisposition(false, attachment.getName()));
+		if(StringUtils.isBlank(fileName)){
+			fileName = attachment.getName();
+		}else{
+			String extension = FilenameUtils.getExtension(fileName);
+			if(StringUtils.isEmpty(extension)){
+				fileName = fileName+ "." + attachment.getExtension();
+			}
+		}
+		Wo wo = new Wo(attachment.readContent(mapping), this.contentType(false, fileName),
+				this.contentDisposition(false, fileName));
 		result.setData(wo);
 		return result;
 	}

+ 13 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDownloadWithWorkCompletedStream.java

@@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.attachment;
 
 import java.util.List;
 
+import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.lang3.BooleanUtils;
 
 import com.x.base.core.container.EntityManagerContainer;
@@ -16,9 +17,10 @@ import com.x.processplatform.assemble.surface.ThisApplication;
 import com.x.processplatform.assemble.surface.WorkCompletedControl;
 import com.x.processplatform.core.entity.content.Attachment;
 import com.x.processplatform.core.entity.content.WorkCompleted;
+import org.apache.commons.lang3.StringUtils;
 
 class ActionDownloadWithWorkCompletedStream extends BaseAction {
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String workCompletedId) throws Exception {
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String workCompletedId, String fileName) throws Exception {
 		
 		ActionResult<Wo> result = new ActionResult<>();
 		WorkCompleted workCompleted = null;
@@ -47,8 +49,16 @@ class ActionDownloadWithWorkCompletedStream extends BaseAction {
 		}
 		StorageMapping mapping = ThisApplication.context().storageMappings().get(Attachment.class,
 				attachment.getStorage());
-		Wo wo = new Wo(attachment.readContent(mapping), this.contentType(true, attachment.getName()),
-				this.contentDisposition(true, attachment.getName()));
+		if(StringUtils.isBlank(fileName)){
+			fileName = attachment.getName();
+		}else{
+			String extension = FilenameUtils.getExtension(fileName);
+			if(StringUtils.isEmpty(extension)){
+				fileName = fileName+ "." + attachment.getExtension();
+			}
+		}
+		Wo wo = new Wo(attachment.readContent(mapping), this.contentType(true, fileName),
+				this.contentDisposition(true, fileName));
 		result.setData(wo);
 		return result;
 	}

+ 13 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDownloadWithWorkStream.java

@@ -1,5 +1,6 @@
 package com.x.processplatform.assemble.surface.jaxrs.attachment;
 
+import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.lang3.BooleanUtils;
 
 import com.x.base.core.container.EntityManagerContainer;
@@ -15,9 +16,10 @@ import com.x.processplatform.assemble.surface.ThisApplication;
 import com.x.processplatform.assemble.surface.WorkControl;
 import com.x.processplatform.core.entity.content.Attachment;
 import com.x.processplatform.core.entity.content.Work;
+import org.apache.commons.lang3.StringUtils;
 
 class ActionDownloadWithWorkStream extends BaseAction {
-	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String workId) throws Exception {
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String workId, String fileName) throws Exception {
 		ActionResult<Wo> result = new ActionResult<>();
 		Work work = null;
 		Attachment attachment = null;
@@ -42,8 +44,16 @@ class ActionDownloadWithWorkStream extends BaseAction {
 		}
 		StorageMapping mapping = ThisApplication.context().storageMappings().get(Attachment.class,
 				attachment.getStorage());
-		Wo wo = new Wo(attachment.readContent(mapping), this.contentType(true, attachment.getName()),
-				this.contentDisposition(true, attachment.getName()));
+		if(StringUtils.isBlank(fileName)){
+			fileName = attachment.getName();
+		}else{
+			String extension = FilenameUtils.getExtension(fileName);
+			if(StringUtils.isEmpty(extension)){
+				fileName = fileName+ "." + attachment.getExtension();
+			}
+		}
+		Wo wo = new Wo(attachment.readContent(mapping), this.contentType(true, fileName),
+				this.contentDisposition(true, fileName));
 		result.setData(wo);
 		return result;
 	}

+ 26 - 24
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/AttachmentAction.java

@@ -2,15 +2,9 @@ package com.x.processplatform.assemble.surface.jaxrs.attachment;
 
 import java.util.List;
 
+import javax.jws.WebParam;
 import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-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.*;
 import javax.ws.rs.container.AsyncResponse;
 import javax.ws.rs.container.Suspended;
 import javax.ws.rs.core.Context;
@@ -192,11 +186,12 @@ public class AttachmentAction extends StandardJaxrsAction {
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void downloadWithWork(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
 			@JaxrsParameterDescribe("附件标识") @PathParam("id") String id,
-			@JaxrsParameterDescribe("工作标识") @PathParam("workId") String workId) {
+			@JaxrsParameterDescribe("工作标识") @PathParam("workId") String workId,
+			@JaxrsParameterDescribe("下载附件名称") @QueryParam("fileName") String fileName) {
 		ActionResult<ActionDownloadWithWork.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = new ActionDownloadWithWork().execute(effectivePerson, id, workId);
+			result = new ActionDownloadWithWork().execute(effectivePerson, id, workId, fileName);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -210,11 +205,12 @@ public class AttachmentAction extends StandardJaxrsAction {
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void downloadWithWorkWithExtension(@Suspended final AsyncResponse asyncResponse,
 			@Context HttpServletRequest request, @JaxrsParameterDescribe("附件标识") @PathParam("id") String id,
-			@JaxrsParameterDescribe("工作标识") @PathParam("workId") String workId) {
+			@JaxrsParameterDescribe("工作标识") @PathParam("workId") String workId,
+			@JaxrsParameterDescribe("下载附件名称") @QueryParam("fileName") String fileName) {
 		ActionResult<ActionDownloadWithWork.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = new ActionDownloadWithWork().execute(effectivePerson, id, workId);
+			result = new ActionDownloadWithWork().execute(effectivePerson, id, workId, fileName);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -228,11 +224,12 @@ public class AttachmentAction extends StandardJaxrsAction {
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void downloadWithWorkStream(@Suspended final AsyncResponse asyncResponse,
 			@Context HttpServletRequest request, @JaxrsParameterDescribe("附件标识") @PathParam("id") String id,
-			@JaxrsParameterDescribe("工作标识") @PathParam("workId") String workId) {
+			@JaxrsParameterDescribe("工作标识") @PathParam("workId") String workId,
+			@JaxrsParameterDescribe("下载附件名称") @QueryParam("fileName") String fileName) {
 		ActionResult<ActionDownloadWithWorkStream.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = new ActionDownloadWithWorkStream().execute(effectivePerson, id, workId);
+			result = new ActionDownloadWithWorkStream().execute(effectivePerson, id, workId, fileName);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -246,11 +243,12 @@ public class AttachmentAction extends StandardJaxrsAction {
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void downloadWithWorkStreamWithExtension(@Suspended final AsyncResponse asyncResponse,
 			@Context HttpServletRequest request, @JaxrsParameterDescribe("附件标识") @PathParam("id") String id,
-			@JaxrsParameterDescribe("工作标识") @PathParam("workId") String workId) {
+			@JaxrsParameterDescribe("工作标识") @PathParam("workId") String workId,
+			@JaxrsParameterDescribe("下载附件名称") @QueryParam("fileName") String fileName) {
 		ActionResult<ActionDownloadWithWorkStream.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = new ActionDownloadWithWorkStream().execute(effectivePerson, id, workId);
+			result = new ActionDownloadWithWorkStream().execute(effectivePerson, id, workId, fileName);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -264,11 +262,12 @@ public class AttachmentAction extends StandardJaxrsAction {
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void downloadWithWorkCompleted(@Suspended final AsyncResponse asyncResponse,
 			@Context HttpServletRequest request, @JaxrsParameterDescribe("附件标识") @PathParam("id") String id,
-			@JaxrsParameterDescribe("已完成工作标识") @PathParam("workCompletedId") String workCompletedId) {
+			@JaxrsParameterDescribe("已完成工作标识") @PathParam("workCompletedId") String workCompletedId,
+			@JaxrsParameterDescribe("下载附件名称") @QueryParam("fileName") String fileName) {
 		ActionResult<ActionDownloadWithWorkCompleted.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = new ActionDownloadWithWorkCompleted().execute(effectivePerson, id, workCompletedId);
+			result = new ActionDownloadWithWorkCompleted().execute(effectivePerson, id, workCompletedId, fileName);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -282,11 +281,12 @@ public class AttachmentAction extends StandardJaxrsAction {
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void downloadWithWorkCompletedWithExtension(@Suspended final AsyncResponse asyncResponse,
 			@Context HttpServletRequest request, @JaxrsParameterDescribe("附件标识") @PathParam("id") String id,
-			@JaxrsParameterDescribe("已完成工作标识") @PathParam("workCompletedId") String workCompletedId) {
+			@JaxrsParameterDescribe("已完成工作标识") @PathParam("workCompletedId") String workCompletedId,
+			@JaxrsParameterDescribe("下载附件名称") @QueryParam("fileName") String fileName) {
 		ActionResult<ActionDownloadWithWorkCompleted.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = new ActionDownloadWithWorkCompleted().execute(effectivePerson, id, workCompletedId);
+			result = new ActionDownloadWithWorkCompleted().execute(effectivePerson, id, workCompletedId, fileName);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -300,11 +300,12 @@ public class AttachmentAction extends StandardJaxrsAction {
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void downloadWithWorkCompletedStream(@Suspended final AsyncResponse asyncResponse,
 			@Context HttpServletRequest request, @JaxrsParameterDescribe("附件标识") @PathParam("id") String id,
-			@JaxrsParameterDescribe("已完成工作标识") @PathParam("workCompletedId") String workCompletedId) {
+			@JaxrsParameterDescribe("已完成工作标识") @PathParam("workCompletedId") String workCompletedId,
+			@JaxrsParameterDescribe("下载附件名称") @QueryParam("fileName") String fileName) {
 		ActionResult<ActionDownloadWithWorkCompletedStream.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = new ActionDownloadWithWorkCompletedStream().execute(effectivePerson, id, workCompletedId);
+			result = new ActionDownloadWithWorkCompletedStream().execute(effectivePerson, id, workCompletedId, fileName);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);
@@ -318,11 +319,12 @@ public class AttachmentAction extends StandardJaxrsAction {
 	@Consumes(MediaType.APPLICATION_JSON)
 	public void downloadWithWorkCompletedStreamWithExtension(@Suspended final AsyncResponse asyncResponse,
 			@Context HttpServletRequest request, @JaxrsParameterDescribe("附件标识") @PathParam("id") String id,
-			@JaxrsParameterDescribe("已完成工作标识") @PathParam("workCompletedId") String workCompletedId) {
+			@JaxrsParameterDescribe("已完成工作标识") @PathParam("workCompletedId") String workCompletedId,
+			@JaxrsParameterDescribe("下载附件名称") @QueryParam("fileName") String fileName) {
 		ActionResult<ActionDownloadWithWorkCompletedStream.Wo> result = new ActionResult<>();
 		EffectivePerson effectivePerson = this.effectivePerson(request);
 		try {
-			result = new ActionDownloadWithWorkCompletedStream().execute(effectivePerson, id, workCompletedId);
+			result = new ActionDownloadWithWorkCompletedStream().execute(effectivePerson, id, workCompletedId, fileName);
 		} catch (Exception e) {
 			logger.error(e, effectivePerson, request, null);
 			result.error(e);

+ 12 - 1
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionManageOpinion.java

@@ -3,6 +3,8 @@ package com.x.processplatform.assemble.surface.jaxrs.read;
 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.entity.annotation.CheckPersistType;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
@@ -10,11 +12,14 @@ 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.jaxrs.WrapBoolean;
+import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.core.entity.content.Read;
 import com.x.processplatform.core.entity.element.Application;
 import com.x.processplatform.core.entity.element.Process;
 
+import java.util.Objects;
+
 public class ActionManageOpinion extends BaseAction {
 
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, JsonElement jsonElement) throws Exception {
@@ -32,7 +37,13 @@ public class ActionManageOpinion extends BaseAction {
 				throw new ExceptionAccessDenied(effectivePerson);
 			}
 			emc.beginTransaction(Read.class);
-			read.setOpinion(wi.getOpinion());
+            if (StringTools.utf8Length(wi.getOpinion()) > JpaObject.length_255B) {
+                read.setOpinionLob(wi.getOpinion());
+                read.setOpinion(StringTools.utf8SubString(wi.getOpinion(), JpaObject.length_255B));
+            } else {
+                read.setOpinion(Objects.toString(wi.getOpinion(), ""));
+                read.setOpinionLob(null);
+            }
 			emc.commit();
 			Wo wo = new Wo();
 			wo.setValue(true);

+ 12 - 1
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionManageOpinion.java

@@ -3,6 +3,8 @@ package com.x.processplatform.assemble.surface.jaxrs.readcompleted;
 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.entity.annotation.CheckPersistType;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
@@ -10,11 +12,14 @@ 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.jaxrs.WrapBoolean;
+import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.core.entity.content.ReadCompleted;
 import com.x.processplatform.core.entity.element.Application;
 import com.x.processplatform.core.entity.element.Process;
 
+import java.util.Objects;
+
 public class ActionManageOpinion extends BaseAction {
 
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, JsonElement jsonElement) throws Exception {
@@ -32,7 +37,13 @@ public class ActionManageOpinion extends BaseAction {
 				throw new ExceptionAccessDenied(effectivePerson);
 			}
 			emc.beginTransaction(ReadCompleted.class);
-			readCompleted.setOpinion(wi.getOpinion());
+			if (StringTools.utf8Length(wi.getOpinion()) > JpaObject.length_255B) {
+				readCompleted.setOpinionLob(wi.getOpinion());
+				readCompleted.setOpinion(StringTools.utf8SubString(wi.getOpinion(), JpaObject.length_255B));
+			} else {
+				readCompleted.setOpinion(Objects.toString(wi.getOpinion(), ""));
+				readCompleted.setOpinionLob(null);
+			}
 			emc.commit();
 			Wo wo = new Wo();
 			wo.setValue(true);

+ 7 - 22
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionManageListFilterPaging.java

@@ -12,6 +12,7 @@ import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.ListTools;
+import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.core.entity.content.Task;
 import com.x.processplatform.core.entity.content.Task_;
@@ -105,17 +106,9 @@ class ActionManageListFilterPaging extends BaseAction {
 			}
 			p = cb.and(p, cb.lessThanOrEqualTo(root.get(Task_.urgeTime), DateTools.getAdjustTimeDay(null, 0, -urgeTime, 0, 0)));
 		}
-		if (StringUtils.isNotEmpty(wi.getKey())) {
-			String key = StringUtils.trim(StringUtils.replace(wi.getKey(), "\u3000", " "));
-			if (StringUtils.isNotEmpty(key)) {
-				key = StringUtils.replaceEach(key, new String[] { "?", "%" }, new String[] { "", "" });
-				p = cb.and(p,
-						cb.or(cb.like(root.get(Task_.title), "%" + key + "%"),
-								cb.like(root.get(Task_.opinion), "%" + key + "%"),
-								cb.like(root.get(Task_.serial), "%" + key + "%"),
-								cb.like(root.get(Task_.creatorPerson), "%" + key + "%"),
-								cb.like(root.get(Task_.creatorUnit), "%" + key + "%")));
-			}
+		if (StringUtils.isNoneBlank(wi.getKey())) {
+			String key = StringTools.escapeSqlLikeKey(wi.getKey());
+			p = cb.and(p,cb.like(root.get(Task_.title), "%" + key + "%", StringTools.SQL_ESCAPE_CHAR));
 		}
 		cq.select(root).where(p).orderBy(cb.desc(root.get(Task_.startTime)));
 		return em.createQuery(cq).setFirstResult((adjustPage - 1) * adjustPageSize).setMaxResults(adjustPageSize)
@@ -175,17 +168,9 @@ class ActionManageListFilterPaging extends BaseAction {
 			}
 			p = cb.and(p, cb.lessThanOrEqualTo(root.get(Task_.urgeTime), DateTools.getAdjustTimeDay(null, 0, -urgeTime, 0, 0)));
 		}
-		if (StringUtils.isNotEmpty(wi.getKey())) {
-			String key = StringUtils.trim(StringUtils.replace(wi.getKey(), "\u3000", " "));
-			if (StringUtils.isNotEmpty(key)) {
-				key = StringUtils.replaceEach(key, new String[] { "?", "%" }, new String[] { "", "" });
-				p = cb.and(p,
-						cb.or(cb.like(root.get(Task_.title), "%" + key + "%"),
-								cb.like(root.get(Task_.opinion), "%" + key + "%"),
-								cb.like(root.get(Task_.serial), "%" + key + "%"),
-								cb.like(root.get(Task_.creatorPerson), "%" + key + "%"),
-								cb.like(root.get(Task_.creatorUnit), "%" + key + "%")));
-			}
+		if (StringUtils.isNoneBlank(wi.getKey())) {
+			String key = StringTools.escapeSqlLikeKey(wi.getKey());
+			p = cb.and(p,cb.like(root.get(Task_.title), "%" + key + "%", StringTools.SQL_ESCAPE_CHAR));
 		}
 		return em.createQuery(cq.select(cb.count(root)).where(p)).getSingleResult();
 	}

+ 12 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionManageOpinion.java

@@ -3,6 +3,8 @@ package com.x.processplatform.assemble.surface.jaxrs.task;
 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.entity.annotation.CheckPersistType;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
@@ -10,12 +12,15 @@ 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.jaxrs.WrapBoolean;
+import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.core.entity.content.Read;
 import com.x.processplatform.core.entity.content.Task;
 import com.x.processplatform.core.entity.element.Application;
 import com.x.processplatform.core.entity.element.Process;
 
+import java.util.Objects;
+
 public class ActionManageOpinion extends BaseAction {
 
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, JsonElement jsonElement) throws Exception {
@@ -35,9 +40,13 @@ public class ActionManageOpinion extends BaseAction {
 			}
 
 			emc.beginTransaction(Read.class);
-
-			task.setOpinion(wi.getOpinion());
-
+			if (StringTools.utf8Length(wi.getOpinion()) > JpaObject.length_255B) {
+				task.setOpinionLob(wi.getOpinion());
+				task.setOpinion(StringTools.utf8SubString(wi.getOpinion(), JpaObject.length_255B));
+			} else {
+				task.setOpinion(Objects.toString(wi.getOpinion(), ""));
+				task.setOpinionLob(null);
+			}
 			emc.commit();
 			Wo wo = new Wo();
 			wo.setValue(true);

+ 8 - 26
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionManageListFilterPaging.java

@@ -12,11 +12,9 @@ import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.ListTools;
+import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.assemble.surface.Business;
-import com.x.processplatform.core.entity.content.Task;
-import com.x.processplatform.core.entity.content.TaskCompleted;
-import com.x.processplatform.core.entity.content.TaskCompleted_;
-import com.x.processplatform.core.entity.content.Task_;
+import com.x.processplatform.core.entity.content.*;
 import org.apache.commons.lang3.StringUtils;
 
 import javax.persistence.EntityManager;
@@ -91,17 +89,9 @@ class ActionManageListFilterPaging extends BaseAction {
 		if (ListTools.isNotEmpty(wi.getActivityNameList())) {
 			p = cb.and(p, root.get(TaskCompleted_.activityName).in(wi.getActivityNameList()));
 		}
-		if (StringUtils.isNotEmpty(wi.getKey())) {
-			String key = StringUtils.trim(StringUtils.replace(wi.getKey(), "\u3000", " "));
-			if (StringUtils.isNotEmpty(key)) {
-				key = StringUtils.replaceEach(key, new String[] { "?", "%" }, new String[] { "", "" });
-				p = cb.and(p,
-						cb.or(cb.like(root.get(TaskCompleted_.title), "%" + key + "%"),
-								cb.like(root.get(TaskCompleted_.opinion), "%" + key + "%"),
-								cb.like(root.get(TaskCompleted_.serial), "%" + key + "%"),
-								cb.like(root.get(TaskCompleted_.creatorPerson), "%" + key + "%"),
-								cb.like(root.get(TaskCompleted_.creatorUnit), "%" + key + "%")));
-			}
+		if (StringUtils.isNoneBlank(wi.getKey())) {
+			String key = StringTools.escapeSqlLikeKey(wi.getKey());
+			p = cb.and(p,cb.like(root.get(TaskCompleted_.title), "%" + key + "%", StringTools.SQL_ESCAPE_CHAR));
 		}
 		cq.select(root).where(p).orderBy(cb.desc(root.get(TaskCompleted_.startTime)));
 		return em.createQuery(cq).setFirstResult((adjustPage - 1) * adjustPageSize).setMaxResults(adjustPageSize)
@@ -145,17 +135,9 @@ class ActionManageListFilterPaging extends BaseAction {
 		if (ListTools.isNotEmpty(wi.getActivityNameList())) {
 			p = cb.and(p, root.get(TaskCompleted_.activityName).in(wi.getActivityNameList()));
 		}
-		if (StringUtils.isNotEmpty(wi.getKey())) {
-			String key = StringUtils.trim(StringUtils.replace(wi.getKey(), "\u3000", " "));
-			if (StringUtils.isNotEmpty(key)) {
-				key = StringUtils.replaceEach(key, new String[] { "?", "%" }, new String[] { "", "" });
-				p = cb.and(p,
-						cb.or(cb.like(root.get(TaskCompleted_.title), "%" + key + "%"),
-								cb.like(root.get(TaskCompleted_.opinion), "%" + key + "%"),
-								cb.like(root.get(TaskCompleted_.serial), "%" + key + "%"),
-								cb.like(root.get(TaskCompleted_.creatorPerson), "%" + key + "%"),
-								cb.like(root.get(TaskCompleted_.creatorUnit), "%" + key + "%")));
-			}
+		if (StringUtils.isNoneBlank(wi.getKey())) {
+			String key = StringTools.escapeSqlLikeKey(wi.getKey());
+			p = cb.and(p,cb.like(root.get(TaskCompleted_.title), "%" + key + "%", StringTools.SQL_ESCAPE_CHAR));
 		}
 		return em.createQuery(cq.select(cb.count(root)).where(p)).getSingleResult();
 	}

+ 16 - 3
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionManageOpinion.java

@@ -3,6 +3,8 @@ package com.x.processplatform.assemble.surface.jaxrs.taskcompleted;
 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.entity.annotation.CheckPersistType;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.exception.ExceptionAccessDenied;
 import com.x.base.core.project.exception.ExceptionEntityNotExist;
@@ -10,13 +12,20 @@ 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.jaxrs.WrapBoolean;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.core.entity.content.TaskCompleted;
 import com.x.processplatform.core.entity.element.Application;
 import com.x.processplatform.core.entity.element.Process;
 
+import java.util.Objects;
+
 public class ActionManageOpinion extends BaseAction {
 
+	private static Logger logger = LoggerFactory.getLogger(ActionManageOpinion.class);
+
 	ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, JsonElement jsonElement) throws Exception {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			ActionResult<Wo> result = new ActionResult<>();
@@ -34,9 +43,13 @@ public class ActionManageOpinion extends BaseAction {
 			}
 
 			emc.beginTransaction(TaskCompleted.class);
-
-			taskCompleted.setOpinion(wi.getOpinion());
-
+			if (StringTools.utf8Length(wi.getOpinion()) > JpaObject.length_255B) {
+				taskCompleted.setOpinionLob(wi.getOpinion());
+				taskCompleted.setOpinion(StringTools.utf8SubString(wi.getOpinion(), JpaObject.length_255B));
+			} else {
+				taskCompleted.setOpinion(Objects.toString(wi.getOpinion(), ""));
+				taskCompleted.setOpinionLob(null);
+			}
 			emc.commit();
 			Wo wo = new Wo();
 			wo.setValue(true);

+ 16 - 21
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionManageListFilterPaging.java

@@ -11,9 +11,9 @@ import com.x.base.core.project.bean.WrapCopierFactory;
 import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.tools.DateRange;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.ListTools;
+import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.core.entity.content.*;
 import org.apache.commons.lang3.StringUtils;
@@ -24,7 +24,6 @@ import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
 
 class ActionManageListFilterPaging extends BaseAction {
@@ -82,16 +81,18 @@ class ActionManageListFilterPaging extends BaseAction {
 		if (ListTools.isNotEmpty(person_ids)) {
 			p = cb.and(p, root.get(Work_.creatorPerson).in(person_ids));
 		}
-		if (StringUtils.isNotEmpty(wi.getKey())) {
-			String key = StringUtils.trim(StringUtils.replace(wi.getKey(), "\u3000", " "));
-			if (StringUtils.isNotEmpty(key)) {
-				key = StringUtils.replaceEach(key, new String[] { "?", "%" }, new String[] { "", "" });
-				p = cb.and(p,
-						cb.or(cb.like(root.get(Work_.title), "%" + key + "%"),
-						cb.like(root.get(Work_.serial), "%" + key + "%"),
-						cb.like(root.get(Work_.creatorPerson), "%" + key + "%"),
-						cb.like(root.get(Work_.creatorUnit), "%" + key + "%")));
-			}
+		if (ListTools.isNotEmpty(wi.getCreatorUnitList())) {
+			p = cb.and(p, root.get(Work_.creatorUnit).in(wi.getCreatorUnitList()));
+		}
+		if (ListTools.isNotEmpty(wi.getActivityNameList())) {
+			p = cb.and(p, root.get(Work_.activityName).in(wi.getActivityNameList()));
+		}
+		if (ListTools.isNotEmpty(wi.getWorkStatusList())) {
+			p = cb.and(p, root.get(Work_.workStatus).in(wi.getWorkStatusList()));
+		}
+		if (StringUtils.isNoneBlank(wi.getKey())) {
+			String key = StringTools.escapeSqlLikeKey(wi.getKey());
+			p = cb.and(p,cb.like(root.get(Work_.title), "%" + key + "%", StringTools.SQL_ESCAPE_CHAR));
 		}
 		cq.select(root).where(p).orderBy(cb.desc(root.get(Work_.startTime)));
 		return em.createQuery(cq).setFirstResult((adjustPage - 1) * adjustPageSize).setMaxResults(adjustPageSize)
@@ -138,15 +139,9 @@ class ActionManageListFilterPaging extends BaseAction {
 		if (ListTools.isNotEmpty(wi.getWorkStatusList())) {
 			p = cb.and(p, root.get(Work_.workStatus).in(wi.getWorkStatusList()));
 		}
-		if (StringUtils.isNotEmpty(wi.getKey())) {
-			String key = StringUtils.trim(StringUtils.replace(wi.getKey(), "\u3000", " "));
-			if (StringUtils.isNotEmpty(key)) {
-				key = StringUtils.replaceEach(key, new String[] { "?", "%" }, new String[] { "", "" });
-				p = cb.and(p,
-						cb.or(cb.like(root.get(Work_.title), "%" + key + "%"),
-								cb.like(root.get(Work_.serial), "%" + key + "%"),
-								cb.like(root.get(Work_.creatorPerson), "%" + key + "%")));
-			}
+		if (StringUtils.isNoneBlank(wi.getKey())) {
+			String key = StringTools.escapeSqlLikeKey(wi.getKey());
+			p = cb.and(p,cb.like(root.get(Work_.title), "%" + key + "%", StringTools.SQL_ESCAPE_CHAR));
 		}
 		return em.createQuery(cq.select(cb.count(root)).where(p)).getSingleResult();
 	}

+ 7 - 19
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/workcompleted/ActionManageListFilterPaging.java

@@ -12,6 +12,7 @@ import com.x.base.core.project.http.ActionResult;
 import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.tools.DateTools;
 import com.x.base.core.project.tools.ListTools;
+import com.x.base.core.project.tools.StringTools;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.core.entity.content.*;
 import org.apache.commons.lang3.StringUtils;
@@ -85,16 +86,9 @@ class ActionManageListFilterPaging extends BaseAction {
 		if (ListTools.isNotEmpty(wi.getStartTimeMonthList())) {
 			p = cb.and(p, root.get(WorkCompleted_.startTimeMonth).in(wi.getStartTimeMonthList()));
 		}
-		if (StringUtils.isNotEmpty(wi.getKey())) {
-			String key = StringUtils.trim(StringUtils.replace(wi.getKey(), "\u3000", " "));
-			if (StringUtils.isNotEmpty(key)) {
-				key = StringUtils.replaceEach(key, new String[] { "?", "%" }, new String[] { "", "" });
-				p = cb.and(p,
-						cb.or(cb.like(root.get(WorkCompleted_.title), "%" + key + "%"),
-						cb.like(root.get(WorkCompleted_.serial), "%" + key + "%"),
-						cb.like(root.get(WorkCompleted_.creatorPerson), "%" + key + "%"),
-						cb.like(root.get(WorkCompleted_.creatorUnit), "%" + key + "%")));
-			}
+		if (StringUtils.isNoneBlank(wi.getKey())) {
+			String key = StringTools.escapeSqlLikeKey(wi.getKey());
+			p = cb.and(p,cb.like(root.get(WorkCompleted_.title), "%" + key + "%", StringTools.SQL_ESCAPE_CHAR));
 		}
 		cq.select(root).where(p).orderBy(cb.desc(root.get(WorkCompleted_.startTime)));
 		return em.createQuery(cq).setFirstResult((adjustPage - 1) * adjustPageSize).setMaxResults(adjustPageSize)
@@ -135,15 +129,9 @@ class ActionManageListFilterPaging extends BaseAction {
 		if (ListTools.isNotEmpty(wi.getStartTimeMonthList())) {
 			p = cb.and(p, root.get(WorkCompleted_.startTimeMonth).in(wi.getStartTimeMonthList()));
 		}
-		if (StringUtils.isNotEmpty(wi.getKey())) {
-			String key = StringUtils.trim(StringUtils.replace(wi.getKey(), "\u3000", " "));
-			if (StringUtils.isNotEmpty(key)) {
-				key = StringUtils.replaceEach(key, new String[] { "?", "%" }, new String[] { "", "" });
-				p = cb.and(p,
-						cb.or(cb.like(root.get(WorkCompleted_.title), "%" + key + "%"),
-								cb.like(root.get(WorkCompleted_.serial), "%" + key + "%"),
-								cb.like(root.get(WorkCompleted_.creatorPerson), "%" + key + "%")));
-			}
+		if (StringUtils.isNoneBlank(wi.getKey())) {
+			String key = StringTools.escapeSqlLikeKey(wi.getKey());
+			p = cb.and(p,cb.like(root.get(WorkCompleted_.title), "%" + key + "%", StringTools.SQL_ESCAPE_CHAR));
 		}
 		return em.createQuery(cq.select(cb.count(root)).where(p)).getSingleResult();
 	}

+ 17 - 0
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkProperties.java

@@ -0,0 +1,17 @@
+package com.x.processplatform.core.entity.content;
+
+public class WorkProperties {
+
+//	private LinkedHashMap<>
+//
+//	public static class SplitStamp{
+//		
+//		private String token;
+//		
+//		private String type;
+//		
+//		private String value;
+//		
+//	}
+
+}

+ 32 - 0
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/test/ActionTest1.java

@@ -0,0 +1,32 @@
+package com.x.processplatform.service.processing.jaxrs.test;
+
+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.processplatform.core.entity.content.Work;
+
+class ActionTest1 extends BaseAction {
+
+	ActionResult<Wo> execute(EffectivePerson effectivePerson) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			ActionResult<Wo> result = new ActionResult<>();
+			String id = "0cf6f6fd-072a-4b63-957c-ee85d6a95b9f";
+			Work work = emc.find(id, Work.class);
+			emc.beginTransaction(Work.class);
+			try (EntityManagerContainer emc2 = EntityManagerContainerFactory.instance().create()) {
+				emc2.beginTransaction(Work.class);
+				Work work2 = emc2.find(id, Work.class);
+				emc2.commit();
+			}
+			emc.commit();
+			return result;
+		}
+	}
+
+	public static class Wo extends WrapBoolean {
+
+	}
+
+}