对实施日期进行预警.更新对条款的预警,加入使用车型和责任工程师
This commit is contained in:
@@ -7,6 +7,7 @@ import com.adc.da.scheduled.entity.DataDTO;
|
||||
import com.adc.da.scheduled.entity.WarningEO;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
@@ -54,8 +55,8 @@ public class ScheduledJob {
|
||||
|
||||
|
||||
|
||||
@Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
|
||||
// @Scheduled(cron="*/5 * * * * ?")
|
||||
// @Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
|
||||
@Scheduled(cron="*/5 * * * * ?")
|
||||
@Async
|
||||
public void WarningSchedulingTasks() {
|
||||
|
||||
@@ -76,6 +77,14 @@ public class ScheduledJob {
|
||||
1:新车条款预警
|
||||
2:在产车条款预警
|
||||
*/
|
||||
|
||||
//删除不在预警范围的标准
|
||||
QueryWrapper<EarlyWarningEO> earlyWarningEOQW = new QueryWrapper<>();
|
||||
earlyWarningEOQW.lt("PUT_TIME",LocalDate.now());
|
||||
int remove = sarStandardWarningDao.delete(earlyWarningEOQW);
|
||||
System.out.println(remove);
|
||||
|
||||
|
||||
System.out.println("开始执行预警!!!");
|
||||
|
||||
DataDTO term = new DataDTO(); //预警期限(当前日期至3个月后)
|
||||
@@ -98,6 +107,7 @@ public class ScheduledJob {
|
||||
.setPower("1")
|
||||
.setMark("2")
|
||||
.setPutTime(warningEO.getZCCSSRQ());
|
||||
|
||||
}
|
||||
warningList.addAll(itemForZCCSSRQ);
|
||||
|
||||
@@ -109,6 +119,8 @@ public class ScheduledJob {
|
||||
.setMark("3")
|
||||
.setPutTime(warningEO.getXCXSSRQ())
|
||||
.setStandCode(warningEO.getStandSort()+" "+ warningEO.getStandNum()+"-"+ warningEO.getStandYear());
|
||||
|
||||
|
||||
}
|
||||
warningList.addAll(standInfoXCXSSRQ);
|
||||
|
||||
@@ -143,8 +155,8 @@ public class ScheduledJob {
|
||||
|
||||
|
||||
|
||||
// @Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
|
||||
@Scheduled(cron="*/5 * * * * ?")
|
||||
@Scheduled(cron = "0 0 0 * * ?") //每天的凌晨0点执行
|
||||
// @Scheduled(cron="*/5 * * * * ?")
|
||||
@Async
|
||||
public void TextStatusSchedulingTasks() {
|
||||
QueryWrapper<SarStandardsInfo> wrapper = new QueryWrapper<>();
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.adc.da.scheduled.dao;
|
||||
|
||||
import com.adc.da.scheduled.entity.WarningEO;
|
||||
import com.adc.da.slrs.sarStandWarning.entity.EarlyWarningEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -9,7 +11,7 @@ import org.springframework.stereotype.Repository;
|
||||
import java.util.LinkedList;
|
||||
|
||||
@Repository
|
||||
public interface SarStandardWarningDao extends IService<WarningEO> {
|
||||
public interface SarStandardWarningDao extends BaseMapper<EarlyWarningEO> {
|
||||
|
||||
public int ignoreInsert(@Param(value = "warningEOS") LinkedList<WarningEO> warningEOS);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
package com.adc.da.scheduled.entity;
|
||||
|
||||
import com.alibaba.druid.sql.visitor.functions.Char;
|
||||
import com.sun.org.apache.bcel.internal.generic.NEW;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@@ -30,4 +36,19 @@ public class DataDTO {
|
||||
this.endDate=endDate;
|
||||
}
|
||||
|
||||
//
|
||||
// public boolean isTerm(T date){
|
||||
//
|
||||
// if (date.getClass().equals(Date.class)){
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");//线程不安全
|
||||
//
|
||||
// DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
// String dataStr= dtf.format(LocalDate.now());
|
||||
// LocalDate localDateTime = LocalDate.parse(dataStr, dtf);
|
||||
// return
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ public class WarningEO extends EarlyWarningEO {
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private Date ZCCSSRQ;
|
||||
|
||||
@DateTimeFormat(pattern = "YYYY-MM-dd")
|
||||
private Date SSRQ;
|
||||
|
||||
private String standNum;
|
||||
|
||||
private String standSort;
|
||||
|
||||
Reference in New Issue
Block a user