| | |
| | | import com.ltkj.system.service.ISysUserService; |
| | | import com.ltkj.web.controller.his.HisApiGetMethodService; |
| | | import com.ltkj.web.controller.his.HisApiMethodService; |
| | | import com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | |
| | | |
| | | /*同步检查 his存储过程*/ |
| | | AjaxResult results = jcsqdService.getTjJcProByHisCall("体检中心", order.getCardId(), "''", 100, 1, "'1'"); |
| | | |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | |
| | | log.info("检查项目查询返回值: " + results.toString()); |
| | |
| | | jcbgdService.save(jcbgd); |
| | | } |
| | | jcsqdService.saveLtkjExamJcsqd(order.getCardId()); |
| | | testMapper.updateDetailByTjJcCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), UserHoder.getLoginUser().getUserId()); |
| | | |
| | | int maxRetries=3; |
| | | for (int attempt = 0; attempt < maxRetries; attempt++) { |
| | | try { |
| | | testMapper.updateDetailByTjJcCall(order.getCardId(), |
| | | String.valueOf(order.getOrderId()), order.getTjNumber(), UserHoder.getLoginUser().getUserId()); |
| | | break; |
| | | } catch (Exception e) { |
| | | if (attempt==maxRetries-1){ |
| | | throw e; |
| | | } |
| | | try { |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException ignored) { |
| | | } |
| | | } |
| | | } |
| | | |
| | | }else { |
| | | return AjaxResult.error("检查项目暂时未出结果,请稍后同步!!!"); |
| | | } |