aa
This commit is contained in:
parent
cd4854c80b
commit
9b3d94ad38
@ -267,7 +267,9 @@ class VehicleLogic extends BaseLogic
|
||||
if(empty($car)){
|
||||
return ['code'=>0,'msg'=>'车辆不存在'];
|
||||
}
|
||||
$params['gps_imei'] = $car['gps_imei'];
|
||||
//获取车辆在gps系统中的id
|
||||
$gps_car_id = (new GpsLogic()) -> info($car['gps_imei']);
|
||||
$params['gps_car_id'] = $gps_car_id['carId'];
|
||||
//获取车辆行驶历史信息
|
||||
$result = (new GpsLogic()) -> history($params);
|
||||
//返回数据
|
||||
|
@ -67,14 +67,10 @@ class GpsLogic extends BaseLogic
|
||||
public function history($params):array {
|
||||
//获取token
|
||||
$token = $this->token();
|
||||
$result1 = curl_post($this->domain.'/car/getByImei.do',[],[
|
||||
'token' => $token,
|
||||
'imei' => $params['gps_imei'],
|
||||
]);
|
||||
//发起请求
|
||||
$result = curl_post($this->domain.'/position/queryHistory.do',[],[
|
||||
'token' => $token,
|
||||
'carId' => $result1['data']['carId'],
|
||||
'carId' => $params['gps_car_id'],
|
||||
'startTime' => $params['start_time'],
|
||||
'endTime' => $params['end_time'],
|
||||
'filter' => true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user