update
This commit is contained in:
parent
c79edd020b
commit
0b8b776018
@ -79,9 +79,8 @@ class VehicleContractController extends BaseAdminController
|
|||||||
$data = VehicleContract::where($where)
|
$data = VehicleContract::where($where)
|
||||||
->page($pageNo, $pageSize)
|
->page($pageNo, $pageSize)
|
||||||
->order('create_time desc')
|
->order('create_time desc')
|
||||||
->select()
|
->select();
|
||||||
->toArray();
|
return $this->success('success',['lists'=>$data->toArray(),'page_no'=>$pageNo,'page_size'=>$pageSize,'count'=>$data->count()]);
|
||||||
return $this->success('success',$data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function detail() {
|
public function detail() {
|
||||||
|
@ -93,7 +93,6 @@ class VehicleController extends BaseApiController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//小组服务公司租赁申请
|
//小组服务公司租赁申请
|
||||||
public function rentApply() {
|
public function rentApply() {
|
||||||
if(!$this->request->isPost()){
|
if(!$this->request->isPost()){
|
||||||
@ -250,6 +249,37 @@ class VehicleController extends BaseApiController
|
|||||||
return $this->success('请求成功',$data->toArray());
|
return $this->success('请求成功',$data->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function vehicleTrack() {
|
||||||
|
//获取参数
|
||||||
|
$params = $this->request->get(['car_id','start_time','end_time']);
|
||||||
|
if(empty($params['car_id']) || empty($params['start_time']) || empty($params['end_time'])){
|
||||||
|
return $this->fail('缺少必要参数');
|
||||||
|
}
|
||||||
|
//获取轨迹
|
||||||
|
$url = 'http://logistics.lihaink.cn/api/getCarHistory?car_id='.$params['car_id'].'&start_time='.$params['start_time'].'&end_time='.$params['end_time'];
|
||||||
|
$result = curl_get($url);
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//镇街公司合同列表
|
||||||
|
public function contractList() {
|
||||||
|
$data = VehicleContract::where('company_a_id',$this->userInfo['company_id'])->where('status',0)->select();
|
||||||
|
return $this->success('success',$data->toArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
//镇街公司合同详情
|
||||||
|
public function contractInfo() {
|
||||||
|
//获取参数
|
||||||
|
$id = $this->request->get('id');
|
||||||
|
if(empty($id)){
|
||||||
|
return $this->fail('缺少必要参数');
|
||||||
|
}
|
||||||
|
//获取数据
|
||||||
|
$data = VehicleContract::where('id',$id)->find();
|
||||||
|
$data['cars_info'] = json_decode($data['cars_info'],true);
|
||||||
|
return $this->success('success',$data->toArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function sendSms($id) {
|
public function sendSms($id) {
|
||||||
//获取合同数据
|
//获取合同数据
|
||||||
|
Loading…
x
Reference in New Issue
Block a user