package data import ( "eta/eta_chart_lib/models" "eta/eta_chart_lib/models/data_manage/excel" ) type ChartInfoDataShow interface { GetEdbDataMapList(chartInfoId, chartType int, calendar, startDate, endDate string, mappingList []*models.ChartEdbInfoMapping, seasonExtraConfig string) (edbDataListMap map[int][]*models.EdbDataList, edbList []*models.ChartEdbInfoMapping, err error) GetChartEdbMappingListByEdbInfoIdList(edbIdList []int) (mappingList []*models.ChartEdbInfoMapping, err error) } type BaseChartInfoDataShow struct { } // GetEdbDataMapList 获取指标最后的基础数据 func (e *BaseChartInfoDataShow) GetEdbDataMapList(chartInfoId, chartType int, calendar, startDate, endDate string, mappingList []*models.ChartEdbInfoMapping, seasonExtraConfig string) (edbDataListMap map[int][]*models.EdbDataList, edbList []*models.ChartEdbInfoMapping, err error) { // 指标对应的所有数据 edbDataListMap, edbList, err = GetEdbDataMapList(chartInfoId, chartType, calendar, startDate, endDate, mappingList, seasonExtraConfig) return } // GetChartEdbMappingListByEdbInfoIdList 获取指标最后的基础数据 func (e *BaseChartInfoDataShow) GetChartEdbMappingListByEdbInfoIdList(edbIdList []int) (mappingList []*models.ChartEdbInfoMapping, err error) { mappingList, err = models.GetChartEdbMappingListByEdbInfoIdList(edbIdList) return } type ExcelChartInfoDataShow struct { DataListMap map[int][]*models.EdbDataList MappingListTmp []*excel.ExcelChartEdb } // GetEdbDataMapList 获取指标最后的基础数据 func (e *ExcelChartInfoDataShow) GetEdbDataMapList(chartInfoId, chartType int, calendar, startDate, endDate string, mappingList []*models.ChartEdbInfoMapping, seasonExtraConfig string) (edbDataListMap map[int][]*models.EdbDataList, edbList []*models.ChartEdbInfoMapping, err error) { // 指标对应的所有数据 edbDataListMap, edbList, err = GetBalanceExcelEdbDataMapList(chartInfoId, chartType, calendar, startDate, endDate, mappingList, seasonExtraConfig, e.DataListMap) return } // GetChartEdbMappingListByEdbInfoIdList 获取指标最后的基础数据 func (e *ExcelChartInfoDataShow) GetChartEdbMappingListByEdbInfoIdList(edbIdList []int) (mappingList []*models.ChartEdbInfoMapping, err error) { // 指标对应的所有数据 mappingList, err = TransferChartEdbToEdbMappingFormat(0, 0, e.MappingListTmp, e.DataListMap) return }