| | |
| | | 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; |
| | |
| | | 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(); |
| | |
| | | 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); |
| | |
| | | } catch (Exception e) { |
| | | scheduleNextTask(Long.parseLong(dsrwsjjg)); |
| | | log.error("定时器执行报错"); |
| | | e.printStackTrace(); |
| | | log.error(String.valueOf(e)); |
| | | // e.printStackTrace(); |
| | | } finally { |
| | | reentrantLock.unlock(); |
| | | } |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("同步检验数据失败"); |
| | | throw new RuntimeException(e); |
| | | // throw new RuntimeException(e); |
| | | log.error(String.valueOf(e)); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("同步检查数据失败"); |
| | | throw new RuntimeException(e); |
| | | // throw new RuntimeException(e); |
| | | log.error(String.valueOf(e)); |
| | | } |
| | | } |
| | | } |