交通提醒 罐检到期通知
parent
a5dca5b4bc
commit
8413db6b23
|
@ -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<PageData> getYestoday(PageData pd);
|
||||||
|
}
|
||||||
|
|
|
@ -39,9 +39,13 @@ public class TrafficRemindScheduled {
|
||||||
@Autowired
|
@Autowired
|
||||||
private NoticeManagementService noticeManagementService;
|
private NoticeManagementService noticeManagementService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TankInspectionService tankInspectionService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*@Scheduled(cron ="0/5 * * * * ?")*/ // 测试5秒
|
||||||
@Scheduled(cron ="0 0 8 * * ?") // 每天8点
|
@Scheduled(cron ="0 0 8 * * ?") // 每天8点
|
||||||
// @Scheduled(cron ="0/5 * * * * ?")
|
|
||||||
public void Scheduled(){
|
public void Scheduled(){
|
||||||
try {
|
try {
|
||||||
System.out.println("============定时发送今日交通到期提醒==========");
|
System.out.println("============定时发送今日交通到期提醒==========");
|
||||||
|
@ -59,6 +63,7 @@ public class TrafficRemindScheduled {
|
||||||
}
|
}
|
||||||
List<String> notifierId = Arrays.asList(annuallyNotice.getString("ADDRESSEE").split(",")); // 通过ADDRESS拆分 获取所有要推送的人
|
List<String> notifierId = Arrays.asList(annuallyNotice.getString("ADDRESSEE").split(",")); // 通过ADDRESS拆分 获取所有要推送的人
|
||||||
List<PageData> varList = new ArrayList<>();
|
List<PageData> varList = new ArrayList<>();
|
||||||
|
|
||||||
if(annuallyNotice.getString("NOTICE_NAME").contains("年检")) {
|
if(annuallyNotice.getString("NOTICE_NAME").contains("年检")) {
|
||||||
varList = inspectAnnuallyService.getYestoday(pd);
|
varList = inspectAnnuallyService.getYestoday(pd);
|
||||||
} else if (annuallyNotice.getString("NOTICE_NAME").contains("保险")) {
|
} else if (annuallyNotice.getString("NOTICE_NAME").contains("保险")) {
|
||||||
|
@ -71,6 +76,8 @@ public class TrafficRemindScheduled {
|
||||||
varList = compassService.getYestoday(pd);
|
varList = compassService.getYestoday(pd);
|
||||||
} else if(annuallyNotice.getString("NOTICE_NAME").contains("车船税")){
|
} else if(annuallyNotice.getString("NOTICE_NAME").contains("车船税")){
|
||||||
varList = taxationService.getYestoday(pd);
|
varList = taxationService.getYestoday(pd);
|
||||||
|
} else if(annuallyNotice.getString("NOTICE_NAME").contains("罐检")) {
|
||||||
|
varList = tankInspectionService.getYestoday(pd);
|
||||||
}
|
}
|
||||||
if (varList != null && varList.size() > 0) {
|
if (varList != null && varList.size() > 0) {
|
||||||
for (String userId : notifierId) {
|
for (String userId : notifierId) {
|
||||||
|
|
|
@ -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<PageData> getYestoday(PageData pd);
|
||||||
|
}
|
||||||
|
|
|
@ -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<PageData> getYestoday(PageData pd) {
|
||||||
|
return tankInspectionMapper.getYestoday(pd);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.zcloud.mapper.datasource.traffic.TankInspectionMapper">
|
||||||
|
|
||||||
|
<!--表名 -->
|
||||||
|
<sql id="tableName">
|
||||||
|
BUS_TRAFFIC_TANK_TRUCK_INSPECTION_RECORD
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 字段 -->
|
||||||
|
<sql id="Field">
|
||||||
|
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
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 字段值定义 -->
|
||||||
|
<sql id="FieldValue">
|
||||||
|
#{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}
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="getYestoday" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
case when v1.TRAFFIC_TYPE = '1' then '营运车辆' else '货运挂车' end as VEHICLEMODEL,
|
||||||
|
f.*,
|
||||||
|
v1.PLATE_NUMBER
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
INNER JOIN v_traffic v1 on f.VEHICLE = v1.ID
|
||||||
|
LEFT JOIN bus_traffic_operatingvehicle bto on bto.OPERATING_ID = f.VEHICLE
|
||||||
|
LEFT JOIN bus_traffic_mechanical_freighttrailer btmf on btmf.FREIGHTTRAILER_ID = f.VEHICLE
|
||||||
|
where f.ISDELETE = '0'
|
||||||
|
AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
||||||
|
AND f.DUE_DATE != ''
|
||||||
|
AND TO_DAYS( NOW() ) - TO_DAYS( f.DUE_DATE ) = 0
|
||||||
|
AND f.REMINDER_STATUS = '1'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue