| | |
| | | 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.LtkjExamJcsqd; |
| | | import com.ltkj.hosp.sqlDomain.LtkjHybgd; |
| | | import com.ltkj.hosp.sqlDomain.LtkjHysqd; |
| | | import com.ltkj.hosp.sqlDomain.*; |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import jodd.util.StringUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | @Profile("!dev") |
| | | @Profile("!dev & !prod & !test") |
| | | public class DefaultScheduled { |
| | | |
| | | |
| | |
| | | private TjAsyncService asyncService; |
| | | @Autowired |
| | | private TjJcycxmService jcycxmService; |
| | | @Autowired |
| | | private AwsService awsService; |
| | | |
| | | |
| | | private final ReentrantLock reentrantLock = new ReentrantLock(); |
| | |
| | | } catch (Exception e) { |
| | | scheduleNextTask(Long.parseLong(dsrwsjjg)); |
| | | log.error("定时器执行报错"); |
| | | e.printStackTrace(); |
| | | log.error(String.valueOf(e)); |
| | | // e.printStackTrace(); |
| | | } finally { |
| | | reentrantLock.unlock(); |
| | | } |
| | |
| | | |
| | | private void extractedjianyan(String s) { |
| | | try { |
| | | List<Aws> awsList = testMapper.getWsxmLtkjHysqdByLisViBySLAVEWS(s); |
| | | if(null !=awsList && !awsList.isEmpty()){ |
| | | log.info(awsList.toString()); |
| | | testMapper.delWsxmjg(s); |
| | | log.info("删除外送项目成功"); |
| | | awsService.saveBatch(awsList); |
| | | log.info("保存外送项目成功"); |
| | | } |
| | | List<LtkjHysqd> hysqdList = testMapper.getCcXZxYyLtkjHysqdByLisVi(s); |
| | | List<LtkjHysqd> wssq = testMapper.getWsxmLtkjHysqdByLisVi(s); |
| | | if(null !=wssq && !wssq.isEmpty())hysqdList.addAll(wssq); |
| | | if (null != hysqdList && !hysqdList.isEmpty()) { |
| | | for (LtkjHysqd hysqd : hysqdList) { |
| | | LtkjHysqd jybgid = ltkjHysqdService.getLtkjHysqdByTjhAndTmh(hysqd.getTjh(), hysqd.getTmh()); |
| | |
| | | } |
| | | if (ltkjHysqdService.save(hysqd)) { |
| | | List<LtkjHybgd> hybgdList = testMapper.getCcXZxYyLtkjHybgdByLisVi(hysqd.getTmh()); |
| | | List<LtkjHybgd> wsbg = testMapper.getWsxmLtkjHybgdByLisVi(s); |
| | | if(null !=wsbg && !wsbg.isEmpty())hybgdList.addAll(wsbg); |
| | | ltkjHybgdService.saveBatch(hybgdList); |
| | | } |
| | | } |
| | |
| | | } |
| | | } 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)); |
| | | } |
| | | } |
| | | } |