Commit aa897b38 authored by 李灿灿's avatar 李灿灿

fix:空指针异常修复

parent b05e5604
......@@ -6595,7 +6595,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
YifuUser user = SecurityUtils.getUser();
//根据当前登录人获取其拥有的项目列表权限
List<String> deptNoList = getDeptNoList(user);
return R.ok(deptNoList,"查询项目列表成功");
List<Dept> deptList = new ArrayList<>(16);
if (CollectionUtils.isNotEmpty(deptNoList)){
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(deptNoList);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
SetInfoVo data = setInfoByCodes.getData();
if (Optional.ofNullable(data).isPresent()){
Map<String, ProjectSetInfoVo> projectSetInfoVoMap = data.getProjectSetInfoVoMap();
if (MapUtils.isNotEmpty(projectSetInfoVoMap)){
for (String deptNo : deptNoList) {
ProjectSetInfoVo projectSetInfoVo = projectSetInfoVoMap.get(deptNo);
if(!Common.isEmpty(projectSetInfoVo)){
deptList.add(new Dept(projectSetInfoVo.getDepartNo(),projectSetInfoVo.getDepartName()));
}
}
}
}
}
}
return R.ok(deptList,"查询项目列表成功");
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment