update
This commit is contained in:
parent
6056573305
commit
4361f9ea71
@ -92,18 +92,18 @@ 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'
|
||||
]);
|
||||
if($gpsCarHistory['code'] == 0){
|
||||
$data['track_info'] = [];
|
||||
}else{
|
||||
$position = [];
|
||||
foreach($gpsCarHistory['data'] as $k=> $v){
|
||||
$position[$k]['latitude'] = $v['latc'];
|
||||
$position[$k]['longitude'] = $v['lonc'];
|
||||
$gpsCarHistoryData = [];
|
||||
if($gpsCarHistory&&$gpsCarHistory['code']==1){
|
||||
foreach($gpsCarHistory['data'] as $k => $v){
|
||||
$gpsCarHistoryData[$k]['lon'] = $v['lonc'];
|
||||
$gpsCarHistoryData[$k]['lat'] = $v['latc'];
|
||||
}
|
||||
$data['track_info'] = $position;
|
||||
}
|
||||
$data['track_info'] = $gpsCarHistory&&$gpsCarHistory['code']==1 ? $gpsCarHistoryData : [];
|
||||
//获取车辆使用情况
|
||||
$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'] : [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user