소스 검색

Merge branch 'ETA_2.0.5' into debug

# Conflicts:
#	models/db.go
#	utils/constants.go
zwxi 1 개월 전
부모
커밋
5aa69b90f5
6개의 변경된 파일278개의 추가작업 그리고 265개의 파일을 삭제
  1. 37 5
      controllers/base_from_hisugar.go
  2. 17 19
      models/base_from_hisugar.go
  3. 2 0
      models/db.go
  4. 9 0
      routers/commentsRouter.go
  5. 154 182
      services/base_from_hisugar.go
  6. 59 59
      utils/constants.go

+ 37 - 5
controllers/base_from_hisugar.go

@@ -4,6 +4,7 @@ import (
 	"encoding/json"
 	"eta/eta_index_lib/logic"
 	"eta/eta_index_lib/models"
+	"eta/eta_index_lib/services"
 	"eta/eta_index_lib/utils"
 	"strconv"
 	"time"
@@ -46,14 +47,14 @@ func (this *HisugarController) Add() {
 	cacheKey = utils.CACHE_EDB_DATA_ADD + strconv.Itoa(source) + "_" + req.EdbCode
 	if !utils.Rc.IsExist(cacheKey) {
 		utils.Rc.SetNX(cacheKey, 1, 1*time.Minute)
-		err = models.AddEdbDataFromOilchem(req.EdbCode)
+		err = models.AddEdbDataFromHisugar(req.EdbCode)
 		if err != nil {
 			br.Msg = "获取指标信息失败!"
-			br.ErrMsg = "获取指标信息失败 AddEdbDataFromCoal,Err:" + err.Error()
+			br.ErrMsg = "获取指标信息失败 AddEdbDataFromHisugar,Err:" + err.Error()
 			return
 		}
 		br.Ret = 200
-		br.Success = true
+		br.Success =  true
 		br.Msg = "获取成功"
 	} else {
 		br.Ret = 501
@@ -111,10 +112,10 @@ func (this *HisugarController) Refresh() {
 		return
 	}
 
-	err = models.RefreshEdbDataFromOilchem(req.EdbInfoId, req.EdbCode, req.StartDate)
+	err = models.RefreshEdbDataFromHisugar(req.EdbInfoId, req.EdbCode, req.StartDate)
 	if err != nil && err.Error() != utils.ErrNoRow() {
 		br.Msg = "刷新指标信息失败!"
-		br.ErrMsg = "刷新指标信息失败 RefreshEdbDataFromCoal,Err:" + err.Error()
+		br.ErrMsg = "刷新指标信息失败 RefreshEdbDataFromHisugar,Err:" + err.Error()
 		return
 	}
 	// 更新指标最大最小值
@@ -133,4 +134,35 @@ func (this *HisugarController) Refresh() {
 	br.Msg = "获取成功"
 }
 
+// HandleEdbData
+// @Title 处理泛糖科技指标的接口
+// @Description 处理泛糖科技指标的接口
+// @Success 200 string "操作成功"
+// @router /handle/edb_data [post]
+func (this *HisugarController) HandleEdbData() {
+	br := new(models.BaseResponse).Init()
+	defer func() {
+		if br.ErrMsg == "" {
+			br.IsSendEmail = false
+		}
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+	var req models.HandleHisugarEdbDataReq
+	err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+
+	if err = services.HandleHisugarIndex(req.List); err != nil {
+		br.Msg = "处理失败"
+		br.ErrMsg = "处理失败,Err:" + err.Error()
+		return
+	}
 
+	br.Ret = 200
+	br.Success = true
+	br.Msg = "处理成功"
+}

+ 17 - 19
models/base_from_hisugar.go

@@ -232,25 +232,6 @@ func GetBaseFromHisugarDataByCondition(condition string, pars []interface{}) (li
 }
 
 
-type BaseFromHisugarIndexReq struct {
-	BaseFromHisugarIndexId int       // 主键ID
-	IndexCode              string    // 指标编码
-	IndexName              string    // 指标名称
-	ClassifyId             uint      // 分类ID
-	Unit                   string    // 单位
-	Source                 string    // 数据来源
-	Frequency              string    // 频度
-	Describe               string    // 指标描述
-	DataTime               string    // 数据日期
-	Value                  string   // 数据值
-	Sort                   int       // 排序
-	CreateTime             time.Time // 创建时间
-	ModifyTime             time.Time // 修改时间
-	IndexNameStr           string    // 指标名称字符串
-	MarketName             string    // 市场名称
-}
-
-
 type HandleHisugarEdbDataReq struct {
 	List []*BaseFromHisugarIndexReq
 }
@@ -275,4 +256,21 @@ func UpdateBaseFromHisugarData(value , indexCode, dataTime string) (err error) {
 	sql := `UPDATE base_from_sci99_data SET value=?,modify_time=NOW() WHERE index_code = ? AND data_time = ? `
 	_, err = o.Raw(sql, value, indexCode, dataTime).Exec()
 	return
+}
+
+type BaseFromHisugarIndexReq struct {
+	BaseFromHisugarIndexId int       // 主键ID
+	IndexCode              string    // 指标编码
+	IndexName              string    // 指标名称
+	ClassifyId             uint      // 分类ID
+	Unit                   string    // 单位
+	Frequency              string    // 频度
+	Describe               string    // 指标描述
+	DataTime               string    // 数据日期
+	Sort                   int       // 排序
+	CreateTime             time.Time // 创建时间
+	ModifyTime             time.Time // 修改时间
+	IndexNameStr           string    // 指标名称字符串
+	MarketName             string    // 市场名称
+	Value                  string    // 值
 }

+ 2 - 0
models/db.go

@@ -170,6 +170,8 @@ func initBaseIndex() {
 		new(BaseFromOilchemData),
 		new(BaseFromFenweiClassify),
 		new(EdbDataTradeAnalysis),
+		new(BaseFromHisugarIndex),
+		new(BaseFromHisugarData),
 	)
 }
 

+ 9 - 0
routers/commentsRouter.go

@@ -889,6 +889,15 @@ func init() {
             Filters: nil,
             Params: nil})
 
+    beego.GlobalControllerRouter["eta/eta_index_lib/controllers:HisugarController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:HisugarController"],
+        beego.ControllerComments{
+            Method: "HandleEdbData",
+            Router: `/handle/edb_data`,
+            AllowHTTPMethods: []string{"post"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["eta/eta_index_lib/controllers:HisugarController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:HisugarController"],
         beego.ControllerComments{
             Method: "Refresh",

+ 154 - 182
services/base_from_hisugar.go

@@ -1,184 +1,156 @@
 package services
 
-//var IndexCodeMap = make(map[string]string)
-//var IndexMap = make(map[string]*models.BaseFromOilchemIndex)
-//func HandleOilchemIndex(list []*models.BaseFromOilchemIndexReq) (err error) {
-//	allCode, e := models.GetBaseFromOilchemIndex()
-//	if e != nil {
-//		err = e
-//		fmt.Println("select Code err:", err)
-//		utils.FileLog.Info("GetBaseFromOilchemIndex err:", err)
-//		return
-//	}
-//
-//	for _, item := range allCode {
-//		IndexCodeMap[item.IndexName] = item.IndexCode
-//		IndexMap[item.IndexName] = item
-//	}
-//
-//	for _, v := range list {
-//		indexCode, needAdd := OilchemIndexCodeGenerator(v.IndexName, v.IndexNameStr, v.MarketName)
-//		if needAdd {
-//			item := models.BaseFromOilchemIndex{
-//				IndexCode:              indexCode,
-//				IndexName:              v.IndexName,
-//				ClassifyId:             v.ClassifyId,
-//				Unit:                   v.Unit,
-//				Frequency:              v.Frequency,
-//				Describe:               v.Describe,
-//				Sort:                   v.Sort,
-//				CreateTime:             v.CreateTime,
-//				ModifyTime:             v.ModifyTime,
-//			}
-//			id, e := models.AddBaseFromOilchemIndex(&item)
-//			if e != nil {
-//				err = e
-//				fmt.Println("AddBaseFromOilchemIndexMuti err:", err)
-//				utils.FileLog.Info("AddBaseFromOilchemIndexMuti err:", err)
-//				return
-//			}
-//			item.BaseFromOilchemIndexId = int(id)
-//			IndexMap[item.IndexName] = &item
-//		}
-//
-//
-//		//获取指标数据信息
-//		data, e := models.GetBaseFromOilchemData(indexCode, v.DataTime)
-//		if e != nil && e.Error() != utils.ErrNoRow() {
-//			err = e
-//			fmt.Println("select err:", err)
-//			utils.FileLog.Info("GetBaseFromTradeSci99IndexAll err:", err)
-//		}
-//
-//		if data != nil {
-//			if data.Value != v.Value {
-//				// 更新
-//				fmt.Println("更新指标:", indexCode+v.DataTime)
-//				utils.FileLog.Info("更新指标:", indexCode+v.DataTime)
-//				e = models.UpdateBaseFromOilchemData(v.Value, indexCode, v.DataTime)
-//				if e != nil {
-//					err = e
-//					fmt.Println("Error update into database:", err)
-//					utils.FileLog.Info("Error update into database:", err)
-//					return
-//				}
-//			}
-//		} else {
-//			// 新增
-//			dataItem := models.BaseFromOilchemData{
-//				BaseFromOilchemIndexId: IndexMap[v.IndexName].BaseFromOilchemIndexId,
-//				IndexCode:              indexCode,
-//				DataTime:               v.DataTime,
-//				Value:                  v.Value,
-//				CreateTime:             v.CreateTime,
-//				ModifyTime:             v.ModifyTime,
-//			}
-//			fmt.Println("新增数据:", indexCode+v.DataTime)
-//			utils.FileLog.Info("新增数据:", indexCode+v.DataTime)
-//
-//			_,e = models.AddBaseFromOilchemData(&dataItem)
-//			if e != nil {
-//				err = e
-//				fmt.Println("Error inserting into database:", err)
-//				utils.FileLog.Info("Error inserting into database:", err)
-//				return
-//			}
-//		}
-//	}
-//
-//	return
-//}
-//
-//
-//func OilchemIndexCodeGenerator(indexName, indexCodeStr, marketSampleName string) (indexCode string, needAdd bool) {
-//	strResult := ""
-//	indexCode, _ = IndexCodeMap[indexName]
-//	if indexCode == "" {
-//		//首字母
-//		a := pinyin.NewArgs()
-//		a.Fallback = func(r rune, a pinyin.Args) []string {
-//			return []string{string(r)}
-//		}
-//		indexCodeStr = strings.Replace(indexCodeStr, "(", "", -1)
-//		indexCodeStr = strings.Replace(indexCodeStr, ")", "", -1)
-//		rows := pinyin.Pinyin(indexCodeStr, a)
-//		for i := 0; i < len(rows); i++ {
-//			//strResult += rows[i][0]
-//			if len(rows[i]) != 0 {
-//				str := rows[i][0]
-//				pi := str[0:1]
-//				strResult += pi
-//			}
-//		}
-//
-//		// 处理括号内名称
-//		if marketSampleName != "" {
-//			if province, ok := ProvinceMap[marketSampleName]; ok {
-//				strResult += province
-//			} else {
-//				a := pinyin.NewArgs()
-//				rows := pinyin.LazyPinyin(marketSampleName, a)
-//				for i := 0; i < len(rows); i++ {
-//					strResult += rows[i]
-//				}
-//				if len(rows) == 0 {
-//					strResult += marketSampleName
-//				}
-//			}
-//		}
-//
-//
-//		// 去除特殊符号
-//		strResult = strings.Replace(strResult, " ", "", -1)
-//		strResult = strings.Replace(strResult, "-", "", -1)
-//		strResult = strings.Replace(strResult, "/", "", -1)
-//		strResult = strings.Replace(strResult, "#", "", -1)
-//		strResult = strings.Replace(strResult, ":", "", -1)
-//		strResult = strings.Replace(strResult, "(", "", -1)
-//		strResult = strings.Replace(strResult, ")", "", -1)
-//
-//
-//		needAdd = true
-//		strResult = "lzzxw" + strResult
-//		indexCode = strings.Replace(strResult, " ", "", -1)
-//		IndexCodeMap[indexName] = indexCode
-//	}
-//	return
-//}
-//
-//var ProvinceMap = map[string]string{
-//	"上海":  "shanghai",
-//	"云南":  "yunnan",
-//	"内蒙古": "innermongolia",
-//	"北京":  "beijing",
-//	"台湾":  "taiwan",
-//	"吉林":  "jilin",
-//	"四川":  "sichuan",
-//	"天津":  "tianjin",
-//	"宁夏":  "ningxia",
-//	"安徽":  "anhui",
-//	"山东":  "shandong",
-//	"山西":  "shanxi",
-//	"广东":  "guangdong",
-//	"广西":  "guangxi",
-//	"新疆":  "xinjiang",
-//	"江苏":  "jiangsu",
-//	"江西":  "jiangxi",
-//	"河北":  "hebei",
-//	"河南":  "henan",
-//	"浙江":  "zhejiang",
-//	"海南":  "hainan",
-//	"湖北":  "hubei",
-//	"湖南":  "hunan",
-//	"澳门":  "macao",
-//	"甘肃":  "gansu",
-//	"福建":  "fujian",
-//	"西藏":  "tibet",
-//	"贵州":  "guizhou",
-//	"辽宁":  "liaoning",
-//	"重庆":  "chongqing",
-//	"陕西":  "shaanxi",
-//	"青海":  "qinhai",
-//	"香港":  "hongkong",
-//	"黑龙江": "heilongjiang",
-//}
+import (
+	"eta/eta_index_lib/models"
+	"eta/eta_index_lib/utils"
+	"fmt"
+	"github.com/mozillazg/go-pinyin"
+	"strings"
+)
+
+var HisugarIndexCodeMap = make(map[string]string)
+var HisugarIndexMap = make(map[string]*models.BaseFromHisugarIndex)
+func HandleHisugarIndex(list []*models.BaseFromHisugarIndexReq) (err error) {
+	allCode, e := models.GetBaseFromHisugarIndex()
+	if e != nil {
+		err = e
+		fmt.Println("select Code err:", err)
+		utils.FileLog.Info("GetBaseFromHisugarIndex err:", err)
+		return
+	}
+
+	for _, item := range allCode {
+		HisugarIndexCodeMap[item.IndexName] = item.IndexCode
+		HisugarIndexMap[item.IndexName] = item
+	}
+
+	for _, v := range list {
+		indexCode, needAdd := HisugarIndexCodeGenerator(v.IndexName, v.IndexNameStr, v.MarketName)
+		if needAdd {
+			item := models.BaseFromHisugarIndex{
+				IndexCode:              indexCode,
+				IndexName:              v.IndexName,
+				ClassifyId:             v.ClassifyId,
+				Unit:                   v.Unit,
+				Frequency:              v.Frequency,
+				Describe:               v.Describe,
+				Sort:                   v.Sort,
+				CreateTime:             v.CreateTime,
+				ModifyTime:             v.ModifyTime,
+			}
+			id, e := models.AddBaseFromHisugarIndex(&item)
+			if e != nil {
+				err = e
+				fmt.Println("AddBaseFromHisugarIndexMuti err:", err)
+				utils.FileLog.Info("AddBaseFromHisugarIndexMuti err:", err)
+				return
+			}
+			item.BaseFromHisugarIndexId = int(id)
+			HisugarIndexMap[item.IndexName] = &item
+		}
+
+
+		//获取指标数据信息
+		data, e := models.GetBaseFromHisugarData(indexCode, v.DataTime)
+		if e != nil && e.Error() != utils.ErrNoRow() {
+			err = e
+			fmt.Println("select err:", err)
+			utils.FileLog.Info("GetBaseFromTradeSci99IndexAll err:", err)
+		}
+
+		if data != nil {
+			if data.Value != v.Value {
+				// 更新
+				fmt.Println("更新指标:", indexCode+v.DataTime)
+				utils.FileLog.Info("更新指标:", indexCode+v.DataTime)
+				e = models.UpdateBaseFromHisugarData(v.Value, indexCode, v.DataTime)
+				if e != nil {
+					err = e
+					fmt.Println("Error update into database:", err)
+					utils.FileLog.Info("Error update into database:", err)
+					return
+				}
+			}
+		} else {
+			// 新增
+			dataItem := models.BaseFromHisugarData{
+				BaseFromHisugarIndexId: HisugarIndexMap[v.IndexName].BaseFromHisugarIndexId,
+				IndexCode:              indexCode,
+				DataTime:               v.DataTime,
+				Value:                  v.Value,
+				CreateTime:             v.CreateTime,
+				ModifyTime:             v.ModifyTime,
+			}
+			fmt.Println("新增数据:", indexCode+v.DataTime)
+			utils.FileLog.Info("新增数据:", indexCode+v.DataTime)
+
+			_,e = models.AddBaseFromHisugarData(&dataItem)
+			if e != nil {
+				err = e
+				fmt.Println("Error inserting into database:", err)
+				utils.FileLog.Info("Error inserting into database:", err)
+				return
+			}
+		}
+	}
+
+	return
+}
+
+
+func HisugarIndexCodeGenerator(indexName, indexCodeStr, marketSampleName string) (indexCode string, needAdd bool) {
+	strResult := ""
+	indexCodeStr = indexName
+	indexCode, _ = HisugarIndexCodeMap[indexName]
+	if indexCode == "" {
+		//首字母
+		a := pinyin.NewArgs()
+		a.Fallback = func(r rune, a pinyin.Args) []string {
+			return []string{string(r)}
+		}
+		indexCodeStr = strings.Replace(indexCodeStr, "(", "", -1)
+		indexCodeStr = strings.Replace(indexCodeStr, ")", "", -1)
+		rows := pinyin.Pinyin(indexCodeStr, a)
+		for i := 0; i < len(rows); i++ {
+			//strResult += rows[i][0]
+			if len(rows[i]) != 0 {
+				str := rows[i][0]
+				pi := str[0:1]
+				strResult += pi
+			}
+		}
+
+		// 处理括号内名称
+		if marketSampleName != "" {
+			if province, ok := ProvinceMap[marketSampleName]; ok {
+				strResult += province
+			} else {
+				a := pinyin.NewArgs()
+				rows := pinyin.LazyPinyin(marketSampleName, a)
+				for i := 0; i < len(rows); i++ {
+					strResult += rows[i]
+				}
+				if len(rows) == 0 {
+					strResult += marketSampleName
+				}
+			}
+		}
+
+
+		// 去除特殊符号
+		strResult = strings.Replace(strResult, " ", "", -1)
+		strResult = strings.Replace(strResult, "-", "", -1)
+		strResult = strings.Replace(strResult, "/", "", -1)
+		strResult = strings.Replace(strResult, "#", "", -1)
+		strResult = strings.Replace(strResult, ":", "", -1)
+		strResult = strings.Replace(strResult, "(", "", -1)
+		strResult = strings.Replace(strResult, ")", "", -1)
+
+
+		needAdd = true
+		strResult = "ftkj" + strResult
+		indexCode = strings.Replace(strResult, " ", "", -1)
+		HisugarIndexCodeMap[indexName] = indexCode
+	}
+	return
+}

+ 59 - 59
utils/constants.go

@@ -115,87 +115,87 @@ const (
 	DATA_SOURCE_PREDICT_CALCULATE_RANGEANLYSIS       = 90 // 预测指标区间计算->90
 	DATA_SOURCE_LY                                   = 91 // 粮油商务网
 	DATA_SOURCE_TRADE_ANALYSIS                       = 92 // 持仓分析
-	DATA_SOURCE_HISUGAR                             = 94 //预测指标 - 时间移位->46
+	DATA_SOURCE_HISUGAR                              = 93 //泛糖科技 -> 93
 	DATA_SOURCE_PREDICT_CALCULATE_PHASE_SHIFT        = 94 //预测指标 - 期数移位
 	DATA_SOURCE_CALCULATE_PHASE_SHIFT                = 95 // 期数移动
 )
 
 // 指标来源的中文展示
 const (
-	DATA_SOURCE_NAME_THS                                  = `同花顺`                //同花顺
-	DATA_SOURCE_NAME_WIND                                 = `wind`                  //wind
-	DATA_SOURCE_NAME_PB                                   = `彭博`                  //彭博
+	DATA_SOURCE_NAME_THS                                  = `同花顺`               //同花顺
+	DATA_SOURCE_NAME_WIND                                 = `wind`              //wind
+	DATA_SOURCE_NAME_PB                                   = `彭博`                //彭博
 	DATA_SOURCE_NAME_CALCULATE                            = `指标运算`              //指标运算
-	DATA_SOURCE_NAME_CALCULATE_LJZZY                      = `累计值转月值`          //累计值转月
-	DATA_SOURCE_NAME_CALCULATE_TBZ                        = `同比值`                //同比值
-	DATA_SOURCE_NAME_CALCULATE_TCZ                        = `同差值`                //同差值
-	DATA_SOURCE_NAME_CALCULATE_NSZYDPJJS                  = `N数值移动平均计算`     //N数值移动平均计算
+	DATA_SOURCE_NAME_CALCULATE_LJZZY                      = `累计值转月值`            //累计值转月
+	DATA_SOURCE_NAME_CALCULATE_TBZ                        = `同比值`               //同比值
+	DATA_SOURCE_NAME_CALCULATE_TCZ                        = `同差值`               //同差值
+	DATA_SOURCE_NAME_CALCULATE_NSZYDPJJS                  = `N数值移动平均计算`         //N数值移动平均计算
 	DATA_SOURCE_NAME_MANUAL                               = `手工数据`              //手工指标
-	DATA_SOURCE_NAME_LZ                                   = `隆众`                  //隆众
-	DATA_SOURCE_NAME_YS                                   = `SMM`                   //有色
-	DATA_SOURCE_NAME_CALCULATE_HBZ                        = `环比值`                //环比值->12
-	DATA_SOURCE_NAME_CALCULATE_HCZ                        = `环差值`                //环差值->13
-	DATA_SOURCE_NAME_CALCULATE_BP                         = `升频`                  //变频,2023-2-10 13:56:01调整为"升频"->14
+	DATA_SOURCE_NAME_LZ                                   = `隆众`                //隆众
+	DATA_SOURCE_NAME_YS                                   = `SMM`               //有色
+	DATA_SOURCE_NAME_CALCULATE_HBZ                        = `环比值`               //环比值->12
+	DATA_SOURCE_NAME_CALCULATE_HCZ                        = `环差值`               //环差值->13
+	DATA_SOURCE_NAME_CALCULATE_BP                         = `升频`                //变频,2023-2-10 13:56:01调整为"升频"->14
 	DATA_SOURCE_NAME_GL                                   = `上海钢联`              //钢联->15
-	DATA_SOURCE_NAME_ZZ                                   = `郑商所`                //郑商所->16
-	DATA_SOURCE_NAME_DL                                   = `大商所`                //大商所->17
-	DATA_SOURCE_NAME_SH                                   = `上期所`                //上期所->18
-	DATA_SOURCE_NAME_CFFEX                                = `中金所`                //中金所->19
+	DATA_SOURCE_NAME_ZZ                                   = `郑商所`               //郑商所->16
+	DATA_SOURCE_NAME_DL                                   = `大商所`               //大商所->17
+	DATA_SOURCE_NAME_SH                                   = `上期所`               //上期所->18
+	DATA_SOURCE_NAME_CFFEX                                = `中金所`               //中金所->19
 	DATA_SOURCE_NAME_SHFE                                 = `上期能源`              //上期能源->20
-	DATA_SOURCE_NAME_GIE                                  = `欧洲天然气`            //欧洲天然气->21
+	DATA_SOURCE_NAME_GIE                                  = `欧洲天然气`             //欧洲天然气->21
 	DATA_SOURCE_NAME_CALCULATE_TIME_SHIFT                 = `时间移位`              //时间移位->22
 	DATA_SOURCE_NAME_CALCULATE_ZJPJ                       = `直接拼接`              //直接拼接->23
-	DATA_SOURCE_NAME_CALCULATE_LJZTBPJ                    = `累计值同比拼接`        //累计值同比拼接->24
-	DATA_SOURCE_NAME_LT                                   = `路透`                  //路透->25
-	DATA_SOURCE_NAME_COAL                                 = `中国煤炭市场网`        //中国煤炭市场网->26
+	DATA_SOURCE_NAME_CALCULATE_LJZTBPJ                    = `累计值同比拼接`           //累计值同比拼接->24
+	DATA_SOURCE_NAME_LT                                   = `路透`                //路透->25
+	DATA_SOURCE_NAME_COAL                                 = `中国煤炭市场网`           //中国煤炭市场网->26
 	DATA_SOURCE_NAME_PYTHON                               = `代码运算`              //python代码->27
 	DATA_SOURCE_NAME_PB_FINANCE                           = `彭博财务`              //彭博财务数据->28
-	DATA_SOURCE_NAME_GOOGLE_TRAVEL                        = `our world in data`     //谷歌出行数据->29
+	DATA_SOURCE_NAME_GOOGLE_TRAVEL                        = `our world in data` //谷歌出行数据->29
 	DATA_SOURCE_NAME_PREDICT                              = `预测指标`              //普通预测指标->30
-	DATA_SOURCE_NAME_PREDICT_CALCULATE                    = `预测指标运算`          //预测指标运算->31
+	DATA_SOURCE_NAME_PREDICT_CALCULATE                    = `预测指标运算`            //预测指标运算->31
 	DATA_SOURCE_NAME_PREDICT_CALCULATE_TBZ                = `预测同比`              //预测指标 - 同比值->32
 	DATA_SOURCE_NAME_PREDICT_CALCULATE_TCZ                = `预测同差`              //预测指标 - 同差值->33
 	DATA_SOURCE_NAME_MYSTEEL_CHEMICAL                     = `上海钢联`              //上海钢联->34
 	DATA_SOURCE_NAME_CALCULATE_CJJX                       = `超季节性`              //超季节性->35
-	DATA_SOURCE_NAME_EIA_STEO                             = `EIA STERO报告`         //eia stero报告->36
+	DATA_SOURCE_NAME_EIA_STEO                             = `EIA STERO报告`       //eia stero报告->36
 	DATA_SOURCE_NAME_CALCULATE_NHCC                       = `拟合残差`              //计算指标(拟合残差)->37
-	DATA_SOURCE_NAME_COM_TRADE                            = `UN`                    //联合国商品贸易数据->38
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_NSZYDPJJS          = `预测N数值移动平均计算` //预测指标 - N数值移动平均计算 -> 39
+	DATA_SOURCE_NAME_COM_TRADE                            = `UN`                //联合国商品贸易数据->38
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_NSZYDPJJS          = `预测N数值移动平均计算`       //预测指标 - N数值移动平均计算 -> 39
 	DATA_SOURCE_NAME_CALCULATE_ADJUST                     = `数据调整`              //数据调整->40
-	DATA_SOURCE_NAME_SCI                                  = `SCI`                   //卓创数据(红桃三)->41
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_LJZZY              = `预测累计值转月值`      //预测指标 - 累计值转月->42
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_HBZ                = `预测环比值`            //预测指标 - 环比值->43
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_HCZ                = `预测环差值`            //预测指标 - 环差值->44
+	DATA_SOURCE_NAME_SCI                                  = `SCI`               //卓创数据(红桃三)->41
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_LJZZY              = `预测累计值转月值`          //预测指标 - 累计值转月->42
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_HBZ                = `预测环比值`             //预测指标 - 环比值->43
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_HCZ                = `预测环差值`             //预测指标 - 环差值->44
 	DATA_SOURCE_NAME_PREDICT_CALCULATE_BP                 = `预测升频`              //预测指标 - 升频->45
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_TIME_SHIFT         = `预测时间移位`          //预测指标 - 时间移位->46
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_ZJPJ               = `预测直接拼接`          //预测指标 - 直接拼接->47
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_LJZTBPJ            = `预测累计值同比拼接`    //预测指标 - 累计值同比拼接->48
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_CJJX               = `预测超季节性`          //预测指标 - 超季节性->49
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_NHCC               = `预测拟合残差`          //预测指标 - 计算指标(拟合残差)->50
-	DATA_SOURCE_NAME_CALCULATE_JP                         = `降频`                  //降频->51
-	DATA_SOURCE_NAME_CALCULATE_NH                         = `年化`                  //年化->52
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_TIME_SHIFT         = `预测时间移位`            //预测指标 - 时间移位->46
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_ZJPJ               = `预测直接拼接`            //预测指标 - 直接拼接->47
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_LJZTBPJ            = `预测累计值同比拼接`         //预测指标 - 累计值同比拼接->48
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_CJJX               = `预测超季节性`            //预测指标 - 超季节性->49
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_NHCC               = `预测拟合残差`            //预测指标 - 计算指标(拟合残差)->50
+	DATA_SOURCE_NAME_CALCULATE_JP                         = `降频`                //降频->51
+	DATA_SOURCE_NAME_CALCULATE_NH                         = `年化`                //年化->52
 	DATA_SOURCE_NAME_CALCULATE_KSZS                       = `扩散指数`              //扩散指数->53
 	DATA_SOURCE_NAME_PREDICT_CALCULATE_JP                 = `预测降频`              //预测指标 - 计算指标(降频)->54
 	DATA_SOURCE_NAME_PREDICT_CALCULATE_NH                 = `预测年化`              //预测指标 - 计算指标(年化)->55
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_KSZS               = `预测扩散指数`          //预测指标 - 计算指标(扩散指数)->56
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_KSZS               = `预测扩散指数`            //预测指标 - 计算指标(扩散指数)->56
 	DATA_SOURCE_NAME_BAIINFO                              = `百川盈孚`              //百川盈孚 ->57
 	DATA_SOURCE_NAME_STOCK_PLANT                          = `存量装置`              //存量装置 ->58
-	DATA_SOURCE_NAME_CALCULATE_CORRELATION                = `相关性计算`            //相关性计算->59
-	DATA_SOURCE_NAME_NATIONAL_STATISTICS                  = `国家统计局`            //国家统计局->60
-	DATA_SOURCE_NAME_CALCULATE_LJZZJ                      = `累计值转季值`          //累计值转季 -> 61
-	DATA_SOURCE_NAME_CALCULATE_LJZ                        = `累计值`                //累计值 -> 62
-	DATA_SOURCE_NAME_CALCULATE_LJZNCZJ                    = `年初至今累计值`        //累计值(年初至今) -> 63
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_LJZZJ              = `预测累计值转季值`      //预测指标 - 累计值转季->64
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_LJZ                = `预测累计值`            //预测指标 - 累计值 -> 65
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_LJZNCZJ            = `预测年初至今累计值`    //预测指标 - 累计值(年初至今) -> 66
-	DATA_SOURCE_NAME_CALCULATE_STANDARD_DEVIATION         = `标准差`                //标准差->67
-	DATA_SOURCE_NAME_CALCULATE_PERCENTILE                 = `百分位`                //百分位->68
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_STANDARD_DEVIATION = `预测标准差`            //预测标准差->69
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_PERCENTILE         = `预测百分位`            //预测百分位->70
+	DATA_SOURCE_NAME_CALCULATE_CORRELATION                = `相关性计算`             //相关性计算->59
+	DATA_SOURCE_NAME_NATIONAL_STATISTICS                  = `国家统计局`             //国家统计局->60
+	DATA_SOURCE_NAME_CALCULATE_LJZZJ                      = `累计值转季值`            //累计值转季 -> 61
+	DATA_SOURCE_NAME_CALCULATE_LJZ                        = `累计值`               //累计值 -> 62
+	DATA_SOURCE_NAME_CALCULATE_LJZNCZJ                    = `年初至今累计值`           //累计值(年初至今) -> 63
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_LJZZJ              = `预测累计值转季值`          //预测指标 - 累计值转季->64
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_LJZ                = `预测累计值`             //预测指标 - 累计值 -> 65
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_LJZNCZJ            = `预测年初至今累计值`         //预测指标 - 累计值(年初至今) -> 66
+	DATA_SOURCE_NAME_CALCULATE_STANDARD_DEVIATION         = `标准差`               //标准差->67
+	DATA_SOURCE_NAME_CALCULATE_PERCENTILE                 = `百分位`               //百分位->68
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_STANDARD_DEVIATION = `预测标准差`             //预测标准差->69
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_PERCENTILE         = `预测百分位`             //预测百分位->70
 	DATA_SOURCE_NAME_FUBAO                                = `富宝数据`              //富宝数据->71
 	DATA_SOURCE_NAME_CALCULATE_ZSXY                       = `指数修匀`              //指数修匀->72
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_ZSXY               = `预测指数修匀`          //预测指数修匀->73
-	DATA_SOURCE_NAME_CALCULATE_ZDYFX                      = `自定义分析`            //自定义分析->74
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_ZSXY               = `预测指数修匀`            //预测指数修匀->73
+	DATA_SOURCE_NAME_CALCULATE_ZDYFX                      = `自定义分析`             //自定义分析->74
 	DATA_SOURCE_NAME_YONYI                                = `涌益咨询`              // 涌益咨询
 	DATA_SOURCE_NAME_FENWEI                               = `汾渭数据`              // 汾渭煤炭
 	DATA_SOURCE_NAME_MTJH                                 = `煤炭江湖`              // 煤炭江湖->80
@@ -203,13 +203,13 @@ const (
 	DATA_SOURCE_NAME_CALCULATE_SUM                        = `多指标求和`
 	DATA_SOURCE_NAME_CALCULATE_AVG                        = `多指标求平均`
 	DATA_SOURCE_NAME_BUSINESS                             = `自有数据`
-	DATA_SOURCE_NAME_CCF                                  = `CCF`          // CCF化纤信息
-	DATA_SOURCE_NAME_SCI_HQ                               = `卓创红期`     // 卓创红期
-	DATA_SOURCE_NAME_OILCHEM                              = `隆众资讯`     // 隆众资讯 -> 89
-	DATA_SOURCE_NAME_CALCULATE_RANGEANLYSIS               = `区间计算`     //区间计算->87
-	DATA_SOURCE_NAME_PREDICT_CALCULATE_RANGEANLYSIS       = `预测区间计算` //区间计算->90
-	DATA_SOURCE_NAME_HISUGAR                              = `泛糖科技`     // 泛糖科技 -> 91
-	DATA_SOURCE_NAME_TRADE_ANALYSIS                       = `持仓分析`     // 持仓分析
+	DATA_SOURCE_NAME_CCF = `CCF` // CCF化纤信息
+	DATA_SOURCE_NAME_SCI_HQ                               = `卓创红期` // 卓创红期
+	DATA_SOURCE_NAME_OILCHEM = `隆众资讯`                              // 隆众资讯 -> 89
+	DATA_SOURCE_NAME_CALCULATE_RANGEANLYSIS = `区间计算`           //区间计算->87
+	DATA_SOURCE_NAME_PREDICT_CALCULATE_RANGEANLYSIS = `预测区间计算` //区间计算->90
+	DATA_SOURCE_NAME_HISUGAR = `泛糖科技`                          // 泛糖科技 -> 93
+	DATA_SOURCE_NAME_TRADE_ANALYSIS                       = `持仓分析` // 持仓分析
 )
 
 // 基础数据初始化日期