diff --git a/app/adminapi/logic/vehicle/VehicleLogic.php b/app/adminapi/logic/vehicle/VehicleLogic.php index 2f7f7f74..5ffbc589 100644 --- a/app/adminapi/logic/vehicle/VehicleLogic.php +++ b/app/adminapi/logic/vehicle/VehicleLogic.php @@ -94,9 +94,7 @@ class VehicleLogic extends BaseLogic $gpsCarHistory = (new GpsLogic()) -> history([ 'gps_car_id' => $gpsCarInfo['data']['carId'], 'start_time' => date('Y-m-d').' 00:00:00', -// 'start_time' =>'2023-08-30 00:00:00', 'end_time' => date('Y-m-d').' 23:59:59' -// 'end_time' => '2023-08-30 23:59:59' ]); $gpsCarHistoryData = []; if($gpsCarHistory&&$gpsCarHistory['code']==1){ @@ -120,7 +118,7 @@ class VehicleLogic extends BaseLogic $travel = (new GpsLogic()) -> mileage($gpsCarInfo['data']['carId'],date('Y-m-d H:i:s',(time() - 604800)),date('Y-m-d').' 23:59:59'); $data['travel_info'] = $travel&&$travel['code'] == 1 ? $travel['data'] : []; } - if($data['status'] == 2){ + if($data['status'] == 2 || $data['status'] == 4){ //获取租赁信息 $rentInfo = VehicleRent::where('car_id',$data['id'])->findOrEmpty()->toArray(); $contract = Contract::where('id',$rentInfo['contract_id'])->findOrEmpty();