Bladeren bron

Merge remote-tracking branch 'origin/master'

lipenghui 1 dag geleden
bovenliggende
commit
145138945e

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

@@ -852,33 +852,21 @@ public class IotRdDailyReportController {
                 // 循环遍历 获取 每个 维度 工作量的值
                 if ("cumulativeBridgePlug".equals(stat.getDeptName())) {
                     resultMap.put("cumulativeBridgePlug", stat.getCumulativeBridgePlug());
-                } else {
-                    resultMap.put("cumulativeBridgePlug", BigDecimal.ZERO);
                 }
                 if ("cumulativeRunCount".equals(stat.getDeptName())) {
                     resultMap.put("cumulativeRunCount", stat.getCumulativeRunCount());
-                } else {
-                    resultMap.put("cumulativeRunCount", BigDecimal.ZERO);
                 }
                 if ("cumulativeWorkingWell".equals(stat.getDeptName())) {
                     resultMap.put("cumulativeWorkingWell", stat.getCumulativeWorkingWell());
-                } else {
-                    resultMap.put("cumulativeWorkingWell", BigDecimal.ZERO);
                 }
                 if ("cumulativeHourCount".equals(stat.getDeptName())) {
                     resultMap.put("cumulativeHourCount", stat.getCumulativeHourCount());
-                } else {
-                    resultMap.put("cumulativeHourCount", BigDecimal.ZERO);
                 }
                 if ("cumulativeWaterVolume".equals(stat.getDeptName())) {
                     resultMap.put("cumulativeWaterVolume", stat.getCumulativeWaterVolume());
-                } else {
-                    resultMap.put("cumulativeWaterVolume", BigDecimal.ZERO);
                 }
                 if ("cumulativeWorkingLayers".equals(stat.getDeptName())) {
                     resultMap.put("cumulativeWorkingLayers", stat.getCumulativeWorkingLayers());
-                } else {
-                    resultMap.put("cumulativeWorkingLayers", BigDecimal.ZERO);
                 }
                 if ("cumulativeMixSand".equals(stat.getDeptName())) {
                     taici[0] = taici[0].add(stat.getCumulativeMixSand());
@@ -889,10 +877,30 @@ public class IotRdDailyReportController {
                 resultMap.put("taici", taici[0]);
                 if ("cumulativeFuels".equals(stat.getDeptName())) {
                     resultMap.put("cumulativeFuels", stat.getTotalDailyFuel());
-                } else {
-                    resultMap.put("cumulativeFuels", BigDecimal.ZERO);
                 }
             });
+            // 没有统计到的工作量设置为0
+            if (!resultMap.containsKey("cumulativeBridgePlug")) {
+                resultMap.put("cumulativeBridgePlug", BigDecimal.ZERO);
+            }
+            if (!resultMap.containsKey("cumulativeRunCount")) {
+                resultMap.put("cumulativeRunCount", BigDecimal.ZERO);
+            }
+            if (!resultMap.containsKey("cumulativeWorkingWell")) {
+                resultMap.put("cumulativeWorkingWell", BigDecimal.ZERO);
+            }
+            if (!resultMap.containsKey("cumulativeHourCount")) {
+                resultMap.put("cumulativeHourCount", BigDecimal.ZERO);
+            }
+            if (!resultMap.containsKey("cumulativeWaterVolume")) {
+                resultMap.put("cumulativeWaterVolume", BigDecimal.ZERO);
+            }
+            if (!resultMap.containsKey("cumulativeWorkingLayers")) {
+                resultMap.put("cumulativeWorkingLayers", BigDecimal.ZERO);
+            }
+            if (!resultMap.containsKey("cumulativeFuels")) {
+                resultMap.put("cumulativeFuels", BigDecimal.ZERO);
+            }
         }
         return success(resultMap);
     }

+ 0 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrhdailyreport/IotRhDailyReportController.java

@@ -824,7 +824,6 @@ public class IotRhDailyReportController {
         // key小组最后1条记录id    value 小计平均运行时效
         Map<Long, BigDecimal> groupIdTransTimePair = new HashMap<>();
 
-
         // 查询 当前分页 所有部门 任务井 日报数据 小计工作量
         IotRhDailyReportPageReqVO currentTaskReqVO = new IotRhDailyReportPageReqVO();
         currentTaskReqVO.setTaskIds(convertSet(reports, IotRhDailyReportDO::getTaskId));

+ 0 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/stat/IotReportOrderController.java

@@ -39,7 +39,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.google.common.collect.ImmutableMap;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
-import jdk.nashorn.internal.ir.annotations.Immutable;
 import lombok.AllArgsConstructor;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;