Browse Source

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

# Conflicts:
#	business/base-service/src/main/java/com/yihu/jw/hospital/doctor/dao/DoctorWorkTimeDao.java
#	business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
#	gateway/ag-basic/src/main/resources/bootstrap.yml
#	svr/svr-internet-hospital/src/main/resources/application.yml
wangzhinan 5 năm trước cách đây
mục cha
commit
3c8802bb17

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

@ -222,12 +222,14 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
//        JSONObject respone = JSONObject.parseObject(re);
        String mailno = "";//顺丰运单号
        String bspOrderNo = "";//顺丰业务号
        
        JSONArray successResult =  respone.getJSONObject("result").getJSONArray("successResult");
        
        if(!successResult.isEmpty()){
            JSONObject object = successResult.getJSONObject(0);
            mailno = object.getString("mailNo");
            bspOrderNo = object.getString("bspOrderNo");
        }
    
        logger.info("顺丰快递下订单:mailno"+mailno);
@ -236,6 +238,7 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
//        mailno = respone.getJSONObject("result").getJSONArray("successResult").getJSONObject(0).getString("mailNo");
        
        sfexpress_obj.setMailno(mailno);
        sfexpress_obj.setBspOrderNo(bspOrderNo);
        return sfexpress_obj;
    }
@ -251,9 +254,8 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
        //获取医生所处的医院详细地址,作为寄件人地址
        WlyyOutpatientDO outpatientDO = outpatientDao.findOne(sfexpress_obj.getOutpatientId());
        JSONObject params =new JSONObject();
        params.put("orderNo",sfexpress_obj.getMailno());
        String re = this.SFExpressQueryPostV2(params);
        String orderNo=sfexpress_obj.getBspOrderNo();
        String re = this.SFExpressQueryPostV2(orderNo);
        //xml验证
        logger.info("顺丰快递面单查询:re"+re);
        verificationResponV2(re);
@ -787,17 +789,17 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
     * @return
     * @throws Exception
     */
    private String SFExpressQueryPostV2(JSONObject params)throws Exception{
        params.put("version","1.0");
        params.put("timestamp",new Date().getTime());
        String sign = SHAUtils.SHA512(params.toJSONString()+sf_check_word);
        String url =sf_url+"/api/open/api/addOrder?hospitalCode="+sf_code+"&sign="+sign;
    private String SFExpressQueryPostV2(String params)throws Exception{
      /*  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;
        logger.info("顺丰快递面单查询:sf_url"+url);
        logger.info("顺丰快递面单查询:params"+params.toString());
        String re = HttpClientUtils.doPost(url, params.toJSONString(), ContentType.APPLICATION_JSON);
        String re = HttpClientUtils.doGet(url);
        return re;
    }
    

+ 14 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionExpressageDO.java

@ -41,6 +41,11 @@ public class WlyyPrescriptionExpressageDO extends UuidIdentityEntity {
	 */
	private String mobile;
    /**
     * 顺丰业务号
     */
	private String bspOrderNo;
    /**
	 * 收货人座机号 0592-1111111
	 */
@ -324,4 +329,13 @@ public class WlyyPrescriptionExpressageDO extends UuidIdentityEntity {
    public void setDel(Integer del) {
        this.del = del;
    }
    @Column(name = "bsp_order_no")
    public String getBspOrderNo() {
        return bspOrderNo;
    }
    public void setBspOrderNo(String bspOrderNo) {
        this.bspOrderNo = bspOrderNo;
    }
}

+ 7 - 5
svr/svr-internet-hospital-entrance/src/main/resources/application.yml

@ -135,7 +135,7 @@ wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
@ -174,6 +174,7 @@ wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
express:
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000102
@ -222,6 +223,7 @@ wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
@ -270,7 +272,7 @@ wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
@ -311,7 +313,7 @@ wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: xm_xzzx_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code:
@ -354,7 +356,7 @@ wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
@ -397,7 +399,7 @@ wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL