update
This commit is contained in:
parent
d0b0318c7b
commit
e5ef88b56a
@ -275,6 +275,10 @@ class IndexController extends BaseApiController
|
|||||||
VehicleContract::where('id',$id)->update(['signing_timer'=>2,'status'=>3]);
|
VehicleContract::where('id',$id)->update(['signing_timer'=>2,'status'=>3]);
|
||||||
//更改租赁列表车辆状态
|
//更改租赁列表车辆状态
|
||||||
$vehicle = json_decode($contract['cars_info'],true);
|
$vehicle = json_decode($contract['cars_info'],true);
|
||||||
|
//获取租赁车辆信息
|
||||||
|
$vehicleRentInfo = VehicleRent::where('car_id',$vehicle['id'])->find();
|
||||||
|
//更新原始合同类型
|
||||||
|
VehicleContract::where('id',$vehicleRentInfo['contract_id'])->update(['type'=>2]);
|
||||||
VehicleRent::where('car_id',$vehicle['id'])->update([
|
VehicleRent::where('car_id',$vehicle['id'])->update([
|
||||||
'status' => 3,
|
'status' => 3,
|
||||||
]);
|
]);
|
||||||
|
@ -222,7 +222,7 @@ class VehicleController extends BaseApiController
|
|||||||
return $this->fail('当前镇街公司未签约');
|
return $this->fail('当前镇街公司未签约');
|
||||||
}
|
}
|
||||||
//判断是否申请过
|
//判断是否申请过
|
||||||
$vehicleContract = VehicleContract::where('company_b_id',$this->userInfo['company_id'])->where('status','<>',4)->find();
|
$vehicleContract = VehicleContract::where('company_b_id',$this->userInfo['company_id'])->where('type','<>',2)->where('status','<>',4)->find();
|
||||||
if(!empty($vehicleContract)){
|
if(!empty($vehicleContract)){
|
||||||
return $this->fail('请勿重复申请');
|
return $this->fail('请勿重复申请');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user