|
|
|
|
@ -136,6 +136,18 @@ namespace Khd.Core.Wcs.Wcs
|
|
|
|
|
.Where(t => t.taskType == "5")
|
|
|
|
|
.Where(t => t.auditStatus == "1")
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
//浅库位退库单往前排序,尽量避免移库操作
|
|
|
|
|
if(rawOutStock!= null && rawOutStock.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
var locationOrder = dbContext.WmsBaseLocation
|
|
|
|
|
.Where(t => rawOutStock.Select(x => x.locationCode).Contains(t.locationCode))
|
|
|
|
|
.OrderBy(x => x.locDeep == 2 ? 0 : 99)
|
|
|
|
|
.Select((loc, index) => new { loc.locationCode, Index = index })
|
|
|
|
|
.ToDictionary(item => item.locationCode, item => item.Index);
|
|
|
|
|
|
|
|
|
|
rawOutStock = rawOutStock.OrderBy(x => locationOrder[x.locationCode]).ToList();
|
|
|
|
|
}
|
|
|
|
|
foreach (var item in rawOutStock)
|
|
|
|
|
{
|
|
|
|
|
int taskType = 0;
|
|
|
|
|
@ -166,7 +178,7 @@ namespace Khd.Core.Wcs.Wcs
|
|
|
|
|
var wmsBaseLocation = dbContext.WmsBaseLocation.Where(t => t.locationCode == item.locationCode).FirstOrDefault();
|
|
|
|
|
if (wmsBaseLocation != null)
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(wmsBaseLocation.containerCode) && wmsBaseLocation.locationStatus == "1")
|
|
|
|
|
if (!string.IsNullOrEmpty(wmsBaseLocation.containerCode)) // && wmsBaseLocation.locationStatus == "1"
|
|
|
|
|
{
|
|
|
|
|
// 目标库位处于深库位,判断是否需要移库浅库位
|
|
|
|
|
if (wmsBaseLocation.locDeep == 1)
|
|
|
|
|
|