| | |
| | | @ApiOperation(value = "手动同步检验检查外送项目结果接口") |
| | | public AjaxResult shoudongtbjyjcwsxmjg(@RequestParam @ApiParam(value = "jy检验 jc检查 jyjc检验和检查") String tblx, |
| | | @ApiParam(value = "体检号")@RequestParam String tjh) { |
| | | |
| | | String dqyyyqbm = configService.selectConfigByKey("dqyyyqbm"); |
| | | log.info("手动同步检验或检查结果开始->{}",DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); |
| | | try { |
| | | |
| | | switch (tblx){ |
| | | case "jy": |
| | | tbjianyan(tjh); |
| | | tbjianyan(tjh,dqyyyqbm); |
| | | log.info("当前同步的是->{} 结果","检验"); |
| | | break; |
| | | case "jc": |
| | | tbjiancha(tjh); |
| | | tbjiancha(tjh,dqyyyqbm); |
| | | log.info("当前同步的是->{} 结果","检查"); |
| | | break; |
| | | case "jyjc": |
| | | tbjianyan(tjh); |
| | | tbjiancha(tjh); |
| | | tbjianyan(tjh,dqyyyqbm); |
| | | tbjiancha(tjh,dqyyyqbm); |
| | | log.info("当前同步的是->{} 结果","检验检查"); |
| | | break; |
| | | default: |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | private void tbjianyan(String s) { |
| | | private void tbjianyan(String s,String dqyyyqbm) { |
| | | try { |
| | | List<Aws> awsList = testMapper.getWsxmLtkjHysqdByLisViBySLAVEWS(s); |
| | | if(null !=awsList && !awsList.isEmpty()){ |
| | |
| | | awsService.saveBatch(awsList); |
| | | log.info("保存外送项目成功"); |
| | | } |
| | | List<LtkjHysqd> hysqdList = testMapper.getCcXZxYyLtkjHysqdByLisVi(s); |
| | | List<LtkjHysqd> hysqdList = testMapper.getCcXZxYyLtkjHysqdByLisVi(s,dqyyyqbm); |
| | | log.info("原hysqdList->{} 结果", JSONUtil.parseObj(hysqdList)); |
| | | List<LtkjHysqd> wssq = testMapper.getWsxmLtkjHysqdByLisVi(s); |
| | | if(null !=wssq && !wssq.isEmpty()){ |
| | |
| | | } |
| | | |
| | | |
| | | private void tbjiancha(String s) { |
| | | private void tbjiancha(String s,String dqyyyqbm) { |
| | | |
| | | try { |
| | | List<LtkjExamJcsqd> jcsqdList = testMapper.getCcXZxYyPacsLtkjExamJcsqd(s); |
| | | List<LtkjExamJcsqd> jcsqdList = testMapper.getCcXZxYyPacsLtkjExamJcsqd(s,dqyyyqbm); |
| | | if (null != jcsqdList && !jcsqdList.isEmpty()) { |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | jcsqdService.deletedLtkjJcsqdByTjhAndTmh(s); |