| @@ -13,7 +13,7 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Strin | |||||
| List<WxBillProperty> findList(WxBillProperty wxBillProperty); | List<WxBillProperty> findList(WxBillProperty wxBillProperty); | ||||
| List<Map<String,Object>> queryBillRentList(WxBillProperty record); | |||||
| List<Map<String,Object>> queryBillPropertyList(WxBillProperty record); | |||||
| Map<String,Object> queryPayInfo(Map<String,Object> params); | Map<String,Object> queryPayInfo(Map<String,Object> params); | ||||
| @@ -2,6 +2,7 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxPropertyContract; | import com.iformall.domain.po.WxPropertyContract; | ||||
| import com.iformall.domain.po.WxRentContract; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -33,7 +34,7 @@ public interface WxPropertyContractMapper extends CommonMapper<WxPropertyContrac | |||||
| void updateRentInvalidStatus(WxPropertyContract wxRentContract); | void updateRentInvalidStatus(WxPropertyContract wxRentContract); | ||||
| List<WxPropertyContract> getRentContractList(String tenantId); | |||||
| List<WxRentContract> getRentContractList(String tenantId); | |||||
| @@ -54,7 +54,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe | |||||
| try { | try { | ||||
| wxBillPropertyDepositMapper.updateWaitPayStatus(params); | wxBillPropertyDepositMapper.updateWaitPayStatus(params); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("更新物业待缴账单状态失败,e:" + e.getMessage()); | |||||
| logger.error("更新物业押金待缴账单状态失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -69,7 +69,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe | |||||
| try { | try { | ||||
| wxBillPropertyDepositMapper.updateNotPaidStatus(params); | wxBillPropertyDepositMapper.updateNotPaidStatus(params); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("更新物业欠缴账单状态失败,e:" + e.getMessage()); | |||||
| logger.error("更新物业押金欠缴账单状态失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -38,7 +38,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||||
| //更新待缴的状态 | //更新待缴的状态 | ||||
| updateWaidPayStatus(record); | updateWaidPayStatus(record); | ||||
| PageHelper.startPage(pageIndex, pageSize); | PageHelper.startPage(pageIndex, pageSize); | ||||
| List<Map<String, Object>> billRentList = wxBillPropertyMapper.queryBillRentList(record); | |||||
| List<Map<String, Object>> billRentList = wxBillPropertyMapper.queryBillPropertyList(record); | |||||
| PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billRentList); | PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(billRentList); | ||||
| return pageInfo; | return pageInfo; | ||||
| } | } | ||||
| @@ -77,7 +77,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||||
| public Map<String, Object> getById(Long id) { | public Map<String, Object> getById(Long id) { | ||||
| WxBillProperty record = new WxBillProperty(); | WxBillProperty record = new WxBillProperty(); | ||||
| record.setId(id); | record.setId(id); | ||||
| return wxBillPropertyMapper.queryBillRentList(record).get(0); | |||||
| return wxBillPropertyMapper.queryBillPropertyList(record).get(0); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -124,7 +124,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||||
| public Object findByMerchantId(Long id) { | public Object findByMerchantId(Long id) { | ||||
| WxBillProperty record = new WxBillProperty(); | WxBillProperty record = new WxBillProperty(); | ||||
| record.setMerchantId(id); | record.setMerchantId(id); | ||||
| return wxBillPropertyMapper.queryBillRentList(record); | |||||
| return wxBillPropertyMapper.queryBillPropertyList(record); | |||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | @Transactional(rollbackFor = {Exception.class}) | ||||
| @@ -58,7 +58,7 @@ | |||||
| <include refid="dynamicWhereConditions" /> | <include refid="dynamicWhereConditions" /> | ||||
| </select> | </select> | ||||
| <select id="queryBillDepositList" parameterType="com.iformall.domain.po.WxRentContract" resultType="hashmap"> | |||||
| <select id="queryBillDepositList" parameterType="com.iformall.domain.po.WxBillPropertyDeposit" resultType="hashmap"> | |||||
| select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate, | select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate, | ||||
| br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`, | br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`, | ||||
| br.`need_pay` needPay,m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`, | br.`need_pay` needPay,m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`, | ||||
| @@ -58,7 +58,7 @@ | |||||
| <include refid="dynamicWhereConditions" /> | <include refid="dynamicWhereConditions" /> | ||||
| </select> | </select> | ||||
| <select id="queryBillDepositList" parameterType="com.iformall.domain.po.WxRentContract" resultType="hashmap"> | |||||
| <select id="queryBillPropertyList" parameterType="com.iformall.domain.po.WxBillProperty" resultType="hashmap"> | |||||
| select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate, | select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate, | ||||
| br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`, | br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`, | ||||
| br.`need_pay` needPay,m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`, | br.`need_pay` needPay,m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`, | ||||
| @@ -97,46 +97,46 @@ | |||||
| order by rc.id desc | order by rc.id desc | ||||
| </select> | </select> | ||||
| <select id="queryRentContractWaitSignStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract"> | |||||
| <select id="queryRentContractWaitSignStatus" resultType="int" parameterType="com.iformall.domain.po.WxPropertyContract"> | |||||
| select count(id) from wx_property_contract where tenant_id=#{tenantId} and status=#{status} | select count(id) from wx_property_contract where tenant_id=#{tenantId} and status=#{status} | ||||
| </select> | </select> | ||||
| <select id="queryRentContractEndSoonStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract"> | |||||
| <select id="queryRentContractEndSoonStatus" resultType="int" parameterType="com.iformall.domain.po.WxPropertyContract"> | |||||
| select count(id) from wx_property_contract where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) <= 30 | select count(id) from wx_property_contract where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) <= 30 | ||||
| </select> | </select> | ||||
| <select id="queryRentContractPaidStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract"> | |||||
| <select id="queryRentContractPaidStatus" resultType="int" parameterType="com.iformall.domain.po.WxPropertyContract"> | |||||
| select count(id) from wx_property_contract where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_start_date <= now() and rental_end_date >= now() | select count(id) from wx_property_contract where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_start_date <= now() and rental_end_date >= now() | ||||
| </select> | </select> | ||||
| <select id="queryRentContractEndStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract"> | |||||
| <select id="queryRentContractEndStatus" resultType="int" parameterType="com.iformall.domain.po.WxPropertyContract"> | |||||
| select count(id) from wx_property_contract where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_end_date <now() | select count(id) from wx_property_contract where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_end_date <now() | ||||
| </select> | </select> | ||||
| <update id="updateRentContractEndSoonStatus" parameterType="com.iformall.domain.po.WxRentContract"> | |||||
| <update id="updateRentContractEndSoonStatus" parameterType="com.iformall.domain.po.WxPropertyContract"> | |||||
| update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) <= 30 | update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) <= 30 | ||||
| </update> | </update> | ||||
| <update id="updateRentContractPaidStatus" parameterType="com.iformall.domain.po.WxRentContract"> | |||||
| <update id="updateRentContractPaidStatus" parameterType="com.iformall.domain.po.WxPropertyContract"> | |||||
| update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_start_date <= now() and rental_end_date >= now() | update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_start_date <= now() and rental_end_date >= now() | ||||
| </update> | </update> | ||||
| <update id="updateRentContractEndStatus" parameterType="com.iformall.domain.po.WxRentContract"> | |||||
| <update id="updateRentContractEndStatus" parameterType="com.iformall.domain.po.WxPropertyContract"> | |||||
| update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_end_date <now() | update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_end_date <now() | ||||
| </update> | </update> | ||||
| <update id="updateRentWaitSignStatus" parameterType="com.iformall.domain.po.WxRentContract"> | |||||
| <update id="updateRentWaitSignStatus" parameterType="com.iformall.domain.po.WxPropertyContract"> | |||||
| update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=7 and merchant_id is null | update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=7 and merchant_id is null | ||||
| </update> | </update> | ||||
| <update id="updateRentInvalidStatus" parameterType="com.iformall.domain.po.WxRentContract"> | |||||
| <update id="updateRentInvalidStatus" parameterType="com.iformall.domain.po.WxPropertyContract"> | |||||
| update wx_property_contract set status=#{status} where shop_id in ( | update wx_property_contract set status=#{status} where shop_id in ( | ||||
| select s.shop_id from (SELECT shop_id FROM wx_property_contract WHERE tenant_id = #{tenantId} and merchant_id is not null and status!=6 | select s.shop_id from (SELECT shop_id FROM wx_property_contract WHERE tenant_id = #{tenantId} and merchant_id is not null and status!=6 | ||||
| )s) and merchant_id is null and tenant_id=#{tenantId} | )s) and merchant_id is null and tenant_id=#{tenantId} | ||||
| </update> | </update> | ||||
| <select id="getRentContractList" parameterType="String" resultType="com.iformall.domain.po.WxRentContract"> | <select id="getRentContractList" parameterType="String" resultType="com.iformall.domain.po.WxRentContract"> | ||||
| select rc.*,s.shop_number from wx_property_contract rc left join wx_shop s on rc.shop_id=s.id | |||||
| select rc.*,s.shop_number from wx_rent_contract rc left join wx_shop s on rc.shop_id=s.id | |||||
| where rc.status not in(1,6,7) and rc.tenant_id=#{tenantId} | where rc.status not in(1,6,7) and rc.tenant_id=#{tenantId} | ||||
| </select> | </select> | ||||