From 8e41c3abbae355b626158a276c08ee68d9afd0f5 Mon Sep 17 00:00:00 2001
From: 18516761980 <4761516tqsxp>
Date: 星期四, 07 四月 2022 09:48:19 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/controller/StatisController.java |   33 +++++++++++++++++++++++----------
 1 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/StatisController.java b/src/main/java/com/zy/asrs/controller/StatisController.java
index b7241c3..5fdf336 100644
--- a/src/main/java/com/zy/asrs/controller/StatisController.java
+++ b/src/main/java/com/zy/asrs/controller/StatisController.java
@@ -2,7 +2,6 @@
 
 import com.alibaba.excel.EasyExcel;
 import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
-import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.core.annotations.ManagerAuth;
 import com.core.common.R;
@@ -50,20 +49,34 @@
 //                         @RequestParam(required = false)String condition,
                          @RequestParam Map<String, Object> param) {
         Page<LocDetl> stockStatis = locDetlService.getStockStatis(toPage(curr, limit, param, LocDetl.class));
-        for (LocDetl locDetl : stockStatis.getRecords()) {
-            MatCode mat = matCodeService.selectOne(new EntityWrapper<MatCode>().eq("mat_no",locDetl.getMatNo()));
-//            MatCode mat = matCodeService.selectById(locDetl.getMatnr());
-            if (mat != null) {
-                VersionUtils.setLocDetl(locDetl, mat);
-            }
-        }
+//        for (LocDetl locDetl : stockStatis.getRecords()) {
+//            MatCode mat = matCodeService.selectOne(new EntityWrapper<MatCode>().eq("mat_no",locDetl.getMatNo()));
+////            MatCode mat = matCodeService.selectById(locDetl.getMatnr());
+//            if (mat != null) {
+//                VersionUtils.setLocDetl(locDetl, mat);
+//            }
+//        }
         return R.ok().add(stockStatis);
     }
 
     //搴撲綅鎶ヨ〃瀵煎嚭
     @RequestMapping(value = "/stock/statis/export")
-    public void stockStatisExport(HttpServletResponse response) throws IOException {
-        List<LocDetl> excel = locDetlService.getStockStatisExcel();
+    public void stockStatisExport(@RequestParam(required = false) String matNo,
+                                  @RequestParam(required = false) String matName,
+                                  @RequestParam(required = false) String supplier,
+                                  @RequestParam(required = false) String str3,
+                                  @RequestParam(required = false) String str4,
+                                  @RequestParam(required = false) String memo,
+                                  HttpServletResponse response) throws IOException {
+        LocDetl param = new LocDetl();
+        param.setMatNo(matNo!=null ? matNo : "");
+        param.setMatName(matName!=null ? matName : "");
+        param.setSupplier(supplier!=null ? supplier : "");
+        param.setStr3(str3!=null ? str3 : "");
+        param.setStr4(str4!=null ? str4 : "");
+        param.setMemo(memo!=null ? memo : "");
+
+        List<LocDetl> excel = locDetlService.getStockStatisExcel(param);
         for (LocDetl locDetl : excel) {
             MatCode mat = matCodeService.selectById(locDetl.getMatNo());
             if (mat != null) {

--
Gitblit v1.9.1