fix:修复[编辑按钮报错]Bug

编辑报告-部门为空的时候,编辑按钮报错
This commit is contained in:
2023-05-16 16:05:37 +08:00
parent 4063bb9fda
commit f59b25a85c
@@ -689,12 +689,14 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
ReportDetailVo reportDetailVo = reportDao.reportDetail(reportId); ReportDetailVo reportDetailVo = reportDao.reportDetail(reportId);
//设置部门名称 //设置部门名称
String department = reportDetailVo.getDepartment(); String department = reportDetailVo.getDepartment();
if (StrUtil.isNotBlank(department)) {
String[] idArray = department.split(","); String[] idArray = department.split(",");
List<OrgEO> orgEOList = orgEOService.query().in("ID", idArray).list(); List<OrgEO> orgEOList = orgEOService.query().in("ID", idArray).list();
if (CollectionUtils.isNotEmpty(orgEOList)) { if (CollectionUtils.isNotEmpty(orgEOList)) {
String departmentName = orgEOList.stream().map(OrgEO::getOrgName).collect(Collectors.joining(",")); String departmentName = orgEOList.stream().map(OrgEO::getOrgName).collect(Collectors.joining(","));
reportDetailVo.setDepartmentName(departmentName); reportDetailVo.setDepartmentName(departmentName);
} }
}
//设置标签列表 //设置标签列表
LambdaQueryWrapper<ReportLabelEntity> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ReportLabelEntity> wrapper = new LambdaQueryWrapper<>();