|
@@ -157,17 +157,11 @@ class EmployeeService extends Service
|
|
|
$bool = Employee::where('number',$data['number'])
|
|
|
->where('id','<>',$data['id'])
|
|
|
->where('del_time',0)->exists();
|
|
|
- $bool_account = Employee::where('account',$data['account'])
|
|
|
- ->where('id','<>',$data['id'])
|
|
|
- ->where('del_time',0)->exists();
|
|
|
}else{
|
|
|
$bool = Employee::where('number',$data['number'])
|
|
|
->where('del_time',0)->exists();
|
|
|
- $bool_account = Employee::where('account',$data['account'])
|
|
|
- ->where('del_time',0)->exists();
|
|
|
}
|
|
|
if($bool) return [false,'工号已存在!'];
|
|
|
- if($bool_account) return [false,'账号已存在!'];
|
|
|
|
|
|
return [true,''];
|
|
|
}
|