|
@ -1,5 +1,6 @@
|
|
package com.yihu.jw.hospital.prescription.service;
|
|
package com.yihu.jw.hospital.prescription.service;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.yihu.jw.entity.base.org.BaseOrgDO;
|
|
import com.yihu.jw.entity.base.org.BaseOrgDO;
|
|
import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
@ -206,7 +207,7 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findOne(sfexpress_obj.getOutpatientId());
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findOne(sfexpress_obj.getOutpatientId());
|
|
BaseOrgDO hospital = baseOrgDao.findByCode(outpatientDO.getHospital());
|
|
BaseOrgDO hospital = baseOrgDao.findByCode(outpatientDO.getHospital());
|
|
BasePatientDO basePatientDO = basePatientDao.findById(outpatientDO.getPatient());
|
|
BasePatientDO basePatientDO = basePatientDao.findById(outpatientDO.getPatient());
|
|
|
|
|
|
|
|
|
|
JSONObject params = SFUtils.postSFOrderServiceV2(sfexpress_obj,hospital,basePatientDO);
|
|
JSONObject params = SFUtils.postSFOrderServiceV2(sfexpress_obj,hospital,basePatientDO);
|
|
String re = this.SFExpressPostV2(params);
|
|
String re = this.SFExpressPostV2(params);
|
|
//xml验证
|
|
//xml验证
|
|
@ -214,10 +215,23 @@ public class PrescriptionExpressageService extends BaseJpaService<WlyyPrescripti
|
|
verificationResponV2(re);
|
|
verificationResponV2(re);
|
|
|
|
|
|
JSONObject respone = JSONObject.parseObject(re);
|
|
JSONObject respone = JSONObject.parseObject(re);
|
|
|
|
// String re = "{\"success\":true,\"message\":null,\"code\":\"SUCCESS\",\"result\":{\"successResult\":[{\"mailNo\":\"SF1023527844982\",\"bspOrderNo\":\"2c9081aa724b941501724eb3d0e40036\"}]}}";
|
|
|
|
// JSONObject respone = JSONObject.parseObject(re);
|
|
|
|
|
|
String mailno = "";//顺丰运单号
|
|
String mailno = "";//顺丰运单号
|
|
|
|
|
|
|
|
JSONArray successResult = respone.getJSONObject("result").getJSONArray("successResult");
|
|
|
|
|
|
|
|
if(!successResult.isEmpty()){
|
|
|
|
JSONObject object = successResult.getJSONObject(0);
|
|
|
|
mailno = object.getString("mailNo");
|
|
|
|
}
|
|
|
|
|
|
|
|
logger.info("顺丰快递下订单:mailno"+mailno);
|
|
|
|
|
|
mailno = respone.getJSONObject("result").getJSONArray("successResult").getJSONObject(0).getString("mailNo");
|
|
|
|
|
|
|
|
|
|
// mailno = respone.getJSONObject("result").getJSONArray("successResult").getJSONObject(0).getString("mailNo");
|
|
|
|
|
|
sfexpress_obj.setMailno(mailno);
|
|
sfexpress_obj.setMailno(mailno);
|
|
return sfexpress_obj;
|
|
return sfexpress_obj;
|
|
}
|
|
}
|