Bladeren bron

居中放大

shish 4 jaren geleden
bovenliggende
commit
defde72f56
2 gewijzigde bestanden met toevoegingen van 16 en 14 verwijderingen
  1. 15 12
      app-hd/controllers/WorkController.php
  2. 1 2
      biz-hd/order/classes/OrderClass.php

+ 15 - 12
app-hd/controllers/WorkController.php

@@ -237,7 +237,10 @@ class WorkController extends BaseController
             WorkClass::finish($work);
             $transaction->commit();
 
-            WorkClass::print($work, $this->shop, false);
+            //情人节美团的暂时不打小票
+            if ($work->fromType != 4) {
+                WorkClass::print($work, $this->shop, false);
+            }
 
             $msg = '已完成';
 
@@ -258,17 +261,17 @@ class WorkController extends BaseController
                     $thirdOrderId = $order->thirdOrderId ?? '';
                     $fromType = $order->fromType ?? 0;
                     if (!empty($thirdOrderId) && $fromType == dict::getDict('fromType', 'mt')) {
-                        $shopId = $order->shopId ?? 0;
-                        $ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
-                        $config = dict::getDict('mtConfig');
-                        $app = new Application($config);
-                        $accessToken = mtUtil::getAccessToken($ext);
-                        $params = ['order_id' => $thirdOrderId, 'access_token' => $accessToken];
-                        $mtRes = $app->order->logisticsPush($params);
-                        $mtRes = json_decode($mtRes, true);
-                        if (isset($mtRes['data']) && $mtRes['data'] == 'ok') {
-                            $msg = '已完成,已通知骑手';
-                        }
+//                        $shopId = $order->shopId ?? 0;
+//                        $ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
+//                        $config = dict::getDict('mtConfig');
+//                        $app = new Application($config);
+//                        $accessToken = mtUtil::getAccessToken($ext);
+//                        $params = ['order_id' => $thirdOrderId, 'access_token' => $accessToken];
+//                        $mtRes = $app->order->logisticsPush($params);
+//                        $mtRes = json_decode($mtRes, true);
+//                        if (isset($mtRes['data']) && $mtRes['data'] == 'ok') {
+//                            $msg = '已完成,已通知骑手';
+//                        }
                     }
                 }
             }

+ 1 - 2
biz-hd/order/classes/OrderClass.php

@@ -441,7 +441,6 @@ class OrderClass extends BaseClass
                 $printSn = $ext['mtPrintSn'] ?? '';
             }
         }
-        noticeUtil::push("shopId:{$shopId} 打印2:" . $printSn, '15280215347');
         if (empty($printSn)) {
             return false;
         }
@@ -472,7 +471,7 @@ class OrderClass extends BaseClass
             $content .= '--------------------------------<BR>';
             $content .= date("Y-m-d", strtotime($order->addTime)) . '<BR>';
         } else {
-            $content = '<B>' . $fromTypeName . ' ' . $respond['sendNum'] . '</B><BR>';
+            $content = '<CB>' . $fromTypeName .  '<CB><BR>';
         }
         $content .= '--------------------------------<BR>';