From f94bdcc50649d7af5acdd437fba0302d5ef42f50 Mon Sep 17 00:00:00 2001 From: yanghongwei Date: Sat, 16 Aug 2025 15:34:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/AlarmService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Service/AlarmService.cs b/Service/AlarmService.cs index 9e0a01d..82106b6 100644 --- a/Service/AlarmService.cs +++ b/Service/AlarmService.cs @@ -396,10 +396,10 @@ namespace LY.App.Service GROUP BY batch_id ORDER BY batch_id desc LIMIT {1},{2} ) AS CountTable "; - string tablesql = string.Join(" UNION ALL ", tables.Select(item => $"SELECT batch_id FROM {item.TableName} Group By batch_id ")); + string tablesql = string.Join(" UNION ALL ", tables.Select(item => $"SELECT batch_id FROM {item.TableName} GROUP BY batch_id ")); if (!string.IsNullOrEmpty(input.sn)) { - tablesql = string.Join(" UNION ALL ", tables.Select(item => $"SELECT batch_id FROM {item.TableName} where serial_number like '%{input.sn}%' Group By batch_id")); + tablesql = string.Join(" UNION ALL ", tables.Select(item => $"SELECT batch_id FROM {item.TableName} where serial_number like '%{input.sn}%' GROUP BY batch_id")); } var pageitem = await _db.Ado.SqlQueryAsync(string.Format(coutsql, tablesql) + string.Format(page, tablesql, (input.pageNum - 1) * input.pageSize, input.pageSize));