mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-07-26 07:28:58 +08:00
refactor(coal): 提升仓库收货单相关计算精度
- 将 NumberUtils.round2 方法替换为 NumberUtils.round4,提高计算精度到小数点后四位- 修改 BigDecimal 设置小数位数的方法,从 setScale(2, RoundingMode.HALF_UP) 改为 setScale(4, RoundingMode.HALF_UP)
This commit is contained in:
@@ -201,7 +201,7 @@ public class WarehouseReceiptService
|
||||
.reduce(0.0, Double::sum)));
|
||||
|
||||
receipt0.setAmount(
|
||||
NumberUtils.round4(
|
||||
NumberUtils.round2(
|
||||
receipt0.getDetail().stream()
|
||||
.map(WarehouseReceiptDetailEntity::getAmount)
|
||||
.reduce(0.0, Double::sum)));
|
||||
|
||||
Reference in New Issue
Block a user