From 18038d4b60340399d2732a5fe9fc84d9364d0e1c Mon Sep 17 00:00:00 2001 From: Kai Date: Mon, 13 Sep 2021 16:42:13 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E6=94=B9=20=E6=9F=A5=E8=A9=A2?= =?UTF-8?q?=E5=A0=B1=E8=A1=A8sql=E5=AD=97=E4=B8=B2=E9=99=90=E5=88=B6=20par?= =?UTF-8?q?t2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repository/Implement/StationReportRepository.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SolarPower/Repository/Implement/StationReportRepository.cs b/SolarPower/Repository/Implement/StationReportRepository.cs index e76dfe8..fce8a27 100644 --- a/SolarPower/Repository/Implement/StationReportRepository.cs +++ b/SolarPower/Repository/Implement/StationReportRepository.cs @@ -54,7 +54,7 @@ namespace SolarPower.Repository.Implement switch(post.FormType) { case 0: - sql = @$" + sql += @$" SET @sql = NULL; SELECT GROUP_CONCAT(DISTINCT @@ -100,7 +100,7 @@ namespace SolarPower.Repository.Implement case 1: if(post.SearchType == 2) { - sql = @$" + sql += @$" SET @sql = NULL; SELECT GROUP_CONCAT(DISTINCT @@ -148,7 +148,7 @@ namespace SolarPower.Repository.Implement { var times = post.Time.Replace('-', 'a').Replace('/', '-').Replace(" ", "").Split('a'); - sql = @$"SET @sql = NULL; + sql += @$"SET @sql = NULL; SELECT GROUP_CONCAT(DISTINCT CONCAT('max(case when INVERTERID = ''', INVERTERID, ''' then round(a.KWH, 2) end) ''inv_', right(INVERTERID, 2), '''') @@ -196,7 +196,7 @@ namespace SolarPower.Repository.Implement break; case 3: - sql = @$" + sql += @$" SET @sql = NULL; SELECT GROUP_CONCAT(DISTINCT