npe 管理员的部门id不存在的情况

This commit is contained in:
wangliwen 2022-05-10 16:17:05 +08:00
parent fd645cffeb
commit dd261257b8
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("/demand_v2/center") @RequestMapping("/demand_v2/center")
public class DemandDataController { public class DemandDataController {
private static Logger logger = LoggerFactory.getLogger(ResourceMountController.class); private static Logger logger = LoggerFactory.getLogger(DemandDataController.class);
@Autowired @Autowired
private ActProcessService actProcessService; private ActProcessService actProcessService;

View File

@ -119,7 +119,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
JsonElement jsonElement = gson.toJsonTree(kv); JsonElement jsonElement = gson.toJsonTree(kv);
TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class); TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class);
if (demandDataDTO != null) { if (demandDataDTO != null && demandDataDTO.getApplyUserDeptId() != null) {
logger.error(JSONObject.toJSONString(demandDataDTO)); logger.error(JSONObject.toJSONString(demandDataDTO));
SysDeptDTO deptDTO = SysDeptDTO deptDTO =
sysDeptService.get(Long.valueOf(demandDataDTO.getApplyUserDeptId())); sysDeptService.get(Long.valueOf(demandDataDTO.getApplyUserDeptId()));