|
@@ -891,6 +891,7 @@ func GetSeasonEdbInfoDataListByXDate(dataList []*data_manage.EdbDataList, latest
|
|
|
dataMap[name] = item
|
|
|
chartLegendMap[name] = idx
|
|
|
idx++
|
|
|
+ fmt.Println("年份" + showName + "日期" + startStr + " " + endStr)
|
|
|
if lastDateT.Before(endT) {
|
|
|
//如果最新的日期在起始日之前,则跳出循环
|
|
|
break
|
|
@@ -1013,6 +1014,7 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
|
|
|
//判断横轴的两个时间之间是不是跨年了,如果跨年了,则横轴截止年份比起始年份+1,如果不跨年,截止年份等于起始年份
|
|
|
//根据数据确定最早的年份,和最近年份
|
|
|
//根据横轴的日期,汇总所有的年份
|
|
|
+
|
|
|
startYear := result.List[0].Year
|
|
|
/*if jumpYear == 1 {
|
|
|
if startYear != calendarPreYear {
|
|
@@ -1020,6 +1022,7 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
|
|
|
}
|
|
|
}*/
|
|
|
itemLength := len(result.List[length-1].Items)
|
|
|
+ maxY := result.List[length-1].Year
|
|
|
//获取数据的最新日期
|
|
|
lastDate := result.List[length-1].Items[itemLength-1].DataTime
|
|
|
lastDateT, tmpErr := time.Parse(utils.FormatDate, lastDate)
|
|
@@ -1073,6 +1076,7 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
|
|
|
ShowName: showName,
|
|
|
}
|
|
|
dataMap[showName] = item
|
|
|
+ fmt.Println("年份" + showName + "日期" + startStr + " " + endStr)
|
|
|
chartLegendMap[showName] = idx
|
|
|
idx++
|
|
|
if lastDateT.Before(endT) {
|
|
@@ -1095,10 +1099,10 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
|
|
|
}
|
|
|
|
|
|
//判断哪些点应该落在同一条时间线上
|
|
|
- maxY := lastDateT.Year()
|
|
|
+ /*maxY := lastDateT.Year()
|
|
|
if lastDateT.Month() >= 11 && jumpYear == 1 {
|
|
|
maxY = maxY + 1
|
|
|
- }
|
|
|
+ }*/
|
|
|
endTmp := fmt.Sprintf("%d-%s", maxY, xEndDate)
|
|
|
endTmpT, _ := time.Parse(utils.FormatDate, endTmp)
|
|
|
minY := maxY
|
|
@@ -1108,6 +1112,7 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
|
|
|
startTmp := fmt.Sprintf("%d-%s", minY, xStartDate)
|
|
|
startTmpT, _ := time.Parse(utils.FormatDate, startTmp)
|
|
|
|
|
|
+ fmt.Println("横轴截取日" + startTmpT.Format(utils.FormatDate) + " " + endTmpT.Format(utils.FormatDate))
|
|
|
for name, dateItem := range dataMap {
|
|
|
lv, ok1 := yearDataListMap[dateItem.EndDate.Year()]
|
|
|
if !ok1 {
|