|
@@ -191,7 +191,6 @@ func refreshAllPredictCalculateTimeShift(to orm.TxOrmer, edbInfoId, source, form
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
|
- latestDateStr = fromEdbInfo.LatestDate
|
|
|
var shiftDay int
|
|
|
switch moveFrequency {
|
|
|
case "天":
|
|
@@ -211,6 +210,8 @@ func refreshAllPredictCalculateTimeShift(to orm.TxOrmer, edbInfoId, source, form
|
|
|
if moveType == 2 {
|
|
|
shiftDay = -shiftDay
|
|
|
}
|
|
|
+ latestDate, _ := time.Parse(utils.FormatDate, fromEdbInfo.LatestDate)
|
|
|
+ latestDateStr = latestDate.AddDate(0, 0, shiftDay).Format(utils.FormatDate)
|
|
|
|
|
|
var dateArr []string
|
|
|
dataMap := make(map[string]*EdbInfoSearchData)
|
|
@@ -218,6 +219,7 @@ func refreshAllPredictCalculateTimeShift(to orm.TxOrmer, edbInfoId, source, form
|
|
|
dateArr = append(dateArr, v.DataTime)
|
|
|
dataMap[v.DataTime] = v
|
|
|
}
|
|
|
+
|
|
|
fmt.Println("source:", source)
|
|
|
//获取指标所有数据
|
|
|
existDataList := make([]*EdbData, 0)
|
|
@@ -250,7 +252,7 @@ func refreshAllPredictCalculateTimeShift(to orm.TxOrmer, edbInfoId, source, form
|
|
|
timestamp := newDate.UnixNano() / 1e6
|
|
|
timestampStr := fmt.Sprintf("%d", timestamp)
|
|
|
valStr := decimal.NewFromFloat(currentItem.Value).RoundCeil(4).String()
|
|
|
- if fromEdbInfo.LatestDate == newDate.Format(utils.FormatDate) {
|
|
|
+ if latestDateStr == newDate.Format(utils.FormatDate) {
|
|
|
latestValue = currentItem.Value
|
|
|
}
|
|
|
if existVal, ok := existDataMap[newDate.Format(utils.FormatDate)]; !ok {
|