Переглянути джерело

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

trick9191 5 роки тому
батько
коміт
5f95ea2b9f

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

@ -1017,14 +1017,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        net.sf.json.JSONObject rs = entranceService.BS10111(outpatientDO.getCardNo(),doctorMappingDO.getMappingCode(),outpatientDO.getDept(),null,outpatientDO.getWinNo(),demoFlag);
        String rsCode = rs.getJSONObject("resquest").getString("@RESULT");
        net.sf.json.JSONObject res = rs.getJSONObject("resquest");
        logger.info("res: " +res.toString());
        String rsCode = res.getString("@RESULT");
        if("0".equals(rsCode)){
            //存储挂号号
            String serialNo = (String)rs.get("serial_no");
            outpatientDO.setRegisterNo(serialNo);
            String conNo = (String)rs.get("@times");
            outpatientDO.setConNo(conNo);
            outpatientDao.save(outpatientDO);
        }
            //保存日志
        WlyyHttpLogDO log = new WlyyHttpLogDO();
@ -1192,13 +1194,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    json.put("days",info.getDays());
                    json.put("frequency",info.getFrequency());
                    jsonData.add(json);
                    logger.info("json:" +json.toString());
                }
                //保存处方
                prescriptionInfoDao.save(infoDOs);
                
                //调用his开方接口
                net.sf.json.JSONObject jsonObject = entranceService.BS10112(jsonData.toJSONString(),demoFlag);
                logger.info("调用his开方接口: "+jsonObject.toString());
                //判断返回结果
                String rs = jsonObject.getString("@RESULT");

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

@ -157,26 +157,26 @@ public class EntranceService {
        }else{
            //先调用银医通获取下载余额到his,再查询his中卡余额
            net.sf.json.JSONObject jsonObject= callYYTServerService(cardNo);
           if(null!=jsonObject && "1".equals(jsonObject.get("code").toString())){
               JSONObject msg=new JSONObject();
               msg.put("endNum","20000");
               msg.put("Msg", new net.sf.json.JSONArray() );
               JSONObject query=new JSONObject();
               query.put("@compy","=");
               query.put("@item","CARD_NO");
               query.put("@splice","and");
               query.put("@value",cardNo);
               msg.put("query",query);
               msg.put("startNum",1);
               List<String> stringList=new ArrayList<>();
               stringList.add(cardNo);
               //获取消息
               resp = MqSdkUtil.putReqAndGetResp(msg.toString(), fid, "1",stringList);
               //解析
               resp= MqSdkUtil.xml2jsonObject(resp);
           }else {
               return jsonObject;
           }
            if(null!=jsonObject && "1".equals(jsonObject.get("code").toString())){
                JSONObject msg=new JSONObject();
                msg.put("endNum","20000");
                msg.put("Msg", new net.sf.json.JSONArray() );
                JSONObject query=new JSONObject();
                query.put("@compy","=");
                query.put("@item","CARD_NO");
                query.put("@splice","and");
                query.put("@value",cardNo);
                msg.put("query",query);
                msg.put("startNum",1);
                List<String> stringList=new ArrayList<>();
                stringList.add(cardNo);
                //获取消息
                resp = MqSdkUtil.putReqAndGetResp(msg.toString(), fid, "1",stringList);
                //解析
                resp= MqSdkUtil.xml2jsonObject(resp);
            }else {
                return jsonObject;
            }
        }
        return  ConvertUtil.convertObjectEnvelopByString(resp);
@ -485,7 +485,7 @@ public class EntranceService {
        wlyyPrescriptionDiagnosisVO.setCreateTime(new Date());
        wlyyPrescriptionDiagnosisVO.setType(type);
       return wlyyPrescriptionDiagnosisVO;
        return wlyyPrescriptionDiagnosisVO;
    }
    /**
@ -751,7 +751,7 @@ public class EntranceService {
            sbs.append("<ESBEntry><AccessControl><Fid>" + fid + "</Fid><UserName>"+mqUser+"</UserName><Password>"+mqPwd+"</Password></AccessControl>");
            //MessageHeader :固定值 消费方系统编号 S60,提供方系统编号 S01
            sbs.append("<MessageHeader><Fid>" + fid + "</Fid><MsgDate>" + DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS) + "</MsgDate><SourceSysCode>"+sourceSysCode+"</SourceSysCode><TargetSysCode>"+targetSysCode+"</TargetSysCode></MessageHeader>");
           //查询信息拼接
            //查询信息拼接
            sbs.append("<MsgInfo><endNum>20000</endNum><Msg><![CDATA[<?xml version=\"1.0\" encoding=\"utf-8\"?><root>");
            sbs.append("<resquest card_no=\"" + card_no + "\" doctor=\"" + doctor + "\" dept=\"" + dept + "\" charge_type=\"" + charge_type + "\"   win_no=\"" + win_no + "\" >");
            sbs.append("</resquest></root>]]></Msg><startNum>1</startNum></MsgInfo></ESBEntry>");
@ -782,41 +782,41 @@ public class EntranceService {
            sbs.append("<ESBEntry><AccessControl><Fid>" + fid + "</Fid><UserName>"+mqUser+"</UserName><Password>"+mqPwd+"</Password></AccessControl>");
            //MessageHeader :固定值 消费方系统编号 S60,提供方系统编号 S01
            sbs.append("<MessageHeader><Fid>" + fid + "</Fid><MsgDate>" + DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS) + "</MsgDate><SourceSysCode>"+sourceSysCode+"</SourceSysCode><TargetSysCode>"+targetSysCode+"</TargetSysCode></MessageHeader>");
           sbs.append("<MsgInfo><endNum>20000</endNum><Msg><![CDATA[<?xml version=\"1.0\" encoding=\"utf-8\"?><root>");
            sbs.append("<MsgInfo><endNum>20000</endNum><Msg><![CDATA[<?xml version=\"1.0\" encoding=\"utf-8\"?><root>");
            for(WlyyHisPrescriptionVO vo:patientSubscribeJkedus){
                //必输字段
                sbs.append("<resquest card_no=\"" + vo.getCardNo() + "\" doctor=\"" + vo.getDoctor() + "\" dept=\"" + vo.getDept() + "\" charge_code=\"" + vo.getChargeCode() + "\" win_no=\"" + vo.getWinNo() + "\" charge_flag=\"" + vo.getChargeFlag() + "\" ");
                sbs.append("quantity=\"" + vo.getQuantity() + "\"  serial_no=\"" + vo.getSerialNo() + "\"  group_no=\"" + vo.getGroupNo() + "\"   serial=\"" + vo.getSerial() + "\"   icd_code=\"" + vo.getIcdCode()+"\"");
                //选填字段
                if(StringUtils.isNotBlank(vo.getDiagTwo())){
                    sbs.append("\" diag_two=\""+vo.getDiagTwo()+"\"");
                    sbs.append(" diag_two=\""+vo.getDiagTwo()+"\"");
                }
                if(StringUtils.isNotBlank(vo.getDiagThree())){
                    sbs.append("\" diag_three=\""+vo.getDiagThree()+"\"");
                    sbs.append(" diag_three=\""+vo.getDiagThree()+"\"");
                }
                if(StringUtils.isNotBlank(vo.getDiagFour())){
                    sbs.append("\" diag_four=\""+vo.getDiagFour()+"\"");
                    sbs.append(" diag_four=\""+vo.getDiagFour()+"\"");
                }
                if (StringUtils.isNotBlank(vo.getDiagFive())) {
                    sbs.append("\" diag_five=\"" + vo.getDiagFive() + "\"");
                    sbs.append(" diag_five=\"" + vo.getDiagFive() + "\"");
                }
                if (StringUtils.isNotBlank(vo.getDosage())) {
                    sbs.append("\" dosage=\"" + vo.getDosage() + "\"");
                    sbs.append(" dosage=\"" + vo.getDosage() + "\"");
                }
                if (StringUtils.isNotBlank(vo.getUnit())) {
                    sbs.append("\" unit=\"" + vo.getUnit() + "\"");
                    sbs.append(" unit=\"" + vo.getUnit() + "\"");
                }
                if (StringUtils.isNotBlank(vo.getUsage())) {
                    sbs.append("\" usage=\"" + vo.getUsage() + "\"");
                    sbs.append(" usage=\"" + vo.getUsage() + "\"");
                }
                if(StringUtils.isNotBlank(vo.getSupplyCode())){
                    sbs.append("\" supply_code=\""+vo.getSupplyCode()+"\"");
                    sbs.append(" supply_code=\""+vo.getSupplyCode()+"\"");
                }
                if(StringUtils.isNotBlank(vo.getDays())){
                    sbs.append("\" days=\""+vo.getDays()+"\"");
                    sbs.append(" days=\""+vo.getDays()+"\"");
                }
                if(StringUtils.isNotBlank(vo.getFrequency())){
                    sbs.append("\" frequency=\""+vo.getFrequency()+ "\"");
                    sbs.append(" frequency=\""+vo.getFrequency()+ "\"");
                }
                sbs.append("/>");
            }
@ -1220,7 +1220,7 @@ public class EntranceService {
            if (StringUtils.isNotBlank(conNo)) {
                sbs.append("<query compy=\"=\" item=\"times\" splice=\"and\" value=\"'" + conNo + "'\"/>");
            }
             sbs.append("<order item=\"apply_date\" sort=\"desc\"/>");
            sbs.append("<order item=\"apply_date\" sort=\"desc\"/>");
            sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
@ -1599,10 +1599,10 @@ public class EntranceService {
                            }
                        }
                }
                    }
            }
        }}
                }
            }}
//            net.sf.json.JSONArray jsonArray = ConvertUtil.convertListEnvelopInBodyRowMS02003(resp);
//            for (Object object : jsonArray) { }
//        }

+ 3 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -112,7 +112,9 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
				logger.info("调用挂号接口====START");
				net.sf.json.JSONObject rs = prescriptionService.registerOutPatient(outpatientCode,doctorCode);
				logger.info("调用挂号接口,rs:"+rs.toString());
				String rsCode = (String)rs.get("@RESULT");
				net.sf.json.JSONObject res = rs.getJSONObject("resquest");
				String rsCode = (String)res.get("@RESULT");
				if(!"0".equals(rsCode)){
					return failed("挂号失败,无法发起咨询");
				}