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

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


   * <li>修改日期:
   */
  @RequestMapping(params = "getChildren")
  @ResponseBody
  public List<ComboTree> getChildren(HttpServletRequest request, ComboTree comboTree) {
    CriteriaQuery cq = new CriteriaQuery(JeecgMatterBom.class);
    if (comboTree.getId() != null) {
      cq.eq("parent.id", comboTree.getId());
    } else {
      cq.isNull("parent");
    }
    cq.add();
    List<JeecgMatterBom> list = jeecgMatterBomService.getListByCriteriaQuery(cq, false);
    ComboTreeModel comboTreeModel = new ComboTreeModel("id", "name", "children");
    List<ComboTree> comboTrees = systemService.ComboTree(list, comboTreeModel, null);
    return comboTrees;

View Full Code Here


   */

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

   * @param user
   */

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

   */

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

   * 父级DEMO下拉菜单
   */
  @RequestMapping(params = "pDemoList")
  @ResponseBody
  public List<ComboTree> pDemoList(HttpServletRequest request, ComboTree comboTree) {
    CriteriaQuery cq = new CriteriaQuery(TSDemo.class);
    if (comboTree.getId() != null) {
      cq.eq("TSDemo.id", comboTree.getId());
    }
    if (comboTree.getId() == null) {
      cq.isNull("TSDemo");
    }
    cq.add();
    List<TSDemo> demoList = systemService.getListByCriteriaQuery(cq, false);
    List<ComboTree> comboTrees = new ArrayList<ComboTree>();
    ComboTreeModel comboTreeModel = new ComboTreeModel("id", "demotitle", "tsDemos", "demourl");
    comboTrees = systemService.ComboTree(demoList, comboTreeModel, null);
    return comboTrees;
View Full Code Here

  /**
   * demo页面跳转
   */
  @RequestMapping(params = "demoIframe")
  public ModelAndView demoIframe(HttpServletRequest request) {
    CriteriaQuery cq = new CriteriaQuery(TSDemo.class);
    cq.isNull("TSDemo.id");
    cq.add();
    List<TSDemo> demoList = systemService.getListByCriteriaQuery(cq, false);
    request.setAttribute("demoList", demoList);
    return new ModelAndView("jeecg/demo/base/demoIframe");
  }
View Full Code Here

   * 权限列表
   */
  @RequestMapping(params = "demoGrid")
  @ResponseBody
  public List<TreeGrid> demoGrid(HttpServletRequest request, TreeGrid treegrid) {
    CriteriaQuery cq = new CriteriaQuery(TSDemo.class);
    if (treegrid.getId() != null) {
      cq.eq("TSDemo.id", treegrid.getId());
    }
    if (treegrid.getId() == null) {
      cq.isNull("TSDemo");
    }
    cq.add();
    List<TSDemo> demoList = systemService.getListByCriteriaQuery(cq, false);
    TreeGridModel treeGridModel = new TreeGridModel();
    treeGridModel.setTextField("demotitle");
    treeGridModel.setParentText("TSDemo_demotitle");
    treeGridModel.setParentId("TSDemo_id");
View Full Code Here

  @ResponseBody
  public AjaxJson getDemo(HttpServletRequest req) {
    AjaxJson j = new AjaxJson();
    String id = StringUtil.getEncodePra(req.getParameter("id"));
    String floor = "";
    CriteriaQuery cq = new CriteriaQuery(TSFunction.class);
    cq.eq("TSFunction.id", id);
    cq.add();
    List<TSFunction> functions = systemService.getListByCriteriaQuery(cq, false);
    if (functions.size() > 0) {
      for (TSFunction function : functions) {
        floor += "<input type=\"checkbox\"  name=\"floornum\" id=\"floornum\" value=\"" + function.getId() + "\">" + function.getFunctionName() + "&nbsp;&nbsp;";
      }
View Full Code Here

   *下拉联动跳转
   */
  @RequestMapping(params = "select")
  public ModelAndView select(HttpServletRequest request) {
    // 新闻
    CriteriaQuery cq2 = new CriteriaQuery(TSFunction.class);
    cq2.eq("functionLevel",Globals.Function_Leave_ONE);
    cq2.add();
    List<TSFunction> funList = systemService.getListByCriteriaQuery(cq2, true);
    request.setAttribute("funList", funList);
    return new ModelAndView("jeecg/demo/base/AJAX/select");
  }
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.