|
@@ -0,0 +1,117 @@
|
|
|
+//package com.huyi.task.taskMan.controller;
|
|
|
+//
|
|
|
+//import com.huyi.task.taskMan.service.IOwnTaskManService;
|
|
|
+//import com.tianhu.common.core.utils.CommonUtil;
|
|
|
+//import com.tianhu.common.core.utils.DateUtils;
|
|
|
+//import com.tianhu.system.api.RemoteSystemService;
|
|
|
+//import lombok.SneakyThrows;
|
|
|
+//import org.slf4j.Logger;
|
|
|
+//import org.slf4j.LoggerFactory;
|
|
|
+//import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+//import org.springframework.context.annotation.Configuration;
|
|
|
+//import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
+//import org.springframework.scheduling.annotation.Scheduled;
|
|
|
+//
|
|
|
+//import java.util.ArrayList;
|
|
|
+//import java.util.HashMap;
|
|
|
+//import java.util.List;
|
|
|
+//import java.util.Map;
|
|
|
+//
|
|
|
+//@Configuration //1.主要用于标记配置类,兼备Component的效果。
|
|
|
+//@EnableScheduling // 2.开启定时任务
|
|
|
+//public class TimedTaskController {
|
|
|
+// private static final Logger log = LoggerFactory.getLogger(TimedTaskController.class);
|
|
|
+//
|
|
|
+// @Autowired
|
|
|
+// private IOwnTaskManService ownTaskManService;
|
|
|
+// @Autowired
|
|
|
+// private RemoteSystemService remoteSystemService;
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * 还款提醒跑批
|
|
|
+// */
|
|
|
+// @SneakyThrows
|
|
|
+// @Scheduled(cron = "0 */10 * * * ?")
|
|
|
+// private void repaymentRemind(){
|
|
|
+// Map map = new HashMap();
|
|
|
+// //据当前时间还有30天的日期
|
|
|
+// String day = DateUtils.getFetureDate(30);
|
|
|
+// map.put("day",day);
|
|
|
+// //查询还款列表
|
|
|
+// List<Map> list = ownTaskManService.selectRepaymentList(map);
|
|
|
+// if(list.size()>0){
|
|
|
+// for(Map res :list){
|
|
|
+// //主键
|
|
|
+// String zfrId = CommonUtil.objToString(res.get("zfrId"));
|
|
|
+// //经办人Id
|
|
|
+// String user = CommonUtil.objToString(res.get("userId"));
|
|
|
+// //企业
|
|
|
+// String companyId = CommonUtil.objToString(res.get("companyId"));
|
|
|
+// List userList = new ArrayList();
|
|
|
+// userList.add(user);
|
|
|
+// //到期前30天发送消息
|
|
|
+// remoteSystemService.sendNotice(companyId, zfrId,"","01","02","","0",userList);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //据当前日期7天
|
|
|
+// day = DateUtils.getFetureDate(7);
|
|
|
+// map.put("day",day);
|
|
|
+// //查询还款列表
|
|
|
+// list = ownTaskManService.selectRepaymentList(map);
|
|
|
+// if(list.size()>0){
|
|
|
+// for(Map res :list){
|
|
|
+// //主键
|
|
|
+// String zfrId = CommonUtil.objToString(res.get("zfrId"));
|
|
|
+// //经办人Id
|
|
|
+// String user = CommonUtil.objToString(res.get("userId"));
|
|
|
+// //企业
|
|
|
+// String companyId = CommonUtil.objToString(res.get("companyId"));
|
|
|
+// List userList = new ArrayList();
|
|
|
+// userList.add(user);
|
|
|
+// //到期前7天生成待办
|
|
|
+// remoteSystemService.sendNotice(companyId, zfrId,"","00","03","","0",userList);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //据当前日期5天
|
|
|
+// day = DateUtils.getFetureDate(5);
|
|
|
+// map.put("day",day);
|
|
|
+// //查询还款列表
|
|
|
+// list = ownTaskManService.selectRepaymentList(map);
|
|
|
+// if(list.size()>0){
|
|
|
+// for(Map res :list){
|
|
|
+// //主键
|
|
|
+// String zfrId = CommonUtil.objToString(res.get("zfrId"));
|
|
|
+// //经办人Id
|
|
|
+// String user = CommonUtil.objToString(res.get("userId"));
|
|
|
+// //企业
|
|
|
+// String companyId = CommonUtil.objToString(res.get("companyId"));
|
|
|
+// List userList = new ArrayList();
|
|
|
+// userList.add(user);
|
|
|
+// //到期前5天发送信息
|
|
|
+// remoteSystemService.sendNotice(companyId, zfrId,"","","","","1",userList);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// //据当前日期3天
|
|
|
+// day = DateUtils.getFetureDate(3);
|
|
|
+// map.put("day",day);
|
|
|
+// //查询还款列表
|
|
|
+// list = ownTaskManService.selectRepaymentList(map);
|
|
|
+// if(list.size()>0){
|
|
|
+// for(Map res :list){
|
|
|
+// //主键
|
|
|
+// String zfrId = CommonUtil.objToString(res.get("zfrId"));
|
|
|
+// //经办人Id
|
|
|
+// String user = CommonUtil.objToString(res.get("userId"));
|
|
|
+// //企业
|
|
|
+// String companyId = CommonUtil.objToString(res.get("companyId"));
|
|
|
+// List userList = new ArrayList();
|
|
|
+// userList.add(user);
|
|
|
+// //到期前3天发送信息 企业,表主键,标题,类型(00:待办 01:消息),消息类型(00:费用提醒01:发票寄出02:到期还款)
|
|
|
+// //代办类型(00:待审批01:链属企业申请02:融信失效03:还款),是否发送短信(0:不发1:发),收到信息用户集合
|
|
|
+// remoteSystemService.sendNotice(companyId, zfrId,"","00","","03","0",userList);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+//}
|
|
|
+//
|