其他分享
首页 > 其他分享> > 分页

分页

作者:互联网

//列出所有的盘点明细表
@RequestMapping(value = “saveToStockTakeItemExamine”, method = RequestMethod.GET)
public String saveToStockTakeItemExamine(/@RequestParam(value = “stockTakeId”) String stockTakeId,/
@RequestParam(value = “page”, defaultValue = “1”) int pageNumber,
@RequestParam(value = “pageSize”, defaultValue = PAGE_SIZE) int pageSize,
@RequestParam(value = “sortType”, defaultValue = “auto”) String sortType, Model model,
ServletRequest request) {
System.out.println(“列出所有的盘点明细表”);
Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, “filter_”);
WebPage webPage = new WebPage(Integer.parseInt(PAGE_SIZE));
webPage.setPageNo(pageNumber);
webPage.setPageSize(Integer.parseInt(PAGE_SIZE));
String stockTakeId = (String) searchParams.get(“EQ_stockTake.id”);
StockTake stockTake = stockTakeService.getStockTake(stockTakeId);
Page stockTakeItems = stockTakeService.getAllStockTakeItem(searchParams, pageNumber, pageSize, sortType);
webPage.setResult(stockTakeItems.getContent());
webPage.setNumber(stockTakeItems.getNumber());
webPage.setTotalCount(stockTakeItems.getTotalElements());
webPage.setNumberOfElements(stockTakeItems.getNumberOfElements());
model.addAttribute(“page”, webPage);
model.addAttribute(“stockTakeId”, stockTakeId);
model.addAttribute(“stockTakeOrderNo”, stockTake.getOrderNo());
model.addAttribute(“searchParams”, Servlets.encodeParameterStringWithPrefix(searchParams, “filter_”));
return “storage/stock_take_item_examine”;
}

window.location.href = “ctx/storage/stockTake/saveToStockTakeItemExamine?filterEQstockTake.id={ctx}/storage/stockTake/saveToStockTakeItemExamine?filter_EQ_stockTake.id=ctx/storage/stockTake/saveToStockTakeItemExamine?filterE​Qs​tockTake.id={stockTakeId}”;

标签:stockTakeId,分页,webPage,saveToStockTakeItemExamine,stockTakeItems,stockTake,Strin
来源: https://blog.csdn.net/c230704/article/details/93204129