Procházet zdrojové kódy

Merge branch 'feature/eta1.9.6_chart_series' into debug

xyxie před 8 měsíci
rodič
revize
201b3d70ae
2 změnil soubory, kde provedl 14 přidání a 4 odebrání
  1. 12 2
      models/chart_info.go
  2. 2 2
      services/chart_extra_config.go

+ 12 - 2
models/chart_info.go

@@ -2218,7 +2218,17 @@ type ChartSectionDateConfItem struct {
 	DateType       int    `description:"日期类型:0 指标日期,1系统日期, 2固定日期"`
 	DateConfName   string `description:"引用日期名称"` // 引用日期名称不能重复
 	DateConfNameEn string `description:"引用日期英文名称"`
-	DateChange     []*EdbDateConfDateChange
+	DateChange     []*ChartSectionDateChange
+}
+
+// 截面组合图引用日期配置
+type ChartSectionDateChange struct {
+	Year         int
+	Month        int
+	Day          int
+	Frequency    string `description:"频度变换"`
+	FrequencyDay string `description:"频度的固定日期"`
+	ChangeType   int    `description:"日期变换类型1日期位移,2指定频率"`
 }
 
 type MarkersLine struct {
@@ -2321,7 +2331,7 @@ type ChartSectionCombineDataResp struct {
 // 系列里的指标日期配置
 type ChartSectionSeriesDateConfItem struct {
 	MoveForward int `description:"前移的期数"`
-	DateChange  []*EdbDateConfDateChange
+	DateChange  []*ChartSectionDateChange
 }
 
 // PreviewSectionCombineChartReq 预览截面组合图的请求

+ 2 - 2
services/chart_extra_config.go

@@ -351,7 +351,7 @@ func GetChartSectionCombineData(chartInfo *models.ChartInfo, mappingList []*mode
 }
 
 // GetChartSectionSeriesDateByDateChange 获取日期变换后的日期edbInfoId 1指标日期,2 系统日期
-func GetChartSectionSeriesDateByDateChange(edbInfoId int, dataList []*models.EdbDataList, dateChange []*models.EdbDateConfDateChange, moveForward int) (newDate string, err error) {
+func GetChartSectionSeriesDateByDateChange(edbInfoId int, dataList []*models.EdbDataList, dateChange []*models.ChartSectionDateChange, moveForward int) (newDate string, err error) {
 	if edbInfoId > 0 { //指标日期
 		newDate = GetEdbDateByMoveForward(moveForward, dataList)
 	} else {
@@ -387,7 +387,7 @@ func GetEdbDateByMoveForwardByDateList(moveForward int, dateList []string) (date
 }
 
 // HandleChartSectionSeriesDateChange 处理日期变换
-func HandleChartSectionSeriesDateChange(date string, dateChange []*models.EdbDateConfDateChange) (newDate string, err error) {
+func HandleChartSectionSeriesDateChange(date string, dateChange []*models.ChartSectionDateChange) (newDate string, err error) {
 	newDate = date
 	if newDate != "" {
 		if len(dateChange) > 0 {