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

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