zwxi 8 months ago
parent
commit
2343d9eb12

+ 7 - 3
services/data/chart_info.go

@@ -485,7 +485,9 @@ func getEdbDataMapList(chartInfoId, chartType int, calendar, startDate, endDate
 		var diffSeconds int64
 		if chartType == 2 { //季节性图
 			startDateReal = startDate
-			item.IsAxis = v.IsAxis
+			if len(mappingList) > 1 {
+				item.IsAxis = v.IsAxis
+			}
 		} else {
 			if v.EdbInfoType == 0 && v.LeadUnit != "" && v.LeadValue > 0 { //领先指标
 				var startTimeRealTemp time.Time
@@ -591,7 +593,7 @@ func getEdbDataMapList(chartInfoId, chartType int, calendar, startDate, endDate
 			}
 		}
 
-		if chartType == 2 && v.IsAxis == 1 {
+		if chartType == 2 && item.IsAxis == 1 {
 			latestDate, tmpErr := time.Parse(utils.FormatDate, v.LatestDate)
 			if tmpErr != nil {
 				//item.DataList = dataList
@@ -2956,7 +2958,9 @@ func getEdbConvertDataMapList(chartInfoId, chartType int, calendar, startDate, e
 		var diffSeconds int64
 		if chartType == 2 { //季节性图
 			startDateReal = startDate
-			item.IsAxis = v.IsAxis
+			if len(mappingList) > 1 {
+				item.IsAxis = v.IsAxis
+			}
 		} else {
 			if v.EdbInfoType == 0 && v.LeadUnit != "" && v.LeadValue > 0 { //领先指标
 				var startTimeRealTemp time.Time

+ 4 - 2
services/data/chart_info_excel_balance.go

@@ -837,7 +837,9 @@ func GetBalanceExcelEdbDataMapList(chartInfoId, chartType int, calendar, startDa
 		var diffSeconds int64
 		if chartType == 2 { //季节性图
 			startDateReal = startDate
-			item.IsAxis = v.IsAxis
+			if len(mappingList) > 1 {
+				item.IsAxis = v.IsAxis
+			}
 		} else {
 			if v.EdbInfoType == 0 && v.LeadUnit != "" && v.LeadValue > 0 { //领先指标
 				var startTimeRealTemp time.Time
@@ -940,7 +942,7 @@ func GetBalanceExcelEdbDataMapList(chartInfoId, chartType int, calendar, startDa
 			}
 		}
 
-		if chartType == 2 && v.IsAxis == 1 {
+		if chartType == 2 && item.IsAxis == 1 {
 			latestDate, tmpErr := time.Parse(utils.FormatDate, v.LatestDate)
 			if tmpErr != nil {
 				//item.DataList = dataList

+ 3 - 1
services/data/chart_theme.go

@@ -177,7 +177,9 @@ func getThemePreviewEdbDataMapList(chartType int, calendar, startDate, endDate s
 		var diffSeconds int64
 		if chartType == 2 { //季节性图
 			startDateReal = startDate
-			item.IsAxis = v.IsAxis
+			if len(mappingList) > 1 {
+				item.IsAxis = v.IsAxis
+			}
 		} else {
 			if v.EdbInfoType == 0 && v.LeadUnit != "" && v.LeadValue > 0 { //领先指标
 				var startTimeRealTemp time.Time