zoukankan      html  css  js  c++  java
  • jeecg查询分页

    后台

    复制代码
    @RequestMapping(params = "datagrid3")
        public void datagrid3(LdcOrderTaxEntity decOrder,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
            String invoiceno = request.getParameter("invoiceno");
            String wheresql = "";
            
            if(!"".equals(invoiceno)&&invoiceno!=null){
                wheresql = " and invoiceno = '"+invoiceno+"'";
            }
            
            String hql = "from LdcOrderTaxEntity where 1=1 " +wheresql;
            List<LdcOrderTaxEntity> ldcOrdertaxList = decOrderService.findHql(hql);
            List<Object> arrayList = new ArrayList<>();
            for (int i = (dataGrid.getPage()-1)*dataGrid.getRows(); i < dataGrid.getRows()*dataGrid.getPage(); i++) {
                if(StringUtil.isNotEmpty(ldcOrdertaxList)) {
                    if(i<=(ldcOrdertaxList.size()-1)){
                        arrayList.add(ldcOrdertaxList.get(i));
                    }
                    dataGrid.setTotal(ldcOrdertaxList.size());
                }
            }
            
    
            dataGrid.setResults(arrayList);
            TagUtil.datagrid(response, dataGrid);
        }
    复制代码

    前台

     添加属性:pagination="true"

    <t:datagrid name="decOrderList" checkbox="true" fitColumns="true" title="业务订单表" sortName="createDate" actionUrl="decOrderController.do?datagrid3"
         pagination="true"  idField="id" fit="true" queryMode="group">
  • 相关阅读:
    groovy 执行shell
    expect 用法
    shebang解释
    docker 安装
    centos7 lvm添加硬盘后扩展磁盘空间
    scoped的原理和deep深度选择器的妙用
    swagger3
    帮评网
    反射工具
    网络只能传输二进制
  • 原文地址:https://www.cnblogs.com/Jeely/p/12612771.html
Copyright © 2011-2022 走看看