|
|
@@ -7,12 +7,9 @@ use App\Order;
|
|
|
use App\OwnerFeeDetail;
|
|
|
use App\OwnerFeeDetailLogistic;
|
|
|
use App\OwnerFeeExpress;
|
|
|
+use App\OwnerFeeLogistic;
|
|
|
use App\Process;
|
|
|
-use App\Province;
|
|
|
-use App\RejectedBill;
|
|
|
-use App\Services\CacheService;
|
|
|
use App\Services\OwnerPriceDirectLogisticService;
|
|
|
-use App\Services\OwnerPriceExpressService;
|
|
|
use App\Services\OwnerPriceLogisticService;
|
|
|
use App\Services\OwnerPriceOperationService;
|
|
|
use App\Store;
|
|
|
@@ -22,12 +19,10 @@ use Illuminate\Bus\Queueable;
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
|
-use Illuminate\Queue\SerializesModels;
|
|
|
-use Illuminate\Support\Facades\Cache;
|
|
|
|
|
|
class ResetInstantBill implements ShouldQueue
|
|
|
{
|
|
|
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
+ use Dispatchable, InteractsWithQueue, Queueable;
|
|
|
|
|
|
/** @var \stdClass $detail */
|
|
|
private $detail;
|
|
|
@@ -79,9 +74,8 @@ class ResetInstantBill implements ShouldQueue
|
|
|
"work_tax_fee" => $workTaxFee,
|
|
|
"logistic_tax_fee" => $logisticInfo["logisticTaxFee"],
|
|
|
]);
|
|
|
- //向指定表插入标记 TODO
|
|
|
- //if ($logisticInfo["logisticFee"] && $logisticInfo["fee_info"])OwnerFeeExpress::query()->insert($logisticInfo["fee_info"]);
|
|
|
- /*if ($money>0)app("StoreService")->constructFeeInfo([
|
|
|
+ if ($logisticInfo["logisticFee"] && $logisticInfo["fee_info"])OwnerFeeExpress::query()->insert($logisticInfo["fee_info"]);
|
|
|
+ if ($money>0)app("StoreService")->constructFeeInfo([
|
|
|
"worked_at" => $order->wms_edittime ?: $order->updated_at,
|
|
|
"owner_id" => $order->owner_id,
|
|
|
"model_id" => $id,
|
|
|
@@ -91,7 +85,7 @@ class ResetInstantBill implements ShouldQueue
|
|
|
"total_fee" =>0,
|
|
|
"tax_rate" =>0,
|
|
|
"fee_description"=>'',
|
|
|
- ]);*/
|
|
|
+ ]);
|
|
|
//后续处理
|
|
|
OwnerFeeDetailLogistic::query()->where("owner_fee_detail_id",$this->detail->id)->delete();
|
|
|
foreach ($logisticInfo["items"] as &$item)$item["owner_fee_detail_id"] = $this->detail->id;
|
|
|
@@ -132,7 +126,7 @@ class ResetInstantBill implements ShouldQueue
|
|
|
$service = app("OwnerPriceLogisticService");
|
|
|
list($fee,$taxFee) = $service->matching($waybill->carrier_weight_other,$owner_id,$waybill->logistic_id,
|
|
|
$waybill->carrier_weight_unit_id_other,$provinceId, $cityId);
|
|
|
- //$this->buildWaybillFeeInfo(); TODO
|
|
|
+ if (isset($GLOBALS["FEE_INFO"])) OwnerFeeLogistic::query()->create($GLOBALS["FEE_INFO"]);
|
|
|
}else{
|
|
|
/** @var OwnerPriceDirectLogisticService $service */
|
|
|
$service = app("OwnerPriceDirectLogisticService");
|
|
|
@@ -162,7 +156,7 @@ class ResetInstantBill implements ShouldQueue
|
|
|
"owner_price_operation_id" => $id,
|
|
|
"work_tax_fee" => $taxFee,
|
|
|
]);
|
|
|
- /* if ($money>0)$this->constructFeeInfo([
|
|
|
+ if ($money>0)app("StoreService")->constructFeeInfo([
|
|
|
"worked_at" => $store->updated_at,
|
|
|
"owner_id" => $store->owner_id,
|
|
|
"model_id" => $id,
|
|
|
@@ -172,7 +166,7 @@ class ResetInstantBill implements ShouldQueue
|
|
|
"total_fee" =>0,
|
|
|
"tax_rate" =>0,
|
|
|
"fee_description"=>'',
|
|
|
- ]);*/
|
|
|
+ ]);
|
|
|
break;
|
|
|
case "rejected_bills":
|
|
|
/** @var \stdClass $rejectedBill */
|