|
@@ -205,18 +205,9 @@ func GetChartDataByEdbInfo(edbInfoMappingA, edbInfoMappingB *models.ChartEdbInfo
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- frequencyIntMap := map[string]int{
|
|
|
- "日度": 1, "周度": 2, "旬度": 3, "月度": 4, "季度": 5, "年度": 6,
|
|
|
- }
|
|
|
- baseEdbInfo := edbInfoMappingA
|
|
|
- changeEdbInfo := edbInfoMappingB
|
|
|
- if edbInfoMappingA.Frequency != edbInfoMappingB.Frequency {
|
|
|
- if frequencyIntMap[edbInfoMappingA.Frequency] >= frequencyIntMap[edbInfoMappingB.Frequency] {
|
|
|
- baseEdbInfo = edbInfoMappingB
|
|
|
- changeEdbInfo = edbInfoMappingA
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ baseEdbInfo := edbInfoMappingB
|
|
|
+ changeEdbInfo := edbInfoMappingA
|
|
|
|
|
|
|
|
|
baseDataList := make([]*models.EdbDataList, 0)
|
|
@@ -276,9 +267,6 @@ func GetChartDataByEdbInfo(edbInfoMappingA, edbInfoMappingB *models.ChartEdbInfo
|
|
|
}
|
|
|
moveUnitDays := frequencyDaysMap[leadUnit]
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
for i := range xData {
|
|
|
if xData[i] == 0 {
|
|
|
yData = append(yData, zeroRatio)
|
|
@@ -287,12 +275,7 @@ func GetChartDataByEdbInfo(edbInfoMappingA, edbInfoMappingB *models.ChartEdbInfo
|
|
|
yCalculateData := make([]float64, 0)
|
|
|
|
|
|
|
|
|
- mDays := 0
|
|
|
- if baseEdbInfo.EdbInfoId == edbInfoMappingA.EdbInfoId {
|
|
|
- mDays = int(moveUnitDays) * -xData[i]
|
|
|
- } else {
|
|
|
- mDays = int(moveUnitDays) * xData[i]
|
|
|
- }
|
|
|
+ mDays := int(moveUnitDays) * xData[i]
|
|
|
_, dMap := MoveDataDaysToNewDataList(newChangeDataList, mDays)
|
|
|
|
|
|
|