From c30ac3ad95328c1a34661ecde471e4215df9dab3 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 17 十月 2025 19:54:03 +0800
Subject: [PATCH] 添加盘点功能、添加立方智能库补货功能(入库平库调拨出库,立库调拨入库)

---
 新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs"
index ee48bc6..6f83567 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/InventoryServices.cs"
@@ -206,7 +206,7 @@
                         entity = new Dt_InventoryInfo
                         {
                             PalletCode = detail.orderDetails?.FirstOrDefault()?.palletCode ?? "",
-                            WarehouseId = 1,  // 榛樿搴撴埧缂栧彿
+                            WarehouseCode = 1.ToString(),  // 榛樿搴撴埧缂栧彿
                             LocationCode = "",
                             StockStatus = 1,   // 绔嬪簱鍥哄畾涓� 1
                             MaterielCode = detail.productCode ?? detail.productName,
@@ -250,22 +250,22 @@
                     switch (request.orderType)
                     {
                         case "1": // 鍏ュ簱
-                            entity.StockQuantity += (float)orderQty;
+                            entity.StockQuantity += orderQty;
                             entity.InDate = DateTime.Now;
                             entity.Remark = "鍏ュ簱鍗曞洖浼�";
 
-                            batch.StockQuantity += (float)orderQty;
+                            batch.StockQuantity += orderQty;
                             batch.Remark = "鍏ュ簱鍗曞洖浼�";
                             break;
 
                         case "2": // 鍑哄簱
-                            entity.OutboundQuantity += (float)orderQty;
-                            entity.StockQuantity -= (float)orderQty;
+                            entity.OutboundQuantity += orderQty;
+                            entity.StockQuantity -= orderQty;
                             if (entity.StockQuantity < 0) entity.StockQuantity = 0;
                             entity.Remark = "鍑哄簱鍗曞洖浼�";
 
-                            batch.OutboundQuantity += (float)orderQty;
-                            batch.StockQuantity -= (float)orderQty;
+                            batch.OutboundQuantity += orderQty;
+                            batch.StockQuantity -= orderQty;
                             if (batch.StockQuantity < 0) batch.StockQuantity = 0;
                             batch.Remark = "鍑哄簱鍗曞洖浼�";
                             break;
@@ -278,13 +278,13 @@
                                     decimal diff = Convert.ToDecimal(stock.differenceQuantity);
                                     if (stock.IsProfit == "1") // 鐩樼泩
                                     {
-                                        entity.SupplyQuantity += (float)Math.Abs(diff);
-                                        batch.SupplyQuantity += (float)Math.Abs(diff);
+                                        entity.SupplyQuantity += Math.Abs(diff);
+                                        batch.SupplyQuantity += Math.Abs(diff);
                                     }
                                     else // 鐩樹簭
                                     {
-                                        entity.SupplyQuantity -= (float)Math.Abs(diff);
-                                        batch.SupplyQuantity -= (float)Math.Abs(diff);
+                                        entity.SupplyQuantity -= Math.Abs(diff);
+                                        batch.SupplyQuantity -= Math.Abs(diff);
                                         if (entity.SupplyQuantity < 0) entity.SupplyQuantity = 0;
                                         if (batch.SupplyQuantity < 0) batch.SupplyQuantity = 0;
                                     }

--
Gitblit v1.9.3