diff --git a/o2server/x_base_core_project/src/main/java/com/x/base/core/project/exception/ExceptionStorageMappingNotExist.java b/o2server/x_base_core_project/src/main/java/com/x/base/core/project/exception/ExceptionStorageMappingNotExist.java new file mode 100644 index 0000000000000000000000000000000000000000..33e9c2bbee836e10043187ff8471e45e4ed463f9 --- /dev/null +++ b/o2server/x_base_core_project/src/main/java/com/x/base/core/project/exception/ExceptionStorageMappingNotExist.java @@ -0,0 +1,13 @@ +package com.x.base.core.project.exception; + +public class ExceptionStorageMappingNotExist extends LanguagePromptException { + + private static final long serialVersionUID = -7354813827434276962L; + + public static final String defaultMessage = "标识为:{}的存储不存在."; + + public ExceptionStorageMappingNotExist(String storage) { + super(defaultMessage, storage); + } + +} diff --git a/o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java b/o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java index 1c15114544c5264a545b679eacf1eb2fa1f12a8a..d857d5680f16a46c983334effca8d0f373e6f075 100644 --- a/o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java +++ b/o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java @@ -165,9 +165,9 @@ public class ApplicationServerTools extends JettySeverTools { Server server = new Server(threadPool); server.setAttribute("org.eclipse.jetty.server.Request.maxFormContentSize", MAX_FORM_CONTENT_SIZE); if (BooleanUtils.isTrue(applicationServer.getSslEnable())) { - addHttpsConnector(server, applicationServer.getPort(), true); + addHttpsConnector(server, applicationServer.getPort(), false); } else { - addHttpConnector(server, applicationServer.getPort(), true); + addHttpConnector(server, applicationServer.getPort(), false); } GzipHandler gzipHandler = new GzipHandler(); gzipHandler.setHandler(handlers); diff --git a/o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java b/o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java index b70bca98e32c3bd31282df46f0febdd6443c082e..c0eac464a6a3f9d20f38cc5c42b938f5d77a1e86 100644 --- a/o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java +++ b/o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java @@ -94,9 +94,9 @@ public class CenterServerTools extends JettySeverTools { server.setAttribute("org.eclipse.jetty.server.Request.maxFormContentSize", MAX_FORM_CONTENT_SIZE); if (BooleanUtils.isTrue(centerServer.getSslEnable())) { - addHttpsConnector(server, centerServer.getPort(), true); + addHttpsConnector(server, centerServer.getPort(), false); } else { - addHttpConnector(server, centerServer.getPort(), true); + addHttpConnector(server, centerServer.getPort(), false); } GzipHandler gzipHandler = new GzipHandler(); diff --git a/o2server/x_console/src/main/java/com/x/server/console/server/web/WebServerTools.java b/o2server/x_console/src/main/java/com/x/server/console/server/web/WebServerTools.java index 977e70854de4ab96f27e8e38dd988582773abbc6..9081bf97de87526200ab78fc7b66602a9a8038cb 100644 --- a/o2server/x_console/src/main/java/com/x/server/console/server/web/WebServerTools.java +++ b/o2server/x_console/src/main/java/com/x/server/console/server/web/WebServerTools.java @@ -125,9 +125,9 @@ public class WebServerTools extends JettySeverTools { threadPool.setMaxThreads(THREAD_POOL_SIZE_MAX); Server server = new Server(threadPool); if (BooleanUtils.isTrue(webServer.getSslEnable())) { - addHttpsConnector(server, webServer.getPort(), true); + addHttpsConnector(server, webServer.getPort(), false); } else { - addHttpConnector(server, webServer.getPort(), true); + addHttpConnector(server, webServer.getPort(), false); } GzipHandler gzipHandler = new GzipHandler(); gzipHandler.setHandler(handlers); diff --git a/o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/factory/PersonFactory.java b/o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/factory/PersonFactory.java index 175e7fa43179ca314cba2fb565fd0636d87d80ad..be1efd217ff0c6045684b153f4dfd07248b375a7 100644 --- a/o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/factory/PersonFactory.java +++ b/o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/factory/PersonFactory.java @@ -43,7 +43,9 @@ public class PersonFactory extends AbstractFactory { o = (Person) optional.get(); } else { o = this.pickObject(flag); - CacheManager.put(cache, cacheKey, o); + if (null != o) { + CacheManager.put(cache, cacheKey, o); + } } return o; } @@ -88,8 +90,8 @@ public class PersonFactory extends AbstractFactory { list.add((Person) optional.get()); } else { Person o = this.pickObject(str); - CacheManager.put(cache, cacheKey, o); if (null != o) { + CacheManager.put(cache, cacheKey, o); list.add(o); } } @@ -121,22 +123,22 @@ public class PersonFactory extends AbstractFactory { List list = em.createQuery(cq).getResultList().stream().distinct().collect(Collectors.toList()); if (list.size() == 1) { return list.get(0); - }else if(list.size() > 1){ - String temp = ""; - for (int i = 0; i < list.size(); i++) { - if(temp.equalsIgnoreCase("")) { - temp = list.get(i); - }else{ - temp = temp + "," + list.get(i); - } - } - return temp; - }else { + } else if (list.size() > 1) { + return StringUtils.join(list, ","); +// String temp = ""; +// for (int i = 0; i < list.size(); i++) { +// if (temp.equalsIgnoreCase("")) { +// temp = list.get(i); +// } else { +// temp = temp + "," + list.get(i); +// } +// } +// return temp; + } else { return null; } } - public String getPersonIdWithQywxid(String credential) throws Exception { EntityManager em = this.entityManagerContainer().get(Person.class); CriteriaBuilder cb = em.getCriteriaBuilder(); @@ -147,17 +149,18 @@ public class PersonFactory extends AbstractFactory { List list = em.createQuery(cq).getResultList().stream().distinct().collect(Collectors.toList()); if (list.size() == 1) { return list.get(0); - }else if(list.size() > 1){ - String temp = ""; - for (int i = 0; i < list.size(); i++) { - if(temp.equalsIgnoreCase("")) { - temp = list.get(i); - }else{ - temp = temp + "," + list.get(i); - } - } - return temp; - }else { + } else if (list.size() > 1) { + return StringUtils.join(list, ","); +// String temp = ""; +// for (int i = 0; i < list.size(); i++) { +// if (temp.equalsIgnoreCase("")) { +// temp = list.get(i); +// } else { +// temp = temp + "," + list.get(i); +// } +// } +// return temp; + } else { return null; } } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/Business.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/Business.java index 3b20334ec82357ad5e4449470f89f83f518c09bc..43fbf06f61f7cdebdb6fbcd8195c43f3973bf532 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/Business.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/Business.java @@ -1028,8 +1028,8 @@ public class Business { return true; } - public boolean readableWithWorkOrWorkCompleted(EffectivePerson effectivePerson, String workOrWorkCompleted, - PromptException entityException) throws Exception { + public boolean readableWithWorkOrWorkCompleted(EffectivePerson effectivePerson, String workOrWorkCompleted) + throws Exception { if (effectivePerson.isManager()) { return true; } @@ -1065,11 +1065,7 @@ public class Business { processId = work.getProcess(); } if (StringUtils.isEmpty(job)) { - if (null != entityException) { - throw entityException; - } else { - return false; - } + return false; } if (effectivePerson.isPerson(creatorPerson)) { return true; @@ -1084,9 +1080,9 @@ public class Business { effectivePerson.getDistinguishedName(), TaskCompleted.job_FIELDNAME, job) == 0) { if (emc.countEqualAndEqual(ReadCompleted.class, ReadCompleted.person_FIELDNAME, effectivePerson.getDistinguishedName(), ReadCompleted.job_FIELDNAME, job) == 0) { - Application application = application().pick(applicationId); - Process process = process().pick(processId); - if (!canManageApplicationOrProcess(effectivePerson, application, process)) { + Application a = application().pick(applicationId); + Process p = process().pick(processId); + if (BooleanUtils.isFalse(canManageApplicationOrProcess(effectivePerson, a, p))) { return false; } } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/content/WorkLogFactory.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/content/WorkLogFactory.java index a1ad8a9ee41786d5e5e1e4135d491d28af2fe4ac..dd88fecc0bf580f49ec83e8110602a685180015e 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/content/WorkLogFactory.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/factory/content/WorkLogFactory.java @@ -148,7 +148,7 @@ public class WorkLogFactory extends AbstractFactory { // } public List listWithFromActivityTokenForward(String activityToken) throws Exception { - List results = SetUniqueList.setUniqueList(new ArrayList()); + List results = SetUniqueList.setUniqueList(new ArrayList<>()); this.listWithFromActivityTokenForward(activityToken, results); return results; } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ApplicationDictAction.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ApplicationDictAction.java index e29fe659dcee3b5566d3a73d0151abd1e02df215..aeeb3ff1e6f0684dcb2cf6616e1332475ca1e1be 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ApplicationDictAction.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ApplicationDictAction.java @@ -28,6 +28,11 @@ 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 io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; @Tag(name = "ApplicationDictAction", description = "数据字典接口.") @@ -35,8 +40,11 @@ import io.swagger.v3.oas.annotations.tags.Tag; @Path("applicationdict") public class ApplicationDictAction extends StandardJaxrsAction { - private static Logger logger = LoggerFactory.getLogger(ApplicationDictAction.class); + private static final Logger LOGGER = LoggerFactory.getLogger(ApplicationDictAction.class); + private static final String OPERATIONID_PREFIX = "ApplicationDictAction::"; + @Operation(summary = "获取单个数据字典以及数据字典数据.", operationId = OPERATIONID_PREFIX + "get", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionGet.Wo.class)) }) }) @JaxrsMethodDescribe(value = "获取单个数据字典以及数据字典数据.", action = ActionGet.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}") @@ -46,18 +54,21 @@ public class ApplicationDictAction extends StandardJaxrsAction { @JaxrsParameterDescribe("数据字典标识") @PathParam("applicationDictFlag") String applicationDictFlag, @JaxrsParameterDescribe("应用标识") @PathParam("applicationFlag") String applicationFlag) { ActionResult result = new ActionResult<>(); - logger.debug("run get applicationDictFlag:{}, applicationFlag:{}.", applicationDictFlag, applicationFlag); + LOGGER.debug("run get applicationDictFlag:{}, applicationFlag:{}.", applicationDictFlag, applicationFlag); EffectivePerson effectivePerson = this.effectivePerson(request); try { result = new ActionGet().execute(effectivePerson, applicationDictFlag, applicationFlag); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "获取Application的数据字典列表.", action = ActionListWithApplication.class) + @Operation(summary = "获取指定应用的数据字典列表.", operationId = OPERATIONID_PREFIX + "listWithApplication", responses = { + @ApiResponse(content = { + @Content(array = @ArraySchema(schema = @Schema(implementation = ActionListWithApplication.Wo.class))) }) }) + @JaxrsMethodDescribe(value = "获取指定应用的数据字典列表.", action = ActionListWithApplication.class) @GET @Path("list/application/{applicationFlag}") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -69,13 +80,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { try { result = new ActionListWithApplication().execute(effectivePerson, applicationFlag); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据路径获取Application下的数据字典数据.", action = ActionGetData.class) + @Operation(summary = "指定应用获取数据字典数据.", operationId = OPERATIONID_PREFIX + "getData", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = JsonElement.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用获取数据字典数据.", action = ActionGetData.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -88,13 +101,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { try { result = new ActionGetData().execute(effectivePerson, applicationDictFlag, applicationFlag); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据路径获取Application下的数据字典数据.", action = ActionGetDataPath0.class) + @Operation(summary = "指定应用根据一级路径获取数据字典数据.", operationId = OPERATIONID_PREFIX + "getDataPath0", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = JsonElement.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据一级路径获取数据字典数据.", action = ActionGetDataPath0.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -108,13 +123,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { try { result = new ActionGetDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据路径获取Application下的数据字典数据.", action = ActionGetDataPath1.class) + @Operation(summary = "指定应用根据二级路径获取数据字典数据.", operationId = OPERATIONID_PREFIX + "getDataPath1", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = JsonElement.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据二级路径获取数据字典数据.", action = ActionGetDataPath1.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -130,13 +147,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionGetDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据路径获取Application下的数据字典数据.", action = ActionGetDataPath2.class) + @Operation(summary = "指定应用根据三级路径获取数据字典数据.", operationId = OPERATIONID_PREFIX + "getDataPath2", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = JsonElement.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据三级路径获取数据字典数据.", action = ActionGetDataPath2.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -153,13 +172,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionGetDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据路径获取Application下的数据字典数据.", action = ActionGetDataPath3.class) + @Operation(summary = "指定应用根据四级路径获取数据字典数据.", operationId = OPERATIONID_PREFIX + "getDataPath3", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = JsonElement.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据四级路径获取数据字典数据.", action = ActionGetDataPath3.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -177,13 +198,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionGetDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据路径获取Application下的数据字典数据.", action = ActionGetDataPath4.class) + @Operation(summary = "指定应用根据五级路径获取数据字典数据.", operationId = OPERATIONID_PREFIX + "getDataPath4", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = JsonElement.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据五级路径获取数据字典数据.", action = ActionGetDataPath4.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -202,13 +225,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionGetDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据路径获取Application下的数据字典数据.", action = ActionGetDataPath5.class) + @Operation(summary = "指定应用根据六级路径获取数据字典数据.", operationId = OPERATIONID_PREFIX + "getDataPath5", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = JsonElement.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据六级路径获取数据字典数据.", action = ActionGetDataPath5.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -228,13 +253,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionGetDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据路径获取Application下的数据字典数据.", action = ActionGetDataPath6.class) + @Operation(summary = "指定应用根据七级路径获取数据字典数据.", operationId = OPERATIONID_PREFIX + "getDataPath6", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = JsonElement.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据七级路径获取数据字典数据.", action = ActionGetDataPath6.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -255,13 +282,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionGetDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据路径获取Application下的数据字典数据.", action = ActionGetDataPath7.class) + @Operation(summary = "指定应用根据八级路径获取数据字典数据.", operationId = OPERATIONID_PREFIX + "getDataPath7", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = JsonElement.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据八级路径获取数据字典数据.", action = ActionGetDataPath7.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/{path7}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -283,13 +312,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionGetDataPath7().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6, path7); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典和路径更新Application下的数据字典局部数据.", action = ActionUpdateDataPath0.class) + @Operation(summary = "指定应用根据一级路径更新数据字典数据.", operationId = OPERATIONID_PREFIX + "updateDataPath0", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionUpdateDataPath0.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据一级路径更新数据字典数据.", action = ActionUpdateDataPath0.class) @PUT @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -304,13 +335,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock PUT to POST.", action = ActionUpdateDataPath0.class) + @Operation(summary = "指定应用根据一级路径更新数据字典数据(mock put to post).", operationId = OPERATIONID_PREFIX + + "updateDataPath0MockPutToPost", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionUpdateDataPath0.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据一级路径更新数据字典数据(mock put to post).", action = ActionUpdateDataPath0.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/data/mockputtopost") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -326,13 +360,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典和路径更新Application下的数据字典局部数据.", action = ActionUpdateDataPath1.class) + @Operation(summary = "指定应用根据二级路径更新数据字典数据.", operationId = OPERATIONID_PREFIX + "updateDataPath1", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionUpdateDataPath1.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据二级路径更新数据字典数据.", action = ActionUpdateDataPath1.class) @PUT @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -348,13 +384,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock PUT to POST.", action = ActionUpdateDataPath1.class) + @Operation(summary = "指定应用根据二级路径更新数据字典数据(mock put to post).", operationId = OPERATIONID_PREFIX + + "updateDataPath1MockPutToPost", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionUpdateDataPath1.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据二级路径更新数据字典数据(mock put to post).", action = ActionUpdateDataPath1.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/data/mockputtopost") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -371,13 +410,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典和路径更新Application下的数据字典局部数据.", action = ActionUpdateDataPath2.class) + @Operation(summary = "指定应用根据三级路径更新数据字典数据.", operationId = OPERATIONID_PREFIX + "updateDataPath2", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionUpdateDataPath2.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据三级路径更新数据字典数据.", action = ActionUpdateDataPath2.class) @PUT @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -394,13 +435,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock PUT to POST.", action = ActionUpdateDataPath2.class) + @Operation(summary = "指定应用根据三级路径更新数据字典数据(mock put to post).", operationId = OPERATIONID_PREFIX + + "updateDataPath2MockPutToPost", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionUpdateDataPath2.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据三级路径更新数据字典数据(mock put to post).", action = ActionUpdateDataPath2.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/data/mockputtopost") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -418,13 +462,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典和路径更新Application下的数据字典局部数据.", action = ActionUpdateDataPath3.class) + @Operation(summary = "指定应用根据四级路径更新数据字典数据.", operationId = OPERATIONID_PREFIX + "updateDataPath3", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionUpdateDataPath3.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据四级路径更新数据字典数据.", action = ActionUpdateDataPath3.class) @PUT @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -442,13 +488,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock PUT to POST.", action = ActionUpdateDataPath3.class) + @Operation(summary = "指定应用根据四级路径更新数据字典数据(mock put to post).", operationId = OPERATIONID_PREFIX + + "updateDataPath3MockPutToPost", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionUpdateDataPath3.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据四级路径更新数据字典数据(mock put to post).", action = ActionUpdateDataPath3.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/data/mockputtopost") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -467,13 +516,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典和路径更新Application下的数据字典局部数据.", action = ActionUpdateDataPath4.class) + @Operation(summary = "指定应用根据五级路径更新数据字典数据.", operationId = OPERATIONID_PREFIX + "updateDataPath4", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionUpdateDataPath4.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据五级路径更新数据字典数据.", action = ActionUpdateDataPath4.class) @PUT @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -492,13 +543,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock POST to PUT.", action = ActionUpdateDataPath4.class) + @Operation(summary = "指定应用根据五级路径更新数据字典数据(mock put to post).", operationId = OPERATIONID_PREFIX + + "updateDataPath4MockPutToPost", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionUpdateDataPath4.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据五级路径更新数据字典数据(mock put to post).", action = ActionUpdateDataPath4.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/data/mockputtopost") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -518,13 +572,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典和路径更新Application下的数据字典局部数据.", action = ActionUpdateDataPath5.class) + @Operation(summary = "指定应用根据六级路径更新数据字典数据.", operationId = OPERATIONID_PREFIX + "updateDataPath5", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionUpdateDataPath5.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据六级路径更新数据字典数据.", action = ActionUpdateDataPath5.class) @PUT @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -544,13 +600,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock POST to PUT.", action = ActionUpdateDataPath5.class) + @Operation(summary = "指定应用根据六级路径更新数据字典数据(mock put to post).", operationId = OPERATIONID_PREFIX + + "updateDataPath5MockPutToPost", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionUpdateDataPath5.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据六级路径更新数据字典数据(mock put to post).", action = ActionUpdateDataPath5.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/data/mockputtopost") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -571,13 +630,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典和路径更新Application下的数据字典局部数据.", action = ActionUpdateDataPath6.class) + @Operation(summary = "指定应用根据七级路径更新数据字典数据.", operationId = OPERATIONID_PREFIX + "updateDataPath6", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionUpdateDataPath6.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据七级路径更新数据字典数据.", action = ActionUpdateDataPath6.class) @PUT @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -598,13 +659,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock POST to PUT.", action = ActionUpdateDataPath6.class) + @Operation(summary = "指定应用根据七级路径更新数据字典数据(mock put to post).", operationId = OPERATIONID_PREFIX + + "updateDataPath6MockPutToPost", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionUpdateDataPath6.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据七级路径更新数据字典数据(mock put to post).", action = ActionUpdateDataPath6.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/data/mockputtopost") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -626,13 +690,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典和路径更新Application下的数据字典局部数据.", action = ActionUpdateDataPath7.class) + @Operation(summary = "指定应用根据八级路径更新数据字典数据.", operationId = OPERATIONID_PREFIX + "updateDataPath7", responses = { + @ApiResponse(content = { + @Content(array = @ArraySchema(schema = @Schema(implementation = ActionUpdateDataPath7.Wo.class))) }) }) + @JaxrsMethodDescribe(value = "指定应用根据八级路径更新数据字典数据.", action = ActionUpdateDataPath7.class) @PUT @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/{path7}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -654,13 +721,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath7().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6, path7, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock POST to PUT.", action = ActionUpdateDataPath7.class) + @Operation(summary = "指定应用根据八级路径更新数据字典数据(mock put to post).", operationId = OPERATIONID_PREFIX + + "updateDataPath7MockPutToPost", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionUpdateDataPath7.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据八级路径更新数据字典数据(mock put to post).", action = ActionUpdateDataPath7.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/{path7}/data/mockputtopost") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -683,13 +753,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionUpdateDataPath7().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6, path7, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径添加Application下的新的局部数据.", action = ActionCreateDataPath0.class) + @Operation(summary = "指定应用根据一级路径添加数据字典数据.", operationId = OPERATIONID_PREFIX + "createDataPath0", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionCreateDataPath0.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据一级路径添加数据字典数据.", action = ActionCreateDataPath0.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -704,13 +776,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionCreateDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径添加Application下的新的局部数据.", action = ActionCreateDataPath1.class) + @Operation(summary = "指定应用根据二级路径添加数据字典数据.", operationId = OPERATIONID_PREFIX + "createDataPath1", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionCreateDataPath1.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据二级路径添加数据字典数据.", action = ActionCreateDataPath1.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -726,13 +800,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionCreateDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径添加Application下的新的局部数据.", action = ActionCreateDataPath2.class) + @Operation(summary = "指定应用根据三级路径添加数据字典数据.", operationId = OPERATIONID_PREFIX + "createDataPath2", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionCreateDataPath2.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据三级路径添加数据字典数据.", action = ActionCreateDataPath2.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -749,13 +825,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionCreateDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径添加Application下的新的局部数据.", action = ActionCreateDataPath3.class) + @Operation(summary = "指定应用根据四级路径添加数据字典数据.", operationId = OPERATIONID_PREFIX + "createDataPath3", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionCreateDataPath3.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据四级路径添加数据字典数据.", action = ActionCreateDataPath3.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -773,12 +851,14 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionCreateDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } + @Operation(summary = "指定应用根据五级路径添加数据字典数据.", operationId = OPERATIONID_PREFIX + "createDataPath4", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionCreateDataPath4.Wo.class)) }) }) @JaxrsMethodDescribe(value = "根据字典ID和路径添加Application下的新的局部数据.", action = ActionCreateDataPath4.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/data") @@ -798,13 +878,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionCreateDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径添加Application下的新的局部数据.", action = ActionCreateDataPath5.class) + @Operation(summary = "指定应用根据六级路径添加数据字典数据.", operationId = OPERATIONID_PREFIX + "createDataPath5", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionCreateDataPath5.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据六级路径添加数据字典数据.", action = ActionCreateDataPath5.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -824,13 +906,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionCreateDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径添加Application下的新的局部数据.", action = ActionCreateDataPath6.class) + @Operation(summary = "指定应用根据七级路径添加数据字典数据.", operationId = OPERATIONID_PREFIX + "createDataPath6", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionCreateDataPath6.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据七级路径添加数据字典数据.", action = ActionCreateDataPath6.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -851,13 +935,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionCreateDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径添加Application下的新的局部数据.", action = ActionCreateDataPath7.class) + @Operation(summary = "指定应用根据八级路径添加数据字典数据.", operationId = OPERATIONID_PREFIX + "createDataPath7", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionCreateDataPath7.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据八级路径添加数据字典数据.", action = ActionCreateDataPath7.class) @POST @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/{path7}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -879,13 +965,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionCreateDataPath7().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6, path7, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径删除Application下的数据字典局部数据.", action = ActionDeleteDataPath0.class) + @Operation(summary = "指定应用根据一级路径删除数据字典数据.", operationId = OPERATIONID_PREFIX + "deleteDataPath0", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionDeleteDataPath0.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据一级路径删除数据字典数据.", action = ActionDeleteDataPath0.class) @DELETE @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -899,13 +987,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { try { result = new ActionDeleteDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock Get 2 Delete.", action = ActionDeleteDataPath0.class) + @Operation(summary = "指定应用根据一级路径删除数据字典数据(mock delete to get).", operationId = OPERATIONID_PREFIX + + "deleteDataPath0MockDeleteToGet", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionDeleteDataPath0.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据一级路径删除数据字典数据(mock delete to get).", action = ActionDeleteDataPath0.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/data/mockdeletetoget") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -920,13 +1011,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { try { result = new ActionDeleteDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径删除Application下的数据字典局部数据.", action = ActionDeleteDataPath1.class) + @Operation(summary = "指定应用根据二级路径删除数据字典数据.", operationId = OPERATIONID_PREFIX + "deleteDataPath1", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionDeleteDataPath1.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据一级路径删除数据字典数据.", action = ActionDeleteDataPath1.class) @DELETE @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -942,13 +1035,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock Get 2 Delete.", action = ActionDeleteDataPath1.class) + @Operation(summary = "指定应用根据二级路径删除数据字典数据(mock delete to get).", operationId = OPERATIONID_PREFIX + + "deleteDataPath1MockDeleteToGet", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionDeleteDataPath1.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据二级路径删除数据字典数据(mock delete to get).", action = ActionDeleteDataPath1.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/data/mockdeletetoget") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -965,13 +1061,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径删除Application下的数据字典局部数据.", action = ActionDeleteDataPath2.class) + @Operation(summary = "指定应用根据三级路径删除数据字典数据.", operationId = OPERATIONID_PREFIX + "deleteDataPath2", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionDeleteDataPath2.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据三级路径删除数据字典数据.", action = ActionDeleteDataPath2.class) @DELETE @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -988,13 +1086,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock Get 2 Delete.", action = ActionDeleteDataPath2.class) + @Operation(summary = "指定应用根据三级路径删除数据字典数据(mock delete to get).", operationId = OPERATIONID_PREFIX + + "deleteDataPath2MockDeleteToGet", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionDeleteDataPath2.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据三级路径删除数据字典数据(mock delete to get).", action = ActionDeleteDataPath2.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/data/mockdeletetoget") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1012,13 +1113,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径删除Application下的数据字典局部数据.", action = ActionDeleteDataPath3.class) + @Operation(summary = "指定应用根据四级路径删除数据字典数据.", operationId = OPERATIONID_PREFIX + "deleteDataPath3", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionDeleteDataPath3.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据四级路径删除数据字典数据.", action = ActionDeleteDataPath3.class) @DELETE @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1036,13 +1139,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock Get 2 Delete.", action = ActionDeleteDataPath3.class) + @Operation(summary = "指定应用根据四级路径删除数据字典数据(mock delete to get).", operationId = OPERATIONID_PREFIX + + "deleteDataPath3MockDeleteToGet", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionDeleteDataPath3.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据四级路径删除数据字典数据(mock delete to get).", action = ActionDeleteDataPath3.class) @DELETE @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/data/mockdeletetoget") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1061,13 +1167,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径删除Application下的数据字典局部数据.", action = ActionDeleteDataPath4.class) + @Operation(summary = "指定应用根据五级路径删除数据字典数据.", operationId = OPERATIONID_PREFIX + "deleteDataPath4", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionDeleteDataPath4.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据五级路径删除数据字典数据.", action = ActionDeleteDataPath4.class) @DELETE @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1086,13 +1194,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock Get 2 Delete.", action = ActionDeleteDataPath4.class) + @Operation(summary = "指定应用根据五级路径删除数据字典数据(mock delete to get).", operationId = OPERATIONID_PREFIX + + "deleteDataPath4MockDeleteToGet", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionDeleteDataPath4.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据五级路径删除数据字典数据(mock delete to get).", action = ActionDeleteDataPath4.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/data/mockdeletetoget") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1112,13 +1223,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径删除Application下的数据字典局部数据.", action = ActionDeleteDataPath5.class) + @Operation(summary = "指定应用根据六级路径删除数据字典数据.", operationId = OPERATIONID_PREFIX + "deleteDataPath5", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionDeleteDataPath5.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据六级路径删除数据字典数据.", action = ActionDeleteDataPath5.class) @DELETE @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1138,13 +1251,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock Get 2 Delete.", action = ActionDeleteDataPath5.class) + @Operation(summary = "指定应用根据六级路径删除数据字典数据(mock delete to get).", operationId = OPERATIONID_PREFIX + + "deleteDataPath5MockDeleteToGet", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionDeleteDataPath5.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据六级路径删除数据字典数据(mock delete to get).", action = ActionDeleteDataPath5.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/data/mockdeletetoget") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1165,13 +1281,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径删除Application下的数据字典局部数据.", action = ActionDeleteDataPath6.class) + @Operation(summary = "指定应用根据七级路径删除数据字典数据.", operationId = OPERATIONID_PREFIX + "deleteDataPath6", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionDeleteDataPath6.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据七级路径删除数据字典数据.", action = ActionDeleteDataPath6.class) @DELETE @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1192,13 +1310,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock Get 2 Delete.", action = ActionDeleteDataPath6.class) + @Operation(summary = "指定应用根据七级路径删除数据字典数据(mock delete to get).", operationId = OPERATIONID_PREFIX + + "deleteDataPath6MockDeleteToGet", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionDeleteDataPath6.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据七级路径删除数据字典数据(mock delete to get).", action = ActionDeleteDataPath6.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/data/mockdeletetoget") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1220,13 +1341,15 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据字典ID和路径删除Application下的数据字典局部数据.", action = ActionDeleteDataPath7.class) + @Operation(summary = "指定应用根据八级路径删除数据字典数据.", operationId = OPERATIONID_PREFIX + "deleteDataPath7", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionDeleteDataPath7.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "指定应用根据八级路径删除数据字典数据.", action = ActionDeleteDataPath7.class) @DELETE @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/{path7}/data") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1248,13 +1371,16 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath7().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6, path7); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "Mock Get 2 Delete.", action = ActionDeleteDataPath7.class) + @Operation(summary = "指定应用根据八级路径删除数据字典数据(mock delete to get).", operationId = OPERATIONID_PREFIX + + "deleteDataPath7MockDeleteToGet", responses = { @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionDeleteDataPath7.Wo.class)) }) }, deprecated = true) + @JaxrsMethodDescribe(value = "指定应用根据八级路径删除数据字典数据(mock delete to get).", action = ActionDeleteDataPath7.class) @GET @Path("{applicationDictFlag}/application/{applicationFlag}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/{path7}/data/mockdeletetoget") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1277,7 +1403,7 @@ public class ApplicationDictAction extends StandardJaxrsAction { result = new ActionDeleteDataPath7().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, path1, path2, path3, path4, path5, path6, path7); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionAvailable.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionAvailable.java index b2294a5a5b78b9c499226b1b811549fa90fd8159..36b06f0e3ba5d12e635cac07a7028de394eaafc7 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionAvailable.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionAvailable.java @@ -4,6 +4,7 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.config.StorageMapping; import com.x.base.core.project.exception.ExceptionEntityNotExist; +import com.x.base.core.project.exception.ExceptionStorageMappingNotExist; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; import com.x.base.core.project.jaxrs.WrapBoolean; @@ -12,6 +13,8 @@ import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.content.Attachment; +import io.swagger.v3.oas.annotations.media.Schema; + class ActionAvailable extends BaseAction { private static final Logger LOGGER = LoggerFactory.getLogger(ActionAvailable.class); @@ -19,21 +22,26 @@ class ActionAvailable extends BaseAction { ActionResult execute(EffectivePerson effectivePerson, String id) throws Exception { LOGGER.debug("execute:{}, id:{}.", effectivePerson::getDistinguishedName, () -> id); + ActionResult result = new ActionResult<>(); try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { - ActionResult result = new ActionResult<>(); Attachment o = emc.find(id, Attachment.class); if (null == o) { throw new ExceptionEntityNotExist(id, Attachment.class); } StorageMapping mapping = ThisApplication.context().storageMappings().get(Attachment.class, o.getStorage()); + if (null == mapping) { + throw new ExceptionStorageMappingNotExist(o.getStorage()); + } + Boolean exist = o.existContent(mapping); Wo wo = new Wo(); wo.setValue(exist); result.setData(wo); - return result; } + return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.attachment.ActionAvailable$Wo") public static class Wo extends WrapBoolean { private static final long serialVersionUID = -3000199187660647510L; diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionBatchDownloadWithWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionBatchDownloadWithWorkOrWorkCompleted.java index d6969aeacb407bc8bd4783941ee064e3c65476f8..df2c8976f72f1be1c1ec1bf6d3f2a1c041981a20 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionBatchDownloadWithWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionBatchDownloadWithWorkOrWorkCompleted.java @@ -10,11 +10,13 @@ import java.util.Map; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.Pair; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.config.StorageMapping; import com.x.base.core.project.exception.ExceptionAccessDenied; +import com.x.base.core.project.exception.ExceptionEntityExist; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; import com.x.base.core.project.jaxrs.WoFile; @@ -28,40 +30,22 @@ import com.x.processplatform.core.entity.content.Attachment; import com.x.processplatform.core.entity.content.Work; import com.x.processplatform.core.entity.content.WorkCompleted; -class ActionBatchDownloadWithWorkOrWorkCompleted extends BaseAction { - - private static final String SITE_SEPARATOR = "~"; +import io.swagger.v3.oas.annotations.media.Schema; - private static final String FILE_SEPARATOR = ","; +class ActionBatchDownloadWithWorkOrWorkCompleted extends BaseAction { - private static Logger logger = LoggerFactory.getLogger(ActionBatchDownloadWithWorkOrWorkCompleted.class); + private static final Logger LOGGER = LoggerFactory.getLogger(ActionBatchDownloadWithWorkOrWorkCompleted.class); ActionResult execute(EffectivePerson effectivePerson, String workId, String site, String fileName, String flag) throws Exception { try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { ActionResult result = new ActionResult<>(); Business business = new Business(emc); - String title = ""; - String job = ""; + Work work = emc.fetch(workId, Work.class); - if (work == null) { - WorkCompleted workCompleted = emc.fetch(workId, WorkCompleted.class); - if (null == workCompleted) { - throw new Exception("workId: " + workId + " not exist in work or workCompleted"); - } - if (!business.readable(effectivePerson, workCompleted)) { - throw new ExceptionWorkCompletedAccessDenied(effectivePerson.getDistinguishedName(), - workCompleted.getTitle(), workCompleted.getId()); - } - title = workCompleted.getTitle(); - job = workCompleted.getJob(); - } else { - if (!business.readable(effectivePerson, work)) { - throw new ExceptionAccessDenied(effectivePerson, work); - } - title = work.getTitle(); - job = work.getJob(); - } + Pair pair = getTitleAndJob(effectivePerson, business, workId, emc, work); + String title = pair.getLeft(); + String job = pair.getRight(); List attachmentList; if (StringUtils.isBlank(site) || EMPTY_SYMBOL.equals(site)) { attachmentList = business.attachment().listWithJobObject(job); @@ -82,7 +66,7 @@ class ActionBatchDownloadWithWorkOrWorkCompleted extends BaseAction { } } if (StringUtils.isBlank(fileName)) { - if(title.length()>60){ + if (title.length() > 60) { title = title.substring(0, 60); } fileName = title + DateTools.format(new Date(), DateTools.formatCompact_yyyyMMddHHmmss) + ".zip"; @@ -97,8 +81,9 @@ class ActionBatchDownloadWithWorkOrWorkCompleted extends BaseAction { this.assembleFile(business, map, flag); fileName = StringUtils.replaceEach(fileName, - new String[] { "/",":","*","?","<<",">>","|","<",">","\\" }, new String[] { "","","","","","","","","","" }); - logger.info("batchDown to {},att size {}, from work {}", fileName, attachmentList.size(), workId); + new String[] { "/", ":", "*", "?", "<<", ">>", "|", "<", ">", "\\" }, + new String[] { "", "", "", "", "", "", "", "", "", "" }); + LOGGER.info("batchDown to {},att size {}, from work {}", fileName, attachmentList.size(), workId); try (ByteArrayOutputStream os = new ByteArrayOutputStream()) { business.downToZip(readableAttachmentList, os, map); byte[] bs = os.toByteArray(); @@ -110,12 +95,32 @@ class ActionBatchDownloadWithWorkOrWorkCompleted extends BaseAction { } } + private Pair getTitleAndJob(EffectivePerson effectivePerson, Business business, String workId, + EntityManagerContainer emc, Work work) throws Exception { + if (work != null) { + if (!business.readable(effectivePerson, work)) { + throw new ExceptionAccessDenied(effectivePerson, work); + } + return Pair.of(work.getTitle(), work.getJob()); + } else { + WorkCompleted workCompleted = emc.fetch(workId, WorkCompleted.class); + if (null == workCompleted) { + throw new ExceptionEntityExist(workId); + } + if (!business.readable(effectivePerson, workCompleted)) { + throw new ExceptionWorkCompletedAccessDenied(effectivePerson.getDistinguishedName(), + workCompleted.getTitle(), workCompleted.getId()); + } + return Pair.of(workCompleted.getTitle(), workCompleted.getJob()); + } + } + private void assembleFile(Business business, Map map, String files) throws Exception { EntityManagerContainer emc = business.entityManagerContainer(); if (StringUtils.isNotEmpty(files)) { String[] flagList = files.split(FILE_SEPARATOR); for (String flag : flagList) { - if(StringUtils.isNotBlank(flag)) { + if (StringUtils.isNotBlank(flag)) { GeneralFile generalFile = emc.find(flag.trim(), GeneralFile.class); if (generalFile != null) { StorageMapping gfMapping = ThisApplication.context().storageMappings().get(GeneralFile.class, @@ -132,8 +137,11 @@ class ActionBatchDownloadWithWorkOrWorkCompleted extends BaseAction { } } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.attachment.ActionBatchDownloadWithWorkOrWorkCompleted$Wo") public static class Wo extends WoFile { + private static final long serialVersionUID = -4350231304623811352L; + public Wo(byte[] bytes, String contentType, String contentDisposition) { super(bytes, contentType, contentDisposition); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionBatchDownloadWithWorkOrWorkCompletedStream.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionBatchDownloadWithWorkOrWorkCompletedStream.java index 38c355577c080b8b08936dfae47aafb5a508352e..514c7371b927338902c807f26c1fcc44534b90f5 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionBatchDownloadWithWorkOrWorkCompletedStream.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionBatchDownloadWithWorkOrWorkCompletedStream.java @@ -15,6 +15,7 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.config.StorageMapping; import com.x.base.core.project.exception.ExceptionAccessDenied; +import com.x.base.core.project.exception.ExceptionEntityExist; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; import com.x.base.core.project.jaxrs.WoFile; @@ -30,10 +31,6 @@ import com.x.processplatform.core.entity.content.WorkCompleted; class ActionBatchDownloadWithWorkOrWorkCompletedStream extends BaseAction { - private static final String SITE_SEPARATOR = "~"; - - private static final String FILE_SEPARATOR = ","; - private static Logger logger = LoggerFactory.getLogger(ActionBatchDownloadWithWorkOrWorkCompletedStream.class); ActionResult execute(EffectivePerson effectivePerson, String workId, String site, String fileName, String flag) @@ -47,7 +44,7 @@ class ActionBatchDownloadWithWorkOrWorkCompletedStream extends BaseAction { if (work == null) { WorkCompleted workCompleted = emc.find(workId, WorkCompleted.class); if (null == workCompleted) { - throw new Exception("workId: " + workId + " not exist in work or workCompleted"); + throw new ExceptionEntityExist(workId); } if (!business.readable(effectivePerson, workCompleted)) { throw new ExceptionWorkCompletedAccessDenied(effectivePerson.getDistinguishedName(), @@ -82,7 +79,7 @@ class ActionBatchDownloadWithWorkOrWorkCompletedStream extends BaseAction { } } if (StringUtils.isBlank(fileName)) { - if(title.length()>60){ + if (title.length() > 60) { title = title.substring(0, 60); } fileName = title + DateTools.format(new Date(), DateTools.formatCompact_yyyyMMddHHmmss) + ".zip"; @@ -97,7 +94,8 @@ class ActionBatchDownloadWithWorkOrWorkCompletedStream extends BaseAction { this.assembleFile(business, map, flag); fileName = StringUtils.replaceEach(fileName, - new String[] { "/",":","*","?","<<",">>","|","<",">","\\" }, new String[] { "","","","","","","","","","" }); + new String[] { "/", ":", "*", "?", "<<", ">>", "|", "<", ">", "\\" }, + new String[] { "", "", "", "", "", "", "", "", "", "" }); logger.info("batchDown to {},att size {}, from work {}, has form {}", fileName, attachmentList.size(), workId, map.size()); try (ByteArrayOutputStream os = new ByteArrayOutputStream()) { @@ -116,7 +114,7 @@ class ActionBatchDownloadWithWorkOrWorkCompletedStream extends BaseAction { if (StringUtils.isNotEmpty(files)) { String[] flagList = files.split(FILE_SEPARATOR); for (String flag : flagList) { - if(StringUtils.isNotBlank(flag)) { + if (StringUtils.isNotBlank(flag)) { GeneralFile generalFile = emc.find(flag.trim(), GeneralFile.class); if (generalFile != null) { StorageMapping gfMapping = ThisApplication.context().storageMappings().get(GeneralFile.class, diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeOrderNumber.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeOrderNumber.java index e1d7abfd53c24464f7f8e9cc47f46882cdb01d9b..67cf9d4bea0dac696c6afd610a584dc7be8dbb20 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeOrderNumber.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeOrderNumber.java @@ -1,6 +1,5 @@ package com.x.processplatform.assemble.surface.jaxrs.attachment; - import java.util.List; import com.x.base.core.container.EntityManagerContainer; @@ -30,14 +29,13 @@ class ActionChangeOrderNumber extends BaseAction { if (null == attachment) { throw new ExceptionEntityNotExist(id, Attachment.class); } - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workId, - new ExceptionEntityNotExist(workId))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workId)) { throw new ExceptionAccessDenied(effectivePerson); } List identities = business.organization().identity().listWithPerson(effectivePerson); List units = business.organization().unit().listWithPerson(effectivePerson); boolean canEdit = this.edit(attachment, effectivePerson, identities, units, business); - if(!canEdit){ + if (!canEdit) { throw new ExceptionAccessDenied(effectivePerson, attachment); } emc.beginTransaction(Attachment.class); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeSite.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeSite.java index c8861f0e718a4ae94eef81f1c08235a883365a07..70951c49e063e4b152ece99a90529f9ae0a71bc7 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeSite.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionChangeSite.java @@ -23,15 +23,14 @@ class ActionChangeSite extends BaseAction { throw new ExceptionEntityNotExist(id, Attachment.class); } - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workId, - new ExceptionEntityNotExist(workId))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workId)) { throw new ExceptionAccessDenied(effectivePerson); } List identities = business.organization().identity().listWithPerson(effectivePerson); List units = business.organization().unit().listWithPerson(effectivePerson); boolean canEdit = this.edit(attachment, effectivePerson, identities, units, business); - if(!canEdit){ + if (!canEdit) { throw new ExceptionAccessDenied(effectivePerson, attachment); } emc.beginTransaction(Attachment.class); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDocToWord.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDocToWord.java index 8c5fc0dcea33e4002b20a15df7f46056dc8d3416..b2fb7f8a76b14a8a7b513824ad6e58c508ee7905 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDocToWord.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDocToWord.java @@ -58,8 +58,7 @@ class ActionDocToWord extends BaseAction { if (null == work) { throw new ExceptionEntityNotExist(workId, Work.class); } - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, work.getId(), - new ExceptionEntityNotExist(work.getId()))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, work.getId())) { throw new ExceptionAccessDenied(effectivePerson); } } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDocToWordWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDocToWordWorkOrWorkCompleted.java index 6d02b928d196990891376174aff3af1cad02e89e..1685c340245a228649add2023bc42f6c7df47aad 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDocToWordWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionDocToWordWorkOrWorkCompleted.java @@ -69,8 +69,7 @@ class ActionDocToWordWorkOrWorkCompleted extends BaseAction { if ((null == work) && (null == workCompleted)) { throw new ExceptionEntityNotExist(workOrWorkCompleted, Work.class); } - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted, - new ExceptionEntityNotExist(workOrWorkCompleted))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted)) { throw new ExceptionAccessDenied(effectivePerson); } } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWork.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWork.java index c7b3668fddef66844b3d8801f9f7820a3e02c5af..7c0f44ccdb8879e308b36c0479899e7211e1308b 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWork.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWork.java @@ -12,13 +12,21 @@ import com.x.base.core.project.exception.ExceptionEntityNotExist; import com.x.base.core.project.gson.GsonPropertyObject; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.base.core.project.tools.ListTools; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.content.Attachment; import com.x.processplatform.core.entity.content.Work; class ActionGetWithWork extends BaseAction { + + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGetWithWork.class); + ActionResult execute(EffectivePerson effectivePerson, String id, String workId) throws Exception { + + LOGGER.debug("execute:{}, id:{}, workId:{}.", effectivePerson::getDistinguishedName, () -> id, () -> workId); + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { ActionResult result = new ActionResult<>(); Business business = new Business(emc); @@ -31,8 +39,7 @@ class ActionGetWithWork extends BaseAction { throw new ExceptionEntityNotExist(id, Attachment.class); } - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, work.getId(), - new ExceptionEntityNotExist(work.getId()))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, work.getId())) { throw new ExceptionAccessDenied(effectivePerson); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWorkCompleted.java index 1d78d844957025eaff16a235117977b376ad0bcf..c1a8152538260aa167d95372a011b2e6dd9353a9 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWorkCompleted.java @@ -31,8 +31,7 @@ class ActionGetWithWorkCompleted extends BaseAction { throw new ExceptionEntityNotExist(id, Attachment.class); } - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workCompleted.getId(), - new ExceptionEntityNotExist(workCompleted.getId()))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workCompleted.getId())) { throw new ExceptionAccessDenied(effectivePerson); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWorkOrWorkCompleted.java index fa69bcdf2498518ce2f5dfa8061770e20e37a35e..6351519fa902e07951bb38bcfe061ff12df557b4 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionGetWithWorkOrWorkCompleted.java @@ -26,8 +26,7 @@ class ActionGetWithWorkOrWorkCompleted extends BaseAction { throw new ExceptionEntityNotExist(id, Attachment.class); } - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workId, - new ExceptionEntityNotExist(workId))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workId)) { throw new ExceptionAccessDenied(effectivePerson); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionUploadWithUrl.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionUploadWithUrl.java index fa4d76ac917a717a36f4d4091f8a72b023789fa3..282100fddfa4573a6d255abef66f9d56c5223952 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionUploadWithUrl.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionUploadWithUrl.java @@ -55,8 +55,7 @@ class ActionUploadWithUrl extends BaseAction { if(StringUtils.isEmpty(wi.getSite())){ throw new ExceptionEntityFieldEmpty(Attachment.class, wi.getSite()); } - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, wi.getWorkId(), - new ExceptionEntityNotExist(wi.getWorkId()))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, wi.getWorkId())) { throw new ExceptionAccessDenied(effectivePerson, wi.getWorkId()); } String person = effectivePerson.getDistinguishedName(); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/AttachmentAction.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/AttachmentAction.java index 54949ca860f2c6f1434442eaa2dde10d9d5dc5d2..ac1ac7c77fa7a3a1056ed85db7b55f5c8bc9095c 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/AttachmentAction.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/AttachmentAction.java @@ -37,6 +37,10 @@ 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 io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; @Tag(name = "AttachmentAction", description = "附件接口.") @@ -44,9 +48,12 @@ import io.swagger.v3.oas.annotations.tags.Tag; @JaxrsDescribe("附件接口.") public class AttachmentAction extends StandardJaxrsAction { - private static Logger logger = LoggerFactory.getLogger(AttachmentAction.class); + private static final Logger LOGGER = LoggerFactory.getLogger(AttachmentAction.class); + private static final String OPERATIONID_PREFIX = "AttachmentAction::"; - @JaxrsMethodDescribe(value = "测试文件是否存在.", action = ActionAvailable.class) + @Operation(summary = "判断文件是否存在.", operationId = OPERATIONID_PREFIX + "available", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionAvailable.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "判断文件是否存在.", action = ActionAvailable.class) @GET @Path("{id}/available") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -58,13 +65,15 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionAvailable().execute(effectivePerson, id); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "根据Work和附件Id获取单个附件信息.", action = ActionGetWithWork.class) + @Operation(summary = "根据工作标识和附件标识获取附件信息.", operationId = OPERATIONID_PREFIX + "getWithWork", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionGetWithWork.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "根据工作标识和附件标识获取附件信息.", action = ActionGetWithWork.class) @GET @Path("{id}/work/{workId}") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -77,7 +86,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionGetWithWork().execute(effectivePerson, id, workId); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -96,7 +105,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionGetWithWorkCompleted().execute(effectivePerson, id, workCompletedId); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -116,7 +125,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionGetWithWorkOrWorkCompleted().execute(effectivePerson, id, workOrWorkCompleted); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -134,7 +143,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionListWithWork().execute(effectivePerson, workId); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -152,7 +161,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionListWithWorkCompleted().execute(effectivePerson, workCompletedId); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -171,7 +180,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionListWithWorkOrWorkCompleted().execute(effectivePerson, workOrWorkCompleted); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -189,7 +198,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionListWithJob().execute(effectivePerson, job); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -201,13 +210,13 @@ public class AttachmentAction extends StandardJaxrsAction { @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @Consumes(MediaType.APPLICATION_JSON) public void delete(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, - @JaxrsParameterDescribe("附件标识") @PathParam("id") String id) { + @JaxrsParameterDescribe("附件标识") @PathParam("id") String id) { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { result = new ActionDelete().execute(effectivePerson, id); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -218,14 +227,14 @@ public class AttachmentAction extends StandardJaxrsAction { @Path("{id}/mockdeletetoget") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @Consumes(MediaType.APPLICATION_JSON) - public void deleteMockDeleteToGet(@Suspended final AsyncResponse asyncResponse, - @Context HttpServletRequest request, @JaxrsParameterDescribe("附件标识") @PathParam("id") String id) { + public void deleteMockDeleteToGet(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, + @JaxrsParameterDescribe("附件标识") @PathParam("id") String id) { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { result = new ActionDelete().execute(effectivePerson, id); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -244,7 +253,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDeleteWithWork().execute(effectivePerson, id, workId); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -263,7 +272,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDeleteWithWork().execute(effectivePerson, id, workId); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -282,7 +291,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDeleteWithWorkCompleted().execute(effectivePerson, id, workCompletedId); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -301,7 +310,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDeleteWithWorkCompleted().execute(effectivePerson, id, workCompletedId); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -319,7 +328,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDownload().execute(effectivePerson, id, fileName); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -337,7 +346,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDownloadStream().execute(effectivePerson, id, fileName); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -356,7 +365,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDownloadWithWork().execute(effectivePerson, id, workId, fileName); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -375,7 +384,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDownloadWithWork().execute(effectivePerson, id, workId, fileName); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -394,7 +403,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDownloadWithWorkStream().execute(effectivePerson, id, workId, fileName); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -413,7 +422,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDownloadWithWorkStream().execute(effectivePerson, id, workId, fileName); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -432,7 +441,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDownloadWithWorkCompleted().execute(effectivePerson, id, workCompletedId, fileName); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -451,7 +460,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDownloadWithWorkCompleted().execute(effectivePerson, id, workCompletedId, fileName); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -471,7 +480,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new ActionDownloadWithWorkCompletedStream().execute(effectivePerson, id, workCompletedId, fileName); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -491,7 +500,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new ActionDownloadWithWorkCompletedStream().execute(effectivePerson, id, workCompletedId, fileName); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -528,7 +537,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new ActionUploadWithWork().execute(effectivePerson, workId, site, fileName, bytes, disposition, extraParam); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -566,7 +575,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new ActionUploadWithWorkCompleted().execute(effectivePerson, workCompletedId, site, fileName, bytes, disposition, extraParam); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -591,7 +600,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new ActionUploadCallback().execute(effectivePerson, workId, callback, site, fileName, bytes, disposition); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -627,7 +636,7 @@ public class AttachmentAction extends StandardJaxrsAction { } result = new ActionUpdate().execute(effectivePerson, id, workId, fileName, bytes, disposition, extraParam); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -663,7 +672,7 @@ public class AttachmentAction extends StandardJaxrsAction { } result = new ActionUpdate().execute(effectivePerson, id, workId, fileName, bytes, disposition, extraParam); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -682,7 +691,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionUpdateContent().execute(effectivePerson, id, workId, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -701,7 +710,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionUpdateContent().execute(effectivePerson, id, workId, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -725,7 +734,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new ActionUpdateCallback().execute(effectivePerson, id, workId, callback, fileName, bytes, disposition); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -762,7 +771,7 @@ public class AttachmentAction extends StandardJaxrsAction { } result = new ActionUpdate().execute(effectivePerson, id, workId, fileName, bytes, disposition, extraParam); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -780,7 +789,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionCopyToWork().execute(effectivePerson, workId, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -799,7 +808,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionCopyToWorkCompleted().execute(effectivePerson, workCompletedId, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -817,7 +826,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionCopyToWorkSoft().execute(effectivePerson, workId, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -837,7 +846,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionCopyToWorkCompletedSoft().execute(effectivePerson, workCompletedId, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -857,7 +866,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionChangeSite().execute(effectivePerson, id, workId, site); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -876,7 +885,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionEdit().execute(effectivePerson, id, workId, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -895,7 +904,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionEdit().execute(effectivePerson, id, workId, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -915,7 +924,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionChangeOrderNumber().execute(effectivePerson, id, workId, orderNumber); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -934,7 +943,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionEditText().execute(effectivePerson, id, workId, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -953,7 +962,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionEditText().execute(effectivePerson, id, workId, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -972,7 +981,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionGetText().execute(effectivePerson, id, workId); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -990,7 +999,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDocToWord().execute(effectivePerson, workId, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1011,7 +1020,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new ActionDocToWordWorkOrWorkCompleted().execute(effectivePerson, workOrWorkCompleted, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, jsonElement); + LOGGER.error(e, effectivePerson, request, jsonElement); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1029,7 +1038,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionPreviewPdf().execute(effectivePerson, id); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1047,7 +1056,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionPreviewPdfResult().execute(effectivePerson, flag); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1066,7 +1075,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionPreviewImage().execute(effectivePerson, id, page); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1084,7 +1093,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionPreviewImageResult().execute(effectivePerson, flag); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1106,7 +1115,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new ActionBatchDownloadWithWorkOrWorkCompletedStream().execute(effectivePerson, workId, site, fileName, flag); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1128,7 +1137,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new ActionBatchDownloadWithWorkOrWorkCompleted().execute(effectivePerson, workId, site, fileName, flag); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1148,7 +1157,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionUploadWorkInfo().execute(effectivePerson, workId, flag, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1169,7 +1178,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionUploadWorkInfo().execute(effectivePerson, workId, flag, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1188,7 +1197,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDownloadWorkInfo().execute(effectivePerson, workId, flag, BooleanUtils.isTrue(stream)); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1216,7 +1225,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new ActionManageBatchUpload().execute(effectivePerson, workIds, site, fileName, bytes, disposition, extraParam, person, orderNumber, isSoftUpload, mainWork); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1233,7 +1242,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionManageDownload().execute(effectivePerson, id); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1250,7 +1259,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionManageDownloadStream().execute(effectivePerson, id); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1268,7 +1277,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionHtmlToPdf().execute(effectivePerson, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1286,7 +1295,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionDownloadTransfer().execute(effectivePerson, flag, BooleanUtils.isTrue(stream)); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1309,7 +1318,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new ActionManageBatchUpdate().execute(effectivePerson, ids, fileName, bytes, disposition, extraParam); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1327,7 +1336,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionManageBatchDelete().execute(effectivePerson, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1345,14 +1354,14 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionUploadWithUrl().execute(effectivePerson, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } - @JaxrsMethodDescribe(value = "html转图片工具类,通过微软playwright工具以截图方式生成图片," + - "转换后如果工作不为空通过downloadWithWork接口下载,为空downloadTransfer接口下载.", action = ActionHtmlToImage.class) + @JaxrsMethodDescribe(value = "html转图片工具类,通过微软playwright工具以截图方式生成图片," + + "转换后如果工作不为空通过downloadWithWork接口下载,为空downloadTransfer接口下载.", action = ActionHtmlToImage.class) @POST @Path("html/to/image") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -1364,7 +1373,7 @@ public class AttachmentAction extends StandardJaxrsAction { try { result = new ActionHtmlToImage().execute(effectivePerson, jsonElement); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); @@ -1388,7 +1397,7 @@ public class AttachmentAction extends StandardJaxrsAction { result = new V2UploadWorkOrWorkCompleted().execute(effectivePerson, workOrWorkCompleted, site, fileName, bytes, disposition); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/BaseAction.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/BaseAction.java index 35d571113dc5b1318da7f328c6cfac1e1d65d864..89bb6192bb5be9d148788da3acd8ffb2376b3b00 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/BaseAction.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/BaseAction.java @@ -38,6 +38,10 @@ abstract class BaseAction extends StandardJaxrsAction { protected static final String OFD_ATT_KEY = ".ofd"; + protected static final String SITE_SEPARATOR = "~"; + + protected static final String FILE_SEPARATOR = ","; + public static class WiExtraParam { private String site; @@ -288,8 +292,7 @@ abstract class BaseAction extends StandardJaxrsAction { Boolean value = false; try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); - value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag, - new ExceptionEntityNotExist(flag)); + value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag); } catch (Exception e) { logger.error(e); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/V2UploadWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/V2UploadWorkOrWorkCompleted.java index a1bd0b1bf3de1a7ba99e005ff7421fff96084642..8e0d10eb1744f11f0b0e338a518b5c006dbf4b95 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/V2UploadWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/V2UploadWorkOrWorkCompleted.java @@ -194,8 +194,7 @@ class V2UploadWorkOrWorkCompleted extends BaseAction { Boolean value = false; try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); - value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag, - new ExceptionEntityNotExist(flag)); + value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag); } catch (Exception e) { logger.error(e); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java index 15593ca7a8b110ffd23c6c244b4696646870ccf9..3fb7c89b3f0f55fc6e8f4dfe730346454f5ad254 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java @@ -1,6 +1,9 @@ package com.x.processplatform.assemble.surface.jaxrs.control; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; @@ -136,20 +139,54 @@ class ActionGetWorkOrWorkCompleted extends BaseAction { if (BooleanUtils.isTrue(PropertyTools.getOrElse(activity, Manual.allowAddSplit_FIELDNAME, Boolean.class, false)) && BooleanUtils.isTrue(work.getSplitting())) { Node node = this.workLogTree(business, work.getJob()).location(work); - if (null != node) { - Nodes ups = node.upTo(ActivityType.manual, ActivityType.agent, ActivityType.choice, ActivityType.delay, - ActivityType.embed, ActivityType.invoke, ActivityType.parallel, ActivityType.split); - System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!"); - System.out.println(gson.toJson(ups)); - System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!"); - for (Node o : ups) { - if (this.hasTaskCompletedWithActivityToken(business, effectivePerson, - o.getWorkLog().getFromActivityToken())) { - wo.setAllowAddSplit(true); - break; + Nodes nodes = new Nodes(); + nodes.add(node); + for (int i = 0; i < work.getSplitTokenList().size(); i++) { + List temps = new ArrayList<>(); + for (Node n : nodes) { + Nodes ups = n.upTo(ActivityType.split); + temps.addAll(ups); + for (Node u : ups) { + Nodes manuals = u.upTo(ActivityType.manual); + for (Node m : manuals) { + if (this.hasTaskCompletedWithActivityToken(business, effectivePerson, + m.getWorkLog().getFromActivityToken())) { + wo.setAllowAddSplit(true); + break; + } + } } } + nodes.clear(); + nodes.addAll(temps); } + +// if (null != node) { +// Nodes ups = node.upTo(ActivityType.split, +// Arrays.asList(ActivityType.manual, ActivityType.agent, ActivityType.choice, ActivityType.delay, +// ActivityType.embed, ActivityType.invoke, ActivityType.parallel)); +// for (Node o : ups) { +// System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!111"); +// System.out.println(o.getWorkLog().getFromActivityName()); +// System.out.println( +// o.getWorkLog().getFromActivityToken() + "->" + o.getWorkLog().getArrivedActivityName()); +// System.out.println(o.getWorkLog().getWork()); +// System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!111"); +// } +// for (Node o : ups) { +// System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!222"); +// System.out.println( +// o.getWorkLog().getFromActivityToken() + "->" + o.getWorkLog().getArrivedActivityName()); +// System.out.println(o.getWorkLog().getFromActivityToken()); +// System.out.println(o.getWorkLog().getWork()); +// System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!222"); +// if (this.hasTaskCompletedWithActivityToken(business, effectivePerson, +// o.getWorkLog().getFromActivityToken())) { +// wo.setAllowAddSplit(true); +// break; +// } +// } +// } } // 是否可以召回 if (BooleanUtils diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/BaseAction.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/BaseAction.java index 9d37513e44153f4bba360996819e0663df5df48a..58634b303320404e41bb3cbb0e91c1cc85a8110b 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/BaseAction.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/BaseAction.java @@ -4,7 +4,6 @@ import java.util.concurrent.CompletableFuture; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; -import com.x.base.core.project.exception.ExceptionEntityNotExist; import com.x.base.core.project.gson.GsonPropertyObject; import com.x.base.core.project.http.EffectivePerson; import com.x.base.core.project.jaxrs.StandardJaxrsAction; @@ -168,8 +167,7 @@ abstract class BaseAction extends StandardJaxrsAction { Boolean value = false; try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); - value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag, - new ExceptionEntityNotExist(flag)); + value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag); } catch (Exception e) { logger.error(e); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/documentversion/ActionListWithWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/documentversion/ActionListWithWorkOrWorkCompleted.java index a1d6b9b505dd7a08649e53900b6c04770dbea9ef..b2936b065350267bee2953b3c285703f83390115 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/documentversion/ActionListWithWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/documentversion/ActionListWithWorkOrWorkCompleted.java @@ -28,8 +28,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { Business business = new Business(emc); - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted, - new ExceptionEntityNotExist(workOrWorkCompleted))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted)) { throw new ExceptionAccessDenied(effectivePerson); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/documentversion/ActionListWithWorkOrWorkCompletedCategory.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/documentversion/ActionListWithWorkOrWorkCompletedCategory.java index 51e623409936693b6e719c04996894490e9aa4da..9934f88e006edc212e1610f356afe66bd8f65a54 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/documentversion/ActionListWithWorkOrWorkCompletedCategory.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/documentversion/ActionListWithWorkOrWorkCompletedCategory.java @@ -10,7 +10,6 @@ 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.exception.ExceptionAccessDenied; -import com.x.base.core.project.exception.ExceptionEntityNotExist; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; import com.x.base.core.project.logger.Logger; @@ -29,8 +28,7 @@ class ActionListWithWorkOrWorkCompletedCategory extends BaseAction { Business business = new Business(emc); - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted, - new ExceptionEntityNotExist(workOrWorkCompleted))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted)) { throw new ExceptionAccessDenied(effectivePerson); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionListWithWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionListWithWorkOrWorkCompleted.java index 8292b4759766df244b6aae372f4cd9d825f3d70f..0b924d98c4d79b0338d029009fc2ccdb6cda174d 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionListWithWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionListWithWorkOrWorkCompleted.java @@ -29,8 +29,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { Business business = new Business(emc); - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted, - new ExceptionEntityNotExist(workOrWorkCompleted))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted)) { throw new ExceptionAccessDenied(effectivePerson); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionListWithWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionListWithWorkOrWorkCompleted.java index bbe68137f00f029876e7d992c11d54888ee0273a..9db2d621851ce99c470e8f65571ef2d538f2d219 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionListWithWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readcompleted/ActionListWithWorkOrWorkCompleted.java @@ -28,8 +28,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { Business business = new Business(emc); - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted, - new ExceptionEntityNotExist(workOrWorkCompleted))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted)) { throw new ExceptionAccessDenied(effectivePerson); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readrecord/ActionListWithWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readrecord/ActionListWithWorkOrWorkCompleted.java index c8d3184d93a0823bc42cdce92e7e2149ee41be7b..dcba60a66a2633519cf10f9eebc6c94a812bd6b0 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readrecord/ActionListWithWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/readrecord/ActionListWithWorkOrWorkCompleted.java @@ -92,8 +92,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { Boolean value = false; try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); - value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag, - new ExceptionEntityNotExist(flag)); + value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag); } catch (Exception e) { logger.error(e); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithJob.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithJob.java index 4ac1a44df703bf3c317064f76c4d095af9f8619d..c2ed20d8aab7e07b45c18176057c3ea132871466 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithJob.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithJob.java @@ -43,8 +43,7 @@ class ActionListWithJob extends BaseAction { } } - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted, - new ExceptionEntityNotExist(workOrWorkCompleted))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted)) { throw new ExceptionAccessDenied(effectivePerson); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithJobPaging.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithJobPaging.java index 9b09e4b545f1895edb0979d15d5a0e80c1fd444a..c82e239aa90b8490b92e9a469d34751992e47d8b 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithJobPaging.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithJobPaging.java @@ -24,8 +24,8 @@ class ActionListWithJobPaging extends BaseAction { private static Logger logger = LoggerFactory.getLogger(ActionListWithJobPaging.class); - ActionResult> execute(EffectivePerson effectivePerson, String job, Integer page, - Integer size) throws Exception { + ActionResult> execute(EffectivePerson effectivePerson, String job, Integer page, Integer size) + throws Exception { try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { ActionResult> result = new ActionResult<>(); @@ -33,19 +33,18 @@ class ActionListWithJobPaging extends BaseAction { String workOrWorkCompleted = ""; List works = business.work().listWithJob(job); - if(ListTools.isNotEmpty(works)){ + if (ListTools.isNotEmpty(works)) { workOrWorkCompleted = works.get(0); - }else{ + } else { works = business.workCompleted().listWithJob(job); - if(ListTools.isNotEmpty(works)){ + if (ListTools.isNotEmpty(works)) { workOrWorkCompleted = works.get(0); - }else{ + } else { throw new ExceptionEntityNotExist(job); } } - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted, - new ExceptionEntityNotExist(workOrWorkCompleted))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted)) { throw new ExceptionAccessDenied(effectivePerson); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompleted.java index 396108cd7972c398a73c0e6d1b807710702a033a..069ad2ac03ea3e085b3d59eaa864d16990d737a8 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompleted.java @@ -84,8 +84,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { Boolean value = false; try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); - value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag, - new ExceptionEntityNotExist(flag)); + value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag); } catch (Exception e) { logger.error(e); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompletedPaging.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompletedPaging.java index 64265d2505f1ecfe857607b62faa6490a4bcf897..bb7c26ca7a2666084db8a06a1c097fdbc7daac7c 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompletedPaging.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompletedPaging.java @@ -16,7 +16,6 @@ import com.x.base.core.project.bean.WrapCopier; import com.x.base.core.project.bean.WrapCopierFactory; import com.x.base.core.project.config.Config; import com.x.base.core.project.exception.ExceptionAccessDenied; -import com.x.base.core.project.exception.ExceptionEntityNotExist; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; import com.x.base.core.project.logger.Logger; @@ -28,18 +27,22 @@ import com.x.processplatform.core.entity.content.Record; import com.x.processplatform.core.entity.content.Task; import com.x.processplatform.core.entity.content.WorkCompleted; +import io.swagger.v3.oas.annotations.media.Schema; + class ActionListWithWorkOrWorkCompletedPaging extends BaseAction { - private static Logger logger = LoggerFactory.getLogger(ActionListWithWorkOrWorkCompletedPaging.class); + private static final Logger LOGGER = LoggerFactory.getLogger(ActionListWithWorkOrWorkCompletedPaging.class); ActionResult> execute(EffectivePerson effectivePerson, String workOrWorkCompleted, Integer page, Integer size) throws Exception { + LOGGER.debug("execute:{}, workOrWorkCompleted:{}, page:{}, size:{}.", effectivePerson::getDistinguishedName, + () -> workOrWorkCompleted, () -> page, () -> size); + ActionResult> result = new ActionResult<>(); CompletableFuture> listFuture = this.listFuture(workOrWorkCompleted, page, size); - CompletableFuture checkControlFuture = this.checkControlFuture(effectivePerson, - workOrWorkCompleted); + CompletableFuture checkControlFuture = this.checkControlFuture(effectivePerson, workOrWorkCompleted); if (BooleanUtils .isFalse(checkControlFuture.get(Config.processPlatform().getAsynchronousTimeout(), TimeUnit.SECONDS))) { @@ -74,13 +77,11 @@ class ActionListWithWorkOrWorkCompletedPaging extends BaseAction { Record.order_FIELDNAME); } } - - for (Task task : emc.listEqual(Task.class, Task.job_FIELDNAME, job).stream() - .sorted(Comparator.comparing(Task::getStartTime)).collect(Collectors.toList())) { - wos.add(Wo.copier.copy(this.taskToRecord(task))); - } + wos = emc.listEqual(Task.class, Task.job_FIELDNAME, job).stream() + .sorted(Comparator.comparing(Task::getStartTime, Comparator.naturalOrder())) + .map(o -> Wo.copier.copy(taskToRecord(o))).collect(Collectors.toList()); } catch (Exception e) { - logger.error(e); + LOGGER.error(e); } return wos; }, ThisApplication.threadPool()); @@ -91,10 +92,9 @@ class ActionListWithWorkOrWorkCompletedPaging extends BaseAction { Boolean value = false; try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); - value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag, - new ExceptionEntityNotExist(flag)); + value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag); } catch (Exception e) { - logger.error(e); + LOGGER.error(e); } return value; }, ThisApplication.threadPool()); @@ -116,6 +116,7 @@ class ActionListWithWorkOrWorkCompletedPaging extends BaseAction { return o; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.record.ActionListWithWorkOrWorkCompletedPaging$Wo") public static class Wo extends Record { private static final long serialVersionUID = -7666329770246726197L; diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/review/ActionGetWithWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/review/ActionGetWithWorkOrWorkCompleted.java index 4ce4f4375ac284a691e351b1bcd12d04045ac8e3..b2bb5c1b3b61e3f70cdbfa5b7c809bdbd1c3d62b 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/review/ActionGetWithWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/review/ActionGetWithWorkOrWorkCompleted.java @@ -8,7 +8,6 @@ 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.exception.ExceptionAccessDenied; -import com.x.base.core.project.exception.ExceptionEntityNotExist; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; import com.x.processplatform.assemble.surface.Business; @@ -20,8 +19,7 @@ class ActionGetWithWorkOrWorkCompleted extends BaseAction { try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { ActionResult result = new ActionResult<>(); Business business = new Business(emc); - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted, - new ExceptionEntityNotExist(workOrWorkCompleted))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted)) { throw new ExceptionAccessDenied(effectivePerson); } String job = business.job().findWithWorkOrWorkCompleted(workOrWorkCompleted); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionListPrev.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionListPrev.java index 72e71d08f6102c430fa58d8f4791da12cdc35f25..d956bce7db973448f96b0b111cb524fbf7916e56 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionListPrev.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionListPrev.java @@ -23,7 +23,7 @@ class ActionListPrev extends BaseAction { LOGGER.debug("execute:{}, id:{}, count:{}.", effectivePerson::getDistinguishedName, () -> id, () -> count); EqualsTerms equals = new EqualsTerms(); equals.put(Task.person_FIELDNAME, effectivePerson.getDistinguishedName()); - return this.standardListPrev(Wo.copier, id, count, Task.sequence_FIELDNAME, equals, null, null, null, null, + return this.standardListPrev(Wo.copier, id, count, JpaObject.sequence_FIELDNAME, equals, null, null, null, null, null, null, null, true, DESC); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionListWithWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionListWithWorkOrWorkCompleted.java index 747e963a3845290d0569459366fb594c1ea9b4a7..45809d4c2c74ac6fb11a73ceac409f8787c71ea1 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionListWithWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionListWithWorkOrWorkCompleted.java @@ -28,8 +28,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { Business business = new Business(emc); - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted, - new ExceptionEntityNotExist(workOrWorkCompleted))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted)) { throw new ExceptionAccessDenied(effectivePerson); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionReference.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionReference.java index 4ad138d075522f044c52db6ccfdec3eff4525253..d3964d7f70dcd030bb9b33b0821901fd9207cc4c 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionReference.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/taskcompleted/ActionReference.java @@ -12,7 +12,6 @@ import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; -import org.apache.commons.collections4.list.SetUniqueList; import org.apache.commons.lang3.BooleanUtils; import com.x.base.core.container.EntityManagerContainer; @@ -27,7 +26,6 @@ import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; import com.x.base.core.project.tools.ListTools; import com.x.processplatform.assemble.surface.Business; -import com.x.processplatform.core.entity.content.ProcessingType; import com.x.processplatform.core.entity.content.Task; import com.x.processplatform.core.entity.content.TaskCompleted; import com.x.processplatform.core.entity.content.Work; @@ -35,6 +33,8 @@ import com.x.processplatform.core.entity.content.WorkCompleted; import com.x.processplatform.core.entity.content.WorkCompleted_; import com.x.processplatform.core.entity.content.WorkLog; +import io.swagger.v3.oas.annotations.media.Schema; + class ActionReference extends BaseAction { ActionResult execute(EffectivePerson effectivePerson, String id) throws Exception { try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { @@ -115,12 +115,14 @@ class ActionReference extends BaseAction { wo.setTaskCompletedList(WoTaskCompleted.copier.copy(os)); } + // @TODO private List listWork(Business business, TaskCompleted taskCompleted) throws Exception { - List ids = business.workLog().listWithFromActivityTokenForward(taskCompleted.getActivityToken()); - List workIds = SetUniqueList.setUniqueList(new ArrayList()); - for (WorkLog o : business.entityManagerContainer().list(WorkLog.class, ids)) { - workIds.add(o.getWork()); - } + List workIds = business.work().listWithJob(taskCompleted.getJob()); +// List ids = business.workLog().listWithFromActivityTokenForward(taskCompleted.getActivityToken()); +// List workIds = SetUniqueList.setUniqueList(new ArrayList()); +// for (WorkLog o : business.entityManagerContainer().list(WorkLog.class, ids)) { +// workIds.add(o.getWork()); +// } return WoWork.copier.copy(business.entityManagerContainer().list(Work.class, workIds)); } @@ -139,8 +141,11 @@ class ActionReference extends BaseAction { return wos; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.taskcompleted.ActionReference$Wo") public static class Wo extends GsonPropertyObject { + private static final long serialVersionUID = 6314327570968988398L; + @FieldDescribe("已办对象") private WoTaskCompleted taskCompleted; diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/BaseAction.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/BaseAction.java index 25f93f15b91d1abb89171d422bb5a0ad2f578f19..6c5dcf17cca2b5ba1fb987e43693499776f19ce2 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/BaseAction.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/BaseAction.java @@ -122,8 +122,7 @@ abstract class BaseAction extends StandardJaxrsAction { Boolean value = false; try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); - value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag, - new ExceptionEntityNotExist(flag)); + value = business.readableWithWorkOrWorkCompleted(effectivePerson, flag); } catch (Exception e) { logger.error(e); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2AddSplit.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2AddSplit.java index e624678375525d5b3e56157cd5a43a5ddc96c078..d1fe0124d9c671ff00c2756ee87a576b24bf97c4 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2AddSplit.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2AddSplit.java @@ -2,7 +2,6 @@ package com.x.processplatform.assemble.surface.jaxrs.work; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.BooleanUtils; @@ -16,7 +15,6 @@ import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; import com.x.base.core.project.bean.WrapCopier; import com.x.base.core.project.bean.WrapCopierFactory; -import com.x.base.core.project.config.Config; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; import com.x.base.core.project.jaxrs.WoId; @@ -26,14 +24,14 @@ import com.x.base.core.project.logger.LoggerFactory; 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.assemble.surface.RecordBuilder; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.assemble.surface.WorkControl; import com.x.processplatform.core.entity.content.Record; -import com.x.processplatform.core.entity.content.RecordProperties.NextManual; import com.x.processplatform.core.entity.content.Task; -import com.x.processplatform.core.entity.content.TaskCompleted; import com.x.processplatform.core.entity.content.Work; import com.x.processplatform.core.entity.content.WorkLog; +import com.x.processplatform.core.entity.element.Activity; import com.x.processplatform.core.entity.element.ActivityType; import com.x.processplatform.core.entity.element.Manual; import com.x.processplatform.core.entity.element.util.WorkLogTree; @@ -109,7 +107,8 @@ class V2AddSplit extends BaseAction { List ids = addSplit(); processing(ids); - record(); + concreteRecord(addSplitWorkLog); + // record(); Wo wo = Wo.copier.copy(rec); result.setData(wo); return result; @@ -157,6 +156,9 @@ class V2AddSplit extends BaseAction { } private void processing(List ids) throws Exception { + System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!2222"); + System.out.println(gson.toJson(ids)); + System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!2222"); for (String id : ids) { ProcessingAttributes processingAttributes = new ProcessingAttributes(); processingAttributes.setType(ProcessingAttributes.TYPE_ADDSPLIT); @@ -171,63 +173,79 @@ class V2AddSplit extends BaseAction { } } - private void record() throws Exception { + private void concreteRecord(WorkLog workLog) throws Exception { + List newlyTaskIds = new ArrayList<>(); + Activity activity = null; try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); - final List nextTaskIdentities = new ArrayList<>(); - rec = new Record(addSplitWorkLog); - rec.setPerson(effectivePerson.getDistinguishedName()); - rec.setType(Record.TYPE_ADDSPLIT); - rec.getProperties().setElapsed( - Config.workTime().betweenMinutes(rec.getProperties().getStartTime(), rec.getRecordTime())); - /* 需要记录处理人,先查看当前用户有没有之前处理过的信息,如果没有,取默认身份 */ - TaskCompleted existTaskCompleted = emc.firstEqualAndEqual(TaskCompleted.class, TaskCompleted.job_FIELDNAME, - work.getJob(), TaskCompleted.person_FIELDNAME, effectivePerson.getDistinguishedName()); - rec.setPerson(effectivePerson.getDistinguishedName()); - if (null != existTaskCompleted) { - rec.setIdentity(existTaskCompleted.getIdentity()); - rec.setUnit(existTaskCompleted.getUnit()); - } else { - rec.setIdentity( - business.organization().identity().getMajorWithPerson(effectivePerson.getDistinguishedName())); - rec.setUnit(business.organization().unit().getWithIdentity(rec.getIdentity())); - } - List ids = emc.idsEqual(Task.class, Task.job_FIELDNAME, work.getJob()); - ids = ListUtils.subtract(ids, existTaskIds); - List list = emc.fetch(ids, Task.class, - ListTools.toList(Task.identity_FIELDNAME, Task.job_FIELDNAME, Task.work_FIELDNAME, - Task.activity_FIELDNAME, Task.activityAlias_FIELDNAME, Task.activityName_FIELDNAME, - Task.activityToken_FIELDNAME, Task.activityType_FIELDNAME, Task.identity_FIELDNAME)); - list.stream().collect(Collectors.groupingBy(Task::getActivity, Collectors.toList())).entrySet().stream() - .forEach(o -> { - Task task = o.getValue().get(0); - NextManual nextManual = new NextManual(); - nextManual.setActivity(task.getActivity()); - nextManual.setActivityAlias(task.getActivityAlias()); - nextManual.setActivityName(task.getActivityName()); - nextManual.setActivityToken(task.getActivityToken()); - nextManual.setActivityType(task.getActivityType()); - for (Task t : o.getValue()) { - nextManual.getTaskIdentityList().add(t.getIdentity()); - nextTaskIdentities.add(t.getIdentity()); - } - rec.getProperties().getNextManualList().add(nextManual); - }); - /* 去重 */ - rec.getProperties().setNextManualTaskIdentityList(ListTools.trim(nextTaskIdentities, true, true)); - } - WoId resp = ThisApplication.context().applications() - .postQuery(effectivePerson.getDebugger(), x_processplatform_service_processing.class, - Applications.joinQueryUri("record", "job", work.getJob()), rec, this.work.getJob()) - .getData(WoId.class); - if (StringUtils.isBlank(resp.getId())) { - throw new ExceptionRecord(this.work.getId()); + newlyTaskIds = emc.idsEqual(Task.class, Task.job_FIELDNAME, work.getJob()); + newlyTaskIds = ListUtils.subtract(newlyTaskIds, existTaskIds); + activity = business.getActivity(workLog.getArrivedActivity(), workLog.getArrivedActivityType()); } + this.rec = RecordBuilder.ofWorkProcessing(Record.TYPE_ADDSPLIT, workLog, effectivePerson, activity, + newlyTaskIds); + RecordBuilder.processing(rec); } +// private void record() throws Exception { +// try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { +// Business business = new Business(emc); +// final List nextTaskIdentities = new ArrayList<>(); +// rec = new Record(addSplitWorkLog); +// rec.setPerson(effectivePerson.getDistinguishedName()); +// rec.setType(Record.TYPE_ADDSPLIT); +// rec.getProperties().setElapsed( +// Config.workTime().betweenMinutes(rec.getProperties().getStartTime(), rec.getRecordTime())); +// /* 需要记录处理人,先查看当前用户有没有之前处理过的信息,如果没有,取默认身份 */ +// TaskCompleted existTaskCompleted = emc.firstEqualAndEqual(TaskCompleted.class, TaskCompleted.job_FIELDNAME, +// work.getJob(), TaskCompleted.person_FIELDNAME, effectivePerson.getDistinguishedName()); +// rec.setPerson(effectivePerson.getDistinguishedName()); +// if (null != existTaskCompleted) { +// rec.setIdentity(existTaskCompleted.getIdentity()); +// rec.setUnit(existTaskCompleted.getUnit()); +// } else { +// rec.setIdentity( +// business.organization().identity().getMajorWithPerson(effectivePerson.getDistinguishedName())); +// rec.setUnit(business.organization().unit().getWithIdentity(rec.getIdentity())); +// } +// List ids = emc.idsEqual(Task.class, Task.job_FIELDNAME, work.getJob()); +// ids = ListUtils.subtract(ids, existTaskIds); +// List list = emc.fetch(ids, Task.class, +// ListTools.toList(Task.identity_FIELDNAME, Task.job_FIELDNAME, Task.work_FIELDNAME, +// Task.activity_FIELDNAME, Task.activityAlias_FIELDNAME, Task.activityName_FIELDNAME, +// Task.activityToken_FIELDNAME, Task.activityType_FIELDNAME, Task.identity_FIELDNAME)); +// list.stream().collect(Collectors.groupingBy(Task::getActivity, Collectors.toList())).entrySet().stream() +// .forEach(o -> { +// Task task = o.getValue().get(0); +// NextManual nextManual = new NextManual(); +// nextManual.setActivity(task.getActivity()); +// nextManual.setActivityAlias(task.getActivityAlias()); +// nextManual.setActivityName(task.getActivityName()); +// nextManual.setActivityToken(task.getActivityToken()); +// nextManual.setActivityType(task.getActivityType()); +// for (Task t : o.getValue()) { +// nextManual.getTaskIdentityList().add(t.getIdentity()); +// nextTaskIdentities.add(t.getIdentity()); +// } +// rec.getProperties().getNextManualList().add(nextManual); +// }); +// /* 去重 */ +// rec.getProperties().setNextManualTaskIdentityList(ListTools.trim(nextTaskIdentities, true, true)); +// } +// WoId resp = ThisApplication.context().applications() +// .postQuery(effectivePerson.getDebugger(), x_processplatform_service_processing.class, +// Applications.joinQueryUri("record", "job", work.getJob()), rec, this.work.getJob()) +// .getData(WoId.class); +// if (StringUtils.isBlank(resp.getId())) { +// throw new ExceptionRecord(this.work.getId()); +// } +// } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.work.V2AddSplit$Wi") public static class Wi extends V2AddSplitWi { + private static final long serialVersionUID = 389793480955959857L; + } @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.work.V2AddSplit$Wo") diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListRollbackWithWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListRollbackWithWorkOrWorkCompleted.java index edc44dd5feee7c6b4e17360741ad56298c354d39..9dbe44ebac14f7baae73f5438c386ec00f9c465b 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListRollbackWithWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListRollbackWithWorkOrWorkCompleted.java @@ -44,8 +44,7 @@ class ActionListRollbackWithWorkOrWorkCompleted extends BaseAction { try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); - if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted, - new ExceptionEntityNotExist(workOrWorkCompleted))) { + if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted)) { throw new ExceptionAccessDenied(effectivePerson); } @@ -156,9 +155,9 @@ class ActionListRollbackWithWorkOrWorkCompleted extends BaseAction { private static final long serialVersionUID = -7243683008987722267L; static WrapCopier copier = WrapCopierFactory.wo(Read.class, WoRead.class, - ListTools.toList(JpaObject.id_FIELDNAME, Read.person_FIELDNAME, Read.identity_FIELDNAME, Read.unit_FIELDNAME, - Read.opinion_FIELDNAME, Read.opinionLob_FIELDNAME, Read.startTime_FIELDNAME, - Read.activityName_FIELDNAME, Read.activityToken_FIELDNAME), + ListTools.toList(JpaObject.id_FIELDNAME, Read.person_FIELDNAME, Read.identity_FIELDNAME, + Read.unit_FIELDNAME, Read.opinion_FIELDNAME, Read.opinionLob_FIELDNAME, + Read.startTime_FIELDNAME, Read.activityName_FIELDNAME, Read.activityToken_FIELDNAME), null); } @@ -181,9 +180,10 @@ class ActionListRollbackWithWorkOrWorkCompleted extends BaseAction { private static final long serialVersionUID = 293599148568443301L; static WrapCopier copier = WrapCopierFactory.wo(Task.class, WoTask.class, - ListTools.toList(JpaObject.id_FIELDNAME, Task.person_FIELDNAME, Task.identity_FIELDNAME, Task.unit_FIELDNAME, - Task.routeName_FIELDNAME, Task.opinion_FIELDNAME, Task.opinionLob_FIELDNAME, - Task.startTime_FIELDNAME, Task.activityName_FIELDNAME, Task.activityToken_FIELDNAME), + ListTools.toList(JpaObject.id_FIELDNAME, Task.person_FIELDNAME, Task.identity_FIELDNAME, + Task.unit_FIELDNAME, Task.routeName_FIELDNAME, Task.opinion_FIELDNAME, + Task.opinionLob_FIELDNAME, Task.startTime_FIELDNAME, Task.activityName_FIELDNAME, + Task.activityToken_FIELDNAME), null); } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListWithWorkOrWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListWithWorkOrWorkCompleted.java index 9e52c81037b458a213e1435b463abe5b38c2af15..1add536a0496fe29dc6b265ad9056f2e0a523b99 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListWithWorkOrWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListWithWorkOrWorkCompleted.java @@ -33,6 +33,8 @@ import com.x.processplatform.core.entity.element.util.WorkLogTree; import com.x.processplatform.core.entity.element.util.WorkLogTree.Node; import com.x.processplatform.core.entity.element.util.WorkLogTree.Nodes; +import io.swagger.v3.oas.annotations.media.Schema; + class ActionListWithWorkOrWorkCompleted extends BaseAction { private static Logger logger = LoggerFactory.getLogger(ActionListWithWorkOrWorkCompleted.class); @@ -66,8 +68,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { Boolean value = false; try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); - value = business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted, - new ExceptionEntityNotExist(workOrWorkCompleted)); + value = business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted); } catch (Exception e) { logger.error(e); } @@ -200,6 +201,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { return os; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.worklog.ActionListWithWorkOrWorkCompleted$Wo") public static class Wo extends WorkLog { private static final long serialVersionUID = -7666329770246726197L; @@ -279,6 +281,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.worklog.ActionListWithWorkOrWorkCompleted$WoTask") public static class WoTask extends Task { private static final long serialVersionUID = 293599148568443301L; @@ -291,6 +294,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { null); } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.worklog.ActionListWithWorkOrWorkCompleted$WoTaskCompleted") public static class WoTaskCompleted extends TaskCompleted { private static final long serialVersionUID = -4432508672641778924L; @@ -309,6 +313,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { null); } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.worklog.ActionListWithWorkOrWorkCompleted$WoRead") public static class WoRead extends Read { private static final long serialVersionUID = -7243683008987722267L; @@ -321,6 +326,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction { null); } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.worklog.ActionListWithWorkOrWorkCompleted$WoReadCompleted") public static class WoReadCompleted extends ReadCompleted { private static final long serialVersionUID = -7086077858353505033L; diff --git a/o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/util/WorkLogTree.java b/o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/util/WorkLogTree.java index 119a349f148116a1ced48337925cc4a4a4c9d0ee..68d7db019d00b8e3b766b433f6d2b92e119bea9a 100644 --- a/o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/util/WorkLogTree.java +++ b/o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/util/WorkLogTree.java @@ -19,9 +19,10 @@ public class WorkLogTree { private Node root; - public static List RELY_WORKLOG_ITEMS = ListTools.toList(WorkLog.fromActivityToken_FIELDNAME, - WorkLog.arrivedActivityToken_FIELDNAME, WorkLog.fromActivityType_FIELDNAME, - WorkLog.arrivedActivityType_FIELDNAME, WorkLog.connected_FIELDNAME); + public static final List RELY_WORKLOG_ITEMS = ListUtils.unmodifiableList(ListTools.toList( + WorkLog.fromActivityToken_FIELDNAME, WorkLog.arrivedActivityToken_FIELDNAME, + WorkLog.fromActivityType_FIELDNAME, WorkLog.arrivedActivityType_FIELDNAME, + WorkLog.fromActivityName_FIELDNAME, WorkLog.arrivedActivityName_FIELDNAME, WorkLog.connected_FIELDNAME)); Nodes nodes = new Nodes(); @@ -43,9 +44,6 @@ public class WorkLogTree { throw new ExceptionBeginNotFound(); } root = this.find(begin); -// for (Node o : nodes) { -// this.associate(); -// } this.associate(); } @@ -53,14 +51,10 @@ public class WorkLogTree { for (Node node : nodes) { this.nodes.stream().filter( o -> StringUtils.equals(node.workLog.getFromActivityToken(), o.workLog.getArrivedActivityToken())) - .forEach(o -> { - node.parents.add(o); - }); + .forEach(o -> node.parents.add(o)); this.nodes.stream().filter( o -> StringUtils.equals(node.workLog.getArrivedActivityToken(), o.workLog.getFromActivityToken())) - .forEach(o -> { - node.children.add(o); - }); + .forEach(o -> node.children.add(o)); } } @@ -93,14 +87,12 @@ public class WorkLogTree { public Date latestArrivedTime() { Date date = null; - if (!this.isEmpty()) { - for (Node n : this) { - if (null != n.getWorkLog().getArrivedTime()) { - if (null == date) { - date = n.getWorkLog().getArrivedTime(); - } else { - date = n.getWorkLog().getArrivedTime().after(date) ? n.getWorkLog().getArrivedTime() : date; - } + for (Node n : this) { + if (null != n.getWorkLog().getArrivedTime()) { + if (null == date) { + date = n.getWorkLog().getArrivedTime(); + } else { + date = n.getWorkLog().getArrivedTime().after(date) ? n.getWorkLog().getArrivedTime() : date; } } } @@ -133,7 +125,7 @@ public class WorkLogTree { if (Objects.equals(o.workLog.getFromActivityType(), activityType)) { result.add(o); } else { - if (ListTools.contains(pass, o.workLog.getFromActivityType())) { + if (ListTools.contains(pass, o.workLog.getFromActivityType()) || pass.isEmpty()) { o.upTo(activityType, pass, result); } } @@ -206,14 +198,14 @@ public class WorkLogTree { } public Nodes down(Node node) { - Nodes nodes = new Nodes(); + Nodes ns = new Nodes(); for (Node o : node.children) { - nodes.add(o); + ns.add(o); } for (Node o : node.children) { - nodes.addAll(down(o)); + ns.addAll(down(o)); } - return nodes; + return ns; } public Nodes up(Node node) { diff --git a/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/ActionAddSplit.java b/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/ActionAddSplit.java index 28d2f654d94a88e0623a98cbc3126d58f9e6e604..784b6ac2157f1f1ef19ac04fbebd51e266b1edbf 100644 --- a/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/ActionAddSplit.java +++ b/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/ActionAddSplit.java @@ -23,6 +23,7 @@ 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.processplatform.ManualTaskIdentityMatrix; import com.x.base.core.project.tools.ListTools; import com.x.base.core.project.tools.StringTools; import com.x.processplatform.core.entity.content.Task; @@ -116,7 +117,7 @@ class ActionAddSplit extends BaseAction { workCopy.setSplitting(from.getSplitting()); workCopy.setSplitValue(splitValue); // workCopy.getManualTaskIdentityList().clear(); - workCopy.getManualTaskIdentityMatrix().clear(); + workCopy.setManualTaskIdentityMatrix(new ManualTaskIdentityMatrix()); workCopy.setBeforeExecuted(false); workCopy.setDestinationActivity(null); workCopy.setDestinationActivityType(null); diff --git a/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2AddSplit.java b/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2AddSplit.java index 089e12108f582b3fb7dd6353efbd5d6a1ca3c9c6..0e85143099d1be9a9a8829bd15d94f4a626c508c 100644 --- a/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2AddSplit.java +++ b/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2AddSplit.java @@ -1,5 +1,6 @@ package com.x.processplatform.service.processing.jaxrs.work; +import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.concurrent.Callable; @@ -19,6 +20,7 @@ import com.x.base.core.project.http.EffectivePerson; import com.x.base.core.project.jaxrs.WrapStringList; import com.x.base.core.project.logger.Logger; import com.x.base.core.project.logger.LoggerFactory; +import com.x.base.core.project.processplatform.ManualTaskIdentityMatrix; import com.x.base.core.project.tools.ListTools; import com.x.base.core.project.tools.StringTools; import com.x.processplatform.core.entity.content.Work; @@ -102,12 +104,15 @@ class V2AddSplit extends BaseAction { workCopy.setActivityName(activity.getName()); workCopy.setActivityToken(StringTools.uniqueToken()); workCopy.setActivityType(activity.getActivityType()); - workCopy.setSplitTokenList(arrived.getProperties().getSplitTokenList()); + // workCopy.setSplitTokenList(arrived.getProperties().getSplitTokenList()); + workCopy.setSplitValueList( + adjustSplitValueList(arrived.getProperties().getSplitValueList(), splitValue)); workCopy.setSplitToken(arrived.getSplitToken()); workCopy.setSplitting(from.getSplitting()); workCopy.setSplitValue(splitValue); -// workCopy.getManualTaskIdentityList().clear(); - workCopy.getManualTaskIdentityMatrix().clear(); + // workCopy.getManualTaskIdentityList().clear(); + // workCopy.getManualTaskIdentityMatrix().clear(); + workCopy.setManualTaskIdentityMatrix(new ManualTaskIdentityMatrix()); workCopy.setBeforeExecuted(false); workCopy.setDestinationActivity(null); workCopy.setDestinationActivityType(null); @@ -133,7 +138,8 @@ class V2AddSplit extends BaseAction { fromCopy.setFromActivityToken(workCopy.getActivityToken()); fromCopy.setFromTime(workCopy.getActivityArrivedTime()); fromCopy.setWork(workCopy.getId()); - arrivedCopy.setSplitValue(workCopy.getSplitValue()); + fromCopy.setSplitValue(workCopy.getSplitValue()); + fromCopy.setSplitToken(workCopy.getSplitToken()); fromCopy.setArrivedActivity(""); fromCopy.setArrivedActivityAlias(""); fromCopy.setArrivedActivityName(""); @@ -144,6 +150,7 @@ class V2AddSplit extends BaseAction { emc.persist(workCopy, CheckPersistType.all); emc.persist(arrivedCopy, CheckPersistType.all); emc.persist(fromCopy, CheckPersistType.all); + emc.commit(); wo.addValue(workCopy.getId(), true); } @@ -157,6 +164,15 @@ class V2AddSplit extends BaseAction { } + private List adjustSplitValueList(List list, String value) { + List values = new ArrayList<>(); + if (ListTools.isNotEmpty(list)) { + list.stream().limit(list.size() - 1L).forEach(values::add); + } + values.add(value); + return values; + } + public static class Wi extends V2AddSplitWi { private static final long serialVersionUID = 6460190818209523936L; diff --git a/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/AbstractProcessor.java b/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/AbstractProcessor.java index 2d6e20a16dfa1e12ef9911f0a891eb100550f9d3..50cccf718baf2876f245832abb01c4cc3d4c398f 100644 --- a/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/AbstractProcessor.java +++ b/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/AbstractProcessor.java @@ -14,6 +14,7 @@ import org.apache.commons.lang3.StringUtils; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.project.logger.Logger; import com.x.base.core.project.logger.LoggerFactory; +import com.x.base.core.project.processplatform.ManualTaskIdentityMatrix; import com.x.base.core.project.scripting.JsonScriptingExecutor; import com.x.base.core.project.tools.ListTools; import com.x.processplatform.core.entity.content.Read; @@ -113,7 +114,7 @@ public abstract class AbstractProcessor extends AbstractBaseProcessor { // } private void arriveCleanManualTaskIdentityMatrix(AeiObjects aeiObjects) { - aeiObjects.getWork().getManualTaskIdentityMatrix().clear(); + aeiObjects.getWork().setManualTaskIdentityMatrix(new ManualTaskIdentityMatrix()); } private void arriveCleanManualEmpowerMap(AeiObjects aeiObjects) {