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