From 70ecb4df759d708a8bee10e39485eb3c628c21dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Mon, 28 Dec 2020 23:36:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8A=A5=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp_web/pages/reports/buy_in_report.html | 29 +------- erp_web/pages/reports/in_detail.html | 7 ++ erp_web/pages/reports/in_material_count.html | 7 ++ .../pages/reports/in_out_stock_report.html | 35 ++-------- erp_web/pages/reports/out_detail.html | 7 ++ erp_web/pages/reports/out_material_count.html | 7 ++ erp_web/pages/reports/sale_out_report.html | 29 +------- .../pages/reports/stock_warning_report.html | 8 +++ .../erp/controller/DepotHeadController.java | 10 +-- .../erp/controller/DepotItemController.java | 66 ++++++++----------- .../datasource/mappers/DepotHeadMapperEx.java | 4 ++ .../datasource/mappers/DepotItemMapperEx.java | 17 +++-- .../service/depotHead/DepotHeadService.java | 16 ++--- .../service/depotItem/DepotItemService.java | 16 ++--- .../mapper_xml/DepotHeadMapperEx.xml | 17 ++++- .../mapper_xml/DepotItemMapperEx.xml | 24 ++++--- 16 files changed, 142 insertions(+), 157 deletions(-) diff --git a/erp_web/pages/reports/buy_in_report.html b/erp_web/pages/reports/buy_in_report.html index 9365d6bb..7f580d37 100644 --- a/erp_web/pages/reports/buy_in_report.html +++ b/erp_web/pages/reports/buy_in_report.html @@ -30,15 +30,9 @@
- +
- -
-
-
- -
- +
@@ -55,7 +49,6 @@ $(function () { var thisDate = getNowFormatMonth(); //当前月份 $("#searchMonth").val(thisDate); - initMaterialNameList(); initMProperty(); //初始化商品属性 initTableData(); ininPager(); @@ -63,21 +56,6 @@ print(); }); - //初始化商品名称模糊匹配 - function initMaterialNameList() { - $('#mName').combobox({ - method:"get", - url: "/material/getMaterialNameList", - valueField: 'value', - textField: 'text', - hasDownArrow: false, - filter: function(q, row){ - var opts = $(this).combobox('options'); - return row[opts.textField].indexOf(q) >-1; - } - }); - } - //初始化商品属性 function initMProperty() { $.ajax({ @@ -222,8 +200,7 @@ currentPage: pageNo, pageSize: pageSize, monthTime: $("#searchMonth").val(), - name: $("#mName").combobox("getValue"), - model: $("#mModel").textbox("getValue"), + materialParam: $.trim($("#searchMaterial").val()), mpList: mPropertyList }), success: function (res) { diff --git a/erp_web/pages/reports/in_detail.html b/erp_web/pages/reports/in_detail.html index 0df0c29a..5c71d8a7 100644 --- a/erp_web/pages/reports/in_detail.html +++ b/erp_web/pages/reports/in_detail.html @@ -36,6 +36,12 @@
+
+ +
+ +
+
@@ -282,6 +288,7 @@ currentPage: pageNo, pageSize: pageSize, organId: $('#OrganId').combobox('getValue'), + materialParam: $.trim($("#searchMaterial").val()), projectId: $.trim($("#searchProjectId").val()), depotIds: depotString, beginTime: $("#searchBeginTime").val(), diff --git a/erp_web/pages/reports/in_material_count.html b/erp_web/pages/reports/in_material_count.html index 1a5f5f9c..f0b368af 100644 --- a/erp_web/pages/reports/in_material_count.html +++ b/erp_web/pages/reports/in_material_count.html @@ -34,6 +34,12 @@
+
+ +
+ +
+
@@ -271,6 +277,7 @@ currentPage: pageNo, pageSize: pageSize, organId: $('#OrganId').combobox('getValue'), + materialParam: $.trim($("#searchMaterial").val()), projectId: $.trim($("#searchProjectId").val()), depotIds: depotString, beginTime: $("#searchBeginTime").val(), diff --git a/erp_web/pages/reports/in_out_stock_report.html b/erp_web/pages/reports/in_out_stock_report.html index 29d9c373..bf9231b8 100644 --- a/erp_web/pages/reports/in_out_stock_report.html +++ b/erp_web/pages/reports/in_out_stock_report.html @@ -29,15 +29,9 @@
- +
- -
-
-
- -
- +
@@ -72,7 +66,6 @@ initSelectInfo_UB(); initSystemData_depot(); initSelectInfo_depot(); - initMaterialNameList(); initMProperty(); //初始化商品属性 initTableData(); ininPager(); @@ -166,21 +159,6 @@ } } - //初始化商品名称模糊匹配 - function initMaterialNameList() { - $('#mName').combobox({ - method:"get", - url: "/material/getMaterialNameList", - valueField: 'value', - textField: 'text', - hasDownArrow: false, - filter: function(q, row){ - var opts = $(this).combobox('options'); - return row[opts.textField].indexOf(q) >-1; - } - }); - } - //初始化商品属性 function initMProperty() { $.ajax({ @@ -324,8 +302,7 @@ + "¤tPage=" + pageNo + "&pageSize=" + pageSize + "&depotId=" + $.trim($("#searchProjectId").val()) + "&monthTime=" + $("#searchMonth").val() - + "&name=" + $("#mName").combobox("getValue") - + "&model=" + $("#mModel").textbox("getValue"); + + "&materialParam=" + $.trim($("#searchMaterial").val()); } else { $.ajax({ @@ -337,8 +314,7 @@ pageSize: pageSize, depotId: $.trim($("#searchProjectId").val()), monthTime: $("#searchMonth").val(), - name: $("#mName").combobox("getValue"), - model: $("#mModel").textbox("getValue"), + materialParam: $.trim($("#searchMaterial").val()), mpList: mPropertyList }), success: function (res) { @@ -361,8 +337,7 @@ data: ({ depotId: $.trim($("#searchProjectId").val()), monthTime: $("#searchMonth").val(), - name: $("#mName").combobox("getValue"), - model: $("#mModel").textbox("getValue") + materialParam: $.trim($("#searchMaterial").val()) }), success: function (res) { if(res && res.code === 200) { diff --git a/erp_web/pages/reports/out_detail.html b/erp_web/pages/reports/out_detail.html index 9a9544a3..063da7d3 100644 --- a/erp_web/pages/reports/out_detail.html +++ b/erp_web/pages/reports/out_detail.html @@ -36,6 +36,12 @@
+
+ +
+ +
+
@@ -282,6 +288,7 @@ currentPage: pageNo, pageSize: pageSize, organId: $('#OrganId').combobox('getValue'), + materialParam: $.trim($("#searchMaterial").val()), projectId: $.trim($("#searchProjectId").val()), depotIds: depotString, beginTime: $("#searchBeginTime").val(), diff --git a/erp_web/pages/reports/out_material_count.html b/erp_web/pages/reports/out_material_count.html index 1f2f34eb..cd4b456f 100644 --- a/erp_web/pages/reports/out_material_count.html +++ b/erp_web/pages/reports/out_material_count.html @@ -34,6 +34,12 @@
+
+ +
+ +
+
@@ -271,6 +277,7 @@ currentPage: pageNo, pageSize: pageSize, organId: $('#OrganId').combobox('getValue'), + materialParam: $.trim($("#searchMaterial").val()), projectId: $.trim($("#searchProjectId").val()), depotIds: depotString, beginTime: $("#searchBeginTime").val(), diff --git a/erp_web/pages/reports/sale_out_report.html b/erp_web/pages/reports/sale_out_report.html index 972006f3..56366fb8 100644 --- a/erp_web/pages/reports/sale_out_report.html +++ b/erp_web/pages/reports/sale_out_report.html @@ -30,15 +30,9 @@
- +
- -
-
-
- -
- +
@@ -59,7 +53,6 @@ $("#searchTable .tip").css("padding-left", "15px").css("color", "red"); var thisDate = getNowFormatMonth(); //当前月份 $("#searchMonth").val(thisDate); - initMaterialNameList(); initMProperty(); //初始化商品属性 initTableData(); ininPager(); @@ -67,21 +60,6 @@ print(); }); - //初始化商品名称模糊匹配 - function initMaterialNameList() { - $('#mName').combobox({ - method:"get", - url: "/material/getMaterialNameList", - valueField: 'value', - textField: 'text', - hasDownArrow: false, - filter: function(q, row){ - var opts = $(this).combobox('options'); - return row[opts.textField].indexOf(q) >-1; - } - }); - } - //初始化商品属性 function initMProperty() { $.ajax({ @@ -229,8 +207,7 @@ currentPage: pageNo, pageSize: pageSize, monthTime: $("#searchMonth").val(), - name: $("#mName").combobox("getValue"), - model: $("#mModel").textbox("getValue"), + materialParam: $.trim($("#searchMaterial").val()), mpList: mPropertyList }), success: function (res) { diff --git a/erp_web/pages/reports/stock_warning_report.html b/erp_web/pages/reports/stock_warning_report.html index dde95f7e..7491ff92 100644 --- a/erp_web/pages/reports/stock_warning_report.html +++ b/erp_web/pages/reports/stock_warning_report.html @@ -28,6 +28,12 @@
+
+ +
+ +
+
查询 导出 @@ -291,6 +297,7 @@ data: ({ currentPage: pageNo, pageSize: pageSize, + materialParam: $.trim($("#searchMaterial").val()), projectId : $.trim($("#searchProjectId").val()), mpList: mPropertyList }), @@ -299,6 +306,7 @@ if (pageSize === 3000) { window.location.href = "/depotItem/exportWarningExcel?browserType=" + getOs() + "¤tPage=" + pageNo + "&pageSize=" + pageSize + + "&materialParam=" + $.trim($("#searchMaterial").val()) + "&projectId=" + $.trim($("#searchProjectId").val()) + "&mpList=" + mPropertyList; } diff --git a/src/main/java/com/jsh/erp/controller/DepotHeadController.java b/src/main/java/com/jsh/erp/controller/DepotHeadController.java index f4e282de..8affd8bf 100644 --- a/src/main/java/com/jsh/erp/controller/DepotHeadController.java +++ b/src/main/java/com/jsh/erp/controller/DepotHeadController.java @@ -104,6 +104,7 @@ public class DepotHeadController { public BaseResponseInfo findInDetail(@RequestParam("currentPage") Integer currentPage, @RequestParam("pageSize") Integer pageSize, @RequestParam("organId") Integer oId, + @RequestParam("materialParam") String materialParam, @RequestParam("projectId") Integer pid, @RequestParam("depotIds") String dids, @RequestParam("beginTime") String beginTime, @@ -114,8 +115,8 @@ public class DepotHeadController { Map map = new HashMap(); try { List resList = new ArrayList(); - List list = depotHeadService.findByAll(beginTime, endTime, type, pid, dids, oId, (currentPage-1)*pageSize, pageSize); - int total = depotHeadService.findByAllCount(beginTime, endTime, type, pid, dids, oId); + List list = depotHeadService.findByAll(beginTime, endTime, type, materialParam, pid, dids, oId, (currentPage-1)*pageSize, pageSize); + int total = depotHeadService.findByAllCount(beginTime, endTime, type, materialParam, pid, dids, oId); map.put("total", total); //存放数据json数组 if (null != list) { @@ -151,6 +152,7 @@ public class DepotHeadController { public BaseResponseInfo findInOutMaterialCount(@RequestParam("currentPage") Integer currentPage, @RequestParam("pageSize") Integer pageSize, @RequestParam("organId") Integer oId, + @RequestParam("materialParam") String materialParam, @RequestParam("projectId") Integer pid, @RequestParam("depotIds") String dids, @RequestParam("beginTime") String beginTime, @@ -161,8 +163,8 @@ public class DepotHeadController { Map map = new HashMap(); try { List resList = new ArrayList(); - List list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, pid, dids, oId, (currentPage-1)*pageSize, pageSize); - int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, pid, dids, oId); + List list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, materialParam, pid, dids, oId, (currentPage-1)*pageSize, pageSize); + int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, materialParam, pid, dids, oId); map.put("total", total); //存放数据json数组 if (null != list) { diff --git a/src/main/java/com/jsh/erp/controller/DepotItemController.java b/src/main/java/com/jsh/erp/controller/DepotItemController.java index e4657464..09b0bfe9 100644 --- a/src/main/java/com/jsh/erp/controller/DepotItemController.java +++ b/src/main/java/com/jsh/erp/controller/DepotItemController.java @@ -225,8 +225,7 @@ public class DepotItemController { * @param pageSize * @param depotId * @param monthTime - * @param name - * @param model + * @param materialParam * @param mpList * @param request * @return @@ -237,8 +236,7 @@ public class DepotItemController { @RequestParam("pageSize") Integer pageSize, @RequestParam("depotId") Long depotId, @RequestParam("monthTime") String monthTime, - @RequestParam("name") String name, - @RequestParam("model") String model, + @RequestParam("materialParam") String materialParam, @RequestParam("mpList") String mpList, HttpServletRequest request)throws Exception { BaseResponseInfo res = new BaseResponseInfo(); @@ -247,10 +245,10 @@ public class DepotItemController { String timeA = monthTime+"-01 00:00:00"; String timeB = Tools.lastDayOfMonth(monthTime)+" 23:59:59"; try { - List dataList = depotItemService.findByAll(StringUtil.toNull(name), StringUtil.toNull(model), + List dataList = depotItemService.findByAll(StringUtil.toNull(materialParam), timeB,(currentPage-1)*pageSize, pageSize); String[] mpArr = mpList.split(","); - int total = depotItemService.findByAllCount(StringUtil.toNull(name), StringUtil.toNull(model), timeB); + int total = depotItemService.findByAllCount(StringUtil.toNull(materialParam), timeB); map.put("total", total); //存放数据json数组 JSONArray dataArray = new JSONArray(); @@ -306,8 +304,7 @@ public class DepotItemController { * @param pageSize * @param depotId * @param monthTime - * @param name - * @param model + * @param materialParam * @param request * @param response * @return @@ -317,14 +314,13 @@ public class DepotItemController { @RequestParam("pageSize") Integer pageSize, @RequestParam("depotId") Long depotId, @RequestParam("monthTime") String monthTime, - @RequestParam("name") String name, - @RequestParam("model") String model, + @RequestParam("materialParam") String materialParam, HttpServletRequest request, HttpServletResponse response) throws Exception { Long tenantId = Long.parseLong(request.getSession().getAttribute("tenantId").toString()); String timeA = monthTime+"-01 00:00:00"; String timeB = Tools.lastDayOfMonth(monthTime)+" 23:59:59"; try { - List dataList = depotItemService.findByAll(StringUtil.toNull(name), StringUtil.toNull(model), + List dataList = depotItemService.findByAll(StringUtil.toNull(materialParam), timeB, (currentPage-1)*pageSize, pageSize); //存放数据json数组 String[] names = {"名称", "规格", "型号", "单位", "单价", "上月结存数量", "入库数量", "出库数量", "本月结存数量", "结存金额"}; @@ -359,23 +355,21 @@ public class DepotItemController { * 统计总计金额 * @param depotId * @param monthTime - * @param name - * @param model + * @param materialParam * @param request * @return */ @PostMapping(value = "/totalCountMoney") public BaseResponseInfo totalCountMoney(@RequestParam("depotId") Long depotId, - @RequestParam("monthTime") String monthTime, - @RequestParam("name") String name, - @RequestParam("model") String model, - HttpServletRequest request) throws Exception{ + @RequestParam("monthTime") String monthTime, + @RequestParam("materialParam") String materialParam, + HttpServletRequest request) throws Exception{ BaseResponseInfo res = new BaseResponseInfo(); Map map = new HashMap(); Long tenantId = Long.parseLong(request.getSession().getAttribute("tenantId").toString()); String endTime = Tools.lastDayOfMonth(monthTime)+" 23:59:59"; try { - List dataList = depotItemService.findByAll(StringUtil.toNull(name), StringUtil.toNull(model), + List dataList = depotItemService.findByAll(StringUtil.toNull(materialParam), endTime, null, null); BigDecimal thisAllPrice = BigDecimal.ZERO; if (null != dataList) { @@ -402,28 +396,26 @@ public class DepotItemController { * @param currentPage * @param pageSize * @param monthTime - * @param name - * @param model + * @param materialParam * @param mpList * @param request * @return */ @PostMapping(value = "/buyIn") public BaseResponseInfo buyIn(@RequestParam("currentPage") Integer currentPage, - @RequestParam("pageSize") Integer pageSize, - @RequestParam("monthTime") String monthTime, - @RequestParam("name") String name, - @RequestParam("model") String model, - @RequestParam("mpList") String mpList, - HttpServletRequest request)throws Exception { + @RequestParam("pageSize") Integer pageSize, + @RequestParam("monthTime") String monthTime, + @RequestParam("materialParam") String materialParam, + @RequestParam("mpList") String mpList, + HttpServletRequest request)throws Exception { BaseResponseInfo res = new BaseResponseInfo(); Map map = new HashMap(); String endTime = Tools.lastDayOfMonth(monthTime)+" 23:59:59"; try { - List dataList = depotItemService.findByAll(StringUtil.toNull(name), StringUtil.toNull(model), + List dataList = depotItemService.findByAll(StringUtil.toNull(materialParam), endTime, (currentPage-1)*pageSize, pageSize); String[] mpArr = mpList.split(","); - int total = depotItemService.findByAllCount(StringUtil.toNull(name), StringUtil.toNull(model), endTime); + int total = depotItemService.findByAllCount(StringUtil.toNull(materialParam), endTime); map.put("total", total); //存放数据json数组 JSONArray dataArray = new JSONArray(); @@ -466,8 +458,7 @@ public class DepotItemController { * @param currentPage * @param pageSize * @param monthTime - * @param name - * @param model + * @param materialParam * @param mpList * @param request * @return @@ -476,18 +467,17 @@ public class DepotItemController { public BaseResponseInfo saleOut(@RequestParam("currentPage") Integer currentPage, @RequestParam("pageSize") Integer pageSize, @RequestParam("monthTime") String monthTime, - @RequestParam("name") String name, - @RequestParam("model") String model, + @RequestParam("materialParam") String materialParam, @RequestParam("mpList") String mpList, HttpServletRequest request)throws Exception { BaseResponseInfo res = new BaseResponseInfo(); Map map = new HashMap(); String endTime = Tools.lastDayOfMonth(monthTime)+" 23:59:59"; try { - List dataList = depotItemService.findByAll(StringUtil.toNull(name), StringUtil.toNull(model), + List dataList = depotItemService.findByAll(StringUtil.toNull(materialParam), endTime,(currentPage-1)*pageSize, pageSize); String[] mpArr = mpList.split(","); - int total = depotItemService.findByAllCount(StringUtil.toNull(name), StringUtil.toNull(model), endTime); + int total = depotItemService.findByAllCount(StringUtil.toNull(materialParam), endTime); map.put("total", total); //存放数据json数组 JSONArray dataArray = new JSONArray(); @@ -575,13 +565,14 @@ public class DepotItemController { @GetMapping(value = "/findStockWarningCount") public BaseResponseInfo findStockWarningCount(@RequestParam("currentPage") Integer currentPage, @RequestParam("pageSize") Integer pageSize, + @RequestParam("materialParam") String materialParam, @RequestParam("projectId") Integer pid, @RequestParam("mpList") String mpList)throws Exception { BaseResponseInfo res = new BaseResponseInfo(); Map map = new HashMap(); try { String[] mpArr = mpList.split(","); - List list = depotItemService.findStockWarningCount((currentPage-1)*pageSize, pageSize,pid); + List list = depotItemService.findStockWarningCount((currentPage-1)*pageSize, pageSize,materialParam,pid); //存放数据json数组 if (null != list) { for (DepotItemStockWarningCount disw : list) { @@ -594,7 +585,7 @@ public class DepotItemController { disw.setMaterialUnit(getUName(disw.getMaterialUnit(), disw.getUnitName())); } } - int total = depotItemService.findStockWarningCountTotal(pid); + int total = depotItemService.findStockWarningCountTotal(materialParam,pid); map.put("total", total); map.put("rows", list); res.code = 200; @@ -618,6 +609,7 @@ public class DepotItemController { @GetMapping(value = "/exportWarningExcel") public BaseResponseInfo exportWarningExcel(@RequestParam("currentPage") Integer currentPage, @RequestParam("pageSize") Integer pageSize, + @RequestParam("materialParam") String materialParam, @RequestParam("projectId") Integer projectId, @RequestParam("mpList") String mpList, HttpServletRequest request, HttpServletResponse response)throws Exception { @@ -626,7 +618,7 @@ public class DepotItemController { String message = "成功"; try { String[] mpArr = mpList.split(","); - List dataList = depotItemService.findStockWarningCount((currentPage - 1) * pageSize, pageSize, projectId); + List dataList = depotItemService.findStockWarningCount((currentPage - 1) * pageSize, pageSize, materialParam, projectId); //存放数据json数组 Integer pid = projectId; String[] names = {"名称", "规格", "型号", "扩展信息", "单位", "安全存量", "当前库存", "建议入库量"}; diff --git a/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java b/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java index 38a268f6..b937cba6 100644 --- a/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java +++ b/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java @@ -49,6 +49,7 @@ public interface DepotHeadMapperEx { @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("type") String type, + @Param("materialParam") String materialParam, @Param("pid") Integer pid, @Param("dids") String dids, @Param("oId") Integer oId, @@ -59,6 +60,7 @@ public interface DepotHeadMapperEx { @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("type") String type, + @Param("materialParam") String materialParam, @Param("pid") Integer pid, @Param("dids") String dids, @Param("oId") Integer oId); @@ -67,6 +69,7 @@ public interface DepotHeadMapperEx { @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("type") String type, + @Param("materialParam") String materialParam, @Param("pid") Integer pid, @Param("dids") String dids, @Param("oId") Integer oId, @@ -77,6 +80,7 @@ public interface DepotHeadMapperEx { @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("type") String type, + @Param("materialParam") String materialParam, @Param("pid") Integer pid, @Param("dids") String dids, @Param("oId") Integer oId); diff --git a/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java b/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java index 68a19f85..4854dbfa 100644 --- a/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java +++ b/src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java @@ -40,15 +40,13 @@ public interface DepotItemMapperEx { @Param("headerId") Long headerId); List findByAll( - @Param("name") String name, - @Param("model") String model, + @Param("materialParam") String materialParam, @Param("endTime") String endTime, @Param("offset") Integer offset, @Param("rows") Integer rows); int findByAllCount( - @Param("name") String name, - @Param("model") String model, + @Param("materialParam") String materialParam, @Param("endTime") String endTime); BigDecimal buyOrSaleNumber( @@ -108,8 +106,13 @@ public interface DepotItemMapperEx { List getDepotItemListListByMaterialIds(@Param("materialIds") String[] materialIds); - List findStockWarningCount(@Param("offset") Integer offset, - @Param("rows") Integer rows, @Param("pid") Integer pid); + List findStockWarningCount( + @Param("offset") Integer offset, + @Param("rows") Integer rows, + @Param("materialParam") String materialParam, + @Param("pid") Integer pid); - int findStockWarningCountTotal( @Param("pid") Integer pid); + int findStockWarningCountTotal( + @Param("materialParam") String materialParam, + @Param("pid") Integer pid); } diff --git a/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java b/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java index 75f1b7d9..dc987060 100644 --- a/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java +++ b/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java @@ -295,40 +295,40 @@ public class DepotHeadService { return result; } - public List findByAll(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId, Integer offset, Integer rows) throws Exception{ + public List findByAll(String beginTime, String endTime, String type, String materialParam, Integer pid, String dids, Integer oId, Integer offset, Integer rows) throws Exception{ List list = null; try{ - list =depotHeadMapperEx.findByAll(beginTime, endTime, type, pid, dids, oId, offset, rows); + list =depotHeadMapperEx.findByAll(beginTime, endTime, type, materialParam, pid, dids, oId, offset, rows); }catch(Exception e){ JshException.readFail(logger, e); } return list; } - public int findByAllCount(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId) throws Exception{ + public int findByAllCount(String beginTime, String endTime, String type, String materialParam, Integer pid, String dids, Integer oId) throws Exception{ int result = 0; try{ - result =depotHeadMapperEx.findByAllCount(beginTime, endTime, type, pid, dids, oId); + result =depotHeadMapperEx.findByAllCount(beginTime, endTime, type, materialParam, pid, dids, oId); }catch(Exception e){ JshException.readFail(logger, e); } return result; } - public List findInOutMaterialCount(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId, Integer offset, Integer rows)throws Exception { + public List findInOutMaterialCount(String beginTime, String endTime, String type, String materialParam, Integer pid, String dids, Integer oId, Integer offset, Integer rows)throws Exception { List list = null; try{ - list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, pid, dids, oId, offset, rows); + list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, materialParam, pid, dids, oId, offset, rows); }catch(Exception e){ JshException.readFail(logger, e); } return list; } - public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, Integer pid, String dids, Integer oId)throws Exception { + public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, String materialParam, Integer pid, String dids, Integer oId)throws Exception { int result = 0; try{ - result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, pid, dids, oId); + result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, materialParam, pid, dids, oId); }catch(Exception e){ JshException.readFail(logger, e); } diff --git a/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java b/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java index b0016bbf..b8755003 100644 --- a/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java +++ b/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java @@ -240,20 +240,20 @@ public class DepotItemService { return list; } - public List findByAll(String name, String model, String endTime, Integer offset, Integer rows)throws Exception { + public List findByAll(String materialParam, String endTime, Integer offset, Integer rows)throws Exception { List list =null; try{ - list = depotItemMapperEx.findByAll(name, model, endTime, offset, rows); + list = depotItemMapperEx.findByAll(materialParam, endTime, offset, rows); }catch(Exception e){ JshException.readFail(logger, e); } return list; } - public int findByAllCount(String name, String model, String endTime)throws Exception { + public int findByAllCount(String materialParam, String endTime)throws Exception { int result=0; try{ - result = depotItemMapperEx.findByAllCount(name, model, endTime); + result = depotItemMapperEx.findByAllCount(materialParam, endTime); }catch(Exception e){ JshException.readFail(logger, e); } @@ -440,20 +440,20 @@ public class DepotItemService { } @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public List findStockWarningCount(int offset, Integer rows, Integer pid) { + public List findStockWarningCount(int offset, Integer rows, String materialParam, Integer pid) { List list = null; try{ - list =depotItemMapperEx.findStockWarningCount( offset, rows, pid); + list =depotItemMapperEx.findStockWarningCount( offset, rows, materialParam, pid); }catch(Exception e){ JshException.readFail(logger, e); } return list; } @Transactional(value = "transactionManager", rollbackFor = Exception.class) - public int findStockWarningCountTotal(Integer pid) { + public int findStockWarningCountTotal(String materialParam, Integer pid) { int result = 0; try{ - result =depotItemMapperEx.findStockWarningCountTotal(pid); + result =depotItemMapperEx.findStockWarningCountTotal(materialParam, pid); }catch(Exception e){ JshException.readFail(logger, e); } diff --git a/src/main/resources/mapper_xml/DepotHeadMapperEx.xml b/src/main/resources/mapper_xml/DepotHeadMapperEx.xml index 53334fd0..d0bf048d 100644 --- a/src/main/resources/mapper_xml/DepotHeadMapperEx.xml +++ b/src/main/resources/mapper_xml/DepotHeadMapperEx.xml @@ -160,6 +160,10 @@ and dh.type='${type}' + + + and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) + and ifnull(dh.delete_flag,'0') !='1' ORDER BY oper_time DESC,number desc @@ -187,6 +191,10 @@ and dh.type='${type}' + + + and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) + and ifnull(dh.delete_flag,'0') !='1' ORDER BY oper_time DESC,number desc @@ -208,7 +216,6 @@ and ifnull(jdh.delete_flag,'0') !='1' ) numSum, - (select sum(jdi.all_price) priceSum from jsh_depot_head jdh INNER JOIN jsh_depot_item jdi on jdh.id=jdi.header_id and ifnull(jdi.delete_flag,'0') !='1' where jdi.material_id=di.material_id @@ -241,6 +248,10 @@ and di.depot_id in (${dids}) + + + and (m.mName like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) + and ifnull(dh.delete_flag,'0') !='1' GROUP BY di.material_id,m.mName,m.Model,m.standard,m.categoryName @@ -266,6 +277,10 @@ and di.depot_id in (${dids}) + + + and (m.mName like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) + and ifnull(dh.delete_flag,'0') !='1' GROUP BY di.material_id,m.mName,m.Model,m.standard,m.categoryName) a diff --git a/src/main/resources/mapper_xml/DepotItemMapperEx.xml b/src/main/resources/mapper_xml/DepotItemMapperEx.xml index f2b18db3..8f498b36 100644 --- a/src/main/resources/mapper_xml/DepotItemMapperEx.xml +++ b/src/main/resources/mapper_xml/DepotItemMapperEx.xml @@ -173,11 +173,9 @@ left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1' left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1' where 1=1 - - and m.name like '%${name}%' - - - and m.model like '%${model}%' + + + and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) and dh.oper_time <= '${endTime}' @@ -196,11 +194,9 @@ left join jsh_depot_item di on di.material_id=m.id and ifnull(m.delete_Flag,'0') !='1' left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1' where 1=1 - - and m.name like '%${name}%' - - - and m.model like '%${model}%' + + + and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) and dh.oper_time <= '${endTime}' @@ -383,6 +379,10 @@ where 1=1 and ifnull(m.delete_flag,'0') !='1' and ifnull(m.safety_stock,0) > mcs.current_number + + + and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) + and mcs.depot_id= ${pid} @@ -404,6 +404,10 @@ where 1=1 and ifnull(m.delete_flag,'0') !='1' and ifnull(m.safety_stock,0) > mcs.current_number + + + and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}) + and mcs.depot_id= ${pid}