|
|
@@ -285,8 +285,8 @@ class OrderPackageService
|
|
|
$update_params = [];
|
|
|
$update_params[] = ['id', 'sent_at'];
|
|
|
foreach ($packages as $package) {
|
|
|
- if ($package->sent_at && !isset($map[$package->logistic_number])) continue;
|
|
|
- list($allocation, $orderHeader) = $map[$package->logistic_number];
|
|
|
+ if ($package->sent_at || !isset($map[$package->logistic_number])) continue;
|
|
|
+ list($allocation,$orderHeader) = $map[$package->logistic_number];
|
|
|
try {
|
|
|
$checktime = $allocation->checktime;
|
|
|
} catch (\Exception $e) {
|
|
|
@@ -294,7 +294,7 @@ class OrderPackageService
|
|
|
}
|
|
|
if ($checktime) {
|
|
|
//EDISENDFLAG
|
|
|
- $this->checkingAndProcess($package, $allocation->orderlineno, $orderHeader); //检查和处理揽收
|
|
|
+ $this->checkingAndProcess($package,$allocation->orderlineno,$orderHeader); //检查和处理揽收
|
|
|
$update_params[] = [
|
|
|
'id' => $package->id,
|
|
|
'sent_at' => $checktime,
|
|
|
@@ -315,18 +315,18 @@ class OrderPackageService
|
|
|
{
|
|
|
//校验快递商 订单状态 复核标记 揽收标记
|
|
|
$package->loadMissing("order.logistic");
|
|
|
- if ($package->collecting_status == '1' || !$package->logistic_number) return;
|
|
|
- if (strpos($package->order->logistic->code ?? '', 'ZTO') === false) return;
|
|
|
+ if ($package->collecting_status == '1' || !$package->logistic_number)return;
|
|
|
+ if (strpos($package->order->logistic->code ?? '','ZTO') === false)return;
|
|
|
$statusMapping = array_flip(Order::STATUS);
|
|
|
- if (($statusMapping[$package->order->wms_status] ?? 90) == 90) {
|
|
|
- Log::warning("自动揽收跳出", ["status" => $package->order->wms_status]);
|
|
|
+ if (($statusMapping[$package->order->wms_status] ?? 90) == 90){
|
|
|
+ Log::warning("自动揽收跳出",["status"=>$package->order->wms_status]);
|
|
|
return;
|
|
|
}
|
|
|
- if ($orderHeader->edisendflag != 'Y' && !app("OrderService")->manualBack($orderHeader->orderno)) {
|
|
|
- Log::warning("揽收回传失败", ["status" => $orderHeader->orderno]);
|
|
|
+ /*if ($orderHeader->edisendflag!='Y' && !app("OrderService")->manualBack($orderHeader->orderno)){
|
|
|
+ Log::warning("揽收回传失败",["status"=>$orderHeader->orderno]);
|
|
|
return;
|
|
|
- }
|
|
|
- dispatch(new PackageCollectingAllocation($package, $lineNo));
|
|
|
+ }*/
|
|
|
+ dispatch(new PackageCollectingAllocation($package,$lineNo));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -340,7 +340,7 @@ class OrderPackageService
|
|
|
$actAllocationDetails = $orderHeader->actAllocationDetails;
|
|
|
foreach ($actAllocationDetails as $actAllocationDetail) {
|
|
|
$logistic_number = $actAllocationDetail->picktotraceid;
|
|
|
- $map[$logistic_number] = [$actAllocationDetail, $orderHeader];
|
|
|
+ $map[$logistic_number] = [$actAllocationDetail,$orderHeader];
|
|
|
}
|
|
|
}
|
|
|
return $map;
|