Prechádzať zdrojové kódy

pms 瑞都 日报 搜索条件

zhangcl 1 deň pred
rodič
commit
b09cada793

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

@@ -305,6 +305,31 @@ public class IotRdDailyReportController {
     @Operation(summary = "获得瑞都日报分页")
     @PreAuthorize("@ss.hasPermission('pms:iot-rd-daily-report:query')")
     public CommonResult<PageResult<IotRdDailyReportRespVO>> getIotRdDailyReportPage(@Valid IotRdDailyReportPageReqVO pageReqVO) {
+        // 根据查询参数筛选出 符合条件 的记录id 再传入 分页查询
+        Set<Long> projectIds = new HashSet<>();
+        Set<Long> taskIds = new HashSet<>();
+        if (StrUtil.isNotBlank(pageReqVO.getContractName())) {
+            IotProjectInfoPageReqVO reqVO = new IotProjectInfoPageReqVO();
+            reqVO.setContractName(pageReqVO.getContractName());
+            List<IotProjectInfoDO> projects = iotProjectInfoService.getIotProjectInfos(reqVO);
+            if (CollUtil.isNotEmpty(projects)) {
+                projects.forEach(project -> {
+                    projectIds.add(project.getId());
+                });
+                pageReqVO.setProjectIds(projectIds);
+            }
+        }
+        if (StrUtil.isNotBlank(pageReqVO.getTaskName())) {
+            IotProjectTaskPageReqVO reqVO = new IotProjectTaskPageReqVO();
+            reqVO.setSearchKey(pageReqVO.getTaskName());
+            List<IotProjectTaskDO> tasks = iotProjectTaskService.projectTasks(reqVO);
+            if (CollUtil.isNotEmpty(tasks)) {
+                tasks.forEach(task -> {
+                    taskIds.add(task.getId());
+                });
+                pageReqVO.setTaskIds(taskIds);
+            }
+        }
         PageResult<IotRdDailyReportDO> pageResult = iotRdDailyReportService.getIotRdDailyReportPage(pageReqVO);
         // 设置日报的关联信息 部门(施工队伍) 项目 任务 带班干部 日报填报人
         return success(new PageResult<>(buildDailyReportList(pageResult.getList()), pageResult.getTotal()));
@@ -314,6 +339,31 @@ public class IotRdDailyReportController {
     @Operation(summary = "瑞都日报 统计")
     @PreAuthorize("@ss.hasPermission('pms:iot-rd-daily-report:query')")
     public CommonResult<List<IotRdDailyReportStatisticsRespVO>> statistics(@Valid IotRdDailyReportPageReqVO pageReqVO) {
+        // 根据查询参数筛选出 符合条件 的记录id 再传入 分页查询
+        Set<Long> projectIds = new HashSet<>();
+        Set<Long> taskIds = new HashSet<>();
+        if (StrUtil.isNotBlank(pageReqVO.getContractName())) {
+            IotProjectInfoPageReqVO reqVO = new IotProjectInfoPageReqVO();
+            reqVO.setContractName(pageReqVO.getContractName());
+            List<IotProjectInfoDO> projects = iotProjectInfoService.getIotProjectInfos(reqVO);
+            if (CollUtil.isNotEmpty(projects)) {
+                projects.forEach(project -> {
+                    projectIds.add(project.getId());
+                });
+                pageReqVO.setProjectIds(projectIds);
+            }
+        }
+        if (StrUtil.isNotBlank(pageReqVO.getTaskName())) {
+            IotProjectTaskPageReqVO reqVO = new IotProjectTaskPageReqVO();
+            reqVO.setSearchKey(pageReqVO.getTaskName());
+            List<IotProjectTaskDO> tasks = iotProjectTaskService.projectTasks(reqVO);
+            if (CollUtil.isNotEmpty(tasks)) {
+                tasks.forEach(task -> {
+                    taskIds.add(task.getId());
+                });
+                pageReqVO.setTaskIds(taskIds);
+            }
+        }
         List<IotRdDailyReportStatisticsRespVO> result = iotRdDailyReportService.statistics(pageReqVO);
         // 瑞都日报 按照项目部统计
         List<IotRdDailyReportStatisticsRespVO> projectReports = new ArrayList<>();
@@ -329,9 +379,6 @@ public class IotRdDailyReportController {
         if (CollUtil.isEmpty(reports)) {
             return Collections.emptyList();
         }
-        // 设备部门信息
-        Map<Long, DeptDO> deptMap = deptService.getDeptMap(
-                convertList(reports, IotRdDailyReportDO::getDeptId));
         // key项目id   value项目合同号
         Map<Long, String> projectPair = new HashMap<>();
         //  key任务id     value任务井号-施工区域
@@ -342,7 +389,11 @@ public class IotRdDailyReportController {
         Map<Long, String> taskSubmitterPair = new HashMap<>();
         //  key任务id     value工作量数据集合
         Map<Long, List<IotTaskAttrModelProperty>> taskWorkloadPair = new HashMap<>();
+        //  key任务id     value任务关联的施工队伍名称 多个逗号分隔
+        Map<Long, String> taskTeamsPair = new HashMap<>();
         Set<Long> userIds = new HashSet<>();
+        // 当前页所有日报关联任务的 施工队伍id 集合
+        Set<Long> currentPageDeptIds = new HashSet<>();
         DataPermissionUtils.executeIgnore(() -> {
             // 查询日报关联的项目信息
             IotProjectInfoPageReqVO reqVO = new IotProjectInfoPageReqVO();
@@ -361,6 +412,9 @@ public class IotRdDailyReportController {
                 tasks.forEach(task -> {
                     Set<Long> personIds = task.getResponsiblePerson();
                     Set<Long> submitterIds = task.getSubmitter();
+                    // 施工队伍id集合
+                    Set<Long> deptIds = task.getDeptIds();
+                    currentPageDeptIds.addAll(Optional.ofNullable(deptIds).orElse(Collections.emptySet()));
                     taskPair.put(task.getId(), task.getWellName());
                     userIds.addAll(Optional.ofNullable(personIds).orElse(Collections.emptySet()));
                     userIds.addAll(Optional.ofNullable(submitterIds).orElse(Collections.emptySet()));
@@ -369,6 +423,8 @@ public class IotRdDailyReportController {
                     taskWorkloadPair.put(task.getId(), extProperties);
                 });
             }
+            // 查询当前页所有日报关联的任务的施工队伍名称
+            Map<Long, DeptDO> deptMap = deptService.getDeptMap(currentPageDeptIds);
             // 查询所有 带班干部 填报人 的姓名
             Map<Long, AdminUserRespDTO> userMap;
             if (CollUtil.isNotEmpty(userIds)) {
@@ -378,6 +434,21 @@ public class IotRdDailyReportController {
             }
             if (CollUtil.isNotEmpty(tasks)) {
                 tasks.forEach(task -> {
+                    // 安全获取施工队伍ID集合(避免null)
+                    Set<Long> deptIds = Optional.ofNullable(task.getDeptIds())
+                            .orElse(Collections.emptySet());
+                    // 转换ID集合为队伍名称字符串(用逗号分隔)
+                    String deptNames = deptIds.stream()
+                            // 映射ID到队伍名称(队伍不存在时用空字符串)
+                            .map(deptId -> Optional.ofNullable(deptMap.get(deptId))
+                                    .map(DeptDO::getName)
+                                    .orElse(""))
+                            // 过滤空字符串(避免多余逗号)
+                            .filter(name -> !name.isEmpty())
+                            // 拼接部门名称
+                            .collect(Collectors.joining(","));
+                    // 存入映射关系
+                    taskTeamsPair.put(task.getId(), deptNames);
                     // 安全获取带班干部ID集合(避免null)
                     Set<Long> responsibleIds = Optional.ofNullable(task.getResponsiblePerson())
                             .orElse(Collections.emptySet());
@@ -489,8 +560,8 @@ public class IotRdDailyReportController {
             }
         });
         return BeanUtils.toBean(reports, IotRdDailyReportRespVO.class, (reportVO) -> {
-            // 部门信息
-            findAndThen(deptMap, reportVO.getDeptId(), dept -> reportVO.setDeptName(dept.getName()));
+            // 部门信息 任务中关联的施工队伍
+            findAndThen(taskTeamsPair, reportVO.getTaskId(), deptNames -> reportVO.setDeptName(deptNames));
             // 日报关联的项目信息
             findAndThen(projectPair, reportVO.getProjectId(), contractName -> reportVO.setContractName(contractName));
             // 日报关联的任务信息

+ 18 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrddailyreport/vo/IotRdDailyReportPageReqVO.java

@@ -10,6 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
+import java.util.Collection;
 
 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
 
@@ -150,4 +151,21 @@ public class IotRdDailyReportPageReqVO extends PageParam {
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime[] createTime;
 
+    /**
+     * 扩展字段
+     */
+    @Schema(description = "项目/合同名称", example = "测试")
+    private String contractName;
+
+    @Schema(description = "任务标识", example = "#33 - 一厂")
+    private String taskName;
+
+    @Schema(description = "项目id集合", example = "测试")
+    private Collection<Long> projectIds;
+
+    @Schema(description = "任务id集合", example = "测试")
+    private Collection<Long> taskIds;
+
+    @Schema(description = "部门id集合", example = "[123,223]")
+    private Collection<Long> deptIds;
 }

+ 1 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrddailyreport/vo/IotRdDailyReportRespVO.java

@@ -212,7 +212,7 @@ public class IotRdDailyReportRespVO {
     @ExcelProperty("时间节点区域")
     private String timeRange;
 
-    @Schema(description = "部门名称", example = "压裂二队")
+    @Schema(description = "部门名称", example = "压裂二队,压裂五队")
     @ExcelProperty("部门名称")
     private String deptName;
 

+ 5 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/iotrddailyreport/IotRdDailyReportMapper.java

@@ -75,8 +75,10 @@ public interface IotRdDailyReportMapper extends BaseMapperX<IotRdDailyReportDO>
         return selectList(new LambdaQueryWrapperX<IotRdDailyReportDO>()
                 .eqIfPresent(IotRdDailyReportDO::getDeptId, reqVO.getDeptId())
                 .eqIfPresent(IotRdDailyReportDO::getProjectId, reqVO.getProjectId())
+                .inIfPresent(IotRdDailyReportDO::getProjectId, reqVO.getProjectIds())
                 .eqIfPresent(IotRdDailyReportDO::getPlatformGroup, reqVO.getPlatformGroup())
                 .eqIfPresent(IotRdDailyReportDO::getTaskId, reqVO.getTaskId())
+                .inIfPresent(IotRdDailyReportDO::getTaskId, reqVO.getTaskIds())
                 .eqIfPresent(IotRdDailyReportDO::getProjectClassification, reqVO.getProjectClassification())
                 .eqIfPresent(IotRdDailyReportDO::getTechniqueIds, reqVO.getTechniqueIds())
                 .eqIfPresent(IotRdDailyReportDO::getDeviceIds, reqVO.getDeviceIds())
@@ -121,8 +123,11 @@ public interface IotRdDailyReportMapper extends BaseMapperX<IotRdDailyReportDO>
      */
     default LambdaQueryWrapperX<IotRdDailyReportDO> buildCommonQuery(IotRdDailyReportPageReqVO reqVO) {
         return new LambdaQueryWrapperX<IotRdDailyReportDO>()
+                .inIfPresent(IotRdDailyReportDO::getDeptId, reqVO.getDeptIds())
                 .eqIfPresent(IotRdDailyReportDO::getProjectId, reqVO.getProjectId())
+                .inIfPresent(IotRdDailyReportDO::getProjectId, reqVO.getProjectIds())
                 .eqIfPresent(IotRdDailyReportDO::getTaskId, reqVO.getTaskId())
+                .inIfPresent(IotRdDailyReportDO::getTaskId, reqVO.getTaskIds())
                 .eqIfPresent(IotRdDailyReportDO::getProjectClassification, reqVO.getProjectClassification())
                 .eqIfPresent(IotRdDailyReportDO::getTechniqueIds, reqVO.getTechniqueIds())
                 .eqIfPresent(IotRdDailyReportDO::getDeviceIds, reqVO.getDeviceIds())

+ 60 - 36
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotrddailyreport/IotRdDailyReportServiceImpl.java

@@ -157,6 +157,22 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
 
     @Override
     public PageResult<IotRdDailyReportDO> getIotRdDailyReportPage(IotRdDailyReportPageReqVO pageReqVO) {
+        // 查询选择部门下面所有子部门
+        Set<Long> ids = new HashSet<>();
+        if (Objects.nonNull(pageReqVO.getDeptId())) {
+            ids = deptService.getChildDeptIdListFromCache(pageReqVO.getDeptId());
+            ids.add(pageReqVO.getDeptId());
+            pageReqVO.setDeptIds(ids);
+        }
+        // 检查contractName不为空但projectIds为空的情况
+        if (StrUtil.isNotBlank(pageReqVO.getContractName()) && (CollUtil.isEmpty(pageReqVO.getProjectIds()))) {
+            return new PageResult<>(Collections.emptyList(), 0L);
+        }
+        // 检查taskName不为空但taskIds为空的情况
+        if (StrUtil.isNotBlank(pageReqVO.getTaskName()) && (CollUtil.isEmpty(pageReqVO.getTaskIds()))) {
+            return new PageResult<>(Collections.emptyList(), 0L);
+        }
+
         return iotRdDailyReportMapper.selectPage(pageReqVO);
     }
 
@@ -173,6 +189,14 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
     @Override
     public List<IotRdDailyReportStatisticsRespVO> statistics(IotRdDailyReportPageReqVO pageReqVO) {
         List<IotRdDailyReportStatisticsRespVO> result = new ArrayList<>();
+        // 检查contractName不为空但projectIds为空的情况
+        if (StrUtil.isNotBlank(pageReqVO.getContractName()) && (CollUtil.isEmpty(pageReqVO.getProjectIds()))) {
+            return result;
+        }
+        // 检查taskName不为空但taskIds为空的情况
+        if (StrUtil.isNotBlank(pageReqVO.getTaskName()) && (CollUtil.isEmpty(pageReqVO.getTaskIds()))) {
+            return result;
+        }
         // 按照项目部统计日报 先查询瑞都所有部门 163l
         Set<Long> rdChildDeptIds = deptService.getChildDeptIdListFromCache(163l);
         List<DeptDO> depts =deptService.getDeptList(rdChildDeptIds);
@@ -196,7 +220,7 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
         }
         // 查询所有瑞都日报
         IotRdDailyReportPageReqVO reqVO = new IotRdDailyReportPageReqVO();
-        List<IotRdDailyReportDO> dailyReports = iotRdDailyReportMapper.dailyReports(reqVO);
+        List<IotRdDailyReportDO> dailyReports = iotRdDailyReportMapper.dailyReports(pageReqVO);
         // key项目id   value项目甲方名称
         Map<Long, String> projectPair = new HashMap<>();
         //  key任务id     value任务井号
@@ -277,7 +301,7 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
                 });
             }
             // 设置 小队 任务已经完成的工作量集合 (按照不同的单位统计任务的不同工作量)
-            // key队伍id      value队伍工作量数据
+            // key任务井id      value队伍工作量数据
             Map<Long, BigDecimal> bridgePlugPair = new HashMap<>();
             Map<Long, BigDecimal> runCountPair = new HashMap<>();
             Map<Long, BigDecimal> cumulativeWorkingWellPair = new HashMap<>();
@@ -318,27 +342,27 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
                             tempTotalBridgePlug = tempTotalBridgePlug.add(actualValue);
                             if (bridgePlugPair.containsKey(report.getDeptId())) {
                                 BigDecimal tempBridgePlug = bridgePlugPair.get(report.getDeptId());
-                                bridgePlugPair.put(report.getDeptId(), tempTotalBridgePlug.add(tempBridgePlug));
+                                bridgePlugPair.put(report.getTaskId(), tempTotalBridgePlug.add(tempBridgePlug));
                             } else {
-                                bridgePlugPair.put(report.getDeptId(), tempTotalBridgePlug);
+                                bridgePlugPair.put(report.getTaskId(), tempTotalBridgePlug);
                             }
                         }
                         if ("趟数".equals(unit)) {
                             tempTotalRunCount = tempTotalRunCount.add(actualValue);
                             if (runCountPair.containsKey(report.getDeptId())) {
                                 BigDecimal tempRunCount = runCountPair.get(report.getDeptId());
-                                runCountPair.put(report.getDeptId(), tempTotalRunCount.add(tempRunCount));
+                                runCountPair.put(report.getTaskId(), tempTotalRunCount.add(tempRunCount));
                             } else {
-                                runCountPair.put(report.getDeptId(), tempTotalRunCount);
+                                runCountPair.put(report.getTaskId(), tempTotalRunCount);
                             }
                         }
                         if ("小时".equals(unit)) {
                             tempTotalHourCount = tempTotalHourCount.add(actualValue);
                             if (hourCountPair.containsKey(report.getDeptId())) {
                                 BigDecimal tempHourCount = hourCountPair.get(report.getDeptId());
-                                hourCountPair.put(report.getDeptId(), tempTotalHourCount.add(tempHourCount));
+                                hourCountPair.put(report.getTaskId(), tempTotalHourCount.add(tempHourCount));
                             } else {
-                                hourCountPair.put(report.getDeptId(), tempTotalHourCount);
+                                hourCountPair.put(report.getTaskId(), tempTotalHourCount);
                             }
                         }
                         if ("天数".equals(unit)) {
@@ -347,27 +371,27 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
                             tempTotalHourCount = tempTotalHourCount.add(hours);
                             if (hourCountPair.containsKey(report.getDeptId())) {
                                 BigDecimal tempHourCount = hourCountPair.get(report.getDeptId());
-                                hourCountPair.put(report.getDeptId(), tempTotalHourCount.add(tempHourCount));
+                                hourCountPair.put(report.getTaskId(), tempTotalHourCount.add(tempHourCount));
                             } else {
-                                hourCountPair.put(report.getDeptId(), tempTotalHourCount);
+                                hourCountPair.put(report.getTaskId(), tempTotalHourCount);
                             }
                         }
                         if ("方".equals(unit)) {
                             tempTotalWaterVolume = tempTotalWaterVolume.add(actualValue);
                             if (waterVolumePair.containsKey(report.getDeptId())) {
                                 BigDecimal tempWaterVolume = waterVolumePair.get(report.getDeptId());
-                                waterVolumePair.put(report.getDeptId(), tempTotalWaterVolume.add(tempWaterVolume));
+                                waterVolumePair.put(report.getTaskId(), tempTotalWaterVolume.add(tempWaterVolume));
                             } else {
-                                waterVolumePair.put(report.getDeptId(), tempTotalWaterVolume);
+                                waterVolumePair.put(report.getTaskId(), tempTotalWaterVolume);
                             }
                         }
                         if ("井数".equals(unit)) {
                             tempTotalCumulativeWorkingWell = tempTotalCumulativeWorkingWell.add(actualValue);
                             if (cumulativeWorkingWellPair.containsKey(report.getDeptId())) {
                                 BigDecimal tempWorkingWell = cumulativeWorkingWellPair.get(report.getDeptId());
-                                cumulativeWorkingWellPair.put(report.getDeptId(), tempTotalCumulativeWorkingWell.add(tempWorkingWell));
+                                cumulativeWorkingWellPair.put(report.getTaskId(), tempTotalCumulativeWorkingWell.add(tempWorkingWell));
                             } else {
-                                cumulativeWorkingWellPair.put(report.getDeptId(), tempTotalCumulativeWorkingWell);
+                                cumulativeWorkingWellPair.put(report.getTaskId(), tempTotalCumulativeWorkingWell);
                             }
                         }
                         if ("段数".equals(unit)) {
@@ -375,27 +399,27 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
                             tempTotalCumulativeWorkingLayers = tempTotalCumulativeWorkingLayers.add(actualValue);
                             if (cumulativeWorkingLayersPair.containsKey(report.getDeptId())) {
                                 BigDecimal tempWorkingLayer = cumulativeWorkingLayersPair.get(report.getDeptId());
-                                cumulativeWorkingLayersPair.put(report.getDeptId(), tempTotalCumulativeWorkingLayers.add(tempWorkingLayer));
+                                cumulativeWorkingLayersPair.put(report.getTaskId(), tempTotalCumulativeWorkingLayers.add(tempWorkingLayer));
                             } else {
-                                cumulativeWorkingLayersPair.put(report.getDeptId(), tempTotalCumulativeWorkingLayers);
+                                cumulativeWorkingLayersPair.put(report.getTaskId(), tempTotalCumulativeWorkingLayers);
                             }
                         }
                         if ("台次".equals(unit) && "当日泵车台次".equals(attr.getName())) {
                             tempTotalPumpTrips = tempTotalPumpTrips.add(actualValue);
                             if (pumpTripsPair.containsKey(report.getDeptId())) {
                                 BigDecimal tempPumpTrips = pumpTripsPair.get(report.getDeptId());
-                                pumpTripsPair.put(report.getDeptId(), tempTotalPumpTrips.add(tempPumpTrips));
+                                pumpTripsPair.put(report.getTaskId(), tempTotalPumpTrips.add(tempPumpTrips));
                             } else {
-                                pumpTripsPair.put(report.getDeptId(), tempTotalPumpTrips);
+                                pumpTripsPair.put(report.getTaskId(), tempTotalPumpTrips);
                             }
                         }
                         if ("台次".equals(unit) && ("当日仪表/混砂".equals(attr.getName()))) {
                             tempTotalMixSand = tempTotalMixSand.add(actualValue);
                             if (mixSandPair.containsKey(report.getDeptId())) {
                                 BigDecimal tempMixSand = mixSandPair.get(report.getDeptId());
-                                mixSandPair.put(report.getDeptId(), tempTotalMixSand.add(tempMixSand));
+                                mixSandPair.put(report.getTaskId(), tempTotalMixSand.add(tempMixSand));
                             } else {
-                                mixSandPair.put(report.getDeptId(), tempTotalMixSand);
+                                mixSandPair.put(report.getTaskId(), tempTotalMixSand);
                             }
                         }
                     }
@@ -448,60 +472,60 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
                         uniqueReport.setWorkloadDesign(taskWorkloadPair.get(taskId));
                     }
                     // 以队伍为维度 设置每种施工工艺的工作量 总和
-                    if (bridgePlugPair.containsKey(deptId)) {
+                    if (bridgePlugPair.containsKey(taskId)) {
                         // 钻可溶桥塞  钻复合桥塞
                         IotRdDailyReportStatisticsItemVO item = new IotRdDailyReportStatisticsItemVO();
                         item.setUnit("个数");
-                        item.setWorkload(bridgePlugPair.get(deptId));
+                        item.setWorkload(bridgePlugPair.get(taskId));
                         items.add(item);
                     }
-                    if (runCountPair.containsKey(deptId)) {
+                    if (runCountPair.containsKey(taskId)) {
                         // 通刮洗  冲砂
                         IotRdDailyReportStatisticsItemVO item = new IotRdDailyReportStatisticsItemVO();
                         item.setUnit("趟数");
-                        item.setWorkload(runCountPair.get(deptId));
+                        item.setWorkload(runCountPair.get(taskId));
                         items.add(item);
                     }
-                    if (hourCountPair.containsKey(deptId)) {
+                    if (hourCountPair.containsKey(taskId)) {
                         // 液氮泵车(时间D)  千型泵车(时间H)
                         IotRdDailyReportStatisticsItemVO item = new IotRdDailyReportStatisticsItemVO();
                         item.setUnit("小时");
-                        item.setWorkload(hourCountPair.get(deptId));
+                        item.setWorkload(hourCountPair.get(taskId));
                         items.add(item);
                     }
-                    if (waterVolumePair.containsKey(deptId)) {
+                    if (waterVolumePair.containsKey(taskId)) {
                         // 注水
                         IotRdDailyReportStatisticsItemVO item = new IotRdDailyReportStatisticsItemVO();
                         item.setUnit("方");
-                        item.setWorkload(waterVolumePair.get(deptId));
+                        item.setWorkload(waterVolumePair.get(taskId));
                         items.add(item);
                     }
-                    if (cumulativeWorkingWellPair.containsKey(deptId)) {
+                    if (cumulativeWorkingWellPair.containsKey(taskId)) {
                         // 连续油管常规作业
                         IotRdDailyReportStatisticsItemVO item = new IotRdDailyReportStatisticsItemVO();
                         item.setUnit("井数");
-                        item.setWorkload(cumulativeWorkingWellPair.get(deptId));
+                        item.setWorkload(cumulativeWorkingWellPair.get(taskId));
                         items.add(item);
                     }
-                    if (cumulativeWorkingLayersPair.containsKey(deptId)) {
+                    if (cumulativeWorkingLayersPair.containsKey(taskId)) {
                         // 压裂大包 压裂总包
                         IotRdDailyReportStatisticsItemVO item = new IotRdDailyReportStatisticsItemVO();
                         item.setUnit("段数");
-                        item.setWorkload(cumulativeWorkingLayersPair.get(deptId));
+                        item.setWorkload(cumulativeWorkingLayersPair.get(taskId));
                         items.add(item);
                     }
-                    if (pumpTripsPair.containsKey(deptId)) {
+                    if (pumpTripsPair.containsKey(taskId)) {
                         // 主压裂车 当日泵车台次
                         IotRdDailyReportStatisticsItemVO item = new IotRdDailyReportStatisticsItemVO();
                         item.setUnit("台次");
-                        item.setWorkload(pumpTripsPair.get(deptId));
+                        item.setWorkload(pumpTripsPair.get(taskId));
                         items.add(item);
                     }
-                    if (mixSandPair.containsKey(deptId)) {
+                    if (mixSandPair.containsKey(taskId)) {
                         // 当日仪表/混砂 台次
                         IotRdDailyReportStatisticsItemVO item = new IotRdDailyReportStatisticsItemVO();
                         item.setUnit("台次");
-                        item.setWorkload(mixSandPair.get(deptId));
+                        item.setWorkload(mixSandPair.get(taskId));
                         items.add(item);
                     }
                     uniqueReport.setItems(items);