From 528badf2f1efe5355975de7942fb7a26e71a8e18 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期六, 01 十一月 2025 18:34:37 +0800
Subject: [PATCH] 优化盘点流程、出入库退货流程
---
新建文件夹/WIDESEA_WMSServer/ClassLibrary2/InventoryInfoService.cs | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 53 insertions(+), 1 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 dc66a17..4b06b24 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"
@@ -6,6 +6,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
@@ -24,6 +25,57 @@
}
public IRepository<Dt_InventoryInfo> Repository => BaseDal;
-
+
+ /// <summary>
+ /// 鑾峰彇搴撳瓨
+ /// </summary>
+ /// <returns></returns>
+ public WebResponseContent GetInventory()
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ List<object> lists = new List<object>();
+ #region 鍐峰喕搴�
+ string WareCodeLD = WarehouseEnum.鍐峰喕搴�.ObjToInt().ToString("000");
+ List<Dt_InventoryInfo> inventoryInfosLD = BaseDal.QueryData(x => x.WarehouseCode == WareCodeLD);
+ object LDQty = new
+ {
+ name = WarehouseEnum.鍐峰喕搴�.ObjToString(),
+ count = inventoryInfosLD.Sum(x => x.StockQuantity).ObjToInt()
+ };
+ lists.Add(LDQty);
+ #endregion
+ #region 楹荤簿搴�
+ string WareCodeMJ = WarehouseEnum.楹荤簿搴�.ObjToInt().ToString("000");
+ List<Dt_InventoryInfo> inventoryInfosMJ = BaseDal.QueryData(x => x.WarehouseCode == WareCodeMJ);
+ object MJQty = new
+ {
+ name = WarehouseEnum.楹荤簿搴�.ObjToString(),
+ count = inventoryInfosMJ.Sum(x => x.StockQuantity).ObjToInt()
+ };
+ lists.Add(MJQty);
+ #endregion
+ #region 澶т欢搴�
+ string WareCodeDJ = WarehouseEnum.澶т欢搴�.ObjToInt().ToString("000");
+ List<Dt_InventoryInfo> inventoryInfosDJ = BaseDal.QueryData(x => x.WarehouseCode == WareCodeDJ);
+ object DJQty = new
+ {
+ name = WarehouseEnum.澶т欢搴�.ObjToString(),
+ count = inventoryInfosDJ.Sum(x => x.StockQuantity).ObjToInt()
+ };
+ lists.Add(DJQty);
+ #endregion
+ content.OK(data: lists);
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+
+
+
}
}
--
Gitblit v1.9.3