From ca6e3b120877bf7416620ba3d2024b7bac06c142 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 30 十月 2024 16:57:20 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override

---
 north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java b/north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java
index cd0494d..21a9f8f 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java
@@ -4,16 +4,21 @@
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import com.example.erp.common.Constants;
 import com.example.erp.common.Result;
+import com.example.erp.dto.mm.FinishedOperateLogDTO;
 import com.example.erp.entity.mm.*;
 import com.example.erp.entity.pp.OptimizeUse;
 import com.example.erp.exception.ServiceException;
 import com.example.erp.service.mm.MaterialInventoryService;
 import com.example.erp.service.mm.MaterialStoreService;
+import com.example.erp.tools.DownExcel;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.time.LocalDate;
 import java.util.List;
 import java.util.Map;
 
@@ -153,6 +158,20 @@
         return   Result.seccess(materialInventoryService.printCreateOutbound(materialOutboundId));
     }
 
+    @ApiOperation("鐗╂枡搴撳瓨璁板綍鏌ヨ鎺ュ彛")
+    @SaCheckPermission("warehouseReport.search")
+    @PostMapping("/getMaterialLogReport/{type}/{pageNum}/{pageSize}/{selectDate}")
+    public Result getMaterialLogReport(@PathVariable String type,@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody MaterialLog materialLog){
+        return Result.seccess(materialInventoryService.getMaterialLogReport(type,pageNum,pageSize,selectDate,materialLog));
+    }
+
+    @ApiOperation("鐗╂枡鎶ヨ〃瀵煎嚭")
+    @PostMapping("/exportMaterialLogReport/{type}")
+    public void exportMaterialLogReport(@PathVariable String type, HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
+        //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+        DownExcel.download(response, MaterialLog.class, materialInventoryService.exportMaterialLogReport(dates,type),"orderReport");
+    }
+
 
 
 

--
Gitblit v1.8.0