From f62883e14ed8d59bd78ed8fcab5f9055ebbabe76 Mon Sep 17 00:00:00 2001 From: qian Date: Fri, 19 Jan 2024 15:24:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=EF=BC=8C=E5=90=8C=E4=B8=80=E9=87=87=E8=B4=AD=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E7=9B=B8=E5=90=8C=E8=A1=8C=E5=8F=B7=E9=9B=B6?= =?UTF-8?q?=E4=BB=B6=E7=AD=89=E4=BF=A1=E6=81=AF=E5=8F=AF=E4=BB=A5=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=AF=BC=E5=85=A5=EF=BC=8C=E5=B9=B6=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E3=80=82=E9=9C=80=E8=A6=81=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=EF=BC=8C=E4=B8=8D=E5=85=81=E8=AE=B8=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=AF=BC=E5=85=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 北京北汽/Controller/SCP_PO_CONTROLLER.cs | 5 +++++ 1 file changed, 5 insertions(+) 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) {