|
@@ -1025,6 +1025,7 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
|
|
|
itemLength := len(result.List[length-1].Items)
|
|
|
//获取数据的最新日期
|
|
|
lastDate := result.List[length-1].Items[itemLength-1].DataTime
|
|
|
+ maxY := result.List[length-1].Year
|
|
|
lastDateT, tmpErr := time.Parse(utils.FormatDate, lastDate)
|
|
|
if tmpErr != nil {
|
|
|
err = tmpErr
|
|
@@ -1039,6 +1040,7 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
|
|
|
quarterMap := make(map[string][]*data_manage.EdbDataList, 0)
|
|
|
|
|
|
//整理出日期
|
|
|
+ var startTmpT, endTmpT time.Time
|
|
|
idx := 1
|
|
|
chartLegendMap := make(map[string]int, 0)
|
|
|
for currentStartYear := startYear; currentStartYear <= endYear; currentStartYear++ {
|
|
@@ -1077,6 +1079,8 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
|
|
|
}
|
|
|
dataMap[showName] = item
|
|
|
fmt.Println("年份" + showName + "日期" + startStr + " " + endStr)
|
|
|
+ startTmpT = startT
|
|
|
+ endTmpT = endT
|
|
|
chartLegendMap[showName] = idx
|
|
|
idx++
|
|
|
if lastDateT.Before(endT) {
|
|
@@ -1099,7 +1103,7 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
|
|
|
}
|
|
|
|
|
|
//判断哪些点应该落在同一条时间线上
|
|
|
- maxY := lastDateT.Year()
|
|
|
+ /*maxY := lastDateT.Year()
|
|
|
changeFlag := false
|
|
|
if lastDateT.Month() >= 11 {
|
|
|
maxY = maxY + 1
|
|
@@ -1107,22 +1111,28 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
|
|
|
if maxY < nowYear {
|
|
|
changeFlag = true
|
|
|
maxY = nowYear
|
|
|
- }
|
|
|
- endTmp := fmt.Sprintf("%d-%s", maxY, xEndDate)
|
|
|
+ }*/
|
|
|
+ /*endTmp := fmt.Sprintf("%d-%s", maxY, xEndDate)
|
|
|
endTmpT, _ := time.Parse(utils.FormatDate, endTmp)
|
|
|
minY := maxY
|
|
|
if jumpYear == 1 {
|
|
|
minY = maxY - 1
|
|
|
}
|
|
|
startTmp := fmt.Sprintf("%d-%s", minY, xStartDate)
|
|
|
- startTmpT, _ := time.Parse(utils.FormatDate, startTmp)
|
|
|
+ startTmpT, _ := time.Parse(utils.FormatDate, startTmp)*/
|
|
|
|
|
|
fmt.Println("横轴截取日" + startTmpT.Format(utils.FormatDate) + " " + endTmpT.Format(utils.FormatDate))
|
|
|
+ fmt.Printf("lastDateT.Year() 为%d \n", lastDateT.Year())
|
|
|
+ fmt.Printf("maxY 为%d \n", maxY)
|
|
|
for name, dateItem := range dataMap {
|
|
|
- lv, ok1 := yearDataListMap[dateItem.EndDate.Year()]
|
|
|
- if changeFlag {
|
|
|
- lv, ok1 = yearDataListMap[dateItem.StartDate.Year()]
|
|
|
+ tY := dateItem.EndDate.Year()
|
|
|
+ if lastDateT.Month() >= 11 {
|
|
|
+ if maxY > endTmpT.Year() {
|
|
|
+ tY = tY + 1
|
|
|
+ }
|
|
|
}
|
|
|
+ lv, ok1 := yearDataListMap[tY]
|
|
|
+ fmt.Printf("name %s yearDataListMap[%d]\n", name, tY)
|
|
|
if !ok1 {
|
|
|
continue
|
|
|
}
|