From 61735e2890a2df2e059848b6f8a8ac43a01442ef Mon Sep 17 00:00:00 2001 From: erdanergou Date: Thu, 11 May 2023 08:29:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A1=E6=89=B9=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DepositoryRecordController.java | 2 +- .../depository_manage/controller/PageController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java index b438e634..b8cc6241 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java @@ -1013,7 +1013,7 @@ public class DepositoryRecordController { sumQuantity += applicationOutRecordMin.getQuantity(); String unit = applicationOutRecordMin.getUnit(); if ("-1".equals(unit)) { - double amounts = inventory.getPrice() * applicationOutRecordMin.getQuantity(); + double amounts = ObjectFormatUtil.multiply(inventory.getPrice(),applicationOutRecordMin.getQuantity()); sumPrice = ObjectFormatUtil.sum(sumPrice,amounts); } else { // 获取当前对应的拆单记录 diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java index a98211df..7db1258c 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java @@ -2251,7 +2251,7 @@ public class PageController { recordMinP.setUnit(inventoryById.getUnit()); double price = 0.0; if (inventoryById.getPrice() != null) { - price = (inventoryById.getPrice()) * recordMinP.getQuantity(); + price = ObjectFormatUtil.multiply(inventoryById.getPrice(), recordMinP.getQuantity()); } BigDecimal bg = new BigDecimal(price); price = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();