|
@@ -707,6 +707,22 @@ public class TaskService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /***
|
|
|
+ * 核酸补充数据定时任务(每天3点执行)
|
|
|
+ */
|
|
|
+ @Scheduled(cron = "0 0 3 * * ? ")
|
|
|
+ public void supplement() {
|
|
|
+ //获取当前时间
|
|
|
+ Date data = DateUtils.getNowDate();
|
|
|
+ String endTime = DateUtils.formatString(data);
|
|
|
+ //当前时间往前推一个星期(10080分钟)
|
|
|
+ String startTime = DateUtils.plusSeconds(endTime, -10080);
|
|
|
+
|
|
|
+ accountingDataService.thirdNucleicAcid(startTime, endTime);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/***
|
|
|
* 匹配核酸和户籍数据
|
|
|
*/
|
|
@@ -1067,6 +1083,11 @@ public class TaskService {
|
|
|
//去更新常住人口表中数据
|
|
|
czrkMapper.updateCzrkByNucleicAcid(czrk);
|
|
|
}
|
|
|
+ //先查询库里是否有相同数据
|
|
|
+ int num = accountingDataMapper.selectRepeat(accountingData);
|
|
|
+ if(num>0){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
int result = mapper.selectById(accountingData);
|
|
|
if (result == 0) {
|
|
|
if (accountingData.getCjssxq().contains("梅城镇")) {
|