when($type == 0,function ($query){ $query->where('status', CommonConstant::IS_WHO_1); }) ->where('is_deleted', CommonConstant::IS_DELETED_0) ->limit($offset, $length) ->select(); return $list; } /** * 维修人员列表 * * @param integer $type 类型:1=物业主管,2=信息负责人 **/ public static function get_maintain_user($type){ $list = ApproveMaintainUser::field('is_deleted',true) ->where('is_deleted',CommonConstant::IS_DELETED_0) ->where('type',$type) ->select(); return $list; } /** * 部门列表 **/ public static function get_department_column(){ $list = Department::where('is_deleted',CommonConstant::IS_DELETED_0) ->column('dept_id,name'); return $list; } /** * 根据用户的所属部门获取部门列表 * * @param string $dept_ids 部门ids **/ public static function get_user_department_list($dept_ids){ $list = Department::field('dept_id,name') ->where('dept_id', 'in', $dept_ids) ->where('is_deleted',CommonConstant::IS_DELETED_0) ->select(); return $list; } }