Merge pull request '小组公司详情页逻辑修改' (#78) from zhangwei into dev
Reviewed-on: #78
This commit is contained in:
commit
748dab8948
@ -419,19 +419,10 @@ class VehicleController extends BaseApiController
|
||||
if($company['company_type'] != 18 ){
|
||||
return $this->fail('非小组公司不能访问');
|
||||
}
|
||||
//获取租赁车俩
|
||||
$rentCar = VehicleRent::where('rent_company_id',$company['id'])->where('status',2)->findOrEmpty();
|
||||
if(!$rentCar->isEmpty()){
|
||||
$rentCar['mileage'] = 0;
|
||||
$rentCar['company'] = $company;
|
||||
$rentCar['contract'] = VehicleContract::field('id,contract_no,contract_url,file,status,create_time')->where('id',$rentCar['contract_id'])->findOrEmpty();
|
||||
return $this->success('请求成功',$rentCar->toArray());
|
||||
}else{
|
||||
//获取签约合同
|
||||
$vehicleContract = VehicleContract::where('company_b_id',$company['id'])->where('type','<>',2)->order('id desc')->findOrEmpty();
|
||||
//返回数据
|
||||
return $this->success('请求成功',$vehicleContract->toArray());
|
||||
}
|
||||
}
|
||||
|
||||
//车辆详情
|
||||
public function vehicleInfo() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user