else if(StringUtils.isNotBlank(startDate) && StringUtils.isNotBlank(endDate)){
list = reportService.query(startDate, endDate); //查询出库中的时间
report.set$eq_ctime(list);
report.setFirstResult((firstResult - 1) * maxResults);
report.setMaxResults(maxResults);
Map<String, String> sortedCondition = new HashMap<String, String>();
sortedCondition.put(sortedObject, sortedValue);
report.setSortedConditions(sortedCondition);
JqGridPageView<Report> reportListView = new JqGridPageView<Report>();
reportListView.setMaxResults(maxResults); //设置页面的最大结果数
// List result=new ArrayList();
// if(((firstResult - 1) * maxResults)>list.size()){
// for(int i=(firstResult - 1) * maxResults;i // result.add(list.get(i));
//// result.add(report);
// }
// }
//
List reportCnList = reportService.queryReportCnList(list); //取得查询出的结果总条数
reportListView.setRows(reportCnList); //设置行数
reportListView.setRecords(list.size()); //设置翻页并设置最大页数
writeJSON(response, reportListView); //返回响应
return ;
}
这种情况有可能传的页数不对,或者service层里分页数目写死或取错了
我看你查询数据的时候都没有分页啊?
你点下一页要把新的页号传到后台,要不然每次查的都是默认的那一页数据
万能解决办法就是Debug跟踪一下吧,这样哪里有问题就清楚了。要不别人也是猜测。