From 18babf610c827c2785700e99415b8d8ff5b77737 Mon Sep 17 00:00:00 2001 From: yuyang Date: Wed, 25 May 2022 15:34:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E5=B0=8F=E6=95=B0=E4=BD=8D=E6=95=B0?= =?UTF-8?q?=E8=B6=85=E5=87=BA2=E4=BD=8D=EF=BC=8C=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E5=B7=B2=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xhpc/user/service/impl/XhpcInvoiceServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcInvoiceServiceImpl.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcInvoiceServiceImpl.java index 957eefb1..906d4484 100644 --- a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcInvoiceServiceImpl.java +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcInvoiceServiceImpl.java @@ -558,7 +558,7 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService { @Transactional(rollbackFor = Exception.class) public void saveInvoiceInfo(SaveInvoiceInfoRequest saveInvoiceInfoRequest) throws Exception { - + //System.out.println("<<<<<<<<<<111<<<<<<<<发票>>>>>>>>>>111>>>>>>>>"+saveInvoiceInfoRequest.toString()); //判断传入的历史订单是否被其他发票包含 List historyOrderIds = saveInvoiceInfoRequest.getHistoryOrderIds(); List lockOrderList = xhpcInvoiceMapHistoryOrderMapper.getLockedOnesByHistoryOrderId(historyOrderIds); @@ -616,7 +616,10 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService { totalServicePrice += (xhpcHistoryOrder.getServicePriceTotal().doubleValue() - xhpcHistoryOrder.getPromotionDiscount().doubleValue()); totalActPrice += xhpcHistoryOrder.getTotalPrice().doubleValue(); } - if (!BigDecimal.valueOf(totalActPrice).equals(saveInvoiceInfoRequest.getInvoiceMoney())) { + System.out.println("<<<<<<<<<<111<<<<<<<<发票 totalActPrice>>>>>>>>>>111>>>>>>>>"+totalActPrice); + BigDecimal bigDecimal = saveInvoiceInfoRequest.getInvoiceMoney().setScale(2, BigDecimal.ROUND_HALF_UP); + System.out.println("<<<<<<<<<<111<<<<<<<<发票 bigDecimal>>>>>>>>>>111>>>>>>>>"+bigDecimal); + if (!BigDecimal.valueOf(totalActPrice).equals(bigDecimal)) { throw new Exception("传入的发票金额与实际包含的历史订单总金额参数不匹配"); } xhpcInvoice.setInvoiceOrderEletricTotalMoney(BigDecimal.valueOf(totalPowerPrice));