zjh
2024-10-21 89919412a7d94f87aea159b39d823e5d6014a20e
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java
@@ -9,6 +9,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ltkj.common.core.domain.AjaxResult;
import com.ltkj.common.core.domain.entity.SysUser;
import com.ltkj.common.utils.SecurityUtils;
import com.ltkj.hosp.domain.*;
import com.ltkj.hosp.hisDto.*;
import com.ltkj.hosp.service.*;
@@ -74,6 +75,7 @@
    private TjSysAsyncServiceImpl tjSysAsyncService;
    @Autowired
    private LisApiMethod lisApiMethod;
    //将方法返回值解析成json格式
    public JSONObject getJSONObject(String builder) {
@@ -249,7 +251,7 @@
                }
            }
        }
        if (detailsDtos.size() > 0) {
        if (!detailsDtos.isEmpty()) {
            dto.setDetails(detailsDtos);
            AjaxResult ajaxResult1 = controller.Outpintestapply(dto);
            String result5 = getAjaxResult(ajaxResult1);
@@ -285,6 +287,11 @@
                    }
                    tree.setCreateTime(DateUtil.date());
                    ltkjJianchajianyanTreeService.save(tree);
                }
                TjOrder tjOrder = orderService.getOrderByCardId(cardId);
                if(null !=tjOrder){
                    List<TjOrderDetail> dengJi = tjOrderDetailService.getCaiYangDengJi(tjOrder.getOrderId());
                    tjSysAsyncService.addCaiYangDengJi(dengJi,!dengJi.isEmpty(),tjOrder, SecurityUtils.getLoginUser().getUser(), null);
                }
            }
        }
@@ -559,7 +566,8 @@
//        wq2.eq(TjOrderDetail::getIsSampling, 0);
//        List<TjOrderDetail> detailList1 = tjOrderDetailService.list(wq2);
        List<TjOrderDetail> detailList1 = tjOrderDetailService.getCaiYangDengJi(tjOrder.getOrderId());
        tjSysAsyncService.addCaiYangDengJi(detailList1, !detailList1.isEmpty(), tjOrder, sysUser);
        log.info("TjOrderDetail ->{}",JSONUtil.toJsonStr(detailList1));
        tjSysAsyncService.addCaiYangDengJi(detailList1, !detailList1.isEmpty(), tjOrder, sysUser,null);
        //检验申请
        OutpintestapplyDto dto = new OutpintestapplyDto();
@@ -764,6 +772,7 @@
            if (jysqdh != null && !jysqdh.isEmpty()){
                for (String sqdh : jysqdh) {
                    AjaxResult cancelLisAjaxResult = lisApiMethod.cancel(sqdh, order.getCardId(), customer1.getCusName());
                    log.info("lis请求返回 ->{}",JSONUtil.toJsonStr(cancelLisAjaxResult));
                    String result = cancelLisAjaxResult.get("data").toString();
                    JSONObject object = JSONUtil.parseObj(result);
                    String code= object.getStr("ResultCode");
@@ -874,6 +883,7 @@
                        if (jcsqdh != null && !jcsqdh.isEmpty()){
                            for (String sqdh : jcsqdh) {
                                AjaxResult cancelPacsAjaxResult = pacsApiMethodService.updatePacsApply(sqdh, order.getCardId(), customer1.getCusName());
                                log.info("作废检查 pacs返回 ->{}",JSONUtil.toJsonStr(cancelPacsAjaxResult));
                                String result = cancelPacsAjaxResult.get("data").toString();
                                JSONObject object = JSONUtil.parseObj(result);
                                String code = object.getStr("ResultCode");
@@ -888,6 +898,7 @@
                        if (jysqdh != null && !jysqdh.isEmpty()){
                            for (String sqdh : jysqdh) {
                                AjaxResult cancelLisAjaxResult = lisApiMethod.cancel(sqdh, order.getCardId(), customer1.getCusName());
                                log.info("作废检验 pacs返回 ->{}",JSONUtil.toJsonStr(cancelLisAjaxResult));
                                String result = cancelLisAjaxResult.get("data").toString();
                                JSONObject object = JSONUtil.parseObj(result);
                                String code= object.getStr("ResultCode");