|
@@ -257,6 +257,10 @@ func refreshAllPredictCalculatePhaseShift(to orm.TxOrmer, edbInfoId, source, sub
|
|
|
}
|
|
|
|
|
|
format := newDate.Format(utils.FormatDate)
|
|
|
+
|
|
|
+ if strings.Contains(currentIndex.DataTime, fromEdbInfo.LatestDate) {
|
|
|
+ latestDateStr = format
|
|
|
+ }
|
|
|
resultMap[format] = currentIndex.Value
|
|
|
}
|
|
|
} else {
|
|
@@ -280,6 +284,10 @@ func refreshAllPredictCalculatePhaseShift(to orm.TxOrmer, edbInfoId, source, sub
|
|
|
}
|
|
|
|
|
|
format := newDate.Format(utils.FormatDate)
|
|
|
+
|
|
|
+ if strings.Contains(currentIndex.DataTime, fromEdbInfo.LatestDate) {
|
|
|
+ latestDateStr = format
|
|
|
+ }
|
|
|
resultMap[format] = currentIndex.Value
|
|
|
}
|
|
|
}
|
|
@@ -301,18 +309,5 @@ func refreshAllPredictCalculatePhaseShift(to orm.TxOrmer, edbInfoId, source, sub
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 查询该指标最新日期
|
|
|
- var latestDate time.Time
|
|
|
-
|
|
|
- queryLastDataSql := "SELECT data_time FROM edb_data_predict_calculate_phase_shift WHERE edb_info_id = ? ORDER BY data_time DESC LIMIT 1"
|
|
|
- err = to.Raw(queryLastDataSql, edbInfoIdStr).QueryRow(&latestDate)
|
|
|
- if err != nil {
|
|
|
- // 处理错误
|
|
|
- fmt.Println("查询错误:", err)
|
|
|
- } else {
|
|
|
- // 将时间格式化为字符串
|
|
|
- latestDateStr = latestDate.Format("2006-01-02 15:04:05") // 根据需要格式化
|
|
|
- fmt.Println("最新的 data_time:", latestDateStr)
|
|
|
- }
|
|
|
return
|
|
|
}
|