Browse Source

采购订单导入,同一采购订单,相同行号零件等信息可以重复导入,并同时导入。需要增加校验,不允许重复导入。

master
qian 10 months ago
parent
commit
f62883e14e
  1. 5
      北京北汽/Controller/SCP_PO_CONTROLLER.cs

5
北京北汽/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)
{

Loading…
Cancel
Save