|
|
|
|
@ -94,7 +94,7 @@ class GateController extends CommonController
|
|
|
|
|
* summary="核销",
|
|
|
|
|
* description="",
|
|
|
|
|
* @OA\Parameter(name="admin_id", in="query", @OA\Schema(type="string"), required=false, description="管理员id"),
|
|
|
|
|
* @OA\Parameter(name="code", in="query", @OA\Schema(type="string"), required=false, description="编码"),
|
|
|
|
|
* @OA\Parameter(name="code", in="query", @OA\Schema(type="string"), required=false, description="编码,身份证,人牌"),
|
|
|
|
|
* @OA\Parameter(name="car_no", in="query", @OA\Schema(type="string"), required=false, description="停车牌"),
|
|
|
|
|
* @OA\Parameter(name="person_no", in="query", @OA\Schema(type="string"), required=false, description="人牌"),
|
|
|
|
|
* @OA\Parameter(name="type", in="query", @OA\Schema(type="string"), required=false, description="1进厂2离厂"),
|
|
|
|
|
@ -120,7 +120,11 @@ class GateController extends CommonController
|
|
|
|
|
if ($validator->fails()) {
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
|
|
|
|
|
}
|
|
|
|
|
$check = Visit::where('code', $all['code'])->first();
|
|
|
|
|
$check = Visit::where(function ($query) use ($all) {
|
|
|
|
|
$query->where('person_no', "{$all['keyword']}")
|
|
|
|
|
->orWhere('idcard', "{$all['keyword']}")
|
|
|
|
|
->orWhere('code', "{$all['keyword']}");
|
|
|
|
|
})->first();
|
|
|
|
|
if (empty($check)) {
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_BUSINESS, '拜访记录不存在']);
|
|
|
|
|
}
|
|
|
|
|
|