JSP页面:关键地方已经用绿色标识
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/admin/includes/header.jsp"%>
后台展示数据方法:
controller:
@RequestMapping(value = "/getList", method = RequestMethod.POST)
public @ResponseBody String getList(Page page,DbcOilBill dbcOilBill,
@RequestParam(value = "shipperName",required = false)String shipperName,
@RequestParam(value = "phzName",required = false)String phzName,
@RequestParam(value = "dispatchAudit",required = false)String dispatchAudit,
@RequestParam(value = "depotId",required = false)String depotId,
@RequestParam(value = "carNo",required = false)String carNo,
@RequestParam(value = "getowner",required = false)String getowner,
@RequestParam(value = "carReceive",required = false)String carReceive,
@RequestParam(value = "park",required = false)String park,
@RequestParam(value = "depot",required = false)String depot,
@RequestParam(value = "indexs",required = false)String indexs,
@RequestParam(value = "sortorders",required = false)String sortorders){
List depotList = new ArrayList();
//如果库区为空,则选择为全部,取该用户所属部门下拥有的库区权限
if(StringUtils.isEmpty(depotId)){
Map map = getBackUserDepot();
depotList = (List) map.get("idList");
}else{
depotList.add(Integer.valueOf(depotId));
}
return JSON.toJSONString(backBillPcService.findall(page,dbcOilBill,shipperName,phzName,dispatchAudit,
depotList,carNo,getowner,carReceive,park,depot,indexs,sortorders));
}
@Override
public Map findall(Page page, DbcOilBill dbcOilBill,String shipperName, String phzName,
String dispatchAudit, List depotList, String carNo, String getowner,
String carReceive, String park, String depot,String indexs,String sortorders) {
Map map = new HashMap();
PageHelper.startPage(page.getPage(), page.getRows());
List
List
mapper.xml: