Browse Source

Merge branch 'hotfix/edb_calculate_cjjx' into debug

xyxie 1 year ago
parent
commit
7653a7bd53
2 changed files with 0 additions and 10 deletions
  1. 0 6
      models/base_calculate.go
  2. 0 4
      models/edb_data_calculate_cjjx.go

+ 0 - 6
models/base_calculate.go

@@ -7,7 +7,6 @@ import (
 	"github.com/shopspring/decimal"
 	"sort"
 	"strconv"
-	"strings"
 	"time"
 )
 
@@ -1066,11 +1065,6 @@ func (obj BaseCalculate) Cjjx() (dateDataMap map[time.Time]float64, err error, e
 
 	// 数据计算
 	for _, currentDate := range dateArr {
-		// 如果遇到闰二月,如2.29,去掉该天数据
-		if strings.Contains(currentDate.Format(utils.FormatDate), "02-29") {
-			continue
-		}
-
 		//农历的超季节性运算,只计算11月--次年5月,分段计算,与数据区间和N数值有关
 		if calendar == "农历" && currentDate.Month() > 5 && currentDate.Month() < 11 {
 			continue

+ 0 - 4
models/edb_data_calculate_cjjx.go

@@ -291,10 +291,6 @@ func refreshAllCalculateCjjx(to orm.TxOrmer, edbInfoId, source, subSource int, f
 		lastDataDay, _ = time.ParseInLocation(utils.FormatDate, dataList[0].DataTime, time.Local)
 	}
 	for _, av := range dateArr {
-		// 如果遇到闰二月,如2.29,去掉该天数据
-		if strings.Contains(av, "02-29") {
-			continue
-		}
 		currentDate, tmpErr := time.ParseInLocation(utils.FormatDate, av, time.Local)
 		if tmpErr != nil {
 			err = tmpErr