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