From 69c13b6513c284abc536715a867d6e6efc8783af Mon Sep 17 00:00:00 2001 From: zhourui Date: Tue, 28 Jun 2022 16:22:36 +0800 Subject: [PATCH] update swagger --- .../anonymous/ActionReadCountWithPerson.java | 36 ++-- .../anonymous/ActionTaskCountWithPerson.java | 46 ++--- .../jaxrs/anonymous/AnonymousAction.java | 18 +- .../surface/jaxrs/application/ActionGet.java | 47 +++-- .../jaxrs/application/ActionGetIcon.java | 74 +++---- .../application/ActionListWithPerson.java | 94 ++++----- .../ActionListWithPersonComplex.java | 49 +++-- .../application/ActionListWithPersonLike.java | 62 ++++-- .../ActionManageListWithPersonComplex.java | 92 +++++---- .../jaxrs/application/ApplicationAction.java | 47 +++-- .../surface/jaxrs/application/BaseAction.java | 2 + .../ExceptionApplicationNotExist.java | 13 -- .../ActionCreateDataPath0.java | 21 +- .../ActionCreateDataPath1.java | 21 +- .../ActionCreateDataPath2.java | 23 ++- .../ActionCreateDataPath3.java | 21 +- .../ActionCreateDataPath4.java | 22 ++- .../ActionCreateDataPath5.java | 22 ++- .../ActionCreateDataPath6.java | 23 ++- .../ActionCreateDataPath7.java | 23 ++- .../ActionDeleteDataPath0.java | 20 +- .../ActionDeleteDataPath1.java | 21 +- .../ActionDeleteDataPath2.java | 21 +- .../ActionDeleteDataPath3.java | 21 +- .../ActionDeleteDataPath4.java | 21 +- .../ActionDeleteDataPath5.java | 21 +- .../ActionDeleteDataPath6.java | 22 ++- .../ActionDeleteDataPath7.java | 24 ++- .../jaxrs/applicationdict/ActionGet.java | 17 +- .../jaxrs/applicationdict/ActionGetData.java | 15 +- .../applicationdict/ActionGetDataPath0.java | 16 +- .../applicationdict/ActionGetDataPath1.java | 16 +- .../applicationdict/ActionGetDataPath2.java | 16 +- .../applicationdict/ActionGetDataPath3.java | 16 +- .../applicationdict/ActionGetDataPath4.java | 17 +- .../applicationdict/ActionGetDataPath5.java | 17 +- .../applicationdict/ActionGetDataPath6.java | 17 +- .../applicationdict/ActionGetDataPath7.java | 17 +- .../ActionListWithApplication.java | 15 +- .../jaxrs/applicationdict/ActionUpdate.java | 75 -------- .../ActionUpdateDataPath0.java | 21 +- .../ActionUpdateDataPath1.java | 21 +- .../ActionUpdateDataPath2.java | 21 +- .../ActionUpdateDataPath3.java | 21 +- .../ActionUpdateDataPath4.java | 24 ++- .../ActionUpdateDataPath5.java | 22 ++- .../ActionUpdateDataPath6.java | 23 ++- .../ActionUpdateDataPath7.java | 23 ++- .../ApplicationDictAction.java | 180 +++++++++--------- .../ExceptionAccessDenied.java | 13 -- .../ExceptionApplicationDictNotExist.java | 13 -- .../control/ActionGetWorkOrWorkCompleted.java | 3 + .../data/ActionUpdateWithWorkCompleted.java | 6 +- .../jaxrs/read/ActionCountWithPerson.java | 1 + .../core/entity/content/WorkCompleted.java | 2 + .../core/entity/element/util/WorkLogTree.java | 2 +- .../ActionReadCountWithPersonWo.java | 24 +++ .../ActionTaskCountWithPersonWo.java | 24 +++ .../jaxrs/application/ActionGetIconWo.java | 36 ++++ .../processing/jaxrs/data/BaseAction.java | 5 +- 60 files changed, 1119 insertions(+), 547 deletions(-) delete mode 100644 o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ExceptionApplicationNotExist.java delete mode 100644 o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdate.java delete mode 100644 o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ExceptionAccessDenied.java delete mode 100644 o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ExceptionApplicationDictNotExist.java create mode 100644 o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/anonymous/ActionReadCountWithPersonWo.java create mode 100644 o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/anonymous/ActionTaskCountWithPersonWo.java create mode 100644 o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/application/ActionGetIconWo.java diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionReadCountWithPerson.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionReadCountWithPerson.java index a97e6ccfe2..2ee06ee8a9 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionReadCountWithPerson.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionReadCountWithPerson.java @@ -4,43 +4,39 @@ import org.apache.commons.lang3.StringUtils; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; -import com.x.base.core.project.annotation.FieldDescribe; -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.processplatform.assemble.surface.Business; +import com.x.processplatform.core.entity.content.Read; +import com.x.processplatform.core.express.assemble.surface.jaxrs.anonymous.ActionReadCountWithPersonWo; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionReadCountWithPerson extends BaseAction { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionReadCountWithPerson.class); + ActionResult execute(EffectivePerson effectivePerson, String credential) throws Exception { + LOGGER.debug("execute:{}, credential:{}.", effectivePerson::getDistinguishedName, () -> credential); ActionResult result = new ActionResult<>(); try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { - Wo wrap = new Wo(); + Wo wo = new Wo(); Business business = new Business(emc); String person = business.organization().person().get(credential); if (StringUtils.isNotEmpty(person)) { - Long count = business.read().countWithPerson(person); - wrap.setCount(count); + wo.setCount(emc.countEqual(Read.class, Read.person_FIELDNAME, person)); } - result.setData(wrap); + result.setData(wo); return result; } } - public static class Wo extends GsonPropertyObject { - - private static final long serialVersionUID = -6282434800524535886L; - - @FieldDescribe("待阅数量") - private Long count = 0L; - - public Long getCount() { - return count; - } - - public void setCount(Long count) { - this.count = count; - } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.anonymous.ActionReadCountWithPerson$Wo") + public static class Wo extends ActionReadCountWithPersonWo { + private static final long serialVersionUID = -4826522308213241258L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionTaskCountWithPerson.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionTaskCountWithPerson.java index d191550a48..d6d315fec5 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionTaskCountWithPerson.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/ActionTaskCountWithPerson.java @@ -1,64 +1,42 @@ package com.x.processplatform.assemble.surface.jaxrs.anonymous; -import javax.persistence.EntityManager; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; -import javax.persistence.criteria.Predicate; -import javax.persistence.criteria.Root; - import org.apache.commons.lang3.StringUtils; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; -import com.x.base.core.project.annotation.FieldDescribe; -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.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.content.Task; -import com.x.processplatform.core.entity.content.Task_; +import com.x.processplatform.core.express.assemble.surface.jaxrs.anonymous.ActionTaskCountWithPersonWo; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionTaskCountWithPerson extends BaseAction { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionTaskCountWithPerson.class); + ActionResult execute(EffectivePerson effectivePerson, String credential) throws Exception { + LOGGER.debug("execute:{}, credential:{}.", effectivePerson::getDistinguishedName, () -> credential); ActionResult result = new ActionResult<>(); try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Wo wo = new Wo(); Business business = new Business(emc); String person = business.organization().person().get(credential); if (StringUtils.isNotEmpty(person)) { - Long count = this.countWithPerson(business, person); - wo.setCount(count); + wo.setCount(emc.countEqual(Task.class, Task.person_FIELDNAME, person)); } result.setData(wo); return result; } } - private Long countWithPerson(Business business, String person) throws Exception { - EntityManager em = business.entityManagerContainer().get(Task.class); - CriteriaBuilder cb = em.getCriteriaBuilder(); - CriteriaQuery cq = cb.createQuery(Long.class); - Root root = cq.from(Task.class); - Predicate p = cb.equal(root.get(Task_.person), person); - cq.select(cb.count(root)).where(p); - return em.createQuery(cq).getSingleResult(); - } - - public static class Wo extends GsonPropertyObject { + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.anonymous.ActionTaskCountWithPerson$Wo") + public static class Wo extends ActionTaskCountWithPersonWo { - private static final long serialVersionUID = 8792811593252273112L; - - @FieldDescribe("待办数量") - private Long count = 0L; - - public Long getCount() { - return count; - } - - public void setCount(Long count) { - this.count = count; - } + private static final long serialVersionUID = -9179016852260263883L; } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/AnonymousAction.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/AnonymousAction.java index d600d54602..2ff8ec1bb1 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/AnonymousAction.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/anonymous/AnonymousAction.java @@ -22,6 +22,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 = "AnonymousAction", description = "匿名接口.") @@ -29,8 +34,12 @@ import io.swagger.v3.oas.annotations.tags.Tag; @JaxrsDescribe("匿名接口.") public class AnonymousAction extends StandardJaxrsAction { - private static Logger logger = LoggerFactory.getLogger(AnonymousAction.class); + private static final Logger LOGGER = LoggerFactory.getLogger(AnonymousAction.class); + private static final String OPERATIONID_PREFIX = "AnonymousAction::"; + @Operation(summary = "获取指定人员的待办数量,没有权限限制.", operationId = OPERATIONID_PREFIX + "taskCountWithPerson", responses = { + @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionTaskCountWithPerson.Wo.class)) }) }) @JaxrsMethodDescribe(value = "获取指定人员的待办数量,没有权限限制.", action = ActionTaskCountWithPerson.class) @GET @Path("task/count/{credential}") @@ -43,12 +52,15 @@ public class AnonymousAction extends StandardJaxrsAction { try { result = new ActionTaskCountWithPerson().execute(effectivePerson, credential); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } + @Operation(summary = "获取指定人员的待阅数量,没有权限限制.", operationId = OPERATIONID_PREFIX + "readCountWithPerson", responses = { + @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionReadCountWithPerson.Wo.class)) }) }) @JaxrsMethodDescribe(value = "获取指定人员的待阅数量,没有权限限制.", action = ActionReadCountWithPerson.class) @GET @Path("read/count/{credential}") @@ -61,7 +73,7 @@ public class AnonymousAction extends StandardJaxrsAction { try { result = new ActionReadCountWithPerson().execute(effectivePerson, credential); } 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/application/ActionGet.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionGet.java index 10875a835a..a03fbbc14c 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionGet.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionGet.java @@ -1,33 +1,56 @@ package com.x.processplatform.assemble.surface.jaxrs.application; +import java.util.Optional; + import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.entity.JpaObject; +import com.x.base.core.project.annotation.FieldDescribe; import com.x.base.core.project.bean.WrapCopier; import com.x.base.core.project.bean.WrapCopierFactory; +import com.x.base.core.project.cache.CacheManager; +import com.x.base.core.project.cache.Cache.CacheKey; import com.x.base.core.project.exception.ExceptionEntityNotExist; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; +import io.swagger.v3.oas.annotations.media.Schema; + class ActionGet extends BaseAction { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGet.class); + ActionResult execute(EffectivePerson effectivePerson, String flag) throws Exception { - try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { - ActionResult result = new ActionResult<>(); - Business business = new Business(emc); - Application application = business.application().pick(flag); - if (null == application) { - throw new ExceptionEntityNotExist(flag, Application.class); + + LOGGER.debug("execute:{}, flag:{}.", effectivePerson::getDistinguishedName, () -> flag); + + ActionResult result = new ActionResult<>(); + Wo wo = null; + CacheKey cacheKey = new CacheKey(this.getClass(), effectivePerson.getDistinguishedName(), flag); + Optional optional = CacheManager.get(cacheCategory, cacheKey); + + if (optional.isPresent()) { + wo = (Wo) optional.get(); + } else { + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { + Business business = new Business(emc); + Application application = business.application().pick(flag); + if (null == application) { + throw new ExceptionEntityNotExist(flag, Application.class); + } + wo = Wo.copier.copy(application); + wo.setAllowControl(business.application().allowControl(effectivePerson, application)); } - Wo wo = Wo.copier.copy(application); - wo.setAllowControl(business.application().allowControl(effectivePerson, application)); - result.setData(wo); - return result; } + result.setData(wo); + return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.application.ActionGet$Wo") public static class Wo extends Application { private static final long serialVersionUID = -4862564047240738097L; @@ -35,7 +58,9 @@ class ActionGet extends BaseAction { static WrapCopier copier = WrapCopierFactory.wo(Application.class, Wo.class, null, JpaObject.FieldsInvisible); - /** 当前用户是否可以编辑此应用的列表界面 */ + @FieldDescribe("当前用户是否可以编辑此应用的列表界面.") + @Schema(description = "当前用户是否可以编辑此应用的列表界面.") + private Boolean allowControl; public Boolean getAllowControl() { diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionGetIcon.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionGetIcon.java index a3801b905f..bf78f83cec 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionGetIcon.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionGetIcon.java @@ -1,54 +1,58 @@ package com.x.processplatform.assemble.surface.jaxrs.application; +import java.util.Optional; + import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.annotation.FieldDescribe; -import com.x.base.core.project.gson.GsonPropertyObject; +import com.x.base.core.project.cache.Cache.CacheKey; +import com.x.base.core.project.cache.CacheManager; import com.x.base.core.project.http.ActionResult; +import com.x.base.core.project.http.EffectivePerson; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.express.assemble.surface.jaxrs.application.ActionGetIconWo; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionGetIcon extends BaseAction { - ActionResult execute(String flag) throws Exception { - try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { - ActionResult result = new ActionResult<>(); - Business business = new Business(emc); - Application application = business.application().pick(flag); - /** 如果application 不存在,返回空值 */ - Wo wo = new Wo(); - if (null != application) { - wo.setIcon(application.getIcon()); - wo.setIconHue(application.getIconHue()); + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGetIcon.class); + + ActionResult execute(EffectivePerson effectivePerson, String flag) throws Exception { + + LOGGER.debug("execute:{}, flag:{}.", effectivePerson::getDistinguishedName, () -> flag); + + ActionResult result = new ActionResult<>(); + Wo wo = null; + CacheKey cacheKey = new CacheKey(this.getClass(), flag); + Optional optional = CacheManager.get(cacheCategory, cacheKey); + if (optional.isPresent()) { + wo = (Wo) optional.get(); + } else { + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { + Business business = new Business(emc); + Application application = business.application().pick(flag); + if (null != application) { + wo = new Wo(); + wo.setIcon(application.getIcon()); + wo.setIconHue(application.getIconHue()); + CacheManager.put(cacheCategory, cacheKey, wo); + } } - result.setData(wo); - return result; - } - } - - public static class Wo extends GsonPropertyObject { - - @FieldDescribe("应用图标base64编码值") - private String icon; - - @FieldDescribe("应用图标色调") - private String iconHue; - - public String getIcon() { - return icon; } + result.setData(wo); + return result; - public void setIcon(String icon) { - this.icon = icon; - } + } - public String getIconHue() { - return iconHue; - } + + @Schema(name="com.x.processplatform.assemble.surface.jaxrs.application.ActionGetIcon$Wo") + public static class Wo extends ActionGetIconWo { - public void setIconHue(String iconHue) { - this.iconHue = iconHue; - } + private static final long serialVersionUID = 2713907116018975830L; } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPerson.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPerson.java index 42c10fa2c0..257ad50fb9 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPerson.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPerson.java @@ -16,20 +16,25 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.entity.JpaObject; import com.x.base.core.project.bean.WrapCopier; import com.x.base.core.project.bean.WrapCopierFactory; -import com.x.base.core.project.cache.Cache; +import com.x.base.core.project.cache.Cache.CacheKey; import com.x.base.core.project.cache.CacheManager; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.base.core.project.organization.OrganizationDefinition; import com.x.base.core.project.tools.ListTools; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; -import com.x.processplatform.core.entity.element.Application_; import com.x.processplatform.core.entity.element.Process; import com.x.processplatform.core.entity.element.Process_; +import io.swagger.v3.oas.annotations.media.Schema; + class ActionListWithPerson extends BaseAction { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionListWithPerson.class); + /** * 1.身份在可使用列表中
* 2.组织在可使用组织中
@@ -38,18 +43,22 @@ class ActionListWithPerson extends BaseAction { * 6.应用的创建人员
* 7.个人有Manage权限或者ProcessPlatformManager身份 */ + @SuppressWarnings("unchecked") ActionResult> execute(EffectivePerson effectivePerson) throws Exception { - try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { - Business business = new Business(emc); - ActionResult> result = new ActionResult<>(); - Cache.CacheKey cacheKey = new Cache.CacheKey(this.getClass(), effectivePerson.getDistinguishedName()); - Optional optional = CacheManager.get(cacheCategory, cacheKey); - if (optional.isPresent()) { - result.setData((List) optional.get()); - }else { - List wos = new ArrayList<>(); + + LOGGER.debug("execute:{}.", effectivePerson::getDistinguishedName); + + ActionResult> result = new ActionResult<>(); + List wos = new ArrayList<>(); + CacheKey cacheKey = new CacheKey(this.getClass(), effectivePerson.getDistinguishedName()); + Optional optional = CacheManager.get(cacheCategory, cacheKey); + if (optional.isPresent()) { + wos = (List) optional.get(); + } else { + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { + Business business = new Business(emc); List identities = business.organization().identity().listWithPerson(effectivePerson); - /** 去除部门以及上级部门,如果设置了一级部门可用,那么一级部门下属的二级部门也可用 */ + // 去除部门以及上级部门,如果设置了一级部门可用,那么一级部门下属的二级部门也可用 List units = business.organization().unit().listWithPersonSupNested(effectivePerson); List roles = business.organization().role().listWithPerson(effectivePerson); List groups = business.organization().group().listWithIdentity(identities); @@ -61,13 +70,14 @@ class ActionListWithPerson extends BaseAction { } } wos = business.application().sort(wos); - - result.setData(wos); + CacheManager.put(cacheCategory, cacheKey, wos); } - return result; } + result.setData(wos); + return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.application.ActionListWithPerson$Wo") public static class Wo extends Application { private static final long serialVersionUID = -4862564047240738097L; @@ -84,37 +94,33 @@ class ActionListWithPerson extends BaseAction { */ private List list(Business business, EffectivePerson effectivePerson, List roles, List identities, List units, List groups) throws Exception { -// List ids = this.listFromApplication(business, effectivePerson, roles, identities, units); -// return ids; - List fromProcessIds = this.listFromProcess(business, effectivePerson, roles, identities, units, groups); - return fromProcessIds; -// return ListUtils.intersection(ids, fromProcessIds); + return this.listFromProcess(business, effectivePerson, roles, identities, units, groups); } - private List listFromApplication(Business business, EffectivePerson effectivePerson, List roles, - List identities, List units) throws Exception { - List list = new ArrayList<>(); - EntityManager em = business.entityManagerContainer().get(Application.class); - CriteriaBuilder cb = em.getCriteriaBuilder(); - CriteriaQuery cq = cb.createQuery(String.class); - Root root = cq.from(Application.class); - if (effectivePerson.isNotManager() && (!business.organization().person().hasRole(effectivePerson, - OrganizationDefinition.Manager, OrganizationDefinition.ProcessPlatformManager))) { - Predicate p = cb.and(cb.isEmpty(root.get(Application_.availableIdentityList)), - cb.isEmpty(root.get(Application_.availableUnitList))); - p = cb.or(p, cb.isMember(effectivePerson.getDistinguishedName(), root.get(Application_.controllerList))); - p = cb.or(p, cb.equal(root.get(Application_.creatorPerson), effectivePerson.getDistinguishedName())); - if (ListTools.isNotEmpty(identities)) { - p = cb.or(p, root.get(Application_.availableIdentityList).in(identities)); - } - if (ListTools.isNotEmpty(units)) { - p = cb.or(p, root.get(Application_.availableUnitList).in(units)); - } - cq.where(p); - } - return em.createQuery(cq.select(root.get(Application_.id))).getResultList().stream().distinct() - .collect(Collectors.toList()); - } +// private List listFromApplication(Business business, EffectivePerson effectivePerson, List roles, +// List identities, List units) throws Exception { +// List list = new ArrayList<>(); +// EntityManager em = business.entityManagerContainer().get(Application.class); +// CriteriaBuilder cb = em.getCriteriaBuilder(); +// CriteriaQuery cq = cb.createQuery(String.class); +// Root root = cq.from(Application.class); +// if (effectivePerson.isNotManager() && (!business.organization().person().hasRole(effectivePerson, +// OrganizationDefinition.Manager, OrganizationDefinition.ProcessPlatformManager))) { +// Predicate p = cb.and(cb.isEmpty(root.get(Application_.availableIdentityList)), +// cb.isEmpty(root.get(Application_.availableUnitList))); +// p = cb.or(p, cb.isMember(effectivePerson.getDistinguishedName(), root.get(Application_.controllerList))); +// p = cb.or(p, cb.equal(root.get(Application_.creatorPerson), effectivePerson.getDistinguishedName())); +// if (ListTools.isNotEmpty(identities)) { +// p = cb.or(p, root.get(Application_.availableIdentityList).in(identities)); +// } +// if (ListTools.isNotEmpty(units)) { +// p = cb.or(p, root.get(Application_.availableUnitList).in(units)); +// } +// cq.where(p); +// } +// return em.createQuery(cq.select(root.get(Application_.id))).getResultList().stream().distinct() +// .collect(Collectors.toList()); +// } /** * diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonComplex.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonComplex.java index 0d1172b1c5..7c8799b634 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonComplex.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonComplex.java @@ -23,6 +23,8 @@ import com.x.base.core.project.cache.Cache; import com.x.base.core.project.cache.CacheManager; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.base.core.project.organization.OrganizationDefinition; import com.x.base.core.project.tools.ListTools; import com.x.processplatform.assemble.surface.Business; @@ -31,20 +33,26 @@ import com.x.processplatform.core.entity.element.Application_; import com.x.processplatform.core.entity.element.Process; import com.x.processplatform.core.entity.element.Process_; +import io.swagger.v3.oas.annotations.media.Schema; + class ActionListWithPersonComplex extends BaseAction { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionListWithPersonComplex.class); + + @SuppressWarnings("unchecked") ActionResult> execute(EffectivePerson effectivePerson) throws Exception { - try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { - ActionResult> result = new ActionResult<>(); - Cache.CacheKey cacheKey = new Cache.CacheKey(this.getClass(), effectivePerson.getDistinguishedName()); - Optional optional = CacheManager.get(cacheCategory, cacheKey); - if (optional.isPresent()) { - result.setData((List) optional.get()); - }else { - List wos = new ArrayList<>(); + LOGGER.debug("execute:{}.", effectivePerson::getDistinguishedName); + ActionResult> result = new ActionResult<>(); + List wos = new ArrayList<>(); + Cache.CacheKey cacheKey = new Cache.CacheKey(this.getClass(), effectivePerson.getDistinguishedName()); + Optional optional = CacheManager.get(cacheCategory, cacheKey); + if (optional.isPresent()) { + wos = (List) optional.get(); + } else { + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); List identities = business.organization().identity().listWithPerson(effectivePerson); - /** 去除部门以及上级部门,如果设置了一级部门可用,那么一级部门下属的二级部门也可用 */ + // 去除部门以及上级部门,如果设置了一级部门可用,那么一级部门下属的二级部门也可用 List units = business.organization().unit().listWithPersonSupNested(effectivePerson); List roles = business.organization().role().listWithPerson(effectivePerson); List groups = business.organization().group().listWithIdentity(identities); @@ -53,17 +61,20 @@ class ActionListWithPersonComplex extends BaseAction { Application o = business.application().pick(id); if (null != o) { Wo wo = Wo.copier.copy(o); - wo.setProcessList(this.referenceProcess(business, effectivePerson, identities, units, groups, o)); + wo.setProcessList( + this.referenceProcess(business, effectivePerson, identities, units, groups, o)); wos.add(wo); } } wos = business.application().sort(wos); - result.setData(wos); + CacheManager.put(cacheCategory, cacheKey, wos); } - return result; } + result.setData(wos); + return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.application.ActionListWithPersonComplex$Wo") public static class Wo extends Application { private static final long serialVersionUID = -4862564047240738097L; @@ -71,10 +82,12 @@ class ActionListWithPersonComplex extends BaseAction { static WrapCopier copier = WrapCopierFactory.wo(Application.class, Wo.class, null, JpaObject.FieldsInvisible); - @FieldDescribe("流程对象") + @FieldDescribe("流程对象.") + @Schema(description = "流程对象.") private List processList; - @FieldDescribe("是否可编辑") + @FieldDescribe("是否可编辑.") + @Schema(description = "是否可编辑.") private Boolean allowControl; public Boolean getAllowControl() { @@ -98,7 +111,6 @@ class ActionListWithPersonComplex extends BaseAction { public static class WoProcess extends Process { private static final long serialVersionUID = 1521228691441978462L; - public static List Excludes = new ArrayList<>(JpaObject.FieldsInvisible); static WrapCopier copier = WrapCopierFactory.wo(Process.class, WoProcess.class, null, JpaObject.FieldsInvisible); @@ -174,9 +186,10 @@ class ActionListWithPersonComplex extends BaseAction { } private List referenceProcess(Business business, EffectivePerson effectivePerson, - List identities, List units, List groups, Application application) throws Exception { - List ids = business.process().listStartableWithApplication(effectivePerson, identities, units, - groups, application); + List identities, List units, List groups, Application application) + throws Exception { + List ids = business.process().listStartableWithApplication(effectivePerson, identities, units, groups, + application); List wos = new ArrayList<>(); for (String id : ids) { WoProcess o = WoProcess.copier.copy(business.process().pick(id)); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonLike.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonLike.java index 60134afe61..9ddfaa080e 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonLike.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionListWithPersonLike.java @@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.application; import java.util.ArrayList; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; import javax.persistence.EntityManager; @@ -17,39 +18,60 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.entity.JpaObject; import com.x.base.core.project.bean.WrapCopier; import com.x.base.core.project.bean.WrapCopierFactory; +import com.x.base.core.project.cache.Cache; +import com.x.base.core.project.cache.CacheManager; import com.x.base.core.project.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.organization.OrganizationDefinition; import com.x.base.core.project.tools.ListTools; import com.x.processplatform.assemble.surface.Business; +import com.x.processplatform.assemble.surface.jaxrs.application.ActionListWithPersonComplex.Wo; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.Application_; import com.x.processplatform.core.entity.element.Process; import com.x.processplatform.core.entity.element.Process_; +import io.swagger.v3.oas.annotations.media.Schema; + class ActionListWithPersonLike extends BaseAction { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionListWithPersonLike.class); + + @SuppressWarnings("unchecked") ActionResult> execute(EffectivePerson effectivePerson, String key) throws Exception { - try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { - Business business = new Business(emc); - ActionResult> result = new ActionResult<>(); - List wos = new ArrayList<>(); - List identities = business.organization().identity().listWithPerson(effectivePerson); - /** 去除部门以及上级部门,如果设置了一级部门可用,那么一级部门下属的二级部门也可用 */ - List units = business.organization().unit().listWithPersonSupNested(effectivePerson); - List roles = business.organization().role().listWithPerson(effectivePerson); - List groups = business.organization().group().listWithIdentity(identities); - List ids = this.list(business, effectivePerson, roles, identities, units, groups, key); - for (String id : ids) { - Application o = business.application().pick(id); - wos.add(Wo.copier.copy(o)); + + LOGGER.debug("execute:{}, key:{}.", effectivePerson::getDistinguishedName, () -> key); + + ActionResult> result = new ActionResult<>(); + List wos = new ArrayList<>(); + Cache.CacheKey cacheKey = new Cache.CacheKey(this.getClass(), effectivePerson.getDistinguishedName(), key); + Optional optional = CacheManager.get(cacheCategory, cacheKey); + if (optional.isPresent()) { + wos = (List) optional.get(); + } else { + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { + Business business = new Business(emc); + List identities = business.organization().identity().listWithPerson(effectivePerson); + // 去除部门以及上级部门,如果设置了一级部门可用,那么一级部门下属的二级部门也可用 + List units = business.organization().unit().listWithPersonSupNested(effectivePerson); + List roles = business.organization().role().listWithPerson(effectivePerson); + List groups = business.organization().group().listWithIdentity(identities); + List ids = this.list(business, effectivePerson, roles, identities, units, groups, key); + for (String id : ids) { + Application o = business.application().pick(id); + wos.add(Wo.copier.copy(o)); + } + wos = business.application().sort(wos); + CacheManager.put(cacheCategory, cacheKey, wos); } - wos = business.application().sort(wos); - result.setData(wos); - return result; } + result.setData(wos); + return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.application.ActionListWithPersonLike$Wo") public static class Wo extends Application { private static final long serialVersionUID = -4862564047240738097L; @@ -62,7 +84,8 @@ class ActionListWithPersonLike extends BaseAction { private List list(Business business, EffectivePerson effectivePerson, List roles, List identities, List units, List groups, String key) throws Exception { List ids = this.listFromApplication(business, effectivePerson, roles, identities, units); - List fromProcessIds = this.listFromProcess(business, effectivePerson, roles, identities, units, groups, key); + List fromProcessIds = this.listFromProcess(business, effectivePerson, roles, identities, units, groups, + key); return ListUtils.intersection(ids, fromProcessIds); } @@ -100,10 +123,7 @@ class ActionListWithPersonLike extends BaseAction { CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery cq = cb.createQuery(String.class); Root root = cq.from(Process.class); - String str = key.replaceAll("_", "\\\\_"); - str = str.replaceAll("%", "\\\\%"); - str = str.toLowerCase(); - Predicate p = cb.like(root.get(Process_.name), "%" + str + "%", '\\'); + Predicate p = cb.like(root.get(Process_.name), "%" + key.toLowerCase() + "%", '\\'); if (effectivePerson.isNotManager() && (!business.organization().person().hasRole(effectivePerson, OrganizationDefinition.Manager, OrganizationDefinition.ProcessPlatformManager))) { p = cb.and(cb.isEmpty(root.get(Process_.startableIdentityList)), diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionManageListWithPersonComplex.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionManageListWithPersonComplex.java index 468e5d31dc..1222c13a30 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionManageListWithPersonComplex.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ActionManageListWithPersonComplex.java @@ -2,6 +2,7 @@ package com.x.processplatform.assemble.surface.jaxrs.application; import java.util.ArrayList; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; import javax.persistence.EntityManager; @@ -18,8 +19,12 @@ import com.x.base.core.entity.JpaObject; import com.x.base.core.project.annotation.FieldDescribe; import com.x.base.core.project.bean.WrapCopier; import com.x.base.core.project.bean.WrapCopierFactory; +import com.x.base.core.project.cache.CacheManager; +import com.x.base.core.project.cache.Cache.CacheKey; 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.element.Application; @@ -27,37 +32,53 @@ import com.x.processplatform.core.entity.element.Application_; import com.x.processplatform.core.entity.element.Process; import com.x.processplatform.core.entity.element.Process_; +import io.swagger.v3.oas.annotations.media.Schema; + class ActionManageListWithPersonComplex extends BaseAction { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionManageListWithPersonComplex.class); + + @SuppressWarnings("unchecked") ActionResult> execute(EffectivePerson effectivePerson, String person) throws Exception { - try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { - ActionResult> result = new ActionResult<>(); - List wos = new ArrayList<>(); - Business business = new Business(emc); - - if (effectivePerson.isManager()) { - List identities = business.organization().identity().listWithPerson(person); - /** 去除部门以及上级部门,如果设置了一级部门可用,那么一级部门下属的二级部门也可用 */ - List units = business.organization().unit().listWithPersonSupNested(person); - List roles = business.organization().role().listWithPerson(person); - List groups = business.organization().group().listWithIdentity(identities); - List ids = this.list(business, effectivePerson, roles, identities, units, groups); - for (String id : ids) { - Application o = business.application().pick(id); - if (null != o) { - Wo wo = Wo.copier.copy(o); - wo.setProcessList(this.referenceProcess(business, effectivePerson, identities, units, groups, o)); - wos.add(wo); + + LOGGER.debug("execute:{}, person:{}.", effectivePerson::getDistinguishedName, () -> person); + + ActionResult> result = new ActionResult<>(); + List wos = new ArrayList<>(); + CacheKey cacheKey = new CacheKey(this.getClass(), effectivePerson.getDistinguishedName()); + Optional optional = CacheManager.get(cacheCategory, cacheKey); + + if (optional.isPresent()) { + wos = (List) optional.get(); + } else { + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { + Business business = new Business(emc); + if (effectivePerson.isManager()) { + List identities = business.organization().identity().listWithPerson(person); + // 去除部门以及上级部门,如果设置了一级部门可用,那么一级部门下属的二级部门也可用 + List units = business.organization().unit().listWithPersonSupNested(person); + List roles = business.organization().role().listWithPerson(person); + List groups = business.organization().group().listWithIdentity(identities); + List ids = this.list(business, effectivePerson, roles, identities, units, groups); + for (String id : ids) { + Application o = business.application().pick(id); + if (null != o) { + Wo wo = Wo.copier.copy(o); + wo.setProcessList( + this.referenceProcess(business, effectivePerson, identities, units, groups, o)); + wos.add(wo); + } } + wos = business.application().sort(wos); + CacheManager.put(cacheCategory, cacheKey, wos); } - wos = business.application().sort(wos); - result.setData(wos); } - - return result; } + result.setData(wos); + return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.application.ActionManageListWithPersonComplex$Wo") public static class Wo extends Application { private static final long serialVersionUID = 1176431364379021779L; @@ -65,10 +86,12 @@ class ActionManageListWithPersonComplex extends BaseAction { static WrapCopier copier = WrapCopierFactory.wo(Application.class, Wo.class, null, JpaObject.FieldsInvisible); - @FieldDescribe("流程对象") + @FieldDescribe("流程对象.") + @Schema(description = "流程对象.") private List processList; - @FieldDescribe("是否可编辑") + @FieldDescribe("是否可编辑.") + @Schema(description = "是否可编辑.") private Boolean allowControl; public Boolean getAllowControl() { @@ -89,11 +112,10 @@ class ActionManageListWithPersonComplex extends BaseAction { } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.application.ActionManageListWithPersonComplex$WoProcess") public static class WoProcess extends Process { private static final long serialVersionUID = 8239383153729965245L; - public static List Excludes = new ArrayList<>(JpaObject.FieldsInvisible); - static WrapCopier copier = WrapCopierFactory.wo(Process.class, WoProcess.class, null, JpaObject.FieldsInvisible); @@ -113,7 +135,6 @@ class ActionManageListWithPersonComplex extends BaseAction { private List listFromApplication(Business business, EffectivePerson effectivePerson, List roles, List identities, List units) throws Exception { - List list = new ArrayList<>(); EntityManager em = business.entityManagerContainer().get(Application.class); CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery cq = cb.createQuery(String.class); @@ -130,9 +151,8 @@ class ActionManageListWithPersonComplex extends BaseAction { } cq.where(p); - list = em.createQuery(cq.select(root.get(Application_.id))).getResultList().stream().distinct() + return em.createQuery(cq.select(root.get(Application_.id))).getResultList().stream().distinct() .collect(Collectors.toList()); - return list; } /** @@ -145,11 +165,8 @@ class ActionManageListWithPersonComplex extends BaseAction { CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery cq = cb.createQuery(String.class); Root root = cq.from(Process.class); - Predicate p = cb.conjunction(); - - p = cb.and(cb.isEmpty(root.get(Process_.startableIdentityList)), - cb.isEmpty(root.get(Process_.startableUnitList)), - cb.isEmpty(root.get(Process_.startableGroupList))); + Predicate p = cb.and(cb.isEmpty(root.get(Process_.startableIdentityList)), + cb.isEmpty(root.get(Process_.startableUnitList)), cb.isEmpty(root.get(Process_.startableGroupList))); if (ListTools.isNotEmpty(identities)) { p = cb.or(p, root.get(Process_.startableIdentityList).in(identities)); @@ -166,9 +183,10 @@ class ActionManageListWithPersonComplex extends BaseAction { } private List referenceProcess(Business business, EffectivePerson effectivePerson, - List identities, List units, List groups, Application application) throws Exception { - List ids = business.process().listStartableWithApplication(effectivePerson, identities, units, - groups, application); + List identities, List units, List groups, Application application) + throws Exception { + List ids = business.process().listStartableWithApplication(effectivePerson, identities, units, groups, + application); List wos = new ArrayList<>(); for (String id : ids) { WoProcess o = WoProcess.copier.copy(business.process().pick(id)); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ApplicationAction.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ApplicationAction.java index d668c0f2df..bf851a6a72 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ApplicationAction.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ApplicationAction.java @@ -24,6 +24,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 = "AnonymousAction", description = "应用接口.") @@ -31,9 +36,12 @@ import io.swagger.v3.oas.annotations.tags.Tag; @Path("application") public class ApplicationAction extends StandardJaxrsAction { - private static Logger logger = LoggerFactory.getLogger(ApplicationAction.class); + private static final Logger LOGGER = LoggerFactory.getLogger(ApplicationAction.class); + private static final String OPERATIONID_PREFIX = "ApplicationAction::"; - @JaxrsMethodDescribe(value = "获取指定的Application信息,并在Control段附带其操作权限.", action = ActionGet.class) + @Operation(summary = "获取指定的应用信息,并附带其操作权限.", operationId = OPERATIONID_PREFIX + "get", responses = { + @ApiResponse(content = { @Content(schema = @Schema(implementation = ActionGet.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "获取指定的应用信息,并附带其操作权限.", action = ActionGet.class) @GET @Path("{flag}") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -45,12 +53,15 @@ public class ApplicationAction extends StandardJaxrsAction { try { result = new ActionGet().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)); } + @Operation(summary = "获取可见的应用,同时判断应用下有启动的流程.", operationId = OPERATIONID_PREFIX + "listWithPerson", responses = { + @ApiResponse(content = { + @Content(array = @ArraySchema(schema = @Schema(implementation = ActionListWithPerson.Wo.class))) }) }) @JaxrsMethodDescribe(value = "获取可见的应用,同时判断应用下有启动的流程.", action = ActionListWithPerson.class) @GET @Path("list") @@ -62,12 +73,15 @@ public class ApplicationAction extends StandardJaxrsAction { try { result = new ActionListWithPerson().execute(effectivePerson); } catch (Exception e) { - logger.error(e, effectivePerson, request, null); + LOGGER.error(e, effectivePerson, request, null); result.error(e); } asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result)); } + @Operation(summary = "获取可见的应用,同时判断应用下有启动的流程,并进行流程的名称匹配.", operationId = OPERATIONID_PREFIX + + "listWithPersonLike", responses = { @ApiResponse(content = { + @Content(array = @ArraySchema(schema = @Schema(implementation = ActionListWithPersonLike.Wo.class))) }) }) @JaxrsMethodDescribe(value = "获取可见的应用,同时判断应用下有启动的流程,并进行流程的名称匹配.", action = ActionListWithPersonLike.class) @GET @Path("list/key/{key}") @@ -80,13 +94,16 @@ public class ApplicationAction extends StandardJaxrsAction { try { result = new ActionListWithPersonLike().execute(effectivePerson, key); } 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,并绑定其启动的Porcess", action = ActionListWithPersonComplex.class) + @Operation(summary = "根据当前用户所有可见的Application,并绑定其启动的Porcess.", operationId = OPERATIONID_PREFIX + + "listWithPersonComplex", responses = { @ApiResponse(content = { + @Content(array = @ArraySchema(schema = @Schema(implementation = ActionListWithPersonComplex.Wo.class))) }) }) + @JaxrsMethodDescribe(value = "根据当前用户所有可见的Application,并绑定其启动的Porcess.", action = ActionListWithPersonComplex.class) @GET @Path("list/complex") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -98,13 +115,16 @@ public class ApplicationAction extends StandardJaxrsAction { try { result = new ActionListWithPersonComplex().execute(effectivePerson); } 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,并绑定其启动的Porcess", action = ActionManageListWithPersonComplex.class) + @Operation(summary = "根据传入用户,获取可见的Application,并绑定其启动的Porcess.", operationId = OPERATIONID_PREFIX + + "manageListWithPersonComplex", responses = { @ApiResponse(content = { + @Content(array = @ArraySchema(schema = @Schema(implementation = ActionManageListWithPersonComplex.Wo.class))) }) }) + @JaxrsMethodDescribe(value = "根据传入用户,获取可见的Application,并绑定其启动的Porcess.", action = ActionManageListWithPersonComplex.class) @GET @Path("list/complex/manage/{person}") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -116,13 +136,16 @@ public class ApplicationAction extends StandardJaxrsAction { try { result = new ActionManageListWithPersonComplex().execute(effectivePerson, person); } 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的Icon,没有权限限制", action = ActionGetIcon.class) + @Operation(summary = "仅获取指定Application的Icon,没有权限限制.", operationId = OPERATIONID_PREFIX + "getIcon", responses = { + @ApiResponse(content = { + @Content(schema = @Schema(implementation = ActionManageListWithPersonComplex.Wo.class)) }) }) + @JaxrsMethodDescribe(value = "仅获取指定Application的Icon,没有权限限制.", action = ActionGetIcon.class) @GET @Path("{flag}/icon") @Produces(HttpMediaType.APPLICATION_JSON_UTF_8) @@ -132,9 +155,9 @@ public class ApplicationAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionGetIcon().execute(flag); + result = new ActionGetIcon().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)); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/BaseAction.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/BaseAction.java index 46bdbe6f00..446544ef13 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/BaseAction.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/BaseAction.java @@ -6,5 +6,7 @@ import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.Process; abstract class BaseAction extends StandardJaxrsAction { + Cache.CacheCategory cacheCategory = new Cache.CacheCategory(Application.class, Process.class); + } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ExceptionApplicationNotExist.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ExceptionApplicationNotExist.java deleted file mode 100644 index 55a8c667ad..0000000000 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/application/ExceptionApplicationNotExist.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.x.processplatform.assemble.surface.jaxrs.application; - -import com.x.base.core.project.exception.LanguagePromptException; - -class ExceptionApplicationNotExist extends LanguagePromptException { - - private static final long serialVersionUID = -4908883340253465376L; - - ExceptionApplicationNotExist(String flag) { - super("指定的应用不存在:{}.", flag); - } - -} diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath0.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath0.java index 7acfa4675c..4ce41fab53 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath0.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath0.java @@ -7,16 +7,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionCreateDataPath0 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, JsonElement jsonElement) - throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionCreateDataPath0.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +41,7 @@ class ActionCreateDataPath0 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -40,8 +52,11 @@ class ActionCreateDataPath0 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionCreateDataPath0$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -2119458154058983519L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath1.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath1.java index 81653a48aa..8ffe02f8fa 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath1.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath1.java @@ -7,16 +7,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionCreateDataPath1 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - JsonElement jsonElement) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionCreateDataPath1.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +41,7 @@ class ActionCreateDataPath1 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -40,7 +52,10 @@ class ActionCreateDataPath1 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionCreateDataPath1$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -1898987124500347360L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath2.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath2.java index a2cf0c7dc6..13d2daea57 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath2.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath2.java @@ -7,17 +7,29 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionCreateDataPath2 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, JsonElement jsonElement) throws Exception { - + private static final Logger LOGGER = LoggerFactory.getLogger(ActionCreateDataPath2.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); + ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +41,7 @@ class ActionCreateDataPath2 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -40,8 +52,11 @@ class ActionCreateDataPath2 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionCreateDataPath2$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -6345750146907408340L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath3.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath3.java index 957f5a6be3..25341dc645 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath3.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath3.java @@ -7,16 +7,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionCreateDataPath3 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, JsonElement jsonElement) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionCreateDataPath3.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +41,7 @@ class ActionCreateDataPath3 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications().postQuery(x_processplatform_service_processing.class, @@ -39,8 +51,11 @@ class ActionCreateDataPath3 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionCreateDataPath3$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -6753039349551369477L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath4.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath4.java index 57821df8d7..efc8c68b32 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath4.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath4.java @@ -7,16 +7,29 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionCreateDataPath4 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, JsonElement jsonElement) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionCreateDataPath4.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4, JsonElement jsonElement) + throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +42,7 @@ class ActionCreateDataPath4 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -41,8 +54,11 @@ class ActionCreateDataPath4 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionCreateDataPath4$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -3646113299578036460L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath5.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath5.java index 09e7d4af39..0e98960fd8 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath5.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath5.java @@ -7,16 +7,29 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionCreateDataPath5 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5, JsonElement jsonElement) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionCreateDataPath5.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4, String path5, JsonElement jsonElement) + throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +42,7 @@ class ActionCreateDataPath5 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications().postQuery(x_processplatform_service_processing.class, @@ -39,8 +52,11 @@ class ActionCreateDataPath5 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionCreateDataPath5$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -6268917479261258887L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath6.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath6.java index 40e7fb24c5..240a00c02b 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath6.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath6.java @@ -7,17 +7,29 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionCreateDataPath6 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5, String path6, JsonElement jsonElement) - throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionCreateDataPath6.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4, String path5, String path6, + JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -30,7 +42,7 @@ class ActionCreateDataPath6 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -41,8 +53,11 @@ class ActionCreateDataPath6 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionCreateDataPath6$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -7224946141276757013L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath7.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath7.java index b03f8af450..4a0ddae45f 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath7.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionCreateDataPath7.java @@ -7,17 +7,29 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionCreateDataPath7 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5, String path6, String path7, JsonElement jsonElement) - throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionCreateDataPath7.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4, String path5, String path6, + String path7, JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -30,7 +42,7 @@ class ActionCreateDataPath7 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -41,8 +53,11 @@ class ActionCreateDataPath7 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionCreateDataPath7$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -2420730759826666569L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath0.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath0.java index 06d1f31e05..ede81c9249 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath0.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath0.java @@ -6,15 +6,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionDeleteDataPath0 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionDeleteDataPath0.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -27,7 +40,7 @@ class ActionDeleteDataPath0 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications().deleteQuery(x_processplatform_service_processing.class, @@ -36,8 +49,11 @@ class ActionDeleteDataPath0 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionDeleteDataPath0$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -5102612124840299831L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath1.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath1.java index e312b79065..3eb9afff58 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath1.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath1.java @@ -6,16 +6,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionDeleteDataPath1 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1) - throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionDeleteDataPath1.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -28,7 +40,7 @@ class ActionDeleteDataPath1 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications().deleteQuery(x_processplatform_service_processing.class, @@ -37,8 +49,11 @@ class ActionDeleteDataPath1 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionDeleteDataPath1$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -347289598468490285L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath2.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath2.java index cbc56ab1a9..ce33b35dbd 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath2.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath2.java @@ -6,16 +6,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionDeleteDataPath2 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionDeleteDataPath2.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -28,7 +40,7 @@ class ActionDeleteDataPath2 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -39,8 +51,11 @@ class ActionDeleteDataPath2 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionDeleteDataPath2$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = 6273231704438579999L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath3.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath3.java index 69fe110e68..8f0c97e5bb 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath3.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath3.java @@ -6,16 +6,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionDeleteDataPath3 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionDeleteDataPath3.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -28,7 +40,7 @@ class ActionDeleteDataPath3 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -39,8 +51,11 @@ class ActionDeleteDataPath3 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionDeleteDataPath3$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = 1358652319910506460L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath4.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath4.java index 5fc3f67bae..db4f2d8a01 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath4.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath4.java @@ -6,16 +6,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionDeleteDataPath4 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionDeleteDataPath4.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -28,7 +40,7 @@ class ActionDeleteDataPath4 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -39,8 +51,11 @@ class ActionDeleteDataPath4 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionDeleteDataPath4$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -4104023667936075424L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath5.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath5.java index ea6e05f4b7..a4ac65c649 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath5.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath5.java @@ -6,16 +6,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionDeleteDataPath5 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionDeleteDataPath5.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4, String path5) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -28,7 +40,7 @@ class ActionDeleteDataPath5 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication @@ -39,8 +51,11 @@ class ActionDeleteDataPath5 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionDeleteDataPath5$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = 8315888566834749455L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath6.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath6.java index 46916a85dc..13a01ff1af 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath6.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath6.java @@ -6,16 +6,29 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionDeleteDataPath6 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5, String path6) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionDeleteDataPath6.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4, String path5, String path6) + throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -28,7 +41,7 @@ class ActionDeleteDataPath6 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -39,8 +52,11 @@ class ActionDeleteDataPath6 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionDeleteDataPath6$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = 7941846151868616132L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath7.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath7.java index 8fbf508fd7..ac803f876a 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath7.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionDeleteDataPath7.java @@ -6,16 +6,29 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionDeleteDataPath7 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5, String path6, String path7) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionDeleteDataPath7.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4, String path5, String path6, + String path7) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -28,19 +41,22 @@ class ActionDeleteDataPath7 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() .deleteQuery(x_processplatform_service_processing.class, Applications.joinQueryUri("applicationdict", - id, path0, path1, path2, path3, path4, path5, path6, path7,"data"), id) + id, path0, path1, path2, path3, path4, path5, path6, path7, "data"), id) .getData(Wo.class); result.setData(wo); return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionDeleteDataPath7$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -1834410172292232379L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGet.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGet.java index c5174d2e86..a86a4791c2 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGet.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGet.java @@ -9,6 +9,7 @@ import com.x.base.core.entity.JpaObject; import com.x.base.core.project.annotation.FieldDescribe; import com.x.base.core.project.bean.WrapCopier; import com.x.base.core.project.bean.WrapCopierFactory; +import com.x.base.core.project.exception.ExceptionEntityExist; import com.x.base.core.project.http.ActionResult; import com.x.base.core.project.http.EffectivePerson; import com.x.base.core.project.logger.Logger; @@ -17,12 +18,18 @@ import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.ApplicationDict; +import io.swagger.v3.oas.annotations.media.Schema; + class ActionGet extends BaseAction { - private static Logger logger = LoggerFactory.getLogger(ActionGet.class); + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGet.class); ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { ActionResult result = new ActionResult<>(); Business business = new Business(emc); @@ -33,7 +40,7 @@ class ActionGet extends BaseAction { String id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } ApplicationDict dict = emc.find(id, ApplicationDict.class); Wo wo = Wo.copier.copy(dict); @@ -43,12 +50,16 @@ class ActionGet extends BaseAction { } } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionGet$Wo") public static class Wo extends ApplicationDict { + private static final long serialVersionUID = 9053835173356135926L; + static WrapCopier copier = WrapCopierFactory.wo(ApplicationDict.class, Wo.class, null, JpaObject.FieldsInvisible); - @FieldDescribe("字典数据") + @FieldDescribe("字典数据.") + @Schema(description = "字典数据.") private JsonElement data; public JsonElement getData() { diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetData.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetData.java index 5fa2ee3b45..98e37aee82 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetData.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetData.java @@ -5,15 +5,26 @@ import org.apache.commons.lang3.StringUtils; import com.google.gson.JsonElement; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; +import com.x.base.core.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.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.ApplicationDict; class ActionGetData extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGetData.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, + String applicationFlag) throws Exception { try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", + effectivePerson::getDistinguishedName, () -> applicationDictFlag, () -> applicationFlag); + ActionResult result = new ActionResult<>(); Business business = new Business(emc); Application application = business.application().pick(applicationFlag); @@ -23,7 +34,7 @@ class ActionGetData extends BaseAction { String id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } ApplicationDict dict = emc.find(id, ApplicationDict.class); JsonElement wrap = this.get(business, dict); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath0.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath0.java index a1653da36a..7ab6e6bd95 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath0.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath0.java @@ -5,15 +5,25 @@ import org.apache.commons.lang3.StringUtils; import com.google.gson.JsonElement; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; +import com.x.base.core.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.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.ApplicationDict; class ActionGetDataPath0 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0) - throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGetDataPath0.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, + String applicationFlag, String path0) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); ActionResult result = new ActionResult<>(); @@ -24,7 +34,7 @@ class ActionGetDataPath0 extends BaseAction { String id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } ApplicationDict dict = emc.find(id, ApplicationDict.class); JsonElement wrap = this.get(business, dict, path0); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath1.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath1.java index a1ddf82137..113617789c 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath1.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath1.java @@ -5,15 +5,25 @@ import org.apache.commons.lang3.StringUtils; import com.google.gson.JsonElement; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; +import com.x.base.core.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.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.ApplicationDict; class ActionGetDataPath1 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1) - throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGetDataPath1.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, + String applicationFlag, String path0, String path1) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); ActionResult result = new ActionResult<>(); @@ -24,7 +34,7 @@ class ActionGetDataPath1 extends BaseAction { String id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } ApplicationDict dict = emc.find(id, ApplicationDict.class); JsonElement wrap = this.get(business, dict, path0, path1); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath2.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath2.java index 5862fa46ee..6a17febb6b 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath2.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath2.java @@ -5,15 +5,25 @@ import org.apache.commons.lang3.StringUtils; import com.google.gson.JsonElement; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; +import com.x.base.core.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.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.ApplicationDict; class ActionGetDataPath2 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGetDataPath2.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, + String applicationFlag, String path0, String path1, String path2) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { ActionResult result = new ActionResult<>(); Business business = new Business(emc); @@ -24,7 +34,7 @@ class ActionGetDataPath2 extends BaseAction { String id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } ApplicationDict dict = emc.find(id, ApplicationDict.class); JsonElement wrap = this.get(business, dict, path0, path1, path2); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath3.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath3.java index 630f31d454..30d56e2b89 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath3.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath3.java @@ -5,15 +5,25 @@ import org.apache.commons.lang3.StringUtils; import com.google.gson.JsonElement; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; +import com.x.base.core.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.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.ApplicationDict; class ActionGetDataPath3 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGetDataPath3.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, + String applicationFlag, String path0, String path1, String path2, String path3) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); ActionResult result = new ActionResult<>(); @@ -24,7 +34,7 @@ class ActionGetDataPath3 extends BaseAction { String id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } ApplicationDict dict = emc.find(id, ApplicationDict.class); JsonElement wrap = this.get(business, dict, path0, path1, path2, path3); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath4.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath4.java index 54ff606381..f241a5f588 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath4.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath4.java @@ -5,15 +5,26 @@ import org.apache.commons.lang3.StringUtils; import com.google.gson.JsonElement; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; +import com.x.base.core.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.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.ApplicationDict; class ActionGetDataPath4 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGetDataPath4.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, + String applicationFlag, String path0, String path1, String path2, String path3, String path4) + throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { ActionResult result = new ActionResult<>(); Business business = new Business(emc); @@ -24,7 +35,7 @@ class ActionGetDataPath4 extends BaseAction { String id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } ApplicationDict dict = emc.find(id, ApplicationDict.class); JsonElement wrap = this.get(business, dict, path0, path1, path2, path3, path4); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath5.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath5.java index acf11a656c..8c7cb8d2e8 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath5.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath5.java @@ -5,15 +5,26 @@ import org.apache.commons.lang3.StringUtils; import com.google.gson.JsonElement; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; +import com.x.base.core.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.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.ApplicationDict; class ActionGetDataPath5 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGetDataPath5.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, + String applicationFlag, String path0, String path1, String path2, String path3, String path4, String path5) + throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { ActionResult result = new ActionResult<>(); Business business = new Business(emc); @@ -24,7 +35,7 @@ class ActionGetDataPath5 extends BaseAction { String id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } ApplicationDict dict = emc.find(id, ApplicationDict.class); JsonElement wrap = this.get(business, dict, path0, path1, path2, path3, path4, path5); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath6.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath6.java index 75dcbf6e65..5004230a57 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath6.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath6.java @@ -5,15 +5,26 @@ import org.apache.commons.lang3.StringUtils; import com.google.gson.JsonElement; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; +import com.x.base.core.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.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.ApplicationDict; class ActionGetDataPath6 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5, String path6) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGetDataPath6.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, + String applicationFlag, String path0, String path1, String path2, String path3, String path4, String path5, + String path6) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { ActionResult result = new ActionResult<>(); Business business = new Business(emc); @@ -24,7 +35,7 @@ class ActionGetDataPath6 extends BaseAction { String id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } ApplicationDict dict = emc.find(id, ApplicationDict.class); JsonElement wrap = this.get(business, dict, path0, path1, path2, path3, path4, path5, path6); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath7.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath7.java index d2dad60fb1..9360dc3266 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath7.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionGetDataPath7.java @@ -5,15 +5,26 @@ import org.apache.commons.lang3.StringUtils; import com.google.gson.JsonElement; import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; +import com.x.base.core.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.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.ApplicationDict; class ActionGetDataPath7 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5, String path6, String path7) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionGetDataPath7.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, + String applicationFlag, String path0, String path1, String path2, String path3, String path4, String path5, + String path6, String path7) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { ActionResult result = new ActionResult<>(); Business business = new Business(emc); @@ -24,7 +35,7 @@ class ActionGetDataPath7 extends BaseAction { String id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } ApplicationDict dict = emc.find(id, ApplicationDict.class); JsonElement wrap = this.get(business, dict, path0, path1, path2, path3, path4, path5, path6, path7); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionListWithApplication.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionListWithApplication.java index 1bc4b8af2a..c7dd8d0f03 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionListWithApplication.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionListWithApplication.java @@ -9,14 +9,24 @@ import com.x.base.core.entity.JpaObject; import com.x.base.core.project.bean.WrapCopier; import com.x.base.core.project.bean.WrapCopierFactory; import com.x.base.core.project.http.ActionResult; +import com.x.base.core.project.http.EffectivePerson; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.base.core.project.tools.SortTools; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.core.entity.element.Application; import com.x.processplatform.core.entity.element.ApplicationDict; +import io.swagger.v3.oas.annotations.media.Schema; + class ActionListWithApplication extends BaseAction { - ActionResult> execute(String applicationFlag) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionListWithApplication.class); + + ActionResult> execute(EffectivePerson effectivePerson, String applicationFlag) throws Exception { + + LOGGER.debug("execute:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, () -> applicationFlag); + try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { Business business = new Business(emc); ActionResult> result = new ActionResult<>(); @@ -33,8 +43,11 @@ class ActionListWithApplication extends BaseAction { } } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionListWithApplication$Wo") public static class Wo extends ApplicationDict { + private static final long serialVersionUID = 1366579178082784176L; + static WrapCopier copier = WrapCopierFactory.wo(ApplicationDict.class, Wo.class, null, JpaObject.FieldsInvisible); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdate.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdate.java deleted file mode 100644 index 6f65338e6f..0000000000 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdate.java +++ /dev/null @@ -1,75 +0,0 @@ -//package com.x.processplatform.assemble.surface.jaxrs.applicationdict; -// -//import org.apache.commons.lang3.StringUtils; -// -//import com.google.gson.JsonElement; -//import com.x.base.core.container.EntityManagerContainer; -//import com.x.base.core.container.factory.EntityManagerContainerFactory; -//import com.x.base.core.entity.JpaObject; -//import com.x.base.core.entity.annotation.CheckPersistType; -//import com.x.base.core.project.annotation.FieldDescribe; -//import com.x.base.core.project.cache.ApplicationCache; -//import com.x.base.core.project.http.ActionResult; -//import com.x.base.core.project.http.EffectivePerson; -//import com.x.base.core.project.jaxrs.WoId; -//import com.x.processplatform.assemble.surface.Business; -//import com.x.processplatform.core.entity.element.Application; -//import com.x.processplatform.core.entity.element.ApplicationDict; -// -//class ActionUpdate extends BaseAction { -// -// ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, -// JsonElement jsonElement) throws Exception { -// try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { -// ActionResult result = new ActionResult<>(); -// Wi wi = this.convertToWrapIn(jsonElement, Wi.class); -// Business business = new Business(emc); -// Application application = business.application().pick(applicationFlag); -// if (null == application) { -// throw new ExceptionApplicationNotExist(applicationFlag); -// } -// String id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), -// applicationDictFlag); -// if (StringUtils.isEmpty(id)) { -// throw new ExceptionApplicationDictNotExist(applicationFlag); -// } -// ApplicationDict dict = emc.find(id, ApplicationDict.class); -// if (!business.application().allowControl(effectivePerson, application)) { -// throw new ExceptionAccessDenied(effectivePerson.getDistinguishedName()); -// } -// emc.beginTransaction(ApplicationDict.class); -// wi.copyTo(dict, JpaObject.id_FIELDNAME, JpaObject.distributeFactor_FIELDNAME, -// ApplicationDict.application_FIELDNAME); -// emc.check(dict, CheckPersistType.all); -// this.update(business, dict, wi.getData()); -// emc.commit(); -// /* 这个Action是更新ApplicationDict需要刷新缓存 */ -// ApplicationCache.notify(ApplicationDict.class); -// Wo wo = new Wo(); -// wo.setId(dict.getId()); -// result.setData(wo); -// return result; -// } -// } -// -// public static class Wo extends WoId { -// -// } -// -// public class Wi extends ApplicationDict { -// -// private static final long serialVersionUID = 6419951244780354684L; -// -// @FieldDescribe("写入数据") -// private JsonElement data; -// -// public JsonElement getData() { -// return data; -// } -// -// public void setData(JsonElement data) { -// this.data = data; -// } -// } -// -//} diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath0.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath0.java index 65eb5af766..5e78575d67 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath0.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath0.java @@ -7,16 +7,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionUpdateDataPath0 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, JsonElement jsonElement) - throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionUpdateDataPath0.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +41,7 @@ class ActionUpdateDataPath0 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -40,7 +52,10 @@ class ActionUpdateDataPath0 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionUpdateDataPath0$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = 645085806214663459L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath1.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath1.java index 02f48f2063..383397f62b 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath1.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath1.java @@ -7,16 +7,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionUpdateDataPath1 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - JsonElement jsonElement) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionUpdateDataPath1.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +41,7 @@ class ActionUpdateDataPath1 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -40,7 +52,10 @@ class ActionUpdateDataPath1 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionUpdateDataPath1$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = 2020958048405524359L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath2.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath2.java index 0aa0cf330c..ad87c8fc1d 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath2.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath2.java @@ -7,16 +7,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionUpdateDataPath2 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, JsonElement jsonElement) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionUpdateDataPath2.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +41,7 @@ class ActionUpdateDataPath2 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -40,7 +52,10 @@ class ActionUpdateDataPath2 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionUpdateDataPath2$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = 8267906706474551998L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath3.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath3.java index 48a94f1365..f693465ffc 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath3.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath3.java @@ -7,16 +7,28 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionUpdateDataPath3 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, JsonElement jsonElement) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionUpdateDataPath3.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +41,7 @@ class ActionUpdateDataPath3 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications().putQuery(x_processplatform_service_processing.class, @@ -39,7 +51,10 @@ class ActionUpdateDataPath3 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionUpdateDataPath3$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = 697770826824309869L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath4.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath4.java index f768108184..de96d067f6 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath4.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath4.java @@ -7,16 +7,29 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionUpdateDataPath4 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, JsonElement jsonElement) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionUpdateDataPath4.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4, JsonElement jsonElement) + throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +42,7 @@ class ActionUpdateDataPath4 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -40,8 +53,11 @@ class ActionUpdateDataPath4 extends BaseAction { result.setData(wo); return result; } - + + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionUpdateDataPath4$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -8175453043074514575L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath5.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath5.java index a1ddefa3ae..5eb3ed8043 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath5.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath5.java @@ -7,16 +7,29 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionUpdateDataPath5 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5, JsonElement jsonElement) throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionUpdateDataPath5.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4, String path5, JsonElement jsonElement) + throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -29,7 +42,7 @@ class ActionUpdateDataPath5 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications().putQuery(x_processplatform_service_processing.class, @@ -39,7 +52,10 @@ class ActionUpdateDataPath5 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionUpdateDataPath5$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -6259690907701359413L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath6.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath6.java index a95fec6c5e..1566be0a1c 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath6.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath6.java @@ -7,17 +7,29 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionUpdateDataPath6 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5, String path6, JsonElement jsonElement) - throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionUpdateDataPath6.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4, String path5, String path6, + JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -30,7 +42,7 @@ class ActionUpdateDataPath6 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -41,7 +53,10 @@ class ActionUpdateDataPath6 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionUpdateDataPath6$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = -4875568296393940440L; + } } \ No newline at end of file diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath7.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath7.java index 19b04dd24c..09e37df20e 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath7.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ActionUpdateDataPath7.java @@ -7,17 +7,29 @@ import com.x.base.core.container.EntityManagerContainer; import com.x.base.core.container.factory.EntityManagerContainerFactory; import com.x.base.core.project.Applications; import com.x.base.core.project.x_processplatform_service_processing; +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.WoId; +import com.x.base.core.project.logger.Logger; +import com.x.base.core.project.logger.LoggerFactory; import com.x.processplatform.assemble.surface.Business; import com.x.processplatform.assemble.surface.ThisApplication; import com.x.processplatform.core.entity.element.Application; +import com.x.processplatform.core.entity.element.ApplicationDict; + +import io.swagger.v3.oas.annotations.media.Schema; class ActionUpdateDataPath7 extends BaseAction { - ActionResult execute(String applicationDictFlag, String applicationFlag, String path0, String path1, - String path2, String path3, String path4, String path5, String path6, String path7, JsonElement jsonElement) - throws Exception { + private static final Logger LOGGER = LoggerFactory.getLogger(ActionUpdateDataPath7.class); + + ActionResult execute(EffectivePerson effectivePerson, String applicationDictFlag, String applicationFlag, + String path0, String path1, String path2, String path3, String path4, String path5, String path6, + String path7, JsonElement jsonElement) throws Exception { + + LOGGER.debug("execute:{}, applicationDictFlag:{}, applicationFlag:{}.", effectivePerson::getDistinguishedName, + () -> applicationDictFlag, () -> applicationFlag); ActionResult result = new ActionResult<>(); String id = null; @@ -30,7 +42,7 @@ class ActionUpdateDataPath7 extends BaseAction { } id = business.applicationDict().getWithApplicationWithUniqueName(application.getId(), applicationDictFlag); if (StringUtils.isEmpty(id)) { - throw new ExceptionApplicationDictNotExist(applicationFlag); + throw new ExceptionEntityExist(applicationFlag, ApplicationDict.class); } } Wo wo = ThisApplication.context().applications() @@ -41,7 +53,10 @@ class ActionUpdateDataPath7 extends BaseAction { return result; } + @Schema(name = "com.x.processplatform.assemble.surface.jaxrs.applicationdict.ActionUpdateDataPath7$Wo") public static class Wo extends WoId { + private static final long serialVersionUID = 8465151407186021398L; + } } \ No newline at end of file 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 85105854cb..e29fe659dc 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 @@ -67,7 +67,7 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult> result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionListWithApplication().execute(applicationFlag); + result = new ActionListWithApplication().execute(effectivePerson, applicationFlag); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -86,7 +86,7 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionGetData().execute(applicationDictFlag, applicationFlag); + result = new ActionGetData().execute(effectivePerson, applicationDictFlag, applicationFlag); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -106,7 +106,7 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionGetDataPath0().execute(applicationDictFlag, applicationFlag, path0); + result = new ActionGetDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -127,7 +127,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionGetDataPath1().execute(applicationDictFlag, applicationFlag, path0, path1); + result = new ActionGetDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -149,7 +150,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionGetDataPath2().execute(applicationDictFlag, applicationFlag, path0, path1, path2); + result = new ActionGetDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -172,7 +174,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionGetDataPath3().execute(applicationDictFlag, applicationFlag, path0, path1, path2, path3); + result = new ActionGetDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -196,8 +199,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionGetDataPath4().execute(applicationDictFlag, applicationFlag, path0, path1, path2, path3, - path4); + result = new ActionGetDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -222,8 +225,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionGetDataPath5().execute(applicationDictFlag, applicationFlag, path0, path1, path2, path3, - path4, path5); + result = new ActionGetDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -249,8 +252,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionGetDataPath6().execute(applicationDictFlag, applicationFlag, path0, path1, path2, path3, - path4, path5, path6); + result = new ActionGetDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, path6); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -277,8 +280,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionGetDataPath7().execute(applicationDictFlag, applicationFlag, path0, path1, path2, path3, - path4, path5, path6, path7); + result = new ActionGetDataPath7().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, path6, path7); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -298,7 +301,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath0().execute(applicationDictFlag, applicationFlag, path0, jsonElement); + result = new ActionUpdateDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -319,7 +323,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath0().execute(applicationDictFlag, applicationFlag, path0, jsonElement); + result = new ActionUpdateDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -340,8 +345,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath1().execute(applicationDictFlag, applicationFlag, path0, path1, - jsonElement); + result = new ActionUpdateDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -363,8 +368,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath1().execute(applicationDictFlag, applicationFlag, path0, path1, - jsonElement); + result = new ActionUpdateDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -386,8 +391,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath2().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - jsonElement); + result = new ActionUpdateDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -410,8 +415,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath2().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - jsonElement); + result = new ActionUpdateDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -434,8 +439,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath3().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, jsonElement); + result = new ActionUpdateDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -459,8 +464,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath3().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, jsonElement); + result = new ActionUpdateDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -484,8 +489,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath4().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, jsonElement); + result = new ActionUpdateDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -510,8 +515,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath4().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, jsonElement); + result = new ActionUpdateDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -536,8 +541,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath5().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, jsonElement); + result = new ActionUpdateDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -563,8 +568,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath5().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, jsonElement); + result = new ActionUpdateDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -590,8 +595,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath6().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, path6, jsonElement); + result = new ActionUpdateDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, path6, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -618,8 +623,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath6().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, path6, jsonElement); + result = new ActionUpdateDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, path6, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -646,8 +651,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath7().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, path6, path7, jsonElement); + 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); result.error(e); @@ -675,8 +680,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionUpdateDataPath7().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, path6, path7, jsonElement); + 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); result.error(e); @@ -696,7 +701,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionCreateDataPath0().execute(applicationDictFlag, applicationFlag, path0, jsonElement); + result = new ActionCreateDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -717,8 +723,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionCreateDataPath1().execute(applicationDictFlag, applicationFlag, path0, path1, - jsonElement); + result = new ActionCreateDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -740,8 +746,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionCreateDataPath2().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - jsonElement); + result = new ActionCreateDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -764,8 +770,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionCreateDataPath3().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, jsonElement); + result = new ActionCreateDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -789,8 +795,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionCreateDataPath4().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, jsonElement); + result = new ActionCreateDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -815,8 +821,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionCreateDataPath5().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, jsonElement); + result = new ActionCreateDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -842,8 +848,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionCreateDataPath6().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, path6, jsonElement); + result = new ActionCreateDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, path6, jsonElement); } catch (Exception e) { logger.error(e, effectivePerson, request, jsonElement); result.error(e); @@ -870,8 +876,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionCreateDataPath7().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, path6, path7, jsonElement); + 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); result.error(e); @@ -891,7 +897,7 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath0().execute(applicationDictFlag, applicationFlag, path0); + result = new ActionDeleteDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -912,7 +918,7 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath0().execute(applicationDictFlag, applicationFlag, path0); + result = new ActionDeleteDataPath0().execute(effectivePerson, applicationDictFlag, applicationFlag, path0); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -933,7 +939,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath1().execute(applicationDictFlag, applicationFlag, path0, path1); + result = new ActionDeleteDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -955,7 +962,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath1().execute(applicationDictFlag, applicationFlag, path0, path1); + result = new ActionDeleteDataPath1().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -977,7 +985,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath2().execute(applicationDictFlag, applicationFlag, path0, path1, path2); + result = new ActionDeleteDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -1000,7 +1009,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath2().execute(applicationDictFlag, applicationFlag, path0, path1, path2); + result = new ActionDeleteDataPath2().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -1023,8 +1033,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath3().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3); + result = new ActionDeleteDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -1048,8 +1058,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath3().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3); + result = new ActionDeleteDataPath3().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -1073,8 +1083,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath4().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4); + result = new ActionDeleteDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -1099,8 +1109,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath4().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4); + result = new ActionDeleteDataPath4().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -1125,8 +1135,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath5().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5); + result = new ActionDeleteDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -1152,8 +1162,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath5().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5); + result = new ActionDeleteDataPath5().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -1179,8 +1189,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath6().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, path6); + result = new ActionDeleteDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, path6); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -1207,8 +1217,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath6().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, path6); + result = new ActionDeleteDataPath6().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, path6); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -1235,8 +1245,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath7().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, path6, path7); + result = new ActionDeleteDataPath7().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, path6, path7); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); @@ -1264,8 +1274,8 @@ public class ApplicationDictAction extends StandardJaxrsAction { ActionResult result = new ActionResult<>(); EffectivePerson effectivePerson = this.effectivePerson(request); try { - result = new ActionDeleteDataPath7().execute(applicationDictFlag, applicationFlag, path0, path1, path2, - path3, path4, path5, path6, path7); + result = new ActionDeleteDataPath7().execute(effectivePerson, applicationDictFlag, applicationFlag, path0, + path1, path2, path3, path4, path5, path6, path7); } catch (Exception e) { logger.error(e, effectivePerson, request, null); result.error(e); diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ExceptionAccessDenied.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ExceptionAccessDenied.java deleted file mode 100644 index 12cee8953b..0000000000 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ExceptionAccessDenied.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.x.processplatform.assemble.surface.jaxrs.applicationdict; - -import com.x.base.core.project.exception.PromptException; - -class ExceptionAccessDenied extends PromptException { - - private static final long serialVersionUID = -5954915325716358186L; - - ExceptionAccessDenied(String name) { - super("用户:" + name + ", 没有足够的权限."); - } - -} diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ExceptionApplicationDictNotExist.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ExceptionApplicationDictNotExist.java deleted file mode 100644 index a8272b4b5b..0000000000 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/applicationdict/ExceptionApplicationDictNotExist.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.x.processplatform.assemble.surface.jaxrs.applicationdict; - -import com.x.base.core.project.exception.LanguagePromptException; - -class ExceptionApplicationDictNotExist extends LanguagePromptException { - - private static final long serialVersionUID = -5954915325716358186L; - - ExceptionApplicationDictNotExist(String flag) { - super("标识为:{}, 的数据字典不存在", flag); - } - -} 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 bea973f2b7..15593ca7a8 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 @@ -139,6 +139,9 @@ class ActionGetWorkOrWorkCompleted extends BaseAction { 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())) { diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/data/ActionUpdateWithWorkCompleted.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/data/ActionUpdateWithWorkCompleted.java index 9768def530..0d722aedbb 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/data/ActionUpdateWithWorkCompleted.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/data/ActionUpdateWithWorkCompleted.java @@ -39,8 +39,8 @@ class ActionUpdateWithWorkCompleted extends BaseAction { /** 允许创建者在完成后再次修改内容,与前台的可修改不一致,所以单独判断,为的是不影响前台显示. */ Application application = business.application().pick(workCompleted.getApplication()); Process process = business.process().pick(workCompleted.getProcess()); - if (!business.canManageApplicationOrProcess(effectivePerson, application, process) - && (!effectivePerson.isPerson(workCompleted.getCreatorPerson()))) { + if (BooleanUtils.isFalse(business.canManageApplicationOrProcess(effectivePerson, application, process)) + && BooleanUtils.isFalse(effectivePerson.isPerson(workCompleted.getCreatorPerson()))) { throw new ExceptionWorkCompletedAccessDenied(effectivePerson.getDistinguishedName(), workCompleted.getTitle(), workCompleted.getId()); } @@ -62,5 +62,7 @@ class ActionUpdateWithWorkCompleted extends BaseAction { } public static class WoControl extends WorkControl { + + private static final long serialVersionUID = 3730372100337710055L; } } diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionCountWithPerson.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionCountWithPerson.java index c9c1de1306..fd227013d8 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionCountWithPerson.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/read/ActionCountWithPerson.java @@ -28,6 +28,7 @@ class ActionCountWithPerson extends BaseAction { public static class Wo extends GsonPropertyObject { + private static final long serialVersionUID = -4242925327577316593L; @FieldDescribe("待阅数量") private Long count = 0L; diff --git a/o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkCompleted.java b/o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkCompleted.java index 84131439ad..68e40838de 100644 --- a/o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkCompleted.java +++ b/o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/WorkCompleted.java @@ -43,6 +43,8 @@ public class WorkCompleted extends SliceJpaObject implements ProjectionInterface private static final long serialVersionUID = 8340732901486828267L; private static final String TABLE = PersistenceProperties.Content.WorkCompleted.table; + public static final String TITLEALIAS_SUBJECT = "subject"; + public String getId() { return id; } 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 ea43d6756f..119a349f14 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 @@ -140,7 +140,7 @@ public class WorkLogTree { } } - /* 查找最近的人工几点,过滤所有 */ + // 查找最近的人工节点,过滤所有 public Nodes downNextManual() { Nodes nodes = new Nodes(); for (Node o : this.children) { diff --git a/o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/anonymous/ActionReadCountWithPersonWo.java b/o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/anonymous/ActionReadCountWithPersonWo.java new file mode 100644 index 0000000000..901881a988 --- /dev/null +++ b/o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/anonymous/ActionReadCountWithPersonWo.java @@ -0,0 +1,24 @@ +package com.x.processplatform.core.express.assemble.surface.jaxrs.anonymous; + +import com.x.base.core.project.annotation.FieldDescribe; +import com.x.base.core.project.gson.GsonPropertyObject; + +import io.swagger.v3.oas.annotations.media.Schema; + +public class ActionReadCountWithPersonWo extends GsonPropertyObject { + + private static final long serialVersionUID = 8792811593252273112L; + + @FieldDescribe("待阅数量.") + @Schema(description = "待阅数量.") + private Long count = 0L; + + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + +} \ No newline at end of file diff --git a/o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/anonymous/ActionTaskCountWithPersonWo.java b/o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/anonymous/ActionTaskCountWithPersonWo.java new file mode 100644 index 0000000000..79617abf85 --- /dev/null +++ b/o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/anonymous/ActionTaskCountWithPersonWo.java @@ -0,0 +1,24 @@ +package com.x.processplatform.core.express.assemble.surface.jaxrs.anonymous; + +import com.x.base.core.project.annotation.FieldDescribe; +import com.x.base.core.project.gson.GsonPropertyObject; + +import io.swagger.v3.oas.annotations.media.Schema; + +public class ActionTaskCountWithPersonWo extends GsonPropertyObject { + + private static final long serialVersionUID = 8792811593252273112L; + + @FieldDescribe("待办数量.") + @Schema(description = "待办数量.") + private Long count = 0L; + + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + +} \ No newline at end of file diff --git a/o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/application/ActionGetIconWo.java b/o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/application/ActionGetIconWo.java new file mode 100644 index 0000000000..2bb0a5961d --- /dev/null +++ b/o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/assemble/surface/jaxrs/application/ActionGetIconWo.java @@ -0,0 +1,36 @@ +package com.x.processplatform.core.express.assemble.surface.jaxrs.application; + +import com.x.base.core.project.annotation.FieldDescribe; +import com.x.base.core.project.gson.GsonPropertyObject; + +import io.swagger.v3.oas.annotations.media.Schema; + +public class ActionGetIconWo extends GsonPropertyObject { + + private static final long serialVersionUID = 2554440356814790897L; + + @FieldDescribe("应用图标base64编码值.") + @Schema(description = "应用图标base64编码值.") + private String icon; + + @FieldDescribe("应用图标色调.") + @Schema(description = "应用图标色调.") + private String iconHue; + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public String getIconHue() { + return iconHue; + } + + public void setIconHue(String iconHue) { + this.iconHue = iconHue; + } + +} \ No newline at end of file diff --git a/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/data/BaseAction.java b/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/data/BaseAction.java index fcbbca4f39..8253d453e2 100644 --- a/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/data/BaseAction.java +++ b/o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/data/BaseAction.java @@ -42,8 +42,6 @@ abstract class BaseAction extends StandardJaxrsAction { private static final Logger LOGGER = LoggerFactory.getLogger(BaseAction.class); - protected Gson gson = XGsonBuilder.instance(); - JsonElement getData(Business business, String job, String... paths) throws Exception { JsonElement jsonElement = null; List list = business.item().listWithJobWithPath(job, paths); @@ -93,6 +91,9 @@ abstract class BaseAction extends StandardJaxrsAction { // 将data中的Title 和 serial 字段同步到work中 void updateTitleSerial(Business business, WorkCompleted workCompleted, JsonElement jsonElement) throws Exception { String title = XGsonBuilder.extractString(jsonElement, WorkCompleted.title_FIELDNAME); + if (StringUtils.isBlank(title)) { + title = XGsonBuilder.extractString(jsonElement, WorkCompleted.TITLEALIAS_SUBJECT); + } String serial = XGsonBuilder.extractString(jsonElement, WorkCompleted.serial_FIELDNAME); // 如果有数据就将数据覆盖到work task taskCompleted read readCompleted review 中 if ((StringUtils.isNotBlank(title) && (!Objects.equals(title, workCompleted.getTitle()))) -- GitLab