排序
This commit is contained in:
Binary file not shown.
@@ -244,8 +244,13 @@ namespace WMS.Web.Api.Controllers
|
||||
var materialSubStocks = await _inventoryDetailsRepositories.GetMaterialSubStocks(materialNumbers, stockCodes, orgCodes, loginInfo.UserInfo.CompanyId);
|
||||
res.details.ForEach(x =>
|
||||
{
|
||||
x.MaterialSubStocks = materialSubStocks.Where(t => t.MaterialNumber == x.MaterialNumber && t.StockCode == res.StockCode && t.OrgCode == res.OrgCode).Select(s => s.SubStock).ToList();
|
||||
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();
|
||||
slist.ForEach(f => rList.Add(new GetOutStockTaskByNoSubStockResponse(f)));
|
||||
x.MaterialSubStocks = rList.OrderBy(s => s.SubStock_Do).Select(s => s.SubStock).ToList();
|
||||
x.FistSubStock = rList.OrderBy(s => s.SubStock_Do).First().SubStock_Do;
|
||||
});
|
||||
res.details = res.details.OrderBy(s => s.FistSubStock).ToList();
|
||||
|
||||
return Result<GetOutStockTaskByNoResponse>.ReSuccess(res);
|
||||
}
|
||||
|
||||
@@ -4939,6 +4939,26 @@
|
||||
物料对应的仓位有哪些
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.GetOutStockTaskByNoDetailsResponse.FistSubStock">
|
||||
<summary>
|
||||
所有仓位中排序第一的
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Core.Dto.OutStockTask.GetOutStockTaskByNoSubStockResponse">
|
||||
<summary>
|
||||
处理仓位排序
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.GetOutStockTaskByNoSubStockResponse.SubStock">
|
||||
<summary>
|
||||
仓位编码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.GetOutStockTaskByNoSubStockResponse.SubStock_Do">
|
||||
<summary>
|
||||
仓位编码变种 排序用
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Core.Dto.OutStockTask.GetOutStockTaskNosByNoRequest">
|
||||
<summary>
|
||||
模糊搜索出库任务单
|
||||
|
||||
@@ -61,5 +61,9 @@ namespace WMS.Web.Core.Dto.OutStockTask
|
||||
/// 物料对应的仓位有哪些
|
||||
/// </summary>
|
||||
public List<string> MaterialSubStocks { get; set; } = new List<string>();
|
||||
/// <summary>
|
||||
/// 所有仓位中排序第一的
|
||||
/// </summary>
|
||||
public string FistSubStock { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
using NPOI.OpenXmlFormats.Spreadsheet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WMS.Web.Core.Dto.OutStockTask
|
||||
{
|
||||
/// <summary>
|
||||
/// 处理仓位排序
|
||||
/// </summary>
|
||||
public class GetOutStockTaskByNoSubStockResponse
|
||||
{
|
||||
public GetOutStockTaskByNoSubStockResponse() {
|
||||
}
|
||||
public GetOutStockTaskByNoSubStockResponse(string subStock)
|
||||
{
|
||||
this.SubStock = subStock;
|
||||
this.SubStock_Do = subStock.Replace("-0", "-");
|
||||
}
|
||||
/// <summary>
|
||||
/// 仓位编码
|
||||
/// </summary>
|
||||
public string SubStock { get; set; }
|
||||
/// <summary>
|
||||
/// 仓位编码变种 排序用
|
||||
/// </summary>
|
||||
public string SubStock_Do { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user