浏览代码

Merge remote-tracking branch 'origin/debug' into debug

Roc 1 年之前
父节点
当前提交
f78c34b285
共有 1 个文件被更改,包括 7 次插入10 次删除
  1. 7 10
      services/data/chart_info.go

+ 7 - 10
services/data/chart_info.go

@@ -1100,15 +1100,15 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
 	}
 
 	//判断哪些点应该落在同一条时间线上
-	maxY := 0
-	for _, lv := range result.List {
+	maxY := lastDateT.Year()
+	/*for _, lv := range result.List {
 		for _, item := range lv.Items {
 			dataTimeT, _ := time.Parse(utils.FormatDate, item.DataTime)
 			if dataTimeT.Year() > maxY {
 				maxY = dataTimeT.Year()
 			}
 		}
-	}
+	}*/
 	endTmp := fmt.Sprintf("%d-%s", maxY, xEndDate)
 	endTmpT, _ := time.Parse(utils.FormatDate, endTmp)
 	minY := maxY
@@ -1120,14 +1120,11 @@ func GetSeasonEdbInfoDataListByXDateNong(result *data_manage.EdbDataResult, late
 
 	for name, dateItem := range dataMap {
 		lv, ok1 := yearDataListMap[dateItem.EndDate.Year()]
-		if thisMonth > 11 {
-			lv, ok1 = yearDataListMap[dateItem.EndDate.Year()-1]
-		}
-		if dateItem.EndDate.Year() > maxY {
+		/*if thisMonth > 11 {
+			lv, ok1 = yearDataListMap[dateItem.EndDate.Year()+1]
+		}*/
+		if dateItem.EndDate.Year() > lastDateT.Year() {
 			lv, ok1 = yearDataListMap[dateItem.StartDate.Year()]
-			if thisMonth > 11 {
-				lv, ok1 = yearDataListMap[dateItem.StartDate.Year()-1]
-			}
 		}
 		if !ok1 {
 			continue