From 4a94caddd3996c11855e8ed55907dd488873f65c Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 6 May 2022 20:32:36 +0800 Subject: [PATCH 1/3] ... --- .../modules/resource/service/impl/ResourceServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index 446db103..626a9654 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -77,7 +77,10 @@ public class ResourceServiceImpl extends CrudServiceImpl Date: Fri, 6 May 2022 20:33:48 +0800 Subject: [PATCH 2/3] ... --- .../modules/resource/service/impl/ResourceServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index 626a9654..2dd7d33b 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -79,7 +79,7 @@ public class ResourceServiceImpl extends CrudServiceImpl Date: Sat, 7 May 2022 10:18:39 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=89=80=E6=9C=89?= =?UTF-8?q?=E8=80=85=E5=AE=A1=E6=A0=B8=E9=80=9A=E8=BF=87=E5=90=8E=20?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=94=B3=E8=AF=B7=E5=AE=A1=E6=A0=B8=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AbilityCenterController.java | 3 ++ .../dto/TAbilityApplicationDTO.java | 6 ++++ .../dto/TAbilityBatchApplicationDTO.java | 6 ++++ .../entity/TAbilityApplicationEntity.java | 9 +++++ .../listener/CorrectionListener.java | 35 +++++++++++++++---- .../src/main/resources/assembly/assembly.xml | 5 --- 6 files changed, 53 insertions(+), 11 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java index b3880a3e..20bbcc25 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java @@ -81,6 +81,9 @@ public class AbilityCenterController { tAbilityApplicationDTO.setUser(abilityBatchApplicationDTO.getUser()); tAbilityApplicationDTO.setSystem(index.get("resourceName")); tAbilityApplicationDTO.setEnclosure(abilityBatchApplicationDTO.getEnclosure()); // 附件 + tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId()); + tAbilityApplicationDTO.setApproveStatus("审核中"); + tAbilityApplicationDTO.setDelFlag(0); // 仿照请求接口 /processForm/tabilityapplication ValidatorUtils.validateEntity(tAbilityApplicationDTO, AddGroup.class, DefaultGroup.class); tAbilityApplicationService.save(tAbilityApplicationDTO); // 写能力申请数据 diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java index 19b22051..48fcc350 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityApplicationDTO.java @@ -42,6 +42,12 @@ public class TAbilityApplicationDTO implements Serializable { @ApiModelProperty(value = "用户id") private String userId; + @ApiModelProperty(value = "审核状态:审核中,通过,不通过") + private String approveStatus; + + @ApiModelProperty(value = "删除标记:0:正常使用;1:已删除;9:其他") + private Integer delFlag; + @ApiModelProperty(value = "附件") private String enclosure; diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java index 1ec3aaff..e5d54d1b 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java @@ -39,6 +39,12 @@ public class TAbilityBatchApplicationDTO implements Serializable { @ApiModelProperty(value = "用户id") private String userId; + @ApiModelProperty(value = "审核状态:审核中,通过,不通过") + private String approveStatus; + + @ApiModelProperty(value = "删除标记:0:正常使用;1:已删除;9:其他") + private Integer delFlag; + @ApiModelProperty(value = "附件") private String enclosure; } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java b/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java index dbb30d6e..5ceb42dc 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/entity/TAbilityApplicationEntity.java @@ -67,6 +67,15 @@ public class TAbilityApplicationEntity { */ private String userId; + /** + * 审核状态:审核中,通过,不通过 + */ + private String approveStatus; + + /** + * 删除标记:0:正常使用;1:已删除;9:其他 + */ + private Integer delFlag; /** * 附件 diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java index ef2b3809..82b6acbd 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java @@ -3,6 +3,7 @@ package io.renren.modules.processForm.listener; import com.google.gson.Gson; import com.google.gson.JsonElement; import io.renren.modules.processForm.dto.TAbilityApplicationDTO; +import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.service.ResourceService; import io.renren.modules.sys.dto.SysDeptDTO; @@ -49,6 +50,8 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti @Autowired private ResourceService resourceService; + @Autowired + private TAbilityApplicationService tAbilityApplicationService; @Override public void notify(DelegateTask delegateTask) { @@ -65,12 +68,14 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti @Override public void notify(DelegateExecution delegateExecution) throws Exception { -// logger.error("事件:" + delegateExecution.getEventName()); -// delegateExecution.getVariableNames().stream().forEach(index -> logger.error("variable:" + index)); -// delegateExecution.getVariables().values().stream().filter(index -> index != null).forEach(value -> logger.error(value.toString())); -// // taskService.setAssignee(delegateExecution.getProcessInstanceId(), "1516307964617076737");// 可以设置 -// -// logger.error("修改审批人成功!" + delegateExecution.getCurrentActivityId() + " " + delegateExecution.getProcessInstanceId() + " " + delegateExecution.getProcessBusinessKey()); + logger.error("----------------------进入部门审批结束节点---------------------------"); + delegateExecution.getProcessBusinessKey(); + final String eventName = delegateExecution.getEventName(); + switch (eventName) { + case EVENTNAME_END: + endTake(delegateExecution.getVariables()); + break; + } } @Override @@ -89,6 +94,24 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti logger.error("异常", delegateExecution); } + + /** + * 结束审批 + * + * @param kv + */ + private void endTake(Map kv) { // 进入最后结束节点 + Gson gson = new Gson(); + JsonElement jsonElement = gson.toJsonTree(kv); + TAbilityApplicationDTO abilityApplicationDTO = gson.fromJson(jsonElement, TAbilityApplicationDTO.class); + if (abilityApplicationDTO != null) { + abilityApplicationDTO.setDelFlag(0); + abilityApplicationDTO.setApproveStatus("通过"); + tAbilityApplicationService.update(abilityApplicationDTO); + logger.error("审批通过!申请id:" + abilityApplicationDTO.getId()); + } + } + /** * 节点创建时动态分配资源部门审核人 * diff --git a/renren-admin/src/main/resources/assembly/assembly.xml b/renren-admin/src/main/resources/assembly/assembly.xml index 525963e5..3915ee0a 100644 --- a/renren-admin/src/main/resources/assembly/assembly.xml +++ b/renren-admin/src/main/resources/assembly/assembly.xml @@ -43,11 +43,6 @@ true - - - - - src/main/resources