|
@@ -264,6 +264,7 @@ func BarChartData(edbInfoMapping *models.ChartEdbInfoMapping, futureGoodMappingL
|
|
|
currMonth := findDateTime.Month() // 当前月份
|
|
|
xEdbInfoIdList = append(xEdbInfoIdList, edbInfoMapping.EdbInfoId)
|
|
|
|
|
|
+ // 当前月的后面月份合约的数据
|
|
|
for i := currMonth; i < 12; i++ {
|
|
|
futureGoodMapping := futureGoodMappingList[i] // 当前的期货指标
|
|
|
tmpRealDateTime, tmpFindDataValue, tmpIsFind, tmpErr := GetNeedDateData(findDateTime, edbDataListMap[futureGoodMapping.EdbInfoId], edbDataMap[futureGoodMapping.EdbInfoId])
|
|
@@ -284,6 +285,7 @@ func BarChartData(edbInfoMapping *models.ChartEdbInfoMapping, futureGoodMappingL
|
|
|
xEdbInfoIdList = append(xEdbInfoIdList, futureGoodMapping.EdbInfoId)
|
|
|
}
|
|
|
|
|
|
+ // 当前月的前面月份合约的数据
|
|
|
for i := 1; i < int(currMonth); i++ {
|
|
|
futureGoodMapping := futureGoodMappingList[i-1] // 当前的期货指标
|
|
|
tmpRealDateTime, tmpFindDataValue, tmpIsFind, tmpErr := GetNeedDateData(findDateTime, edbDataListMap[futureGoodMapping.EdbInfoId], edbDataMap[futureGoodMapping.EdbInfoId])
|
|
@@ -327,7 +329,7 @@ func BarChartData(edbInfoMapping *models.ChartEdbInfoMapping, futureGoodMappingL
|
|
|
// 数据处理,将没有数据的下标,赋值平均值
|
|
|
{
|
|
|
hasDataIndexList := make([]int, 0)
|
|
|
- for dataK, edbInfoId := range edbIdList {
|
|
|
+ for dataK, edbInfoId := range xEdbInfoIdList {
|
|
|
if _, ok := noDataIdMap[edbInfoId]; !ok { // 如果是没有数据的指标id
|
|
|
hasDataIndexList = append(hasDataIndexList, dataK)
|
|
|
}
|