|
@@ -2098,6 +2098,7 @@ func getEdbRuleTitle(edbInfo, parentEdbInfo *data_manage.EdbInfo, childList []da
|
|
|
edbName = edbInfo.EdbName
|
|
|
edbNameEn = edbInfo.EdbNameEn
|
|
|
ruleTitle = `来源于` + edbInfo.SourceName
|
|
|
+ ruleTitleEn = `Source From: ` + edbInfo.SourceName
|
|
|
|
|
|
if parentEdbInfo != nil {
|
|
|
edbMappingList, ok := edbMappingMap[parentEdbInfo.EdbInfoId]
|
|
@@ -2121,11 +2122,13 @@ func getEdbRuleTitle(edbInfo, parentEdbInfo *data_manage.EdbInfo, childList []da
|
|
|
tmpNameEn := ``
|
|
|
if v.FromTag == `A` {
|
|
|
tmpName = `拼接日期前`
|
|
|
+ tmpNameEn = `Before Concatenation Date:`
|
|
|
} else if v.FromTag == `B` {
|
|
|
tmpName = `拼接日期后`
|
|
|
+ tmpNameEn = `After Concatenation Date:`
|
|
|
}
|
|
|
edbName = fmt.Sprintf("%s(%s)", edbInfo.EdbName, tmpName)
|
|
|
- edbName = fmt.Sprintf("%s(%s)", edbInfo.EdbNameEn, tmpNameEn)
|
|
|
+ edbNameEn = fmt.Sprintf("%s(%s)", edbInfo.EdbNameEn, tmpNameEn)
|
|
|
}
|
|
|
}
|
|
|
case utils.DATA_SOURCE_CALCULATE_NHCC, utils.DATA_SOURCE_PREDICT_CALCULATE_NHCC: //计算指标(拟合残差)
|
|
@@ -2133,12 +2136,16 @@ func getEdbRuleTitle(edbInfo, parentEdbInfo *data_manage.EdbInfo, childList []da
|
|
|
//(需对上游指标+自变量,领先10天/因变量)
|
|
|
if v.FromEdbInfoId == edbInfo.EdbInfoId {
|
|
|
tmpName := ``
|
|
|
+ tmpNameEn := ``
|
|
|
if v.FromTag == `A` {
|
|
|
tmpName = fmt.Sprintf(`自变量,领先%d天`, v.MoveValue)
|
|
|
+ tmpNameEn = fmt.Sprintf(`Independent Variable, Lead %d Days:`, v.MoveValue)
|
|
|
} else if v.FromTag == `B` {
|
|
|
tmpName = `因变量`
|
|
|
+ tmpNameEn = `Dependent Variable`
|
|
|
}
|
|
|
edbName = fmt.Sprintf("%s(%s)", edbInfo.EdbName, tmpName)
|
|
|
+ edbNameEn = fmt.Sprintf("%s(%s)", edbInfo.EdbNameEn, tmpNameEn)
|
|
|
}
|
|
|
}
|
|
|
case utils.DATA_SOURCE_CALCULATE_CORRELATION: // 滚动相关性
|
|
@@ -2165,22 +2172,31 @@ func getEdbRuleTitle(edbInfo, parentEdbInfo *data_manage.EdbInfo, childList []da
|
|
|
ruleTitle = "=" + edbInfo.CalculateFormula
|
|
|
case utils.DATA_SOURCE_CALCULATE_LJZZY, utils.DATA_SOURCE_PREDICT_CALCULATE_LJZZY:
|
|
|
ruleTitle = `累计转月值计算`
|
|
|
+ ruleTitleEn = `Cumulative to Monthly Calculation`
|
|
|
case utils.DATA_SOURCE_CALCULATE_TBZ, utils.DATA_SOURCE_PREDICT_CALCULATE_TBZ:
|
|
|
ruleTitle = `同比值计算`
|
|
|
+ ruleTitleEn = `Year-on-Year Value Calculation`
|
|
|
case utils.DATA_SOURCE_CALCULATE_TCZ, utils.DATA_SOURCE_PREDICT_CALCULATE_TCZ:
|
|
|
ruleTitle = `同差值计算`
|
|
|
+ ruleTitleEn = `Yearly Difference Calculation`
|
|
|
case utils.DATA_SOURCE_CALCULATE_NSZYDPJJS, utils.DATA_SOURCE_PREDICT_CALCULATE_NSZYDPJJS:
|
|
|
ruleTitle = fmt.Sprintf("N数值移动均值计算(N=%s)", edbInfo.CalculateFormula)
|
|
|
+ ruleTitleEn = fmt.Sprintf("N-Value Moving Average Calculation(N=%s)", edbInfo.CalculateFormula)
|
|
|
case utils.DATA_SOURCE_CALCULATE_HBZ, utils.DATA_SOURCE_PREDICT_CALCULATE_HBZ:
|
|
|
ruleTitle = fmt.Sprintf("N数值环比值计算(N=%s)", edbInfo.CalculateFormula)
|
|
|
+ ruleTitleEn = fmt.Sprintf("N-Value Sequential Comparison Calculation(N=%s)", edbInfo.CalculateFormula)
|
|
|
case utils.DATA_SOURCE_CALCULATE_HCZ, utils.DATA_SOURCE_PREDICT_CALCULATE_HCZ:
|
|
|
ruleTitle = fmt.Sprintf("N数值环差值计算(N=%s)", edbInfo.CalculateFormula)
|
|
|
+ ruleTitleEn = fmt.Sprintf("N-Value Sequential Difference Calculation(N=%s)", edbInfo.CalculateFormula)
|
|
|
case utils.DATA_SOURCE_CALCULATE_TIME_SHIFT, utils.DATA_SOURCE_PREDICT_CALCULATE_TIME_SHIFT:
|
|
|
moveType := `领先`
|
|
|
+ moveTypeEn := `Lead`
|
|
|
if edbInfo.MoveType == 2 {
|
|
|
moveType = "滞后"
|
|
|
+ moveTypeEn = `Lag`
|
|
|
}
|
|
|
ruleTitle = fmt.Sprintf("时间移位计算(%s%s%s)", moveType, edbInfo.CalculateFormula, edbInfo.MoveFrequency)
|
|
|
+ ruleTitleEn = fmt.Sprintf("Time Shift Calculation(%s%s%s)", moveTypeEn, edbInfo.CalculateFormula, edbInfo.MoveFrequency)
|
|
|
case utils.DATA_SOURCE_CALCULATE_BP, utils.DATA_SOURCE_PREDICT_CALCULATE_BP: // 变频
|
|
|
childFrequency := ``
|
|
|
if len(childList) > 0 {
|
|
@@ -2190,14 +2206,19 @@ func getEdbRuleTitle(edbInfo, parentEdbInfo *data_manage.EdbInfo, childList []da
|
|
|
|
|
|
}
|
|
|
ruleTitle = fmt.Sprintf("升频计算(%s转%s)", childFrequency, edbInfo.Frequency)
|
|
|
+ ruleTitleEn = fmt.Sprintf("Upsampling Calculation(%s转%s)", childFrequency, edbInfo.Frequency)
|
|
|
case utils.DATA_SOURCE_CALCULATE_ZJPJ, utils.DATA_SOURCE_PREDICT_CALCULATE_ZJPJ: // 直接拼接
|
|
|
ruleTitle = fmt.Sprintf("直接拼接计算(%s)", edbInfo.CalculateFormula)
|
|
|
+ ruleTitleEn = fmt.Sprintf("Direct Concatenation Calculation(%s)", edbInfo.CalculateFormula)
|
|
|
case utils.DATA_SOURCE_CALCULATE_LJZTBPJ, utils.DATA_SOURCE_PREDICT_CALCULATE_LJZTBPJ: // 累计值同比拼
|
|
|
ruleTitle = fmt.Sprintf("累计值同比值拼接计算(%s)", edbInfo.CalculateFormula)
|
|
|
+ ruleTitleEn = fmt.Sprintf("Cumulative Year-on-Year Concatenation Calculation(%s)", edbInfo.CalculateFormula)
|
|
|
case utils.DATA_SOURCE_PYTHON:
|
|
|
ruleTitle = `代码运算`
|
|
|
+ ruleTitleEn = `Code Computation`
|
|
|
case utils.DATA_SOURCE_CALCULATE_CJJX, utils.DATA_SOURCE_PREDICT_CALCULATE_CJJX:
|
|
|
ruleTitle = fmt.Sprintf("超季节性计算(N=%s,%s)", edbInfo.CalculateFormula, edbInfo.Calendar)
|
|
|
+ ruleTitleEn = fmt.Sprintf("Super Seasonality Calculation(N=%s,%s)", edbInfo.CalculateFormula, edbInfo.Calendar)
|
|
|
case utils.DATA_SOURCE_CALCULATE_NHCC, utils.DATA_SOURCE_PREDICT_CALCULATE_NHCC: //计算指标(拟合残差)
|
|
|
var startDate, endDate string
|
|
|
dateList := strings.Split(edbInfo.CalculateFormula, ",")
|
|
@@ -2206,10 +2227,13 @@ func getEdbRuleTitle(edbInfo, parentEdbInfo *data_manage.EdbInfo, childList []da
|
|
|
endDate = dateList[1]
|
|
|
}
|
|
|
ruleTitle = fmt.Sprintf("拟合残差计算(%s至%s)", startDate, endDate)
|
|
|
+ ruleTitleEn = fmt.Sprintf("Fit Residual Calculation(%s至%s)", startDate, endDate)
|
|
|
case utils.DATA_SOURCE_CALCULATE_ADJUST:
|
|
|
ruleTitle = `数据调整`
|
|
|
+ ruleTitleEn = `Data Adjustment`
|
|
|
case utils.DATA_SOURCE_CALCULATE_NH, utils.DATA_SOURCE_PREDICT_CALCULATE_NH:
|
|
|
ruleTitle = `年化计算`
|
|
|
+ ruleTitleEn = `Annualization Calculation`
|
|
|
case utils.DATA_SOURCE_CALCULATE_KSZS, utils.DATA_SOURCE_PREDICT_CALCULATE_KSZS: // 扩散指数->53
|
|
|
type KszsConfig struct {
|
|
|
DateType int `description:"扩散指标日期;1:全部指标日期并集;2:部分指标日期并集"`
|
|
@@ -2265,8 +2289,10 @@ func getEdbRuleTitle(edbInfo, parentEdbInfo *data_manage.EdbInfo, childList []da
|
|
|
}
|
|
|
}
|
|
|
ruleTitle = fmt.Sprintf("扩散指数计算(%s至%s)", startDate.Format(utils.FormatDate), endDate.Format(utils.FormatDate))
|
|
|
+ ruleTitleEn = fmt.Sprintf("Diffusion Index Calculation(%s to %s)", startDate.Format(utils.FormatDate), endDate.Format(utils.FormatDate))
|
|
|
case utils.DATA_SOURCE_STOCK_PLANT:
|
|
|
ruleTitle = `来源于装置分析`
|
|
|
+ ruleTitleEn = `Derived from Plant Analysis`
|
|
|
case utils.DATA_SOURCE_CALCULATE_CORRELATION:
|
|
|
type EdbCalculateFormula struct {
|
|
|
BaseCalculateValue int `description:"基础计算窗口"`
|
|
@@ -2282,6 +2308,7 @@ func getEdbRuleTitle(edbInfo, parentEdbInfo *data_manage.EdbInfo, childList []da
|
|
|
return
|
|
|
}
|
|
|
ruleTitle = fmt.Sprintf("滚动相关性(计算窗口%d%s,B领先A%d%s)", correlationConf.CalculateValue, correlationConf.CalculateUnit, correlationConf.LeadValue, correlationConf.LeadUnit)
|
|
|
+ ruleTitleEn = fmt.Sprintf("Rolling Correlation (Calculation Window %d%s, B Leads A %d%s)", correlationConf.CalculateValue, correlationConf.CalculateUnit, correlationConf.LeadValue, correlationConf.LeadUnit)
|
|
|
case utils.DATA_SOURCE_CALCULATE_JP, utils.DATA_SOURCE_PREDICT_CALCULATE_JP:
|
|
|
childFrequency := ``
|
|
|
if len(childList) > 0 {
|
|
@@ -2291,8 +2318,10 @@ func getEdbRuleTitle(edbInfo, parentEdbInfo *data_manage.EdbInfo, childList []da
|
|
|
|
|
|
}
|
|
|
ruleTitle = fmt.Sprintf("降频计算(%s转%s,%s)", childFrequency, edbInfo.Frequency, edbInfo.CalculateFormula)
|
|
|
+ ruleTitleEn = fmt.Sprintf("Downsampling Calculation(%s to %s,%s)", childFrequency, edbInfo.Frequency, edbInfo.CalculateFormula)
|
|
|
case utils.DATA_SOURCE_CALCULATE_STANDARD_DEVIATION:
|
|
|
ruleTitle = fmt.Sprintf("标准差(滚动%s期)", edbInfo.CalculateFormula)
|
|
|
+ ruleTitleEn = fmt.Sprintf("Standard Deviation (Rolling %s Periods)", edbInfo.CalculateFormula)
|
|
|
case utils.DATA_SOURCE_CALCULATE_PERCENTILE, utils.DATA_SOURCE_PREDICT_CALCULATE_PERCENTILE:
|
|
|
type TempCalculate struct {
|
|
|
CalculateValue int `description:"计算窗口"`
|
|
@@ -2303,8 +2332,10 @@ func getEdbRuleTitle(edbInfo, parentEdbInfo *data_manage.EdbInfo, childList []da
|
|
|
return
|
|
|
}
|
|
|
ruleTitle = fmt.Sprintf("百分位(时间长度%d%s)", cf.CalculateValue, cf.CalculateUnit)
|
|
|
+ ruleTitle = fmt.Sprintf("Percentile (Time Length %d%s)", cf.CalculateValue, cf.CalculateUnit)
|
|
|
case utils.DATA_SOURCE_CALCULATE_ZSXY, utils.DATA_SOURCE_PREDICT_CALCULATE_ZSXY:
|
|
|
ruleTitle = `指数修匀计算`
|
|
|
+ ruleTitle = `Index Smoothing Calculation`
|
|
|
}
|
|
|
|
|
|
return
|