From 2188aab346ca11b3d9775f9c8c27408e54d38315 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 2 Aug 2024 13:36:08 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E8=B4=A2=E5=8A=A1=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A2=E5=8A=A1=E5=BA=94=E6=94=B6=E8=B4=A6?= =?UTF-8?q?=E6=AC=BE=E7=9A=84=E7=BB=93=E6=A1=88=E5=90=8E=E7=AB=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=9A=E6=96=B0=E5=A2=9E=E7=BB=93=E6=A1=88=E5=90=8E?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=8C=E7=BB=93=E6=A1=88=E7=8A=B6=E6=80=81=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=B8=BA=E5=B7=B2=E7=BB=93=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/FinancialReceivablesServiceImpl.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialReceivablesServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialReceivablesServiceImpl.java index 26a621a7..f3e75552 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialReceivablesServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialReceivablesServiceImpl.java @@ -249,9 +249,23 @@ public class FinancialReceivablesServiceImpl implements IFinancialReceivablesSer /* * 结案 * */ + @Transactional(rollbackFor = Exception.class) @Override public int closingFinancialReceivablesById(Long financialReceivablesId) { int result = financialReceivablesMapper.updateReceivablesClosingStatusById(financialReceivablesId); + FinancialReceivables financialReceivables = financialReceivablesMapper.selectFinancialReceivablesById(financialReceivablesId); + String salesOrderCode = financialReceivables.getSalesOrderCode(); + + SysSalesOrderVo sysSalesOrderVo = sysSalesOrderMapper.selectSysSalesOrderBySalesOrderCode(salesOrderCode); + //设置为已结案 + sysSalesOrderVo.setCloseStatus("3"); + if (sysSalesOrderVo == null){ + log.warn("销售单号不存在:{}", salesOrderCode); + } + int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrder(sysSalesOrderVo); + if (updateSysSalesOrderResult <= 0){ + throw new BusinessException("销售订单结案失败"); + } return result; }