diff --git a/北京北汽/Controller/SCP_PO_CONTROLLER.cs b/北京北汽/Controller/SCP_PO_CONTROLLER.cs index a6bc9e4..682aedb 100644 --- a/北京北汽/Controller/SCP_PO_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_PO_CONTROLLER.cs @@ -1379,6 +1379,11 @@ namespace CK.SCP.Controller { ErrorList.Add(string.Format("订单编号【{0}】行号【{1}】已经存在,请更换行号!", p_excel.订单编号, p_excel.行号)); } + int partcodeCount = db.TB_PO_DETAIL.Count(p => p.PoBillNum == p_excel.订单编号 && p.PoLine == _polinr && p.PartCode == p_excel.零件号.Trim()); + if (partcodeCount > 0) + { + ErrorList.Add(string.Format("订单编号【{0}】零件号【{1}】行号【{2}】已经存在", p_excel.订单编号, p_excel.零件号, p_excel.行号)); + } var checkcount = db.TB_PRICE.Where(p => p.PartCode == p_excel.零件号.Trim() && p.Site == site && p.SubSite == subsite && p.State != (int)PriceState.Reject && p.VendId == p_excel.供应商编号 && p.StartTime <= DateTime.Now && DateTime.Now <= p.EndTime).ToList(); if (checkcount.Count == 0) {