소스 검색

fix:混合表格,兼容年月这种日期格式

Roc 1 년 전
부모
커밋
82a97eefb5
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      services/data/excel_info.go

+ 2 - 2
services/data/excel_info.go

@@ -1129,7 +1129,7 @@ func GetMixedTableCellData(config [][]request.MixedTableCellDataReq) (newMixedTa
 		for _, cell := range row {
 			if cell.DataType == 2 {
 				edbInfoIdList = append(edbInfoIdList, cell.EdbInfoId)
-			} else if cell.DataType == 4 {
+			} else if utils.InArrayByInt([]int{4, 5}, cell.DataType) {
 				dataEdbInfoIdList = append(dataEdbInfoIdList, cell.EdbInfoId)
 			}
 		}
@@ -1180,7 +1180,7 @@ func GetMixedTableCellData(config [][]request.MixedTableCellDataReq) (newMixedTa
 				if edbInfo, ok := edbInfoMap[cell.EdbInfoId]; ok {
 					cell.ShowValue = edbInfo.EdbName
 				}
-			} else if cell.DataType == 4 {
+			} else if utils.InArrayByInt([]int{4, 5}, cell.DataType) {
 				tmpDateList := strings.Split(cell.DataTime, "-")
 				tmpDateValMap := make(map[string]float64)
 				if len(tmpDateList) == 2 {