|
@@ -282,10 +282,14 @@ func fillMappingChartInfo(req residual_analysis_model.ResidualAnalysisReq, edbIn
|
|
|
|
|
|
for _, indexData := range dataList {
|
|
|
if _, ok := indexADataMap[indexData.DataTime]; ok {
|
|
|
+ indexDataCopy := *indexData
|
|
|
+
|
|
|
+ fmt.Println(math.Round(a*indexData.Value+b) / 10000)
|
|
|
// 计算指标B映射值
|
|
|
- indexData.Value = math.Round(a*indexData.Value+b) / 10000
|
|
|
+ indexDataCopy.Value = math.Round(a*indexData.Value+b) / 10000
|
|
|
|
|
|
- dataBList = append(dataBList, indexData)
|
|
|
+ // 将副本添加到 dataBList
|
|
|
+ dataBList = append(dataBList, &indexDataCopy)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -328,9 +332,9 @@ func fillOriginalChart(req residual_analysis_model.ResidualAnalysisReq, mappingL
|
|
|
edbInfoMapping.ChartColor = `#F00`
|
|
|
edbInfoMapping.ChartWidth = 1
|
|
|
|
|
|
- edbInfoMappingB.DataList = append([]*data_manage.EdbDataList(nil), dataList...)
|
|
|
+ edbInfoMappingB.DataList = dataList
|
|
|
} else {
|
|
|
- edbInfoMappingA.DataList = append([]*data_manage.EdbDataList(nil), dataList...)
|
|
|
+ edbInfoMappingA.DataList = dataList
|
|
|
}
|
|
|
edbInfoMapping.EdbInfoId = v.EdbInfoId
|
|
|
edbInfoMapping.EdbName = v.EdbName
|