|
|
@@ -14,6 +14,37 @@ use Yii;
|
|
|
class ExpressController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //获取采购单物流运单的轨迹 ssh 20250705
|
|
|
+ public function actionGetCgExpressTrack()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $order = OrderClass::getById($id, true);
|
|
|
+ if (empty($order)) {
|
|
|
+ util::fail('没有找到订单');
|
|
|
+ }
|
|
|
+ if ($order->mainId != $this->mainId) {
|
|
|
+ util::fail('不是你的订单');
|
|
|
+ }
|
|
|
+ $bizIdMap = dict::getDict('expressBizIdMap');
|
|
|
+ if (getenv('YII_ENV') == 'production') {
|
|
|
+ $bizId = $bizIdMap[$mainId] ?? 0;
|
|
|
+ if (empty($bizId)) {
|
|
|
+ util::fail('没有找到月结账号');
|
|
|
+ }
|
|
|
+ //暂时只支持顺丰
|
|
|
+ $deliveryId = 'SF';
|
|
|
+ } else {
|
|
|
+ $deliveryId = 'TEST';
|
|
|
+ $bizId = 'test_biz_id';
|
|
|
+ }
|
|
|
+ $params = [
|
|
|
+ 'deliveryId' => $deliveryId,
|
|
|
+ ];
|
|
|
+ $respond = ExpressClass::getTrack($params, $order);
|
|
|
+ util::success($respond);
|
|
|
+ }
|
|
|
+
|
|
|
public function actionTestUpdate()
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|