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

Examples of org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery.eq()


  @RequestMapping(params = "setPTerritory")
  @ResponseBody
  public List<ComboTree> setPTerritory(HttpServletRequest request, ComboTree comboTree) {
    CriteriaQuery cq = new CriteriaQuery(TSTerritory.class);
    if (comboTree.getId() != null) {
      cq.eq("TSTerritory.id", comboTree.getId());
    }
    if (comboTree.getId() == null) {
      cq.isNull("TSTerritory");
    }
    cq.add();
View Full Code Here


  public void datagridUser(HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
    String departid = request.getParameter("departid");
    String roleid = request.getParameter("roleid");
    CriteriaQuery cq = new CriteriaQuery(TSUser.class, dataGrid);
    if (departid.length() > 0) {
      cq.eq("TDepart.departid", oConvertUtils.getInt(departid, 0));
      cq.add();
    }
    String userid = "";
    if (roleid.length() > 0) {
      List<TSRoleUser> roleUsers = systemService.findByProperty(TSRoleUser.class, "TRole.roleid", oConvertUtils.getInt(roleid, 0));
View Full Code Here

    CriteriaQuery cq = new CriteriaQuery(TSOperation.class, dataGrid);
    // ----------------------------------------------------------------
    // ----------------------------------------------------------------
    String functionId = oConvertUtils.getString(request
        .getParameter("functionId"));
    cq.eq("TSFunction.id", functionId);
    cq.add();
    // ----------------------------------------------------------------
    // ----------------------------------------------------------------
    this.systemService.getDataGridReturn(cq, true);
    TagUtil.datagrid(response, dataGrid);
View Full Code Here

    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);
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

  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());
View Full Code Here

  @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");
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("TFunction.functionid", oConvertUtils.getInt(comboTree.getId(), 0));
    }
    if (comboTree.getId() == null) {
      cq.isNull("TFunction");
    }
    cq.add();
View Full Code Here

  @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();
View Full Code Here

  @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

TOP
Copyright © 2018 www.massapi.com. 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.