|
@@ -158,7 +158,7 @@ func GetChartEdbData(chartInfoId int, startDate, endDate string, baseEdbInfoMapp
|
|
|
EdbName: v.FutureGoodEdbName,
|
|
|
EdbAliasName: v.FutureGoodEdbName,
|
|
|
EdbNameEn: v.FutureGoodEdbNameEn,
|
|
|
- EdbType: baseEdbInfoMapping.EdbType,
|
|
|
+ EdbType: baseEdbInfoMapping.EdbType,
|
|
|
Frequency: baseEdbInfoMapping.Frequency,
|
|
|
FrequencyEn: baseEdbInfoMapping.FrequencyEn,
|
|
|
Unit: baseEdbInfoMapping.Unit,
|
|
@@ -357,8 +357,10 @@ func GetChartEdbData(chartInfoId int, startDate, endDate string, baseEdbInfoMapp
|
|
|
}
|
|
|
|
|
|
|
|
|
+ baseEdbIds := make([]int, 0)
|
|
|
for _, tmp := range edbInfoMappingList {
|
|
|
edbInfoIdList = append(edbInfoIdList, tmp.EdbInfoId)
|
|
|
+ baseEdbIds = append(baseEdbIds, tmp.EdbInfoId)
|
|
|
tmpVal, ok := yDataMap[tmp.EdbInfoId]
|
|
|
valueList = append(valueList, tmpVal)
|
|
|
if !ok || tmpVal == 0 {
|
|
@@ -386,8 +388,8 @@ func GetChartEdbData(chartInfoId int, startDate, endDate string, baseEdbInfoMapp
|
|
|
|
|
|
for i := lenEdbId - 1; i >= 0; i-- {
|
|
|
|
|
|
- if _, ok := noDataEdbIdMap[edbInfoIdList[i]]; !ok {
|
|
|
-
|
|
|
+ if _, ok := noDataEdbIdMap[edbInfoIdList[i]]; !ok && !utils.InArrayByInt(baseEdbIds, edbInfoIdList[i]) {
|
|
|
+
|
|
|
if maxIndex < i-1 {
|
|
|
maxIndex = i - 1
|
|
|
}
|
|
@@ -679,7 +681,6 @@ func handleResultData(regionType string, futureGoodEdbType, baseEdbLen int, yDat
|
|
|
if i > maxIndex {
|
|
|
break
|
|
|
}
|
|
|
-
|
|
|
xDataList = append(xDataList, data_manage.XData{
|
|
|
Name: fmt.Sprint("M+", i),
|
|
|
NameEn: fmt.Sprint("M+", i),
|