Browse Source

fix:表格小数位

zqbao 6 months ago
parent
commit
5ead36bf46
1 changed files with 0 additions and 4 deletions
  1. 0 4
      services/data/excel/mixed_table.go

+ 0 - 4
services/data/excel/mixed_table.go

@@ -1263,10 +1263,6 @@ func getDecimalLen(str string, isPercent bool) (decimalPlaces int) {
 }
 
 func roundNumber(num string, decimalPlaces int, hasPercent bool) string {
-	if strings.Contains(num, "%") {
-		hasPercent = true
-		num = strings.Trim(num, "%")
-	}
 	numFloat, _ := strconv.ParseFloat(num, 64)
 	numFloat, _ = decimal.NewFromFloat(numFloat).Round(int32(decimalPlaces)).Float64()