aa
This commit is contained in:
parent
ddb01d4a8f
commit
cd4854c80b
@ -266,9 +266,8 @@ class VehicleLogic extends BaseLogic
|
||||
$car = Vehicle::where('id',$params['car_id'])->find();
|
||||
if(empty($car)){
|
||||
return ['code'=>0,'msg'=>'车辆不存在'];
|
||||
}else{
|
||||
$params['gps_car_id'] = $car['gps_carid'];
|
||||
}
|
||||
$params['gps_imei'] = $car['gps_imei'];
|
||||
//获取车辆行驶历史信息
|
||||
$result = (new GpsLogic()) -> history($params);
|
||||
//返回数据
|
||||
|
@ -67,10 +67,14 @@ 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' => $params['gps_car_id'],
|
||||
'carId' => $result1['data']['carId'],
|
||||
'startTime' => $params['start_time'],
|
||||
'endTime' => $params['end_time'],
|
||||
'filter' => true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user