From aa3c65582bad107cc94a6ac3ba12605ca3c07c8a Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期五, 15 三月 2024 10:54:28 +0800
Subject: [PATCH] 修改1

---
 api/v1/product.go |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/api/v1/product.go b/api/v1/product.go
index df16bb8..a61ea18 100644
--- a/api/v1/product.go
+++ b/api/v1/product.go
@@ -205,8 +205,10 @@
 		wo.Unit = orderInfo.Unit
 		wo.Amount = orderInfo.Amount
 		wo.FinishAmount = orderInfo.FinishAmount
-		amountMap[orderInfo.ProductId] = amountMap[orderInfo.ProductId] + orderInfo.Amount
-		overMap[orderInfo.ProductId] = overMap[orderInfo.ProductId] + orderInfo.FinishAmount
+		at := amountMap[orderInfo.ProductId] + orderInfo.Amount
+		amountMap[orderInfo.ProductId] = at
+		fat := overMap[orderInfo.ProductId] + orderInfo.FinishAmount
+		overMap[orderInfo.ProductId] = fat
 		list = append(list, wo)
 	}
 	for i := 0; i < len(productInfo); i++ {
@@ -233,8 +235,10 @@
 		p.Unit = pl.Unit
 		p.Amount = pl.Amount
 		p.FinishAmount = pl.FinishAmount
-		amountMap[pl.ProductId] = amountMap[pl.ProductId] + pl.Amount
-		overMap[pl.ProductId] = overMap[pl.ProductId] + pl.FinishAmount
+		at := amountMap[pl.ProductId] + pl.Amount
+		amountMap[pl.ProductId] = at
+		fat := overMap[pl.ProductId] + pl.FinishAmount
+		overMap[pl.ProductId] = fat
 		purchaseInfo = append(purchaseInfo, p)
 	}
 	for i := 0; i < len(productInfo); i++ {
@@ -261,8 +265,10 @@
 		oi.Unit = outsourcingInfo.Unit
 		oi.Amount = outsourcingInfo.Amount
 		oi.FinishAmount = outsourcingInfo.FinishAmount
-		amountMap[outsourcingInfo.ProductId] = amountMap[outsourcingInfo.ProductId] + outsourcingInfo.Amount
-		overMap[outsourcingInfo.ProductId] = overMap[outsourcingInfo.ProductId] + outsourcingInfo.FinishAmount
+		at := amountMap[outsourcingInfo.ProductId] + outsourcingInfo.Amount
+		amountMap[outsourcingInfo.ProductId] = at
+		fat := overMap[outsourcingInfo.ProductId] + outsourcingInfo.FinishAmount
+		overMap[outsourcingInfo.ProductId] = fat
 		outsourcingList = append(outsourcingList, oi)
 	}
 	for i := 0; i < len(productInfo); i++ {

--
Gitblit v1.8.0