1. 修改 查詢報表sql字串限制 part2

This commit is contained in:
Kai 2021-09-13 16:42:13 +08:00
parent 3f00ebf4a5
commit 18038d4b60

View File

@ -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