Merge pull request 'update' (#110) from zhangwei into master
Reviewed-on: http://git.excellentkk.cn/mkm/TaskSystem/pulls/110
This commit is contained in:
commit
30c13f967b
app/api/controller
@ -275,6 +275,10 @@ class IndexController extends BaseApiController
|
||||
VehicleContract::where('id',$id)->update(['signing_timer'=>2,'status'=>3]);
|
||||
//更改租赁列表车辆状态
|
||||
$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([
|
||||
'status' => 3,
|
||||
]);
|
||||
|
@ -222,7 +222,7 @@ class VehicleController extends BaseApiController
|
||||
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)){
|
||||
return $this->fail('请勿重复申请');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user