BigDecimal保留四位小数: BigDecimal decNum = new BigDecimal(); decNum .setScale(4, BigDecimal.ROUND_HALF_UP)