Browse Source

feat: 商品价格曲线、利润曲线期货指标往前取数规则

Roc 1 year ago
parent
commit
a65474663d
1 changed files with 1 additions and 5 deletions
  1. 1 5
      logic/profit_chart_info.go

+ 1 - 5
logic/profit_chart_info.go

@@ -472,14 +472,10 @@ func ProfitChartChartData(baseDataList []*models.EdbDataList, futureGoodEdbInfoM
 
 			calculateMap := make(map[int]float64)
 			for _, childFutureGoodEdbInfoId := range childFutureGoodEdbInfoIdList {
-				tmpRealDateTime := findDateTime
-				tmpFindDataValue, tmpIsFind := edbDataMap[childFutureGoodEdbInfoId][findDateTime.Format(utils.FormatDate)]
+				tmpFindDataValue, tmpIsFind := edbDataMap[childFutureGoodEdbInfoId][realDateTime.Format(utils.FormatDate)]
 
 				if tmpIsFind && tmpFindDataValue != 0 {
 					calculateMap[childFutureGoodEdbInfoId] = tmpFindDataValue
-					if maxDate.IsZero() || maxDate.Before(tmpRealDateTime) {
-						maxDate = tmpRealDateTime
-					}
 				}
 			}
 			// 合约的数据不全,不参与计算