From c21961b8fa4e989ea67372b3a3488f1c591934ac Mon Sep 17 00:00:00 2001 From: shanji <18996038927@163.com> Date: Thu, 15 Feb 2024 22:10:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=95=86=E7=BB=8F=E8=90=A5?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=88=AC=E8=99=AB=E7=BB=86=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWYB.PurchaserCapture/MainWindow.xaml.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/BBWYB.PurchaserCapture/MainWindow.xaml.cs b/BBWYB.PurchaserCapture/MainWindow.xaml.cs index b3fea3d..17752e2 100644 --- a/BBWYB.PurchaserCapture/MainWindow.xaml.cs +++ b/BBWYB.PurchaserCapture/MainWindow.xaml.cs @@ -134,7 +134,7 @@ namespace BBWYB.PurchaserCapture var sk = "order"; //var sk = "consign"; - var pspList = fsql.Select() + var select = fsql.Select() .InnerJoin((opi, p) => opi.PurchaserId == p.Id) .Where((opi, p) => string.IsNullOrEmpty(p.ManagmentModeText)) .GroupBy((opi, p) => new { p.Id, p.MemberId }) @@ -146,8 +146,9 @@ namespace BBWYB.PurchaserCapture }) .From() .InnerJoin((opi1, ops) => opi1.MaxPoId == ops.PurchaseOrderId) - .GroupBy((opi1, ops) => new { opi1.PurchaserId, opi1.MemberId, opi1.MaxPoId, ops.PurchaseProductId }) - .ToList(g => new { g.Key.PurchaserId, g.Key.MemberId, g.Key.MaxPoId, g.Key.PurchaseProductId }); + .GroupBy((opi1, ops) => new { opi1.PurchaserId, opi1.MemberId, opi1.MaxPoId, ops.PurchaseProductId }); + var sql = select.ToSql(g => new { g.Key.PurchaserId, g.Key.MemberId, g.Key.MaxPoId, g.Key.PurchaseProductId }); + var pspList = select.ToList(g => new { g.Key.PurchaserId, g.Key.MemberId, g.Key.MaxPoId, g.Key.PurchaseProductId });