南网结算审核功能新增
This commit is contained in:
parent
0dfd32755a
commit
693d3f2907
|
|
@ -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<SltAgreementRelation> relations = sltAgreementInfoMapper.getRelations(apply);
|
||||
List<AgreementInfo> infos = new ArrayList<>();
|
||||
for (SltAgreementRelation bean : relations) {
|
||||
AgreementInfo info = new AgreementInfo();
|
||||
info.setAgreementId(Long.valueOf(bean.getAgreementId()));
|
||||
infos.add(info);
|
||||
}
|
||||
List<SltAgreementInfo> 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
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<update id="updateRelation">
|
||||
update slt_agreement_relation
|
||||
set status = #{status}
|
||||
where apply_id = #{id}
|
||||
where agreement_id = #{agreementId}
|
||||
</update>
|
||||
<update id="updateApply">
|
||||
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')
|
||||
</select>
|
||||
<select id="getSltExam" resultType="com.bonus.sgzb.base.api.domain.SltAgreementApply">
|
||||
select saa.id,
|
||||
saa.code,
|
||||
GROUP_CONCAT(DISTINCT sar.agreement_id) as agreementId,
|
||||
GROUP_CONCAT(DISTINCT bui.unit_name) as unitName,
|
||||
GROUP_CONCAT(DISTINCT bp.lot_name) as projectName,
|
||||
saa.cost,
|
||||
saa.status
|
||||
from slt_agreement_apply saa
|
||||
left join slt_agreement_relation sar on saa.id = sar.apply_id
|
||||
LEFT JOIN bm_agreement_info bai on sar.agreement_id = bai.agreement_id
|
||||
SELECT
|
||||
sar.agreement_id AS agreementId,
|
||||
bui.unit_name AS unitName,
|
||||
bp.lot_name AS projectName,
|
||||
sar.cost,
|
||||
sar.STATUS
|
||||
FROM
|
||||
slt_agreement_relation sar
|
||||
LEFT JOIN bm_agreement_info bai ON sar.agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
|
||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
||||
where 1=1
|
||||
|
|
@ -284,10 +283,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="projectId != null and projectId != ''">
|
||||
and bp.lot_id = #{projectId}
|
||||
</if>
|
||||
<if test="sltStatus != null and sltStatus != ''">
|
||||
and saa.status = #{sltStatus}
|
||||
<if test="sltStatus != null">
|
||||
and sar.status = #{sltStatus}
|
||||
</if>
|
||||
GROUP BY saa.id
|
||||
</select>
|
||||
<select id="getRelations" resultType="com.bonus.sgzb.base.api.domain.SltAgreementRelation">
|
||||
select sar.id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue