|
@@ -112,50 +112,6 @@ func (this *ChartController) ChartInfoDetail() {
|
|
|
if conf[models.BusinessConfWatermarkChart] == "true" && conf[models.BusinessConfCompanyWatermark] != "" {
|
|
|
resp.WaterMark = conf[models.BusinessConfCompanyWatermark]
|
|
|
}
|
|
|
-
|
|
|
- edbList, xEdbIdValue, yDataList, dataResp, err, errMsg := data.GetChartEdbData(chartInfoId, chartType, calendar, startDate, endDate, mappingList, extraConfigStr, chartInfo.SeasonExtraConfig)
|
|
|
- if err != nil {
|
|
|
- br.Msg = "获取失败"
|
|
|
- if errMsg != `` {
|
|
|
- br.Msg = errMsg
|
|
|
- }
|
|
|
- br.ErrMsg = "获取图表,指标信息失败,Err:" + err.Error()
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- for _, v := range edbList {
|
|
|
- // 指标别名
|
|
|
- if barConfig.EdbInfoIdList != nil && len(barConfig.EdbInfoIdList) > 0 {
|
|
|
- for _, reqEdb := range barConfig.EdbInfoIdList {
|
|
|
- if v.EdbInfoId == reqEdb.EdbInfoId {
|
|
|
- v.EdbAliasName = reqEdb.Name
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 图表的指标来源
|
|
|
- sourceNameList, sourceNameEnList := data.GetEdbSourceByEdbInfoIdList(edbList)
|
|
|
- chartInfo.ChartSource = strings.Join(sourceNameList, ",")
|
|
|
- chartInfo.ChartSourceEn = strings.Join(sourceNameEnList, ",")
|
|
|
-
|
|
|
- // 单位
|
|
|
- if chartType == utils.CHART_TYPE_BAR && len(yDataList) > 0 {
|
|
|
- chartInfo.Unit = yDataList[0].Unit
|
|
|
- chartInfo.UnitEn = yDataList[0].UnitEn
|
|
|
- }
|
|
|
-
|
|
|
- resp.ChartInfo = chartInfo
|
|
|
- resp.EdbInfoList = edbList
|
|
|
- resp.XEdbIdValue = xEdbIdValue
|
|
|
- resp.YDataList = yDataList
|
|
|
- resp.DataResp = dataResp
|
|
|
-
|
|
|
- if utils.Re == nil {
|
|
|
- data, _ := json.Marshal(resp)
|
|
|
- utils.Rc.Put(key, data, 10*time.Minute)
|
|
|
- }
|
|
|
-
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "获取成功"
|