From 43499b4a456664781bef7af0e5ae73a129c76838 Mon Sep 17 00:00:00 2001 From: syruan <15555146157@163.com> Date: Fri, 10 Oct 2025 21:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=B9=E6=8D=AE=E5=8D=8F?= =?UTF-8?q?=E8=AE=AEID=E5=92=8C=E7=BB=93=E7=AE=97=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87=E7=8A=B6=E6=80=81=E4=B8=BA?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E7=9A=84=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=9B=B8=E5=85=B3=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ClzSltAgreementInfoServiceImpl.java | 2 -- .../settlement/mapper/SltAgreementInfoMapper.java | 5 +++++ .../service/impl/SltAgreementInfoServiceImpl.java | 13 ++++++++++++- .../material/settlement/SltAgreementInfoMapper.xml | 11 +++++++++++ 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java index cfc6ce4d..a03188b2 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/ClzSltAgreementInfoServiceImpl.java @@ -504,8 +504,6 @@ public class ClzSltAgreementInfoServiceImpl implements ClzSltAgreementInfoServic /** * 提交结算清单 - * @param sltInfoVo - * @return */ @Override @Transactional(rollbackFor = Exception.class) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java index 58fb1dc7..4636540e 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/mapper/SltAgreementInfoMapper.java @@ -29,6 +29,11 @@ public interface SltAgreementInfoMapper { */ int updateSltInfoByAgreementIdType(SltAgreementInfo sltAgreementInfo); + /** + * 根据协议ID+结算类型去修改设备状态为丢失 + */ + int updateMaStatusLoseByAgreementIdType(SltAgreementInfo sltAgreementInfo); + /** * 查询结算信息 * diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java index 9077b080..3b6844bc 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java @@ -1022,12 +1022,23 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService { int countThree = sltAgreementInfoMapper.updateSltInfoByAgreementIdType( new SltAgreementInfo() .setAgreementId(sltAgreementApply.getAgreementId()) - .setSettlementType(Integer.valueOf(sltAgreementApplyFromDb.getSettlementType())) + .setSettlementType(sltAgreementApplyFromDb.getSettlementType()) ); if (countThree == 0) { throw new ServiceException("slt_agreement_info修改失败"); } + // 修改未退还设备状态为丢失 + int countFour = sltAgreementInfoMapper.updateMaStatusLoseByAgreementIdType( + new SltAgreementInfo() + .setAgreementId(sltAgreementApply.getAgreementId()) + .setSettlementType(sltAgreementApplyFromDb.getSettlementType()) + ); + if (countFour == 0) { + log.warn("协议ID:" + sltAgreementApply.getAgreementId() + "," + + "结算类型:" + sltAgreementApplyFromDb.getSettlementType() + ",无未归还设备,无需更新为丢失状态"); + } + if (examNum == GlobalConstants.INT_0) { return AjaxResult.error("结算审批失败"); } else { diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml index e4c224e3..84f8744a 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml @@ -1434,4 +1434,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE sai.agreement_id = #{agreementId} AND mt.jiju_type = #{settlementType} + + + update + ma_machine mi + INNER JOIN slt_agreement_info sai ON mi.ma_id = sai.ma_id AND sai.end_time is null AND sai.status = '0' + INNER JOIN ma_type mt ON sai.type_id = mt.type_id AND mt.`level` = '4' + set + mi.status = '18', mi.update_time = NOW() + where + sai.agreement_id = #{agreementId} AND mt.jiju_type = #{settlementType} +