Package org.jeecgframework.core.common.hibernate.qbc

Examples of org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery


  /**
   * 新闻法规文件列表
   */
  @RequestMapping(params = "documentList")
  public void documentList(HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
    CriteriaQuery cq = new CriteriaQuery(TSDocument.class, dataGrid);
    String typecode = oConvertUtils.getString(request.getParameter("typecode"));
    cq.createAlias("TSType", "TSType");
    cq.eq("TSType.typecode", typecode);
    cq.add();
    this.systemService.getDataGridReturn(cq, true);
    TagUtil.datagrid(response, dataGrid);
  }
View Full Code Here


   * @param user
   */

  @RequestMapping(params = "datagrid")
  public void datagrid(TSTimeTaskEntity timeTask,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
    CriteriaQuery cq = new CriteriaQuery(TSTimeTaskEntity.class, dataGrid);
    //查询条件组装器
    org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, timeTask, request.getParameterMap());
    this.timeTaskService.getDataGridReturn(cq, true);
    TagUtil.datagrid(response, dataGrid);
  }
View Full Code Here

   */

  @RequestMapping(params = "roleGrid")
  public void roleGrid( TSRole role,HttpServletRequest request,
      HttpServletResponse response, DataGrid dataGrid) {
    CriteriaQuery cq = new CriteriaQuery(TSRole.class, dataGrid);
    org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, role);
    cq.add();
    this.systemService.getDataGridReturn(cq, true);
    TagUtil.datagrid(response, dataGrid);;
  }
View Full Code Here

   */
  @RequestMapping(params = "setAuthority")
  @ResponseBody
  public List<ComboTree> setAuthority(TSRole role, HttpServletRequest request,
      ComboTree comboTree) {
    CriteriaQuery cq = new CriteriaQuery(TSFunction.class);
    if (comboTree.getId() != null) {
      cq.eq("TSFunction.id",
          comboTree.getId());
    }
    if (comboTree.getId() == null) {
      cq.isNull("TSFunction");
    }
    cq.notEq("functionLevel",Short.parseShort("-1"));
    cq.add();
    List<TSFunction> functionList = systemService.getListByCriteriaQuery(cq,false);
    List<ComboTree> comboTrees = new ArrayList<ComboTree>();
    String roleId = request.getParameter("roleId");
    List<TSFunction> loginActionlist = new ArrayList<TSFunction>();// 已有权限菜单
    role = this.systemService.get(TSRole.class, roleId);
View Full Code Here

        request.setAttribute("departsReplace", departsReplace);
        return "jeecg/demo/base/nopage/userList";
    }
    @RequestMapping(params = "datagridNoPage")
    public void datagridNoPage(TSUser user,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
        CriteriaQuery cq = new CriteriaQuery(TSUser.class, dataGrid);
        //查询条件组装器
        org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, user);

        Short[] userstate = new Short[] { Globals.User_Normal, Globals.User_ADMIN };
        cq.in("status", userstate);
        cq.add();
        this.systemService.getDataGridReturn(cq, false);
        TagUtil.datagrid(response, dataGrid);
    }
View Full Code Here

   * @param dataGrid
   */
  @RequestMapping(params = "datagrid")
  public void datagrid(HttpServletRequest request,
      HttpServletResponse response, DataGrid dataGrid) {
    CriteriaQuery cq = new CriteriaQuery(TSConfig.class, dataGrid);
    this.systemService.getDataGridReturn(cq, true);
    TagUtil.datagrid(response, dataGrid);
  }
View Full Code Here

   * @param user
   */

  @RequestMapping(params = "datagrid")
  public void datagrid(HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
    CriteriaQuery cq = new CriteriaQuery(TSDepart.class, dataGrid);
    this.systemService.getDataGridReturn(cq, true);
    TagUtil.datagrid(response, dataGrid);
  }
View Full Code Here

   * @return
   */
  @RequestMapping(params = "setPFunction")
  @ResponseBody
  public List<ComboTree> setPFunction(HttpServletRequest request, ComboTree comboTree) {
    CriteriaQuery cq = new CriteriaQuery(TSDepart.class);
    if(null != request.getParameter("selfId")){
      cq.notEq("id", request.getParameter("selfId"));
    }
    if (comboTree.getId() != null) {
      cq.eq("TSPDepart.id", comboTree.getId());
    }
    if (comboTree.getId() == null) {
      cq.isNull("TSPDepart");
    }
    cq.add();
    List<TSDepart> departsList = systemService.getListByCriteriaQuery(cq, false);
    List<ComboTree> comboTrees = new ArrayList<ComboTree>();
    ComboTreeModel comboTreeModel = new ComboTreeModel("id", "departname", "TSDeparts");
    comboTrees = systemService.ComboTree(departsList, comboTreeModel, null);
    return comboTrees;
View Full Code Here

   * @return
   */
  @RequestMapping(params = "departgrid")
  @ResponseBody
  public  List<TreeGrid>  departgrid(TSDepart tSDepart,HttpServletRequest request, HttpServletResponse response, TreeGrid treegrid) {
    CriteriaQuery cq = new CriteriaQuery(TSDepart.class);
    if("yes".equals(request.getParameter("isSearch"))){
      treegrid.setId(null);
      tSDepart.setId(null);
    }
    if(null != tSDepart.getDepartname()){
      org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tSDepart);
    }
    if (treegrid.getId() != null) {
      cq.eq("TSPDepart.id", treegrid.getId());
    }
    if (treegrid.getId() == null) {
      cq.isNull("TSPDepart");
    }
    cq.add();
    List<TreeGrid> departList =null;
    departList=systemService.getListByCriteriaQuery(cq, false);
    if(departList.size()==0&&tSDepart.getDepartname()!=null){
      cq = new CriteriaQuery(TSDepart.class);
      TSDepart parDepart = new TSDepart();
      tSDepart.setTSPDepart(parDepart);
      org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tSDepart);
         departList =systemService.getListByCriteriaQuery(cq, false);
    }
View Full Code Here

   * @param dataGrid
   * 返回类型: void
   */
  @RequestMapping(params = "userDatagrid")
  public void userDatagrid(TSUser user,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
    CriteriaQuery cq = new CriteriaQuery(TSUser.class, dataGrid);
    //查询条件组装器
    org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, user);
    String departid = oConvertUtils.getString(request.getParameter("departid"));
    if (!StringUtil.isEmpty(departid)) {
      DetachedCriteria dc = cq.getDetachedCriteria();
      DetachedCriteria dcDepart = dc.createCriteria("TSDepart");
      dcDepart.add(Restrictions.eq("id", departid));
    }
    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);
  }
View Full Code Here

TOP

Related Classes of org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.