|
@@ -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){
|
|
|
|
+//
|
|
|
|
+// }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|