diff --git a/calc/com/tenwa/reckon/executor/RentCalHelper.java b/calc/com/tenwa/reckon/executor/RentCalHelper.java index 599d8de64..591e0c95c 100644 --- a/calc/com/tenwa/reckon/executor/RentCalHelper.java +++ b/calc/com/tenwa/reckon/executor/RentCalHelper.java @@ -142,7 +142,7 @@ public class RentCalHelper { // if(payDayAdjust.compareTo(min) >= 0 && payDayAdjust.compareTo(max) <= 0){ if(payDayAdjust.compareTo(max) <= 0){ //约定终止日不能落在已汇款的租金计划的区间段 - checkSql = "select max(rp.plan_date) maxdate from LC_RENT_PLAN rp left join lc_rent_income ci on rp.id=ci.plan_id where ci.id is not null and rp.contract_id = ? and rp.payment_number=?"; + checkSql = "select max(rp.plan_date) maxdate from LC_RENT_PLAN rp left join lc_rent_income ci on rp.id=ci.plan_id where (rp.COLLECT_STATUS <> '未收款' AND rp.COLLECT_STATUS IS NOT NULL AND LENGTH(rp.COLLECT_STATUS)>0 ) and ci.id is not null and rp.contract_id = ? and rp.payment_number=?"; results = conn.executeQuery(checkSql, this.contractId,this.paymentnumber); String maxDate = results.get(0).get("maxdate"); if(maxDate != null){