|
@@ -298,6 +298,7 @@ func (this *ChartInfoController) CommonChartInfoDetailFromUniqueCode() {
|
|
|
endInfoList := make([]*data_manage.ChartEdbInfoMapping, 0)
|
|
|
resp.EdbInfoList = endInfoList
|
|
|
resp.ChartInfo = chartInfo
|
|
|
+ resp.Status = false
|
|
|
|
|
|
br.Data = resp
|
|
|
br.Ret = 200
|
|
@@ -377,7 +378,7 @@ func getBalanceChartInfoDetailFromUniqueCode(chartInfo *data_manage.ChartInfoVie
|
|
|
}
|
|
|
|
|
|
// GetAiPredictChartInfoDetailFromUniqueCode 根据编码获取AI预测模型图表详情
|
|
|
-func GetAiPredictChartInfoDetailFromUniqueCode(chartInfo *data_manage.ChartInfoView, isCache bool) (resp *data_manage.ChartInfoDetailResp, isOk bool, msg, errMsg string) {
|
|
|
+func GetAiPredictChartInfoDetailFromUniqueCode(chartInfo *data_manage.ChartInfoView, isCache bool) (resp *data_manage.ChartInfoDetailFromUniqueCodeResp, isOk bool, msg, errMsg string) {
|
|
|
var err error
|
|
|
msg = "获取成功"
|
|
|
defer func() {
|
|
@@ -396,7 +397,7 @@ func GetAiPredictChartInfoDetailFromUniqueCode(chartInfo *data_manage.ChartInfoV
|
|
|
err = fmt.Errorf("图表来源有误, Source: %d", chartInfo.Source)
|
|
|
return
|
|
|
}
|
|
|
- resp = new(data_manage.ChartInfoDetailResp)
|
|
|
+ resp = new(data_manage.ChartInfoDetailFromUniqueCodeResp)
|
|
|
|
|
|
// 获取图表标的
|
|
|
edbMappings, e := data_manage.GetChartEdbMappingsByChartInfoId(chartInfo.ChartInfoId)
|
|
@@ -462,11 +463,21 @@ func GetAiPredictChartInfoDetailFromUniqueCode(chartInfo *data_manage.ChartInfoV
|
|
|
}
|
|
|
|
|
|
// 图表详情
|
|
|
- resp, e = services.GetAiPredictChartDetailByData(indexItem, indexData, dataSource)
|
|
|
+ chartDetail, e := services.GetAiPredictChartDetailByData(indexItem, indexData, dataSource)
|
|
|
if e != nil {
|
|
|
err = fmt.Errorf("获取图表详情失败, %v", e)
|
|
|
return
|
|
|
}
|
|
|
+ resp.ChartInfo = chartDetail.ChartInfo
|
|
|
+ resp.EdbInfoList = chartDetail.EdbInfoList
|
|
|
+ resp.XEdbIdValue = chartDetail.XEdbIdValue
|
|
|
+ resp.YDataList = chartDetail.YDataList
|
|
|
+ resp.XDataList = chartDetail.XDataList
|
|
|
+ resp.BarChartInfo = chartDetail.BarChartInfo
|
|
|
+ resp.CorrelationChartInfo = chartDetail.CorrelationChartInfo
|
|
|
+ resp.DataResp = chartDetail.DataResp
|
|
|
+ resp.Status = true
|
|
|
+
|
|
|
if utils.Re == nil {
|
|
|
jsonData, _ := json.Marshal(resp)
|
|
|
_ = utils.Rc.Put(key, jsonData, 10*time.Minute)
|