Roc 1 year ago
parent
commit
da4bbf10af
1 changed files with 3 additions and 8 deletions
  1. 3 8
      services/data/excel/mixed_table.go

+ 3 - 8
services/data/excel/mixed_table.go

@@ -150,12 +150,6 @@ func GetMixedTableCellData(cellRelationConf string, config [][]request.MixedTabl
 				}
 
 			case request.InsertEdbCalculateDataDT: // 指标类型
-				if cell.Uid == `951cab4c0c4dce3ab1c8b6498632a064` {
-					fmt.Println("a")
-				}
-				if cell.Uid == "dd301ffe98b5e7009454de1f362c58d0" {
-					fmt.Println("b")
-				}
 				// 日期
 				var cellDateTime string
 				// 日期关系配置不存在,则默认最新数据
@@ -227,8 +221,9 @@ func GetMixedTableCellData(cellRelationConf string, config [][]request.MixedTabl
 					// 计算结果存一份,万一存在重复的计算方式,那么省的重新计算一下
 					edbSourceDataMap[key] = tmpDataMap
 
-					if cellDateTime == `` && len(respItem.Data.DateList) > 0 {
-						cellDateTime = respItem.Data.DateList[0]
+					lenDataList := len(respItem.Data.DateList)
+					if cellDateTime == `` && lenDataList > 0 {
+						cellDateTime = respItem.Data.DateList[lenDataList-1]
 					}
 				}