Browse Source

BS10112处方开方接口变更

zdm 6 năm trước cách đây
mục cha
commit
5072a26632

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java

@ -694,7 +694,7 @@ public class EntranceService {
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
        }
        return ConvertUtil.convertListEnvelopInRequest(resp);
        return ConvertUtil.convertListEnvelopInRequestBS10112(resp);
    }
    /**

+ 22 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/util/ConvertUtil.java

@ -158,4 +158,26 @@ public class ConvertUtil {
        }
        return  null;
    }
    /**
     * BS10112处方开方接口返回对象数组数据解析
     * @param obj
     * @return
     * @throws Exception
     */
    public static  JSONObject convertListEnvelopInRequestBS10112(String obj)throws Exception{
        JSONObject jsonObject=JSONObject.fromObject(obj);
        if(null!=jsonObject&&"1".equals(jsonObject.get("code").toString())){
            JSONArray jsonObjectMgsInfo=(JSONArray)jsonObject.get("MsgInfo");
            if(null!=jsonObjectMgsInfo){
                for (Object object : jsonObjectMgsInfo) {
                    JSONObject jsonObjectBody = (JSONObject) object;
                    Object objectBody=jsonObjectBody.get("resquest");
                    jsonObjectBody = (JSONObject) objectBody;
                    return jsonObjectBody;
                }
            }
        }
        return  null;
    }
}