diff --git a/src_app_fresh/com/base/util/QuartzUtil.java b/src_app_fresh/com/base/util/QuartzUtil.java index 0ed3c644a..42789d19d 100644 --- a/src_app_fresh/com/base/util/QuartzUtil.java +++ b/src_app_fresh/com/base/util/QuartzUtil.java @@ -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) diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java index 8ce1e524f..590b96cf6 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoBuckle.java @@ -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 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(); diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java index e3bdfd968..3b1a9764d 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoRefresh.java @@ -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();