Browse Source

对接his

wangzhinan 1 year ago
parent
commit
c1859ea8b6

+ 15 - 27
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/DsyyEntranceService.java

@ -228,11 +228,11 @@ public class DsyyEntranceService {
        logger.info("url"+url);
        List<WlyyHospitalSysDictDO> dsyyJhNamespaces =  wlyyHospitalSysDictDao.findByDictName("hcyyJhNamespace");
        List<WlyyHospitalSysDictDO> dsyyJhNamespaces =  wlyyHospitalSysDictDao.findByDictName("dsyyJhNamespace");
        String dsyyNamespace = dsyyJhNamespaces.get(0).getDictCode();
        logger.info("hcyyCaNamespace",dsyyNamespace);
        logger.info("dsyyNamespace",dsyyNamespace);
        return WebserviceUtil.post(url,dsyyNamespace,api,params);
    }
@ -979,41 +979,29 @@ public class DsyyEntranceService {
    //========================集成平台调用开始===========================
   /* *//**
    /**
     * 发送退号信息到his
     * @return
     * @throws Exception
     *//*
    public String refundConsultation(String ApplyNo,String PayCardNo)throws Exception{
        String api = "refundConsultation";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
                "   <serverName>"+api+"</serverName>  " +
                "   <format>xml</format>" +
                "   <callOperator></callOperator> " +
                "   <certificate>"+key+"</certificate> " +
                "</root>";
        String condition ="";
        if (!StringUtils.isEmpty(ApplyNo)){
            condition += "<ApplyNo>"+ApplyNo+"</ApplyNo>";
        }
        if (!StringUtils.isEmpty(PayCardNo)){
            condition += "<PayCardNo>"+PayCardNo+"</PayCardNo>";
        }
     */
    public String authorize()throws Exception{
        String api = "authorize";
        String msgHeader ="";
        String condition ="<![CDATA[{\"clientId\":\"12222222\",\"responseType\":\"code\"}]]";
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
                "<authorize><pinput>"+condition+"</pinput></authorize>";
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        params.put("Header",msgHeader);
        params.put("Body",msgBody);
        wlyyHttpLogDO.setRequest(params.toString());
        logger.info("refundConsultation params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        logger.info("authorize params:"+params.toString());
        String xml = getDsyyJhWebServiceInfo("WritebackCvalueInterface",params,getJhServiceUrl());
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        logger.info("refundConsultation json:"+json);
        logger.info("authorize json:"+json);
        return json;
    }*/
    }
    //========================集成平台调用结束===========================

+ 1 - 1
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/AesEncryptUtils.java

@ -67,7 +67,7 @@ public class AesEncryptUtils {
        map.put("idcard","350322198812052545");
        map.put("price","1");
        map.put("type","1");*/
        String content = "{\"idcard\":\"350322198812052545\",\"price\":\"1\",\"type\":\"1\"}";
        String content = "{\"idcard\":\"35052419940523xxxx\",\"mobile\":\"176021572xxx\"}";
        System.out.println("加密前:" + content);
 
        String encrypt = encrypt(content, KEY);

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

@ -170,4 +170,10 @@ public class DsyyController extends EnvelopRestEndpoint {
        return success(dsyyEntranceService.saveInspectToHospital(IoFlag,PayCardNo,NullahNumber,
                ApplyDept,ApplyDoctor,inspectionDOList));
    }
    @GetMapping(value = "/authorize")
    @ApiOperation(value = "ca认证")
    public Envelop saveInspectToHospital() throws Exception {
        return success(dsyyEntranceService.authorize());
    }
}