|
|
|
|
@ -124,9 +124,9 @@ class GateController extends CommonController
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
|
|
|
|
|
}
|
|
|
|
|
$check = Visit::where(function ($query) use ($all) {
|
|
|
|
|
$query->where('person_no', "{$all['keyword']}")
|
|
|
|
|
->orWhere('idcard', "{$all['keyword']}")
|
|
|
|
|
->orWhere('code', "{$all['keyword']}");
|
|
|
|
|
$query->where('person_no', "{$all['code']}")
|
|
|
|
|
->orWhere('idcard', "{$all['code']}")
|
|
|
|
|
->orWhere('code', "{$all['code']}");
|
|
|
|
|
})->first();
|
|
|
|
|
if (empty($check)) {
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_BUSINESS, '拜访记录不存在']);
|
|
|
|
|
|