|
|
@@ -69,14 +69,14 @@ public class CreateRdDailyReportOrderJob implements JobHandler {
|
|
|
String currentFormatDateStr = LocalDateTimeUtil.format(currentDate, "yyyy-MM-dd");
|
|
|
// 前一天的日期
|
|
|
LocalDateTime yesterday = currentDate.minusDays(1);
|
|
|
- // 需要生成日报的 任务集合
|
|
|
+ // 需要生成日报的 任务(井号) 集合
|
|
|
Set<Long> taskIds = new HashSet<>();
|
|
|
if (CollUtil.isNotEmpty(dailyReports)) {
|
|
|
dailyReports.forEach(report -> {
|
|
|
- // 查询 创建时间 不包含当天的日报
|
|
|
+ // 查询当天生成的日报
|
|
|
LocalDateTime createDate = report.getCreateTime();
|
|
|
String formatDateStr = LocalDateTimeUtil.format(createDate, "yyyy-MM-dd");
|
|
|
- if (!formatDateStr.equals(currentFormatDateStr)) {
|
|
|
+ if (formatDateStr.equals(currentFormatDateStr)) {
|
|
|
taskIds.add(report.getTaskId());
|
|
|
}
|
|
|
});
|
|
|
@@ -110,7 +110,7 @@ public class CreateRdDailyReportOrderJob implements JobHandler {
|
|
|
Map<Long, DeptDO> deptPair = deptService.getDeptMap(deptIds);
|
|
|
// 以任务为维度 生成瑞都日报 部门为任务配置的工单填报人对应的部门
|
|
|
tasks.forEach(task -> {
|
|
|
- if (taskIds.contains(task.getId()) && CollUtil.isNotEmpty(task.getSubmitter())) {
|
|
|
+ if (!taskIds.contains(task.getId()) && CollUtil.isNotEmpty(task.getSubmitter())) {
|
|
|
// 生成当天的日报
|
|
|
IotRdDailyReportDO report = new IotRdDailyReportDO();
|
|
|
if (taskSubmitterPair.containsKey(task.getId())) {
|