新增明细 加判断条件
计数页面修改 散料入新增条件 出库单据接口 修改判断条件
This commit is contained in:
1 parent
4334683c6f
commit
1365920fee
15 files changed
+66
-32
No files matched your search
@@ -167,10 +167,22 @@ namespace HHWMS.Web.Controllers
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在重复的唯一码!");
|
||||
}
|
||||
// 判断唯一码是否已在库内
|
||||
var invList = _unitwork.Find<Inventory>(x => 1 == 1)
|
||||
.Select(x => x.UniqueCode)
|
||||
.ToList();
|
||||
if(invList.Intersect(detailList.Select(x => x.UniqueCode)).Count() > 0)
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在已在库内的唯一码!");
|
||||
}
|
||||
// 补充物料明细
|
||||
foreach(var item in detailList)
|
||||
foreach (var item in detailList)
|
||||
{
|
||||
var materialqr = _unitwork.FindSingle<MaterialQr>(x => x.UniqueCode.Equals(item.UniqueCode));
|
||||
if(materialqr == null)
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在不是WMS生成的唯一码!");
|
||||
}
|
||||
var material = _unitwork.FindSingle<Material>(x => x.QRCode.Equals(materialqr.QRCode));
|
||||
item.MaterialCode = material.MaterialCode;
|
||||
item.MaterialName = material.MaterialName;
|
||||
|
||||
Reference in new issue
Block a user