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 450a6b0e..af77b410 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 @@ -148,10 +148,13 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti sysDeptService.get(resourceEntityDto.getDeptId()); if (deptDTO != null && deptDTO.getName().equals(bigDateDeptName)) { logger.error("第二级别审批仍然为 " + bigDateDeptName); + SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptId, roleDTO.getId()); // 搜出审批人 + if (userDTO != null) { + taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString()); + } taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "默认通过"); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); return; -// endTake(delegateTask.getVariables()); } } else { logger.error("表单内单位名称:" + abilityApplicationDTO.getUnit()); @@ -173,16 +176,17 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti logger.error("未查到该部门对应的 " + roleName); taskService.setAssignee(delegateTask.getId(), "1516728698224427010"); } + mpComplete(abilityApplicationDTO, delegateTask); + } + private void mpComplete(TAbilityApplicationDTO abilityApplicationDTO, DelegateTask delegateTask) { Optional resourceDTOOptional = Optional.ofNullable(resourceService.get(Long.valueOf(abilityApplicationDTO.getResourceId()))); resourceDTOOptional.ifPresent(resource -> { if ("免批申请".equals(resource.getShareCondition())) { // 针对免批资源申请 taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "免批资源申请默认通过"); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); -// endTake(delegateTask.getVariables()); } }); - } private void complete(DelegateTask delegateTask) {