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 091d5b49..dd555adc 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 @@ -64,10 +64,16 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti } else { logger.info("表单内单位名称:" + abilityApplicationDTO.getUnit()); SysDeptDTO deptDTO = sysDeptService.getByName(abilityApplicationDTO.getUnit()); - logger.info("deptDTOId:" + deptDTO.getId()); - deptId = deptDTO.getId(); + if (deptDTO != null) { + logger.info("deptDTOId:" + deptDTO.getId()); + deptId = deptDTO.getId(); + } + + } + SysUserDTO userDTO = null; + if (deptId != null) { + userDTO = sysUserService.getByDeptIdAndRoleId(deptId, roleDTO.getId()); // 搜出审批人 } - SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptId, roleDTO.getId()); // 搜出审批人 delegateTask.setAssignee("1513432847327199233"); if (userDTO != null) {