| @@ -69,6 +69,8 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| private WxBillRentMapper wxBillRentMapper; | private WxBillRentMapper wxBillRentMapper; | ||||
| @Autowired | @Autowired | ||||
| private WxBillPropertyMapper wxBillPropertyMapper; | private WxBillPropertyMapper wxBillPropertyMapper; | ||||
| @Autowired | |||||
| private WxMerchantService wxMerchantService; | |||||
| /** | /** | ||||
| * 获取流程key,1合同 2账单 | * 获取流程key,1合同 2账单 | ||||
| @@ -146,13 +148,16 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| wxPropertyContract.setStatus(EnumRentContractStatus.CONTRACT_TERMINATE.getCode()); | wxPropertyContract.setStatus(EnumRentContractStatus.CONTRACT_TERMINATE.getCode()); | ||||
| wxPropertyContractMapper.updateStatusByRentContractId(wxPropertyContract); | wxPropertyContractMapper.updateStatusByRentContractId(wxPropertyContract); | ||||
| //账单失效 | |||||
| //物业账单失效 | |||||
| wxBillPropertyMapper.updateInvalidStatusByRent(rent); | wxBillPropertyMapper.updateInvalidStatusByRent(rent); | ||||
| } | } | ||||
| //账单失效 | |||||
| //租赁账单失效 | |||||
| WxBillRent wxBillRent = new WxBillRent(); | WxBillRent wxBillRent = new WxBillRent(); | ||||
| wxBillRent.setRentContractId(businessId); | wxBillRent.setRentContractId(businessId); | ||||
| wxBillRentMapper.updateInvalidStatus(wxBillRent); | wxBillRentMapper.updateInvalidStatus(wxBillRent); | ||||
| //解绑商户和商铺关系 | |||||
| wxMerchantService.disable(wxRentContractMapper.selectByPrimaryKey(businessId).getMerchantId()); | |||||
| } | } | ||||
| wxRentContractService.updateApplyStatus(rent); | wxRentContractService.updateApplyStatus(rent); | ||||
| }else if(contractType.intValue() == 3 || contractType.intValue() == 4){ | }else if(contractType.intValue() == 3 || contractType.intValue() == 4){ | ||||
| @@ -131,7 +131,7 @@ | |||||
| <update id="updateInvalidStatusByRent" parameterType="com.iformall.domain.po.WxRentContract"> | <update id="updateInvalidStatusByRent" parameterType="com.iformall.domain.po.WxRentContract"> | ||||
| update wx_bill_property set status = 6 where property_contract_id in | update wx_bill_property set status = 6 where property_contract_id in | ||||
| (select id from wx_property_contract where rent_contract_id = #{id}) | (select id from wx_property_contract where rent_contract_id = #{id}) | ||||
| and status = 4 | |||||
| and status in(4,2) | |||||
| </update> | </update> | ||||
| <delete id="deletePreviewBill" parameterType="com.iformall.domain.po.WxPropertyContract"> | <delete id="deletePreviewBill" parameterType="com.iformall.domain.po.WxPropertyContract"> | ||||
| @@ -139,7 +139,10 @@ | |||||
| </delete> | </delete> | ||||
| <update id="update" parameterType="com.iformall.domain.po.WxBillProperty"> | <update id="update" parameterType="com.iformall.domain.po.WxBillProperty"> | ||||
| update wx_bill_property set receive_pay = #{receivePay} where id = #{id} | |||||
| update wx_bill_property set updatetime = now() | |||||
| <if test=" null != receivePay ">,receive_pay = #{receivePay}</if> | |||||
| <if test=" null != needPay ">,need_pay = #{needPay}</if> | |||||
| where id = #{id} | |||||
| </update> | </update> | ||||
| <update id="updatePreviewStatus" parameterType="com.iformall.domain.po.WxBillProperty"> | <update id="updatePreviewStatus" parameterType="com.iformall.domain.po.WxBillProperty"> | ||||
| @@ -126,7 +126,7 @@ | |||||
| <update id="updateInvalidStatus" parameterType="com.iformall.domain.po.WxBillRent"> | <update id="updateInvalidStatus" parameterType="com.iformall.domain.po.WxBillRent"> | ||||
| update wx_bill_rent set status = 6 where rent_contract_id = #{rentContractId} | update wx_bill_rent set status = 6 where rent_contract_id = #{rentContractId} | ||||
| and status = 4 | |||||
| and status in(4,2) | |||||
| </update> | </update> | ||||
| <delete id="deletePreviewBill" parameterType="com.iformall.domain.po.WxRentContract"> | <delete id="deletePreviewBill" parameterType="com.iformall.domain.po.WxRentContract"> | ||||
| @@ -136,6 +136,7 @@ | |||||
| <update id="update" parameterType="com.iformall.domain.po.WxBillRent"> | <update id="update" parameterType="com.iformall.domain.po.WxBillRent"> | ||||
| update wx_bill_rent set updatetime = now() | update wx_bill_rent set updatetime = now() | ||||
| <if test=" null != receivePay ">,receive_pay = #{receivePay}</if> | <if test=" null != receivePay ">,receive_pay = #{receivePay}</if> | ||||
| <if test=" null != needPay ">,need_pay = #{needPay}</if> | |||||
| where id = #{id} | where id = #{id} | ||||
| </update> | </update> | ||||