盘料 散料收货扫完码自动滚动
批量新增明细,报错信息修改 散料扫完站台码,显示所有已绑定物料
This commit is contained in:
1 parent
8b4c33283c
commit
faa3f5a9d3
6 files changed
+64
-19
No files matched your search
@@ -168,18 +168,31 @@ namespace HHWMS.Web.Controllers
|
||||
}
|
||||
}
|
||||
var uniqueGroup = detailList.GroupBy(x => x.UniqueCode);
|
||||
|
||||
if (uniqueGroup.Any(x => x.Count() > 1))
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在重复的唯一码!");
|
||||
var codeList = uniqueGroup.Where(x => x.Count() > 1)
|
||||
.Select(x => x.Key)
|
||||
.ToList();
|
||||
return FFResult().Alert($"新增明细中,存在重复的唯一码!{String.Join(", ", codeList.ToArray())}");
|
||||
}
|
||||
|
||||
// 判断唯一码是否已在库内
|
||||
var reDetailList = _unitwork.Find<ReceiptDetail>(x => x.Status == ReceiptStatusEnum.新建)
|
||||
.Select(x => x.UniqueCode)
|
||||
.Select(x => new { x.UniqueCode, x.ReceiptHeader.Code })
|
||||
.ToList();
|
||||
if (reDetailList.Intersect(detailList.Select(x => x.UniqueCode)).Count() > 0)
|
||||
var reDel = reDetailList.Select(x => x.UniqueCode)
|
||||
.Intersect(detailList.Select(x => x.UniqueCode));
|
||||
if (reDel.Count() > 0)
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在已添加的唯一码!");
|
||||
var tt= reDetailList.Where(x => reDel.Contains(x.UniqueCode))
|
||||
.ToList();
|
||||
var returnStr = "";
|
||||
foreach (var item in tt)
|
||||
{
|
||||
returnStr += $"单号:{item.Code};唯一码:{item.UniqueCode};";
|
||||
}
|
||||
return FFResult().Alert($"新增明细中,存在已添加的唯一码!{returnStr}");
|
||||
}
|
||||
|
||||
// 判断唯一码是否已在库内
|
||||
|
||||
Reference in new issue
Block a user