|
@@ -120,12 +120,22 @@ func (this *FutureGoodChartInfoController) ProfitChartInfoAdd() {
|
|
var edbInfoIdArr []int
|
|
var edbInfoIdArr []int
|
|
baseEdbInfo := new(data_manage.EdbInfo)
|
|
baseEdbInfo := new(data_manage.EdbInfo)
|
|
|
|
|
|
- edbInfoList, err := data_manage.GetEdbInfoByIdList(extraReq.EdbInfoIdList)
|
|
+ edbInfoListTmp, err := data_manage.GetEdbInfoByIdList(extraReq.EdbInfoIdList)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取指标信息失败!"
|
|
br.Msg = "获取指标信息失败!"
|
|
br.ErrMsg = "获取图表的指标信息失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取图表的指标信息失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ edbInfoMap := make(map[int]*data_manage.EdbInfo)
|
|
|
|
+ for _, v := range edbInfoListTmp {
|
|
|
|
+ edbInfoMap[v.EdbInfoId] = v
|
|
|
|
+ }
|
|
|
|
+ edbInfoList := make([]*data_manage.EdbInfo, 0)
|
|
|
|
+ for _, v := range extraReq.EdbInfoIdList {
|
|
|
|
+ edbInfoList = append(edbInfoList, edbInfoMap[v])
|
|
|
|
+ }
|
|
|
|
+
|
|
edbInfoListMap := make(map[int]*data_manage.EdbInfo)
|
|
edbInfoListMap := make(map[int]*data_manage.EdbInfo)
|
|
for k, v := range edbInfoList {
|
|
for k, v := range edbInfoList {
|
|
edbInfoList[k].EdbNameSource = v.EdbName
|
|
edbInfoList[k].EdbNameSource = v.EdbName
|
|
@@ -463,12 +473,21 @@ func (this *FutureGoodChartInfoController) ProfitChartInfoEdit() {
|
|
var edbInfoIdArr []int
|
|
var edbInfoIdArr []int
|
|
baseEdbInfo := new(data_manage.EdbInfo)
|
|
baseEdbInfo := new(data_manage.EdbInfo)
|
|
|
|
|
|
- edbInfoList, err := data_manage.GetEdbInfoByIdList(extraReq.EdbInfoIdList)
|
|
+ edbInfoListTmp, err := data_manage.GetEdbInfoByIdList(extraReq.EdbInfoIdList)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取指标信息失败!"
|
|
br.Msg = "获取指标信息失败!"
|
|
br.ErrMsg = "获取图表的指标信息失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取图表的指标信息失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ edbInfoMap := make(map[int]*data_manage.EdbInfo)
|
|
|
|
+ for _, v := range edbInfoListTmp {
|
|
|
|
+ edbInfoMap[v.EdbInfoId] = v
|
|
|
|
+ }
|
|
|
|
+ edbInfoList := make([]*data_manage.EdbInfo, 0)
|
|
|
|
+ for _, v := range extraReq.EdbInfoIdList {
|
|
|
|
+ edbInfoList = append(edbInfoList, edbInfoMap[v])
|
|
|
|
+ }
|
|
edbInfoListMap := make(map[int]*data_manage.EdbInfo)
|
|
edbInfoListMap := make(map[int]*data_manage.EdbInfo)
|
|
for k, v := range edbInfoList {
|
|
for k, v := range edbInfoList {
|
|
edbInfoList[k].EdbNameSource = v.EdbName
|
|
edbInfoList[k].EdbNameSource = v.EdbName
|
|
@@ -924,13 +943,20 @@ func (this *FutureGoodChartInfoController) PreviewProfitChartInfo() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
- edbInfoList, err := data_manage.GetEdbInfoByIdList(req.EdbInfoIdList)
|
|
+ edbInfoListTmp, err := data_manage.GetEdbInfoByIdList(req.EdbInfoIdList)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取失败"
|
|
br.Msg = "获取失败"
|
|
br.ErrMsg = "获取图表,指标信息失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取图表,指标信息失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
-
|
|
+ edbInfoMap := make(map[int]*data_manage.EdbInfo)
|
|
|
|
+ for _, v := range edbInfoListTmp {
|
|
|
|
+ edbInfoMap[v.EdbInfoId] = v
|
|
|
|
+ }
|
|
|
|
+ edbInfoList := make([]*data_manage.EdbInfo, 0)
|
|
|
|
+ for _, v := range req.EdbInfoIdList {
|
|
|
|
+ edbInfoList = append(edbInfoList, edbInfoMap[v])
|
|
|
|
+ }
|
|
|
|
|
|
barConfigEdbInfoIdList, _, _, xDataList, yDataList, err := future_goodServ.GetProfitChartEdbData(baseEdbInfo, edbInfoList, zlFutureGoodEdbInfoList, req.DateList, req.CalculateFormula, req.FutureGoodEdbInfoIdList, req.XDataList)
|
|
barConfigEdbInfoIdList, _, _, xDataList, yDataList, err := future_goodServ.GetProfitChartEdbData(baseEdbInfo, edbInfoList, zlFutureGoodEdbInfoList, req.DateList, req.CalculateFormula, req.FutureGoodEdbInfoIdList, req.XDataList)
|
|
if err != nil {
|
|
if err != nil {
|