Bläddra i källkod

fix:修复表格异常数据

zqbao 5 månader sedan
förälder
incheckning
0d63451172
1 ändrade filer med 7 tillägg och 0 borttagningar
  1. 7 0
      services/excel/lucky_sheet.go

+ 7 - 0
services/excel/lucky_sheet.go

@@ -1224,6 +1224,13 @@ func GetTableDataByMixedTableData(config [][]request.MixedTableCellDataReq, hide
 						tmp.FontColor = styleConfig.Color
 					}
 					tmp.Monitor = cell.ShowFormatValue
+					// 如果没有showValue, 则使用value
+					if cell.ShowValue == "" {
+						_, err := strconv.ParseFloat(cell.Value, 64)
+						if err == nil {
+							cell.ShowValue = cell.Value
+						}
+					}
 					_, err := strconv.ParseFloat(cell.ShowValue, 64)
 					if err == nil {
 						hasPercent := false