Browse Source

周日报列表获取空集合修改

chenjun 1 year ago
parent
commit
047cef1774

+ 4 - 1
zjugis-module-adm/zjugis-module-adm-biz/src/main/java/com/zjugis/module/adm/service/report/ReportServiceImpl.java

@@ -1,6 +1,7 @@
 package com.zjugis.module.adm.service.report;
 
 
+import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -197,8 +198,10 @@ public class ReportServiceImpl implements ReportService {
                     .eqIfPresent(ReportDO::getReportMonth, reqVO.getReportMonth());
         }
         List<ReportRespVO> reportList = ReportConvert.INSTANCE.convertList(reportMapper.selectList(queryWrapperX));
+        if(CollectionUtil.isEmpty(reportList)){
+            return reportList;
+        }
         List<Long> reportIds = reportList.stream().map(ReportRespVO::getId).collect(Collectors.toList());
-
         List<ReportWorkloadRespVO> workloadDetailList = reportWorkloadService.getReportWorkloadByRIds(reportIds);
         List<ReportCommentRespVO> reportCommentList = reportCommentService.getReportCommentListByRIds(reportIds);
         List<ReportReceiveRespVO> reportReceiveList = reportReceiveService.getReportReceiveList(reportIds);