From 1492a58adbd866035c1698e918cd5dd0deba54d5 Mon Sep 17 00:00:00 2001 From: lihao Date: Wed, 14 May 2025 14:32:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E6=AC=BE=E5=8D=95=E4=BB=B7=E7=A8=8E?= =?UTF-8?q?=E5=90=88=E8=AE=A1=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/GatheringbillEditSaveBatchBSAction.java | 10 ++++++---- .../arap/actions/GatheringbillSaveBatchBSAction.java | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/arap/src/private/nc/bs/arap/actions/GatheringbillEditSaveBatchBSAction.java b/arap/src/private/nc/bs/arap/actions/GatheringbillEditSaveBatchBSAction.java index 0d816c3..0f5a5f6 100644 --- a/arap/src/private/nc/bs/arap/actions/GatheringbillEditSaveBatchBSAction.java +++ b/arap/src/private/nc/bs/arap/actions/GatheringbillEditSaveBatchBSAction.java @@ -71,23 +71,25 @@ public class GatheringbillEditSaveBatchBSAction extends BillUpdateBatchBSAction UFDouble changeMoney = money.sub(oriMoney); // 根据销售订单id去查询销售订单 BaseDAO dao = new BaseDAO(); - String sql = "select nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" + def3 + String sql = "select vbillcode,nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" + def3 + "'"; + Map saleMap = (Map) dao.executeQuery(sql, new MapProcessor()); // 销售订单价税合计 UFDouble ntotalorigmny = UFDouble.ZERO_DBL; // 销售订单实际收款金额 UFDouble nreceivedmny = UFDouble.ZERO_DBL; - if (saleMap != null) { + String vbillcode = ""; + if(saleMap != null) { nreceivedmny = new UFDouble( saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString()); ntotalorigmny = new UFDouble( saleMap.get("ntotalorigmny") == null ? "0" : saleMap.get("ntotalorigmny").toString()); + vbillcode = saleMap.get("vbillcode") == null ? "" : saleMap.get("vbillcode").toString(); } - if (money.compareTo(ntotalorigmny) > 0) { UFDouble moreMoney = money.sub(ntotalorigmny); - throw new BusinessException("【该笔收款已超销售订单" + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); + throw new BusinessException("【该笔收款税收合计" + money + "已超销售订单 [" + vbillcode + "] " + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); } } diff --git a/arap/src/private/nc/bs/arap/actions/GatheringbillSaveBatchBSAction.java b/arap/src/private/nc/bs/arap/actions/GatheringbillSaveBatchBSAction.java index 188c52d..7db1f56 100644 --- a/arap/src/private/nc/bs/arap/actions/GatheringbillSaveBatchBSAction.java +++ b/arap/src/private/nc/bs/arap/actions/GatheringbillSaveBatchBSAction.java @@ -82,20 +82,22 @@ public class GatheringbillSaveBatchBSAction extends BillInsertBatchBSAction { //根据销售订单id去查询销售订单 BaseDAO dao = new BaseDAO(); - String sql = "select nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" +def3+"'"; + String sql = "select vbillcode,nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" +def3+"'"; Map saleMap = (Map)dao.executeQuery(sql, new MapProcessor()); //销售订单价税合计 UFDouble ntotalorigmny = UFDouble.ZERO_DBL; //销售订单实际收款金额 UFDouble nreceivedmny = UFDouble.ZERO_DBL; + String vbillcode = ""; if(saleMap != null) { nreceivedmny = new UFDouble(saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString()); ntotalorigmny = new UFDouble(saleMap.get("ntotalorigmny") == null ? "0" : saleMap.get("ntotalorigmny").toString()); + vbillcode = saleMap.get("vbillcode") == null ? "" : saleMap.get("vbillcode").toString(); } if (money.compareTo(ntotalorigmny) > 0) { UFDouble moreMoney = money.sub(ntotalorigmny); - throw new BusinessException("【该笔收款已超销售订单" + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); + throw new BusinessException("【该笔收款税收合计" + money + "已超销售订单 [" + vbillcode + "] " + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); } } }