1
dengjunjie
2025-01-10 96e6dc957aee5d20218ac8127a28db6a7e6ba6de
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -1,4 +1,5 @@
using AutoMapper;
using MailKit.Search;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using SqlSugar;
using System;
@@ -70,7 +71,29 @@
            }
        }
        public WebResponseContent StockQueryData(SaveModel saveModel)
        {
            try
            {
                var barcode = saveModel.MainData["barcode"].ToString();
                var warehouseId = saveModel.MainData["warehouseId"].ObjToInt();
                Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == barcode && x.WarehouseId == warehouseId).Includes(x => x.Details).First();
                if (stockInfo == null) throw new Exception("未找到托盘信息");
                return WebResponseContent.Instance.OK(data: stockInfo);
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="stockInfos"></param>
        /// <param name="materielCode"></param>
        /// <param name="needQuantity"></param>
        /// <param name="residueQuantity"></param>
        /// <returns></returns>
        public List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity)
        {
            List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>();