فهرست منبع

fix:表格小数位

zqbao 6 ماه پیش
والد
کامیت
5ead36bf46
1فایلهای تغییر یافته به همراه0 افزوده شده و 4 حذف شده
  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()