From e67e7a1d88a661e3ffafe2dee93861e3e031f666 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Mon, 12 Jan 2026 14:09:17 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20=20TMS=E7=B3=BB=E7=BB=9F=20-=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=B4=A6=E5=8D=95=E7=AE=A1=E7=90=86=20-=20?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E9=94=80=E8=B4=A6=E7=94=B3=E8=AF=B7=20-=20?= =?UTF-8?q?=E7=90=86=E8=B5=94=E9=87=91=E9=A2=9D=E3=80=81=E6=8A=98=E8=AE=A9?= =?UTF-8?q?=E9=87=91=E9=A2=9D=E3=80=81=E6=8A=B5=E6=89=A3=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E3=80=81=E5=85=B6=E4=BB=96=E9=87=91=E9=A2=9D=E4=B8=8D=E4=B8=BA?= =?UTF-8?q?0=E7=9A=84=E4=B8=8D=E5=85=81=E8=AE=B8=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/EmisWriteoffApplyServiceImpl.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWriteoffApplyServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWriteoffApplyServiceImpl.java index 03fbcfb44..247913109 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWriteoffApplyServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWriteoffApplyServiceImpl.java @@ -153,6 +153,22 @@ public class EmisWriteoffApplyServiceImpl extends EmisBaseService implements IEm throw new EmisBizError("运单号 " + detail.getBillCode() + " 的账单应收金额为空"); } + // 检查结算账单的理赔金额、折让金额、抵扣金额、其他金额 + if (detail.getEmisSettleBill() == null) { + throw new EmisBizError("运单号 " + detail.getBillCode() + " 的账单信息为空"); + } + BigDecimal satisfyMoney = detail.getEmisSettleBill().getSatisfyMoney(); + BigDecimal allowanceMoney = detail.getEmisSettleBill().getAllowanceMoney(); + BigDecimal deductionMoney = detail.getEmisSettleBill().getDeductionMoney(); + BigDecimal otherMoney = detail.getEmisSettleBill().getOtherMoney(); + + if ((satisfyMoney != null && satisfyMoney.compareTo(BigDecimal.ZERO) != 0) || + (allowanceMoney != null && allowanceMoney.compareTo(BigDecimal.ZERO) != 0) || + (deductionMoney != null && deductionMoney.compareTo(BigDecimal.ZERO) != 0) || + (otherMoney != null && otherMoney.compareTo(BigDecimal.ZERO) != 0)) { + throw new EmisBizError(detail.getSettleBillNo() + " 存在理赔金额/折让金额/抵扣金额/其他金额,请联系财务处理"); + } + // 验证:申请金额 + 已收金额 <= 账单应收金额 BigDecimal totalAmount = detail.getApplyMoney().add(receivedAmount); if (totalAmount.compareTo(recMoney) > 0) {