去除分页插件
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
package com.jsh.erp.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.jsh.erp.constants.BusinessConstants;
|
||||
import com.jsh.erp.constants.ExceptionConstants;
|
||||
import com.jsh.erp.datasource.entities.Depot;
|
||||
@@ -149,54 +145,8 @@ public class DepotController {
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* create by: cjl
|
||||
* description:
|
||||
* 查询仓库列表信息
|
||||
* create time: 2019/2/25 14:32
|
||||
* @Param: pageSize
|
||||
* @Param: currentPage
|
||||
* @Param: search
|
||||
* @return java.lang.String
|
||||
*/
|
||||
@RequestMapping(value = "/getDepotList")
|
||||
public String getDepotList(
|
||||
@RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,
|
||||
@RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
|
||||
@RequestParam(value = Constants.SEARCH, required = false) String search) throws Exception{
|
||||
Map<String, Object> parameterMap = new HashMap<String, Object>();
|
||||
//查询参数
|
||||
JSONObject obj=JSON.parseObject(search);
|
||||
Set<String> key= obj.keySet();
|
||||
for(String keyEach: key){
|
||||
parameterMap.put(keyEach,obj.getString(keyEach));
|
||||
}
|
||||
PageQueryInfo queryInfo = new PageQueryInfo();
|
||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||
if (pageSize == null || pageSize <= 0) {
|
||||
pageSize = BusinessConstants.DEFAULT_PAGINATION_PAGE_SIZE;
|
||||
}
|
||||
if (currentPage == null || currentPage <= 0) {
|
||||
currentPage = BusinessConstants.DEFAULT_PAGINATION_PAGE_NUMBER;
|
||||
}
|
||||
PageHelper.startPage(currentPage,pageSize,true);
|
||||
List<DepotEx> list = depotService.getDepotList(parameterMap);
|
||||
//获取分页查询后的数据
|
||||
PageInfo<DepotEx> pageInfo = new PageInfo<>(list);
|
||||
objectMap.put("page", queryInfo);
|
||||
if (list == null) {
|
||||
queryInfo.setRows(new ArrayList<Object>());
|
||||
queryInfo.setTotal(BusinessConstants.DEFAULT_LIST_NULL_NUMBER);
|
||||
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
|
||||
}
|
||||
queryInfo.setRows(list);
|
||||
queryInfo.setTotal(pageInfo.getTotal());
|
||||
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
|
||||
}
|
||||
/**
|
||||
* create by: qiankunpingtai
|
||||
* website:https://qiankunpingtai.cn
|
||||
* description:
|
||||
* 批量删除仓库信息
|
||||
* create time: 2019/3/29 11:15
|
||||
* @Param: ids
|
||||
|
||||
@@ -3,8 +3,6 @@ package com.jsh.erp.controller;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.jsh.erp.constants.BusinessConstants;
|
||||
import com.jsh.erp.constants.ExceptionConstants;
|
||||
import com.jsh.erp.datasource.entities.DepotEx;
|
||||
@@ -403,16 +401,8 @@ public class MaterialController {
|
||||
}
|
||||
PageQueryInfo queryInfo = new PageQueryInfo();
|
||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||
if (pageSize == null || pageSize <= 0) {
|
||||
pageSize = BusinessConstants.DEFAULT_PAGINATION_PAGE_SIZE;
|
||||
}
|
||||
if (currentPage == null || currentPage <= 0) {
|
||||
currentPage = BusinessConstants.DEFAULT_PAGINATION_PAGE_NUMBER;
|
||||
}
|
||||
PageHelper.startPage(currentPage,pageSize,true);
|
||||
List<Material> list = materialService.getMaterialEnableSerialNumberList(parameterMap);
|
||||
//获取分页查询后的数据
|
||||
PageInfo<Material> pageInfo = new PageInfo<>(list);
|
||||
Long count = materialService.getMaterialEnableSerialNumberCount(parameterMap);
|
||||
objectMap.put("page", queryInfo);
|
||||
if (list == null) {
|
||||
queryInfo.setRows(new ArrayList<Object>());
|
||||
@@ -420,7 +410,7 @@ public class MaterialController {
|
||||
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
|
||||
}
|
||||
queryInfo.setRows(list);
|
||||
queryInfo.setTotal(pageInfo.getTotal());
|
||||
queryInfo.setTotal(count);
|
||||
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -3,8 +3,6 @@ package com.jsh.erp.controller;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.jsh.erp.constants.BusinessConstants;
|
||||
import com.jsh.erp.constants.ExceptionConstants;
|
||||
import com.jsh.erp.datasource.entities.Tenant;
|
||||
@@ -258,50 +256,6 @@ public class UserController {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
/**
|
||||
* create by: cjl
|
||||
* description:
|
||||
* 查询分页用户列表
|
||||
* create time: 2019/3/8 15:08
|
||||
* @Param: pageSize
|
||||
* @Param: currentPage
|
||||
* @Param: search
|
||||
* @return java.lang.String
|
||||
*/
|
||||
@GetMapping(value = "/getUserList")
|
||||
public String getUserList(@RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,
|
||||
@RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
|
||||
@RequestParam(value = Constants.SEARCH, required = false) String search)throws Exception {
|
||||
|
||||
Map<String, Object> parameterMap = new HashMap<String, Object>();
|
||||
//查询参数
|
||||
JSONObject obj= JSON.parseObject(search);
|
||||
Set<String> key= obj.keySet();
|
||||
for(String keyEach: key){
|
||||
parameterMap.put(keyEach,obj.getString(keyEach));
|
||||
}
|
||||
PageQueryInfo queryInfo = new PageQueryInfo();
|
||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||
if (pageSize == null || pageSize <= 0) {
|
||||
pageSize = BusinessConstants.DEFAULT_PAGINATION_PAGE_SIZE;
|
||||
}
|
||||
if (currentPage == null || currentPage <= 0) {
|
||||
currentPage = BusinessConstants.DEFAULT_PAGINATION_PAGE_NUMBER;
|
||||
}
|
||||
PageHelper.startPage(currentPage,pageSize,true);
|
||||
List<UserEx> list = userService.getUserList(parameterMap);
|
||||
//获取分页查询后的数据
|
||||
PageInfo<UserEx> pageInfo = new PageInfo<>(list);
|
||||
objectMap.put("page", queryInfo);
|
||||
if (list == null) {
|
||||
queryInfo.setRows(new ArrayList<Object>());
|
||||
queryInfo.setTotal(BusinessConstants.DEFAULT_LIST_NULL_NUMBER);
|
||||
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
|
||||
}
|
||||
queryInfo.setRows(list);
|
||||
queryInfo.setTotal(pageInfo.getTotal());
|
||||
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
|
||||
}
|
||||
|
||||
/**
|
||||
* create by: cjl
|
||||
|
||||
Reference in New Issue
Block a user