zjh
2024-08-01 af6f1f6ad2f3fffeeed75f1a742a5bb63141db60
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java
@@ -14,6 +14,7 @@
import com.ltkj.system.service.ISysConfigService;
import com.ltkj.system.service.ISysDeptService;
import jdk.nashorn.internal.runtime.logging.Logger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@@ -28,6 +29,7 @@
 * */
@Component
@Slf4j
public class HisApiMethod {
    @Autowired
    private HisApiMethodService controller;
@@ -73,10 +75,10 @@
    //对接his总接口  注册挂号接诊申请单操作
    @Logger
    public AjaxResult HisApiMethods(TjCustomer customer, Long orderId) {
    public AjaxResult HisApiMethods(TjCustomer customer,TjOrder tjOrder) {
        String jzh=null;
        try {
            TjOrder tjOrder = orderService.getById(orderId);
//            TjOrder tjOrder = orderService.getById(orderId);
            Date dates = new Date();
            final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss");
            OutpinregapplyDto outpinregapplyDto = new OutpinregapplyDto();
@@ -109,7 +111,14 @@
                    hisApiGetMethodService.save(object4, "Outpinregapply", hisApiConfig, JSONUtil.toJsonStr(BeanUtil.beanToMap(outpinregapplyDto)));
                    //门诊医生接诊
                    controller.Outpinconapply(hisRegistrationId, date, "00029");
                    AjaxResult result = controller.Outpinconapply(hisRegistrationId, date, "00029");
                    String result3 = getAjaxResult(result);
                    JSONObject object2 = getJSONObject(result3);
                    String code2 = object2.getStr("ResultCode");
                    if (!code2.equals("0")) {
                        return AjaxResult.error(object2.getStr("ResultContent"));
                    }
                    log.info("his接口-----医生接诊成功!");
                    if(null != tjOrder.getTjCategory() && !tjOrder.getTjCategory().equals("13")){
                      customer.setCardId(hisRegistrationId);
                    }else {
@@ -147,7 +156,7 @@
                dto.setSfqj("0");
                dto.setJzqk(9);
                controller.Outpinimpapply(dto);
                return tijianshenqing(customer, date,tjOrder.getCardId());
                return AjaxResult.success();
            }
            return AjaxResult.error();
        } catch (Exception e) {
@@ -158,7 +167,7 @@
    //体检对his申请单调用方法
    private AjaxResult tijianshenqing(TjCustomer customer, String date,String cardId) {
    public AjaxResult tijianshenqing(TjCustomer customer, String date,String cardId) {
        //检验申请
        OutpintestapplyDto dto = new OutpintestapplyDto();
        dto.setHisRegistrationId(cardId);
@@ -792,9 +801,6 @@
                if (code.equals("0")) {
                    orderService.delHuoQuJcsqdh(jzh);
                }
//                else {
//                    return false;
//                }
            }
        }
@@ -816,9 +822,6 @@
                if (code1.equals("0")) {
                    orderService.delHuoQuJysqdh(jzh);
                }
//                else {
//                    return false;
//                }
            }
        }
@@ -854,9 +857,6 @@
        result2 = getAjaxResult(ajaxResult);
        object1 = getJSONObject(result2);
        code1 = object1.getStr("ResultCode");
//        if (!code1.equals("0")) {
//            return false;
//        }
        return true;
    }