Parcourir la source

pms 瑞恒日报列表 根据施工区域搜索 瑞都日报 显示 无工作量的日报的 施工队伍

zhangcl il y a 2 jours
Parent
commit
e8c1b6cce6

+ 9 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrddailyreport/IotRdDailyReportController.java

@@ -1862,6 +1862,9 @@ public class IotRdDailyReportController {
             }
         });
 
+        // 没有工作量的日报 也需要体现出部门 施工队伍
+        Map<Long, DeptDO> noWorkDeptMap = deptService.getDeptMap(convertList(reports, IotRdDailyReportDO::getDeptId));
+
         // 查询 当前分页 所有部门 任务井 日报数据 小计工作量
         IotRdDailyReportPageReqVO currentTaskReqVO = new IotRdDailyReportPageReqVO();
         currentTaskReqVO.setTaskIds(convertSet(reports, IotRdDailyReportDO::getTaskId));
@@ -2326,6 +2329,12 @@ public class IotRdDailyReportController {
             }
             // 部门信息 任务中关联的施工队伍
             findAndThen(taskTeamsPair, reportVO.getTaskId(), deptNames -> reportVO.setDeptName(deptNames));
+            // 无工作量日报 设置部门 施工队伍
+            if (StrUtil.isBlank(reportVO.getDeptName())) {
+                if (noWorkDeptMap.containsKey(reportVO.getDeptId())) {
+                    reportVO.setDeptName(noWorkDeptMap.get(reportVO.getDeptId()).getName());
+                }
+            }
             // 日报关联的项目信息
             findAndThen(projectPair, reportVO.getProjectId(), contractName -> reportVO.setContractName(contractName));
             // 日报关联的任务信息

+ 3 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrhdailyreport/vo/IotRhDailyReportPageReqVO.java

@@ -139,4 +139,7 @@ public class IotRhDailyReportPageReqVO extends PageParam {
 
     @Schema(description = "非生产时效", example = "Y")
     private String nonProductFlag;
+
+    @Schema(description = "施工区域", example = "一厂")
+    private String location;
 }