|
@@ -660,14 +660,14 @@ func SaveResidualAnalysis(req residual_analysis_model.ResidualAnalysisIndexSaveR
|
|
}
|
|
}
|
|
|
|
|
|
// 如果当前时间更晚
|
|
// 如果当前时间更晚
|
|
- if currentTime.After(latestTime) {
|
|
|
|
|
|
+ if !currentTime.Before(latestTime) {
|
|
latestTime = currentTime
|
|
latestTime = currentTime
|
|
indexLatestDate = data.DataTime
|
|
indexLatestDate = data.DataTime
|
|
indexLatestValue = data.Value
|
|
indexLatestValue = data.Value
|
|
}
|
|
}
|
|
|
|
|
|
// 取最小时间
|
|
// 取最小时间
|
|
- if currentTime.Before(firstTime) {
|
|
|
|
|
|
+ if !currentTime.After(firstTime) {
|
|
firstTime = currentTime
|
|
firstTime = currentTime
|
|
startDate = data.DataTime
|
|
startDate = data.DataTime
|
|
}
|
|
}
|