Bladeren bron

Merge branch 'feature-wcz' of lift-manager/lift-server into develop

wucizhong 5 jaren geleden
bovenliggende
commit
6629fcdc62

+ 5 - 3
lift-business-service/src/main/java/cn/com/ty/lift/business/framework/job/BusinessJob.java

@@ -41,7 +41,7 @@ public class BusinessJob {
      */
     @Scheduled(cron = "0 0/10 1-3 * * ?")
     public void updateMtPlanJob() {
-        log.trace("Starting update maintenance Plan Job");
+        log.warn("Starting update maintenance plan overdue job...");
         maintenancePlanService.updateOverduePlan(1000);
     }
 
@@ -50,7 +50,7 @@ public class BusinessJob {
      */
     @Scheduled(cron = "0 0 9 * * ?")
     public void inspection45days() {
-        log.trace("Starting inspection 45days");
+        log.warn("Starting inspection 45days notice job...");
         sendAnnualInspection(45);
     }
 
@@ -85,14 +85,16 @@ public class BusinessJob {
     /**
      * 年检到期提前15天提醒
      */
+//    @Scheduled(cron = "0/30 * * * * ?")
     @Scheduled(cron = "0 0 10 * * ?")
     public void inspection15days() {
-        log.trace("Starting inspection 15days");
+        log.warn("Starting inspection 15days notice job...");
         sendAnnualInspection(15);
     }
 
     @Scheduled(cron = "0 0 16 * * ?")
     public void taskNotice() {
+        log.trace("Starting task report notice job...");
         List<RepairTips> repairTips = pushUserService.listMtCompanyByEmergencyRepair();
         if(repairTips.isEmpty()){
             return;

+ 4 - 6
lift-business-service/src/main/resources/mapper/push/PushUserMapper.xml

@@ -180,13 +180,10 @@
         WHERE
             ai.id > 0
             AND plr.project_id > 0
-            AND li.annual_inspection_date &gt;= date_add(CURDATE(), INTERVAL #{days} DAY)
+            AND re.id > 0
+            AND li.id > 0
+            AND li.annual_inspection_date &lt;= date_add(CURDATE(), INTERVAL #{days} DAY)
             AND li.annual_inspection_date >= CURDATE()
-        GROUP BY
-            mc.id,
-            ai.id
-        HAVING
-            count(*) > 0;
     </select>
 
     <select id="listMtCompanyByEmergencyRepair" resultType="cn.com.ty.lift.business.push.entity.RepairTips">
@@ -205,6 +202,7 @@
             LEFT JOIN region re ON pr.region_id = re.id
         WHERE
             er.id > 0
+            AND re.id > 0
             AND TO_DAYS(er.create_date) = TO_DAYS(NOW())
         GROUP BY
             mc.id,