Procházet zdrojové kódy

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

# Conflicts:
#	svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/wechat/WechatMenuController.java
wangzhinan před 4 roky
rodič
revize
070310354d

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

@ -144,6 +144,11 @@ public class TnPrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pr
                    patNo = object.get("brid").toString();
                }
            }*/
            JSONArray res = tnyyEntranceService.selectPatientMappingCode(patientDO.getIdcard());
            if (res!=null&&res.size()!=0){
                JSONObject object = res.getJSONObject(0);
                patNo = object.getString("BRID");
            }
            if(!StringUtils.isBlank(patNo)){
                if (patientMappingDO!=null){
                    patientMappingDO.setMappingCode(patNo);
@ -505,6 +510,15 @@ public class TnPrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pr
            object.put("ypcd",map.get("YPCD"));//产地
            object.put("zfpb",map.get("ZFPB"));//作废判别
            object.put("jbywbz",map.get("jbywbz"));//基本药物标志
            if (map.get("XTSB")!=null){
                if (map.getString("XTSB").equalsIgnoreCase("1")){
                    object.put("group_no",81);
                }else {
                    object.put("group_no",82);
                }
            }
           /* object.put("ydyp",map.get("ydyp"));//药店药品
            object.put("ypmc2",map.get("ypmc2"));//药品名称2
            object.put("t",map.get("pzwh"));//药品批文*/
@ -517,7 +531,7 @@ public class TnPrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pr
    /**
     * 获取药品用法
     */
    public JSONArray getDrugUse(String drugNo, String pyKey,boolean demoFlag) throws Exception {
    public JSONArray getDrugUse(String pyKey,boolean demoFlag) throws Exception {
        JSONArray mapList = new JSONArray();
        mapList = tnyyEntranceService.findYpyf(pyKey);

+ 23 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/TnyyEntranceService.java

@ -238,6 +238,26 @@ public class TnyyEntranceService {
        return "success";
    }
    public JSONArray selectPatientMappingCode(String idcard) throws Exception {
        String sql = "SELECT a.BRID,a.BRXM from MS_BRDA a WHERE a.SFZH = '"+idcard+"' ";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("selectPatientMappingCode:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        JSONArray array = new JSONArray();
        if(status!=null&&status == 200){
            array = rs.getJSONArray("detailModelList");
            logger.info("patient size:"+array.size());
        }
        return array;
    }
    /**
     * 查询药品信息
@ -367,7 +387,7 @@ public class TnyyEntranceService {
     * @throws Exception
     */
    public JSONArray findIcd10(String pyCode,boolean demoFlag) throws Exception {
        String sql = "select i.JBXH as code ,i.JBMC as name,i.PYDM as pydm, from GY_JBBM i ";
        String sql = "select i.JBXH as code ,i.JBMC as name,i.PYDM as pydm from GY_JBBM i ";
        JSONArray array = new JSONArray();
        if (StringUtils.isNoneBlank(pyCode)){
            sql +="  where lower(i.PYDM) like '%"+pyCode.toLowerCase()+"%'";
@ -396,10 +416,10 @@ public class TnyyEntranceService {
            sql += " and h.JZXH = " + conNo;
        }
        if(!StringUtil.isBlank(startTime)){
            sql += " and  h.KSSJ  between "+startTime;
            sql += " and  h.KSSJ  >= '"+startTime+"' ";
        }
        if(!StringUtil.isBlank(endTime)){
            sql += " and "+endTime;
            sql += " and h.KSSJ  <= '"+endTime+"' ";
        }if(!StringUtil.isBlank(ksdm)){
            sql += " and h.KSDM = " + ksdm;
        }

+ 2 - 2
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -1500,11 +1500,11 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
            throw new InvalidRequestException("client_id is null");
        }
        if (wlyyRedisVerifyCodeService.verification(client_id, mobile, captcha)) {
       /* if (wlyyRedisVerifyCodeService.verification(client_id, mobile, captcha)) {
            //验证码正确
        } else {
            return ObjEnvelop.getError("验证码错误!");
        }
        }*/
        if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
            try {
                List<BasePatientDO> basePatientDOS =basePatientDao.findByMobileAndDel(mobile,"1");

+ 4 - 4
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -422,7 +422,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        }else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
            return success(xzzxEntranceService.selectIcd10Dict(pyKey));
        }else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")){
            return success(tnyyEntranceService.findIcd10(pyKey,false));
            return success(tnPrescriptionService.getICD10(pyKey,false));
        }else {
            return ListEnvelop.getError("尚未开发!");
        }
@ -446,7 +446,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        }else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
            return success(xzzxEntranceService.selectDrugDict(pyKey));
        }else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")){
            return success(tnyyEntranceService.findTnYpxx(drugNo,null,null,pyKey,null));
            return success(tnPrescriptionService.getDrugDictionary(drugNo,pyKey,null,null,null));
        }else {
            return ListEnvelop.getError("尚未开发!");
        }
@ -464,7 +464,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        }else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
            return success(xzzxEntranceService.selectMedicineUsed(pyKey));
        }else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")){
            return success(tnyyEntranceService.findYpyf(pyKey));
            return success(tnPrescriptionService.getDrugUse(pyKey,demoFlag));
        }else {
            return ListEnvelop.getError("尚未开发!");
        }
@ -480,7 +480,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        }else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
            return success(xzzxEntranceService.selectFrequencyDict());
        }else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")){
            return success(tnyyEntranceService.findSypc(null));
            return success(tnPrescriptionService.getDrugFrequency(demoFlag));
        }else {
            return ListEnvelop.getError("尚未开发!");
        }