diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java index 8ff77d371..35d5543cb 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java @@ -65,7 +65,7 @@ public class AutoBuckle implements Job { String plan_date = DateAssistant.getToday(); Object userId = arg0.getTrigger().getJobDataMap().get("CurUserId"); String curUserId = userId == null? "system" : userId.toString(); - String sql = "O.plan_list=(select min(t.plan_list) from jbo.loan.VI_RENT_COLLECT t where t.contract_id=O.contract_id and t.COLLECT_STATUS IN ('未收款', '部分收款','代偿') and t.SUBJECTID=:subjectId and t.collect_type=:collectType and t.PLAN_DATE <= '" + plan_date + "' and ( t.BATCH_STATUS<>'process' or t.BATCH_STATUS IS NULL ) and (t.contract_number NOT IN ('BQAP(AH)201908060003','BQAP(AH)201908070002','BQAP(AH)201908070003')) and (t.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y'))) GROUP BY contract_id"; + String sql = "O.plan_list=(select min(t.plan_list) from jbo.loan.VI_RENT_COLLECT t where t.contract_id=O.contract_id and t.COLLECT_STATUS IN ('未收款', '部分收款','代偿') and t.SUBJECTID=:subjectId and t.collect_type=:collectType and t.PLAN_DATE <= '" + plan_date + "' and ( t.BATCH_STATUS<>'process' or t.BATCH_STATUS IS NULL ) and (t.contract_number NOT IN ('BQAP(AH)201908060003','BQAP(AH)201908070002','BQAP(AH)201908070003','BQAP(AH)201907290017','BQAP(AH)201909060001')) and (t.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y'))) GROUP BY contract_id"; // 获取传递过来的参数 try { diff --git a/src_tenwa/quartz/ContractInfoForOverdue.java b/src_tenwa/quartz/ContractInfoForOverdue.java index 3eeae8a7e..b54d50963 100644 --- a/src_tenwa/quartz/ContractInfoForOverdue.java +++ b/src_tenwa/quartz/ContractInfoForOverdue.java @@ -68,11 +68,10 @@ public class ContractInfoForOverdue implements Job{ //防止在当天执行多次定时任务重复插入数据 String sql1 = "SELECT business_status,contract_number,inputtime FROM business_status WHERE business_status='64' AND contract_number='"+contractNumber+"' AND LEFT(inputtime,10)=DATE_FORMAT(SYSDATE(), '%Y/%m/%d')"; List> list2 = DataOperatorUtil.getDataBySql(tx, sql1, null); - //如果这个合同已经提前结清就不再更新状态 - String sql3 = "SELECT id FROM lb_contract_info WHERE id='"+contractId+"' and CONTRACT_STATUS='100' "; - List> list3 = DataOperatorUtil.getDataBySql(tx, sql1, null); + //如果这个合同已经提前结清或者正常结束就不再更新状态 + String sql3 = "SELECT id FROM lb_contract_info WHERE id='"+contractId+"' and (CONTRACT_STATUS='100' or CONTRACT_STATUS='105' )"; + List> list3 = DataOperatorUtil.getDataBySql(tx, sql3, null); if(list2.size()==0 && list3.size()==0 ){ - SaveBusinessStatus.saveByContractId(contractId, tx, "64", jboName.getUserId(arg0, tx)); }