diff --git a/calc/com/tenwa/reckon/adjustInterest/AdjustStartDateYear.java b/calc/com/tenwa/reckon/adjustInterest/AdjustStartDateYear.java index 32ee2c9b3..ddaa89d8f 100644 --- a/calc/com/tenwa/reckon/adjustInterest/AdjustStartDateYear.java +++ b/calc/com/tenwa/reckon/adjustInterest/AdjustStartDateYear.java @@ -14,6 +14,7 @@ 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.base.util.QuartzUtil; import com.tenwa.comm.util.jboutil.DataOperatorUtil; import com.tenwa.reckon.util.DateUtil; @@ -24,6 +25,7 @@ public class AdjustStartDateYear implements Job { @Override public void execute(JobExecutionContext arg0) throws JobExecutionException{ JBOTransaction tx=null; + String startime = StringFunction.getTodayNow(); try { tx=JBOFactory.createJBOTransaction(); AdjustInterestController aic=new AdjustInterestController(); @@ -61,9 +63,9 @@ public class AdjustStartDateYear implements Job { logger.info("起租日年调息完成"); tx.commit(); - QuartzUtil.insertLog("com.tenwa.reckon.adjustInterest.AdjustStartDateYear", "success", "成功"); + QuartzUtil.insertLog(startime,"com.tenwa.reckon.adjustInterest.AdjustStartDateYear", "success", "成功"); } catch (Exception e) { - QuartzUtil.insertLog("com.tenwa.reckon.adjustInterest.AdjustStartDateYear", "success", "失败"); + QuartzUtil.insertLog(startime,"com.tenwa.reckon.adjustInterest.AdjustStartDateYear", "success", "失败"); try { if(tx!=null){ tx.rollback(); diff --git a/src/com/amarsoft/app/util/HelloJob.java b/src/com/amarsoft/app/util/HelloJob.java index f0b7435f2..c2d72f3f5 100644 --- a/src/com/amarsoft/app/util/HelloJob.java +++ b/src/com/amarsoft/app/util/HelloJob.java @@ -9,6 +9,7 @@ import org.quartz.JobExecutionException; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.util.StringFunction; import com.base.util.QuartzUtil; public class HelloJob implements Job { @@ -16,15 +17,16 @@ public class HelloJob implements Job { @Override public void execute(JobExecutionContext arg0) throws JobExecutionException { //System.out.println(DateUtil.getSystemDateTime()); + String startime = StringFunction.getTodayNow(); try { //System.out.println(ProductParamUtil.getProductComponentType("001", "PRD0314")); BizObjectManager bom = JBOFactory.getBizObjectManager(MSG_SEND_RELATIVE.CLASS_NAME); BizObject bo = bom.newObject(); bom.saveObject(bo); //SendMessageUtil.sendMessageByHttpClient("13764771906", "测试短信!"); - QuartzUtil.insertLog("com.amarsoft.app.util.HelloJob", "success", "成功"); + QuartzUtil.insertLog(startime,"com.amarsoft.app.util.HelloJob", "success", "成功"); } catch (Exception e) { - QuartzUtil.insertLog("com.amarsoft.app.util.HelloJob", "success", "失败"); + QuartzUtil.insertLog(startime,"com.amarsoft.app.util.HelloJob", "success", "失败"); e.printStackTrace(); } } diff --git a/src_app_fresh/com/base/util/QuartzUtil.java b/src_app_fresh/com/base/util/QuartzUtil.java index 42789d19d..d0bd7c2ef 100644 --- a/src_app_fresh/com/base/util/QuartzUtil.java +++ b/src_app_fresh/com/base/util/QuartzUtil.java @@ -12,15 +12,16 @@ public class QuartzUtil { private static Log logger=ARE.getLog(); /** * 新增串行任务日志 + * @param startime开始执行时间 * @param method 执行的方法类的全路径 取数据字典{MissionName} * @param status 执行状态 success,notexecute,error * @param Message 异常信息 :成功,不执行或方法不存在,失败 */ - public static void insertLog(String method, String status, String Message) { + public static void insertLog(String startime,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 '"+UUIDUtil.getUUID()+"','" - + method + "','" + status + "','"+StringFunction.getTodayNow().replaceAll(":", "△")+"','" + + method + "','" + status + "','"+startime.replaceAll(":", "△")+"','" + StringFunction.getTodayNow().replaceAll(":", "△") + "','" + Message + "' from dual"; SqlObject so = new SqlObject(sql); diff --git a/src_core/com/tenwa/comm/message/controller/BaseMessageJob.java b/src_core/com/tenwa/comm/message/controller/BaseMessageJob.java index dc1fc7283..7f252854e 100644 --- a/src_core/com/tenwa/comm/message/controller/BaseMessageJob.java +++ b/src_core/com/tenwa/comm/message/controller/BaseMessageJob.java @@ -15,6 +15,7 @@ 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.are.util.StringFunction; import com.base.util.QuartzUtil; public class BaseMessageJob implements Job { @@ -22,13 +23,14 @@ public class BaseMessageJob implements Job { @Override public void execute(JobExecutionContext arg0) throws JobExecutionException { JBOTransaction tx=null; + String startime = StringFunction.getTodayNow(); try { tx= JBOFactory.createJBOTransaction(); this.executeMessage(tx); tx.commit(); - QuartzUtil.insertLog("com.tenwa.comm.message.controller.BaseMessageJob", "success", "成功"); + QuartzUtil.insertLog(startime,"com.tenwa.comm.message.controller.BaseMessageJob", "success", "成功"); } catch (Exception e) { - QuartzUtil.insertLog("com.tenwa.comm.message.controller.BaseMessageJob", "success", "失败"); + QuartzUtil.insertLog(startime,"com.tenwa.comm.message.controller.BaseMessageJob", "success", "失败"); try { if(tx!=null){ tx.rollback(); diff --git a/src_core/com/tenwa/comm/message/controller/BusinessCancelJob.java b/src_core/com/tenwa/comm/message/controller/BusinessCancelJob.java index b7fde934f..026ef24d1 100644 --- a/src_core/com/tenwa/comm/message/controller/BusinessCancelJob.java +++ b/src_core/com/tenwa/comm/message/controller/BusinessCancelJob.java @@ -35,14 +35,14 @@ public class BusinessCancelJob implements Job { @Override public void execute(JobExecutionContext arg0) throws JobExecutionException { JBOTransaction tx=null; + String startime = StringFunction.getTodayNow(); try { tx= JBOFactory.createJBOTransaction(); this.executeMessage(tx); tx.commit(); - QuartzUtil.insertLog("com.tenwa.comm.message.controller.BusinessCancelJob", "success", "成功"); + QuartzUtil.insertLog(startime,"com.tenwa.comm.message.controller.BusinessCancelJob", "success", "成功"); } catch (Exception e) { - QuartzUtil.insertLog("com.tenwa.comm.message.controller.BusinessCancelJob", "error", "失败"); - + QuartzUtil.insertLog(startime,"com.tenwa.comm.message.controller.BusinessCancelJob", "error", "失败"); try { if(tx!=null){ tx.rollback(); diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoFiveGradeClassification.java b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoFiveGradeClassification.java index f4f8d48c9..99d499b68 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoFiveGradeClassification.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoFiveGradeClassification.java @@ -15,6 +15,7 @@ import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOException; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.util.StringFunction; import com.base.util.QuartzUtil; import com.tenwa.comm.util.date.DateAssistant; import com.tenwa.flow.comm.handler.flowmanage.OverdueProjectCache; @@ -24,6 +25,7 @@ public class AutoFiveGradeClassification implements Job { @Override public void execute(JobExecutionContext arg0) throws JobExecutionException{ JBOTransaction tx=null; + String startime = StringFunction.getTodayNow(); try { tx= JBOFactory.createJBOTransaction(); BizObjectManager lccsManager = JBOFactory.getBizObjectManager(LC_CALC_CONDITION_STATUS.CLASS_NAME); @@ -56,9 +58,9 @@ public class AutoFiveGradeClassification implements Job { } } tx.commit(); - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.AutoFiveGradeClassification", "success", "成功"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.AutoFiveGradeClassification", "success", "成功"); } catch (Exception e) { - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.AutoFiveGradeClassification", "success", "失败"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.AutoFiveGradeClassification", "success", "失败"); try { if(tx!=null){ tx.rollback(); diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/CreateSendMessageListAction.java b/src_tenwa/com/tenwa/lease/app/quartzmession/CreateSendMessageListAction.java index 45df448b7..1a86c1d8e 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/CreateSendMessageListAction.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/CreateSendMessageListAction.java @@ -19,6 +19,7 @@ import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOException; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.util.StringFunction; import com.base.util.QuartzUtil; import com.ibm.sslight.tools.mainExit; import com.tenwa.comm.util.date.DateAssistant; @@ -28,11 +29,12 @@ import com.tenwa.comm.util.jboutil.DataOperatorUtil; public class CreateSendMessageListAction implements Job{ @Override public void execute(JobExecutionContext arg0) throws JobExecutionException{ + String startime = StringFunction.getTodayNow(); try { this.getDebitTipsList(); - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.CreateSendMessageListAction", "success", "成功"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CreateSendMessageListAction", "success", "成功"); } catch (Exception e) { - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.CreateSendMessageListAction", "error", "失败"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CreateSendMessageListAction", "error", "失败"); e.printStackTrace(); } diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherMonthSettlementMission.java b/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherMonthSettlementMission.java index e5fc0fd9f..d55ac1f32 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherMonthSettlementMission.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherMonthSettlementMission.java @@ -4,6 +4,7 @@ import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; +import com.amarsoft.are.util.StringFunction; import com.base.util.QuartzUtil; import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMonthSettlement; @@ -11,6 +12,7 @@ public class CreateVoucherMonthSettlementMission implements Job { @Override public void execute(JobExecutionContext arg0) throws JobExecutionException { + String startime = StringFunction.getTodayNow(); try{ CreateVoucherMonthSettlement vouchermanage=new CreateVoucherMonthSettlement(); vouchermanage.CreateVoucher("PZ2018071200000017");//月结手续费--回租 @@ -21,9 +23,9 @@ public class CreateVoucherMonthSettlementMission implements Job { vouchermanage.CreateVoucher("PZ2018072100000055");//日结税金--回租 vouchermanage.CreateVoucher("PZ2018080200000063");//日结税金--直租 - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.CreateVoucherMonthSettlementMission", "success", "成功"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CreateVoucherMonthSettlementMission", "success", "成功"); } catch (Exception e) { - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.CreateVoucherMonthSettlementMission", "error", "失败"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CreateVoucherMonthSettlementMission", "error", "失败"); } } } diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherRentIncomeMission.java b/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherRentIncomeMission.java index 8b92ddcdf..712d55fd7 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherRentIncomeMission.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherRentIncomeMission.java @@ -4,6 +4,7 @@ import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; +import com.amarsoft.are.util.StringFunction; import com.base.util.QuartzUtil; import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherInsuranceSettlement; import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMonthSettlement; @@ -13,6 +14,7 @@ public class CreateVoucherRentIncomeMission implements Job { @Override public void execute(JobExecutionContext arg0) throws JobExecutionException { + String startime = StringFunction.getTodayNow(); try{ CreateVoucherRentIncome cvri=new CreateVoucherRentIncome(); cvri.CreateVoucher("PZ2018072100000024");//收到租金--回租 @@ -28,9 +30,9 @@ public class CreateVoucherRentIncomeMission implements Job { cvis.CreateVoucher("PZ2018072100000054");//保险理赔 -记录理赔保险费--回租 cvis.CreateVoucher("PZ2018080200000064");//保险理赔 -记录理赔保险费--直租 - QuartzUtil.insertLog("com.tenwa.comm.message.controller.BusinessCancelJob", "success", "成功"); + QuartzUtil.insertLog(startime,"com.tenwa.comm.message.controller.BusinessCancelJob", "success", "成功"); } catch (Exception e) { - QuartzUtil.insertLog("com.tenwa.comm.message.controller.BusinessCancelJob", "error", "失败"); + QuartzUtil.insertLog(startime,"com.tenwa.comm.message.controller.BusinessCancelJob", "error", "失败"); } } diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/QueryCommercialVehicleModeListAction.java b/src_tenwa/com/tenwa/lease/app/quartzmession/QueryCommercialVehicleModeListAction.java index 8d4198465..38fe13d5e 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/QueryCommercialVehicleModeListAction.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/QueryCommercialVehicleModeListAction.java @@ -22,6 +22,7 @@ import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOException; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.util.StringFunction; import com.base.util.QuartzUtil; import com.tenwa.lease.util.VehicleAppraisementUtil; @@ -30,6 +31,7 @@ public class QueryCommercialVehicleModeListAction implements Job{ @Override public void execute(JobExecutionContext arg0) throws JobExecutionException { JBOTransaction tx = null; + String startime = StringFunction.getTodayNow(); try { tx = JBOFactory.createJBOTransaction(); BizObjectManager bm1 = JBOFactory.getBizObjectManager(LB_CARDATA_COMMERCIAL_BRAND.CLASS_NAME, tx); @@ -182,9 +184,9 @@ public class QueryCommercialVehicleModeListAction implements Job{ .setParameter("MODELVERSIONTIME",StringUtil.nullToString(versionListObject.get("model_version_time"),"")) .setParameter("INITIALVERSION",StringUtil.nullToString(versionListObject.get("from_version"),"")).executeUpdate(); } - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.QueryCommercialVehicleModeListAction", "success", "成功"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.QueryCommercialVehicleModeListAction", "success", "成功"); } catch (Exception e) { - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.QueryCommercialVehicleModeListAction", "error", "失败"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.QueryCommercialVehicleModeListAction", "error", "失败"); try { if(null != tx){ diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/QueryPassengerVehicleModeListAction.java b/src_tenwa/com/tenwa/lease/app/quartzmession/QueryPassengerVehicleModeListAction.java index d48ef662a..22ec233cc 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/QueryPassengerVehicleModeListAction.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/QueryPassengerVehicleModeListAction.java @@ -23,6 +23,7 @@ import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOException; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.util.StringFunction; import com.base.util.QuartzUtil; import com.tenwa.lease.util.VehicleAppraisementUtil; @@ -31,6 +32,7 @@ public class QueryPassengerVehicleModeListAction implements Job{ @Override public void execute(JobExecutionContext arg0) throws JobExecutionException { JBOTransaction tx = null; + String startime = StringFunction.getTodayNow(); try { tx = JBOFactory.createJBOTransaction(); BizObjectManager bm1 = JBOFactory.getBizObjectManager(LB_CARDATA_BRAND.CLASS_NAME, tx); @@ -215,9 +217,9 @@ public class QueryPassengerVehicleModeListAction implements Job{ .setParameter("INITIALVERSION",StringUtil.nullToString(map.get("InitialVersion"),"")).executeUpdate(); } System.out.println("乘用车车型库更新完毕!"); - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.QueryPassengerVehicleModeListAction", "success", "成功"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.QueryPassengerVehicleModeListAction", "success", "成功"); } catch (Exception e) { - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.QueryPassengerVehicleModeListAction", "error", "失败"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.QueryPassengerVehicleModeListAction", "error", "失败"); try { if(null != tx){ tx.rollback(); diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/SplitInts.java b/src_tenwa/com/tenwa/lease/app/quartzmession/SplitInts.java index 1e5228d1b..816bbc791 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/SplitInts.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/SplitInts.java @@ -20,6 +20,7 @@ import com.amarsoft.are.ARE; import com.amarsoft.are.jbo.JBOException; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.log.Log; +import com.amarsoft.are.util.StringFunction; import com.amarsoft.awe.util.ASResultSet; import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; @@ -44,7 +45,7 @@ public class SplitInts implements Job{ public void execute(JobExecutionContext arg0) throws JobExecutionException { Transaction Sqlca =null; - + String startime = StringFunction.getTodayNow(); // 未计提或发生变更的合同重新计提 try { Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource()); @@ -102,9 +103,9 @@ public class SplitInts implements Job{ } rs.close(); Sqlca.commit(); - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.SplitInts", "success", "成功"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.SplitInts", "success", "成功"); } catch (Exception e) { - QuartzUtil.insertLog("com.tenwa.lease.app.quartzmession.SplitInts", "success", "失败"); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.SplitInts", "success", "失败"); logger.error(e.getMessage()); e.printStackTrace(); }finally{