update
This commit is contained in:
parent
8ecba72ac9
commit
6056573305
@ -86,6 +86,7 @@ class VehicleLogic extends BaseLogic
|
|||||||
$gpsCarInfo = (new GpsLogic()) -> info($data['gps_imei']);
|
$gpsCarInfo = (new GpsLogic()) -> info($data['gps_imei']);
|
||||||
if($gpsCarInfo['code'] == 0){
|
if($gpsCarInfo['code'] == 0){
|
||||||
$data['track_info'] = [];
|
$data['track_info'] = [];
|
||||||
|
$data['travel_info'] = [];
|
||||||
}else{
|
}else{
|
||||||
//获取车辆行驶历史信息
|
//获取车辆行驶历史信息
|
||||||
$gpsCarHistory = (new GpsLogic()) -> history([
|
$gpsCarHistory = (new GpsLogic()) -> history([
|
||||||
@ -103,10 +104,10 @@ class VehicleLogic extends BaseLogic
|
|||||||
}
|
}
|
||||||
$data['track_info'] = $position;
|
$data['track_info'] = $position;
|
||||||
}
|
}
|
||||||
|
//获取车辆使用情况
|
||||||
|
$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'] : [];
|
||||||
}
|
}
|
||||||
//获取车辆使用情况
|
|
||||||
$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['data'];
|
|
||||||
if($data['status'] == 2){
|
if($data['status'] == 2){
|
||||||
//获取租赁信息
|
//获取租赁信息
|
||||||
$rentInfo = VehicleRent::where('car_id',$data['id'])->find();
|
$rentInfo = VehicleRent::where('car_id',$data['id'])->find();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user