修改天津主体卡扣
This commit is contained in:
parent
7095b96376
commit
21bfd558cd
@ -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<String> planIDs = new ArrayList<String>();
|
||||
// 获取传递过来的参数
|
||||
try {
|
||||
//
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
//and (O.rent<>'' or O.rent<>'0' or O.rent<>'0.0')
|
||||
List<BizObject> 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<BizObject> bol = JBOFactory.createBizObjectQuery(LC_OCCUPY_RENT_LIST.CLASS_NAME,"FLOW_NAME in ('网银收款','微信银联收款','微信支付收款')").getResultList(false);
|
||||
//获取租金占用表里的数据有哪些是网银收款占用的
|
||||
List<String> planIDs = new ArrayList<String>();
|
||||
|
||||
if(bol.size()>0){
|
||||
for(int i=0;i<bol.size();i++){
|
||||
String flowName = bol.get(i).getAttribute("FLOW_NAME").toString();
|
||||
@ -80,35 +82,10 @@ public class AutoBuckle implements Job {
|
||||
ca.queryBatchCollectStatus(tx);
|
||||
}
|
||||
|
||||
//天津自动扣款
|
||||
CollectAuditInfoCacheTj caTj = new CollectAuditInfoCacheTj();
|
||||
List<BizObject> 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<planIDs.size();i++){
|
||||
if(pid.equals(planIDs.get(i))){
|
||||
continue a;
|
||||
}
|
||||
}
|
||||
}
|
||||
idsTj.append(pid+"@");
|
||||
}
|
||||
System.out.println("本次扣款的plan_id:"+idsTj.toString());
|
||||
caTj.setId(idsTj.toString().substring(0, idsTj.toString().length()-1));
|
||||
Configure CurConfig = Configure.getInstance();
|
||||
caTj.setFileSavePath(CurConfig.getConfigure("InterfaceFileSavePath"));
|
||||
caTj.setInputuserid(jboName.getUserId(arg0, tx));
|
||||
caTj.setInputorgid("system");
|
||||
caTj.batchCollectManage(tx);
|
||||
caTj.queryBatchCollectStatus(tx);
|
||||
}
|
||||
QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "success", "成功", curUserId);
|
||||
QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "success", "深圳成功", curUserId);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "error", "失败", curUserId);
|
||||
QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "error", "深圳失败", curUserId);
|
||||
if (tx != null) {
|
||||
try {
|
||||
tx.rollback();
|
||||
@ -127,5 +104,56 @@ public class AutoBuckle implements Job {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//天津扣款
|
||||
JBOTransaction txTj = null;
|
||||
try {
|
||||
txTj = JBOFactory.createJBOTransaction();
|
||||
CollectAuditInfoCacheTj caTj = new CollectAuditInfoCacheTj();
|
||||
List<BizObject> 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<planIDs.size();i++){
|
||||
if(pid.equals(planIDs.get(i))){
|
||||
continue a;
|
||||
}
|
||||
}
|
||||
}
|
||||
idsTj.append(pid+"@");
|
||||
}
|
||||
System.out.println("本次扣款的plan_id:"+idsTj.toString());
|
||||
caTj.setId(idsTj.toString().substring(0, idsTj.toString().length()-1));
|
||||
Configure CurConfig = Configure.getInstance();
|
||||
caTj.setFileSavePath(CurConfig.getConfigure("InterfaceFileSavePath"));
|
||||
caTj.setInputuserid(jboName.getUserId(arg0, txTj));
|
||||
caTj.setInputorgid("system");
|
||||
caTj.batchCollectManage(txTj);
|
||||
caTj.queryBatchCollectStatus(txTj);
|
||||
}
|
||||
QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "success", "天津成功", curUserId);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
QuartzUtil.insertLog(plan_date,"com.tenwa.lease.app.quartzmession.AutoBuckle", "error", "天津失败", curUserId);
|
||||
if (txTj != null) {
|
||||
try {
|
||||
txTj.rollback();
|
||||
txTj=null;
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
} finally{
|
||||
try {
|
||||
if(txTj !=null){
|
||||
txTj.commit();
|
||||
}
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user