From 55142f3214485c7ec12c5e414a56519f66a1eb1d Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 17 十月 2025 19:54:47 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhiHuiQiCe/FangCangZhiNeng

---
 新建文件夹/WIDESEA_WMSServer/ClassLibrary2/InventoryInfoService.cs |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/InventoryInfoService.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/InventoryInfoService.cs"
index baf64b9..4b6696c 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/InventoryInfoService.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/ClassLibrary2/InventoryInfoService.cs"
@@ -21,6 +21,7 @@
         public InventoryInfoService(IRepository<Dt_InventoryInfo> BaseDal) : base(BaseDal)
         {
         }
+        public IRepository<Dt_InventoryInfo> Repository => BaseDal;
 
         /// <summary>
         /// wcs鍥炰紶缁欐垜璋冪敤鎴戠殑鏂规硶
@@ -60,7 +61,7 @@
                         entity = new Dt_InventoryInfo
                         {
                             PalletCode = detail.orderDetails?.FirstOrDefault()?.palletCode ?? "",
-                            WarehouseId = 001,  // 榛樿搴撴埧缂栧彿锛屽彲鏍规嵁涓氬姟鏀�
+                            WarehouseCode = 001.ToString(),  // 榛樿搴撴埧缂栧彿锛屽彲鏍规嵁涓氬姟鏀�
                             LocationCode = "", // 鏆傛棤鍙┖
                             StockStatus = 1,   // 绔嬪簱鍥哄畾涓� 1
                             MaterielCode = detail.productCode ?? detail.productName,
@@ -82,14 +83,14 @@
                     switch (request.orderType)
                     {
                         case "1": // 鍏ュ簱
-                            entity.StockQuantity += (float)orderQty;
+                            entity.StockQuantity += orderQty;
                             entity.InDate = DateTime.Now;
                             entity.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 = "鍑哄簱鍗曞洖浼�";
                             break;
@@ -102,11 +103,11 @@
                                     decimal diff = Convert.ToDecimal(stock.differenceQuantity);
                                     if (stock.IsProfit == "1") // 鐩樼泩
                                     {
-                                        entity.SupplyQuantity += (float)Math.Abs(diff);
+                                        entity.SupplyQuantity += Math.Abs(diff);
                                     }
                                     else // 鐩樹簭
                                     {
-                                        entity.SupplyQuantity -= (float)Math.Abs(diff);
+                                        entity.SupplyQuantity -= Math.Abs(diff);
                                         if (entity.SupplyQuantity < 0) entity.SupplyQuantity = 0;
                                     }
                                     entity.PalletCode = stock.palletCode;

--
Gitblit v1.9.3