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/consult/PatientConsultEndpoint.java
wangzhinan 4 years ago
parent
commit
629e02a749

+ 54 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionExpressageService.java

@ -486,6 +486,57 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
        }
    }
    /**
     * 解析顺丰推送过来的路由信息,和本地数据匹配并进行增量更新)
     * @param waybillRoute
     * @return
     * @throws Exception
     */
    public void SFRoutePushServiceNew(String waybillRoute) throws Exception{
        JSONObject object = JSONObject.parseObject(waybillRoute);
        Map<String,List<WlyyPrescriptionExpressageLogDO>> wayroutlsit = new HashMap<>();
        logger.info("顺丰入参:"+object);
        WlyyPrescriptionExpressageLogDO sflog = new WlyyPrescriptionExpressageLogDO();
        String accept_time = object.getString("acceptTime");
        String accept_address = object.getString("acceptAddress");
        String accept_remark = object.getString("remark");
        String opcode = object.getString("opCode");
        String mailno = object.getString("mailNo");
        String orderid = object.getString("orderId");
        String id = object.getString("id");
        String signStr = "id="+id+"&mailNo="+mailno+"&orderId="+orderid+"&opCode="+opcode+"&secretKey="+sf_check_word;
        String signLocal = SHAUtils.SHA512(signStr);
        logger.info("signStr"+signLocal);
        String sign = object.getString("sign");
        if (signLocal.equalsIgnoreCase(sign)){
            sflog.setAcceptTime(DateUtil.strToDate(accept_time));
            sflog.setAcceptAddress(accept_address);
            sflog.setAcceptRemark(accept_remark);
            sflog.setOpCode(opcode);
            sflog.setExpressageId(orderid);
            sflog.setId(UUID.randomUUID().toString());
            sflog.setCreateTime(new Date());
            if(wayroutlsit.keySet().contains(mailno)){
                wayroutlsit.get(mailno).add(sflog);
            }else{
                List<WlyyPrescriptionExpressageLogDO> newsflogs = new ArrayList<>();
                newsflogs.add(sflog);
                wayroutlsit.put(mailno,newsflogs);
            }
            if(!wayroutlsit.keySet().isEmpty()){
                for (String mailNo1:wayroutlsit.keySet()) {
                    List<WlyyPrescriptionExpressageLogDO> pushSFLogs = wayroutlsit.get(mailNo1);
                    //同一个快递单号的执行一个事务操作
                    this.saveSFPushRoutInfos(mailNo1,pushSFLogs);
                }
            }
        }else {
            throw new Exception("签名无效");
        }
    }
    /**
     * 同一个快递单号的执行一个事务操作
     * @param mailno
@ -770,7 +821,8 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
     */
    private String SFExpressPostV2(JSONObject params)throws Exception{
        params.put("version","1.0");
        params.put("timestamp",new Date().getTime());
        params.put("timestamp","4070916000000");
        logger.info("timestamp"+params.getString("timestamp"));
        String sign = SHAUtils.SHA512(params.toJSONString()+sf_check_word);
        String url =sf_url+"/api/open/api/addOrder?hospitalCode="+sf_code+"&sign="+sign;
    
@ -793,7 +845,7 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
      /*  params.put("version","1.0");
        params.put("timestamp",new Date().getTime());*/
        String sign = SHAUtils.SHA512(params+sf_check_word);
        String url =sf_url+"/api/open/api/listSelfPrintDO?hospitalCode="+sf_code+"&sign="+sign+"&version=1.0"+"&timestamp="+new Date().getTime()+"&orderNo="+params;
        String url =sf_url+"/api/open/api/listSelfPrintDO?hospitalCode="+sf_code+"&sign="+sign+"&version=1.0"+"&timestamp=4070916000000&orderNo="+params;
        logger.info("顺丰快递面单查询:sf_url"+url);
        logger.info("顺丰快递面单查询:params"+params.toString());

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

@ -5452,7 +5452,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //根据门诊唯一号取就诊记录
//        List<WlyyOutpatientDO> wlyyOutpatientDOs = outpatientDao.findByAdmNo(admNo);
        WlyyPrescriptionDO wlyyPrescriptionDOS = prescriptionDao.findByAdmNoAndRealOrder(admNo, realOrder);
        WlyyPrescriptionDO wlyyPrescriptionDOS = prescriptionDao.findByAdmNoAndRealOrder(admNo,realOrder);
        Object result = "";

+ 36 - 4
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -113,6 +113,9 @@ public class XzzxEntranceService{
    public static String entranceUrl = "http://172.16.100.240:10023/xzzx/";
    public static String entranceUrlLocal = "http://localhost:10023/xzzx/";
    public static String hospitalUrl = "http://192.168.118.240:10022/";//172.16.100.63
    public String getSelectUrl(){
@ -980,8 +983,8 @@ public class XzzxEntranceService{
            String rs = HttpUtil.sendPost(sendMessageUrl,params.toJSONString());
            logger.info("rs :"+rs);
            JSONObject rsJson = JSON.parseObject(rs);
            String resCode = rsJson.getString("resCode");
            if("000".equals(resCode)){
            String resCode = rsJson.getString("respCode");
            if("000000".equals(resCode)){
                return "1";
            }
            return "0";
@ -1021,8 +1024,8 @@ public class XzzxEntranceService{
            String rs = HttpUtil.sendPost(sendMessageUrl,params.toJSONString());
            logger.info("rs :"+rs);
            JSONObject rsJson = JSON.parseObject(rs);
            String resCode = rsJson.getString("resCode");
            if("000".equals(resCode)){
            String resCode = rsJson.getString("respCode");
            if("000000".equals(resCode)){
                return "1";
            }
            return "0";
@ -1972,4 +1975,33 @@ public class XzzxEntranceService{
//============================hospital业务层==================start====================
//===========================entrance访问hospital============start=======================
    /**
     *
     * @param admNo
     * @param realOrder
     * @return
     */
    public JSONObject getSFExpressInfoToHospital(String admNo, String realOrder) throws Exception {
        String response="";
        String url = hospitalUrl+"open/noLogin/getSFExpressInfoNew";
        Map<String,String> map = new HashedMap();
        map.put("admNo",admNo);
        map.put("realOrder",realOrder);
        logger.info("jsonobject"+map.toString());
        response = httpClientUtil.httpPost(url,map);
        JSONObject object = JSONObject.parseObject(response);
        JSONObject jsonObject1 = new JSONObject();
        logger.info("object"+object.toJSONString());
        if(object.getInteger("status")==200){
            String obj = object.getString("obj");
            object = JSONObject.parseObject(obj);
            jsonObject1.put("mailNo",object.getString("mailNo"));
        }
        return jsonObject1;
    }
//===========================entrance访问hospital============end=======================
}

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/ykyy/service/YkyyService.java

@ -97,7 +97,7 @@ public class YkyyService {
            map.put("HospitalId",HospitalId);
        }
        logger.info("眼科获取充值订单号接口入参:"+map.toString());
        String url=yktUrl_90+"api/His/GetNewSerialNumber";
        String url=yktUrl_90+"api/His/GetNewSerialNumber4Jkzl";
        try {
            response=httpClientUtil.httpPost(url,map);
        } catch (Exception e) {

File diff suppressed because it is too large
+ 60 - 0
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/third/PrescriptionUpdateController.java


+ 18 - 2
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/third/SfRoutePushController.java

@ -31,8 +31,8 @@ public class SfRoutePushController extends EnvelopRestEndpoint {
    @Autowired
    private PrescriptionExpressageService sfexpressService;
    private String successxml = "<Response service='RoutePushService'><Head>OK</Head></Response>";
    private String failedxml = "<Response service='RoutePushService'><Head>ERR</Head><ERROR code='4001'>系统发生数据错误或运行时异常</ERROR></Response>";
    private String successxml = "SUCCESS";
    private String failedxml = "FALSE";
    @RequestMapping(value="/routepushservice",method = RequestMethod.POST)
    @ApiOperation("顺丰路由信息推送")
@ -51,5 +51,21 @@ public class SfRoutePushController extends EnvelopRestEndpoint {
        }
    }
    @RequestMapping(value="/sfroutepushservice",method = RequestMethod.POST)
    @ApiOperation("顺丰路由信息推送")
    public String SFRoutePushServiceNew(
            @ApiParam(name="WaybillRoute", value="入参报文") @RequestParam(value = "WaybillRoute",required = true) String WaybillRoute){
        try {
            logger.info("顺丰路由信息推送,WaybillRoute="+WaybillRoute);
            sfexpressService.SFRoutePushServiceNew(WaybillRoute);
            return successxml;
        }catch (Exception e){
            logger.error("接收顺丰路由信息推送失败,入参WaybillRoute:"+WaybillRoute);
            //日志文件中记录异常信息
            //返回接口异常信息处理结果
            return failedxml;
        }
    }
}

File diff suppressed because it is too large
+ 64 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java


+ 13 - 13
svr/svr-internet-hospital/src/main/resources/application.yml

@ -155,7 +155,7 @@ qywx:
  id: 2
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
@ -238,7 +238,7 @@ qywx:
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
---
@ -323,7 +323,7 @@ qywx:
  id: zsyy
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000102
  sf_check_word: TGUQASFNAZyjt9112
---
@ -414,7 +414,7 @@ qywx:
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
---
@ -504,7 +504,7 @@ qywx:
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000091
  sf_check_word: SFAHKAOFAAITyjt7890
@ -589,9 +589,9 @@ qywx:
  id: xm_xzzx_wx
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000061
  sf_check_word: BEWFSCXSyjt4314rz
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000101
  sf_check_word: EDSAFWFAQWyjt8099
---
##==心脏中心外 ===============================================================================
spring:
@ -675,9 +675,9 @@ qywx:
  id: xm_xzzx_wx
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000061
  sf_check_word: BEWFSCXSyjt4314rz
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000101
  sf_check_word: EDSAFWFAQWyjt8099
---
##==厦门卫计委 ===============================================================================
spring:
@ -760,7 +760,7 @@ qywx:
  id: 2
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code:
  sf_check_word:
@ -846,7 +846,7 @@ qywx:
  id: 1
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk