diff --git a/src/main/java/com/zcloud/mapper/datasource/traffic/TankInspectionMapper.java b/src/main/java/com/zcloud/mapper/datasource/traffic/TankInspectionMapper.java new file mode 100644 index 0000000..0e96ebf --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/traffic/TankInspectionMapper.java @@ -0,0 +1,22 @@ +package com.zcloud.mapper.datasource.traffic; + +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:特种设备管理 + * 作者:luoxiaobao + * 时间:2021-06-19 + * 官网:www.zcloudchina.com + */ +public interface TankInspectionMapper { + + /** + * 维保到期提醒 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/scheduled/trafficRemind/TrafficRemindScheduled.java b/src/main/java/com/zcloud/scheduled/trafficRemind/TrafficRemindScheduled.java index 256e1cb..72b77dc 100644 --- a/src/main/java/com/zcloud/scheduled/trafficRemind/TrafficRemindScheduled.java +++ b/src/main/java/com/zcloud/scheduled/trafficRemind/TrafficRemindScheduled.java @@ -39,9 +39,13 @@ public class TrafficRemindScheduled { @Autowired private NoticeManagementService noticeManagementService; + @Autowired + private TankInspectionService tankInspectionService; + + + /*@Scheduled(cron ="0/5 * * * * ?")*/ // 测试5秒 @Scheduled(cron ="0 0 8 * * ?") // 每天8点 -// @Scheduled(cron ="0/5 * * * * ?") public void Scheduled(){ try { System.out.println("============定时发送今日交通到期提醒=========="); @@ -59,6 +63,7 @@ public class TrafficRemindScheduled { } List notifierId = Arrays.asList(annuallyNotice.getString("ADDRESSEE").split(",")); // 通过ADDRESS拆分 获取所有要推送的人 List varList = new ArrayList<>(); + if(annuallyNotice.getString("NOTICE_NAME").contains("年检")) { varList = inspectAnnuallyService.getYestoday(pd); } else if (annuallyNotice.getString("NOTICE_NAME").contains("保险")) { @@ -71,6 +76,8 @@ public class TrafficRemindScheduled { varList = compassService.getYestoday(pd); } else if(annuallyNotice.getString("NOTICE_NAME").contains("车船税")){ varList = taxationService.getYestoday(pd); + } else if(annuallyNotice.getString("NOTICE_NAME").contains("罐检")) { + varList = tankInspectionService.getYestoday(pd); } if (varList != null && varList.size() > 0) { for (String userId : notifierId) { diff --git a/src/main/java/com/zcloud/service/traffic/TankInspectionService.java b/src/main/java/com/zcloud/service/traffic/TankInspectionService.java new file mode 100644 index 0000000..283ad84 --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/TankInspectionService.java @@ -0,0 +1,22 @@ +package com.zcloud.service.traffic; + +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:特种设备管理 + * 作者:luoxiaobao + * 时间:2021-06-19 + * 官网:www.zcloudchina.com + */ +public interface TankInspectionService { + + /** + * 维保到期 发通知 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/service/traffic/impl/TankInspectionServiceImpl.java b/src/main/java/com/zcloud/service/traffic/impl/TankInspectionServiceImpl.java new file mode 100644 index 0000000..cd370dd --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/impl/TankInspectionServiceImpl.java @@ -0,0 +1,38 @@ +package com.zcloud.service.traffic.impl; + +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.traffic.MaintenanceMapper; +import com.zcloud.mapper.datasource.traffic.TankInspectionMapper; +import com.zcloud.service.traffic.MaintenanceService; +import com.zcloud.service.traffic.TankInspectionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 说明:特种设备管理 + * 作者:luoxiaobao + * 时间:2021-06-19 + * 官网:www.zcloudchina.com + */ +@Service +@Transactional //开启事物 +public class TankInspectionServiceImpl implements TankInspectionService { + + @Autowired + private TankInspectionMapper tankInspectionMapper; + + /** + * 维保到期提醒 + * @param pd + * @return + */ + @Override + public List getYestoday(PageData pd) { + return tankInspectionMapper.getYestoday(pd); + } + +} + diff --git a/src/main/resources/mybatis/datasource/traffic/TankInspection.xml b/src/main/resources/mybatis/datasource/traffic/TankInspection.xml new file mode 100644 index 0000000..0107850 --- /dev/null +++ b/src/main/resources/mybatis/datasource/traffic/TankInspection.xml @@ -0,0 +1,83 @@ + + + + + + + BUS_TRAFFIC_TANK_TRUCK_INSPECTION_RECORD + + + + + + TANKTRUCKINSPECTIONRECORD_ID, + CORPINFO_ID, + VEHICLE, + INSPECTION_DATE, + INSPECTIONTOR, + DUE_DATE, + INSPECTION_CYCLE, + REMINDER_DAYS, + REMINDER_DATE, + REMINDER_STATUS, + INSPECTION_ATTACHMENT, + INSPECTION_IMG, + NOTES, + ISDELETE, + CREATOR, + CREATORNAME, + CREATTIME, + OPERATOR, + OPERATORNAME, + OPERATTIME, + DELETEOR, + DELETEORNAME, + DELETTIME + + + + + #{TANKTRUCKINSPECTIONRECORD_ID}, + #{CORPINFO_ID}, + #{VEHICLE}, + #{INSPECTION_DATE}, + #{INSPECTIONTOR}, + #{DUE_DATE}, + #{INSPECTION_CYCLE}, + #{REMINDER_DAYS}, + #{REMINDER_DATE}, + #{REMINDER_STATUS}, + #{INSPECTION_ATTACHMENT}, + #{INSPECTION_IMG}, + #{NOTES}, + #{ISDELETE}, + #{CREATOR}, + #{CREATORNAME}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATORNAME}, + #{OPERATTIME}, + #{DELETEOR}, + #{DELETEORNAME}, + #{DELETTIME} + + + + + +