放款回款统计报表定时任务
This commit is contained in:
parent
c368a71270
commit
16c0521d08
@ -0,0 +1,62 @@
|
||||
package com.tenwa.lease.app.quartzmession;
|
||||
|
||||
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.log.Log;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.base.util.QuartzUtil;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
public class InsertReportFlowCount implements Job{
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext arg0) throws JobExecutionException {
|
||||
JBOTransaction tx=null;
|
||||
Transaction Sqlca=null;
|
||||
String startime =StringFunction.getTodayNow();
|
||||
startime = startime.substring(0, 10);
|
||||
|
||||
Object userId = arg0.getTrigger().getJobDataMap().get("CurUserId");
|
||||
String curUserId = userId == null? "system" : userId.toString();
|
||||
|
||||
try {
|
||||
tx= JBOFactory.createJBOTransaction();
|
||||
Sqlca=Transaction.createTransaction(tx);
|
||||
|
||||
String sql="{CALL insert_flow_report()};";
|
||||
SqlObject asql = new SqlObject(sql);
|
||||
Sqlca.executeSQL(asql);
|
||||
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.Commission", "success", "³É¹¦", curUserId);
|
||||
} catch (Exception e) {
|
||||
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.Commission", "success", "ʧ°Ü", curUserId);
|
||||
logger.error(e.getMessage());
|
||||
e.printStackTrace();
|
||||
if(Sqlca!=null){
|
||||
try {
|
||||
Sqlca.rollback();
|
||||
Sqlca = null;
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
}finally{
|
||||
if(Sqlca!=null){
|
||||
try {
|
||||
Sqlca.commit();
|
||||
Sqlca.disConnect();
|
||||
Sqlca = null;
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private static Log logger=ARE.getLog();
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user