|
@@ -20,6 +20,7 @@ type EdbInfoCalculateSaveReq struct {
|
|
|
Calendar string `description:"公历/农历"`
|
|
|
EmptyType int `description:"空值处理类型(0查找前后35天,1不计算,2前值填充,3后值填充,4等于0)"`
|
|
|
MaxEmptyType int `description:"MAX、MIN公式空值处理类型(1、等于0;2、跳过空值)"`
|
|
|
+ Extra string `description:"指标的额外配置"`
|
|
|
EdbInfoIdArr []EdbInfoFromTag `description:"指标信息"`
|
|
|
}
|
|
|
|
|
@@ -74,6 +75,9 @@ type EdbInfoCalculateDetail struct {
|
|
|
StartDate string `description:"开始日期"`
|
|
|
EndDate string `description:"结束日期"`
|
|
|
EdbType int `description:"指标类型:1:基础指标,2:计算指标"`
|
|
|
+ Frequency string `description:"频率"`
|
|
|
+ Unit string `description:"单位"`
|
|
|
+ ClassifyId int `description:"分类id"`
|
|
|
}
|
|
|
|
|
|
func GetEdbInfoCalculateDetail(edbInfoId, source int) (list []*EdbInfoCalculateDetail, err error) {
|
|
@@ -86,7 +90,7 @@ func GetEdbInfoCalculateDetail(edbInfoId, source int) (list []*EdbInfoCalculateD
|
|
|
//
|
|
|
//sql = fmt.Sprintf(sql, calculateTableName)
|
|
|
|
|
|
- sql := ` SELECT a.edb_info_calculate_mapping_id,a.edb_info_id,a.source,a.source_name,a.edb_code,a.from_edb_info_id,a.from_edb_code,a.from_source,a.from_source_name,a.sort,a.create_time,a.modify_time,a.from_tag,a.move_value,b.edb_name_source as from_edb_name,b.start_date,b.end_date,b.edb_type FROM edb_info_calculate_mapping AS a
|
|
|
+ sql := ` SELECT a.edb_info_calculate_mapping_id,a.edb_info_id,a.source,a.source_name,a.edb_code,a.from_edb_info_id,a.from_edb_code,a.from_source,a.from_source_name,a.sort,a.create_time,a.modify_time,a.from_tag,a.move_value,b.edb_name_source as from_edb_name,b.start_date,b.end_date,b.edb_type, b.frequency, b.unit, b.classify_id FROM edb_info_calculate_mapping AS a
|
|
|
INNER JOIN edb_info AS b ON a.from_edb_info_id=b.edb_info_id
|
|
|
WHERE a.edb_info_id=? ORDER BY sort ASC `
|
|
|
|
|
@@ -109,6 +113,7 @@ type EdbInfoCalculateEditReq struct {
|
|
|
EmptyType int `description:"空值处理类型(0查找前后35天,1不计算,2前值填充,3后值填充,4等于0)"`
|
|
|
MaxEmptyType int `description:"MAX、MIN公式空值处理类型(1、等于0;2、跳过空值)"`
|
|
|
EdbInfoIdArr []EdbInfoFromTag `description:"指标信息"`
|
|
|
+ Extra string `description:"指标的额外配置"`
|
|
|
}
|
|
|
|
|
|
func GetCalculateEdbInfo(edbInfoId int) (from_edb_info_id string, err error) {
|
|
@@ -166,6 +171,7 @@ type EdbInfoCalculateBatchSaveReq struct {
|
|
|
MoveType int `description:"移动方式:1:领先(默认),2:滞后"`
|
|
|
MoveFrequency string `description:"移动频度:天/周/月/季/年"`
|
|
|
Calendar string `description:"公历/农历"`
|
|
|
+ Extra string `description:"指标的额外配置"`
|
|
|
}
|
|
|
|
|
|
type EdbInfoCalculateBatchEditReq struct {
|
|
@@ -181,6 +187,7 @@ type EdbInfoCalculateBatchEditReq struct {
|
|
|
MoveFrequency string `description:"移动频度:天/周/月/季/年"`
|
|
|
Calendar string `description:"公历/农历"`
|
|
|
EdbInfoIdArr []EdbInfoFromTag
|
|
|
+ Extra string `description:"指标的额外配置"`
|
|
|
}
|
|
|
|
|
|
// EdbInfoCalculateBatchSaveReqByEdbLib edb指标库的请求逻辑
|
|
@@ -202,6 +209,7 @@ type EdbInfoCalculateBatchSaveReqByEdbLib struct {
|
|
|
Calendar string `description:"公历/农历"`
|
|
|
EmptyType int `description:"空值处理类型(0查找前后35天,1不计算,2前值填充,3后值填充,4等于0)"`
|
|
|
MaxEmptyType int `description:"MAX、MIN公式空值处理类型(1、等于0;2、跳过空值)"`
|
|
|
+ Extra string `description:"指标的额外配置"`
|
|
|
}
|
|
|
|
|
|
// EdbInfoCalculateBatchEditReq 编辑计算指标的请求参数
|
|
@@ -218,6 +226,7 @@ type EdbInfoCalculateBatchEditReqByEdbLib struct {
|
|
|
MoveFrequency string `description:"移动频度:天/周/月/季/年"`
|
|
|
Calendar string `description:"公历/农历"`
|
|
|
EdbInfoIdArr []EdbInfoFromTag
|
|
|
+ Extra string `description:"指标的额外配置"`
|
|
|
}
|
|
|
|
|
|
func GetEdbInfoCalculateMap(edbInfoId, source int) (list []*EdbInfo, err error) {
|