修改小组服务公司申请用车重复和取消签约回调问题

This commit is contained in:
unknown 2023-09-08 17:43:08 +08:00
parent 05cda2b2d6
commit 2af945ac0e
2 changed files with 2 additions and 2 deletions

@ -335,7 +335,7 @@ class IndexController extends BaseApiController
//获取租赁车辆信息
$vehicleRentInfo = VehicleRent::where('car_id', $vehicle['id'])->find();
//更新原始合同类型
VehicleContract::where('id', $vehicleRentInfo['contract_id'])->update(['type' => 2]);
VehicleContract::where('id', $vehicleRentInfo['contract_id'])->update(['status' => 6]);
VehicleRent::where('car_id', $vehicle['id'])->update([
'status' => 3,
]);

@ -237,7 +237,7 @@ class VehicleController extends BaseApiController
return $this->fail('当前镇街公司未签约');
}
//判断是否申请过
$vehicleContract = VehicleContract::where('company_b_id',$this->userInfo['company_id'])->where('type','<>',2)->where('status','<>',4)->find();
$vehicleContract = VehicleContract::where('company_b_id',$this->userInfo['company_id'])->where('type','<>',2)->whereNotIn('status','4,5,6')->find();
if(!empty($vehicleContract)){
return $this->fail('请勿重复申请');
}