结算管理分开结算

This commit is contained in:
hongchao 2025-03-25 18:35:01 +08:00
parent e013adb90e
commit b9c5fe133c
3 changed files with 29 additions and 9 deletions

View File

@ -56,7 +56,9 @@ public interface SltAgreementInfoMapper {
int updateTrimDay(SltAgreementInfo sltAgreementInfo); int updateTrimDay(SltAgreementInfo sltAgreementInfo);
int updateInfoOneStatus(SltAgreementInfo apply); int updateInfoOneStatus(@Param("agreementIds") List<String> agreementIds,@Param("costBearingParty") String costBearingParty);
int updateAgreementStatus(SltAgreementInfo apply);
List<SltAgreementInfo> getLeaseListOneMonth(@Param("bean") AgreementInfo bean, @Param("ids") List<String> idList); List<SltAgreementInfo> getLeaseListOneMonth(@Param("bean") AgreementInfo bean, @Param("ids") List<String> idList);

View File

@ -293,14 +293,14 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
} }
} }
// 判断是否已经结算(01承担方) // 判断是否已经结算(01承担方)
boolean b = leaseListOne.stream().allMatch(t -> "1".equals(t.getIsSlt())); boolean b = leaseListOne.stream().allMatch(t -> "1".equals(t.getIsSlt()) || "2".equals(t.getIsSlt()));
if (b) { if (b) {
relation.setIsSltOne("1"); relation.setIsSltOne("1");
} else { } else {
relation.setIsSltOne("0"); relation.setIsSltOne("0");
} }
// 判断是否已经结算(03承担方) // 判断是否已经结算(03承担方)
boolean f = leaseListThree.stream().allMatch(t -> "1".equals(t.getIsSlt())); boolean f = leaseListThree.stream().allMatch(t -> "1".equals(t.getIsSlt()) || "2".equals(t.getIsSlt()));
if (f) { if (f) {
relation.setIsSltThree("1"); relation.setIsSltThree("1");
} else { } else {
@ -350,9 +350,16 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
@Override @Override
public AjaxResult submitFeeOne(SltAgreementInfo apply) { public AjaxResult submitFeeOne(SltAgreementInfo apply) {
int i = sltAgreementInfoMapper.updateInfoOneStatus(apply); int i = sltAgreementInfoMapper.updateInfoOneStatus(apply.getAgreementIds(),apply.getCostBearingParty());
if (i > 0) { if (i > 0) {
return AjaxResult.success("结算成功"); i = sltAgreementInfoMapper.updateAgreementStatus(apply);
if(i>0){
return AjaxResult.success("结算成功");
}else{
return AjaxResult.error("结算失败");
}
} else { } else {
return AjaxResult.error("结算失败"); return AjaxResult.error("结算失败");
} }

View File

@ -108,11 +108,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateInfoOneStatus"> <update id="updateInfoOneStatus">
UPDATE slt_agreement_info sai UPDATE slt_agreement_info sai
LEFT JOIN lease_apply_info lai ON lai.id = sai.lease_id LEFT JOIN lease_apply_info lai ON lai.id = sai.lease_id
SET sai.is_slt = '1' SET sai.is_slt = '2'
WHERE WHERE
sai.agreement_id = #{agreementId} sai.agreement_id in
AND sai.lease_type = 0 <foreach item="agreementId" collection="agreementIds" open="(" separator="," close=")">
AND lai.cost_bearing_party = #{costBearingParty} #{agreementId}
</foreach>
AND sai.lease_type = 0
AND lai.cost_bearing_party = #{costBearingParty,jdbcType=VARCHAR}
</update> </update>
<update id="updateOutSourceCosts"> <update id="updateOutSourceCosts">
update repair_cost set out_source_costs = #{outSourceCosts} where id = #{id} update repair_cost set out_source_costs = #{outSourceCosts} where id = #{id}
@ -123,6 +126,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateRecodeIsSlt"> <update id="updateRecodeIsSlt">
update repair_apply_record set is_slt = 1,update_time = now() where id = #{id} update repair_apply_record set is_slt = 1,update_time = now() where id = #{id}
</update> </update>
<update id="updateAgreementStatus">
update bm_agreement_info bai set is_slt = 2
WHERE
bai.agreement_id in
<foreach item="agreementId" collection="agreementIds" open="(" separator="," close=")">
#{agreementId}
</foreach>
</update>
<select id="getSltAgreementInfo" resultType="com.bonus.sgzb.material.domain.AgreementInfo"> <select id="getSltAgreementInfo" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time, SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time,
bui.unit_id,bui.unit_name , bp.lot_id as projectId , bp.lot_name as projectName, bui.unit_id,bui.unit_name , bp.lot_id as projectId , bp.lot_name as projectName,