| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | } |
| | | |
| | | @PostMapping("/syncMedInhospForShiyi") |
| | | public void syncMedInhospForShiyi(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) { |
| | | collectHISService.syncMedInhosp(startTime, endTime); |
| | | public AjaxResult syncMedInhospForShiyi(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) { |
| | | // 立即返回,后台异步执行 |
| | | CompletableFuture.runAsync(() -> { |
| | | collectHISService.syncMedInhosp(startTime, endTime); |
| | | }); |
| | | return AjaxResult.success("同步任务已启动,请稍后查看结果"); |
| | | } |
| | | |
| | | @PostMapping("/syncMedInhospForShiyiYesterday") |
| | | public AjaxResult syncMedInhospForShiyiYesterday() { |
| | | // 立即返回,后台异步执行 |
| | | ryTask.collectHISYesterday(); |
| | | return AjaxResult.success("同步任务已启动,请稍后查看结果"); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/syncMedOperForShiyi") |
| | | public void syncMedOperForShiyi(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) { |
| | | collectHISService.syncOper(startTime, endTime); |
| | | public AjaxResult syncMedOperForShiyi(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) { |
| | | // 立即返回,后台异步执行 |
| | | CompletableFuture.runAsync(() -> { |
| | | collectHISService.syncOper(startTime, endTime); |
| | | }); |
| | | return AjaxResult.success("同步任务已启动,请稍后查看结果"); |
| | | } |
| | | } |
| | |
| | | import com.fasterxml.jackson.databind.JsonNode; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.dx.MessageSend; |
| | |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public void collectHISYesterday() { |
| | | try { |
| | | // 获取昨天0点到今天0点的时间范围 |
| | | LocalDateTime todayZero = LocalDateTime.now().with(LocalTime.MIN); |
| | | LocalDateTime yesterdayZero = todayZero.minusDays(1); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | String startTime = yesterdayZero.format(formatter); |
| | | String endTime = todayZero.format(formatter); |
| | | // HIS数据采集 |
| | | log.info("【collectHISYesterday】HIS开始采集数据"); |
| | | // 立即返回,后台异步执行 |
| | | CompletableFuture.runAsync(() -> { |
| | | ichService.syncMedInhosp(startTime, endTime); |
| | | }); |
| | | log.info("【collectHISYesterday】HIS结束采集数据"); |
| | | } catch (Exception e) { |
| | | log.error("【collectHISYesterday】HIS数据采集异常", e); |
| | | } |
| | | } |
| | | |
| | | public Boolean setSuccessPreachForm(ServiceSubtask serviceSubtask, String preachform, String remark, String failSendstate) { |
| | | if (preachform.equals("-1")) { |
| | | //说明都不需要执行了 |
| | |
| | | public void addOperationSubTask(String config) { |
| | | // 手术随访 |
| | | PatMedOperationItem pmoi = new PatMedOperationItem(); |
| | | //获取需要出院疾病随访,未处理的数据 |
| | | // pmoi.setInhospstate("1"); |
| | | //获取需要出院手术随访,未处理的数据 |
| | | if(!active.equals("hzszlyy")){ |
| | | pmoi.setInhospstate("1"); |
| | | } |
| | | pmoi.setOpercheckFlag("0"); |
| | | pmoi.setMainFlag("1"); |
| | | |