|
@@ -293,7 +293,13 @@ func refreshAllCalculatePhaseShift(to orm.TxOrmer, edbInfoId, source, subSource,
|
|
|
|
|
|
shiftDay := CalculateIntervalDays(moveFrequency, formulaInt, currentDate, resultMap, moveType)
|
|
|
|
|
|
- newDate := currentDate.AddDate(0, 0, shiftDay)
|
|
|
+ var newDate time.Time
|
|
|
+ if moveFrequency == "年" {
|
|
|
+ newDate = currentDate.AddDate(formulaInt, 0, 0)
|
|
|
+ } else {
|
|
|
+ newDate = currentDate.AddDate(0, 0, shiftDay)
|
|
|
+ }
|
|
|
+
|
|
|
format := newDate.Format(utils.FormatDate)
|
|
|
resultMap[format] = currentIndex.Value
|
|
|
}
|
|
@@ -309,7 +315,13 @@ func refreshAllCalculatePhaseShift(to orm.TxOrmer, edbInfoId, source, subSource,
|
|
|
|
|
|
shiftDay := CalculateIntervalDays(moveFrequency, formulaInt, currentDate, resultMap, moveType)
|
|
|
|
|
|
- newDate := currentDate.AddDate(0, 0, -shiftDay)
|
|
|
+ var newDate time.Time
|
|
|
+ if moveFrequency == "年" {
|
|
|
+ newDate = currentDate.AddDate(formulaInt, 0, 0)
|
|
|
+ } else {
|
|
|
+ newDate = currentDate.AddDate(0, 0, -shiftDay)
|
|
|
+ }
|
|
|
+
|
|
|
format := newDate.Format(utils.FormatDate)
|
|
|
resultMap[format] = currentIndex.Value
|
|
|
}
|