From 27ecff6c8b035583771006dc654575ae0ec6324d Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Fri, 23 Aug 2024 11:14:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=AE=A1=E6=A0=B8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SltAgreementInfoServiceImpl.java | 24 +---------------- .../material/SltAgreementInfoMapper.xml | 26 +++++++++---------- 2 files changed, 13 insertions(+), 37 deletions(-) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java index b46f9c3..a42bd3f 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java @@ -136,30 +136,8 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { @Override @Transactional public int settlementReview(SltAgreementApply apply) { - Long userid = SecurityUtils.getLoginUser().getUserid(); - apply.setAuditor(String.valueOf(userid)); int i = sltAgreementInfoMapper.updateRelation(apply); - int j = 0; - if (i > 0) { - List relations = sltAgreementInfoMapper.getRelations(apply); - List infos = new ArrayList<>(); - for (SltAgreementRelation bean : relations) { - AgreementInfo info = new AgreementInfo(); - info.setAgreementId(Long.valueOf(bean.getAgreementId())); - infos.add(info); - } - List loseList = getLoseList(infos); - for (SltAgreementInfo agreementInfo : loseList) { - if (agreementInfo.getMaId() != null && agreementInfo.getMaId().isEmpty()) { - sltAgreementInfoMapper.updateMaStatus(agreementInfo); - } - } - j = sltAgreementInfoMapper.updateApply(apply); - } else { - throw new ServiceException("结算审核失败"); - //throw new ServiceException(ExceptionDict.SETTLEMENT_REVIEW_ERROR_MSG,ExceptionDict.SETTLEMENT_REVIEW_ERROR); - } - return j; + return i; } @Override diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/SltAgreementInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/SltAgreementInfoMapper.xml index 2f909d0..358c4c9 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/SltAgreementInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/SltAgreementInfoMapper.xml @@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update slt_agreement_relation set status = #{status} - where apply_id = #{id} + where agreement_id = #{agreementId} update slt_agreement_apply @@ -265,16 +265,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select count(*) from slt_agreement_apply where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m')