优化
This commit is contained in:
@@ -259,8 +259,13 @@ namespace WMS.Web.Domain.Services
|
|||||||
//入库的时候:不能扫同样的箱
|
//入库的时候:不能扫同样的箱
|
||||||
if (dto.Details != null && dto.Details.Count != 0)
|
if (dto.Details != null && dto.Details.Count != 0)
|
||||||
{
|
{
|
||||||
if (dto.Details.Select(x => x.BoxId).Distinct().Count() != dto.Details.Select(x => x.BoxId).Count())
|
var mIds = dto.Details.GroupBy(g => g.MaterialNumber).Select(s => s.Key).ToList();
|
||||||
return Result<InStock>.ReFailure(ResultCodes.BoxOutStockTaskBoxError);
|
foreach (var m in mIds)
|
||||||
|
{
|
||||||
|
var d_boxIds = dto.Details.Where(w => w.MaterialNumber == m).Select(s => s.BoxId);
|
||||||
|
if (d_boxIds.Distinct().Count() != d_boxIds.Count())
|
||||||
|
return Result<InStock>.ReFailure(ResultCodes.BoxOutStockTaskBoxError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//1.获取来源单
|
//1.获取来源单
|
||||||
|
|||||||
Reference in New Issue
Block a user