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

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


   */
  @RequestMapping(params = "functionGrid")
  @ResponseBody
  public List<TreeGrid> functionGrid(HttpServletRequest request,
      TreeGrid treegrid) {
    CriteriaQuery cq = new CriteriaQuery(TSFunction.class);
    String selfId = request.getParameter("selfId");
    if(selfId != null){
      cq.notEq("id", selfId);
    }
    if (treegrid.getId() != null) {
      cq.eq("TSFunction.id", treegrid.getId());
    }
    if (treegrid.getId() == null) {
      cq.isNull("TSFunction");
    }
    cq.addOrder("functionOrder", SortDirection.asc);
    cq.add();
    List<TSFunction> functionList = systemService.getListByCriteriaQuery(
        cq, false);
    List<TreeGrid> treeGrids = new ArrayList<TreeGrid>();
    TreeGridModel treeGridModel = new TreeGridModel();
    treeGridModel.setIcon("TSIcon_iconPath");
View Full Code Here


   * easyuiAJAX请求数据
   */

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

  @RequestMapping(params = "typeGrid")
  public void typeGrid(HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
    String typegroupid = request.getParameter("typegroupid");
    String typename = request.getParameter("typename");
    CriteriaQuery cq = new CriteriaQuery(TSType.class, dataGrid);
    cq.eq("TSTypegroup.id", typegroupid);
    cq.like("typename", typename);
    cq.add();
    this.systemService.getDataGridReturn(cq, true);
    TagUtil.datagrid(response, dataGrid);
  }
View Full Code Here

//  }

  @RequestMapping(params = "typeGridTree")
  @ResponseBody
  public List<TreeGrid> typeGridTree(HttpServletRequest request, TreeGrid treegrid) {
    CriteriaQuery cq;
    List<TreeGrid> treeGrids = new ArrayList<TreeGrid>();
    if (treegrid.getId() != null) {
      cq = new CriteriaQuery(TSType.class);
      cq.eq("TSTypegroup.id", treegrid.getId().substring(1));
      cq.add();
      List<TSType> typeList = systemService.getListByCriteriaQuery(cq, false);
      for (TSType obj : typeList) {
        TreeGrid treeNode = new TreeGrid();
        treeNode.setId("T"+obj.getId());
        treeNode.setText(obj.getTypename());
        treeNode.setCode(obj.getTypecode());
        treeGrids.add(treeNode);
      }
    } else {
      cq = new CriteriaQuery(TSTypegroup.class);
      List<TSTypegroup> typeGroupList = systemService.getListByCriteriaQuery(cq, false);
      for (TSTypegroup obj : typeGroupList) {
        TreeGrid treeNode = new TreeGrid();
        treeNode.setId("G"+obj.getId());
        treeNode.setText(obj.getTypegroupname());
View Full Code Here

   * @param user
   */

  @RequestMapping(params = "datagridDepart")
  public void datagridDepart(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 (StringUtil.isNotEmpty(comboTree.getId())) {
      cq.eq("TSPDepart.id", comboTree.getId());
    }
    // ----------------------------------------------------------------
    // ----------------------------------------------------------------
    if (StringUtil.isEmpty(comboTree.getId())) {
      cq.isNull("TSPDepart.id");
    }
    // ----------------------------------------------------------------
    // ----------------------------------------------------------------
    cq.add();
    List<TSDepart> departsList = systemService.getListByCriteriaQuery(cq, false);
    List<ComboTree> comboTrees = new ArrayList<ComboTree>();
    comboTrees = systemService.comTree(departsList, comboTree);
    return comboTrees;

View Full Code Here

   * @param user
   */

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

   * @return
   */
  @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("TFunction.functionid", oConvertUtils.getInt(comboTree.getId(), 0));
    }
    if (comboTree.getId() == null) {
      cq.isNull("TFunction");
    }
    cq.add();
    List<TSFunction> functionList = systemService.getListByCriteriaQuery(cq, false);
    List<ComboTree> comboTrees = new ArrayList<ComboTree>();
    Integer roleid = oConvertUtils.getInt(request.getParameter("roleid"), 0);
    List<TSFunction> loginActionlist = new ArrayList<TSFunction>();// 已有权限菜单
    role = this.systemService.get(TSRole.class, roleid);
View Full Code Here

   */
  @RequestMapping(params = "setOperate")
  @ResponseBody
  public List<TreeGrid> setOperate(HttpServletRequest request, TreeGrid treegrid) {
    String roleid = request.getParameter("roleid");
    CriteriaQuery cq = new CriteriaQuery(TSFunction.class);
    if (treegrid.getId() != null) {
      cq.eq("TFunction.functionid", oConvertUtils.getInt(treegrid.getId(), 0));
    }
    if (treegrid.getId() == null) {
      cq.isNull("TFunction");
    }
    cq.add();
    List<TSFunction> functionList = systemService.getListByCriteriaQuery(cq, false);
    List<TreeGrid> treeGrids = new ArrayList<TreeGrid>();
    Collections.sort(functionList, new SetListSort());
    TreeGridModel treeGridModel = new TreeGridModel();
    treeGridModel.setRoleid(roleid);
View Full Code Here

  /**
   * 版本维护列表
   */
  @RequestMapping(params = "versionList")
  public void versionList(HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
    CriteriaQuery cq = new CriteriaQuery(TSVersion.class, dataGrid);
    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.