zjh
2024-10-18 57b41b18aa3472be34b8b13d725db8578a14b836
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
@@ -57,6 +57,7 @@
import com.ltkj.hosp.hisDto.OutpinimpapplyDto;
import com.ltkj.hosp.hisDto.OutpinmedicapplyDto;
import com.ltkj.hosp.mapper.TestMapper;
import com.ltkj.hosp.mapper.TjSamplingMapper;
import com.ltkj.hosp.pacsDto.SavePacsApply;
import com.ltkj.hosp.service.*;
import com.ltkj.hosp.sqlDomain.LtkjMiddleDetail;
@@ -212,6 +213,10 @@
    private HisPDFUtil hisPDFUtil;
    @Value("${path.reportServer}")
    private String urlValue;
    @Autowired
    private ITjSamplingService samplingService;
    @Autowired
    private TjSamplingMapper tjSamplingMapper;
    //将方法返回值解析成json格式
    public JSONObject getJSONObject(String builder) {
@@ -1082,15 +1087,15 @@
                            newSaveextracted(tjOrder, tjCustomer, discount, sysUser, tjReservation, tjFlowingWater);
                        }
                        // 查询 对接Lis、Pacs申请如果类型包含在配置内则使用对接lis、pacs
//                        if (lisApiMethod.isUseLisAndPacsRegister(tjOrder)) {
                        if (lisApiMethod.isUseLisAndPacsRegister(tjOrder)) {
                            // 这是上面个人方法引入数据
//                            newSaveextracted(tjOrder, tjCustomer, discount, sysUser, tjReservation, tjFlowingWater);
//                            AjaxResult ajaxResult = hisApiMethod.tijianshenqing(tjCustomer, DateUtil.format(date1, "yyyy-MM-dd HH:mm:ss"), tjOrder, sysUser, result);
//                            if (!ajaxResult.get("code").toString().equals("200")) return ajaxResult;
//                        }else {
//                            hisApiMethod.tijianshenqing(tjCustomer, DateUtil.format(date1, "yyyy-MM-dd HH:mm:ss"), tjOrder.getCardId());
//                        }
                        hisApiMethod.tijianshenqing(tjCustomer, DateUtil.format(date1, "yyyy-MM-dd HH:mm:ss"), tjOrder.getCardId());
                            newSaveextracted(tjOrder, tjCustomer, discount, sysUser, tjReservation, tjFlowingWater);
                            AjaxResult ajaxResult = hisApiMethod.tijianshenqing(tjCustomer, DateUtil.format(date1, "yyyy-MM-dd HH:mm:ss"), tjOrder, sysUser, result);
                            if (!ajaxResult.get("code").toString().equals("200")) return ajaxResult;
                        }else {
                            hisApiMethod.tijianshenqing(tjCustomer, DateUtil.format(date1, "yyyy-MM-dd HH:mm:ss"), tjOrder.getCardId());
                        }
//                        hisApiMethod.tijianshenqing(tjCustomer, DateUtil.format(date1, "yyyy-MM-dd HH:mm:ss"), tjOrder.getCardId());
                        return AjaxResult.success(tjNumber);
                    } else {
                        tjCustomer.setCardId(tjOrder.getTjNumber());
@@ -2553,6 +2558,7 @@
            customer.setCardId("0");
            tjCustomerService.updateById(customer);
            String configByKey = configService.selectConfigByKey("sfkqdyhis");
            tjSamplingMapper.deleteByTjNumAndCusId(tjNum,order.getUserId());
            if (configByKey.equals("Y")) {
                HashMap<String, Object> hisRequestParams = new HashMap<>();
@@ -2580,7 +2586,6 @@
                }
            }
            return AjaxResult.success("撤销成功!!!");
        }
        return AjaxResult.success("签到记录不存在!");
    }
@@ -2825,6 +2830,7 @@
                HashMap<String, Object> hisRequestParams = new HashMap<>();
                hisRequestParams.put("patientId", order.getCardId());
                AjaxResult queryPay = hisApiGetMethodService.getHISDataNew("QueryPay", hisRequestParams);
                log.info("queryPay ->{}",JSONUtil.toJsonStr(queryPay));
                if (Integer.parseInt(queryPay.get("code").toString()) == 200) {
                    List<Map<String, String>> data = (List<Map<String, String>>) queryPay.get("data");
                    log.info("data的数据是" + JSONUtil.toJsonStr(data));
@@ -2858,7 +2864,7 @@
                }
            }
            try {
                extracted(dto);
                extracted(dto,order);
            } catch (Exception e) {
                log.info("撤销失败,删除表失败");
                return AjaxResult.error("撤销失败,删除表失败!");
@@ -2868,8 +2874,8 @@
        return AjaxResult.error();
    }
    //    @Transactional(propagation =Propagation.REQUIRES_NEW)
    public void extracted(TjProBlDto dto) {
//    @Transactional(propagation =Propagation.REQUIRES_NEW)
    public void extracted(TjProBlDto dto,TjOrder order) {
        for (String bldh : dto.getBldhs()) {
            remarkService.deleteTjOrderDetailByjxbz(bldh);
            tjOrderDetailService.deleteTjOrderDetailByjxbz(bldh);
@@ -2877,6 +2883,7 @@
            transitionService.deleteTjOrderDetailByjxbz(bldh);
            blService.remove(new LambdaQueryWrapper<TjProBl>().eq(TjProBl::getTjh, dto.getTjh()).eq(TjProBl::getBldh, bldh));
        }
        tjSamplingMapper.deleteByTjNumAndCusIdAndJxbz(dto.getTjh(),order.getUserId(),dto.getBldhs());
    }