| | |
| | | package com.ltkj.web.config.timer; |
| | | |
| | | import com.ltkj.framework.datasource.DynamicDataSourceContextHolder; |
| | | import com.ltkj.hosp.domain.TjJcycxm; |
| | | import com.ltkj.hosp.mapper.TestMapper; |
| | | import com.ltkj.hosp.service.*; |
| | | import com.ltkj.hosp.sqlDomain.LtkjExamJcbgd; |
| | |
| | | import com.ltkj.hosp.sqlDomain.LtkjHybgd; |
| | | import com.ltkj.hosp.sqlDomain.LtkjHysqd; |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import jodd.util.StringUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Profile; |
| | |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | @Profile("!dev") |
| | | //@Profile("!dev") |
| | | public class DefaultScheduled { |
| | | |
| | | |
| | |
| | | private TestMapper testMapper; |
| | | @Resource |
| | | private TjAsyncService asyncService; |
| | | @Autowired |
| | | private TjJcycxmService jcycxmService; |
| | | |
| | | |
| | | private final ReentrantLock reentrantLock = new ReentrantLock(); |
| | |
| | | private void exec() { |
| | | String dsqkssj = configService.selectConfigByKey("dsqkssj"); |
| | | String dsqjssj = configService.selectConfigByKey("dsqjssj"); |
| | | String yqbm = configService.selectConfigByKey("common_api_service_hospbm"); |
| | | boolean panduandangqianshijian = panduandangqianshijian(dsqkssj, dsqjssj); |
| | | log.info("当前时间是否在 " + dsqkssj + " 点到 " + dsqjssj + " 点之间: " + panduandangqianshijian); |
| | | String dsrwsjjg = configService.selectConfigByKey("dsrwsjjg"); |
| | |
| | | if (null != jy && !jy.isEmpty()) { |
| | | log.info("同步检验人员 执行数量->{}", jy.size()); |
| | | for (String s : jy) { |
| | | // TjOrder order = orderService.getOrderByTjNum(s); |
| | | extractedjianyan(s); |
| | | } |
| | | } |
| | |
| | | if (null != jc && !jc.isEmpty()) { |
| | | log.info("同步检查人员 执行数量->{}", jc.size()); |
| | | for (String s : jc) { |
| | | // TjOrder order = orderService.getOrderByTjNum(s); |
| | | extractedjiancha(s); |
| | | } |
| | | } |
| | |
| | | Integer object = (Integer) map.get("total"); |
| | | log.info("执行存储过程后出参->{}", object); |
| | | if (null != object && object.equals(1)) { |
| | | if (null != jc && !jc.isEmpty()) { |
| | | for (String s : jc) { |
| | | jcycxmService.deletedByTjh(s); |
| | | List<LtkjExamJcsqd> list = jcsqdService.getLtkjJcsqdByTjh(s); |
| | | if(null !=list && !list.isEmpty()){ |
| | | for (LtkjExamJcsqd jcsqd : list) { |
| | | if(jcsqd.getJgbx().contains("。")){ |
| | | String[] split = jcsqd.getJgbx().split("。"); |
| | | for (String jg : split) { |
| | | if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") |
| | | && !jg.contains("未见明显异常") && !jg.contains("未见占位") && !jg.contains("未见明显")){ |
| | | TjJcycxm jcycxm=new TjJcycxm(); |
| | | jcycxm.setTjh(s); |
| | | jcycxm.setYqid(yqbm); |
| | | String[] split1 = jcsqd.getJcxmid().split(";"); |
| | | jcycxm.setProId(split1[0]); |
| | | jcycxm.setProName(jcsqd.getJcxmmc()); |
| | | jcycxm.setCreateTime(new Date()); |
| | | jcycxm.setJcjg(jg); |
| | | jcycxmService.save(jcycxm); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | long end = System.currentTimeMillis(); |
| | | log.info("同步结束 耗时:{}秒", (end - start) / 1000); |
| | | // 动态获取下次任务的间隔 |