java分页

 //列出所有的盘点明细表
    @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 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?filter_EQ_stockTake.id=${stockTakeId}";

你可能感兴趣的:(java)