|
|
@@ -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));
|
|
|
// 施工状态 数据字典
|