根据快递code判断订单bc类型

This commit is contained in:
ZweiCD 2020-08-27 16:32:35 +08:00
parent ee866468de
commit 5ec1668057

View File

@ -156,4 +156,23 @@ class WmsStrategy
return 'toC';
}
}
/**
* 根据物流快递判断订单bc类型
* @param $expressCode
* @return string
*/
static public function getOrderTypeByExpressCode($expressCode)
{
$expressChooseConf = require(dirname(dirname(__FILE__)) . '/config/express_choose.php');
$logisticsToC = collect($expressChooseConf['logistics']['toC'])->pluck('code')->toArray();
if (in_array($expressCode, $logisticsToC)) {
return 'toC';
}
$logisticsToB = collect($expressChooseConf['logistics']['toB'])->pluck('code')->toArray();
if (in_array($expressCode, $logisticsToB)) {
return 'toB';
}
return '';
}
}