Merge branch 'master' of http://36.153.118.214:10080/nx.wms/u8-import
This commit is contained in:
@@ -23,11 +23,18 @@ namespace NX.ERP.U8.MES
|
|||||||
}
|
}
|
||||||
foreach (var detail in info.OrderDetails)
|
foreach (var detail in info.OrderDetails)
|
||||||
{
|
{
|
||||||
var momOrderDetail = momOrder.ProductDtlLst.First(m => { return m.ProductOrderDtlId == detail.SourceDetailId; });
|
//校验明细行合法性
|
||||||
|
var momOrderDetail = momOrder.ProductDtlLst.FirstOrDefault(m => { return m.ProductOrderDtlId == detail.SourceDetailId; });
|
||||||
if (momOrderDetail == null || momOrderDetail.ProductOrderDtlId <= 0)
|
if (momOrderDetail == null || momOrderDetail.ProductOrderDtlId <= 0)
|
||||||
{
|
{
|
||||||
throw new Exception($"非法的生产明细[{detail.SourceDetailId}]");
|
throw new Exception($"非法的生产明细[{detail.SourceDetailId}]");
|
||||||
}
|
}
|
||||||
|
//校验SN合法性
|
||||||
|
var lstExcept = detail.SnList.Except(momOrderDetail.SN).ToList();
|
||||||
|
if (lstExcept.Count > 0)
|
||||||
|
{
|
||||||
|
throw new Exception($"包含非法的序列号[{string.Join(",", lstExcept.ToArray())}]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user