diff --git a/erp_web/pages/manage/depot.html b/erp_web/pages/manage/depot.html
index 30695079..f7027f24 100644
--- a/erp_web/pages/manage/depot.html
+++ b/erp_web/pages/manage/depot.html
@@ -76,6 +76,14 @@
data-options="min:0,precision:2" style="width: 215px;height: 20px"/> 元
+
| 排序 |
@@ -145,7 +153,7 @@
formatter: function (value, rec) {
var str = '';
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.sort + 'AaBb' + rec.remark + 'AaBb'
- + rec.address + 'AaBb' + rec.warehousing + 'AaBb' + rec.truckage;
+ + rec.address + 'AaBb' + rec.warehousing + 'AaBb' + rec.truckage+rec.principalName+rec.principal;
str += ' ';
str += ' ';
return str;
@@ -155,6 +163,7 @@
{title: '仓库地址', field: 'address', width: 200},
{title: '仓储费', field: 'warehousing', width: 60},
{title: '搬运费', field: 'truckage', width: 60},
+ {title: '负责人', field: 'principalName', width: 60},
{title: '排序', field: 'sort', width: 60},
{title: '描述', field: 'remark', width: 120}
]],
@@ -419,7 +428,7 @@
var remark = $.trim($("#searchRemark").val());
$.ajax({
type: "get",
- url: "/depot/list",
+ url: "/depot/getDepotList",
dataType: "json",
data: ({
search: JSON.stringify({
diff --git a/pom.xml b/pom.xml
index ba21d381..92305fca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -98,6 +98,11 @@
1.7.25
compile
+
+ com.github.pagehelper
+ pagehelper-spring-boot-starter
+ 1.2.10
+
diff --git a/sql/jsh_erp.sql b/sql/jsh_erp.sql
index 63b4979a..97e28403 100644
--- a/sql/jsh_erp.sql
+++ b/sql/jsh_erp.sql
@@ -1240,4 +1240,16 @@ insert into `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`,
-- ----------------------------
update jsh_userbusiness SET Type = 'RoleFunctions', KeyId = '4',
Value = '[13][12][16][14][15][234][236][22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][210][211][242][33][199][243][41][200][201][202][40][232][233][197][203][204][205][206][212]'
-where Id = 5;
\ No newline at end of file
+where Id = 5;
+
+-- ----------------------------
+-- 时间:2019年2月25日
+-- version:1.0.4
+-- 此次更新仓库添加负责人信息,负责人信息从用户表获取
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- ----------------------------
+-- 仓库表添加字段principal,负责人
+-- ----------------------------
+alter table jsh_depot add principal bigint(20) DEFAULT null COMMENT '负责人';
+
diff --git a/sql/华夏ERP数据库设计汇总.xlsx b/sql/华夏ERP数据库设计汇总.xlsx
index baccc110..2a7b3f93 100644
Binary files a/sql/华夏ERP数据库设计汇总.xlsx and b/sql/华夏ERP数据库设计汇总.xlsx differ
diff --git a/src/main/java/com/jsh/erp/constants/BusinessConstants.java b/src/main/java/com/jsh/erp/constants/BusinessConstants.java
index 8e60d85f..26b3f775 100644
--- a/src/main/java/com/jsh/erp/constants/BusinessConstants.java
+++ b/src/main/java/com/jsh/erp/constants/BusinessConstants.java
@@ -16,11 +16,15 @@ public class BusinessConstants {
/**
* 默认的分页起始页页码
*/
- public static final String DEFAULT_PAGINATION_PAGE_NUMBER = "1";
+ public static final Integer DEFAULT_PAGINATION_PAGE_NUMBER = 1;
/**
- * 默认的分页页数
+ * 无数据时列表返回的默认数据条数
*/
- public static final String DEFAULT_PAGINATION_PAGE_SIZE = "10";
+ public static final Long DEFAULT_LIST_NULL_NUMBER = 0L;
+ /**
+ * 默认的分页条数
+ */
+ public static final Integer DEFAULT_PAGINATION_PAGE_SIZE = 10;
/**
* 单据主表出入库类型 type 入库 出库
* depothead
diff --git a/src/main/java/com/jsh/erp/controller/DepotController.java b/src/main/java/com/jsh/erp/controller/DepotController.java
index 028e92ed..1a809e18 100644
--- a/src/main/java/com/jsh/erp/controller/DepotController.java
+++ b/src/main/java/com/jsh/erp/controller/DepotController.java
@@ -1,11 +1,17 @@
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.datasource.entities.Depot;
+import com.jsh.erp.datasource.entities.DepotEx;
import com.jsh.erp.service.depot.DepotService;
import com.jsh.erp.service.userBusiness.UserBusinessService;
-import com.jsh.erp.utils.BaseResponseInfo;
+import com.jsh.erp.utils.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.DataAccessException;
@@ -14,7 +20,9 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
-import java.util.List;
+import java.util.*;
+
+import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
/**
* @author ji sheng hua 752*718*920
@@ -121,4 +129,49 @@ 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) {
+ Map parameterMap = new HashMap();
+ //查询参数
+ JSONObject obj=JSON.parseObject(search);
+ Set key= obj.keySet();
+ for(String keyEach: key){
+ parameterMap.put(keyEach,obj.getString(keyEach));
+ }
+ PageQueryInfo queryInfo = new PageQueryInfo();
+ Map objectMap = new HashMap();
+ 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,false);
+ List list = depotService.getDepotList(parameterMap);
+ //获取分页查询后的数据
+ PageInfo pageInfo = new PageInfo<>(list);
+ objectMap.put("page", queryInfo);
+ if (list == null) {
+ queryInfo.setRows(new ArrayList |