fix:修复Bug【69263】

修复编辑页面没回显报告所属部门Bug
This commit is contained in:
2023-05-15 16:17:31 +08:00
parent 58f037a94e
commit c1ad8255a1
2 changed files with 13 additions and 1 deletions
@@ -16,8 +16,10 @@ import com.adc.da.report.vo.ReportQueryVo;
import com.adc.da.report.vo.ReportVo;
import com.adc.da.sys.dao.mysql.RoleEODao;
import com.adc.da.sys.dao.mysql.UserEODao;
import com.adc.da.sys.entity.OrgEO;
import com.adc.da.sys.entity.RoleEO;
import com.adc.da.sys.entity.UserEO;
import com.adc.da.sys.service.OrgEOService;
import com.adc.da.util.http.ResponseMessage;
import com.adc.da.util.http.Result;
import com.adc.da.util.utils.CollectionUtils;
@@ -118,6 +120,8 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
@Resource
private UserEODao userEODao;
@Resource
private OrgEOService orgEOService;
@Resource
private ILogService logService;
@@ -672,6 +676,15 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
@Override
public ResponseMessage reportDetail(String reportId) {
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);
}
//设置标签列表
LambdaQueryWrapper<ReportLabelEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ReportLabelEntity::getReportId, reportId);
@@ -282,7 +282,6 @@
rm.keycontent AS keycontent,
rm.maincontent AS maincontent,
rm.department AS department,
org.org_name as departmentName,
rm.`year` AS `year`,
rm.fileId AS fileId,
f.file_name as fileName,