Răsfoiți Sursa

pms 瑞都设备利用率 柱状图

zhangcl 1 zi în urmă
părinte
comite
7a53082e03
10 a modificat fișierele cu 663 adăugiri și 70 ștergeri
  1. 1 1
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/devicegroup/IotDeviceGroupController.java
  2. 33 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrddailyreport/IotRdDailyReportController.java
  3. 3 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrddailyreport/vo/IotRdDailyReportPageReqVO.java
  4. 7 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrddailyreport/vo/IotRdDailyReportPolylineVO.java
  5. 7 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrddailyreport/vo/IotRdDailyReportStatisticsRespVO.java
  6. 258 59
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/stat/IotStaticController.java
  7. 3 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/vo/IotProductClassifyListReqVO.java
  8. 1 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/IotProductClassifyMapper.java
  9. 7 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotrddailyreport/IotRdDailyReportService.java
  10. 343 10
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotrddailyreport/IotRdDailyReportServiceImpl.java

+ 1 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/devicegroup/IotDeviceGroupController.java

@@ -183,8 +183,8 @@ public class IotDeviceGroupController {
         Map<String, Object> resultMap = new HashMap<>();
         Set<Long> groupDeptIds = new HashSet<>();
         Set<Long> deviceIds = new HashSet<>();
-        AtomicBoolean nodata = new AtomicBoolean(false);
         details.forEach(e ->{
+            AtomicBoolean nodata = new AtomicBoolean(false);
             IotDeviceDO iotDevice = iotDeviceService.getIotDevice(e.getDeviceId());
             if (ObjUtil.isNotEmpty(iotDevice.getYfDeviceId())) {
                 TableDataInfo tableDataInfo = restTemplate.getForObject(yanfanUrl + "/prod-api/iot/device/listThingsModel?deviceId="+iotDevice.getYfDeviceId()+"&pageNum=1&pageSize=200", TableDataInfo.class);

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

@@ -2201,6 +2201,39 @@ public class IotRdDailyReportController {
         return success(result);
     }
 
+    @GetMapping("/workloadKanban")
+    @Operation(summary = "瑞都 看板 日报统计折线图 以公司为维度 不区分 项目部 队伍")
+    @PreAuthorize("@ss.hasPermission('pms:iot-rd-daily-report:query')")
+    public CommonResult<List<IotRdDailyReportPolylineVO>> workloadKanban(@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<IotRdDailyReportPolylineVO> result = iotRdDailyReportService.workloadKanban(pageReqVO);
+        return success(result);
+    }
+
     /**
      * 设置日报的关联信息 部门(施工队伍) 项目 任务 带班干部 日报填报人
      * @param reports

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

@@ -174,4 +174,7 @@ public class IotRdDailyReportPageReqVO extends PageParam {
 
     @Schema(description = "平台井分组标识集合", example = "[xyz,abc]")
     private Collection<String> platformGroups;
+
+    @Schema(description = "时间查询类型", example = "本月 本季度 本年")
+    private String timeType;
 }

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

@@ -87,4 +87,11 @@ public class IotRdDailyReportPolylineVO {
     @Schema(description = "油耗L")
     @ExcelProperty("油耗L")
     private BigDecimal cumulativeFuels;
+    @Schema(description = "连油井数")
+    @ExcelProperty("连油井数")
+    private Integer lyWellCount;
+    @Schema(description = "压裂井数")
+    @ExcelProperty("压裂井数")
+    private Integer ylWellCount;
+
 }

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

@@ -114,4 +114,11 @@ public class IotRdDailyReportStatisticsRespVO {
     @Schema(description = "台次 泵车台次 仪表/混砂")
     @ExcelProperty("台次")
     private BigDecimal taici;
+
+    @Schema(description = "连油井数")
+    @ExcelProperty("连油井数")
+    private Integer lyWellCount;
+    @Schema(description = "压裂井数")
+    @ExcelProperty("压裂井数")
+    private Integer ylWellCount;
 }

+ 258 - 59
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/stat/IotStaticController.java

@@ -9,7 +9,6 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
 import cn.iocoder.yudao.framework.common.pojo.PageParam;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.common.pojo.Pms;
-import cn.iocoder.yudao.framework.common.util.date.DateUtils;
 import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
 import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
 import cn.iocoder.yudao.module.pms.controller.admin.depttype.vo.IotDeptTypePageReqVO;
@@ -176,14 +175,14 @@ public class IotStaticController {
 
     @GetMapping("/main/day")
     public CommonResult<Map<String, Object>> getMaintainDay() {
-        ImmutableMap<String, LocalDateTime> beginEndDay = DateUtils.getBeginEndDay(1);
+        ImmutableMap<String, LocalDateTime> beginEndDay = getBeginEndDay(1);
         IotFailureReportPageReqVO iotFailureReportPageReqVO = new IotFailureReportPageReqVO();
         iotFailureReportPageReqVO.setCreateTime(new LocalDateTime[]{beginEndDay.get("start"), beginEndDay.get("end")});
         Long failure = iotFailureReportMapper.selectCountByTimeAndStatus(iotFailureReportPageReqVO);
         IotMaintainPageReqVO iotMaintainPageReqVO = new IotMaintainPageReqVO();
         iotMaintainPageReqVO.setCreateTime(new LocalDateTime[]{beginEndDay.get("start"), beginEndDay.get("end")});
         Long maintain = iotMaintainMapper.selectCountByTimeAndStatus(iotMaintainPageReqVO);
-        return CommonResult.success(ImmutableMap.of("failureDay", failure, "maintainDay", maintain));
+        return success(ImmutableMap.of("failureDay", failure, "maintainDay", maintain));
     }
 
     @GetMapping("/notice")
@@ -198,33 +197,33 @@ public class IotStaticController {
 
     @GetMapping("/main/week")
     public CommonResult<Map<String, Object>> getMaintainWeek() {
-        ImmutableMap<String, LocalDateTime> beginEndWeek = DateUtils.getBeginEndWeek();
+        ImmutableMap<String, LocalDateTime> beginEndWeek = getBeginEndWeek();
         IotFailureReportPageReqVO iotFailureReportPageReqVO = new IotFailureReportPageReqVO();
         iotFailureReportPageReqVO.setCreateTime(new LocalDateTime[]{beginEndWeek.get("start"), beginEndWeek.get("end")});
         Long failure = iotFailureReportMapper.selectCountByTimeAndStatus(iotFailureReportPageReqVO);
         IotMaintainPageReqVO iotMaintainPageReqVO = new IotMaintainPageReqVO();
         iotMaintainPageReqVO.setCreateTime(new LocalDateTime[]{beginEndWeek.get("start"), beginEndWeek.get("end")});
         Long maintain = iotMaintainMapper.selectCountByTimeAndStatus(iotMaintainPageReqVO);
-        return CommonResult.success(ImmutableMap.of("failureWeek", failure, "maintainWeek", maintain));
+        return success(ImmutableMap.of("failureWeek", failure, "maintainWeek", maintain));
     }
 
     @GetMapping("/main/month")
     public CommonResult<Map<String, Object>> getMaintainMonth() {
-        ImmutableMap<String, LocalDateTime> beginEndMonth = DateUtils.getBeginEndMonth();
+        ImmutableMap<String, LocalDateTime> beginEndMonth = getBeginEndMonth();
         IotFailureReportPageReqVO iotFailureReportPageReqVO = new IotFailureReportPageReqVO();
         iotFailureReportPageReqVO.setCreateTime(new LocalDateTime[]{beginEndMonth.get("start"), beginEndMonth.get("end")});
         Long failure = iotFailureReportMapper.selectCountByTimeAndStatus(iotFailureReportPageReqVO);
         IotMaintainPageReqVO iotMaintainPageReqVO = new IotMaintainPageReqVO();
         iotMaintainPageReqVO.setCreateTime(new LocalDateTime[]{beginEndMonth.get("start"), beginEndMonth.get("end")});
         Long maintain = iotMaintainMapper.selectCountByTimeAndStatus(iotMaintainPageReqVO);
-        return CommonResult.success(ImmutableMap.of("failureMonth", failure, "maintainMonth", maintain));
+        return success(ImmutableMap.of("failureMonth", failure, "maintainMonth", maintain));
     }
 
     @GetMapping("/main/total")
     public CommonResult<Map<String, Object>> getMaintainTotal() {
         Long failure = iotFailureReportMapper.selectCount();
         Long maintain = iotMaintainMapper.selectCount();
-            return CommonResult.success(ImmutableMap.of("failureTotal", failure, "maintainTotal", maintain));
+            return success(ImmutableMap.of("failureTotal", failure, "maintainTotal", maintain));
     }
 
     @GetMapping("/main/status")
@@ -233,13 +232,13 @@ public class IotStaticController {
         Map<String, Long> failure = iotFailureReportDOS.stream().collect(Collectors.groupingBy(IotFailureReportDO::getStatus, Collectors.counting()));
         List<IotMaintainDO> iotMaintainDOS = iotMaintainMapper.selectList();
         Map<String, Long> maintain = iotMaintainDOS.stream().collect(Collectors.groupingBy(IotMaintainDO::getStatus, Collectors.counting()));
-        return CommonResult.success(ImmutableMap.of("failureStatus", failure, "maintainStatus", maintain));
+        return success(ImmutableMap.of("failureStatus", failure, "maintainStatus", maintain));
     }
 
     @GetMapping("/main/year")
-    public CommonResult<List<DateUtils.MonthRange>> getMaintainYear() {
-        List<DateUtils.MonthRange> lastYearMonths = getLastYearMonthRanges();
-        List<DateUtils.MonthRange> collect = lastYearMonths.stream().map(e -> {
+    public CommonResult<List<MonthRange>> getMaintainYear() {
+        List<MonthRange> lastYearMonths = getLastYearMonthRanges();
+        List<MonthRange> collect = lastYearMonths.stream().map(e -> {
             IotFailureReportPageReqVO iotFailureReportPageReqVO = new IotFailureReportPageReqVO();
             iotFailureReportPageReqVO.setCreateTime(new LocalDateTime[]{e.getStart(), e.getEnd()});
             Long l = iotFailureReportMapper.selectCountByTimeAndStatus(iotFailureReportPageReqVO);
@@ -247,43 +246,43 @@ public class IotStaticController {
             return e;
         }).collect(Collectors.toList());
 
-        return CommonResult.success(collect);
+        return success(collect);
     }
 
     @GetMapping("/inspect/day")
     public CommonResult<Map<String, Object>> getInspectDay() {
-        ImmutableMap<String, LocalDateTime> beginEndDay = DateUtils.getBeginEndDay(1);
+        ImmutableMap<String, LocalDateTime> beginEndDay = getBeginEndDay(1);
         IotInspectOrderPageReqVO iotInspectOrderPageReqVO = new IotInspectOrderPageReqVO();
         iotInspectOrderPageReqVO.setCreateTime(new LocalDateTime[]{beginEndDay.get("start"), beginEndDay.get("end")});
         Long inspectDayTotal = iotInspectOrderMapper.selectCountByTimeAndStatus(iotInspectOrderPageReqVO);
         iotInspectOrderPageReqVO.setStatus("todo");
         Long inspectDayTodo = iotInspectOrderMapper.selectCountByTimeAndStatus(iotInspectOrderPageReqVO);
 
-        return CommonResult.success(ImmutableMap.of("total", inspectDayTotal,"todo", inspectDayTodo));
+        return success(ImmutableMap.of("total", inspectDayTotal,"todo", inspectDayTodo));
     }
 
     @GetMapping("/inspect/week")
     public CommonResult<Map<String, Object>> getInspectWeek() {
         IotInspectOrderPageReqVO iotInspectOrderPageReqVO = new IotInspectOrderPageReqVO();
-        ImmutableMap<String, LocalDateTime> beginEndWeek = DateUtils.getBeginEndWeek();
+        ImmutableMap<String, LocalDateTime> beginEndWeek = getBeginEndWeek();
         iotInspectOrderPageReqVO.setCreateTime(new LocalDateTime[]{beginEndWeek.get("start"), beginEndWeek.get("end")});
         Long inspectWeekTotal = iotInspectOrderMapper.selectCountByTimeAndStatus(iotInspectOrderPageReqVO);
         iotInspectOrderPageReqVO.setStatus("todo");
         Long inspectWeekTodo = iotInspectOrderMapper.selectCountByTimeAndStatus(iotInspectOrderPageReqVO);
 
-        return CommonResult.success(ImmutableMap.of("total", inspectWeekTotal,"todo", inspectWeekTodo));
+        return success(ImmutableMap.of("total", inspectWeekTotal,"todo", inspectWeekTodo));
     }
 
     @GetMapping("/inspect/month")
     public CommonResult<Map<String, Object>> getInspectMonth() {
         IotInspectOrderPageReqVO iotInspectOrderPageReqVO = new IotInspectOrderPageReqVO();
-        ImmutableMap<String, LocalDateTime> beginEndMonth = DateUtils.getBeginEndMonth();
+        ImmutableMap<String, LocalDateTime> beginEndMonth = getBeginEndMonth();
         iotInspectOrderPageReqVO.setCreateTime(new LocalDateTime[]{beginEndMonth.get("start"), beginEndMonth.get("end")});
         Long inspectWeekTotal = iotInspectOrderMapper.selectCountByTimeAndStatus(iotInspectOrderPageReqVO);
         iotInspectOrderPageReqVO.setStatus("todo");
         Long inspectWeekTodo = iotInspectOrderMapper.selectCountByTimeAndStatus(iotInspectOrderPageReqVO);
 
-        return CommonResult.success(ImmutableMap.of("total", inspectWeekTotal,"todo", inspectWeekTodo));
+        return success(ImmutableMap.of("total", inspectWeekTotal,"todo", inspectWeekTodo));
     }
 
     @GetMapping("/inspect/total")
@@ -291,7 +290,7 @@ public class IotStaticController {
         Long total = iotInspectOrderMapper.selectCount();
         Long todo = iotInspectOrderMapper.selectCount("status", "todo");
 
-        return CommonResult.success(ImmutableMap.of("total", total,"todo", todo));
+        return success(ImmutableMap.of("total", total,"todo", todo));
     }
 
 
@@ -304,7 +303,7 @@ public class IotStaticController {
         }
         List<IotInspectOrderDO> iotInspectOrderDOS = iotInspectOrderMapper.selectListStat(vo, ids);
         Map<String, Long> order = iotInspectOrderDOS.stream().collect(Collectors.groupingBy(IotInspectOrderDO::getStatus, Collectors.counting()));
-        return CommonResult.success(order);
+        return success(order);
     }
 
     @GetMapping("/report/inspect/status")
@@ -322,7 +321,7 @@ public class IotStaticController {
         Long finished = iotInspectOrderMapper.selectCount(vo, ids,"finished");
         Long ignore = iotInspectOrderMapper.selectCount(vo, ids,"ignore");
 //        Map<String, Long> order = iotInspectOrderDOS.stream().collect(Collectors.groupingBy(IotInspectOrderDO::getStatus, Collectors.counting()));
-        return CommonResult.success(ImmutableMap.of("todo",todo,"finished",finished,"ignore",ignore));
+        return success(ImmutableMap.of("todo",todo,"finished",finished,"ignore",ignore));
     }
 
     @GetMapping("/inspect/statuss/{dept}")
@@ -331,23 +330,23 @@ public class IotStaticController {
         IotCountDataDO vo = new IotCountDataDO();
         List<IotInspectOrderDO> iotInspectOrderDOS = iotInspectOrderMapper.selectListStat(vo, ids);
         Map<String, Long> order = iotInspectOrderDOS.stream().collect(Collectors.groupingBy(IotInspectOrderDO::getStatus, Collectors.counting()));
-        return CommonResult.success(order);
+        return success(order);
     }
 
     @GetMapping("/inspect/today/status")
     public CommonResult<Map<String, Long>> getInspectTodayStatusInfo() {
-        ImmutableMap<String, LocalDateTime> beginEndDay = DateUtils.getBeginEndDay(0);
+        ImmutableMap<String, LocalDateTime> beginEndDay = getBeginEndDay(0);
         IotInspectOrderPageReqVO iotInspectOrderPageReqVO = new IotInspectOrderPageReqVO();
         iotInspectOrderPageReqVO.setCreateTime(new LocalDateTime[]{beginEndDay.get("start"), beginEndDay.get("end")});
         List<IotInspectOrderDO> iotInspectOrderDOS = iotInspectOrderMapper.selectListByCreateTime(iotInspectOrderPageReqVO, new HashSet<>());
         Map<String, Long> order = iotInspectOrderDOS.stream().collect(Collectors.groupingBy(IotInspectOrderDO::getStatus, Collectors.counting()));
-        return CommonResult.success(order);
+        return success(order);
     }
 
     @GetMapping("/inspect/year")
-    public CommonResult<List<DateUtils.MonthRange>> getInspectYear() {
-        List<DateUtils.MonthRange> lastYearMonths = getLastYearMonthRanges();
-        List<DateUtils.MonthRange> collect = lastYearMonths.stream().map(e -> {
+    public CommonResult<List<MonthRange>> getInspectYear() {
+        List<MonthRange> lastYearMonths = getLastYearMonthRanges();
+        List<MonthRange> collect = lastYearMonths.stream().map(e -> {
             IotInspectOrderPageReqVO iotInspectOrderPageReqVO = new IotInspectOrderPageReqVO();
             iotInspectOrderPageReqVO.setCreateTime(new LocalDateTime[]{e.getStart(), e.getEnd()});
             Long l = iotInspectOrderMapper.selectCountByTimeAndStatus(iotInspectOrderPageReqVO);
@@ -355,44 +354,44 @@ public class IotStaticController {
             return e;
         }).collect(Collectors.toList());
 
-        return CommonResult.success(collect);
+        return success(collect);
     }
 
 
     @GetMapping("/maintenance/day")
     public CommonResult<Map<String, Object>> getMaintenanceDay() {
-        ImmutableMap<String, LocalDateTime> beginEndDay = DateUtils.getBeginEndDay(1);
+        ImmutableMap<String, LocalDateTime> beginEndDay = getBeginEndDay(1);
         IotMainWorkOrderPageReqVO iotMainWorkOrderPageReqVO = new IotMainWorkOrderPageReqVO();
         iotMainWorkOrderPageReqVO.setCreateTime(new LocalDateTime[]{beginEndDay.get("start"), beginEndDay.get("end")});
         Long inspectDayTotal = iotMainWorkOrderMapper.selectCountByTimeAndStatus(iotMainWorkOrderPageReqVO);
         iotMainWorkOrderPageReqVO.setResult(1);
         Long inspectDayTodo = iotMainWorkOrderMapper.selectCountByTimeAndStatus(iotMainWorkOrderPageReqVO);
 
-        return CommonResult.success(ImmutableMap.of("total", inspectDayTotal,"todo", inspectDayTodo));
+        return success(ImmutableMap.of("total", inspectDayTotal,"todo", inspectDayTodo));
     }
 
     @GetMapping("/maintenance/week")
     public CommonResult<Map<String, Object>> getMaintenanceWeek() {
         IotMainWorkOrderPageReqVO iotMainWorkOrderPageReqVO = new IotMainWorkOrderPageReqVO();
-        ImmutableMap<String, LocalDateTime> beginEndWeek = DateUtils.getBeginEndWeek();
+        ImmutableMap<String, LocalDateTime> beginEndWeek = getBeginEndWeek();
         iotMainWorkOrderPageReqVO.setCreateTime(new LocalDateTime[]{beginEndWeek.get("start"), beginEndWeek.get("end")});
         Long inspectWeekTotal = iotMainWorkOrderMapper.selectCountByTimeAndStatus(iotMainWorkOrderPageReqVO);
         iotMainWorkOrderPageReqVO.setResult(1);
         Long inspectWeekTodo = iotMainWorkOrderMapper.selectCountByTimeAndStatus(iotMainWorkOrderPageReqVO);
 
-        return CommonResult.success(ImmutableMap.of("total", inspectWeekTotal,"todo", inspectWeekTodo));
+        return success(ImmutableMap.of("total", inspectWeekTotal,"todo", inspectWeekTodo));
     }
 
     @GetMapping("/maintenance/month")
     public CommonResult<Map<String, Object>> getMaintenanceMonth() {
         IotMainWorkOrderPageReqVO iotMainWorkOrderPageReqVO = new IotMainWorkOrderPageReqVO();
-        ImmutableMap<String, LocalDateTime> beginEndMonth = DateUtils.getBeginEndMonth();
+        ImmutableMap<String, LocalDateTime> beginEndMonth = getBeginEndMonth();
         iotMainWorkOrderPageReqVO.setCreateTime(new LocalDateTime[]{beginEndMonth.get("start"), beginEndMonth.get("end")});
         Long inspectWeekTotal = iotMainWorkOrderMapper.selectCountByTimeAndStatus(iotMainWorkOrderPageReqVO);
         iotMainWorkOrderPageReqVO.setResult(1);
         Long inspectWeekTodo = iotMainWorkOrderMapper.selectCountByTimeAndStatus(iotMainWorkOrderPageReqVO);
 
-        return CommonResult.success(ImmutableMap.of("total", inspectWeekTotal,"todo", inspectWeekTodo));
+        return success(ImmutableMap.of("total", inspectWeekTotal,"todo", inspectWeekTodo));
     }
 
     @GetMapping("/maintenance/total")
@@ -400,7 +399,7 @@ public class IotStaticController {
         Long total = iotMainWorkOrderMapper.selectCount();
         Long todo = iotMainWorkOrderMapper.selectCount("result", 1);
 
-        return CommonResult.success(ImmutableMap.of("total", total,"todo", todo));
+        return success(ImmutableMap.of("total", total,"todo", todo));
     }
 
     @GetMapping("/maintenance/status/{dept}")
@@ -418,12 +417,12 @@ public class IotStaticController {
                 resultMap.put("finished", v);
             }
         });
-        return CommonResult.success(resultMap);
+        return success(resultMap);
     }
 
     @GetMapping("/maintenance/today/status")
     public CommonResult<Map<String, Long>> getMaintenanceTodayStatusInfo() {
-        ImmutableMap<String, LocalDateTime> beginEndDay = DateUtils.getBeginEndDay(0);
+        ImmutableMap<String, LocalDateTime> beginEndDay = getBeginEndDay(0);
         IotMainWorkOrderPageReqVO iotMainWorkOrderPageReqVO = new IotMainWorkOrderPageReqVO();
         iotMainWorkOrderPageReqVO.setCreateTime(new LocalDateTime[]{beginEndDay.get("start"), beginEndDay.get("end")});
         List<IotMainWorkOrderDO> iotInspectOrderDOS = iotMainWorkOrderMapper.selectListByCreateTime(iotMainWorkOrderPageReqVO, new HashSet<>());
@@ -436,7 +435,7 @@ public class IotStaticController {
                 resultMap.put("finished", v);
             }
         });
-        return CommonResult.success(resultMap);
+        return success(resultMap);
     }
 
     @GetMapping("/maintenance/type")
@@ -451,7 +450,7 @@ public class IotStaticController {
                 resultMap.put("临时新建", v);
             }
         });
-        return CommonResult.success(resultMap);
+        return success(resultMap);
     }
 
     @Resource
@@ -470,10 +469,10 @@ public class IotStaticController {
                 deviceVO.setTimestamp(deviceVO.getTs().getTime());
                 deviceVO.setValue(Objects.nonNull(deviceVO.getLogValue())?Double.valueOf(deviceVO.getLogValue()):null);
             });
-            return CommonResult.success(deviceVOS.stream().sorted(Comparator.comparing(DeviceVO::getTimestamp).reversed()).collect(Collectors.toList()));
+            return success(deviceVOS.stream().sorted(Comparator.comparing(DeviceVO::getTimestamp).reversed()).collect(Collectors.toList()));
         } else {
             List<DeviceVO> deviceVOS = new ArrayList<>();
-            return CommonResult.success(deviceVOS);
+            return success(deviceVOS);
         }
     }
 
@@ -507,11 +506,11 @@ public class IotStaticController {
     public CommonResult<ImmutableMap<Object, Object>> getHomeDeviceCountStat(@PathVariable("dept") String dept) {
         Set<Long> ids = getDeptIds(dept);
         Long deviceCount = iotDeviceMapper.selectByDept(ids);
-        ImmutableMap<String, LocalDateTime> beginEndDay = DateUtils.getBeginEndDay(0);
+        ImmutableMap<String, LocalDateTime> beginEndDay = getBeginEndDay(0);
         IotDevicePageReqVO iotDevicePageReqVO = new IotDevicePageReqVO();
         iotDevicePageReqVO.setCreateTime(new LocalDateTime[]{beginEndDay.get("start"), beginEndDay.get("end")});
         Long deviceToday = iotDeviceMapper.selectCountByTimeAndStatus(iotDevicePageReqVO);
-        return CommonResult.success(ImmutableMap.of("total", deviceCount,"today", deviceToday));
+        return success(ImmutableMap.of("total", deviceCount,"today", deviceToday));
     }
 
     /**
@@ -546,39 +545,39 @@ public class IotStaticController {
                 // 累加求和(空集合时sum()返回0,无需手动判空)
                 .sum();
 
-        return CommonResult.success(ImmutableMap.of("zj", totalFootage,"xj", completeWellCount));
+        return success(ImmutableMap.of("zj", totalFootage,"xj", completeWellCount));
     }
 
     @GetMapping("/home/maintain/count/{dept}")
     public CommonResult<ImmutableMap<Object, Object>> getHomeMaintainCountStat(@PathVariable("dept") String dept) {
-        ImmutableMap<String, LocalDateTime> beginEndDay = DateUtils.getBeginEndDay(0);
+        ImmutableMap<String, LocalDateTime> beginEndDay = getBeginEndDay(0);
         Set<Long> ids = getDeptIds(dept);
 
         Long maintainCount = iotMaintainMapper.selectByDept(ids);
         IotMaintainPageReqVO iotMaintainPageReqVO = new IotMaintainPageReqVO();
         iotMaintainPageReqVO.setCreateTime(new LocalDateTime[]{beginEndDay.get("start"), beginEndDay.get("end")});
         Long maintainToday = iotMaintainMapper.selectCountByTimeAndStatus(iotMaintainPageReqVO);
-        return CommonResult.success(ImmutableMap.of("total", maintainCount, "today", maintainToday));
+        return success(ImmutableMap.of("total", maintainCount, "today", maintainToday));
     }
 
     @GetMapping("/home/work/count")
     public CommonResult<ImmutableMap<Object, Object>> getHomeWorkCountStat() {
-        ImmutableMap<String, LocalDateTime> beginEndDay = DateUtils.getBeginEndDay(0);
+        ImmutableMap<String, LocalDateTime> beginEndDay = getBeginEndDay(0);
         Long workCount = iotMainWorkOrderMapper.selectCount();
         IotMainWorkOrderPageReqVO iotMainWorkOrderPageReqVO = new IotMainWorkOrderPageReqVO();
         iotMainWorkOrderPageReqVO.setCreateTime(new LocalDateTime[]{beginEndDay.get("start"), beginEndDay.get("end")});
         Long workToday = iotMainWorkOrderMapper.selectCountByTimeAndStatus(iotMainWorkOrderPageReqVO);
-        return CommonResult.success(ImmutableMap.of("total", workCount, "today", workToday));
+        return success(ImmutableMap.of("total", workCount, "today", workToday));
     }
 
     @GetMapping("/home/inspect/count")
     public CommonResult<ImmutableMap<Object, Object>> getHomeInspectCountStat() {
-        ImmutableMap<String, LocalDateTime> beginEndDay = DateUtils.getBeginEndDay(0);
+        ImmutableMap<String, LocalDateTime> beginEndDay = getBeginEndDay(0);
         Long inspectCount = iotInspectOrderMapper.selectCount();
         IotInspectOrderPageReqVO iotInspectOrderPageReqVO = new IotInspectOrderPageReqVO();
         iotInspectOrderPageReqVO.setCreateTime(new LocalDateTime[]{beginEndDay.get("start"), beginEndDay.get("end")});
         Long inspectToday = iotInspectOrderMapper.selectCountByTimeAndStatus(iotInspectOrderPageReqVO);
-        return CommonResult.success(ImmutableMap.of("total", inspectCount, "today", inspectToday));
+        return success(ImmutableMap.of("total", inspectCount, "today", inspectToday));
     }
 
     @Resource
@@ -600,7 +599,7 @@ public class IotStaticController {
                 results.add(resultMap);
             });
         });
-        return CommonResult.success(results);
+        return success(results);
     }
 
     @GetMapping("/home/device/type/{dept}")
@@ -635,7 +634,7 @@ public class IotStaticController {
             });
         }
 
-        return CommonResult.success(results);
+        return success(results);
     }
 
     @Data
@@ -648,7 +647,7 @@ public class IotStaticController {
     @GetMapping("/home/dept")
     public CommonResult<List<Pms.deptStat>> getActiveDeptStat() {
         List<Pms.deptStat> userCountByDeptId = adminUserApi.getUserCountByDeptId(null);
-        return CommonResult.success(userCountByDeptId);
+        return success(userCountByDeptId);
     }
 
     @GetMapping("/home/safe")
@@ -713,7 +712,7 @@ public class IotStaticController {
     @PermitAll
     public CommonResult<Map<String, Object>> getRhYwcbStat(@PathVariable("dept") String dept) {
         Set<Long> ids = getDeptIds(dept);
-        List<String> lastSevenDays = DateUtils.getLastSevenDays();
+        List<String> lastSevenDays = getLastSevenDays();
         String first = lastSevenDays.get(0);
         String last = lastSevenDays.get(lastSevenDays.size() - 1);
         LocalDateTime startOfDay = getStartOfDay(last);
@@ -744,7 +743,7 @@ public class IotStaticController {
     @PermitAll
     public CommonResult<Map<String, Object>> getOrderNumberStat(@PathVariable("dept") String dept) {
         Set<Long> ids = getDeptIds(dept);
-        List<String> lastSevenDays = DateUtils.getLastSevenDays();
+        List<String> lastSevenDays = getLastSevenDays();
         String first = lastSevenDays.get(0);
         String last = lastSevenDays.get(lastSevenDays.size() - 1);
         LocalDateTime startOfDay = getStartOfDay(last);
@@ -948,7 +947,7 @@ public class IotStaticController {
     @PermitAll
     public CommonResult<Map<String, Object>> rhOrder(@PathVariable("dept") String dept) {
         Set<Long> ids = getDeptIds(dept);
-        List<String> lastSevenDays = DateUtils.getLastSevenDays();
+        List<String> lastSevenDays = getLastSevenDays();
         String first = lastSevenDays.get(0);
         String last = lastSevenDays.get(lastSevenDays.size() - 1);
         LocalDateTime startOfDay = getStartOfDay(last);
@@ -1006,7 +1005,7 @@ public class IotStaticController {
     @PermitAll
     public CommonResult<Map<String, Object>> rhOrderToday(@PathVariable("dept") String dept) {
         Set<Long> ids = getDeptIds(dept);
-        List<String> lastSevenDays = DateUtils.getLastSevenDays();
+        List<String> lastSevenDays = getLastSevenDays();
         String first = lastSevenDays.get(0);
         String last = lastSevenDays.get(lastSevenDays.size() - 1);
         LocalDateTime startOfDay = getStartOfDay(last);
@@ -1062,7 +1061,7 @@ public class IotStaticController {
     @PermitAll
     public CommonResult<Map<String, Object>> rhOrderDaily(@PathVariable("dept") String dept) {
         Set<Long> ids = getDeptIds(dept);
-        List<String> lastSevenDays = DateUtils.getLastSevenDays();
+        List<String> lastSevenDays = getLastSevenDays();
         String first = lastSevenDays.get(0);
         String last = lastSevenDays.get(lastSevenDays.size() - 1);
         LocalDateTime startOfDay = getStartOfDay(last);
@@ -2452,6 +2451,206 @@ public class IotStaticController {
         return success(rates);
     }
 
+    /**
+     * 瑞都 设备利用率 按 项目部 统计
+     * @return
+     */
+    @GetMapping("/rd/device/utilizationRates")
+    @PermitAll
+    public CommonResult<List<ProjectUtilizationRateVo>> rdUtilizationRates(IotRdDailyReportPageReqVO reqVO) {
+        if (ObjUtil.isEmpty(reqVO.getCreateTime())) {
+            throw exception(IOT_DAILY_REPORT_TIME_NOT_EXISTS);
+        }
+        if (reqVO.getCreateTime().length < 2) {
+            throw exception(IOT_DAILY_REPORT_TIME_NOT_EXISTS);
+        }
+        // 各项目部的设备利用率集合
+        List<ProjectUtilizationRateVo> rates = new ArrayList<>();
+        // 查询瑞都 163l 所有项目部
+        Set<Long> childDeptIds = deptService.getChildDeptIdListFromCache(163l);
+        Map<Long, DeptDO> allDeptPair = deptService.getDeptMap(childDeptIds);
+        Set<String> projectDeptNames = new HashSet<>();
+        Set<Long> projectDeptIds = new HashSet<>();
+        // key项目部id   value项目部名称
+        Map<Long, String> projectPair = new HashMap<>();
+        // key队伍id   value项目部id
+        Map<Long, Long> teamIdProjectIdPair = new HashMap<>();
+        // key项目部id   value A+B类设备id集合
+        Map<Long, Set<Long>> projectABDeviceIdPair = new HashMap<>();
+        // key项目部id   value 日报中A+B类设备id集合
+        Map<Long, Set<Long>> projectReportABDeviceIdPair = new HashMap<>();
+        // key项目部id   value项目部包含的队伍id集合
+        Map<Long, Set<Long>> projectTeamPair = new HashMap<>();
+        // 设备ID到其所属部门ID的映射
+        Map<Long, Long> deviceIdToDeptIdMap = new HashMap<>();
+        // key项目部id     value项目部下包含的队伍的 压裂 连油 设备数量
+        Map<Long, Integer> projectDevicePair = new HashMap<>();
+        // 瑞都 A B 类设备id 集合
+        Set<Long> abDeviceCategoryIds = new HashSet<>();
+        // 查询所有瑞都产品类别包含 A B 类
+        IotProductClassifyListReqVO deviceCategoryReqVO = new IotProductClassifyListReqVO();
+        List<IotProductClassifyDO> allDeviceCategories = iotProductClassifyMapper.selectList(deviceCategoryReqVO);
+        if (CollUtil.isNotEmpty(allDeviceCategories)) {
+            allDeviceCategories.forEach(category -> {
+                if ("A".equals(category.getRemark()) || "B".equals(category.getRemark())) {
+                    abDeviceCategoryIds.add(category.getId());
+                }
+            });
+        }
+        // 查询 瑞都 施工状态 字典数据 筛选出施工设备为 LY 的记录
+        Set<String> lyStatuses = new HashSet<>();
+        List<DictDataDO> rdStatuses = dictDataService.getDictDataListByDictType("rdStatus");
+        if (CollUtil.isNotEmpty(rdStatuses)) {
+            rdStatuses.forEach(tech -> {
+                if ("LY".equals(tech.getRemark())) {
+                    lyStatuses.add(tech.getValue());
+                }
+            });
+        }
+        if (CollUtil.isNotEmpty(allDeptPair)) {
+            allDeptPair.forEach((deptId, dept) -> {
+                if ("2".equals(dept.getType())) {
+                    projectDeptIds.add(deptId);
+                    projectDeptNames.add(dept.getName());
+                    projectPair.put(deptId, dept.getName());
+                }
+            });
+            // 遍历所有部门
+            allDeptPair.forEach((deptId, dept) -> {
+                // 找出每个项目部下的队伍
+                if (projectPair.containsKey(dept.getParentId())) {
+                    // 获得当前部门的上级项目部
+                    projectPair.forEach((projectDeptId, projectDept) -> {
+                        if (projectDeptId.equals(dept.getParentId())) {
+                            if (projectTeamPair.containsKey(projectDeptId)) {
+                                Set<Long> teamIds = projectTeamPair.get(projectDeptId);
+                                teamIds.add(deptId);
+                                projectTeamPair.put(projectDeptId, teamIds);
+                            } else {
+                                Set<Long> teamIds = new HashSet<>();
+                                teamIds.add(deptId);
+                                projectTeamPair.put(projectDeptId, teamIds);
+                            }
+                        }
+                    });
+                    // 设置每个队伍与上级项目部对应关系
+                    teamIdProjectIdPair.put(dept.getId(), dept.getParentId());
+                }
+            });
+            // 查询瑞都所有设备
+            IotDevicePageReqVO deviceReqVO = new IotDevicePageReqVO();
+            deviceReqVO.setDeptIds(new ArrayList<>(childDeptIds));
+            List<IotDeviceDO> rdDevices = iotDeviceMapper.selectListAlone(deviceReqVO);
+            // 筛选每个项目部 A B 类设备id集合
+            if (CollUtil.isNotEmpty(rdDevices)) {
+                rdDevices.forEach(device -> {
+                    Long projectId = 0l;
+                    if (teamIdProjectIdPair.containsKey(device.getDeptId())) {
+                        projectId = teamIdProjectIdPair.get(device.getDeptId());
+                    }
+                    if (projectDeptIds.contains(device.getDeptId())) {
+                        projectId = device.getDeptId();
+                    }
+                    if (abDeviceCategoryIds.contains(device.getAssetClass())) {
+                        if (projectABDeviceIdPair.containsKey(projectId)) {
+                            Set<Long> tempDeviceIds = projectABDeviceIdPair.get(projectId);
+                            tempDeviceIds.add(device.getId());
+                            projectABDeviceIdPair.put(projectId, tempDeviceIds);
+                        } else {
+                            Set<Long> tempDeviceIds = new HashSet<>();
+                            tempDeviceIds.add(device.getId());
+                            projectABDeviceIdPair.put(projectId, tempDeviceIds);
+                        }
+                    }
+                });
+            }
+        }
+        // 查询出指定时间区间内 已经填写的日报 再根据设备id 进行筛选 通过设备id 建立项目部 与 日报数量之间的关联
+        // 判断日报中 device_ids 字段中每个设备 是否属于需要统计的 压裂 连油 设备
+        List<IotRdDailyReportDO> dailyReports = iotRdDailyReportMapper.dailyReports(reqVO);
+        // key项目部id     value项目部包含的队伍指定时间区域内日报数量
+        Map<Long, Integer> projectReportPair = new HashMap<>();
+        if (CollUtil.isNotEmpty(dailyReports)) {
+            // 整理出每个项目部下的队伍填报的日报数量
+            dailyReports.forEach(report -> {
+                // 筛选出 可以统计 设备利用率的 日报状态 动迁 施工 施工准备
+                // 区分不同项目部的日报
+                if (lyStatuses.contains(report.getRdStatus())) {
+                    Set<Long> reportDeviceIds = report.getDeviceIds();
+                    // 获得当前日报施工队伍的上级项目部
+                    if (teamIdProjectIdPair.containsKey(report.getDeptId())) {
+                        Long projectId = teamIdProjectIdPair.get(report.getDeptId());
+                        if (projectABDeviceIdPair.containsKey(projectId)) {
+                            // 项目部下所有的AB类设备id集合
+                            Set<Long> tempReportDeviceIds = projectABDeviceIdPair.get(projectId);
+                            Set<Long> crossDeviceIds = CollUtil.isNotEmpty(reportDeviceIds)
+                                    && CollUtil.isNotEmpty(tempReportDeviceIds)
+                                    ? reportDeviceIds.stream() // 流式处理reportDeviceIds
+                                    .filter(tempReportDeviceIds::contains) // 筛选出在tempReportDeviceIds中存在的元素
+                                    .collect(Collectors.toSet()) // 收集为新的Set集合
+                                    : Collections.emptySet(); // 任意集合为空则返回空Set(避免返回null)
+                            if (projectReportABDeviceIdPair.containsKey(projectId)) {
+                                Set<Long> tempDeviceIds = projectReportABDeviceIdPair.get(projectId);
+                                tempDeviceIds.addAll(crossDeviceIds);
+                                projectReportABDeviceIdPair.put(projectId, tempDeviceIds);
+                            } else {
+                                Set<Long> tempDeviceIds = new HashSet<>();
+                                tempDeviceIds.addAll(crossDeviceIds);
+                                projectReportABDeviceIdPair.put(projectId, tempDeviceIds);
+                            }
+                        }
+                    }
+                }
+            });
+
+            // 计算每个项目部的设备利用率 施工的设备数量/设备总数量
+            if (CollUtil.isNotEmpty(projectABDeviceIdPair)) {
+
+                projectABDeviceIdPair.forEach((projectDeptId, deviceIds) -> {
+                    // 项目部下所有AB类设备
+                    Integer projectDeviceCount = deviceIds.size();
+                    // 项目部日报中施工的AB类设备
+                    Integer reportDeviceCount = 0;
+                    if (projectReportABDeviceIdPair.containsKey(projectDeptId)) {
+                        Set<Long> reportDeviceIds = projectReportABDeviceIdPair.get(projectDeptId);
+                        reportDeviceCount = reportDeviceIds.size();
+                    }
+                    ProjectUtilizationRateVo rateVo = new ProjectUtilizationRateVo();
+                    rateVo.setProjectDeptId(projectDeptId);
+                    if (projectPair.containsKey(projectDeptId)) {
+                        rateVo.setProjectDeptName(projectPair.get(projectDeptId));
+                    }
+                    double rate = 0.0;
+                    // 计算设备利用率(处理除数为0的情况)
+                    if (projectDeviceCount > 0 && reportDeviceCount > 0) {
+                        rate = new BigDecimal((double) reportDeviceCount / (projectDeviceCount))
+                                .setScale(4, RoundingMode.HALF_UP)  // 保留4位小数,四舍五入
+                                .doubleValue();;
+                    } else {
+                        rate = 0;
+                    }
+                    rateVo.setUtilizationRate(rate); // 存储计算结果
+                    rates.add(rateVo);
+                });
+            }
+        }
+        // 将返回列表中的 部门名称 去除多语言标识
+        // 处理projectDeptName,截取~~首次出现前的字符串
+        if (CollUtil.isNotEmpty(rates)) {
+            rates.forEach(rateVo -> {
+                String originalName = rateVo.getProjectDeptName();
+                if (StrUtil.isNotBlank(originalName) && originalName.contains("~~")) {
+                    // 截取首次~~之前的部分
+                    String processedName = originalName.substring(0, originalName.indexOf("~~"));
+                    rateVo.setProjectDeptName(processedName);
+                }
+                // 空值或无~~标识时,保留原名称
+            });
+        }
+        rates.sort(Comparator.comparingDouble(ProjectUtilizationRateVo::getUtilizationRate).reversed());
+        return success(rates);
+    }
+
     /**
      * 瑞都 设备利用率 按 队伍 统计
      * @return

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

@@ -13,4 +13,7 @@ public class IotProductClassifyListReqVO {
     @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
     private Integer status;
 
+    @Schema(description = "备注 设备类别 瑞都 A压裂/连油 B C", example = "1")
+    private String remark;
+
 }

+ 1 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/IotProductClassifyMapper.java

@@ -31,6 +31,7 @@ public interface IotProductClassifyMapper extends BaseMapperX<IotProductClassify
     default List<IotProductClassifyDO> selectList(IotProductClassifyListReqVO reqVO) {
         return selectList(new LambdaQueryWrapperX<IotProductClassifyDO>()
                 .likeIfPresent(IotProductClassifyDO::getName, reqVO.getName())
+                .likeIfPresent(IotProductClassifyDO::getRemark, reqVO.getRemark())
                 .eqIfPresent(IotProductClassifyDO::getStatus, reqVO.getStatus()));
     }
     default Long selectCountByParentId(Long parentId) {

+ 7 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotrddailyreport/IotRdDailyReportService.java

@@ -107,6 +107,13 @@ public interface IotRdDailyReportService {
      */
     List<IotRdDailyReportPolylineVO> polylineStatistics(IotRdDailyReportPageReqVO pageReqVO);
 
+    /**
+     * 瑞都 看板 日报统计折线图 以公司为维度 不区分 项目部 队伍
+     *
+     * @param
+     */
+    List<IotRdDailyReportPolylineVO> workloadKanban(IotRdDailyReportPageReqVO pageReqVO);
+
     /**
      * 批量更新瑞都日报 平台井
      *

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

@@ -1111,6 +1111,10 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
         Map<Long, BigDecimal> cumulativeMixSandPair = new HashMap<>();
         // key队伍id/项目部id   value累计 台次 当日泵车台次
         Map<Long, BigDecimal> cumulativePumpTripsPair = new HashMap<>();
+        // key项目部id  value 连油井数
+        Map<Long, Set<Long>> lyWellsPair = new HashMap<>();
+        // key项目部id  value 压裂井数
+        Map<Long, Set<Long>> ylWellsPair = new HashMap<>();
 
         // 队伍id 集合
         Set<Long> teamIds = new HashSet<>();
@@ -1123,6 +1127,9 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
         reqVO.setDeptIds(allRhChildDeptIds);
         List<DeptDO> depts = deptService.getDeptList(reqVO);
 
+        Set<Long> lyTeamIds = new HashSet<>();
+        Set<Long> ylTeamIds = new HashSet<>();
+
         // 构建项目部映射和父子部门关系 瑞都存在日报部门是项目部的情况
         depts.forEach(dept -> {
             if ("2".equals(dept.getType())) {
@@ -1137,6 +1144,13 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
             }
             // 可能是项目部 也可能是队伍
             teamProjectIdPair.put(dept.getId(), dept.getParentId());
+            // 筛选出 连油队伍 压裂队伍
+            if ("LY".equals(dept.getEmail())) {
+                lyTeamIds.add(dept.getId());
+            }
+            if ("YL".equals(dept.getEmail())) {
+                ylTeamIds.add(dept.getId());
+            }
         });
 
         // 累计计算各项 工作量
@@ -1190,6 +1204,30 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
                                         actualValue = BigDecimal.ZERO;
                                     }
                                 }
+                                if (lyTeamIds.contains(report.getDeptId())) {
+                                    // 连油井数
+                                    if (lyWellsPair.containsKey(projectDeptId)) {
+                                        Set<Long> lyWellIds = lyWellsPair.get(projectDeptId);
+                                        lyWellIds.add(report.getTaskId());
+                                        lyWellsPair.put(projectDeptId, lyWellIds);
+                                    } else {
+                                        Set<Long> lyWellIds = new HashSet<>();
+                                        lyWellIds.add(report.getTaskId());
+                                        lyWellsPair.put(projectDeptId, lyWellIds);
+                                    }
+                                }
+                                if (ylTeamIds.contains(report.getDeptId())) {
+                                    // 压裂井数
+                                    if (ylWellsPair.containsKey(projectDeptId)) {
+                                        Set<Long> ylWellIds = ylWellsPair.get(projectDeptId);
+                                        ylWellIds.add(report.getTaskId());
+                                        ylWellsPair.put(projectDeptId, ylWellIds);
+                                    } else {
+                                        Set<Long> ylWellIds = new HashSet<>();
+                                        ylWellIds.add(report.getTaskId());
+                                        ylWellsPair.put(projectDeptId, ylWellIds);
+                                    }
+                                }
                                 if ("个数".equals(unit)) {
                                     // 钻可溶桥塞  钻复合桥塞
                                     tempTotalBridgePlug = tempTotalBridgePlug.add(actualValue);
@@ -1248,7 +1286,7 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
                                     }
                                 }
                                 if ("段数".equals(unit)) {
-                                    // 累计施工层
+                                    // 压裂 累计施工层
                                     tempTotalCumulativeWorkingLayers = tempTotalCumulativeWorkingLayers.add(actualValue);
                                     if (cumulativeWorkingLayersPair.containsKey(projectDeptId)) {
                                         BigDecimal tempWorkingLayer = cumulativeWorkingLayersPair.get(projectDeptId);
@@ -1278,15 +1316,6 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
                                 }
                             }
                         }
-                        // 桥塞(个数)
-                        // 趟数
-                        // 井数
-                        // 小时H
-                        // 油耗L
-                        // 水方量(方)
-                        // 段数 累计施工-层
-                        // 台次 当日仪表/混砂
-                        // 台次 当日泵车台次
                     }
                 }
             });
@@ -1314,6 +1343,12 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
                         .divide(BigDecimal.valueOf(10000), 2, RoundingMode.HALF_UP);
                 statistics.setTotalDailyFuel(FuelWan);
             }
+            // 连油井数
+            Set<Long> lyWellIds = lyWellsPair.get(deptId);
+            statistics.setLyWellCount(CollUtil.isNotEmpty(lyWellIds) ? lyWellIds.size() : 0);
+            // 压裂井数
+            Set<Long> ylWellIds = ylWellsPair.get(deptId);
+            statistics.setYlWellCount(CollUtil.isNotEmpty(ylWellIds) ? ylWellIds.size() : 0);
             result.add(statistics);
         });
 
@@ -1607,6 +1642,24 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
         return result;
     }
 
+    @Override
+    public List<IotRdDailyReportPolylineVO> workloadKanban(IotRdDailyReportPageReqVO pageReqVO) {
+        // 看板 工作量折线图 以公司为维度统计 不区分项目部 施工队伍
+        List<IotRdDailyReportPolylineVO> result = new ArrayList<>();
+
+        Set<Long> ids = new HashSet<>();
+        ids = deptService.getChildDeptIdListFromCache(163l);
+        // 找到所有子部门对象集合
+        ids.add(163l);
+        pageReqVO.setDeptIds(ids);
+        // 筛选审核通过的数据
+        List<IotRdDailyReportDO> dailyReports = iotRdDailyReportMapper.dailyReports(pageReqVO);
+        if (CollUtil.isNotEmpty(dailyReports)) {
+            result = polylineStatisticsByCompany(dailyReports, pageReqVO, pageReqVO.getCreateTime());
+        }
+        return result;
+    }
+
     /**
      * 按项 日期 维度统计 折线 工作量 数据
      * @param dailyReports 日报数据列表
@@ -1841,6 +1894,286 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
         return result;
     }
 
+    /**
+     * 瑞都 看板 日报统计折线图 以公司为维度 不区分 项目部 队伍
+     * @param dailyReports 日报数据列表
+     * @param pageReqVO 瑞都 163 timeType month quarter year
+     * @return
+     */
+    private List<IotRdDailyReportPolylineVO> polylineStatisticsByCompany(List<IotRdDailyReportDO> dailyReports,
+                                                                         IotRdDailyReportPageReqVO pageReqVO, LocalDateTime[] createTimes) {
+        List<IotRdDailyReportPolylineVO> result = new ArrayList<>();
+        // 按照日期维度统计数据
+        Set<Long> projectDeptIds = new HashSet<>();
+        // key项目部id    value项目部名称
+        Map<Long, DeptDO> projectDeptPair = new HashMap<>();
+        // key部门id   value部门parentId
+        Map<Long, Long> teamProjectIdPair = new HashMap<>();
+
+        // 按照日期维度统计各工作量数据
+        // key日期yyyy-MM-dd   value 累计 桥塞(个数)
+        Map<String, BigDecimal> dateBridgePlugPair = new HashMap<>();
+        // key日期yyyy-MM-dd   value 累计 趟数
+        Map<String, BigDecimal> dateRunCountPair = new HashMap<>();
+        // key日期yyyy-MM-dd   value 累计 井数
+        Map<String, BigDecimal> dateWorkingWellPair = new HashMap<>();
+        // key日期yyyy-MM-dd   value 累计 小时H
+        Map<String, BigDecimal> dateHourCountPair = new HashMap<>();
+        // key日期yyyy-MM-dd   value 累计 水方量(方)
+        Map<String, BigDecimal> dateWaterVolumePair = new HashMap<>();
+        // key日期yyyy-MM-dd   value 累计 台次 泵车
+        Map<String, BigDecimal> datePumpTripsPair = new HashMap<>();
+        // key日期MM  value 累计 压裂 段数 累计施工-层
+        Map<String, BigDecimal> dateWorkingLayersPair = new HashMap<>();
+        // key日期yyyy-MM-dd  value 累计 台次 当日仪表/混砂
+        Map<String, BigDecimal> dateMixSandPair = new HashMap<>();
+        // key日期yyyy-MM-dd  value 累计 油耗
+        Map<String, BigDecimal> dateFuelsPair = new HashMap<>();
+        // key日期MM  value 连油井数
+        Map<String, Set<Long>> lyWellsPair = new HashMap<>();
+        // key日期MM  value 压裂井数
+        Map<String, Set<Long>> ylWellsPair = new HashMap<>();
+
+        // 以项目部为维度统计数据
+        // 找到所有项目部与队伍的对应关系
+        // 查询指定根部门下的所有子部门
+        Set<Long> allRhChildDeptIds = deptService.getChildDeptIdListFromCache(163l);
+        DeptListReqVO reqVO = new DeptListReqVO();
+        reqVO.setDeptIds(allRhChildDeptIds);
+        List<DeptDO> depts = deptService.getDeptList(reqVO);
+
+        Set<Long> lyTeamIds = new HashSet<>();
+        Set<Long> ylTeamIds = new HashSet<>();
+        // 构建项目部映射和父子部门关系
+        depts.forEach(dept -> {
+            if ("2".equals(dept.getType())) {
+                projectDeptIds.add(dept.getId());
+                projectDeptPair.put(dept.getId(), dept);
+            }
+            teamProjectIdPair.put(dept.getId(), dept.getParentId());
+            // 筛选出 连油队伍 压裂队伍
+            if ("LY".equals(dept.getEmail())) {
+                lyTeamIds.add(dept.getId());
+            }
+            if ("YL".equals(dept.getEmail())) {
+                ylTeamIds.add(dept.getId());
+            }
+        });
+
+        // 累计计算各项指标
+        if (CollUtil.isNotEmpty(dailyReports)) {
+            dailyReports.forEach(report -> {
+                BigDecimal dailyFuel = report.getDailyFuel();
+                dailyFuel = ObjUtil.isEmpty(dailyFuel) ? BigDecimal.ZERO : dailyFuel;
+
+                // 按照日期维度统计各 工作量数据 累计用电量 累计油耗 累计注气量 累计注水量
+                LocalDateTime reportLocalDate = report.getCreateTime();
+                // 获取月份 (1-12)
+                int monthValue = reportLocalDate.getMonthValue();
+                String reportDateStr = monthValue + "月";
+                // 将日期格式转换成 字符串
+                // String reportDateStr = LocalDateTimeUtil.format(reportLocalDate, DatePattern.NORM_DATE_PATTERN);
+                if (dateFuelsPair.containsKey(reportDateStr)) {
+                    BigDecimal existTotalFuel = dateFuelsPair.get(reportDateStr);
+                    BigDecimal tempTotalFuel = existTotalFuel.add(dailyFuel);
+                    dateFuelsPair.put(reportDateStr, tempTotalFuel);
+                } else {
+                    dateFuelsPair.put(reportDateStr, dailyFuel);
+                }
+
+                // 设置每个任务的工作量数据  单位相同的工作量值作合并处理
+                List<IotTaskAttrModelProperty> taskAttrs = report.getExtProperty();
+                // 暂存不同单位的工作量属性值
+                BigDecimal tempTotalBridgePlug = BigDecimal.ZERO;               // 桥塞(个数)
+                BigDecimal tempTotalRunCount = BigDecimal.ZERO;                 // 趟数
+                BigDecimal tempTotalCumulativeWorkingWell = BigDecimal.ZERO;    // 井数
+                BigDecimal tempTotalHourCount = BigDecimal.ZERO;                // 小时H
+                BigDecimal tempTotalWaterVolume = BigDecimal.ZERO;              // 水方量(方)
+                BigDecimal tempTotalPumpTrips = BigDecimal.ZERO;                // 泵车 台次
+                BigDecimal tempTotalCumulativeWorkingLayers = BigDecimal.ZERO;  // 段数 累计施工-层
+                BigDecimal tempTotalMixSand = BigDecimal.ZERO;                  // 台次 当日仪表/混砂
+
+                if (CollUtil.isNotEmpty(taskAttrs)) {
+                    for (IotTaskAttrModelProperty attr : taskAttrs) {
+                        String unit = attr.getUnit();   // 工作量单位
+                        String actualValueStr = attr.getActualValue();  // 工作量属性的实际值
+                        // 处理实际值:避免null或非数字字符串导致的异常
+                        BigDecimal actualValue = BigDecimal.ZERO;
+                        if (StrUtil.isNotBlank(actualValueStr)) {  // 假设使用Hutool的StrUtil,或自行判断null/空
+                            try {
+                                actualValue = new BigDecimal(actualValueStr);
+                            } catch (NumberFormatException e) {
+                                // 若字符串格式错误,默认按0处理(可根据业务调整)
+                                actualValue = BigDecimal.ZERO;
+                            }
+                        }
+                        if (lyTeamIds.contains(report.getDeptId())) {
+                            // 连油井数
+                            if (lyWellsPair.containsKey(reportDateStr)) {
+                                Set<Long> lyWellIds = lyWellsPair.get(reportDateStr);
+                                lyWellIds.add(report.getTaskId());
+                                lyWellsPair.put(reportDateStr, lyWellIds);
+                            } else {
+                                Set<Long> lyWellIds = new HashSet<>();
+                                lyWellIds.add(report.getTaskId());
+                                lyWellsPair.put(reportDateStr, lyWellIds);
+                            }
+                        }
+                        if (ylTeamIds.contains(report.getDeptId())) {
+                            // 压裂井数
+                            if (ylWellsPair.containsKey(reportDateStr)) {
+                                Set<Long> ylWellIds = ylWellsPair.get(reportDateStr);
+                                ylWellIds.add(report.getTaskId());
+                                ylWellsPair.put(reportDateStr, ylWellIds);
+                            } else {
+                                Set<Long> ylWellIds = new HashSet<>();
+                                ylWellIds.add(report.getTaskId());
+                                ylWellsPair.put(reportDateStr, ylWellIds);
+                            }
+                        }
+                        if ("个数".equals(unit)) {
+                            // 钻可溶桥塞  钻复合桥塞
+                            tempTotalBridgePlug = tempTotalBridgePlug.add(actualValue);
+                            if (dateBridgePlugPair.containsKey(reportDateStr)) {
+                                BigDecimal tempBridgePlug = dateBridgePlugPair.get(reportDateStr);
+                                dateBridgePlugPair.put(reportDateStr, tempTotalBridgePlug.add(tempBridgePlug));
+                            } else {
+                                dateBridgePlugPair.put(reportDateStr, tempTotalBridgePlug);
+                            }
+                        }
+                        if ("趟数".equals(unit)) {
+                            tempTotalRunCount = tempTotalRunCount.add(actualValue);
+                            if (dateRunCountPair.containsKey(reportDateStr)) {
+                                BigDecimal tempRunCount = dateRunCountPair.get(reportDateStr);
+                                dateRunCountPair.put(reportDateStr, tempTotalRunCount.add(tempRunCount));
+                            } else {
+                                dateRunCountPair.put(reportDateStr, tempTotalRunCount);
+                            }
+                        }
+                        if ("小时".equals(unit)) {
+                            tempTotalHourCount = tempTotalHourCount.add(actualValue);
+                            if (dateHourCountPair.containsKey(reportDateStr)) {
+                                BigDecimal tempHourCount = dateHourCountPair.get(reportDateStr);
+                                dateHourCountPair.put(reportDateStr, tempTotalHourCount.add(tempHourCount));
+                            } else {
+                                dateHourCountPair.put(reportDateStr, tempTotalHourCount);
+                            }
+                        }
+                        if ("天数".equals(unit)) {
+                            // 将 actualValue 换算成 H
+                            BigDecimal hours = actualValue.multiply(new BigDecimal("24"));
+                            tempTotalHourCount = tempTotalHourCount.add(hours);
+                            if (dateHourCountPair.containsKey(reportDateStr)) {
+                                BigDecimal tempHourCount = dateHourCountPair.get(reportDateStr);
+                                dateHourCountPair.put(reportDateStr, tempTotalHourCount.add(tempHourCount));
+                            } else {
+                                dateHourCountPair.put(reportDateStr, tempTotalHourCount);
+                            }
+                        }
+                        if ("方".equals(unit)) {
+                            tempTotalWaterVolume = tempTotalWaterVolume.add(actualValue);
+                            if (dateWaterVolumePair.containsKey(reportDateStr)) {
+                                BigDecimal tempWaterVolume = dateWaterVolumePair.get(reportDateStr);
+                                dateWaterVolumePair.put(reportDateStr, tempTotalWaterVolume.add(tempWaterVolume));
+                            } else {
+                                dateWaterVolumePair.put(reportDateStr, tempTotalWaterVolume);
+                            }
+                        }
+                        if ("井数".equals(unit)) {
+                            tempTotalCumulativeWorkingWell = tempTotalCumulativeWorkingWell.add(actualValue);
+                            if (dateWorkingWellPair.containsKey(reportDateStr)) {
+                                BigDecimal tempWorkingWell = dateWorkingWellPair.get(reportDateStr);
+                                dateWorkingWellPair.put(reportDateStr, tempTotalCumulativeWorkingWell.add(tempWorkingWell));
+                            } else {
+                                dateWorkingWellPair.put(reportDateStr, tempTotalCumulativeWorkingWell);
+                            }
+                        }
+                        if ("段数".equals(unit) && ylTeamIds.contains(report.getDeptId())) {
+                            // 压裂 累计施工层
+                            tempTotalCumulativeWorkingLayers = tempTotalCumulativeWorkingLayers.add(actualValue);
+                            if (dateWorkingLayersPair.containsKey(reportDateStr)) {
+                                BigDecimal tempWorkingLayer = dateWorkingLayersPair.get(reportDateStr);
+                                dateWorkingLayersPair.put(reportDateStr, tempTotalCumulativeWorkingLayers.add(tempWorkingLayer));
+                            } else {
+                                dateWorkingLayersPair.put(reportDateStr, tempTotalCumulativeWorkingLayers);
+                            }
+                        }
+                        if ("台次".equals(unit) && "当日泵车台次".equals(attr.getName())) {
+                            // 核心工作量 泵车台次
+                            tempTotalPumpTrips = tempTotalPumpTrips.add(actualValue);
+                            if (datePumpTripsPair.containsKey(reportDateStr)) {
+                                BigDecimal tempPumpTrips = datePumpTripsPair.get(reportDateStr);
+                                datePumpTripsPair.put(reportDateStr, tempTotalPumpTrips.add(tempPumpTrips));
+                            } else {
+                                datePumpTripsPair.put(reportDateStr, tempTotalPumpTrips);
+                            }
+                        }
+                        if ("台次".equals(unit) && ("当日仪表/混砂".equals(attr.getName())
+                                || "当日混砂".equals(attr.getName()) || "当日仪表".equals(attr.getName()))) {
+                            tempTotalMixSand = tempTotalMixSand.add(actualValue);
+                            if (dateMixSandPair.containsKey(reportDateStr)) {
+                                BigDecimal tempMixSand = dateMixSandPair.get(reportDateStr);
+                                dateMixSandPair.put(reportDateStr, actualValue.add(tempMixSand));
+                            } else {
+                                dateMixSandPair.put(reportDateStr, tempTotalMixSand);
+                            }
+                        }
+                    }
+                }
+            });
+        }
+
+        // 日期字符串集合
+        List<String> dateRangeList = new ArrayList<>();
+
+        if (ObjUtil.isNotEmpty(createTimes) && createTimes.length >= 2) {
+            // 取起始年份
+            int year = createTimes[0].getYear();
+
+            // 生成1-12月
+            for (int month = 1; month <= 12; month++) {
+                dateRangeList.add(month + "月");
+            }
+        }
+        // 全年 展示每个月的数据
+        if (CollUtil.isNotEmpty(dateRangeList)) {
+            dateRangeList.forEach(date -> {
+                IotRdDailyReportPolylineVO statistics = new IotRdDailyReportPolylineVO();
+                statistics.setReportDate(date);
+                statistics.setCumulativeBridgePlug(dateBridgePlugPair.get(date));
+                statistics.setCumulativeRunCount(dateRunCountPair.get(date));
+                statistics.setCumulativeWorkingWell(dateWorkingWellPair.get(date));
+                statistics.setCumulativeHourCount(dateHourCountPair.get(date));
+                statistics.setCumulativeFuels(dateFuelsPair.get(date));
+                statistics.setCumulativeWaterVolume(dateWaterVolumePair.get(date));
+                statistics.setCumulativeWorkingLayers(dateWorkingLayersPair.get(date));
+                BigDecimal taici = BigDecimal.ZERO;
+                // 合并 仪表混砂 泵车 的台次
+                if (CollUtil.isNotEmpty(dateMixSandPair)) {
+                    BigDecimal mixSand = dateMixSandPair.get(date);
+                    mixSand = ObjUtil.isNotEmpty(mixSand) ? mixSand : BigDecimal.ZERO;
+                    taici = taici.add(mixSand);
+                }
+                if (CollUtil.isNotEmpty(datePumpTripsPair)) {
+                    BigDecimal pumpTrips = datePumpTripsPair.get(date);
+                    pumpTrips = ObjUtil.isNotEmpty(pumpTrips) ? pumpTrips : BigDecimal.ZERO;
+                    taici = taici.add(pumpTrips);
+                }
+                statistics.setCumulativeMixSand(dateMixSandPair.get(date));
+                statistics.setCumulativePumpTrips(datePumpTripsPair.get(date));
+                statistics.setTaici(taici);
+                // 连油井数
+                Set<Long> lyWellIds = lyWellsPair.get(date);
+                statistics.setLyWellCount(CollUtil.isNotEmpty(lyWellIds) ? lyWellIds.size() : 0);
+                // 压裂井数
+                Set<Long> ylWellIds = ylWellsPair.get(date);
+                statistics.setYlWellCount(CollUtil.isNotEmpty(ylWellIds) ? ylWellIds.size() : 0);
+                result.add(statistics);
+            });
+        }
+        return result;
+    }
+
     @Override
     public void saveBatch(List<IotRdDailyReportSaveReqVO> reports) {
         if (CollUtil.isEmpty(reports)) {