发货单创建支持指定发货物流公司

This commit is contained in:
ZweiCD 2020-04-08 15:45:31 +08:00
parent ddbf8c2fb9
commit 7710d06f0d
2 changed files with 8 additions and 2 deletions

View File

@ -51,6 +51,7 @@ class QimenWms extends BaseWms implements WmsInterface
'shopNick' => $order['order_sender_info']['shop_name'] ?? static::$default_shop_name, 'shopNick' => $order['order_sender_info']['shop_name'] ?? static::$default_shop_name,
'sellerNick' => $order['order_sender_info']['shop_name'] ?? static::$default_seller_nick, 'sellerNick' => $order['order_sender_info']['shop_name'] ?? static::$default_seller_nick,
'remark' => $order['remark'], 'remark' => $order['remark'],
'logisticsCode' => $order['order_express'] ? strtoupper($order['order_express']) : '',
//发货人信息 //发货人信息
'senderInfo' => [ 'senderInfo' => [
'name' => $order['order_sender_info']['name'] ?? static::$default_sender_name, 'name' => $order['order_sender_info']['name'] ?? static::$default_sender_name,
@ -106,7 +107,9 @@ class QimenWms extends BaseWms implements WmsInterface
} }
} }
$postData = array_merge($postData, ['orderLines' => ['orderLine' => $orderLine]]); $postData = array_merge($postData, ['orderLines' => ['orderLine' => $orderLine]]);
$postData['deliveryOrder'] = array_merge($postData['deliveryOrder'], ['logisticsCode' => $this->chooseLogisticsCompany($order['order_address']['receive_province'], $skuTotalWeight)]); if (!isset($order['order_express']) || !$order['order_express']) {
$postData['deliveryOrder'] = array_merge($postData['deliveryOrder'], ['logisticsCode' => $this->chooseLogisticsCompany($order['order_address']['receive_province'], $skuTotalWeight)]);
}
$result = $this->xmlPost($method, $postData); $result = $this->xmlPost($method, $postData);
return $result; return $result;

View File

@ -52,6 +52,7 @@ class XinyiWms extends BaseWms implements WmsInterface
'shopNick' => $order['order_sender_info']['shop_name'] ?? self::DEFAULT_SHOP_NAME, 'shopNick' => $order['order_sender_info']['shop_name'] ?? self::DEFAULT_SHOP_NAME,
'sellerNick' => $order['order_sender_info']['shop_name'] ?? self::DEFAULT_SELLER_NICK, 'sellerNick' => $order['order_sender_info']['shop_name'] ?? self::DEFAULT_SELLER_NICK,
'remark' => $order['remark'], 'remark' => $order['remark'],
'logisticsCode' => $order['order_express'] ? strtoupper($order['order_express']) : '',
//发货人信息 //发货人信息
'senderInfo' => [ 'senderInfo' => [
'name' => $order['order_sender_info']['name'] ?? self::DEFAULT_SENDER_NAME, 'name' => $order['order_sender_info']['name'] ?? self::DEFAULT_SENDER_NAME,
@ -113,7 +114,9 @@ class XinyiWms extends BaseWms implements WmsInterface
} }
} }
$postData = array_merge($postData, ['orderLines' => ['orderLine' => $orderLine]]); $postData = array_merge($postData, ['orderLines' => ['orderLine' => $orderLine]]);
$postData['deliveryOrder'] = array_merge($postData['deliveryOrder'], ['logisticsCode' => $this->chooseLogisticsCompany($order['order_address']['receive_province'], $skuTotalWeight)]); if (!isset($order['order_express']) || !$order['order_express']) {
$postData['deliveryOrder'] = array_merge($postData['deliveryOrder'], ['logisticsCode' => $this->chooseLogisticsCompany($order['order_address']['receive_province'], $skuTotalWeight)]);
}
$result = $this->xmlPost($method, $postData); $result = $this->xmlPost($method, $postData);
return $result; return $result;