From d6b3b4a6b0039adb4cbab1dd8b5a947cd5781df9 Mon Sep 17 00:00:00 2001 From: "hao.jin" Date: Thu, 11 Aug 2022 13:48:12 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=B8=8D=E5=90=8C=E6=97=B6=E9=97=B4=E7=9A=84?= =?UTF-8?q?LAB=E9=9C=80=E6=B1=82=EF=BC=8C=E5=9C=A8=E7=94=9F=E6=88=90VDA?= =?UTF-8?q?=E6=97=B6=E8=BF=9B=E8=A1=8C=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs index a1a39d2..9ab4867 100644 --- a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs +++ b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs @@ -231,7 +231,18 @@ namespace Stone.WinModule.Standard if (ids.Length > 0) ids = ids.Substring(0, ids.Length - 1); Entity_v_JIS_Lab_List v_JIS_Lab = new Entity_v_JIS_Lab_List(); - DataTable dtData = v_JIS_Lab.GetData("*, quantity as quantity_new", $"[ID] in({ids})", "[PartNumber] asc").Tables[0]; + //DataTable dtData = v_JIS_Lab.GetData("*, quantity as quantity_new", $"[ID] in({ids})", "[PartNumber] asc").Tables[0]; + + var strsql = "select IsStandard,fileType,partNumber,sum(quantity) as quantity,sum(quantity) as quantity_new,sum(quantity_transit) as quantity_transit,PackNumer," + + "Location,OrderNumber,LocationCode,releaseId" + + " from v_JIS_Lab_List" + + " where 1 =1 " + + " and ID in (" + ids + ")" + + " group by IsStandard,fileType, partNumber, PackNumer,Location, OrderNumber, LocationCode, releaseId"; + var db = new LocalDBService(); + DataTable dtData = db.Exec_DataSet(strsql).Tables[0]; + + if (dtData.Rows.Count == 0) throw new Exception("记录不存在");