Explorar o código

巡查提醒推送,推送当天有安排的

周箭河 %!s(int64=4) %!d(string=hai) anos
pai
achega
1af059c776

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/InspectionItemPlanServiceImpl.java

@@ -168,8 +168,8 @@ public class InspectionItemPlanServiceImpl extends BaseServiceImpl<Long, Inspect
     @Override
     public List<InspectionItemPlan> pushNotice() {
         Date nowDate = new Date();
-        Date startTime = DateUtil.getFirstDayOfMonth(nowDate);
-        Date endTime = DateUtil.getLastTimeWithDay(DateUtil.getLastDayOfMonth(nowDate));
+        Date startTime = DateUtil.trunc(nowDate);
+        Date endTime = DateUtil.getLastTimeWithDay(nowDate);
         List<InspectionItemPlan> startPlans = inspectionItemPlanDao.getStartPlan(startTime, endTime);
         Set<Integer> userIds = startPlans.stream().map(InspectionItemPlan::getUserId).collect(Collectors.toSet());
         //发送推送信息