|
发表于 2013-7-1 19:59:20
|
显示全部楼层
- /**
- * easyuiAJAX用户列表请求数据
- * @param request
- * @param response
- * @param dataGrid
- */
- @RequestMapping(params = "datagrid")
- public void datagrid(TSUser user,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
- CriteriaQuery cq = new CriteriaQuery(TSUser.class, dataGrid);
- //查询条件组装器
- org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, user);
-
- //----------------------------------------------------------------
- //update-begin--Author:Quainty Date:20130522 for:用户管理,添加按照部门过滤的功能
- // 追加部门条件查询 (如果是input型,传的是部门名;如果是combo型,传的是部门ID)
- String departname = oConvertUtils.getString(request.getParameter("TSDepart_departname"));
- if (!StringUtil.isEmpty(departname)) {
- DetachedCriteria dc = cq.getDetachedCriteria();
- DetachedCriteria dcDepart = dc.createCriteria("TSDepart");
- //dcDepart.add(Restrictions.like("departname", "%" + departname + "%"));// 部门名
- dcDepart.add(Restrictions.eq("id", departname));// 部门ID
- }
- //update-end--Author:Quainty Date:20130522 for:用户管理,添加按照部门过滤的功能
- //----------------------------------------------------------------
- Short[] userstate = new Short[] { Globals.User_Normal, Globals.User_ADMIN };
- cq.in("status", userstate);
- cq.add();
- this.systemService.getDataGridReturn(cq, true);
- TagUtil.datagrid(response, dataGrid);
- }
复制代码 |
|