|
@@ -27,6 +27,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.LocalTime;
|
|
import java.time.LocalTime;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
@@ -73,6 +74,8 @@ public class CreateRdDailyReportOrderJob implements JobHandler {
|
|
|
String currentFormatDateStr = LocalDateTimeUtil.format(currentDate, "yyyy-MM-dd");
|
|
String currentFormatDateStr = LocalDateTimeUtil.format(currentDate, "yyyy-MM-dd");
|
|
|
// 前一天的日期
|
|
// 前一天的日期
|
|
|
LocalDateTime yesterday = currentDate.minusDays(1);
|
|
LocalDateTime yesterday = currentDate.minusDays(1);
|
|
|
|
|
+ // 次日的日期
|
|
|
|
|
+ LocalDateTime nextDay = currentDate.plusDays(1);
|
|
|
// 需要生成日报的 任务(井号) 集合
|
|
// 需要生成日报的 任务(井号) 集合
|
|
|
Set<Long> taskIds = new HashSet<>();
|
|
Set<Long> taskIds = new HashSet<>();
|
|
|
if (CollUtil.isNotEmpty(dailyReports)) {
|
|
if (CollUtil.isNotEmpty(dailyReports)) {
|
|
@@ -85,6 +88,7 @@ public class CreateRdDailyReportOrderJob implements JobHandler {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 查询瑞都相关的项目任务 根据每个任务的填报人进行工单生成和推送
|
|
// 查询瑞都相关的项目任务 根据每个任务的填报人进行工单生成和推送
|
|
|
// 平台井任务只生成主井号任务 关联井在日报中聚合处理
|
|
// 平台井任务只生成主井号任务 关联井在日报中聚合处理
|
|
|
IotProjectTaskPageReqVO taskReqVO = new IotProjectTaskPageReqVO();
|
|
IotProjectTaskPageReqVO taskReqVO = new IotProjectTaskPageReqVO();
|
|
@@ -180,6 +184,15 @@ public class CreateRdDailyReportOrderJob implements JobHandler {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 修改开始:创建专门用于日报的日期时间,将时分秒固定为08:00:00
|
|
|
|
|
+ // 将日期部分保持不变,时间部分设置为08:00:00
|
|
|
|
|
+ LocalDate currentLocalDate = currentDate.toLocalDate();
|
|
|
|
|
+ LocalDate nextLocalDate = nextDay.toLocalDate();
|
|
|
|
|
+
|
|
|
|
|
+ LocalDateTime dailyReportStartTime = LocalDateTime.of(currentLocalDate, LocalTime.of(8, 0, 0));
|
|
|
|
|
+ LocalDateTime dailyReportEndTime = LocalDateTime.of(nextLocalDate, LocalTime.of(8, 0, 0));
|
|
|
|
|
+
|
|
|
report.setProjectId(task.getProjectId());
|
|
report.setProjectId(task.getProjectId());
|
|
|
report.setTaskId(task.getId());
|
|
report.setTaskId(task.getId());
|
|
|
report.setPlatformWell(task.getPlatformWell());
|
|
report.setPlatformWell(task.getPlatformWell());
|
|
@@ -188,8 +201,8 @@ public class CreateRdDailyReportOrderJob implements JobHandler {
|
|
|
report.setDeviceIds(task.getDeviceIds());
|
|
report.setDeviceIds(task.getDeviceIds());
|
|
|
report.setStartTime(LocalTime.of(8, 0, 0));
|
|
report.setStartTime(LocalTime.of(8, 0, 0));
|
|
|
report.setEndTime(LocalTime.of(8, 0, 0));
|
|
report.setEndTime(LocalTime.of(8, 0, 0));
|
|
|
- report.setConstructionStartDate(yesterday);
|
|
|
|
|
- report.setConstructionEndDate(currentDate);
|
|
|
|
|
|
|
+ report.setConstructionStartDate(dailyReportStartTime);
|
|
|
|
|
+ report.setConstructionEndDate(dailyReportEndTime);
|
|
|
Set<Long> submitters = task.getSubmitter();
|
|
Set<Long> submitters = task.getSubmitter();
|
|
|
report.setCreator(String.valueOf(new ArrayList<>(submitters).get(0)));
|
|
report.setCreator(String.valueOf(new ArrayList<>(submitters).get(0)));
|
|
|
report.setCreateTime(LocalDateTime.now());
|
|
report.setCreateTime(LocalDateTime.now());
|