修复bug

This commit is contained in:
18942506660
2024-11-21 10:54:43 +08:00
parent 1933ef40da
commit 46f296fcda
2 changed files with 2 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ using Microsoft.Extensions.Options;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Net.Http.Headers;
using System.Threading.Tasks; using System.Threading.Tasks;
using WMS.Web.Core; using WMS.Web.Core;
using WMS.Web.Core.Dto; using WMS.Web.Core.Dto;
@@ -247,6 +248,7 @@ namespace WMS.Web.Api.Controllers
{ {
List<GetOutStockTaskByNoSubStockResponse> rList = new List<GetOutStockTaskByNoSubStockResponse>(); List<GetOutStockTaskByNoSubStockResponse> rList = new List<GetOutStockTaskByNoSubStockResponse>();
var slist = materialSubStocks.Where(t => t.MaterialNumber == x.MaterialNumber && t.StockCode == res.StockCode && t.OrgCode == res.OrgCode).Select(s => s.SubStock).ToList(); var slist = materialSubStocks.Where(t => t.MaterialNumber == x.MaterialNumber && t.StockCode == res.StockCode && t.OrgCode == res.OrgCode).Select(s => s.SubStock).ToList();
slist = slist.Where(w => !string.IsNullOrEmpty(w)).ToList();
slist.ForEach(f => rList.Add(new GetOutStockTaskByNoSubStockResponse(f))); slist.ForEach(f => rList.Add(new GetOutStockTaskByNoSubStockResponse(f)));
x.MaterialSubStocks = rList.OrderBy(s => s.SubStock_Do).Select(s => s.SubStock).ToList(); x.MaterialSubStocks = rList.OrderBy(s => s.SubStock_Do).Select(s => s.SubStock).ToList();
if (rList.Count() > 0) if (rList.Count() > 0)