|
@@ -68,7 +68,7 @@ class Employee extends Controller
|
|
|
}
|
|
}
|
|
|
$role_ids = $RolesModel->where($role_where)->pluck('id')->toarray();
|
|
$role_ids = $RolesModel->where($role_where)->pluck('id')->toarray();
|
|
|
}
|
|
}
|
|
|
- $field = ['id', 'employee_code', 'name', 'mobile', 'department_ids', 'role_id', 'city_ids', 'open_notice', 'insert_time', 'update_time', 'status'];
|
|
|
|
|
|
|
+ $field = ['id', 'employee_code', 'name', 'mobile','email','department_ids', 'role_id', 'city_ids', 'open_notice', 'insert_time', 'update_time', 'status'];
|
|
|
// 查询数据
|
|
// 查询数据
|
|
|
if (count($role_ids) > 0) {
|
|
if (count($role_ids) > 0) {
|
|
|
$employee_where = [];
|
|
$employee_where = [];
|
|
@@ -256,13 +256,13 @@ class Employee extends Controller
|
|
|
// 接收参数
|
|
// 接收参数
|
|
|
$id = request('id', 0);
|
|
$id = request('id', 0);
|
|
|
$map = ['id' => $id];
|
|
$map = ['id' => $id];
|
|
|
- $field = ['id', 'employee_code', 'name', 'mobile', 'department_ids', 'duty_type', 'role_id', 'city_ids', 'open_notice', 'insert_time', 'update_time', 'status'];
|
|
|
|
|
// 权限判断
|
|
// 权限判断
|
|
|
if ($is_admin != 1 && $company_id != 0) {
|
|
if ($is_admin != 1 && $company_id != 0) {
|
|
|
$map['company_id'] = $company_id;
|
|
$map['company_id'] = $company_id;
|
|
|
} else {
|
|
} else {
|
|
|
$map['company_id'] = $admin_company_id;
|
|
$map['company_id'] = $admin_company_id;
|
|
|
}
|
|
}
|
|
|
|
|
+ $field = ['id', 'employee_code', 'name', 'mobile','email', 'department_ids', 'duty_type', 'role_id', 'city_ids', 'open_notice', 'insert_time', 'update_time', 'status'];
|
|
|
$data = $EmployeeModel->where($map)->select($field)->first();
|
|
$data = $EmployeeModel->where($map)->select($field)->first();
|
|
|
if (!$data) return json_send(['code' => 'error', 'msg' => '记录不存在']);
|
|
if (!$data) return json_send(['code' => 'error', 'msg' => '记录不存在']);
|
|
|
// 查询部门信息
|
|
// 查询部门信息
|