|
|
@@ -287,7 +287,7 @@ class OrderPackageService
|
|
|
$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];
|
|
|
+ $allocation = $map[$package->logistic_number];
|
|
|
try {
|
|
|
$checktime = $allocation->checktime;
|
|
|
} catch (\Exception $e) {
|
|
|
@@ -295,7 +295,7 @@ class OrderPackageService
|
|
|
}
|
|
|
if ($checktime) {
|
|
|
//EDISENDFLAG
|
|
|
- $this->checkingAndProcess($package,$allocation->orderlineno,$orderHeader); //检查和处理揽收
|
|
|
+ $this->checkingAndProcess($package,$allocation->orderlineno); //检查和处理揽收
|
|
|
$update_params[] = [
|
|
|
'id' => $package->id,
|
|
|
'sent_at' => $checktime,
|
|
|
@@ -310,13 +310,12 @@ class OrderPackageService
|
|
|
*
|
|
|
* @param OrderPackage|\stdClass $package
|
|
|
* @param int $lineNo
|
|
|
- * @param \stdClass|mixed $orderHeader
|
|
|
*/
|
|
|
- public function checkingAndProcess(OrderPackage $package, int $lineNo, $orderHeader)
|
|
|
+ public function checkingAndProcess(OrderPackage $package, int $lineNo)
|
|
|
{
|
|
|
//校验快递商 订单状态 复核标记 揽收标记
|
|
|
- $package->loadMissing("order.logistic");
|
|
|
if ($package->collecting_status == '1' || !$package->logistic_number)return;
|
|
|
+ $package->loadMissing("order.logistic");
|
|
|
if (strpos($package->order->logistic->code ?? '','ZTO') === false)return;
|
|
|
$statusMapping = array_flip(Order::STATUS);
|
|
|
if (($statusMapping[$package->order->wms_status] ?? 90) == 90){
|
|
|
@@ -342,7 +341,7 @@ class OrderPackageService
|
|
|
$actAllocationDetails = $orderHeader->actAllocationDetails;
|
|
|
foreach ($actAllocationDetails as $actAllocationDetail) {
|
|
|
$logistic_number = $actAllocationDetail->picktotraceid;
|
|
|
- $map[$logistic_number] = [$actAllocationDetail,$orderHeader];
|
|
|
+ $map[$logistic_number] = $actAllocationDetail;
|
|
|
}
|
|
|
}
|
|
|
return $map;
|