From 174cc2a8aa52f00334e0e9a3a0ea91b2e3e7acd3 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 30 十月 2025 16:20:41 +0800
Subject: [PATCH] 修改次破报表翻页汇总不正确问题
---
north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java | 35 +++++++++++++++++++++++++++++++++--
1 files changed, 33 insertions(+), 2 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 ee35307..e266082 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;
@@ -28,6 +29,7 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
+import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.ArrayList;
@@ -875,8 +877,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);
+ }
+
}
@@ -1307,4 +1316,26 @@
}
+ public Object appGetStockList() {
+ List<MaterialInventory> materialInventoryList = materialInventoryMapper.selectGetStockList();
+ Map<String, Object> totalSum = new HashMap<>();
+ Integer inventoryQuantity = 0;
+ Integer availableQuantity = 0;
+ Double totalArea = 0.00;
+ for (MaterialInventory materialInventory : materialInventoryList) {
+ inventoryQuantity += materialInventory.getInventoryQuantity();
+ availableQuantity += materialInventory.getAvailableQuantity();
+ totalArea += materialInventory.getTotalArea();
+ }
+ DecimalFormat df = new DecimalFormat("#.00");
+ totalSum.put("inventoryQuantity",inventoryQuantity);
+ totalSum.put("availableQuantity",availableQuantity);
+ totalSum.put("totalArea", df.format(totalArea));
+
+
+ Map<String, Object> map = new HashMap<>();
+ map.put("glassStock", materialInventoryList);
+ map.put("totalSum", totalSum);
+ return map;
+ }
}
--
Gitblit v1.8.0