diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java index 3e69818ab..11bda2740 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java @@ -29,15 +29,17 @@ public class AutoBuckle implements Job { String plan_date = DateAssistant.getToday(); Object userId = arg0.getTrigger().getJobDataMap().get("CurUserId"); String curUserId = userId == null? "system" : userId.toString(); - // 获取传递过来的参数 + + //获取租金占用表里的数据有哪些是网银收款占用的 + List planIDs = new ArrayList(); + // 获取传递过来的参数 try { // tx = JBOFactory.createJBOTransaction(); //and (O.rent<>'' or O.rent<>'0' or O.rent<>'0.0') List bosSz = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN", tx).createQuery("O.COLLECT_STATUS IN ('未收款', '部分收款') and O.SUBJECTID='aa740e4111c111eaaa0000163e0e11e6' and O.PLAN_DATE <= '" + plan_date + "' and ( O.BATCH_STATUS<>'process' or O.BATCH_STATUS IS NULL ) and (O.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y')) ").getResultList(true); List bol = JBOFactory.createBizObjectQuery(LC_OCCUPY_RENT_LIST.CLASS_NAME,"FLOW_NAME in ('网银收款','微信银联收款','微信支付收款')").getResultList(false); - //获取租金占用表里的数据有哪些是网银收款占用的 - List planIDs = new ArrayList(); + if(bol.size()>0){ for(int i=0;i bosTj = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN", tx).createQuery(" O.COLLECT_STATUS IN ('未收款', '部分收款') and O.SUBJECTID='d989246c11c111eaaa0000163e0e11e6' and O.PLAN_DATE <= '" + plan_date + "' and ( O.BATCH_STATUS<>'process' or O.BATCH_STATUS IS NULL ) and (O.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y')) ").getResultList(true); - StringBuffer idsTj = new StringBuffer(); - if(bosTj!=null && bosTj.size()>0){ - a:for(BizObject bo : bosTj){ - String pid = bo.getAttribute("id").getString(); - if(planIDs.size()>0){ - for(int i=0;i bosTj = JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.VI_LC_AUDIT_RENT_PLAN", txTj).createQuery(" O.COLLECT_STATUS IN ('未收款', '部分收款') and O.SUBJECTID='d989246c11c111eaaa0000163e0e11e6' and O.PLAN_DATE <= '" + plan_date + "' and ( O.BATCH_STATUS<>'process' or O.BATCH_STATUS IS NULL ) and (O.distributor_id not in (select dw.distributor_id from jbo.app.tenwa.customer.DEDUCTIONS_WAY dw where dw.Whether_to_enable='Y')) ").getResultList(true); + StringBuffer idsTj = new StringBuffer(); + if(bosTj!=null && bosTj.size()>0){ + a:for(BizObject bo : bosTj){ + String pid = bo.getAttribute("id").getString(); + if(planIDs.size()>0){ + for(int i=0;i