| @@ -95,14 +95,14 @@ | |||||
| <update id="updateNotPaidStatus" parameterType="hashmap"> | <update id="updateNotPaidStatus" parameterType="hashmap"> | ||||
| update wx_bill_rent_deposit set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date) | update wx_bill_rent_deposit set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date) | ||||
| where tenant_id=#{tenantId} and status!=#{paid} and DATEDIFF(now(),receive_date)>0 | |||||
| where tenant_id=#{tenantId} and status!=#{paid} and status!=5 and DATEDIFF(now(),receive_date)>0 | |||||
| </update> | </update> | ||||
| <update id="updateWaitPayStatus" parameterType="hashmap"> | <update id="updateWaitPayStatus" parameterType="hashmap"> | ||||
| update wx_bill_rent_deposit set status=#{waitPay} where id in( | update wx_bill_rent_deposit set status=#{waitPay} where id in( | ||||
| select a.id from (select br.id,rc.receive_period,br.rent_contract_id,br.receive_date from wx_bill_rent_deposit br | select a.id from (select br.id,rc.receive_period,br.rent_contract_id,br.receive_date from wx_bill_rent_deposit br | ||||
| left join wx_rent_contract rc on br.rent_contract_id=rc.id | left join wx_rent_contract rc on br.rent_contract_id=rc.id | ||||
| where br.tenant_id=#{tenantId} and br.status!=#{paid} and now() < br.receive_date | |||||
| where br.tenant_id=#{tenantId} and br.status!=#{paid} and status!=5 and now() < br.receive_date | |||||
| and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a) | and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a) | ||||
| </update> | </update> | ||||
| @@ -90,11 +90,11 @@ | |||||
| <update id="updateNotPaidStatus" parameterType="hashmap"> | <update id="updateNotPaidStatus" parameterType="hashmap"> | ||||
| update wx_bill_other_deposit set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date) | update wx_bill_other_deposit set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date) | ||||
| where tenant_id=#{tenantId} and status!=#{paid} and DATEDIFF(now(),receive_date)>0 | |||||
| where tenant_id=#{tenantId} and status!=#{paid} and status!=5 and DATEDIFF(now(),receive_date)>0 | |||||
| </update> | </update> | ||||
| <update id="updateWaitPayStatus" parameterType="hashmap"> | <update id="updateWaitPayStatus" parameterType="hashmap"> | ||||
| update wx_bill_other_deposit set status=#{waitPay} where tenant_id=#{tenantId} | |||||
| update wx_bill_other_deposit set status=#{waitPay} where tenant_id=#{tenantId} and status!=5 | |||||
| and status!=#{paid} and DATEDIFF(now(),receive_date) <=0 | and status!=#{paid} and DATEDIFF(now(),receive_date) <=0 | ||||
| </update> | </update> | ||||
| @@ -93,14 +93,14 @@ | |||||
| <update id="updateNotPaidStatus" parameterType="hashmap"> | <update id="updateNotPaidStatus" parameterType="hashmap"> | ||||
| update wx_bill_property_deposit set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date) | update wx_bill_property_deposit set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date) | ||||
| where tenant_id=#{tenantId} and status!=#{paid} and DATEDIFF(now(),receive_date)>0 | |||||
| where tenant_id=#{tenantId} and status!=#{paid} and status!=5 and DATEDIFF(now(),receive_date)>0 | |||||
| </update> | </update> | ||||
| <update id="updateWaitPayStatus" parameterType="hashmap"> | <update id="updateWaitPayStatus" parameterType="hashmap"> | ||||
| update wx_bill_property_deposit set status=#{waitPay} where id in( | update wx_bill_property_deposit set status=#{waitPay} where id in( | ||||
| select a.id from (select br.id,rc.receive_period,br.property_contract_id,br.receive_date from wx_bill_property_deposit br | select a.id from (select br.id,rc.receive_period,br.property_contract_id,br.receive_date from wx_bill_property_deposit br | ||||
| left join wx_property_contract rc on br.property_contract_id=rc.id | left join wx_property_contract rc on br.property_contract_id=rc.id | ||||
| where br.tenant_id=#{tenantId} and br.status!=#{paid} and now() < br.receive_date | |||||
| where br.tenant_id=#{tenantId} and br.status!=#{paid} and status!=5 and now() < br.receive_date | |||||
| and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a) | and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a) | ||||
| </update> | </update> | ||||