cqp 9 months ago
parent
commit
71a064b82f
1 changed files with 7 additions and 6 deletions
  1. 7 6
      app/Service/InspectService.php

+ 7 - 6
app/Service/InspectService.php

@@ -111,15 +111,15 @@ class InspectService extends Service
 
             $update = [];
             foreach ($list as $value){
-                $diff = $time - $value['crt_time'];
-                if($value['state'] == DeviceOrder::state_zero && $diff >= 86400 * 3){
+//                $diff = $time - $value['crt_time'];&& $diff >= 86400 * 3
+                if($value['state'] == DeviceOrder::state_zero){
                     $update[] = [
                         'id' => $value['id'],
                         'state' => DeviceOrder::state_one, //更新为处理中
                     ];
                 }
 
-                if($value['state'] == DeviceOrder::state_one && $diff >= 86400 * 2){
+                if($value['state'] == DeviceOrder::state_one){
                     $update[] = [
                         'id' => $value['id'],
                         'state' => DeviceOrder::state_two, // 更新为已结束
@@ -352,9 +352,10 @@ class InspectService extends Service
                 if(isset($map[$value['id']])) {
                     $count = count(array_unique($map[$value['id']]));
                     $return['repair_total'] += $count;
-                    if($value['state'] == DeviceOrder::state_one){
-                        $return['repairing_total'] += $count;
-                    }
+                    $return['repairing_total'] += $count;
+//                    if($value['state'] == DeviceOrder::state_one){
+//
+//                    }
                 }
             }
         }