|
@@ -36,6 +36,7 @@ import javax.validation.Valid;
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
|
|
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
|
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
@@ -167,6 +168,8 @@ public class IotRhDailyReportController {
|
|
|
Map<Long, String> taskExtPropertyPair = new HashMap<>();
|
|
|
// 搬迁安装天数
|
|
|
Map<Long, BigDecimal> relocationDaysPair = new HashMap<>();
|
|
|
+ // key部门id value产能
|
|
|
+ AtomicReference<Map<Long, BigDecimal>> capacityPair = new AtomicReference<>(new HashMap<>());
|
|
|
DataPermissionUtils.executeIgnore(() -> {
|
|
|
// 查询日报关联的项目信息
|
|
|
IotProjectInfoPageReqVO reqVO = new IotProjectInfoPageReqVO();
|
|
@@ -197,9 +200,10 @@ public class IotRhDailyReportController {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ // 查询当前日报所属施工队伍中包含 增压机 的产能
|
|
|
+ capacityPair.set(iotRhDailyReportService.queryCapacities(convertList(reports, IotRhDailyReportDO::getDeptId)));
|
|
|
// 查询每个任务的搬迁安装天数
|
|
|
List<IotRhDailyReportDO> relocationDays = iotRhDailyReportService.relocationDays(null);
|
|
|
-
|
|
|
if (CollUtil.isNotEmpty(relocationDays)) {
|
|
|
relocationDays.forEach(day -> {
|
|
|
relocationDaysPair.put(day.getTaskId(), day.getRelocationDays());
|
|
@@ -218,6 +222,8 @@ public class IotRhDailyReportController {
|
|
|
findAndThen(taskExtPropertyPair, reportVO.getTaskId(), designInjection -> reportVO.setDesignInjection(designInjection));
|
|
|
// 2.5 搬迁安装天数
|
|
|
findAndThen(relocationDaysPair, reportVO.getTaskId(), relocationDays -> reportVO.setRelocationDays(relocationDays));
|
|
|
+ // 2.6 产能
|
|
|
+ findAndThen(capacityPair.get(), reportVO.getDeptId(), capacity -> reportVO.setCapacity(capacity));
|
|
|
});
|
|
|
}
|
|
|
|