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));