Эх сурвалжийг харах

pms 瑞恒 日报导出 添加累计值

zhangcl 3 өдөр өмнө
parent
commit
fa5414949c

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

@@ -112,6 +112,8 @@ public class IotRdDailyReportSaveReqVO {
     @Schema(description = "其它非生产时间原因")
     private String otherNptReason;
 
+    @Schema(description = "非生产时间时效")
+    private BigDecimal nptRate;
 
     @Schema(description = "施工开始日期")
     private LocalDateTime constructionStartDate;

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

@@ -738,19 +738,39 @@ public class IotRhDailyReportController {
             // 2.1 拼接部门信息
             findAndThen(deptMap, reportVO.getDeptId(), dept -> reportVO.setDeptName(dept.getName()));
             // 队伍当年累计注气量
-            findAndThen(yearGasInjectionPair, reportVO.getDeptId(), gasInjection -> reportVO.setYearTotalGasInjection(gasInjection));
+            findAndThen(yearGasInjectionPair, reportVO.getDeptId(), gasInjection -> {
+                // 转换单位为 万方
+                BigDecimal gasInjectionWanFang = gasInjection
+                        .divide(BigDecimal.valueOf(10000), 2, RoundingMode.HALF_UP);
+                reportVO.setYearTotalGasInjection(gasInjectionWanFang);
+            });
             // 队伍当年累计注水量
             findAndThen(yearWaterInjectionPair, reportVO.getDeptId(), waterInjection -> reportVO.setYearTotalWaterInjection(waterInjection));
             // 队伍当年累计用电量
-            findAndThen(yearPowerPair, reportVO.getDeptId(), power -> reportVO.setYearTotalPower(power));
+            findAndThen(yearPowerPair, reportVO.getDeptId(), power -> {
+                // 换算单位为 MWh
+                BigDecimal powerW = power
+                        .divide(BigDecimal.valueOf(1000), 2, RoundingMode.HALF_UP);
+                reportVO.setYearTotalPower(powerW);
+            });
             // 队伍当年累计油耗
             findAndThen(yearFuelPair, reportVO.getDeptId(), fuel -> reportVO.setYearTotalFuel(fuel));
             // 井当年累计注气量
-            findAndThen(wellGasInjectionPair, reportVO.getTaskId(), gasInjection -> reportVO.setWellTotalGasInjection(gasInjection));
+            findAndThen(wellGasInjectionPair, reportVO.getTaskId(), gasInjection -> {
+                // 转换单位为 万方
+                BigDecimal gasInjectionWanFang = gasInjection
+                        .divide(BigDecimal.valueOf(10000), 2, RoundingMode.HALF_UP);
+                reportVO.setWellTotalGasInjection(gasInjectionWanFang);
+            });
             // 井当年累计注水量
             findAndThen(wellWaterInjectionPair, reportVO.getTaskId(), waterInjection -> reportVO.setWellTotalWaterInjection(waterInjection));
             // 井当年累计用电量
-            findAndThen(wellPowerPair, reportVO.getTaskId(), power -> reportVO.setWellTotalPower(power));
+            findAndThen(wellPowerPair, reportVO.getTaskId(), power -> {
+                // 换算单位为 MWh
+                BigDecimal powerW = power
+                        .divide(BigDecimal.valueOf(1000), 2, RoundingMode.HALF_UP);
+                reportVO.setWellTotalPower(powerW);
+            });
             // 井当年累计油耗
             findAndThen(wellFuelPair, reportVO.getTaskId(), fuel -> reportVO.setWellTotalFuel(fuel));
             // 2.2 日报关联的项目信息
@@ -760,7 +780,13 @@ public class IotRhDailyReportController {
             // 2.4 设计注气量
             findAndThen(taskExtPropertyPair, reportVO.getTaskId(), designInjection -> reportVO.setDesignInjection(designInjection));
             // 2.5 搬迁安装天数
-            findAndThen(relocationDaysPair, reportVO.getDeptId(), relocationDays -> reportVO.setRelocationDays(relocationDays));
+            findAndThen(relocationDaysPair, reportVO.getDeptId(), relocationDays -> {
+                if (relocationDays.compareTo(BigDecimal.ZERO) < 0) {
+                    reportVO.setRelocationDays(BigDecimal.ZERO);
+                } else {
+                    reportVO.setRelocationDays(relocationDays);
+                }
+            });
             // 2.6 产能
             findAndThen(capacityPair.get(), reportVO.getDeptId(), capacity -> reportVO.setCapacity(capacity));
             // 施工状态 数据字典

+ 19 - 8
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrhdailyreport/vo/IotRhDailyReportRespVO.java

@@ -195,22 +195,33 @@ public class IotRhDailyReportRespVO {
     @Schema(description = "日报关联的油耗记录")
     private List<IotDailyReportFuelDO> reportFuels;
 
-    @Schema(description = "队伍当年累计注气量")
+    @Schema(description = "年累计注气量(万方)")
+    @ExcelProperty("年累计注气量(万方)")
     private BigDecimal yearTotalGasInjection;
-    @Schema(description = "队伍当年累计注水量")
+
+    @Schema(description = "年累计注水量(方)")
+    @ExcelProperty("年累计注水量(方)")
     private BigDecimal yearTotalWaterInjection;
-    @Schema(description = "队伍当年累计用电量")
+
+    @Schema(description = "年累计用电量(MWh)")
+    @ExcelProperty("年累计用电量(MWh)")
     private BigDecimal yearTotalPower;
-    @Schema(description = "队伍当年累计油耗")
+
+    @Schema(description = "年累计油耗(L)")
+    @ExcelProperty("年累计油耗(L)")
     private BigDecimal yearTotalFuel;
 
-    @Schema(description = "井累计注气量")
+    @Schema(description = "井累计注气量(万方)")
+    @ExcelProperty("井累计注气量(万方)")
     private BigDecimal wellTotalGasInjection;
-    @Schema(description = "井累计注水量")
+    @Schema(description = "井累计注水量(方)")
+    @ExcelProperty("井累计注水量(方)")
     private BigDecimal wellTotalWaterInjection;
-    @Schema(description = "井累计用电量")
+    @Schema(description = "井累计用电量(MWh)")
+    @ExcelProperty("井累计用电量(MWh)")
     private BigDecimal wellTotalPower;
-    @Schema(description = "井累计油耗")
+    @Schema(description = "井累计油耗(L)")
+    @ExcelProperty("井累计油耗(L)")
     private BigDecimal wellTotalFuel;
 
 

+ 4 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/iotrddailyreport/IotRdDailyReportDO.java

@@ -183,6 +183,10 @@ public class IotRdDailyReportDO extends BaseDO {
      * 其它非生产时间
      */
     private BigDecimal otherNptTime;
+    /**
+     * 非生产时效
+     */
+    private BigDecimal nptRate;
     /**
      * 其它非生产时间原因
      */