diff --git a/src/main/java/com/zcloud/mapper/datasource/notice/NoticeManagementMapper.java b/src/main/java/com/zcloud/mapper/datasource/notice/NoticeManagementMapper.java index d02b636..554a62d 100644 --- a/src/main/java/com/zcloud/mapper/datasource/notice/NoticeManagementMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/notice/NoticeManagementMapper.java @@ -57,5 +57,11 @@ public interface NoticeManagementMapper { */ void deleteAll(String[] ArrayDATA_IDS); + /**列表(交通全部) + * @param pd + * @throws Exception + */ + List listTrafficAll(PageData pd); + } diff --git a/src/main/java/com/zcloud/mapper/datasource/traffic/CompassMapper.java b/src/main/java/com/zcloud/mapper/datasource/traffic/CompassMapper.java new file mode 100644 index 0000000..f3f70ee --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/traffic/CompassMapper.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 CompassMapper { + + /** + * 营运到期提醒 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/traffic/InspectAnnuallyMapper.java b/src/main/java/com/zcloud/mapper/datasource/traffic/InspectAnnuallyMapper.java new file mode 100644 index 0000000..e7c23b4 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/traffic/InspectAnnuallyMapper.java @@ -0,0 +1,29 @@ +package com.zcloud.mapper.datasource.traffic; + +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:特种设备管理 + * 作者:luoxiaobao + * 时间:2021-06-19 + * 官网:www.zcloudchina.com + */ +public interface InspectAnnuallyMapper { + + /**修改 + * @param pd + * @throws Exception + */ + void edit(PageData pd); + + /**列表(全部) + * @param pd + * @throws Exception + */ + List listAll(PageData pd); + + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/traffic/InsuranceMapper.java b/src/main/java/com/zcloud/mapper/datasource/traffic/InsuranceMapper.java new file mode 100644 index 0000000..ca404b3 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/traffic/InsuranceMapper.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 InsuranceMapper { + + /** + * 保险到期提醒 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/traffic/MaintenanceMapper.java b/src/main/java/com/zcloud/mapper/datasource/traffic/MaintenanceMapper.java new file mode 100644 index 0000000..2e55e60 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/traffic/MaintenanceMapper.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 MaintenanceMapper { + + /** + * 维保到期提醒 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/traffic/OperationMapper.java b/src/main/java/com/zcloud/mapper/datasource/traffic/OperationMapper.java new file mode 100644 index 0000000..bd9e8ac --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/traffic/OperationMapper.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 OperationMapper { + + /** + * 营运到期提醒 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/traffic/TaxationMapper.java b/src/main/java/com/zcloud/mapper/datasource/traffic/TaxationMapper.java new file mode 100644 index 0000000..d49cc80 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/traffic/TaxationMapper.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 TaxationMapper { + + /** + * 营运到期提醒 + * @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 new file mode 100644 index 0000000..d19fdb6 --- /dev/null +++ b/src/main/java/com/zcloud/scheduled/trafficRemind/TrafficRemindScheduled.java @@ -0,0 +1,108 @@ +package com.zcloud.scheduled.trafficRemind; + +import com.zcloud.entity.PageData; +import com.zcloud.service.traffic.*; +import com.zcloud.service.notice.NoticeManagementService; +import com.zcloud.util.SendMessageUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +@Component +public class TrafficRemindScheduled { + + @Autowired + private InspectAnnuallyService inspectAnnuallyService; + + @Autowired + private InsuranceService insuranceService; + + @Autowired + private MaintenanceService maintenanceService; + + @Autowired + private OperationService operationService; + + @Autowired + private CompassService compassService; + + @Autowired + private TaxationService taxationService; + + @Autowired + private SendMessageUtil sendMessageUtil; + + @Autowired + private NoticeManagementService noticeManagementService; + + + //@Scheduled(cron ="0 0 8 * * ?") // 每天8点 + @Scheduled(cron ="0/5 * * * * ?") + public void Scheduled(){ + try { + System.out.println("============定时发送今日交通到期提醒=========="); + PageData pd = new PageData(); + pd.put("KEYWORDS", "TRAFFIC"); + List trafficNoticeAll = noticeManagementService.listTrafficAll(pd); // 获取所有的交通提醒 + for (PageData notice : trafficNoticeAll) { + PageData noticeId = new PageData(); + noticeId.put("NOTICE_MANAGEMENT_ID", notice.getString("NOTICE_MANAGEMENT_ID")); + PageData annuallyNotice = null; + try { + annuallyNotice = noticeManagementService.findById(noticeId); // 查询 当前的 交通通知 + } catch (Exception e) { + throw new RuntimeException(e); + } + 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("保险")) { + varList = insuranceService.getYestoday(pd); + }else if(annuallyNotice.getString("NOTICE_NAME").contains("维保")) { + varList = maintenanceService.getYestoday(pd); + } else if (annuallyNotice.getString("NOTICE_NAME").contains("营运")) { + varList = operationService.getYestoday(pd); + } else if (annuallyNotice.getString("NOTICE_NAME").contains("北斗")) { + varList = compassService.getYestoday(pd); + } else if(annuallyNotice.getString("NOTICE_NAME").contains("车船税")){ + varList = taxationService.getYestoday(pd); + } + if (varList != null && varList.size() > 0) { + for (String userId : notifierId) { + for (PageData h : varList) { + // 发送年检到期通知 + PageData mes = new PageData(); + mes.put("RECEIVER_ID", userId);// 收信人 userid + mes.put("templateCode", annuallyNotice.getString("NOTICE_CODE"));// 通知模板编码 + mes.put("CORPINFO_ID", h.get("CORPINFO_ID"));// 企业id + // 参数集合 + List paramsList = new ArrayList(); + // 第1个参数 + PageData params1 = new PageData(); + params1.put("name", "plate_number");// 存入短信模板中的参数名称 + params1.put("value", h.get("PLATE_NUMBER").toString());// 存入上面参数名称所传递的值 + paramsList.add(params1); + + // 第2个参数 + PageData params2 = new PageData(); + params2.put("name", "vehicle_model");// 存入短信模板中的参数名称 + params2.put("value", h.get("VEHICLEMODEL").toString());// 存入上面参数名称所传递的值 + paramsList.add(params2); + try { + sendMessageUtil.sendTrafficNotice(mes, paramsList); + } catch (Exception e) { + } + } + } + } + } + } catch (Exception e) { + throw new RuntimeException(e); + } + } +} diff --git a/src/main/java/com/zcloud/service/notice/NoticeManagementService.java b/src/main/java/com/zcloud/service/notice/NoticeManagementService.java index 6dbddc0..d1c76fd 100644 --- a/src/main/java/com/zcloud/service/notice/NoticeManagementService.java +++ b/src/main/java/com/zcloud/service/notice/NoticeManagementService.java @@ -57,5 +57,11 @@ public interface NoticeManagementService { */ public void deleteAll(String[] ArrayDATA_IDS)throws Exception; + /**列表(交通全部) + * @param pd + * @throws Exception + */ + public List listTrafficAll(PageData pd)throws Exception; + } diff --git a/src/main/java/com/zcloud/service/notice/impl/NoticeManagementServiceImpl.java b/src/main/java/com/zcloud/service/notice/impl/NoticeManagementServiceImpl.java index e34ec73..514a154 100644 --- a/src/main/java/com/zcloud/service/notice/impl/NoticeManagementServiceImpl.java +++ b/src/main/java/com/zcloud/service/notice/impl/NoticeManagementServiceImpl.java @@ -85,5 +85,10 @@ public class NoticeManagementServiceImpl implements NoticeManagementService { noticemanagementMapper.deleteAll(ArrayDATA_IDS); } + @Override + public List listTrafficAll(PageData pd) throws Exception { + return noticemanagementMapper.listTrafficAll(pd); + } + } diff --git a/src/main/java/com/zcloud/service/traffic/CompassService.java b/src/main/java/com/zcloud/service/traffic/CompassService.java new file mode 100644 index 0000000..1103f24 --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/CompassService.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 CompassService { + + /** + * 营运到期 发通知 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/service/traffic/InspectAnnuallyService.java b/src/main/java/com/zcloud/service/traffic/InspectAnnuallyService.java new file mode 100644 index 0000000..e7ac631 --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/InspectAnnuallyService.java @@ -0,0 +1,29 @@ +package com.zcloud.service.traffic; + +import com.zcloud.entity.PageData; + +import java.util.List; + + +public interface InspectAnnuallyService { + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception; + + /** + * 年检到期 发通知 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/service/traffic/InsuranceService.java b/src/main/java/com/zcloud/service/traffic/InsuranceService.java new file mode 100644 index 0000000..fd6c348 --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/InsuranceService.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 InsuranceService { + + /** + * 保险到期 发通知 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/service/traffic/MaintenanceService.java b/src/main/java/com/zcloud/service/traffic/MaintenanceService.java new file mode 100644 index 0000000..9a6a0af --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/MaintenanceService.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 MaintenanceService { + + /** + * 维保到期 发通知 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/service/traffic/OperationService.java b/src/main/java/com/zcloud/service/traffic/OperationService.java new file mode 100644 index 0000000..dd524a7 --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/OperationService.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 OperationService { + + /** + * 营运到期 发通知 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/service/traffic/TaxationService.java b/src/main/java/com/zcloud/service/traffic/TaxationService.java new file mode 100644 index 0000000..9f565fd --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/TaxationService.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 TaxationService { + + /** + * 营运到期 发通知 + * @param pd + * @return + */ + List getYestoday(PageData pd); +} + diff --git a/src/main/java/com/zcloud/service/traffic/impl/CompassServiceImpl.java b/src/main/java/com/zcloud/service/traffic/impl/CompassServiceImpl.java new file mode 100644 index 0000000..a5ab5fa --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/impl/CompassServiceImpl.java @@ -0,0 +1,37 @@ +package com.zcloud.service.traffic.impl; + +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.traffic.CompassMapper; +import com.zcloud.mapper.datasource.traffic.OperationMapper; +import com.zcloud.service.traffic.CompassService; +import com.zcloud.service.traffic.OperationService; +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 CompassServiceImpl implements CompassService { + + @Autowired + private CompassMapper compassMapper; + /** + * 营运到期提醒 + * @param pd + * @return + */ + @Override + public List getYestoday(PageData pd) { + return compassMapper.getYestoday(pd); + } + +} + diff --git a/src/main/java/com/zcloud/service/traffic/impl/InspectAnnuallyServiceImpl.java b/src/main/java/com/zcloud/service/traffic/impl/InspectAnnuallyServiceImpl.java new file mode 100644 index 0000000..6ff67e3 --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/impl/InspectAnnuallyServiceImpl.java @@ -0,0 +1,47 @@ +package com.zcloud.service.traffic.impl; + +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.traffic.InspectAnnuallyMapper; +import com.zcloud.service.traffic.InspectAnnuallyService; +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 InspectAnnuallyServiceImpl implements InspectAnnuallyService { + + @Autowired + private InspectAnnuallyMapper inspectAnnuallyMapper; + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception{ + inspectAnnuallyMapper.edit(pd); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception{ + return inspectAnnuallyMapper.listAll(pd); + } + + @Override + public List getYestoday(PageData pd) { + return inspectAnnuallyMapper.getYestoday(pd); + } + +} + diff --git a/src/main/java/com/zcloud/service/traffic/impl/InsuranceServiceImpl.java b/src/main/java/com/zcloud/service/traffic/impl/InsuranceServiceImpl.java new file mode 100644 index 0000000..8ee87ed --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/impl/InsuranceServiceImpl.java @@ -0,0 +1,37 @@ +package com.zcloud.service.traffic.impl; + +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.traffic.InspectAnnuallyMapper; +import com.zcloud.mapper.datasource.traffic.InsuranceMapper; +import com.zcloud.service.traffic.InsuranceService; +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 InsuranceServiceImpl implements InsuranceService { + + @Autowired + private InsuranceMapper insuranceMapper; + + /** + * 保险到期提醒 + * @param pd + * @return + */ + @Override + public List getYestoday(PageData pd) { + return insuranceMapper.getYestoday(pd); + } + +} + diff --git a/src/main/java/com/zcloud/service/traffic/impl/MaintenanceServiceImpl.java b/src/main/java/com/zcloud/service/traffic/impl/MaintenanceServiceImpl.java new file mode 100644 index 0000000..2786b33 --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/impl/MaintenanceServiceImpl.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.OperationMapper; +import com.zcloud.service.traffic.MaintenanceService; +import com.zcloud.service.traffic.OperationService; +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 MaintenanceServiceImpl implements MaintenanceService { + + @Autowired + private MaintenanceMapper maintenanceMapper; + + /** + * 维保到期提醒 + * @param pd + * @return + */ + @Override + public List getYestoday(PageData pd) { + return maintenanceMapper.getYestoday(pd); + } + +} + diff --git a/src/main/java/com/zcloud/service/traffic/impl/OperationServiceImpl.java b/src/main/java/com/zcloud/service/traffic/impl/OperationServiceImpl.java new file mode 100644 index 0000000..afc3971 --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/impl/OperationServiceImpl.java @@ -0,0 +1,38 @@ +package com.zcloud.service.traffic.impl; + +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.traffic.InsuranceMapper; +import com.zcloud.mapper.datasource.traffic.OperationMapper; +import com.zcloud.service.traffic.InsuranceService; +import com.zcloud.service.traffic.OperationService; +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 OperationServiceImpl implements OperationService { + + @Autowired + private OperationMapper operationMapper; + + /** + * 营运到期提醒 + * @param pd + * @return + */ + @Override + public List getYestoday(PageData pd) { + return operationMapper.getYestoday(pd); + } + +} + diff --git a/src/main/java/com/zcloud/service/traffic/impl/TaxationServiceImpl.java b/src/main/java/com/zcloud/service/traffic/impl/TaxationServiceImpl.java new file mode 100644 index 0000000..dbc21b2 --- /dev/null +++ b/src/main/java/com/zcloud/service/traffic/impl/TaxationServiceImpl.java @@ -0,0 +1,38 @@ +package com.zcloud.service.traffic.impl; + +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.traffic.OperationMapper; +import com.zcloud.mapper.datasource.traffic.TaxationMapper; +import com.zcloud.service.traffic.OperationService; +import com.zcloud.service.traffic.TaxationService; +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 TaxationServiceImpl implements TaxationService { + + @Autowired + private TaxationMapper taxationMapper; + + /** + * 营运到期提醒 + * @param pd + * @return + */ + @Override + public List getYestoday(PageData pd) { + return taxationMapper.getYestoday(pd); + } + +} + diff --git a/src/main/java/com/zcloud/util/SendMessageUtil.java b/src/main/java/com/zcloud/util/SendMessageUtil.java index b11aaa4..f4e1875 100644 --- a/src/main/java/com/zcloud/util/SendMessageUtil.java +++ b/src/main/java/com/zcloud/util/SendMessageUtil.java @@ -324,4 +324,45 @@ public class SendMessageUtil { JSONObject jsonObject = JSONObject.parseObject(json); return jsonObject.get("access_token").toString(); } + + + public void sendTrafficNotice(PageData pd, List paramsList) throws Exception{ + PageData nm = new PageData(); + nm.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); + nm.put("ISENABLE", "1"); + nm.put("SMSCODE", pd.get("templateCode")); + List nmList =noticemanagementService.listAll(nm); + if(nmList==null || nmList.size()==0){//未开启该提醒 + return; + } + PageData template = new PageData(); + template.put("TEMPLATE_CODE",pd.get("templateCode")); + template = this.noticeTemplateService.findByCode(template); + + String content = template.getString("TEMPLATE_STR"); + if(paramsList != null && paramsList.size() > 0) { + StringBuffer parStr = new StringBuffer(); + for(PageData par: paramsList) { + content = content.replace(("${" + par.getString("name") + "}"),par.getString("value")); + } + } + PageData pd1 = new PageData(); + pd1.put("NOTICECORP_ID", UuidUtil.get32UUID()); + pd1.put("USERNAME","秦安双控"); + pd1.put("CREATOR", "秦安双控"); //添加人 + pd1.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 + pd1.put("SYNOPSIS",template.getString("NAME")); + pd1.put("CONTENT","

"+content+"

"); + pd1.put("ISALL","yes"); + pd1.put("ISREPLY",0); + pd1.put("ISDELETE",0); + pd1.put("ISTOP",0); + pd1.put("STATUS",1); + pd1.put("CORP_INFO_ID",pd.getString("CORPINFO_ID")); + noticeCorpService.save(pd1); + pd1.put("NOTICECORPUSERID_ID",UuidUtil.get32UUID()); + pd1.put("USER_ID",pd.getString("RECEIVER_ID")); + pd1.put("TYPE",0); + noticeCorpUserService.save(pd1); + } } diff --git a/src/main/resources/mybatis/datasource/notice/NoticeManagementMapper.xml b/src/main/resources/mybatis/datasource/notice/NoticeManagementMapper.xml index ba1d13e..d310661 100644 --- a/src/main/resources/mybatis/datasource/notice/NoticeManagementMapper.xml +++ b/src/main/resources/mybatis/datasource/notice/NoticeManagementMapper.xml @@ -175,4 +175,17 @@ + + + + diff --git a/src/main/resources/mybatis/datasource/traffic/CompassMapper.xml b/src/main/resources/mybatis/datasource/traffic/CompassMapper.xml new file mode 100644 index 0000000..3eb4f90 --- /dev/null +++ b/src/main/resources/mybatis/datasource/traffic/CompassMapper.xml @@ -0,0 +1,122 @@ + + + + + + + BUS_TRAFFIC_MECHANICAL_BEIDOU + + + + + BEIDOU_ID, + CORPINFO_ID, + INDUSTRY_TYPE, + INDUSTRY_TYPE_TREE, + INDUSTRY_TYPE_NAMES, + OPER_CORP, + VEHICLE, + BASICINFO_LICENSE_PLATE, + BASICINFO_VIN, + BASICINFO_VEHICLETYPE, + BASICINFO_CAR_OWNERS, + BASICINFO_CARPHONE, + BASICINFO_INITIAL_REGISTRATION_DATE, + BASICINFO_PROVINCE, + BASICINFO_CITY, + BASICINFO_COUNTY, + CAR_OWNERS, + TELEPHONE, + REGISTRANT, + NETWORK_ACCESS_COMPANY, + PROCESSING_DATE, + DUE_DATE, + ACTUAL_COLLECTION, + ALL_FEES, + REMINDER_DAYS, + REMINDER_DATE, + REMINDER_STATUS, + BEIDOUINFO, + NOTES, + NUM, + CONTRACT, + CERTIFICATE, + TRANSPORTATIONCOMPANY, + ISDELETE, + CREATOR, + CREATORNAME, + CREATTIME, + OPERATOR, + OPERATORNAME, + OPERATTIME, + DELETEOR, + DELETEORNAME, + DELETTIME + + + + + #{BEIDOU_ID}, + #{CORPINFO_ID}, + #{INDUSTRY_TYPE}, + #{INDUSTRY_TYPE_TREE}, + #{INDUSTRY_TYPE_NAMES}, + #{OPER_CORP}, + #{VEHICLE}, + #{BASICINFO_LICENSE_PLATE}, + #{BASICINFO_VIN}, + #{BASICINFO_VEHICLETYPE}, + #{BASICINFO_CAR_OWNERS}, + #{BASICINFO_CARPHONE}, + #{BASICINFO_INITIAL_REGISTRATION_DATE}, + #{BASICINFO_PROVINCE}, + #{BASICINFO_CITY}, + #{BASICINFO_COUNTY}, + #{CAR_OWNERS}, + #{TELEPHONE}, + #{REGISTRANT}, + #{NETWORK_ACCESS_COMPANY}, + #{PROCESSING_DATE}, + #{DUE_DATE}, + #{ACTUAL_COLLECTION}, + #{ALL_FEES}, + #{REMINDER_DAYS}, + #{REMINDER_DATE}, + #{REMINDER_STATUS}, + #{BEIDOUINFO}, + #{NOTES}, + #{NUM}, + #{CONTRACT}, + #{CERTIFICATE}, + #{TRANSPORTATIONCOMPANY}, + #{ISDELETE}, + #{CREATOR}, + #{CREATORNAME}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATORNAME}, + #{OPERATTIME}, + #{DELETEOR}, + #{DELETEORNAME}, + #{DELETTIME} + + + + + + diff --git a/src/main/resources/mybatis/datasource/traffic/InspectAnnuallyMapper.xml b/src/main/resources/mybatis/datasource/traffic/InspectAnnuallyMapper.xml new file mode 100644 index 0000000..ad309c2 --- /dev/null +++ b/src/main/resources/mybatis/datasource/traffic/InspectAnnuallyMapper.xml @@ -0,0 +1,262 @@ + + + + + + + BUS_TRAFFIC_MECHANICAL_INSPECT_ANNUALLY + + + + + + INSPECTANNUALLY_ID, + CORPINFO_ID, + NUM, + VEHICLE_MODEL, + VEHICLE, + CAR_OWNERS, + TELEPHONE, + REGISTRANT, + PROCESSING_DATE, + ANNUAL_INSPECTION_CYCLE, + DUE_DATE, + INSPECTFEES, + ACTUAL_COLLECTION, + ADDRESS, + REMINDER_DAYS, + REMINDER_DATE, + REMINDER_STATUS, + INSPECTINFO, + NOTES, + ARCHIVES_TYPE, + ISDELETE, + CREATOR, + CREATORNAME, + CREATTIME + + + + + #{INSPECTANNUALLY_ID}, + #{CORPINFO_ID}, + #{NUM}, + #{VEHICLE_MODEL}, + #{VEHICLE}, + #{CAR_OWNERS}, + #{TELEPHONE}, + #{REGISTRANT}, + #{PROCESSING_DATE}, + #{ANNUAL_INSPECTION_CYCLE}, + #{DUE_DATE}, + #{INSPECTFEES}, + #{ACTUAL_COLLECTION}, + #{ADDRESS}, + #{REMINDER_DAYS}, + #{REMINDER_DATE}, + #{REMINDER_STATUS}, + #{INSPECTINFO}, + #{NOTES}, + #{ARCHIVES_TYPE}, + #{ISDELETE}, + #{CREATOR}, + #{CREATORNAME}, + #{CREATTIME} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1', + DELETEOR = #{DELETEOR}, + DELETEORNAME = #{DELETEORNAME}, + DELETTIME = #{DELETTIME} + where + INSPECTANNUALLY_ID = #{INSPECTANNUALLY_ID} + + + + + update + + set + NUM = #{NUM}, + VEHICLE_MODEL = #{VEHICLE_MODEL}, + VEHICLE = #{VEHICLE}, + CAR_OWNERS = #{CAR_OWNERS}, + TELEPHONE = #{TELEPHONE}, + REGISTRANT = #{REGISTRANT}, + PROCESSING_DATE = #{PROCESSING_DATE}, + ANNUAL_INSPECTION_CYCLE = #{ANNUAL_INSPECTION_CYCLE}, + DUE_DATE = #{DUE_DATE}, + INSPECTFEES = #{INSPECTFEES}, + ACTUAL_COLLECTION = #{ACTUAL_COLLECTION}, + ADDRESS = #{ADDRESS}, + REMINDER_DAYS = #{REMINDER_DAYS}, + REMINDER_DATE = #{REMINDER_DATE}, + REMINDER_STATUS = #{REMINDER_STATUS}, + INSPECTINFO = #{INSPECTINFO}, + NOTES = #{NOTES}, + ARCHIVES_TYPE = #{ARCHIVES_TYPE}, + OPERATOR = #{OPERATOR}, + OPERATORNAME = #{OPERATORNAME}, + OPERATTIME = #{OPERATTIME} + where + INSPECTANNUALLY_ID = #{INSPECTANNUALLY_ID} + + + + + update + + set + + REMINDER_STATUS = #{REMINDER_STATUS}, + + OPERATOR = #{OPERATOR}, + OPERATORNAME = #{OPERATORNAME}, + OPERATTIME = #{OPERATTIME} + where + INSPECTANNUALLY_ID = #{INSPECTANNUALLY_ID} + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/mybatis/datasource/traffic/InsuranceMapper.xml b/src/main/resources/mybatis/datasource/traffic/InsuranceMapper.xml new file mode 100644 index 0000000..2d105d7 --- /dev/null +++ b/src/main/resources/mybatis/datasource/traffic/InsuranceMapper.xml @@ -0,0 +1,87 @@ + + + + + + + BUS_TRAFFIC_MECHANICAL_INSURE + + + + + + INSURE_ID, + CORPINFO_ID, + NUM, + VEHICLE_MODEL, + VEHICLE, + CAR_OWNERS, + TELEPHONE, + REGISTRANT, + INSURANCE_COMPANY, + INSURANCE_COVERAGE, + PROCESSING_DATE, + EFFECTIVE_DATE, + DUE_DATE, + ALL_FEES, + ACTUAL_COLLECTION, + REMINDER_DAYS, + REMINDER_DATE, + REMINDER_STATUS, + ATTACHMENT_UPLOAD, + INSUREINFO, + NOTES, + ISDELETE, + CREATOR, + CREATORNAME, + CREATTIME + + + + + #{INSURE_ID}, + #{CORPINFO_ID}, + #{NUM}, + #{VEHICLE_MODEL}, + #{VEHICLE}, + #{CAR_OWNERS}, + #{TELEPHONE}, + #{REGISTRANT}, + #{INSURANCE_COMPANY}, + #{INSURANCE_COVERAGE}, + #{PROCESSING_DATE}, + #{EFFECTIVE_DATE}, + #{DUE_DATE}, + #{ALL_FEES}, + #{ACTUAL_COLLECTION}, + #{REMINDER_DAYS}, + #{REMINDER_DATE}, + #{REMINDER_STATUS}, + #{ATTACHMENT_UPLOAD}, + #{INSUREINFO}, + #{NOTES}, + #{ISDELETE}, + #{CREATOR}, + #{CREATORNAME}, + #{CREATTIME} + + + + + + diff --git a/src/main/resources/mybatis/datasource/traffic/MaintenanceMapper.xml b/src/main/resources/mybatis/datasource/traffic/MaintenanceMapper.xml new file mode 100644 index 0000000..df6c2fb --- /dev/null +++ b/src/main/resources/mybatis/datasource/traffic/MaintenanceMapper.xml @@ -0,0 +1,121 @@ + + + + + + + BUS_TRAFFIC_MECHANICAL_MAINTENANCE + + + + + + MAINTENANCE_ID, + CORPINFO_ID, + INDUSTRY_TYPE, + INDUSTRY_TYPE_TREE, + INDUSTRY_TYPE_NAMES, + OPER_CORP, + VEHICLE, + BASICINFO_LICENSE_PLATE, + BASICINFO_VIN, + BASICINFO_VEHICLETYPE, + BASICINFO_CAR_OWNERS, + BASICINFO_CARPHONE, + BASICINFO_INITIAL_REGISTRATION_DATE, + BASICINFO_PROVINCE, + BASICINFO_CITY, + BASICINFO_COUNTY, + CAR_OWNERS, + TELEPHONE, + REGISTRANT, + MAINTENANCE_LEVEL, + MAINTENANCE_CYCLE, + KILOMETERS, + PROCESSING_DATE, + DUE_DATE, + AGREEMENT_NUM, + MAINTENANCE_COMPANY, + REMINDER_DAYS, + REMINDER_DATE, + REMINDER_STATUS, + MAINTENANCEINFO, + NOTES, + NUM, + ISDELETE, + CREATOR, + CREATORNAME, + CREATTIME, + OPERATOR, + OPERATORNAME, + OPERATTIME, + DELETEOR, + DELETEORNAME, + DELETTIME + + + + + #{MAINTENANCE_ID}, + #{CORPINFO_ID}, + #{INDUSTRY_TYPE}, + #{INDUSTRY_TYPE_TREE}, + #{INDUSTRY_TYPE_NAMES}, + #{OPER_CORP}, + #{VEHICLE}, + #{BASICINFO_LICENSE_PLATE}, + #{BASICINFO_VIN}, + #{BASICINFO_VEHICLETYPE}, + #{BASICINFO_CAR_OWNERS}, + #{BASICINFO_CARPHONE}, + #{BASICINFO_INITIAL_REGISTRATION_DATE}, + #{BASICINFO_PROVINCE}, + #{BASICINFO_CITY}, + #{BASICINFO_COUNTY}, + #{CAR_OWNERS}, + #{TELEPHONE}, + #{REGISTRANT}, + #{MAINTENANCE_LEVEL}, + #{MAINTENANCE_CYCLE}, + #{KILOMETERS}, + #{PROCESSING_DATE}, + #{DUE_DATE}, + #{AGREEMENT_NUM}, + #{MAINTENANCE_COMPANY}, + #{REMINDER_DAYS}, + #{REMINDER_DATE}, + #{REMINDER_STATUS}, + #{MAINTENANCEINFO}, + #{NOTES}, + #{NUM}, + #{ISDELETE}, + #{CREATOR}, + #{CREATORNAME}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATORNAME}, + #{OPERATTIME}, + #{DELETEOR}, + #{DELETEORNAME}, + #{DELETTIME} + + + + + + diff --git a/src/main/resources/mybatis/datasource/traffic/OperationMapper.xml b/src/main/resources/mybatis/datasource/traffic/OperationMapper.xml new file mode 100644 index 0000000..be9dadd --- /dev/null +++ b/src/main/resources/mybatis/datasource/traffic/OperationMapper.xml @@ -0,0 +1,115 @@ + + + + + + + BUS_TRAFFIC_MECHANICAL_OPERATIONS + + + + + + OPERATIONS_ID, + CORPINFO_ID, + INDUSTRY_TYPE, + INDUSTRY_TYPE_TREE, + INDUSTRY_TYPE_NAMES, + OPER_CORP, + VEHICLE_MODEL, + VEHICLE, + BASICINFO_LICENSE_PLATE, + BASICINFO_VIN, + BASICINFO_VEHICLETYPE, + BASICINFO_CAR_OWNERS, + BASICINFO_CARPHONE, + BASICINFO_INITIAL_REGISTRATION_DATE, + BASICINFO_PROVINCE, + BASICINFO_CITY, + BASICINFO_COUNTY, + CAR_OWNERS, + TELEPHONE, + REGISTRANT, + PROCESSING_DATE, + CYCLE, + DUE_DATE, + REMINDER_DAYS, + REMINDER_DATE, + REMINDER_STATUS, + OPERATIONSINFO, + NOTES, + NUM, + ISDELETE, + CREATOR, + CREATORNAME, + CREATTIME, + OPERATOR, + OPERATORNAME, + OPERATTIME, + DELETEOR, + DELETEORNAME, + DELETTIME + + + + + #{OPERATIONS_ID}, + #{CORPINFO_ID}, + #{INDUSTRY_TYPE}, + #{INDUSTRY_TYPE_TREE}, + #{INDUSTRY_TYPE_NAMES}, + #{OPER_CORP}, + #{VEHICLE_MODEL}, + #{VEHICLE}, + #{BASICINFO_LICENSE_PLATE}, + #{BASICINFO_VIN}, + #{BASICINFO_VEHICLETYPE}, + #{BASICINFO_CAR_OWNERS}, + #{BASICINFO_CARPHONE}, + #{BASICINFO_INITIAL_REGISTRATION_DATE}, + #{BASICINFO_PROVINCE}, + #{BASICINFO_CITY}, + #{BASICINFO_COUNTY}, + #{CAR_OWNERS}, + #{TELEPHONE}, + #{REGISTRANT}, + #{PROCESSING_DATE}, + #{CYCLE}, + #{DUE_DATE}, + #{REMINDER_DAYS}, + #{REMINDER_DATE}, + #{REMINDER_STATUS}, + #{OPERATIONSINFO}, + #{NOTES}, + #{NUM}, + #{ISDELETE}, + #{CREATOR}, + #{CREATORNAME}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATORNAME}, + #{OPERATTIME}, + #{DELETEOR}, + #{DELETEORNAME}, + #{DELETTIME} + + + + + + diff --git a/src/main/resources/mybatis/datasource/traffic/TaxationMapper.xml b/src/main/resources/mybatis/datasource/traffic/TaxationMapper.xml new file mode 100644 index 0000000..2289d73 --- /dev/null +++ b/src/main/resources/mybatis/datasource/traffic/TaxationMapper.xml @@ -0,0 +1,162 @@ + + + + + + + BUS_TRAFFIC_TAXATION_MANAGE + + + + + f.TAXATION_ID, + f.RECORD_NUMBER, + f.CORPINFO_ID, + f.PLATE_NUMBER, + f.VEHICLEOWNER, + f.CONTACT_NUMBER, + f.TRANSACTION_DATA, + f.TAXESDUES_PERIOD, + f.EXPIRE_DATE, + f.REGISTRANT, + f.TRANSPORT_ENTERPRISES, + f.REMINDER_STATUS, + f.EXPIRE_STATUS, + f.ARCHIVES_TYPE, + f.TRAILER_VEHICLE, + f.FRAMES_NUMBER, + f.VEHICLE_TYPE, + f.VEHICLEOWNER_NUMBER, + f.FIRSTSHOW_DATE, + f.PROVINCE, + f.CITY, + f.COUNTY, + f.REMINDER_DAY, + f.REMINDER_DATA, + f.TAXESDUES_MATERIAL, + f.REMARK, + f.REGISTER_NUMBER, + f.VEHICLE_MODEL, + f.VEHICLE_BRAND, + f.DRIVINGLICENSE_PHOTO, + f.ISDELETE, + f.CREATOR, + f.CREATORNAME, + f.CREATTIME, + f.OPERATOR, + f.OPERATORNAME, + f.OPERATTIME, + f.DELETOR, + f.DELETORNAME, + f.DELETTIME, + f.FREIGHTTRAILER_ID + + + + + TAXATION_ID, + RECORD_NUMBER, + CORPINFO_ID, + PLATE_NUMBER, + VEHICLEOWNER, + CONTACT_NUMBER, + TRANSACTION_DATA, + TAXESDUES_PERIOD, + EXPIRE_DATE, + REGISTRANT, + TRANSPORT_ENTERPRISES, + REMINDER_STATUS, + EXPIRE_STATUS, + ARCHIVES_TYPE, + TRAILER_VEHICLE, + FRAMES_NUMBER, + VEHICLE_TYPE, + VEHICLEOWNER_NUMBER, + FIRSTSHOW_DATE, + PROVINCE, + CITY, + COUNTY, + REMINDER_DAY, + REMINDER_DATA, + TAXESDUES_MATERIAL, + REMARK, + REGISTER_NUMBER, + VEHICLE_MODEL, + VEHICLE_BRAND, + DRIVINGLICENSE_PHOTO, + ISDELETE, + CREATOR, + CREATORNAME, + CREATTIME, + OPERATOR, + OPERATORNAME, + OPERATTIME, + DELETOR, + DELETORNAME, + DELETTIME, + FREIGHTTRAILER_ID + + + + + #{TAXATION_ID}, + #{RECORD_NUMBER}, + #{CORPINFO_ID,}, + #{PLATE_NUMBER}, + #{VEHICLEOWNER}, + #{CONTACT_NUMBER}, + #{TRANSACTION_DATA}, + #{TAXESDUES_PERIOD}, + #{EXPIRE_DATE}, + #{REGISTRANT}, + #{TRANSPORT_ENTERPRISES}, + #{REMINDER_STATUS}, + #{EXPIRE_STATUS}, + #{ARCHIVES_TYPE}, + #{TRAILER_VEHICLE}, + #{FRAMES_NUMBER}, + #{VEHICLE_TYPE}, + #{VEHICLEOWNER_NUMBER}, + #{FIRSTSHOW_DATE}, + #{PROVINCE}, + #{CITY}, + #{COUNTY}, + #{REMINDER_DAY}, + #{REMINDER_DATA}, + #{TAXESDUES_MATERIAL}, + #{REMARK}, + #{REGISTER_NUMBER}, + #{VEHICLE_MODEL}, + #{VEHICLE_BRAND}, + #{DRIVINGLICENSE_PHOTO}, + #{ISDELETE}, + #{CREATOR}, + #{CREATORNAME}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATORNAME}, + #{OPERATTIME}, + #{DELETOR}, + #{DELETORNAME}, + #{DELETTIME}, + #{FREIGHTTRAILER_ID} + + + + + +