shensong 5 anos atrás
pai
commit
8af4279e69
1 arquivos alterados com 3 adições e 9 exclusões
  1. 3 9
      app/Console/Commands/FxSyncMjOrderStatus.php

+ 3 - 9
app/Console/Commands/FxSyncMjOrderStatus.php

@@ -24,7 +24,7 @@ class FxSyncMjOrderStatus extends Command {
24 24
     public function handle()
25 25
     {
26 26
         $this->SyncMjOrderStatus();
27
-        $this->SyncFxOrderStatus();
27
+//        $this->SyncFxOrderStatus();
28 28
     }
29 29
     public function SyncMjOrderStatus(){
30 30
 
@@ -52,14 +52,8 @@ class FxSyncMjOrderStatus extends Command {
52 52
                         $sku_id = $code_arr[1];
53 53
                         $cost = GoodsSkus::select('referenceCost', 'is_weigh')->where('id', $sku_id)->first(); //获取规格成本/是否称重
54 54
                         $quantity = $cost->is_weigh == 1 ? $sku['quantity']/2 : $sku['quantity']; //对应规格数量
55
-//                        if(isset($sku['cost'])  && $sku['cost']>0) {
56
-//                            $order_sku_cost = $cost->is_weigh == 1 ? $sku['cost'] * 2 : $sku['cost'];
57
-//                            $data['cost'] += $order_sku_cost * $quantity; //对应规格总成本
58
-//                        } else {
59
-//                            $order_sku_cost = $cost->referenceCost;
60
-//                            $data['cost'] +=  $order_sku_cost * $quantity; //对应规格总成本
61
-//                        }
62
-                        $data['cost'] += $cost->outPrice * $quantity; //对应规格总成本
55
+
56
+                        $order_sku_cost = $cost->outPrice * $quantity; //对应规格总成本
63 57
                         #更新order_sku
64 58
                         OrderGoodsSkus::where('order_id', $order['id'])->where('sku_id', $sku_id)->update(['send_num'=>$quantity, 'cost'=>$order_sku_cost]);
65 59
                     }