Browse Source

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 4 years ago
parent
commit
41da19c4dc

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

@ -1852,7 +1852,12 @@ public class EntranceService {
    }
    /**
     * 获取五级地址
     * @param demoFlag
     * @return
     * @throws Exception
     */
    public JSONArray MS02019(boolean demoFlag) throws Exception {
        String fid = "MS02019";
        String resp = "";
@ -1867,12 +1872,152 @@ public class EntranceService {
            //查询信息拼接
            sbs.append("<MsgInfo><endNum>20000</endNum><Msg/>");
            sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
            logger.info("sbs"+sbs.toString());
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
            logger.info("resp"+resp);
        }
        return ConvertUtil.convertListEnvelopInBodyRow(resp);
    }
    /**
     *  核酸预约列表接口
     * @param deptCode
     * @param docCode
     * @param chargeType
     * @param demoFlag
     * @return
     * @throws Exception
     */
    public JSONArray BS10142(String deptCode,String docCode,String chargeType,boolean demoFlag) throws Exception {
        String fid = "BS10142";
        String resp = "";
        if (demoFlag) {
            resp = getJosnFileResullt(fid);
        } else {
            StringBuffer sbs = new StringBuffer();
            //AccessControl :用户、密码、服务id
            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>");
            sbs.append("<![CDATA[<?xml version=\"1.0\" encoding=\"utf-8\"?><root><resquest DeptCode=\""+deptCode+"\" DocCode=\""+docCode+"\" ChargeType=\""+chargeType+"\" ></resquest></root>]]>");
            sbs.append("</Msg><startNum>1</startNum></MsgInfo></ESBEntry>");
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
            logger.info("resp"+resp);
        }
        return ConvertUtil.convertListEnvelopInBodyRow(resp);
    }
    /**
     * 核酸号源查询
     * @param demoFlag
     * @return
     * @throws Exception
     */
    public JSONArray BS10143(String day,boolean demoFlag) throws Exception {
        String fid = "BS10143";
        String resp = "";
        if (demoFlag) {
            resp = getJosnFileResullt(fid);
        } else {
            StringBuffer sbs = new StringBuffer();
            //AccessControl :用户、密码、服务id
            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>");
            if (StringUtils.isNotBlank(day)) {
                sbs.append("<![CDATA[<?xml version=\"1.0\" encoding=\"utf-8\"?><root><resquest request_day=\""+day+"\" ampm=\"a\" ></resquest></root>]]>");
            }
            sbs.append("</Msg><startNum>1</startNum></MsgInfo></ESBEntry>");
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
            logger.info("resp"+resp);
        }
        return ConvertUtil.convertListEnvelopInBodyRow(resp);
    }
    /**
     * 核酸预约
     * @param deptCode 科室code
     * @param docCode 医生code
     * @param startTime 预约时间
     * @param sSID 社保卡
     * @param patientName 患者姓名
     * @param patientID 身份证
     * @param patientPhone 手机号
     * @param demoFlag
     * @return
     * @throws Exception
     */
    public JSONArray BS10144(String deptCode,String docCode,String startTime,String sSID,String patientName,String patientID,String patientPhone, boolean demoFlag) throws Exception {
        String fid = "BS10144";
        String resp = "";
        if (demoFlag) {
            resp = getJosnFileResullt(fid);
        } else {
            StringBuffer sbs = new StringBuffer();
            //AccessControl :用户、密码、服务id
            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>");
            sbs.append("<as_xml><![CDATA[<?xml version=\"1.0\" encoding=\"utf-8\"?><root><resquest DeptCode=\""+deptCode+"\" DocCode=\""+docCode+"\" ampm=\"a\" StartTime=\""+startTime+"\" SSID=\""+sSID+"\" PatientName=\""+patientName+"\" PatientID=\""+patientID+"\" PatientPhone=\""+patientPhone+"\"></resquest></root>]]></as_xml>");
            sbs.append("</Msg><startNum>1</startNum></MsgInfo></ESBEntry>");
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
            logger.info("resp"+resp);
        }
        return ConvertUtil.convertListEnvelopInBodyRow(resp);
    }
    /**
     * 核酸预约取消
     * @param deptCode 科室code
     * @param docCode 医生code
     * @param startTime 预约时间
     * @param sSID 社保卡
     * @param patientName 患者姓名
     * @param patientID 身份证
     * @param patientPhone 手机号
     * @param demoFlag
     * @return
     * @throws Exception
     */
    public JSONArray BS10145(String deptCode,String docCode,String startTime,String sSID,String patientName,String patientID,String patientPhone, boolean demoFlag) throws Exception {
        String fid = "BS10145";
        String resp = "";
        if (demoFlag) {
            resp = getJosnFileResullt(fid);
        } else {
            StringBuffer sbs = new StringBuffer();
            //AccessControl :用户、密码、服务id
            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>");
            sbs.append("<as_xml><![CDATA[<?xml version=\"1.0\" encoding=\"utf-8\"?><root><resquest DeptCode=\""+deptCode+"\" DocCode=\""+docCode+"\" ampm=\"a\" StartTime=\""+startTime+"\" SSID=\""+sSID+"\" PatientName=\""+patientName+"\" PatientID=\""+patientID+"\" PatientPhone=\""+patientPhone+"\"></resquest></root>]]></as_xml>");
            sbs.append("</Msg><startNum>1</startNum></MsgInfo></ESBEntry>");
            resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
            resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
            logger.info("resp"+resp);
        }
        return ConvertUtil.convertListEnvelopInBodyRow(resp);
    }
    /**
     * 同步医生到本地库,获取到医生的时候需要调用BS55010 查询医生的诊查费
     *

+ 4 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/util/MqSdkUtil.java

@ -123,6 +123,7 @@ public class MqSdkUtil {
        QueueTools queueTools = new QueueTools();
        // 队列管理器实例
        MQQueueManager queueManager = null;
        log.info("reqMsg"+reqMsg);
        // 消息Id
        String msgId = null;
        // 响应数据
@ -133,8 +134,8 @@ public class MqSdkUtil {
            // 发送请求消息
            msgId = queueTools.putMsg(queueManager, xmlNodeName, reqMsg);
            // 获取响应消息
            respMsg = queueTools.getMsgById(queueManager, xmlNodeName, msgId, 150);
            log.info("respMsg=="+reqMsg);
            respMsg = queueTools.getMsgById(queueManager, xmlNodeName, msgId, 1200000000);
            log.info("respMsg=="+respMsg);
            return respMsg;
        } catch (MQException e) {
            // 2033表示队列中没有消息
@ -243,6 +244,7 @@ public class MqSdkUtil {
    public static String xml2jsonArrayRootRow(String xmlString) throws Exception {
        XMLSerializer xmlSerializer = new XMLSerializer();
        JSON json = xmlSerializer.read(xmlString);
        log.info("json"+json.toString());
        Object retInfo=  ((JSONObject) json).get("RetInfo");
        Object retCode= ((JSONObject) retInfo).get("RetCode");
        if(retCode.equals("1")){

+ 8 - 0
business/base-service/src/mqConfig/esbmq-config.xml

@ -31,6 +31,14 @@
				<BS10111_1>EwellQ.S60.BS10111.GET</BS10111_1>
				<BS10138_0>EwellQ.S60.BS10138.PUT</BS10138_0>
				<BS10138_1>EwellQ.S60.BS10138.GET</BS10138_1>
				<BS10142_0>EwellQ.S60.BS10142.PUT</BS10142_0>
				<BS10142_1>EwellQ.S60.BS10142.GET</BS10142_1>
				<BS10143_0>EwellQ.S60.BS10143.PUT</BS10143_0>
				<BS10143_1>EwellQ.S60.BS10143.GET</BS10143_1>
				<BS10144_0>EwellQ.S60.BS10144.PUT</BS10144_0>
				<BS10144_1>EwellQ.S60.BS10144.GET</BS10144_1>
				<BS10145_0>EwellQ.S60.BS10145.PUT</BS10145_0>
				<BS10145_1>EwellQ.S60.BS10145.GET</BS10145_1>
				<BS15054_0>EwellQ.S60.BS15054.PUT</BS15054_0>
				<BS15054_1>EwellQ.S60.BS15054.GET</BS15054_1>
				<BS10112_0>EwellQ.S60.BS10112.PUT</BS10112_0>

+ 63 - 0
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/MqSdkController.java

@ -385,6 +385,69 @@ public class MqSdkController extends EnvelopRestEndpoint {
        return success(obj);
    }
    @GetMapping(value = "/BS10142")
    @ApiOperation(value = "核酸预约列表接口")
    public ListEnvelop BS10142(@ApiParam(name = "deptCode", value = "科室code")
                                   @RequestParam(value = "deptCode", required = true) String deptCode,
                               @ApiParam(name = "docCode", value = "医生code")
                               @RequestParam(value = "docCode", required = true) String docCode,
                               @ApiParam(name = "chargeType", value = "号别类型")
                                   @RequestParam(value = "chargeType", required = true) String chargeType) throws Exception{
        JSONArray  obj = entranceService.BS10142(deptCode,docCode,chargeType,demoFlag);
        return success(obj);
    }
    @GetMapping(value = "/BS10143")
    @ApiOperation(value = "核酸号源查询")
    public ListEnvelop BS10143(@ApiParam(name = "day", value = "时间")
                               @RequestParam(value = "day", required = true) String day) throws Exception{
        JSONArray  obj = entranceService.BS10143(day,demoFlag);
        return success(obj);
    }
    @GetMapping(value = "/BS10144")
    @ApiOperation(value = "核酸预约")
    public ListEnvelop BS10144(@ApiParam(name = "deptCode", value = "科室code")
                               @RequestParam(value = "deptCode", required = true) String deptCode,
                               @ApiParam(name = "docCode", value = "医生code")
                               @RequestParam(value = "docCode", required = true) String docCode,
                               @ApiParam(name = "startTime", value = "预约时间")
                               @RequestParam(value = "startTime", required = true) String startTime,
                               @ApiParam(name = "sSID", value = "社保卡")
                                   @RequestParam(value = "sSID", required = true) String sSID,
                               @ApiParam(name = "patientName", value = "患者姓名")
                                   @RequestParam(value = "patientName", required = true) String patientName,
                               @ApiParam(name = "patientID", value = "患者身份证")
                                   @RequestParam(value = "patientID", required = true) String patientID,
                               @ApiParam(name = "patientPhone", value = "患者手机号")
                                   @RequestParam(value = "patientPhone", required = true) String patientPhone) throws Exception{
        //String deptCode,String docCode,String startTime,String sSID,String patientName,String patientID,String patientPhone
        JSONArray  obj = entranceService.BS10144(deptCode,docCode,startTime,sSID,patientName,patientID,patientPhone,demoFlag);
        return success(obj);
    }
    @GetMapping(value = "/BS10145")
    @ApiOperation(value = "核酸预约")
    public ListEnvelop BS10145(@ApiParam(name = "deptCode", value = "科室code")
                               @RequestParam(value = "deptCode", required = true) String deptCode,
                               @ApiParam(name = "docCode", value = "医生code")
                               @RequestParam(value = "docCode", required = true) String docCode,
                               @ApiParam(name = "startTime", value = "预约时间")
                               @RequestParam(value = "startTime", required = true) String startTime,
                               @ApiParam(name = "sSID", value = "社保卡")
                               @RequestParam(value = "sSID", required = true) String sSID,
                               @ApiParam(name = "patientName", value = "患者姓名")
                               @RequestParam(value = "patientName", required = true) String patientName,
                               @ApiParam(name = "patientID", value = "患者身份证")
                               @RequestParam(value = "patientID", required = true) String patientID,
                               @ApiParam(name = "patientPhone", value = "患者手机号")
                               @RequestParam(value = "patientPhone", required = true) String patientPhone) throws Exception{
        //String deptCode,String docCode,String startTime,String sSID,String patientName,String patientID,String patientPhone
        JSONArray  obj = entranceService.BS10145(deptCode,docCode,startTime,sSID,patientName,patientID,patientPhone,demoFlag);
        return success(obj);
    }
    @PostMapping(value = "/ehospitalNotice")
    @ApiOperation(value = "互联网医院通知")
    public ObjEnvelop ehospitalNotice(

+ 9 - 0
svr/svr-internet-hospital-entrance/src/mqConfig/esbmq-config.xml

@ -26,6 +26,14 @@
				<BS10111_1>EwellQ.S60.BS10111.GET</BS10111_1>
				<BS10138_0>EwellQ.S60.BS10138.PUT</BS10138_0>
				<BS10138_1>EwellQ.S60.BS10138.GET</BS10138_1>
				<BS10142_0>EwellQ.S60.BS10142.PUT</BS10142_0>
				<BS10142_1>EwellQ.S60.BS10142.GET</BS10142_1>
				<BS10143_0>EwellQ.S60.BS10143.PUT</BS10143_0>
				<BS10143_1>EwellQ.S60.BS10143.GET</BS10143_1>
				<BS10144_0>EwellQ.S60.BS10144.PUT</BS10144_0>
				<BS10144_1>EwellQ.S60.BS10144.GET</BS10144_1>
				<BS10145_0>EwellQ.S60.BS10145.PUT</BS10145_0>
				<BS10145_1>EwellQ.S60.BS10145.GET</BS10145_1>
				<BS15054_0>EwellQ.S60.BS15054.PUT</BS15054_0>
				<BS15054_1>EwellQ.S60.BS15054.GET</BS15054_1>
				<BS10112_0>EwellQ.S60.BS10112.PUT</BS10112_0>
@ -96,6 +104,7 @@
				<MS02017_1>EwellQ.S60.MS02017.GET</MS02017_1>
				<MS02019_1>EwellQ.S60.MS02019.GET</MS02019_1>
				<MS02019_0>EwellQ.S60.MS02019.PUT</MS02019_0>
				<!--检查检验end-->
				<!-- 预约挂号start-->