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')