20250331 更新

master
陈江保 1 month ago
parent 00ef35b405
commit e28f6e05ec
  1. 2
      src/main/java/digital/laboratory/platform/entrustment/EntrustmentApplication.java
  2. 1
      src/main/java/digital/laboratory/platform/entrustment/service/PushDataToLabsCareService.java
  3. 5
      src/main/java/digital/laboratory/platform/entrustment/service/impl/PushDataToLabsCareServiceImpl.java

@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
@EnableScheduling // 开启定时任务
// todo @EnableScheduling // 开启定时任务
@EnableDLPSwagger2
@EnableDLPFeignClients
@EnableDiscoveryClient

@ -2,7 +2,6 @@ package digital.laboratory.platform.entrustment.service;
import digital.laboratory.platform.entrustment.vo.EntrustmentVO;
import java.util.Map;
/**
* @author ChenJiangBao

@ -70,7 +70,7 @@ public class PushDataToLabsCareServiceImpl implements PushDataToLabsCareService
/**
* 做一个定时推送对于推送失败的委托进行重新推送 每天凌晨1点推送
*/
// @Scheduled(cron = "30 * * * * ?")
// @Scheduled(cron = "30 * * * * ?") // 测试
@Scheduled(cron = "0 0 1 * * ?") // 每天凌晨 1 点执行
public void timingPushDataToLabsCare() throws IllegalAccessException {
// 查询受理后推送失败的委托
@ -297,7 +297,8 @@ public class PushDataToLabsCareServiceImpl implements PushDataToLabsCareService
} else {
flagList.add(newFlag);
}
// 更新标识, 防止定时任务那里连续推送数据时推送标识更新出错
entrustVO.setPushFlag(String.join(",", flagList));
// 更新数据库
entrustmentService.update(Wrappers.<Entrustment>lambdaUpdate()
.eq(Entrustment::getId, entrustVO.getId())

Loading…
Cancel
Save