|
@@ -19,7 +19,7 @@ type EdbInfoData struct {
|
|
|
Value float64 `description:"数据"`
|
|
|
}
|
|
|
|
|
|
-// BaseCalculate
|
|
|
+// BaseCalculateBySearchData
|
|
|
// @Description: 基础的计算公式
|
|
|
type BaseCalculateBySearchData struct {
|
|
|
DataList []*EdbInfoSearchData
|
|
@@ -582,6 +582,9 @@ func (obj BaseCalculate) Hbz() (dateDataMap map[time.Time]float64, err error, er
|
|
|
}
|
|
|
|
|
|
// 数据处理
|
|
|
+ // 数据降序
|
|
|
+ dataList = reverseSliceByDesc(dataList)
|
|
|
+
|
|
|
var dateArr []time.Time
|
|
|
for _, v := range dataList {
|
|
|
dateArr = append(dateArr, v.DataTime)
|
|
@@ -654,6 +657,9 @@ func (obj BaseCalculate) Hcz() (dateDataMap map[time.Time]float64, err error, er
|
|
|
}
|
|
|
|
|
|
// 数据处理
|
|
|
+ // 数据降序
|
|
|
+ dataList = reverseSliceByDesc(dataList)
|
|
|
+
|
|
|
var dateArr []time.Time
|
|
|
for _, v := range dataList {
|
|
|
dateArr = append(dateArr, v.DataTime)
|