|
@@ -42,6 +42,7 @@ public class Task {
|
|
|
* 邮件发送(定时比对数据后发送邮件)
|
|
|
*/
|
|
|
@Scheduled(cron = "0 10,40 * * * ? ")
|
|
|
+ //@Scheduled(cron = "0 0/1 * * * ? ")
|
|
|
public void thirdNucleicAcid() {
|
|
|
try {
|
|
|
|
|
@@ -64,6 +65,9 @@ public class Task {
|
|
|
Date data = DateUtils.getNowDate();
|
|
|
String time = DateUtils.formatString(data);
|
|
|
//往前推半个小时
|
|
|
+
|
|
|
+ //String startTime = "2022-11-17 08:30:00";
|
|
|
+ //String endTime = "2022-11-17 09:00:00";
|
|
|
String startTime = DateUtils.plusSeconds(time, -70);
|
|
|
String endTime = DateUtils.plusSeconds(time, -40);
|
|
|
//SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
@@ -88,6 +92,10 @@ public class Task {
|
|
|
//查询安康码采集地点信息
|
|
|
List<AkmData> akmDataList = akmDataMapper.selectAkmDataListByIdList(startTime, endTime, idCardList);
|
|
|
|
|
|
+ //查询65开头的安康码扫码数据
|
|
|
+ List<AkmData> akmDataList65 = akmDataMapper.selectAkmData65ListByIdList(startTime, endTime);
|
|
|
+ akmDataList.addAll(akmDataList65);
|
|
|
+
|
|
|
if((OdsQssHsjcxxList == null || OdsQssHsjcxxList.size() <= 0) && (akmDataList == null || akmDataList.size() <= 0)){
|
|
|
System.out.println("无数据,不发送邮件");
|
|
|
return;
|
|
@@ -177,10 +185,10 @@ public class Task {
|
|
|
}
|
|
|
if(StringUtils.isNotEmpty(akmData.getPhoneNum())){
|
|
|
sb.append(akmData.getPhoneNum()).append("---").append(akmData.getCollectTime());
|
|
|
- sb.append("---").append(akmData.getCollectSite());
|
|
|
+ sb.append("---").append(akmData.getEquipName());
|
|
|
}else{
|
|
|
sb.append(" ");
|
|
|
- sb.append("---").append(akmData.getCollectTime()).append("---").append(akmData.getCollectSite());
|
|
|
+ sb.append("---").append(akmData.getCollectTime()).append("---").append(akmData.getEquipName());
|
|
|
}
|
|
|
|
|
|
b = true;
|
|
@@ -193,17 +201,17 @@ public class Task {
|
|
|
|
|
|
if(StringUtils.isNotEmpty(akmData.getPhoneNum())){
|
|
|
sb1.append(akmData.getPhoneNum()).append("---").append(akmData.getCollectTime());
|
|
|
- sb1.append("---").append(akmData.getCollectSite());
|
|
|
+ sb1.append("---").append(akmData.getEquipName());
|
|
|
}else{
|
|
|
sb1.append(" ");
|
|
|
- sb1.append("---").append(akmData.getCollectTime()).append("---").append(akmData.getCollectSite());
|
|
|
+ sb1.append("---").append(akmData.getCollectTime()).append("---").append(akmData.getEquipName());
|
|
|
}
|
|
|
b1 = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
|
|
|
+ System.out.println("--------逻辑结束,开始走发送邮件接口" );
|
|
|
if(b){
|
|
|
ArrayList<String> tos2 = CollUtil.newArrayList(
|
|
|
"3555393474@qq.com",
|