cqp 3 days ago
parent
commit
497f57d830
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/Service/ScrappService.php

+ 3 - 3
app/Service/ScrappService.php

@@ -611,13 +611,14 @@ class ScrappService extends Service
         $process_id = $map[$role];
 
         if(in_array($role, [9,12,15,16,17])){
+            $type = 1;
             $dispatch_no = DispatchSub::where('del_time',0)
                 ->where('order_product_id',$order['id'])
                 ->where('process_id', $process_id)
                 ->value('dispatch_no');
             list($status, $msg) = (new DispatchService())->dispatchOrderList(['dispatch_no' => $dispatch_no]);
-            $type = 1;
         }else{
+            $type = 2;
             $crt_time = DispatchSub::where('del_time',0)
                 ->where('order_product_id',$order['id'])
                 ->where('process_id', $process_id)
@@ -649,12 +650,11 @@ class ScrappService extends Service
             }
             if(empty($report)){
                 $status = true;
-                $msg = [];
+                $msg = (object)[];
             }else{
                 $report = $report->toArray();
                 list($status, $msg) = (new ApplyOrderService())->reportWorkingDetail(['id' => $report['report_working_id']]);
             }
-            $type = 2;
         }
 
         return [$status, ['type' => $type, 'order' => $msg]];