소스 검색

fix:钢联化工文案调整为上海钢联

Roc 6 달 전
부모
커밋
e5829cdaf0
1개의 변경된 파일0개의 추가작업 그리고 69개의 파일을 삭제
  1. 0 69
      models/data_manage/chart_info.go

+ 0 - 69
models/data_manage/chart_info.go

@@ -2757,72 +2757,3 @@ type MaxMinLimitsData struct {
 	MaxValue      float64 `description:"最大值"`
 	MinValue      float64 `description:"最小值"`
 }
-
-func getThsHfEdbDataListByMongo(source, subSource, edbInfoId int, startDate, endDate string) (list []*EdbDataList, err error) {
-	list = make([]*EdbDataList, 0)
-
-	mogDataObj := mgo.EdbDataThsHf{}
-	// 构建查询条件
-	queryConditions := bson.M{
-		"edb_info_id": edbInfoId,
-	}
-
-	// 数据日期
-	dateCondition, err := mgo.BuildDateCondition(startDate, endDate)
-	if err != nil {
-		return
-	}
-	if len(dateCondition) > 0 {
-		queryConditions["data_time"] = dateCondition
-	}
-
-	// 获取列表数据
-	tmpDataList, tmpErr := mogDataObj.GetAllDataList(queryConditions, []string{"data_time"})
-	if tmpErr != nil {
-		err = tmpErr
-		return
-	}
-	for k, v := range tmpDataList {
-		list = append(list, &EdbDataList{
-			EdbDataId:     k + 1,
-			EdbInfoId:     v.EdbInfoId,
-			DataTime:      v.DataTime.Format(utils.FormatDate),
-			DataTimestamp: v.DataTimestamp,
-			Value:         v.Value,
-		})
-	}
-	return
-}
-
-func getThsHfEdbDataListMinAndMaxByMongo(source, subSource, edbInfoId int, startDate, endDate string) (minData, maxData float64, err error) {
-	mogDataObj := mgo.EdbDataThsHf{}
-	// 构建查询条件
-	queryConditions := bson.M{
-		"edb_info_id": edbInfoId,
-	}
-	// 日期
-	dateCondition, err := mgo.BuildDateCondition(startDate, endDate)
-	if err != nil {
-		return
-	}
-	if len(dateCondition) > 0 {
-		queryConditions["data_time"] = dateCondition
-	}
-
-	pipeline := []bson.M{
-		{"$match": queryConditions},
-		{"$group": bson.M{
-			"_id":       nil,
-			"min_value": bson.M{"$min": "$value"},
-			"max_value": bson.M{"$max": "$value"},
-		}},
-		{"$project": bson.M{"_id": 0}}, // 可选,如果不需要_id字段
-	}
-	result, err := mogDataObj.GetEdbInfoMaxAndMinInfo(pipeline)
-	if err != nil {
-		return
-	}
-	minData = result.MinValue
-	maxData = result.MaxValue
-	return
-}