Forráskód Böngészése

关闭修复入口

zhouzhendong 4 éve
szülő
commit
f5b6cf6aa9
1 módosított fájl, 11 hozzáadás és 14 törlés
  1. 11 14
      app/Jobs/ResetInstantBill.php

+ 11 - 14
app/Jobs/ResetInstantBill.php

@@ -49,14 +49,12 @@ class ResetInstantBill implements ShouldQueue
      */
     public function handle()
     {
-        switch ($this->detail->outer_table_name){
+        /*switch ($this->detail->outer_table_name){
             case "orders":
-                /** @var \stdClass $order */
                 //检查订单对象
                 $order = Order::query()->find($this->detail->outer_id);
                 if (!$order || $order->wms_status != "订单完成")break;
                 $order->loadMissing(["logistic","shop","packages.commodities.commodity","batch"]);
-                /** @var OwnerPriceExpressService $service */
                 $service = app("OwnerPriceExpressService");
                 $logistic_fee = 0;
                 $amount = 0;
@@ -109,10 +107,9 @@ class ResetInstantBill implements ShouldQueue
                     }
                     $logisticTaxFee += $tax;
                 }
-                /* 为字母单 且 重量与省份完整 且 重量大于0 且 省份存在 进入子母单计算 */
                 if ($isBunched && !$weightExceptionMark && $weight>0 && $provinceId)list($logistic_fee,$logisticTaxFee) = $service->matching($weight, $order->owner_id, $order->logistic_id, $provinceId);
                 if ($logistic_fee!==null && $logistic_fee<0)$logistic_fee = null;
-                /** @var OwnerPriceOperationService $service */
+
                 $service = app("OwnerPriceOperationService");
                 list($id,$money,$workTaxFee) = $service->matching($order,Feature::MAPPING["order"],$order->owner_id,"出库");
 
@@ -140,14 +137,14 @@ class ResetInstantBill implements ShouldQueue
                 app("OrderService")->setOrderQuantity($order->owner_id,$order->logistic_id);
                 break;
             case "processes":
-                /** @var \stdClass $process */
+
                 $process = Process::query()->with("processStatistic")->find($this->detail->outer_id);
                 $this->detail->update([
                     "work_fee"  => $process->processStatistic ? $process->processStatistic->revenue : null,
                 ]);
                 break;
             case "waybills":
-                /** @var \stdClass $waybill */
+
                 $waybill = Waybill::query()->find($this->detail->outer_id);
                 $waybill->loadMissing(["destinationCity","order.owner"]);
                 if (!$waybill->destinationCity && !$waybill->order)break;
@@ -159,13 +156,13 @@ class ResetInstantBill implements ShouldQueue
                 if ($detail && $detail->logistic_fee !== null)break;
 
                 if ($waybill->type == "专线"){
-                    /** @var OwnerPriceLogisticService $service */
+
                     $service = app("OwnerPriceLogisticService");
                     list($fee,$taxFee) = $service->matching($waybill->carrier_weight_other,$owner_id,$waybill->logistic_id,
                         $waybill->carrier_weight_unit_id_other,$waybill->order ? app("RegionService")->getProvince($waybill->order->province) : $waybill->destinationCity->province_id,
                         $waybill->destination_city_id);
                 }else{
-                    /** @var OwnerPriceDirectLogisticService $service */
+
                     $service = app("OwnerPriceDirectLogisticService");
                     list($fee,$taxFee) = $service->matching($waybill->mileage,$owner_id,$waybill->carType_id);
                 }
@@ -175,12 +172,12 @@ class ResetInstantBill implements ShouldQueue
                 ]);
                 break;
             case "stores":
-                /** @var \stdClass $store */
+
                 $store = Store::query()->find($this->detail->outer_id);
                 if (!$store || $store->status != "已入库") break;
                 $store->loadMissing(["storeItems.commodity","warehouse"]);
 
-                /** @var OwnerPriceOperationService $service */
+
                 $service = app("OwnerPriceOperationService");
                 list($id,$money,$taxFee) = $service->matching($store, Feature::MAPPING["store"], $store->owner_id, "入库");
                 $this->detail->update([
@@ -195,11 +192,11 @@ class ResetInstantBill implements ShouldQueue
                 break;
             case "rejected_bills":
                 $rejectedBill = RejectedBill::query()->find($this->detail->outer_id);
-                /** @var \stdClass $rejectedBill */
+
                 $number = array_column(StoreRejected::query()->where("logistic_number_return",$rejectedBill->logistic_number_return)->get()->toArray(),"store_id");
 
                 foreach (Store::query()->with("storeItems")->whereIn("id",$number)->get() as $store){
-                    /** @var OwnerPriceOperationService $service */
+
                     $service = app("OwnerPriceOperationService");
                     list($id,$money,$taxFee) = $service->matching($store, Feature::MAPPING["store"], $store->owner_id, "入库",0);
                     $bill = OwnerFeeDetail::query()->where("outer_id",$store->id)->where("outer_table_name","stores")->first();
@@ -222,6 +219,6 @@ class ResetInstantBill implements ShouldQueue
                         "work_tax_fee" => $taxFee,
                     ]);
                 }
-        }
+        }*/
     }
 }