diff --git a/WebContent/WEB-INF/etc/jbo/jbo_voucher.xml b/WebContent/WEB-INF/etc/jbo/jbo_voucher.xml index a9a0949a7..49d8abd83 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_voucher.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_voucher.xml @@ -1,132 +1,152 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -142,9 +162,9 @@ - - - + + + @@ -278,6 +298,6 @@ - - - + + + diff --git a/src_jbo/jbo/voucher/VOUCHER_V8_SUM.java b/src_jbo/jbo/voucher/VOUCHER_V8_SUM.java new file mode 100644 index 000000000..b495204f1 --- /dev/null +++ b/src_jbo/jbo/voucher/VOUCHER_V8_SUM.java @@ -0,0 +1,76 @@ +package jbo.voucher; + +import java.lang.String; + +/** +* - JBO

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface VOUCHER_V8_SUM{ + /** + *

+ * ӳBizObjectClass + */ + public static final String CLASS_NAME = "jbo.voucher.VOUCHER_V8_SUM"; + /** + * ƾ֤ STRING(60)
+ */ + public static final String F3 = "F3"; + /** + * ҵģ STRING(1500)
+ */ + public static final String MODULE_NAME = "MODULE_NAME"; + /** + * ͬ STRING(600)
+ */ + public static final String F47 = "F47"; + /** + * ժҪ STRING(2700)
+ */ + public static final String F5 = "F5"; + /** + * ƴ STRING(60)
+ */ + public static final String F1 = "F1"; + /** + * STRING(60)
+ */ + public static final String F15 = "F15"; + /** + * 跽 STRING(96)
+ */ + public static final String MONEY = "MONEY"; + /** + * ״̬ STRING(10)
+ */ + public static final String FLAG = "FLAG"; + /** + * κ STRING(32)
+ */ + public static final String BATCH = "BATCH"; + /** + * ¼ʱ STRING(32)
+ */ + public static final String CREATE_TIME = "CREATE_TIME"; + /** + * ƾ֤ STRING(60)
+ */ + public static final String GENERATE_DATE = "GENERATE_DATE"; + /** + * STRING(600)
+ */ + public static final String F48 = "F48"; + /** + * STRING(600)
+ */ + public static final String F50 = "F50"; + /** + * ڼ- STRING(30)
+ */ + public static final String F51 = "F51"; + /** + * ڼ- STRING(30)
+ */ + public static final String F52 = "F52"; +} \ No newline at end of file diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/GenerateVoucherSumJob.java b/src_tenwa/com/tenwa/lease/app/quartzmession/GenerateVoucherSumJob.java new file mode 100644 index 000000000..99962da55 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/GenerateVoucherSumJob.java @@ -0,0 +1,58 @@ +package com.tenwa.lease.app.quartzmession; + +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.sql.Connection; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.Transaction; +import com.base.util.QuartzUtil; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; + +import java.sql.CallableStatement; + +/** + * @program: apzl_leasing + * @description: + * @author:  + * @create: 2021-11-03 15:38 + */ +public class GenerateVoucherSumJob implements Job { + + @Override + public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { + JBOTransaction tx; + Transaction tran = null; + String startime = StringFunction.getTodayNow(); + Object userId = jobExecutionContext.getTrigger().getJobDataMap().get("CurUserId"); + String curUserId = userId == null? "system" : userId.toString(); + try { + tx = JBOFactory.createJBOTransaction(); + tran = Transaction.createTransaction(tx); + + // ȡǰ +// String todayDateStr = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy/MM/dd")); + + Connection connection = tran.getConnection(tran); + CallableStatement callableStatement = connection.prepareCall("{call PROC_CALC_VOUCHER_SUM()}"); + callableStatement.execute(); + callableStatement.close(); + + tran.commit(); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CalcPenaltyJob", "success", "ɹ", curUserId); + } catch (Exception e) { + e.printStackTrace(); + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CalcPenaltyJob", "error", "ʧ", curUserId); + try { + if (tran != null) { + tran.rollback(); + } + } catch (JBOException e1) { + e1.printStackTrace(); + } + throw new JobExecutionException(e); + } + } +}