|
|
@@ -135,6 +135,14 @@ class OrderPackageReceivedSyncService
|
|
|
foreach ($orderPackages as $data) {
|
|
|
if (empty($data)) continue;
|
|
|
$orderPackage = OrderPackage::query()->where('logistic_number', $data['logistic_number'])->first();
|
|
|
+ try {
|
|
|
+ if ($orderPackage->order && $orderPackage->order->issue) {
|
|
|
+ unset($data['exception_type']);
|
|
|
+ unset($data['exception']);
|
|
|
+ }
|
|
|
+ } catch (Exception $e) {
|
|
|
+ LogService::log(OrderPackageReceivedSyncService::class, "标记问题件不需要更新异常状态失败", $data['logistic_number'].'-'.json_encode($e));
|
|
|
+ }
|
|
|
if (isset($data['status'])) $orderPackage->status = $data['status'];
|
|
|
if (isset($data['received_at'])) $orderPackage->received_at = $data['received_at'];
|
|
|
if (isset($data['exception'])) $orderPackage->exception = $data['exception'];
|
|
|
@@ -288,7 +296,7 @@ class OrderPackageReceivedSyncService
|
|
|
$conclusion |= ($last_routed_duration > $SHORT_RESPONSE_HOURS && $last_routed_duration < $LONG_RESPONSE_HOURS) ? $IS_SHORT_NO_RESPONSE : 0;
|
|
|
$conclusion |= ($last_routed_duration > $LONG_RESPONSE_HOURS) ? $IS_LONG_NO_RESPONSE : 0;
|
|
|
$conclusion |= ($last_routed_duration > $SENDING_RESPONSE_HOURS && $data['status'] == '派送中') ? $IS_SENDING_NO_RESPONSE : 0;
|
|
|
- $conclusion |= ($delivered_duration > $HAVEN_SECOND_GOT_HOURS && $data['routes_length'] < 2) ? $IS_SECOND_ROUTE_HAVE : 0;//超过指定时间,路由信息小于两条
|
|
|
+ $conclusion |= ($delivered_duration > $HAVEN_SECOND_GOT_HOURS && $data['routes_length'] < 3) ? $IS_SECOND_ROUTE_HAVE : 0;//超过指定时间,路由信息小于两条
|
|
|
return $conclusion;
|
|
|
})();
|
|
|
switch ($conclusion) {
|