Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

wangjun 4 years ago
parent
commit
b30dcbc660

+ 9 - 6
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -3112,7 +3112,7 @@ public class YkyyEntranceService {
        JSONObject res = new JSONObject();
        //查询是否建档
        String brid = "";
        String bridSql = "SELECT brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where jzkh = '" +medicare + " ' ";
        String bridSql = "SELECT brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where jzkh = '" +medicare + "' ";
        Map<String, Object> params = new HashedMap();
        params.put("sql", bridSql);
        logger.info("bridSql:" + bridSql);
@ -3144,10 +3144,12 @@ public class YkyyEntranceService {
            params1.put("ybkh", medicare);
            params1.put("lxdz", null);
            params1.put("zy", 0);
            HttpResponse response1 = HttpUtils.doGet(saveJdxxUrl, params);
            HttpResponse response1 = HttpUtils.doGet(saveJdxxUrl, params1);
            String content1 = response1.getContent();
            logger.info("params1:" + params1);
            logger.info("response1:" + content1);
            JSONObject rs1 = JSON.parseObject(content1);
            if (rs.getInteger("status") != 200)
            if (rs1.getInteger("status") != 200)
            {
                res.put("status", -1);
                res.put("message", "操作失败,失败原因:" + rs1.getString("message"));
@ -3156,14 +3158,17 @@ public class YkyyEntranceService {
                //获取病人id
                response = HttpUtils.doGet(url, params);
                content = response.getContent();
                logger.info("response:" + content);
                rs = JSON.parseObject(content);
                status = rs.getInteger("status");
                if (status==200){
                    JSONArray array = rs.getJSONArray("detailModelList");
                    int size = array.size();
                    if(size == 1){
                        logger.info("array:" + array.toString());
                        brid = ((JSONObject)array.get(0)).getString("BRID");
                        res.put("status", 200);
                        res.put("message", brid);
                        logger.info("brid:" + brid);
                    }else if (size > 1){
                        res.put("status", -1);
                        res.put("message", "该居民存在多条建档信息!");
@ -3172,8 +3177,6 @@ public class YkyyEntranceService {
                }
            }
        }
        res.put("status", 200);
        res.put("message", brid);
        return res;
    }
}