交通提醒 到期提示
parent
8413db6b23
commit
abc8a9f83b
|
@ -4,6 +4,7 @@ import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.traffic.*;
|
import com.zcloud.service.traffic.*;
|
||||||
import com.zcloud.service.notice.NoticeManagementService;
|
import com.zcloud.service.notice.NoticeManagementService;
|
||||||
import com.zcloud.util.SendMessageUtil;
|
import com.zcloud.util.SendMessageUtil;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
@ -44,8 +45,8 @@ public class TrafficRemindScheduled {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*@Scheduled(cron ="0/5 * * * * ?")*/ // 测试5秒
|
@Scheduled(cron ="0/5 * * * * ?") // 测试5秒
|
||||||
@Scheduled(cron ="0 0 8 * * ?") // 每天8点
|
/*@Scheduled(cron ="0 0 8 * * ?")*/ // 每天8点
|
||||||
public void Scheduled(){
|
public void Scheduled(){
|
||||||
try {
|
try {
|
||||||
System.out.println("============定时发送今日交通到期提醒==========");
|
System.out.println("============定时发送今日交通到期提醒==========");
|
||||||
|
@ -100,6 +101,15 @@ public class TrafficRemindScheduled {
|
||||||
params2.put("name", "vehicle_model");// 存入短信模板中的参数名称
|
params2.put("name", "vehicle_model");// 存入短信模板中的参数名称
|
||||||
params2.put("value", h.get("VEHICLEMODEL").toString());// 存入上面参数名称所传递的值
|
params2.put("value", h.get("VEHICLEMODEL").toString());// 存入上面参数名称所传递的值
|
||||||
paramsList.add(params2);
|
paramsList.add(params2);
|
||||||
|
|
||||||
|
// 第3个参数
|
||||||
|
PageData params3 = new PageData();
|
||||||
|
params3.put("name", "due_date");// 存入短信模板中的参数名称
|
||||||
|
if(!StringUtils.isEmpty(h.getString("EXPIRE_DATE"))) {
|
||||||
|
h.put("DUE_DATE", h.getString("EXPIRE_DATE"));
|
||||||
|
}
|
||||||
|
params3.put("value", h.get("DUE_DATE").toString());// 存入上面参数名称所传递的值
|
||||||
|
paramsList.add(params3);
|
||||||
try {
|
try {
|
||||||
sendMessageUtil.sendTrafficNotice(mes, paramsList);
|
sendMessageUtil.sendTrafficNotice(mes, paramsList);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
where f.ISDELETE = '0'
|
where f.ISDELETE = '0'
|
||||||
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
||||||
AND f.DUE_DATE != ''
|
AND f.DUE_DATE != ''
|
||||||
AND TO_DAYS( NOW() ) - TO_DAYS( f.DUE_DATE ) = 0
|
AND TO_DAYS( NOW() ) - TO_DAYS( f.REMINDER_DATE ) = 0
|
||||||
AND f.REMINDER_STATUS = '1'
|
AND f.REMINDER_STATUS = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -254,7 +254,7 @@
|
||||||
where f.ISDELETE = '0'
|
where f.ISDELETE = '0'
|
||||||
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
||||||
AND f.DUE_DATE != ''
|
AND f.DUE_DATE != ''
|
||||||
AND TO_DAYS( NOW() ) - TO_DAYS( f.DUE_DATE ) = 0
|
AND TO_DAYS( NOW() ) - TO_DAYS( f.REMINDER_DATE ) = 0
|
||||||
AND f.REMINDER_STATUS = '1'
|
AND f.REMINDER_STATUS = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
where f.ISDELETE = '0'
|
where f.ISDELETE = '0'
|
||||||
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
||||||
AND f.DUE_DATE != ''
|
AND f.DUE_DATE != ''
|
||||||
AND TO_DAYS( NOW() ) - TO_DAYS( f.DUE_DATE ) = 0
|
AND TO_DAYS( NOW() ) - TO_DAYS( f.REMINDER_DATE ) = 0
|
||||||
AND f.REMINDER_STATUS = '1'
|
AND f.REMINDER_STATUS = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
where f.ISDELETE = '0'
|
where f.ISDELETE = '0'
|
||||||
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
||||||
AND f.DUE_DATE != ''
|
AND f.DUE_DATE != ''
|
||||||
AND TO_DAYS( NOW() ) - TO_DAYS( f.DUE_DATE ) = 0
|
AND TO_DAYS( NOW() ) - TO_DAYS( f.REMINDER_DATE ) = 0
|
||||||
AND f.REMINDER_STATUS = '1'
|
AND f.REMINDER_STATUS = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
where f.ISDELETE = '0'
|
where f.ISDELETE = '0'
|
||||||
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
||||||
AND f.DUE_DATE != ''
|
AND f.DUE_DATE != ''
|
||||||
AND TO_DAYS( NOW() ) - TO_DAYS( f.DUE_DATE ) = 0
|
AND TO_DAYS( NOW() ) - TO_DAYS( f.REMINDER_DATE ) = 0
|
||||||
AND f.REMINDER_STATUS = '1'
|
AND f.REMINDER_STATUS = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
where f.ISDELETE = '0'
|
where f.ISDELETE = '0'
|
||||||
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
||||||
AND f.DUE_DATE != ''
|
AND f.DUE_DATE != ''
|
||||||
AND TO_DAYS( NOW() ) - TO_DAYS( f.DUE_DATE ) = 0
|
AND TO_DAYS( NOW() ) - TO_DAYS( f.REMINDER_DATE ) = 0
|
||||||
AND f.REMINDER_STATUS = '1'
|
AND f.REMINDER_STATUS = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@
|
||||||
WHERE f.ISDELETE = '0'
|
WHERE f.ISDELETE = '0'
|
||||||
AND btmf.ISSCRAP = '0'
|
AND btmf.ISSCRAP = '0'
|
||||||
AND f.EXPIRE_DATE != ''
|
AND f.EXPIRE_DATE != ''
|
||||||
AND TO_DAYS( NOW() ) - TO_DAYS( f.EXPIRE_DATE ) = 0
|
AND TO_DAYS( NOW() ) - TO_DAYS( f.REMINDER_DATA ) = 0
|
||||||
AND f.REMINDER_STATUS = '0'
|
AND f.REMINDER_STATUS = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue