修改定时器日志工具方法部分bug并在批量代收和刷新加入任务执行日志的调用
This commit is contained in:
parent
d824b75969
commit
90cca38ff9
@ -6,6 +6,7 @@ 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.tenwa.reckon.util.UUIDUtil;
|
||||
|
||||
public class QuartzUtil {
|
||||
private static Log logger=ARE.getLog();
|
||||
@ -18,7 +19,7 @@ public class QuartzUtil {
|
||||
public static void insertLog(String method, String status, String Message) {
|
||||
Transaction tran = Transaction.createTransaction("als");
|
||||
try {
|
||||
String sql = "insert into qrtz_serial_log(id,method_name,status,close_date,inputtime,message) select sys_guid(),'"
|
||||
String sql = "insert into qrtz_serial_log(id,method_name,status,close_date,inputtime,message) select '"+UUIDUtil.getUUID()+"','"
|
||||
+ method + "','" + status + "','"+StringFunction.getTodayNow().replaceAll(":", "¡÷")+"','"
|
||||
+ StringFunction.getTodayNow().replaceAll(":", "¡÷") + "','" + Message
|
||||
+ "' from dual";
|
||||
@ -30,7 +31,7 @@ public class QuartzUtil {
|
||||
tran.commit();
|
||||
} catch (Exception e) {
|
||||
logger.info(e.getMessage());
|
||||
logger.info("新增串行任务日志失败");
|
||||
logger.info("新增任务日志失败");
|
||||
e.printStackTrace();
|
||||
try {
|
||||
if(tran != null)
|
||||
|
||||
@ -13,6 +13,7 @@ import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.Configure;
|
||||
import com.base.util.QuartzUtil;
|
||||
import com.tenwa.collectaudit.cache.CollectAuditInfoCache;
|
||||
import com.tenwa.comm.util.date.DateAssistant;
|
||||
|
||||
@ -24,6 +25,7 @@ public class AutoBuckle implements Job{
|
||||
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' or o.BATCH_STATUS IS NULL ) ").getResultList(true);
|
||||
@ -39,8 +41,10 @@ public class AutoBuckle implements Job{
|
||||
ca.setInputorgid("system");
|
||||
ca.batchCollectManage(tx);
|
||||
}
|
||||
QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.AutoBuckle", "success", "成功");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.AutoBuckle", "error", "失败");
|
||||
}finally{
|
||||
try {
|
||||
tx.commit();
|
||||
|
||||
@ -13,6 +13,7 @@ import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.Configure;
|
||||
import com.base.util.QuartzUtil;
|
||||
import com.tenwa.collectaudit.cache.CollectAuditInfoCache;
|
||||
import com.tenwa.comm.util.date.DateAssistant;
|
||||
|
||||
@ -38,8 +39,10 @@ public class AutoRefresh implements Job{
|
||||
ca.setInputorgid("system");
|
||||
ca.queryBatchCollectStatus(tx);
|
||||
}
|
||||
QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.AutoRefresh", "success", "成功");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.AutoRefresh", "error", "失败");
|
||||
}finally{
|
||||
try {
|
||||
tx.commit();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user