shish hace 1 año
padre
commit
f43792847b
Se han modificado 1 ficheros con 10 adiciones y 10 borrados
  1. 10 10
      biz-ghs/order/classes/OrderClass.php

+ 10 - 10
biz-ghs/order/classes/OrderClass.php

@@ -1802,13 +1802,13 @@ class OrderClass extends BaseClass
         $printSn = $ext->printSn ?? '';
 
         /**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
-        $mainId = $shop->mainId;
+        $orderMainId = $orderInfo['mainId'] ?? 0;
         if (getenv('YII_ENV') == 'production') {
             $map = [65726, 58];
         } else {
-            $map = [828,0];
+            $map = [828, 0];
         }
-        if (in_array($mainId, $map)) {
+        if (in_array($orderMainId, $map)) {
             self::printLogisticsLabel($orderInfo, $shop, $ext);
         }
         /**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
@@ -2845,18 +2845,18 @@ XL;
     public static function printLogisticsLabel($order, $shop, $ext)
     {
         /**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
-        $mainId = $shop->mainId;
+        $orderMainId = $order->mainId;
         if (getenv('YII_ENV') == 'production') {
-            $map = [65726,58];
+            $map = [65726, 58];
         } else {
-            $map = [828,0];
+            $map = [828, 0];
         }
         /**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
 
         $customId = $order->customId ?? 0;
         $custom = CustomClass::getById($customId, true);
         if (empty($custom)) {
-            if (!in_array($mainId, $map)) {
+            if (!in_array($orderMainId, $map)) {
                 util::fail('没有找到客户');
             } else {
                 return false;
@@ -2867,7 +2867,7 @@ XL;
         $shortName = stringUtil::subStringUtf8($shortName, 5);
         $customMobile = $order->customMobile ?? '';
         if (empty($customMobile)) {
-            if (!in_array($mainId, $map)) {
+            if (!in_array($orderMainId, $map)) {
                 util::fail('客户手机号无效');
             } else {
                 return false;
@@ -2889,7 +2889,7 @@ XL;
 
         $wlLabelSn = $ext->wlLabelSn ?? '';
         if (empty($wlLabelSn)) {
-            if (!in_array($mainId, $map)) {
+            if (!in_array($orderMainId, $map)) {
                 util::fail('请绑定物流标签机');
             } else {
                 return false;
@@ -2897,7 +2897,7 @@ XL;
         }
         $p = new printUtil($wlLabelSn);
 
-        if (!in_array($mainId, $map)) {
+        if (!in_array($orderMainId, $map)) {
             if (empty($shortName)) {
                 util::fail('客户短名没有设置');
             }