cqp 9 月之前
父节点
当前提交
71a064b82f
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7 6
      app/Service/InspectService.php

+ 7 - 6
app/Service/InspectService.php

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