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

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


   * @return
   */
  @RequestMapping(params = "operationListForFunction")
  public ModelAndView operationListForFunction(HttpServletRequest request,String functionId,String roleId) { 
    CriteriaQuery cq = new CriteriaQuery(TSOperation.class);
    cq.eq("TSFunction.id", functionId);
    cq.add();
    List<TSOperation> operationList = this.systemService.getListByCriteriaQuery(cq, false);
    Set<String> operationCodes = systemService.getOperationCodesByRoleIdAndFunctionId(roleId, functionId);
    request.setAttribute("operationList", operationList);
    request.setAttribute("operationcodes", operationCodes);
View Full Code Here


    AjaxJson j = new AjaxJson();
    String roleId =request.getParameter("roleId");
    String functionId = request.getParameter("functionId");
    String operationcodes = request.getParameter("operationcodes");
    CriteriaQuery cq1=new CriteriaQuery(TSRoleFunction.class);
    cq1.eq("TSRole.id",roleId);
    cq1.eq("TSFunction.id",functionId);
    cq1.add();
    List<TSRoleFunction> rFunctions =systemService.getListByCriteriaQuery(cq1,false);
    if(null!=rFunctions && rFunctions.size()>0){
      TSRoleFunction tsRoleFunction =  rFunctions.get(0);
View Full Code Here

    String roleId =request.getParameter("roleId");
    String functionId = request.getParameter("functionId");
    String operationcodes = request.getParameter("operationcodes");
    CriteriaQuery cq1=new CriteriaQuery(TSRoleFunction.class);
    cq1.eq("TSRole.id",roleId);
    cq1.eq("TSFunction.id",functionId);
    cq1.add();
    List<TSRoleFunction> rFunctions =systemService.getListByCriteriaQuery(cq1,false);
    if(null!=rFunctions && rFunctions.size()>0){
      TSRoleFunction tsRoleFunction =  rFunctions.get(0);
      tsRoleFunction.setOperation(operationcodes);
View Full Code Here

  public void datagrid(HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
    CriteriaQuery cq = new CriteriaQuery(TSLog.class, dataGrid);
    String loglevel = request.getParameter("loglevel");
    if (loglevel == null || loglevel.equals("0")) {
    } else {
      cq.eq("loglevel", oConvertUtils.getShort(loglevel));
      cq.add();
    }
    this.systemService.getDataGridReturn(cq, true);
    TagUtil.datagrid(response, dataGrid);
  }
View Full Code Here

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

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

  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
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.