| @@ -55,5 +55,7 @@ public interface WxAllBillMapper extends CommonMapper<WxAllBill, Long> { | |||||
| void deleteEnergyReadingBills(@Param("energyReadingCalcuteId")Long energyReadingCalcuteId,@Param("tenantId")String tenantId); | void deleteEnergyReadingBills(@Param("energyReadingCalcuteId")Long energyReadingCalcuteId,@Param("tenantId")String tenantId); | ||||
| void updateContractCusName(WxAllBill wxBillRent); | void updateContractCusName(WxAllBill wxBillRent); | ||||
| void updateAllContractCusName(WxAllBill wxBillRent); | |||||
| } | } | ||||
| @@ -1503,6 +1503,13 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| record.setUpdateBy(user.getId()); | record.setUpdateBy(user.getId()); | ||||
| record.setUpdateByName(user.getName()); | record.setUpdateByName(user.getName()); | ||||
| wxPropertyContractMapper.updateById(record); | wxPropertyContractMapper.updateById(record); | ||||
| //更新账单归属 | |||||
| WxAllBill bill = new WxAllBill(); | |||||
| bill.updateTenantInfo(record); | |||||
| bill.setPropertyContractId(record.getId()); | |||||
| bill.setCusName(record.getCustomerName()); | |||||
| wxAllBillMapper.updateAllContractCusName(bill); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -2103,6 +2103,13 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| rentContract.setUpdateByName(user.getName()); | rentContract.setUpdateByName(user.getName()); | ||||
| wxRentContractMapper.updateById(rentContract); | wxRentContractMapper.updateById(rentContract); | ||||
| //更新账单归属 | |||||
| WxAllBill bill = new WxAllBill(); | |||||
| bill.updateTenantInfo(rentContract); | |||||
| bill.setRentContractId(rentContract.getId()); | |||||
| bill.setCusName(rentContract.getCustomerName()); | |||||
| wxAllBillMapper.updateAllContractCusName(bill); | |||||
| if (rentContract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()) { | if (rentContract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()) { | ||||
| WxPropertyContract pq = new WxPropertyContract(); | WxPropertyContract pq = new WxPropertyContract(); | ||||
| pq.updateTenantInfo(rentContract); | pq.updateTenantInfo(rentContract); | ||||
| @@ -453,7 +453,16 @@ | |||||
| <if test=" null != propertyContractId"> | <if test=" null != propertyContractId"> | ||||
| and property_contract_id = #{propertyContractId} | and property_contract_id = #{propertyContractId} | ||||
| </if> | </if> | ||||
| </update> | </update> | ||||
| <update id="updateAllContractCusName" parameterType="com.iformall.domain.po.WxAllBill"> | |||||
| update wx_all_bill set cus_name = #{cusName} where tenant_id = #{tenantId} | |||||
| <if test=" null != rentContractId"> | |||||
| and rent_contract_id = #{rentContractId} | |||||
| </if> | |||||
| <if test=" null != propertyContractId"> | |||||
| and property_contract_id = #{propertyContractId} | |||||
| </if> | |||||
| </update> | |||||
| </mapper> | </mapper> | ||||