From c27bbcc497711df8b13d096f4917b5a8f16508c9 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期日, 28 九月 2025 10:28:59 +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/service/mm/MaterialInventoryService.java |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java b/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
index 86fc231..29fc139 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
@@ -8,6 +8,7 @@
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.example.erp.common.Constants;
 import com.example.erp.dto.mm.FinishedOperateLogDTO;
+import com.example.erp.dto.mm.MaterialLogDTO;
 import com.example.erp.entity.mm.*;
 import com.example.erp.entity.pp.*;
 import com.example.erp.entity.sd.Delivery;
@@ -875,8 +876,15 @@
         return map;
     }
 
-    public List<MaterialLog> exportMaterialLogReport(List<LocalDate> dates, String type) {
-        return materialInventoryMapper.exportMaterialLogReport(dates,type);
+    public List<MaterialLogDTO> exportMaterialLogReport(List<LocalDate> dates, String type) {
+        if(type.equals("鐗╂枡鍑哄簱")){
+            return materialInventoryMapper.exportMaterialLogReport(dates,type);
+        }else if(type.equals("浼樺寲鍑哄簱")){
+            return materialInventoryMapper.exportMaterialLogOptimizeOutboundReport(dates,type);
+        }else{
+            return materialInventoryMapper.exportMaterialLogReports(dates,type);
+        }
+
     }
 
 
@@ -1276,9 +1284,9 @@
             //鏌ヨ鐗╂枡鏄惁瀛樺湪
             List<MaterialInventory> MaterialInventoryCount;
             if (materialInventory.getDateOfManufacture()!=null){
-                MaterialInventoryCount = materialInventoryMapper.getMaterialInventoryCount(materialInventory.getMaterialCode(),materialInventory.getDateOfManufacture(),materialInventory.getProducer());
+                MaterialInventoryCount = materialInventoryMapper.getMaterialInventoryCount1(materialInventory.getMaterialCode(),materialInventory.getDateOfManufacture(),materialInventory.getProducer(),materialInventory.getId());
             }else{
-                MaterialInventoryCount = materialInventoryMapper.getMaterialInventoryCountNull(materialInventory.getMaterialCode(),materialInventory.getProducer());
+                MaterialInventoryCount = materialInventoryMapper.getMaterialInventoryCountNull1(materialInventory.getMaterialCode(),materialInventory.getProducer(),materialInventory.getId());
             }
 
             if(MaterialInventoryCount.size()==1){

--
Gitblit v1.8.0