|
@ -591,14 +591,16 @@ public class SFExpressService extends BaseService {
|
|
|
Document doc = DocumentHelper.parseText(re);
|
|
|
String headvalue = doc.selectSingleNode("/Response/Head").getText();
|
|
|
if(StringUtils.isNotBlank(headvalue) && "OK".equals(headvalue)) {
|
|
|
Element root = doc.getRootElement();
|
|
|
if (root.element("Body") != null) //包含OrderResponse节点
|
|
|
{
|
|
|
root = root.element("Body");
|
|
|
}
|
|
|
|
|
|
//是否能派送:1:人工确认;2:可收派;3:不可以收派
|
|
|
String filter_result = "";
|
|
|
String orderid = "";//业务订单号
|
|
|
String mailno = "";//顺丰运单号
|
|
|
|
|
|
//错误代对应的文字
|
|
|
Document redoc = doc.selectSingleNode("/Response/Body/Orderresponse").getDocument();
|
|
|
Element root = redoc.getRootElement();
|
|
|
List<?> child = root.elements();
|
|
|
for (Object o : child) {
|
|
|
Element e = (Element) o;
|
|
@ -606,18 +608,15 @@ public class SFExpressService extends BaseService {
|
|
|
orderid = e.attributeValue("orderid");
|
|
|
mailno = e.attributeValue("mailno");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(filter_result) && "3".equals(filter_result)){
|
|
|
logger.info("顺丰快递下订单失败:派送地址不可派送,处方编号:"+sfexpress_obj.getPrescriptionCode());
|
|
|
throw new Exception("顺丰快递下订单失败:派送地址不可派送");
|
|
|
}
|
|
|
|
|
|
if(StringUtils.isBlank(mailno)){
|
|
|
logger.info("顺丰快递下订单失败:未获取到快递单号!"+sfexpress_obj.getPrescriptionCode());
|
|
|
throw new Exception("顺丰快递下订单失败:未获取到快递单号!");
|
|
|
}
|
|
|
|
|
|
if(StringUtils.isNotBlank(filter_result) && "3".equals(filter_result)){
|
|
|
logger.info("顺丰快递下订单失败:派送地址不可派送,处方编号:"+sfexpress_obj.getPrescriptionCode());
|
|
|
throw new Exception("顺丰快递下订单失败:派送地址不可派送!");
|
|
|
}
|
|
|
|
|
|
sfexpress_obj.setMailno(mailno);
|
|
|
}
|
|
|
|
|
|
|