Merge pull request 'update' () from zhangwei into master

Reviewed-on: http://git.excellentkk.cn/mkm/TaskSystem/pulls/110
This commit is contained in:
wei1990 2023-09-01 21:15:11 +08:00
commit 30c13f967b
2 changed files with 5 additions and 1 deletions

@ -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('请勿重复申请');
}