Explorar o código

供货商名字

shish hai 11 meses
pai
achega
8e7d0035aa
Modificáronse 1 ficheiros con 13 adicións e 2 borrados
  1. 13 2
      biz-hd/purchase/services/PurchaseService.php

+ 13 - 2
biz-hd/purchase/services/PurchaseService.php

@@ -23,6 +23,7 @@ use bizHd\base\services\BaseService;
 use bizHd\cg\classes\CgRefundClass;
 use bizHd\purchase\classes\PurchaseClass;
 use bizHd\purchase\classes\PurchaseItemClass;
+use bizHd\purchase\classes\PurchaseSnClass;
 use bizHd\shop\classes\MainClass;
 use common\components\dict;
 use common\components\imgUtil;
@@ -281,9 +282,19 @@ class PurchaseService extends BaseService
     {
         $info = self::getByCondition(['orderSn' => $orderSn], true);
         if (empty($info)) {
-            noticeUtil::push('花店采购,付款成功,支付回调,单号:' . $orderSn . ',没有找到订单 ' . $attach, '15280215347');
+            $ghsName = '无供货商';
+            preg_match('/\d+/', $orderSn, $m);
+            if ($m[0]) {
+                $cgSnId = $m[0];
+                $snData = PurchaseSnClass::getById($cgSnId, true);
+                $ghsId = $snData->ghsId ?? 0;
+                if (!empty($ghsId)) {
+                    $ghs = \bizHd\ghs\classes\GhsClass::getById($ghsId, true);
+                    $ghsName = $ghs->name;
+                }
+            }
+            noticeUtil::push('花店采购,付款成功,支付回调,单号:' . $orderSn . ',没有找到订单 ' . $ghsName . ',' . $attach, '15280215347');
             $msg = "没有找到订单 orderSn:{$orderSn}";
-            Yii::info($msg);
             util::fail($msg);
         }
         if ($info->actPrice != $totalFee) {