zjh
2025-02-21 2c785c3d4513daea9deb5c7edbb17a9f17111d25
ltkj-admin/src/main/java/com/ltkj/web/config/timer/DefaultScheduled.java
@@ -1,5 +1,6 @@
package com.ltkj.web.config.timer;
import cn.hutool.core.date.DateUtil;
import com.ltkj.framework.datasource.DynamicDataSourceContextHolder;
import com.ltkj.hosp.domain.TjJcycxm;
import com.ltkj.hosp.mapper.TestMapper;
@@ -89,6 +90,7 @@
        String dsqjssj = configService.selectConfigByKey("dsqjssj");
        String yqbm = configService.selectConfigByKey("common_api_service_hospbm");
        boolean panduandangqianshijian = panduandangqianshijian(dsqkssj, dsqjssj);
        log.info("定时器自动同步检验检查结果");
        log.info("当前时间是否在 " + dsqkssj + " 点到 " + dsqjssj + " 点之间: " + panduandangqianshijian);
            String dsrwsjjg = configService.selectConfigByKey("dsrwsjjg");
            boolean lock = reentrantLock.tryLock();
@@ -129,11 +131,11 @@
                                    List<LtkjExamJcsqd> list = jcsqdService.getLtkjJcsqdByTjh(s);
                                    if(null !=list && !list.isEmpty()){
                                        for (LtkjExamJcsqd jcsqd : list) {
                                            if(jcsqd.getJgbx().contains("。")){
                                                String[] split = jcsqd.getJgzt().split("。");
                                            if(StringUtil.isNotBlank(jcsqd.getJgzt())){
                                                String[] split = jcsqd.getJgzt().replaceAll("\n", "").split("。|;|;");
                                                for (String jg : split) {
                                                    if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常")
                                                            && !jg.contains("未见明显异常") && !jg.contains("未见占位")
                                                            && !jg.contains("未见明显异常") && !jg.contains("未见占位") && !jg.contains("未见")
                                                            && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")){
                                                        TjJcycxm jcycxm=new TjJcycxm();
                                                        jcycxm.setTjh(s);
@@ -172,7 +174,8 @@
            } catch (Exception e) {
                scheduleNextTask(Long.parseLong(dsrwsjjg));
                log.error("定时器执行报错");
                e.printStackTrace();
                log.error(String.valueOf(e));
//                e.printStackTrace();
            } finally {
                reentrantLock.unlock();
            }
@@ -216,8 +219,10 @@
            }
        } catch (Exception e) {
            log.info("同步检验数据失败");
            throw new RuntimeException(e);
//            throw new RuntimeException(e);
            log.error(String.valueOf(e));
        }
    }
@@ -237,7 +242,8 @@
            }
        } catch (Exception e) {
            log.info("同步检查数据失败");
            throw new RuntimeException(e);
//            throw new RuntimeException(e);
            log.error(String.valueOf(e));
        }
    }
}