Browse Source

Merge branch 'chart_12.7'

ziwen 2 years ago
parent
commit
4e75825723

+ 2 - 0
models/data_manage/edb_data_base.go

@@ -81,6 +81,8 @@ func GetEdbDataTableName(source int) (tableName string) {
 		tableName = "edb_data_com_trade"
 	case utils.DATA_SOURCE_PREDICT_CALCULATE_NSZYDPJJS:
 		tableName = "edb_data_predict_calculate_nszydpjjs"
+	case utils.DATA_SOURCE_SCI:
+		tableName = "edb_data_sci"
 	default:
 		tableName = ""
 	}

+ 2 - 0
models/edb_data_base.go

@@ -80,6 +80,8 @@ func GetEdbDataTableName(source int) (tableName string) {
 		tableName = "edb_data_com_trade"
 	case utils.DATA_SOURCE_PREDICT_CALCULATE_NSZYDPJJS:
 		tableName = "edb_data_predict_calculate_nszydpjjs"
+	case utils.DATA_SOURCE_SCI:
+		tableName = "edb_data_sci"
 	default:
 		tableName = ""
 	}

+ 4 - 0
services/data/base_edb_lib.go

@@ -48,6 +48,8 @@ func AddEdbData(source int, edbCode string) (resp *models.BaseResponse, err erro
 		urlStr = "/lt/add"
 	case utils.DATA_SOURCE_COAL:
 		urlStr = "/coal/add"
+	case utils.DATA_SOURCE_SCI:
+		urlStr = "/sci/add"
 	default:
 	}
 	if urlStr == "" {
@@ -108,6 +110,8 @@ func RefreshEdbData(edbInfoId, source int, edbCode, startDate string) (resp *mod
 		urlStr = "predict/refresh"
 	case utils.DATA_SOURCE_COM_TRADE:
 		urlStr = "com_trade/refresh"
+	case utils.DATA_SOURCE_SCI:
+		urlStr = "/sci/refresh"
 	}
 	if urlStr == "" {
 		err = fmt.Errorf(fmt.Sprint("source:", source, ";未实现该指标的刷新接口,请联系管理员"))

+ 2 - 0
utils/constants.go

@@ -71,6 +71,8 @@ const (
 	DATA_SOURCE_CALCULATE_NHCC                         //计算指标(拟合残差)->37
 	DATA_SOURCE_COM_TRADE                              //联合国商品贸易数据->38
 	DATA_SOURCE_PREDICT_CALCULATE_NSZYDPJJS            //预测指标 - N数值移动平均计算 -> 39
+	DATA_SOURCE_XXXX                                   //预留给40 -> 40
+	DATA_SOURCE_SCI                                    //卓创数据(红桃三) -> 41
 )
 
 //数据刷新频率