更新处理查不到数据时的问题
This commit is contained in:
parent
729efa8ef6
commit
5ff5998dec
@ -9,6 +9,7 @@ import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.Configure;
|
||||
@ -20,24 +21,32 @@ public class AutoBuckle implements Job{
|
||||
@Override
|
||||
public void execute(JobExecutionContext arg0) throws JobExecutionException {
|
||||
CollectAuditInfoCache ca = new CollectAuditInfoCache();
|
||||
JBOTransaction tx;
|
||||
JBOTransaction tx = null;
|
||||
String plan_date = DateAssistant.getToday();
|
||||
try {
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
//and (O.rent<>'' or O.rent<>'0' or O.rent<>'0.0')
|
||||
List<BizObject> bos = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('δÊÕ¿î', '²¿·ÖÊÕ¿î') and O.PLAN_DATE <= '"+plan_date+"' and O.BATCH_STATUS<>'process' ").getResultList(true);
|
||||
StringBuffer ids = new StringBuffer();
|
||||
for (BizObject bo : bos) {
|
||||
ids.append(bo.getAttribute("id").getString()+"@");
|
||||
if(bos.size()>0){
|
||||
for (BizObject bo : bos) {
|
||||
ids.append(bo.getAttribute("id").getString()+"@");
|
||||
}
|
||||
ca.setId(ids.toString().substring(0, ids.toString().length()-1));
|
||||
Configure CurConfig = Configure.getInstance();
|
||||
ca.setFileSavePath(CurConfig.getConfigure("InterfaceFileSavePath"));
|
||||
ca.setInputuserid("system");
|
||||
ca.setInputorgid("system");
|
||||
ca.batchCollectManage(tx);
|
||||
}
|
||||
ca.setId(ids.toString().substring(0, ids.toString().length()-1));
|
||||
Configure CurConfig = Configure.getInstance();
|
||||
ca.setFileSavePath(CurConfig.getConfigure("InterfaceFileSavePath"));
|
||||
ca.setInputuserid("system");
|
||||
ca.setInputorgid("system");
|
||||
ca.batchCollectManage(tx);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
try {
|
||||
tx.commit();
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.Configure;
|
||||
@ -20,23 +21,31 @@ public class AutoRefresh implements Job{
|
||||
@Override
|
||||
public void execute(JobExecutionContext arg0) throws JobExecutionException {
|
||||
CollectAuditInfoCache ca = new CollectAuditInfoCache();
|
||||
JBOTransaction tx;
|
||||
JBOTransaction tx = null;
|
||||
String plan_date = DateAssistant.getToday();
|
||||
try {
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
List<BizObject> bos = JBOFactory.getBizObjectManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME, tx).createQuery("O.COLLECT_STATUS IN ('δÊÕ¿î', '²¿·ÖÊÕ¿î') and O.PLAN_DATE <= '"+plan_date+"'").getResultList(true);
|
||||
StringBuffer ids = new StringBuffer();
|
||||
for (BizObject bo : bos) {
|
||||
ids.append(bo.getAttribute("id").getString()+"@");
|
||||
if(bos.size()>0){
|
||||
for (BizObject bo : bos) {
|
||||
ids.append(bo.getAttribute("id").getString()+"@");
|
||||
}
|
||||
ca.setId(ids.toString().substring(0, ids.toString().length()-1));
|
||||
Configure CurConfig = Configure.getInstance();
|
||||
ca.setFileSavePath(CurConfig.getConfigure("InterfaceFileSavePath"));
|
||||
ca.setInputuserid("system");
|
||||
ca.setInputorgid("system");
|
||||
ca.queryBatchCollectStatus(tx);
|
||||
}
|
||||
ca.setId(ids.toString().substring(0, ids.toString().length()-1));
|
||||
Configure CurConfig = Configure.getInstance();
|
||||
ca.setFileSavePath(CurConfig.getConfigure("InterfaceFileSavePath"));
|
||||
ca.setInputuserid("system");
|
||||
ca.setInputorgid("system");
|
||||
ca.queryBatchCollectStatus(tx);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
try {
|
||||
tx.commit();
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user