Ver código fonte

Merge branch 'dev' of humingfen/wlyy2.0 into dev

humingfen 4 anos atrás
pai
commit
cc4e002d5e

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

@ -3181,20 +3181,28 @@ public class YkyyEntranceService {
            }
            if (array.size() == 1) {
                brid = sfzhArray.getJSONObject(0).getFloat("brid");
            } else { //否则就取最早一条更新
                brid = sfzhArray.getJSONObject(0).getFloat("brid");
                Map<String, Object> updateParams = new HashedMap();
                updateParams.put("brid", brid);
                updateParams.put("jzkh", medicare);
                logger.info("更新params:" + updateParams);
                HttpResponse updateResponse = HttpUtils.doGet(updateJzkh, updateParams);
                String updateContent = updateResponse.getContent();
                logger.info("更新患者信息updateResponse:" + updateContent);
                JSONObject rsult = JSON.parseObject(updateContent);
                Integer s = rsult.getInteger("status");
                if (s != 200) {
            } else { //否则就去最早一条更新
                String nullSql = "SELECT brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where sfzh = '" + idcard + "' and  jzkh is null ";
                Integer count = getSqlResult(nullSql).size();
                if (count == size) {//如果都为空就默认取一条,然后更新社保卡号
                    brid = sfzhArray.getJSONObject(0).getFloat("brid");
                    Map<String, Object> updateParams = new HashedMap();
                    updateParams.put("brid", brid);
                    updateParams.put("jzkh", medicare);
                    logger.info("更新params:" + updateParams);
                    HttpResponse updateResponse = HttpUtils.doGet(updateJzkh, updateParams);
                    String updateContent = updateResponse.getContent();
                    logger.info("更新患者信息updateResponse:" + updateContent);
                    JSONObject rsult = JSON.parseObject(updateContent);
                    Integer s = rsult.getInteger("status");
                    if (s != 200) {
                        res.put("status", -1);
                        res.put("message", "更新社保卡失败!");
                        return res;
                    }
                }else {
                    res.put("status", -1);
                    res.put("message", "更新社保卡失败!");
                    res.put("message", "您输入的卡号和该就诊人在医院预留的卡号不一致,请重新输入。");
                    return res;
                }
            }