| | |
| | | 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("检查项目暂时未出结果,请稍后同步!!!"); |
| | | } |
| | |
| | | } |
| | | if (StrUtil.isNotBlank(ckfw)) { |
| | | try { |
| | | if (ckfw != null && ckfw.contains("-")) { |
| | | Integer.parseInt(tjOrderDetail.getYcbz()); |
| | | String[] split = ckfw.split("-"); |
| | | BigDecimal min = new BigDecimal(split[0]); |
| | |
| | | tjOrderDetail.setYcbz("↓"); |
| | | } else if (jyjgval.compareTo(max) > 0) { |
| | | tjOrderDetail.setYcbz("↑"); |
| | | } |
| | | else { |
| | | } else if(proResult.contains("阴")) { |
| | | tjOrderDetail.setYcbz(""); |
| | | }else { |
| | | tjOrderDetail.setYcbz(""); |
| | | } |
| | | if (null != tjOrderDetail.getYcbz() && !tjOrderDetail.getYcbz().equals("")) { |
| | |
| | | }else { |
| | | tjOrderDetail.setYcbz(""); |
| | | } |
| | | }else { |
| | | if (tjOrderDetail.getProResult() != null && tjOrderDetail.getProResult().contains("阴")) tjOrderDetail.setYcbz(""); |
| | | |
| | | if (tjOrderDetail.getProResult() != null && tjOrderDetail.getProResult().contains("阳")) tjOrderDetail.setYcbz("↑"); |
| | | } |
| | | } catch (NumberFormatException ignored) { |
| | | ignored.printStackTrace(); |
| | | } |