diff --git a/src/main/java/com/biutag/supervision/job/Job.java b/src/main/java/com/biutag/supervision/job/Job.java index 93ca6e5..bee125a 100644 --- a/src/main/java/com/biutag/supervision/job/Job.java +++ b/src/main/java/com/biutag/supervision/job/Job.java @@ -62,18 +62,21 @@ public class Job { } // 每日04:00更新基础数据 - @Scheduled(cron = "0 0 23 * * ?") + @Scheduled(cron = "0 0 4 * * ?") public void updateBaseData() { // 0秒 log.info("获取数据-------updateBaseData-----------"); - //LocalDateTime.now().minusDays(1).withHour(0).withMinute(0).withSecond(0).withNano(0).atZone(ZoneId.systemDefault()).toInstant() - //LocalDateTime.now().minusDays(1).withHour(23).withMinute(59).withSecond(59).atZone(ZoneId.systemDefault()).toInstant() + + LocalDateTime firstDay = LocalDate.now() .withDayOfYear(1) .atStartOfDay(); List happenTime = new ArrayList<>(); - Date start = Date.from(firstDay.atZone(ZoneId.systemDefault()).toInstant()); - Date end = Date.from(LocalDateTime.now().atZone(ZoneId.systemDefault()).toInstant()); +// Date start = Date.from(firstDay.atZone(ZoneId.systemDefault()).toInstant()); +// Date end = Date.from(LocalDateTime.now().atZone(ZoneId.systemDefault()).toInstant()); + Date start = Date.from(LocalDateTime.now().minusDays(1).withHour(0).withMinute(0).withSecond(0).withNano(0).atZone(ZoneId.systemDefault()).toInstant()); + Date end = Date.from(LocalDateTime.now().minusDays(1).withHour(23).withMinute(59).withSecond(59).atZone(ZoneId.systemDefault()).toInstant()); + happenTime.add(start); happenTime.add(end); businessDepartService.generate(happenTime); diff --git a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java index 1ffa56e..9ab5637 100644 --- a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java @@ -249,7 +249,7 @@ public interface NegativeMapper extends BaseMapper { "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "WHERE sd.statistics_group_id=3 " + "GROUP BY sd.short_name " + - "ORDER BY totalPro DESC;") + "ORDER BY completedRate DESC;") List getSupervisionMapIconInfo(Date beginTime, Date endTime);