From 292b800a6a3e7aed7834e93dd90f3cf56a6dbac2 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 22 Apr 2022 14:29:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E6=99=B0=E7=82=B9=E7=9A=84=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E5=AE=A1=E6=89=B9=E6=B5=81=E7=A8=8B=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processForm/listener/CorrectionListener.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 dd555adc..ac61e62c 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 @@ -48,6 +48,7 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti @Override public void notify(DelegateTask delegateTask) { + logger.info("-------------------------进入部门动态审批人流程-------------------------------"); Map kv = delegateTask.getVariables(); Gson gson = new Gson(); JsonElement jsonElement = gson.toJsonTree(kv); @@ -55,10 +56,12 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti SysRoleDTO roleDTO = sysRoleService.getByName(roleName); logger.info("roleDTOId:" + roleDTO.getId()); - - logger.info("abilityApplicationDTO:" + abilityApplicationDTO.toString()); - ResourceDTO resourceEntityDto = resourceService.get(Long.valueOf(abilityApplicationDTO.getResourceId())); + ResourceDTO resourceEntityDto = null; Long deptId = null; + if (abilityApplicationDTO != null) { + logger.info("abilityApplicationDTO:" + abilityApplicationDTO.toString()); + resourceEntityDto = resourceService.get(Long.valueOf(abilityApplicationDTO.getResourceId())); + } if (resourceEntityDto != null && resourceEntityDto.getDeptId() != null) { deptId = resourceEntityDto.getDeptId(); } else { @@ -74,14 +77,14 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti if (deptId != null) { userDTO = sysUserService.getByDeptIdAndRoleId(deptId, roleDTO.getId()); // 搜出审批人 } - - delegateTask.setAssignee("1513432847327199233"); if (userDTO != null) { logger.info("审批人id:" + userDTO.getId()); taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString()); } else { - logger.info("未查到该部门对应 " + roleName); + logger.info("未查到该部门对应的 " + roleName); + taskService.setAssignee(delegateTask.getId(), "1513432847327199233"); } + logger.info("-------------------------结束部门动态审批人流程-------------------------------"); } @Override