|
|
@@ -39,12 +39,12 @@ class Employee extends Controller
|
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
|
// 其他条件
|
|
|
- if ($status) $map[] = ['status', '=', $status];
|
|
|
+ if (is_numeric($status)) $map[] = ['status', '=', $status];
|
|
|
if ($name) $map[] = ['name', 'like', "%$name%"];
|
|
|
if ($mobile) $map[] = ['mobile', 'like', "%$mobile%"];
|
|
|
if ($department_id) $map[] = ['department_id', '=', $department_id];
|
|
|
if ($role_id) $map[] = ['role_id', '=', $role_id];
|
|
|
- if ($open_notice) $map[] = ['open_notice', '=', $open_notice];
|
|
|
+ if (is_numeric($open_notice)) $map[] = ['open_notice', '=', $open_notice];
|
|
|
if ($employee_code) $map[] = ['employee_code', 'like', "%$employee_code%"];
|
|
|
$field = ['id','employee_code', 'name','mobile', 'department_id', 'role_id', 'city_ids', 'open_notice','insert_time','update_time','status'];
|
|
|
// 查询数据
|