|
@@ -402,7 +402,8 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
Map<Long, String> taskTechniquePair = new HashMap<>();
|
|
Map<Long, String> taskTechniquePair = new HashMap<>();
|
|
|
// key任务id value任务的施工周期天数
|
|
// key任务id value任务的施工周期天数
|
|
|
Map<Long, String> taskPeriodPair = new HashMap<>();
|
|
Map<Long, String> taskPeriodPair = new HashMap<>();
|
|
|
-
|
|
|
|
|
|
|
+ // key任务id value每个任务的施工开始日期
|
|
|
|
|
+ Map<Long, LocalDateTime> taskStartDatePair = new HashMap<>();
|
|
|
if (CollUtil.isNotEmpty(dailyReports)) {
|
|
if (CollUtil.isNotEmpty(dailyReports)) {
|
|
|
// 遍历日报 找到每个日报关联的任务的 施工队伍
|
|
// 遍历日报 找到每个日报关联的任务的 施工队伍
|
|
|
List<Long> taskIds = convertList(dailyReports, IotRdDailyReportDO::getTaskId);
|
|
List<Long> taskIds = convertList(dailyReports, IotRdDailyReportDO::getTaskId);
|
|
@@ -534,6 +535,19 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
Map<Long, BigDecimal> mixSandPair = new HashMap<>();
|
|
Map<Long, BigDecimal> mixSandPair = new HashMap<>();
|
|
|
|
|
|
|
|
dailyReports.forEach(report -> {
|
|
dailyReports.forEach(report -> {
|
|
|
|
|
+ // 筛选每个日报关联任务的施工开始日期
|
|
|
|
|
+ Long taskId = report.getTaskId();
|
|
|
|
|
+ LocalDateTime createTime = report.getCreateTime();
|
|
|
|
|
+ if (taskStartDatePair.containsKey(taskId)) {
|
|
|
|
|
+ LocalDateTime tempStartDate = taskStartDatePair.get(taskId);
|
|
|
|
|
+ // 找出当前日报关联任务的最早日报日期
|
|
|
|
|
+ if (createTime.isBefore(tempStartDate)) {
|
|
|
|
|
+ taskStartDatePair.put(taskId, createTime);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ taskStartDatePair.put(taskId, createTime);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
BigDecimal dailyFuel = report.getDailyFuel();
|
|
BigDecimal dailyFuel = report.getDailyFuel();
|
|
|
dailyFuel = ObjUtil.isEmpty(dailyFuel) ? BigDecimal.ZERO : dailyFuel;
|
|
dailyFuel = ObjUtil.isEmpty(dailyFuel) ? BigDecimal.ZERO : dailyFuel;
|
|
|
if (taskFuelPair.containsKey(report.getTaskId())) {
|
|
if (taskFuelPair.containsKey(report.getTaskId())) {
|
|
@@ -558,7 +572,6 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
|
|
|
|
|
// 设置每个任务的工作量数据 单位相同的工作量值作合并处理
|
|
// 设置每个任务的工作量数据 单位相同的工作量值作合并处理
|
|
|
List<IotTaskAttrModelProperty> taskAttrs = report.getExtProperty();
|
|
List<IotTaskAttrModelProperty> taskAttrs = report.getExtProperty();
|
|
|
- Long taskId = report.getTaskId();
|
|
|
|
|
// 暂存不同单位的工作量属性值
|
|
// 暂存不同单位的工作量属性值
|
|
|
BigDecimal tempTotalBridgePlug = BigDecimal.ZERO; // 桥塞(个数)
|
|
BigDecimal tempTotalBridgePlug = BigDecimal.ZERO; // 桥塞(个数)
|
|
|
BigDecimal tempTotalRunCount = BigDecimal.ZERO; // 趟数
|
|
BigDecimal tempTotalRunCount = BigDecimal.ZERO; // 趟数
|
|
@@ -731,9 +744,15 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
if (taskPair.containsKey(taskId)) {
|
|
if (taskPair.containsKey(taskId)) {
|
|
|
uniqueReport.setWellName(taskPair.get(taskId));
|
|
uniqueReport.setWellName(taskPair.get(taskId));
|
|
|
}
|
|
}
|
|
|
|
|
+ // 施工周期
|
|
|
if (taskPeriodPair.containsKey(taskId)) {
|
|
if (taskPeriodPair.containsKey(taskId)) {
|
|
|
uniqueReport.setPeriod(taskPeriodPair.get(taskId));
|
|
uniqueReport.setPeriod(taskPeriodPair.get(taskId));
|
|
|
}
|
|
}
|
|
|
|
|
+ // 任务开始日期
|
|
|
|
|
+ if (taskStartDatePair.containsKey(taskId)) {
|
|
|
|
|
+ LocalDateTime startDate = taskStartDatePair.get(taskId);
|
|
|
|
|
+ uniqueReport.setTaskStartDate(LocalDateTimeUtil.format(startDate, DatePattern.NORM_DATE_PATTERN));
|
|
|
|
|
+ }
|
|
|
if (taskStatusPair.containsKey(taskId)) {
|
|
if (taskStatusPair.containsKey(taskId)) {
|
|
|
uniqueReport.setRdStatus(taskStatusPair.get(taskId));
|
|
uniqueReport.setRdStatus(taskStatusPair.get(taskId));
|
|
|
}
|
|
}
|