|
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.pms.controller.admin.iotrhdailyreport;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.date.DatePattern;
|
|
import cn.hutool.core.date.DatePattern;
|
|
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
|
|
|
|
+import cn.hutool.core.util.NumberUtil;
|
|
|
import cn.hutool.core.util.ObjUtil;
|
|
import cn.hutool.core.util.ObjUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
|
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
|
@@ -756,6 +757,8 @@ public class IotRhDailyReportController {
|
|
|
Map<Long, String> taskLocationPair = new HashMap<>();
|
|
Map<Long, String> taskLocationPair = new HashMap<>();
|
|
|
// key任务id value设计注气量
|
|
// key任务id value设计注气量
|
|
|
Map<Long, String> taskExtPropertyPair = new HashMap<>();
|
|
Map<Long, String> taskExtPropertyPair = new HashMap<>();
|
|
|
|
|
+ // key任务id value设计注气量 冗余
|
|
|
|
|
+ Map<Long, String> taskWorkloadDesignPair = new HashMap<>();
|
|
|
// key施工状态数据字典value value施工状态数据字典label
|
|
// key施工状态数据字典value value施工状态数据字典label
|
|
|
Map<String, String> constructStatusPair = new HashMap<>();
|
|
Map<String, String> constructStatusPair = new HashMap<>();
|
|
|
// key非生产时间原因数据字典value value非生产时间原因数据字典label
|
|
// key非生产时间原因数据字典value value非生产时间原因数据字典label
|
|
@@ -1015,6 +1018,12 @@ public class IotRhDailyReportController {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ // 任务设计工作量 注气量 单位 方 转换成 万方
|
|
|
|
|
+ if (NumberUtil.isNumber(task.getWorkloadDesign())) {
|
|
|
|
|
+ BigDecimal workload = new BigDecimal(task.getWorkloadDesign());
|
|
|
|
|
+ BigDecimal convertedWorkload = workload.divide(BigDecimal.valueOf(10000), 2, RoundingMode.HALF_UP);
|
|
|
|
|
+ taskWorkloadDesignPair.put(task.getId(), convertedWorkload.toString());
|
|
|
|
|
+ }
|
|
|
// 设置每个任务对应的施工工艺数据字典label
|
|
// 设置每个任务对应的施工工艺数据字典label
|
|
|
if (techniquePair.containsKey(task.getTechnique())) {
|
|
if (techniquePair.containsKey(task.getTechnique())) {
|
|
|
String techniqueLabel = techniquePair.get(task.getTechnique());
|
|
String techniqueLabel = techniquePair.get(task.getTechnique());
|
|
@@ -1129,6 +1138,10 @@ public class IotRhDailyReportController {
|
|
|
findAndThen(taskLocationPair, reportVO.getTaskId(), location -> reportVO.setLocation(location));
|
|
findAndThen(taskLocationPair, reportVO.getTaskId(), location -> reportVO.setLocation(location));
|
|
|
// 2.4 设计注气量
|
|
// 2.4 设计注气量
|
|
|
findAndThen(taskExtPropertyPair, reportVO.getTaskId(), designInjection -> reportVO.setDesignInjection(designInjection));
|
|
findAndThen(taskExtPropertyPair, reportVO.getTaskId(), designInjection -> reportVO.setDesignInjection(designInjection));
|
|
|
|
|
+ // 如果扩展属性中 设计注气量 为空 则使用 设计工作量 的值
|
|
|
|
|
+ if (StrUtil.isBlank(reportVO.getDesignInjection())) {
|
|
|
|
|
+ reportVO.setDesignInjection(taskWorkloadDesignPair.get(reportVO.getTaskId()));
|
|
|
|
|
+ }
|
|
|
// 2.5 搬迁安装天数
|
|
// 2.5 搬迁安装天数
|
|
|
findAndThen(relocationDaysPair, reportVO.getDeptId(), relocationDays -> {
|
|
findAndThen(relocationDaysPair, reportVO.getDeptId(), relocationDays -> {
|
|
|
if (relocationDays.compareTo(BigDecimal.ZERO) < 0) {
|
|
if (relocationDays.compareTo(BigDecimal.ZERO) < 0) {
|