From 166a45a9d44e03e63552c6afa975c9ef0cc902e5 Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期二, 03 六月 2025 17:50:41 +0800
Subject: [PATCH] 功能,页面更新优化

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index a608a7f..0bcdcfc 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -863,11 +863,17 @@
 
                     stockInfoDetails.Add(stockInfoDetail);
 
-                    notGroupDetail.ReceiptQuantity += model.Quantity;
-                    if (notGroupDetail.ReceiptQuantity>notGroupDetail.OrderQuantity)
+                    decimal decimalReceiptQuantity = Convert.ToDecimal(notGroupDetail.ReceiptQuantity);
+                    decimal decimalModelQuantity = Convert.ToDecimal(model.Quantity);
+                    decimal decimalOrderQuantity = Convert.ToDecimal(notGroupDetail.OrderQuantity);
+                    decimalReceiptQuantity += decimalModelQuantity;
+                    // 妫�鏌ユ槸鍚﹁秴鍑鸿鍗曟暟閲�
+                    if (decimalReceiptQuantity > decimalOrderQuantity)
                     {
-                        return WebResponseContent.Instance.Error($"缁勭洏鏁伴噺婧㈠嚭{notGroupDetail.ReceiptQuantity - notGroupDetail.OrderQuantity}");
+                        return WebResponseContent.Instance.Error($"缁勭洏鏁伴噺婧㈠嚭{decimalReceiptQuantity - decimalOrderQuantity}");
                     }
+                    // 杞洖float绫诲瀷瀛樺偍锛屼絾姣旇緝鍜岃绠楅兘浣跨敤decimal瀹屾垚
+                    notGroupDetail.ReceiptQuantity = Convert.ToSingle(decimalReceiptQuantity);
                     if (notGroupDetail.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt())
                     {
                         notGroupDetail.OrderDetailStatus = OrderDetailStatusEnum.GroupAndInbound.ObjToInt();

--
Gitblit v1.9.3