Parcourir la source

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

humingfen il y a 4 ans
Parent
commit
a591a07b9c

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

@ -3172,9 +3172,6 @@ public class YkyyEntranceService {
                }
                }
            }
            }
        } else*/ if (size > 1) {//如果存在多条数据,查看是否有跟当前社保卡号一致的,如果有则跳过,如果社保卡都为空则取其中一条更新,否则就提示与预留卡号不一致
        } else*/ if (size > 1) {//如果存在多条数据,查看是否有跟当前社保卡号一致的,如果有则跳过,如果社保卡都为空则取其中一条更新,否则就提示与预留卡号不一致
            if(size > 6){
                throw new Exception("建档超过6次,请到线下变更。");
            }else {
            String sql = "SELECT brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where sfzh = '" + idcard + "' and  jzkh = '" + medicare + "' ";
            String sql = "SELECT brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where sfzh = '" + idcard + "' and  jzkh = '" + medicare + "' ";
            JSONArray array = getSqlResult(sql);
            JSONArray array = getSqlResult(sql);
            logger.info("查询身份证和社保卡:" + array.toString());
            logger.info("查询身份证和社保卡:" + array.toString());
@ -3185,7 +3182,10 @@ public class YkyyEntranceService {
            }*/
            }*/
            if (array.size() == 1) {
            if (array.size() == 1) {
                brid = sfzhArray.getJSONObject(0).getFloat("brid");
                brid = sfzhArray.getJSONObject(0).getFloat("brid");
            } }/*else { //否则就去最早一条更新
            }else if(size > 6){//查不到数据就判断建档次数,超过6次不让新增
                throw new Exception("建档超过6次,请到线下变更。");
            }
            }/*else { //否则就去最早一条更新
                String nullSql = "SELECT brid \"brid\" from portal_his.V_ZKSG_BRCX@xec_link where sfzh = '" + idcard + "' and  jzkh is null ";
                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();
                Integer count = getSqlResult(nullSql).size();
                if (count == size) {//如果都为空就默认取一条,然后更新社保卡号
                if (count == size) {//如果都为空就默认取一条,然后更新社保卡号
@ -3209,9 +3209,9 @@ public class YkyyEntranceService {
                    res.put("status", -1);
                    res.put("status", -1);
                    res.put("message", "您输入的卡号和该就诊人在医院预留的卡号不一致,请重新输入。");
                    res.put("message", "您输入的卡号和该就诊人在医院预留的卡号不一致,请重新输入。");
                    return res;
                    return res;
                }*/
                }
            }
            }
        /*} else { //身份证号没查到信息,就用社保卡号查询
        } else { //身份证号没查到信息,就用社保卡号查询
            JSONArray jzkhArray = getSqlResult(jzkhSql);
            JSONArray jzkhArray = getSqlResult(jzkhSql);
            if (jzkhArray!=null&&jzkhArray.size()>0){
            if (jzkhArray!=null&&jzkhArray.size()>0){
                brid = jzkhArray.getJSONObject(0).getFloat("brid");
                brid = jzkhArray.getJSONObject(0).getFloat("brid");