清晰点的部门审批流程节点日志

This commit is contained in:
wangliwen 2022-04-22 14:29:11 +08:00
parent 93ffea6021
commit 292b800a6a
1 changed files with 9 additions and 6 deletions

View File

@ -48,6 +48,7 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
@Override @Override
public void notify(DelegateTask delegateTask) { public void notify(DelegateTask delegateTask) {
logger.info("-------------------------进入部门动态审批人流程-------------------------------");
Map<String, Object> kv = delegateTask.getVariables(); Map<String, Object> kv = delegateTask.getVariables();
Gson gson = new Gson(); Gson gson = new Gson();
JsonElement jsonElement = gson.toJsonTree(kv); JsonElement jsonElement = gson.toJsonTree(kv);
@ -55,10 +56,12 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
SysRoleDTO roleDTO = sysRoleService.getByName(roleName); SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
logger.info("roleDTOId:" + roleDTO.getId()); logger.info("roleDTOId:" + roleDTO.getId());
ResourceDTO resourceEntityDto = null;
logger.info("abilityApplicationDTO:" + abilityApplicationDTO.toString());
ResourceDTO resourceEntityDto = resourceService.get(Long.valueOf(abilityApplicationDTO.getResourceId()));
Long deptId = 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) { if (resourceEntityDto != null && resourceEntityDto.getDeptId() != null) {
deptId = resourceEntityDto.getDeptId(); deptId = resourceEntityDto.getDeptId();
} else { } else {
@ -74,14 +77,14 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
if (deptId != null) { if (deptId != null) {
userDTO = sysUserService.getByDeptIdAndRoleId(deptId, roleDTO.getId()); // 搜出审批人 userDTO = sysUserService.getByDeptIdAndRoleId(deptId, roleDTO.getId()); // 搜出审批人
} }
delegateTask.setAssignee("1513432847327199233");
if (userDTO != null) { if (userDTO != null) {
logger.info("审批人id:" + userDTO.getId()); logger.info("审批人id:" + userDTO.getId());
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString()); taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
} else { } else {
logger.info("未查到该部门对应 " + roleName); logger.info("未查到该部门对应的 " + roleName);
taskService.setAssignee(delegateTask.getId(), "1513432847327199233");
} }
logger.info("-------------------------结束部门动态审批人流程-------------------------------");
} }
@Override @Override