shish 4 months ago
parent
commit
530faef41c
2 changed files with 4 additions and 4 deletions
  1. 1 1
      biz-ghs/order/classes/OrderClass.php
  2. 3 3
      biz-hd/purchase/classes/PurchaseClass.php

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

@@ -493,7 +493,7 @@ class OrderClass extends BaseClass
         if (empty($cgInfo)) {
             util::fail('没有找到采购信息');
         }
-        $notice = isset($params['notice']) ? $params['notice'] : true; // 兼容处理,实现控制是否发发货通知
+        $notice = $params['notice'] ?? true; // 兼容处理,实现控制是否发发货通知
         PurchaseClass::orderFh($cgInfo, $params, $allowRepeat, $notice);
     }
 

+ 3 - 3
biz-hd/purchase/classes/PurchaseClass.php

@@ -142,20 +142,20 @@ class PurchaseClass extends BaseClass
     //订单发货子方法 ssh 20231119
     public static function orderFh($cg, $params, $allowRepeat = false, $notice = false)
     {
-        if ($notice == true) {
+        if ($notice) {
             $noticeText = json_encode(['id' => $cg->id]);
             $noticeKey = "ghsKdNoticeHd";
             Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
         }
         if ($cg->status == 3) {
-            if ($allowRepeat == false) {
+            if (!$allowRepeat) {
                 util::fail('订单已发货');
             } else {
                 return true;
             }
         }
         $fhType = $params['fhType'] ?? 0;
-        if (is_numeric($fhType) == false) {
+        if (!is_numeric($fhType)) {
             util::fail('请选择发货类型');
         }
         if ($fhType == 1) {