结算管理分开结算
This commit is contained in:
parent
e013adb90e
commit
b9c5fe133c
|
|
@ -56,7 +56,9 @@ public interface SltAgreementInfoMapper {
|
|||
|
||||
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);
|
||||
|
||||
|
|
|
|||
|
|
@ -293,14 +293,14 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
|||
}
|
||||
}
|
||||
// 判断是否已经结算(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) {
|
||||
relation.setIsSltOne("1");
|
||||
} else {
|
||||
relation.setIsSltOne("0");
|
||||
}
|
||||
// 判断是否已经结算(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) {
|
||||
relation.setIsSltThree("1");
|
||||
} else {
|
||||
|
|
@ -350,12 +350,19 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
|||
|
||||
@Override
|
||||
public AjaxResult submitFeeOne(SltAgreementInfo apply) {
|
||||
int i = sltAgreementInfoMapper.updateInfoOneStatus(apply);
|
||||
int i = sltAgreementInfoMapper.updateInfoOneStatus(apply.getAgreementIds(),apply.getCostBearingParty());
|
||||
|
||||
if (i > 0) {
|
||||
i = sltAgreementInfoMapper.updateAgreementStatus(apply);
|
||||
if(i>0){
|
||||
return AjaxResult.success("结算成功");
|
||||
}else{
|
||||
return AjaxResult.error("结算失败");
|
||||
}
|
||||
|
||||
} else {
|
||||
return AjaxResult.error("结算失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -108,11 +108,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<update id="updateInfoOneStatus">
|
||||
UPDATE slt_agreement_info sai
|
||||
LEFT JOIN lease_apply_info lai ON lai.id = sai.lease_id
|
||||
SET sai.is_slt = '1'
|
||||
SET sai.is_slt = '2'
|
||||
WHERE
|
||||
sai.agreement_id = #{agreementId}
|
||||
sai.agreement_id in
|
||||
<foreach item="agreementId" collection="agreementIds" open="(" separator="," close=")">
|
||||
#{agreementId}
|
||||
</foreach>
|
||||
AND sai.lease_type = 0
|
||||
AND lai.cost_bearing_party = #{costBearingParty}
|
||||
AND lai.cost_bearing_party = #{costBearingParty,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateOutSourceCosts">
|
||||
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 repair_apply_record set is_slt = 1,update_time = now() where id = #{id}
|
||||
</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 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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue