using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEA_Common.StockEnum; using WIDESEA_Core; using WIDESEA_Core.BaseServices; using WIDESEA_Core.Enums; using WIDESEA_Core.Helper; using WIDESEA_IOutboundRepository; using WIDESEA_IStockService; using WIDESEA_Model.Models; namespace WIDESEA_IOutboundService { public partial class OutStockLockInfoService : ServiceBase, IOutStockLockInfoService { IStockService _stockService; public WebResponseContent MaterialPick(string palletCode) { try { Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(palletCode); if (stockInfo == null) { return WebResponseContent.Instance.Error($"未找到该托盘库存信息"); } List outStockLockInfos = Repository.QueryData(x => x.PalletCode == palletCode); for (int i = 0; i < outStockLockInfos.Count; i++) { float assignQuantity = outStockLockInfos[i].AssignQuantity; List stockInfoDetails = stockInfo.Details.Where(x => x.MaterielCode == outStockLockInfos[i].MaterielCode).ToList(); for (int j = 0; j < stockInfoDetails.Count; j++) { // if(assignQuantity > stockInfoDetails[j]) } } return WebResponseContent.Instance.OK(); } catch (Exception ex) { return WebResponseContent.Instance.Error(ex.Message); } } } }