|
@@ -285,7 +285,7 @@ func refreshAllCalculatePhaseShift(to orm.TxOrmer, edbInfoId, source, subSource,
|
|
|
if moveType != 2 {
|
|
|
periods := dataLen - i + formulaInt - 1
|
|
|
if periods < dataLen {
|
|
|
- newIndex := dataList[i-1]
|
|
|
+ newIndex := dataList[dataLen-periods-1]
|
|
|
resultMap[newIndex.DataTime] = currentIndex.Value
|
|
|
} else {
|
|
|
// 新数据须根据频度补充key
|
|
@@ -301,7 +301,7 @@ func refreshAllCalculatePhaseShift(to orm.TxOrmer, edbInfoId, source, subSource,
|
|
|
// 滞后
|
|
|
periods := dataLen - i - formulaInt
|
|
|
if periods > 0 {
|
|
|
- newIndex := dataList[periods]
|
|
|
+ newIndex := dataList[dataLen-periods]
|
|
|
resultMap[newIndex.DataTime] = currentIndex.Value
|
|
|
} else {
|
|
|
// 新数据须根据频度补充key
|