广发银行拉取网银流水
This commit is contained in:
parent
691f14613a
commit
fc610fb813
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,4 +6,5 @@ calc/rebel.xml
|
||||
.idea/
|
||||
apzl_leasing.iml
|
||||
out/
|
||||
WebContent/WEB-INF/classes
|
||||
WebContent/WEB-INF/classes
|
||||
D:/
|
||||
File diff suppressed because it is too large
Load Diff
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.amarsoft.app.awe.config.InitDBType;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -582,4 +583,64 @@ public class DataOperatorUtil {
|
||||
public static List<Map<String,String>> getDataBySql( String sql ) throws Exception {
|
||||
return getDataBySql( null, sql, null );
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行需要事物的数据库操作
|
||||
* @param func
|
||||
*/
|
||||
public static void execOperationTx(Consumer<JBOTransaction> func) {
|
||||
JBOTransaction tx = null;
|
||||
try {
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
func.accept(tx);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
try {
|
||||
if (tx != null) {
|
||||
tx.rollback();
|
||||
}
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
if (tx != null) {
|
||||
tx.commit();
|
||||
}
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行需要事物的数据库操作
|
||||
* @param func
|
||||
*/
|
||||
public static void execOperationTran(Consumer<Transaction> func) {
|
||||
JBOTransaction tx = null;
|
||||
Transaction tran = null;
|
||||
try {
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
tran = Transaction.createTransaction(tx);
|
||||
func.accept(tran);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
try {
|
||||
if (tran != null) {
|
||||
tran.rollback();
|
||||
}
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
if (tran != null) {
|
||||
tran.commit();
|
||||
}
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
package jbo.app.tenwa.calc;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
/**
|
||||
* 休眠还款协议信息表 - JBO命名常量类<br><br>
|
||||
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
|
||||
|
||||
*/
|
||||
public interface LB_RENT_DORMANT {
|
||||
public interface LB_RENT_DORMANT{
|
||||
/**
|
||||
* 休眠租金临时表<br><br>
|
||||
* 休眠还款协议信息表<br><br>
|
||||
* 代表本类映射的BizObjectClass
|
||||
*/
|
||||
public static final String CLASS_NAME = "jbo.app.tenwa.calc.LB_RENT_DORMANT";
|
||||
@ -27,18 +29,16 @@ public interface LB_RENT_DORMANT {
|
||||
* 合同编号 STRING(32)<br>
|
||||
*/
|
||||
public static final String CONTRACT_ID = "CONTRACT_ID";
|
||||
/**
|
||||
* 中车合同编号 STRING(32)<br>
|
||||
*/
|
||||
public static final String zc_contract_num = "zc_contract_num";
|
||||
/**
|
||||
* 休眠还款协议编号 STRING(32)<br>
|
||||
*/
|
||||
public static final String rent_dormant_num = "rent_dormant_num";
|
||||
|
||||
/**
|
||||
* 合同签署时间 STRING(32)<br>
|
||||
*/
|
||||
* 中车合同编号 STRING(32)<br>
|
||||
*/
|
||||
public static final String zc_contract_num = "zc_contract_num";
|
||||
/**
|
||||
* 合同签署时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String contract_date = "contract_date";
|
||||
|
||||
}
|
||||
60
src_jbo/jbo/app/tenwa/calc/VI_LC_RENT_PLAN_NEW.java
Normal file
60
src_jbo/jbo/app/tenwa/calc/VI_LC_RENT_PLAN_NEW.java
Normal file
@ -0,0 +1,60 @@
|
||||
package jbo.app.tenwa.calc;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
/**
|
||||
* 租金计划视图表(新) - JBO命名常量类<br><br>
|
||||
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
|
||||
|
||||
*/
|
||||
public interface VI_LC_RENT_PLAN_NEW{
|
||||
/**
|
||||
* 租金计划视图表(新)<br><br>
|
||||
* 代表本类映射的BizObjectClass
|
||||
*/
|
||||
public static final String CLASS_NAME = "jbo.app.tenwa.calc.VI_LC_RENT_PLAN_NEW";
|
||||
/**
|
||||
* 租金计划编号 STRING(20)<br>
|
||||
*/
|
||||
public static final String id = "id";
|
||||
/**
|
||||
* 项目id STRING(20)<br>
|
||||
*/
|
||||
public static final String project_id = "project_id";
|
||||
/**
|
||||
* 合同号 STRING(20)<br>
|
||||
*/
|
||||
public static final String contract_id = "contract_id";
|
||||
/**
|
||||
* 投放编号 STRING(20)<br>
|
||||
*/
|
||||
public static final String payment_number = "payment_number";
|
||||
/**
|
||||
* 期次 STRING(20)<br>
|
||||
*/
|
||||
public static final String plan_list = "plan_list";
|
||||
/**
|
||||
* 计划日期 STRING(20)<br>
|
||||
*/
|
||||
public static final String plan_date = "plan_date";
|
||||
/**
|
||||
* 租金余额 STRING(20)<br>
|
||||
*/
|
||||
public static final String rent_over = "rent_over";
|
||||
/**
|
||||
* 本金余额 STRING(20)<br>
|
||||
*/
|
||||
public static final String corpus_over = "corpus_over";
|
||||
/**
|
||||
* 利息余额 STRING(20)<br>
|
||||
*/
|
||||
public static final String interest_over = "interest_over";
|
||||
/**
|
||||
* 项目方案编号 STRING(20)<br>
|
||||
*/
|
||||
public static final String PROJECT_PLAN_NUMBER = "PROJECT_PLAN_NUMBER";
|
||||
/**
|
||||
* 合同方案编号 STRING(20)<br>
|
||||
*/
|
||||
public static final String CONTRACT_PLAN_NUMBER = "CONTRACT_PLAN_NUMBER";
|
||||
}
|
||||
@ -1,13 +1,15 @@
|
||||
package jbo.app.tenwa.doc;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
/**
|
||||
* 文档附件详情 - JBO命名常量类<br><br>
|
||||
* - JBOÃüÃû³£Á¿Àà<br><br>
|
||||
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
|
||||
|
||||
*/
|
||||
public interface REMINDER_LETTER {
|
||||
public interface REMINDER_LETTER{
|
||||
/**
|
||||
* 文档附件详情<br><br>
|
||||
* <br><br>
|
||||
* 代表本类映射的BizObjectClass
|
||||
*/
|
||||
public static final String CLASS_NAME = "jbo.app.tenwa.doc.REMINDER_LETTER";
|
||||
@ -16,12 +18,11 @@ public interface REMINDER_LETTER {
|
||||
*/
|
||||
public static final String ID = "ID";
|
||||
/**
|
||||
* 附件编号 STRING(32)<br>
|
||||
* ºÏͬID STRING(64)<br>
|
||||
*/
|
||||
public static final String LIBRARY_ID = "CONTRACT_ID";
|
||||
public static final String CONTRACT_ID = "CONTRACT_ID";
|
||||
/**
|
||||
* 文档路径 STRING(500)<br>
|
||||
* ÀàÐÍ STRING(4)<br>
|
||||
*/
|
||||
public static final String FILEPATH = "TYPE";
|
||||
|
||||
public static final String TYPE = "TYPE";
|
||||
}
|
||||
@ -102,15 +102,15 @@ public interface D_DEPOSITRETURN_INFO{
|
||||
*/
|
||||
public static final String COMPENSATORY_CON = "COMPENSATORY_CON";
|
||||
/**
|
||||
* 本金 DOUBLE(22)<br>
|
||||
*/
|
||||
* 本金 DOUBLE(22)<br>
|
||||
*/
|
||||
public static final String CORPUS = "CORPUS";
|
||||
/**
|
||||
* 利息 DOUBLE(22)<br>
|
||||
*/
|
||||
* 利息 DOUBLE(22)<br>
|
||||
*/
|
||||
public static final String INTEREST = "INTEREST";
|
||||
/**
|
||||
* 罚息 DOUBLE(22)<br>
|
||||
*/
|
||||
* 罚息 DOUBLE(22)<br>
|
||||
*/
|
||||
public static final String PENALTY = "PENALTY";
|
||||
}
|
||||
@ -3,13 +3,13 @@ package jbo.com.tenwa.lease.carbrand;
|
||||
import java.lang.String;
|
||||
|
||||
/**
|
||||
* - JBO命名常量类<br><br>
|
||||
* 租金计划-汽车 - JBO命名常量类<br><br>
|
||||
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
|
||||
|
||||
*/
|
||||
public interface REPORT_RENT_PLAN{
|
||||
/**
|
||||
* <br><br>
|
||||
* 租金计划-汽车<br><br>
|
||||
* 代表本类映射的BizObjectClass
|
||||
*/
|
||||
public static final String CLASS_NAME = "jbo.com.tenwa.lease.carbrand.REPORT_RENT_PLAN";
|
||||
|
||||
56
src_jbo/jbo/loan/LB_CGB_0032_LOG.java
Normal file
56
src_jbo/jbo/loan/LB_CGB_0032_LOG.java
Normal file
@ -0,0 +1,56 @@
|
||||
package jbo.loan;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
/**
|
||||
* 广发银行网银流水每日日志 - JBO命名常量类<br><br>
|
||||
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
|
||||
|
||||
*/
|
||||
public interface LB_CGB_0032_LOG{
|
||||
/**
|
||||
* 广发银行网银流水每日日志<br><br>
|
||||
* 代表本类映射的BizObjectClass
|
||||
*/
|
||||
public static final String CLASS_NAME = "jbo.loan.LB_CGB_0032_LOG";
|
||||
/**
|
||||
* 标识 STRING(32)<br>
|
||||
*/
|
||||
public static final String id = "id";
|
||||
/**
|
||||
* 银行账号 STRING(30)<br>
|
||||
*/
|
||||
public static final String account = "account";
|
||||
/**
|
||||
* 网银流水日期 STRING(10)<br>
|
||||
*/
|
||||
public static final String tran_date = "tran_date";
|
||||
/**
|
||||
* 当天网银流水记录数 INT(20)<br>
|
||||
*/
|
||||
public static final String record_num = "record_num";
|
||||
/**
|
||||
* 正在处理的tran_code STRING(50)<br>
|
||||
*/
|
||||
public static final String curr_rec_tran_code = "curr_rec_tran_code";
|
||||
/**
|
||||
* 正在处理的tran_seq STRING(50)<br>
|
||||
*/
|
||||
public static final String curr_rec_tran_seq = "curr_rec_tran_seq";
|
||||
/**
|
||||
* 当天网银处理状态,0处理中,1处理成功,2处理失败 INT(20)<br>
|
||||
*/
|
||||
public static final String status = "status";
|
||||
/**
|
||||
* 失败信息 STRING(255)<br>
|
||||
*/
|
||||
public static final String fail_msg = "fail_msg";
|
||||
/**
|
||||
* 创建时间 STRING(20)<br>
|
||||
*/
|
||||
public static final String create_time = "create_time";
|
||||
/**
|
||||
* 更新时间 STRING(20)<br>
|
||||
*/
|
||||
public static final String update_time = "update_time";
|
||||
}
|
||||
@ -1,13 +1,15 @@
|
||||
package jbo.oti;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
/**
|
||||
* 接口资料表 - JBO命名常量类<br><br>
|
||||
* 回购金额信息 - JBO命名常量类<br><br>
|
||||
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
|
||||
|
||||
*/
|
||||
public interface FC_BUYBACK_INFO {
|
||||
public interface FC_BUYBACK_INFO{
|
||||
/**
|
||||
* 接口资料表<br><br>
|
||||
* 回购金额信息<br><br>
|
||||
* 代表本类映射的BizObjectClass
|
||||
*/
|
||||
public static final String CLASS_NAME = "jbo.oti.FC_BUYBACK_INFO";
|
||||
@ -16,48 +18,47 @@ public interface FC_BUYBACK_INFO {
|
||||
*/
|
||||
public static final String ID = "ID";
|
||||
/**
|
||||
* 资方请求id STRING(32)<br>
|
||||
*/
|
||||
* 资方请求id STRING(32)<br>
|
||||
*/
|
||||
public static final String FC_REQUEST_ID = "FC_REQUEST_ID";
|
||||
/**
|
||||
* 回购本金 STRING(32)<br>
|
||||
*/
|
||||
* 回购本金 STRING(32)<br>
|
||||
*/
|
||||
public static final String ALL_REMAIN_CORPUS = "ALL_REMAIN_CORPUS";
|
||||
/**
|
||||
* 回购利息 STRING(32)<br>
|
||||
*/
|
||||
* 回购利息 STRING(32)<br>
|
||||
*/
|
||||
public static final String ALL_REMAIN_INTEREST = "ALL_REMAIN_INTEREST";
|
||||
/**
|
||||
* 回购罚息 STRING(32)<br>
|
||||
*/
|
||||
public static final String ALL_REMAIN_PENALTY = "ALL_REMAIN_PENALTY";
|
||||
/**
|
||||
* 实际回购总金额 STRING(32)<br>
|
||||
*/
|
||||
* 实际回购总金额 STRING(32)<br>
|
||||
*/
|
||||
public static final String BUYBACK_MONEY = "BUYBACK_MONEY";
|
||||
/**
|
||||
* 是否已确认 STRING(32)<br>
|
||||
*/
|
||||
* 是否已确认 STRING(32)<br>
|
||||
*/
|
||||
public static final String IS_CONFIRM = "IS_CONFIRM";
|
||||
/**
|
||||
* 凭证状态:0,未生成,1,已生成 STRING(32)<br>
|
||||
*/
|
||||
* 凭证状态:0,未生成,1,已生成 STRING(32)<br>
|
||||
*/
|
||||
public static final String VOUCHER_STATUS = "VOUCHER_STATUS";
|
||||
/**
|
||||
* INPUTUSERID STRING(32)<br>
|
||||
*/
|
||||
* 登记人 STRING(32)<br>
|
||||
*/
|
||||
public static final String INPUTUSERID = "INPUTUSERID";
|
||||
/**
|
||||
* INPUTTIME STRING(32)<br>
|
||||
*/
|
||||
* 登记时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String INPUTTIME = "INPUTTIME";
|
||||
/**
|
||||
* UPDATEUSERID STRING(32)<br>
|
||||
*/
|
||||
* 更新人 STRING(32)<br>
|
||||
*/
|
||||
public static final String UPDATEUSERID = "UPDATEUSERID";
|
||||
/**
|
||||
* UPDATETIME STRING(32)<br>
|
||||
*/
|
||||
* 更新时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String UPDATETIME = "UPDATETIME";
|
||||
|
||||
}
|
||||
@ -1,13 +1,15 @@
|
||||
package jbo.oti;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
/**
|
||||
* 接口资料表 - JBO命名常量类<br><br>
|
||||
* 资方变更日志表 - JBO命名常量类<br><br>
|
||||
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
|
||||
|
||||
*/
|
||||
public interface FC_REQUEST_CHANNEL_LOG {
|
||||
public interface FC_REQUEST_CHANNEL_LOG{
|
||||
/**
|
||||
* 接口资料表<br><br>
|
||||
* 资方变更日志表<br><br>
|
||||
* 代表本类映射的BizObjectClass
|
||||
*/
|
||||
public static final String CLASS_NAME = "jbo.oti.FC_REQUEST_CHANNEL_LOG";
|
||||
@ -16,12 +18,12 @@ public interface FC_REQUEST_CHANNEL_LOG {
|
||||
*/
|
||||
public static final String ID = "ID";
|
||||
/**
|
||||
* 资方请求id STRING(32)<br>
|
||||
*/
|
||||
* 资方请求id STRING(32)<br>
|
||||
*/
|
||||
public static final String FC_REQUEST_ID = "FC_REQUEST_ID";
|
||||
/**
|
||||
* 修改前资方编号 STRING(32)<br>
|
||||
*/
|
||||
* 修改前资方编号 STRING(32)<br>
|
||||
*/
|
||||
public static final String PRE_CHANNEL_NO = "PRE_CHANNEL_NO";
|
||||
/**
|
||||
* 修改前资方名称 STRING(32)<br>
|
||||
@ -32,24 +34,23 @@ public interface FC_REQUEST_CHANNEL_LOG {
|
||||
*/
|
||||
public static final String CHANNEL_NO = "CHANNEL_NO";
|
||||
/**
|
||||
* 修改后资方名称 STRING(32)<br>
|
||||
*/
|
||||
* 修改后资方名称 STRING(32)<br>
|
||||
*/
|
||||
public static final String CHANNEL_NAME = "CHANNEL_NAME";
|
||||
/**
|
||||
* 描述 STRING(32)<br>
|
||||
*/
|
||||
* 描述 STRING(32)<br>
|
||||
*/
|
||||
public static final String REMARK = "REMARK";
|
||||
/**
|
||||
* 变更结果 STRING(32)<br>
|
||||
*/
|
||||
* 变更结果 STRING(32)<br>
|
||||
*/
|
||||
public static final String CHANGE_RESULT = "CHANGE_RESULT";
|
||||
/**
|
||||
* 变更类型 STRING(32)<br>
|
||||
*/
|
||||
* 变更类型:1.资方审批拒绝变更;2.逾期回购 STRING(32)<br>
|
||||
*/
|
||||
public static final String CHANGE_TYPE = "CHANGE_TYPE";
|
||||
/**
|
||||
* 创建时间 STRING(32)<br>
|
||||
*/
|
||||
* 创建时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String CREATETIME = "CREATETIME";
|
||||
|
||||
}
|
||||
@ -18,7 +18,7 @@ public interface FC_YC_FILE_REPAY_PLAN{
|
||||
*/
|
||||
public static final String ID = "ID";
|
||||
/**
|
||||
* ×ʽðÇþµÀÉêÇëID STRING(32)<br>
|
||||
* 资金渠道文件ID STRING(32)<br>
|
||||
*/
|
||||
public static final String FC_FILE_ID = "FC_FILE_ID";
|
||||
/**
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
package jbo.oti;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
/**
|
||||
* 接口资料表 - JBO命名常量类<br><br>
|
||||
* 资方租金还款结果信息 - JBO命名常量类<br><br>
|
||||
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
|
||||
|
||||
*/
|
||||
public interface FC_YC_FILE_REPAY_RESULT {
|
||||
public interface FC_YC_FILE_REPAY_RESULT{
|
||||
/**
|
||||
* 接口资料表<br><br>
|
||||
* 资方租金还款结果信息<br><br>
|
||||
* 代表本类映射的BizObjectClass
|
||||
*/
|
||||
public static final String CLASS_NAME = "jbo.oti.FC_YC_FILE_REPAY_RESULT";
|
||||
@ -16,60 +18,60 @@ public interface FC_YC_FILE_REPAY_RESULT {
|
||||
*/
|
||||
public static final String ID = "ID";
|
||||
/**
|
||||
* 文件ID STRING(32)<br>
|
||||
*/
|
||||
* 资金文件ID STRING(32)<br>
|
||||
*/
|
||||
public static final String FC_FILE_ID = "FC_FILE_ID";
|
||||
/**
|
||||
* 请求ID STRING(32)<br>
|
||||
*/
|
||||
* 资金渠道申请ID STRING(32)<br>
|
||||
*/
|
||||
public static final String FC_REQUEST_ID = "FC_REQUEST_ID";
|
||||
/**
|
||||
* 放款请求编号 STRING(32)<br>
|
||||
* 放款申请编号 STRING(32)<br>
|
||||
*/
|
||||
public static final String LOAN_NO = "LOAN_NO";
|
||||
/**
|
||||
* 期次 STRING(32)<br>
|
||||
*/
|
||||
public static final String LEND_TERM = "TERM_NO";
|
||||
public static final String TERM_NO = "TERM_NO";
|
||||
/**
|
||||
* 还款日期 STRING(32)<br>
|
||||
*/
|
||||
public static final String ANS_REPAYMENT_DATE = "NEW_REPAY_DATE";
|
||||
* 还款日期 STRING(32)<br>
|
||||
*/
|
||||
public static final String NEW_REPAY_DATE = "NEW_REPAY_DATE";
|
||||
/**
|
||||
* 本金 STRING(32)<br>
|
||||
*/
|
||||
public static final String ANS_PRINCIPAL = "ALR_PRINCIPAL";
|
||||
* 本金 STRING(32)<br>
|
||||
*/
|
||||
public static final String ALR_PRINCIPAL = "ALR_PRINCIPAL";
|
||||
/**
|
||||
* 利息 STRING(32)<br>
|
||||
*/
|
||||
public static final String ANS_INTEREST = "ALR_INTEREST";
|
||||
* 利息 STRING(32)<br>
|
||||
*/
|
||||
public static final String ALR_INTEREST = "ALR_INTEREST";
|
||||
/**
|
||||
* 罚息 STRING(32)<br>
|
||||
*/
|
||||
* 罚息 STRING(32)<br>
|
||||
*/
|
||||
public static final String ALR_PENALTY = "ALR_PENALTY";
|
||||
/**
|
||||
* 归还合计 STRING(32)<br>
|
||||
*/
|
||||
public static final String ANS_REPAYMENT_MONEY = "ALR_REPAYMENT_MONEY";
|
||||
* 归还合计 STRING(32)<br>
|
||||
*/
|
||||
public static final String ALR_REPAYMENT_MONEY = "ALR_REPAYMENT_MONEY";
|
||||
/**
|
||||
* 还款标识:0-当期正常结清 、当期逾期结清、1-提前部分还款、2-逾期、3-提前结清 STRING(32)<br>
|
||||
*/
|
||||
* 还款标识:0-当期正常结清 、当期逾期结清、1-提前部分还款、2-逾期、3-提前结清 STRING(32)<br>
|
||||
*/
|
||||
public static final String REPAYMENT_FLAG = "REPAYMENT_FLAG";
|
||||
/**
|
||||
* 还款来源标识:0:借款人本人账户;1:非借款人本人账户 STRING(32)<br>
|
||||
*/
|
||||
* 还款来源标识:0:借款人本人账户;1:非借款人本人账户 STRING(32)<br>
|
||||
*/
|
||||
public static final String REPAYMENT_SOURCE = "REPAYMENT_SOURCE";
|
||||
/**
|
||||
* 提前还款费用 STRING(32)<br>
|
||||
*/
|
||||
* 提前还款费用 STRING(32)<br>
|
||||
*/
|
||||
public static final String TRADE_FEE = "TRADE_FEE";
|
||||
/**
|
||||
* 还款账号 STRING(32)<br>
|
||||
*/
|
||||
* 还款账号 STRING(32)<br>
|
||||
*/
|
||||
public static final String REPAYMENT_ACCOUNT_NO = "REPAYMENT_ACCOUNT_NO";
|
||||
/**
|
||||
* 流水号 STRING(32)<br>
|
||||
*/
|
||||
* 流水号 STRING(32)<br>
|
||||
*/
|
||||
public static final String FLOWNO = "FLOWNO";
|
||||
/**
|
||||
* 创建时间 STRING(32)<br>
|
||||
@ -79,5 +81,4 @@ public interface FC_YC_FILE_REPAY_RESULT {
|
||||
* 修改时间 STRING(32)<br>
|
||||
*/
|
||||
public static final String UPDATE_TIME = "UPDATE_TIME";
|
||||
|
||||
}
|
||||
@ -93,4 +93,8 @@ public interface VI_FLOW_MONITORING{
|
||||
* 承办人编号 STRING(20)<br>
|
||||
*/
|
||||
public static final String USERID = "USERID";
|
||||
/**
|
||||
* ÇþµÀÉÌÃû³Æ STRING(20)<br>
|
||||
*/
|
||||
public static final String DISTRIBUTOR_NAME = "DISTRIBUTOR_NAME";
|
||||
}
|
||||
107
src_tenwa/com/tenwa/cgbbank/dao/LBCgb0032LogDao.java
Normal file
107
src_tenwa/com/tenwa/cgbbank/dao/LBCgb0032LogDao.java
Normal file
@ -0,0 +1,107 @@
|
||||
package com.tenwa.cgbbank.dao;
|
||||
|
||||
import com.amarsoft.are.jbo.*;
|
||||
import com.tenwa.cgbbank.enums.CGB0032LogStatusEnum;
|
||||
import com.tenwa.util.GlobalConst;
|
||||
import jbo.loan.LB_CGB_0032_LOG;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @program: apzl_leasing
|
||||
* @description:
|
||||
* @author: À½Ü
|
||||
* @create: 2023-07-08 11:23
|
||||
*/
|
||||
public class LBCgb0032LogDao {
|
||||
|
||||
private static LBCgb0032LogDao instance = new LBCgb0032LogDao();
|
||||
|
||||
private LBCgb0032LogDao() {
|
||||
}
|
||||
|
||||
public static LBCgb0032LogDao getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public BizObjectManager getBizObjectManager(JBOTransaction jboTransaction) throws JBOException {
|
||||
return JBOFactory.getBizObjectManager("jbo.loan.LB_CGB_0032_LOG", jboTransaction);
|
||||
}
|
||||
|
||||
public BizObject findByAccountAndTranDate(JBOTransaction jboTransaction, String account, String tranDate) throws JBOException {
|
||||
return getBizObjectManager(jboTransaction).createQuery("account=:account and tran_date=:tranDate")
|
||||
.setParameter("account", account)
|
||||
.setParameter("tranDate", tranDate)
|
||||
.getSingleResult(true);
|
||||
}
|
||||
|
||||
public BizObject init(BizObjectManager bizObjManager, String account, String tranDate) throws JBOException {
|
||||
String nowDateTime = LocalDateTime.now().format(GlobalConst.dateTimeFormatter);
|
||||
BizObject lbCgb0032LogBizObj = bizObjManager.newObject();
|
||||
lbCgb0032LogBizObj.setAttributeValue(LB_CGB_0032_LOG.account, account);
|
||||
lbCgb0032LogBizObj.setAttributeValue(LB_CGB_0032_LOG.tran_date, tranDate);
|
||||
lbCgb0032LogBizObj.setAttributeValue(LB_CGB_0032_LOG.record_num, 0);
|
||||
lbCgb0032LogBizObj.setAttributeValue(LB_CGB_0032_LOG.status, 0);
|
||||
lbCgb0032LogBizObj.setAttributeValue(LB_CGB_0032_LOG.create_time, nowDateTime);
|
||||
lbCgb0032LogBizObj.setAttributeValue(LB_CGB_0032_LOG.update_time, nowDateTime);
|
||||
bizObjManager.saveObject(lbCgb0032LogBizObj);
|
||||
return lbCgb0032LogBizObj;
|
||||
}
|
||||
|
||||
public int updateStatus(String id, CGB0032LogStatusEnum statusEnum) throws JBOException {
|
||||
JBOTransaction jboTransaction = null;
|
||||
try {
|
||||
jboTransaction = JBOFactory.createJBOTransaction();
|
||||
return updateStatus(jboTransaction, id, statusEnum);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (jboTransaction != null) {
|
||||
try {
|
||||
jboTransaction.rollback();
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int updateStatus(JBOTransaction jboTransaction, String id, CGB0032LogStatusEnum statusEnum) throws JBOException {
|
||||
return getBizObjectManager(jboTransaction).createQuery("update O set status=:status, update_time=:updateTime where id=:id")
|
||||
.setParameter("status", statusEnum.getCode())
|
||||
.setParameter("updateTime", LocalDateTime.now().format(GlobalConst.dateTimeFormatter))
|
||||
.setParameter("id", id)
|
||||
.executeUpdate();
|
||||
}
|
||||
|
||||
public int recordLog(String id, Integer recordNum, String tranCode, String tranSeq, CGB0032LogStatusEnum statusEnum) {
|
||||
JBOTransaction jboTransaction = null;
|
||||
try {
|
||||
jboTransaction = JBOFactory.createJBOTransaction();
|
||||
return recordLog(jboTransaction, id, recordNum, tranCode,
|
||||
tranSeq, statusEnum);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (jboTransaction != null) {
|
||||
try {
|
||||
jboTransaction.rollback();
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int recordLog(JBOTransaction jboTransaction, String id, Integer recordNum, String tranCode, String tranSeq, CGB0032LogStatusEnum statusEnum) throws JBOException {
|
||||
return getBizObjectManager(jboTransaction)
|
||||
.createQuery("update O set record_num=:recordNum,curr_rec_tran_code=:tranCode,curr_rec_tran_code=:tranSeq, status=:status, update_time=:updateTime where id=:id")
|
||||
.setParameter("recordNum", recordNum)
|
||||
.setParameter("tranCode", tranCode)
|
||||
.setParameter("tranSeq", tranSeq)
|
||||
.setParameter("status", statusEnum.getCode())
|
||||
.setParameter("updateTime", LocalDateTime.now().format(GlobalConst.dateTimeFormatter))
|
||||
.setParameter("id", id)
|
||||
.executeUpdate();
|
||||
}
|
||||
}
|
||||
@ -30,13 +30,10 @@ package com.tenwa.cgbbank.dto;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.tenwa.cgb.conf.CGBconfProperties;
|
||||
import com.tenwa.util.GlobalConst;
|
||||
import com.tenwa.util.SerialNumberUtil;
|
||||
import jbo.app.tenwa.calc.LC_EBANK;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
|
||||
28
src_tenwa/com/tenwa/cgbbank/enums/CGB0032LogStatusEnum.java
Normal file
28
src_tenwa/com/tenwa/cgbbank/enums/CGB0032LogStatusEnum.java
Normal file
@ -0,0 +1,28 @@
|
||||
package com.tenwa.cgbbank.enums;
|
||||
|
||||
/**
|
||||
* 广发0032接口的网银处理状态,
|
||||
*
|
||||
*/
|
||||
public enum CGB0032LogStatusEnum {
|
||||
|
||||
S0(0, "处理中"),
|
||||
S1(1,"处理成功"),
|
||||
S2(2,"处理失败");
|
||||
|
||||
private Integer code;
|
||||
private String desc;
|
||||
|
||||
CGB0032LogStatusEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
@ -76,6 +76,14 @@ public class CGBBankInterfaceHelper {
|
||||
return tcgbbedc;
|
||||
}
|
||||
|
||||
/**
|
||||
* ¹¹½¨ÇëÇóxml
|
||||
* @param interfaceEnum
|
||||
* @param reqBody
|
||||
* @return
|
||||
* @param <T>
|
||||
* @throws JsonProcessingException
|
||||
*/
|
||||
private <T> String buildReqXml(CGBInterfaceEnum interfaceEnum, T reqBody) throws JsonProcessingException {
|
||||
CGBMessageHead messageHead = new CGBMessageHead();
|
||||
messageHead.setTranCode(interfaceEnum.getCode());
|
||||
|
||||
@ -1,15 +1,18 @@
|
||||
package com.tenwa.cgbbank.service;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.*;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.cgbbank.dao.LBCgb0032LogDao;
|
||||
import com.tenwa.cgbbank.dto.*;
|
||||
import com.tenwa.cgbbank.enums.CGB0032LogStatusEnum;
|
||||
import com.tenwa.cgbbank.helper.CGBBankInterfaceHelper;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import jbo.loan.LB_CGB_0032_LOG;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/**
|
||||
* @program: apzl_leasing
|
||||
@ -32,6 +35,8 @@ public class CGBBankService {
|
||||
|
||||
private static CGBBankInterfaceHelper cgbBankInterfaceHelper = CGBBankInterfaceHelper.getInstance();
|
||||
|
||||
private static LBCgb0032LogDao lbCgb0032LogDao = LBCgb0032LogDao.getInstance();
|
||||
|
||||
// 默认操作人ID
|
||||
private String defOperUserId = "admin";
|
||||
// 默认操作人部门ID
|
||||
@ -39,47 +44,122 @@ public class CGBBankService {
|
||||
|
||||
private static final Integer QUERY_PAGE_SIZE = 20;
|
||||
|
||||
public void queryAndSaveTransactionDetailsToEbank(String account, String queryDate) throws JBOException {
|
||||
/**
|
||||
* 广发银行,查询某个账号的某一天的网银数据,按天查询并保存网银处理状态
|
||||
* @param account
|
||||
* @param queryDate
|
||||
* @throws JBOException
|
||||
*/
|
||||
public void startProcess(String account, String queryDate) throws JBOException {
|
||||
BizObject lbCgb0032LogBizObj = null;
|
||||
|
||||
JBOTransaction jboTransaction = null;
|
||||
try {
|
||||
jboTransaction = JBOFactory.createJBOTransaction();
|
||||
lbCgb0032LogBizObj = init(jboTransaction, account, queryDate);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (jboTransaction != null) try {
|
||||
jboTransaction.rollback();
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
throw new RuntimeException("初始化广发银行【交易明细查询-分页接口】执行状态失败!");
|
||||
}
|
||||
|
||||
queryAndSaveTransactionDetailsToEbank(lbCgb0032LogBizObj);
|
||||
}
|
||||
|
||||
private BizObject init(JBOTransaction jboTransaction, String account, String queryDate) throws JBOException {
|
||||
Transaction sqlca = Transaction.createTransaction(jboTransaction);
|
||||
BizObjectManager lbCgb0032LogManager = lbCgb0032LogDao.getBizObjectManager(jboTransaction);
|
||||
BizObject lbCgb0032LogBizObj = lbCgb0032LogDao.findByAccountAndTranDate(jboTransaction, account, queryDate);
|
||||
if (lbCgb0032LogBizObj == null) {
|
||||
lbCgb0032LogBizObj = lbCgb0032LogDao.init(lbCgb0032LogManager, account, queryDate);
|
||||
} else {
|
||||
int anInt = lbCgb0032LogBizObj.getAttribute(LB_CGB_0032_LOG.status).getInt();
|
||||
if (CGB0032LogStatusEnum.S0.getCode().intValue() == anInt) {
|
||||
throw new RuntimeException("已有实例在处理账号【" + account + "】在日期【" + queryDate + "】的数据,不可重复执行!");
|
||||
} else if (CGB0032LogStatusEnum.S2.getCode().intValue() == anInt) {
|
||||
lbCgb0032LogDao.updateStatus(sqlca, lbCgb0032LogBizObj.getAttribute(LB_CGB_0032_LOG.id).getString(), CGB0032LogStatusEnum.S0);
|
||||
}
|
||||
}
|
||||
return lbCgb0032LogBizObj;
|
||||
}
|
||||
|
||||
public void queryAndSaveTransactionDetailsToEbank(BizObject lbCgb0032LogBizObj) throws JBOException {
|
||||
String lbCgb0032LogId = lbCgb0032LogBizObj.getAttribute("id").getString();
|
||||
String account = lbCgb0032LogBizObj.getAttribute("account").getString();
|
||||
String tranDate = lbCgb0032LogBizObj.getAttribute("tran_date").getString();
|
||||
int recordNum = lbCgb0032LogBizObj.getAttribute("record_num").getInt();
|
||||
|
||||
CGB0032ReqBody reqBody = new CGB0032ReqBody();
|
||||
reqBody.setAccount(account);
|
||||
reqBody.setBeginDate(queryDate);
|
||||
reqBody.setEndDate(queryDate);
|
||||
reqBody.setBeginDate(tranDate);
|
||||
reqBody.setEndDate(tranDate);
|
||||
reqBody.setQueryType(0);
|
||||
reqBody.setQueryNumber(QUERY_PAGE_SIZE);
|
||||
|
||||
boolean queryFlag = true;
|
||||
// List<BizObject> ebankObjList = new ArrayList<>();
|
||||
BizObjectManager bizObjectManager = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_EBANK");
|
||||
|
||||
while (queryFlag) {
|
||||
CGBBEDC<CGB0032ResBody> cgb0032ResBodyCGBBEDC = null;
|
||||
try {
|
||||
cgb0032ResBodyCGBBEDC = cgbBankInterfaceHelper.queryTransactionDetails(reqBody);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
// 在请求银行接口出现异常后,保存请求错误信息到【广发银行网银流水每日日志】表
|
||||
lbCgb0032LogDao.recordLog(lbCgb0032LogId, recordNum, reqBody.getBeginRecTranCode(),
|
||||
reqBody.getBeginRecTranSeq(), CGB0032LogStatusEnum.S2);
|
||||
throw new RuntimeException("调用广发银行【交易明细查询-分页接口】失败!");
|
||||
}
|
||||
CGBMessage<CGB0032ResBody> message = cgb0032ResBodyCGBBEDC.getMessage();
|
||||
CGB0032ResBody resBody = message.getBody();
|
||||
|
||||
List<CGB0032ResBodyRecord> records = resBody.getRecords();
|
||||
// ת»»³ÉÍøÒøÁ÷Ë®
|
||||
// ebankObjList.clear();
|
||||
for (CGB0032ResBodyRecord record : records) {
|
||||
if (record.getFinancingSymbol().equals("+")) {
|
||||
// ebankObjList.add();
|
||||
BizObject bizObject = record.convertToEbank(bizObjectManager, defOperUserId, defOperOrgId);
|
||||
bizObjectManager.saveObject(bizObject);
|
||||
JBOTransaction jboTransaction = null;
|
||||
try {
|
||||
jboTransaction = JBOFactory.createJBOTransaction();
|
||||
BizObjectManager bizObjectManager = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_EBANK", jboTransaction);
|
||||
// 转换成网银流水
|
||||
for (CGB0032ResBodyRecord record : records) {
|
||||
if (record.getFinancingSymbol().equals("+")) {
|
||||
BizObject bizObject = record.convertToEbank(bizObjectManager, defOperUserId, defOperOrgId);
|
||||
bizObjectManager.saveObject(bizObject);
|
||||
recordNum++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (resBody.getPageFlag() != 1) {
|
||||
queryFlag = false;
|
||||
} else {
|
||||
reqBody.setBeginRecTranDate(resBody.getNextRecTranDate());
|
||||
reqBody.setBeginRecTranSeq(resBody.getNextRecTranSeq());
|
||||
reqBody.setBeginRecTranCode(resBody.getNextRecTranCode());
|
||||
if (resBody.getPageFlag() != 1) {
|
||||
queryFlag = false;
|
||||
} else {
|
||||
reqBody.setBeginRecTranDate(resBody.getNextRecTranDate());
|
||||
reqBody.setBeginRecTranSeq(resBody.getNextRecTranSeq());
|
||||
reqBody.setBeginRecTranCode(resBody.getNextRecTranCode());
|
||||
}
|
||||
|
||||
lbCgb0032LogDao.recordLog(jboTransaction, lbCgb0032LogId, recordNum, reqBody.getBeginRecTranCode(),
|
||||
reqBody.getBeginRecTranSeq(), CGB0032LogStatusEnum.S0);
|
||||
jboTransaction.commit();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (jboTransaction != null) {
|
||||
try {
|
||||
jboTransaction.rollback();
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
// 记录失败日志
|
||||
lbCgb0032LogDao.recordLog(lbCgb0032LogId, recordNum, reqBody.getBeginRecTranCode(),
|
||||
reqBody.getBeginRecTranSeq(), CGB0032LogStatusEnum.S2);
|
||||
|
||||
// 抛出异常,跳出方法
|
||||
throw new RuntimeException("广发银行处理网银流水出现异常!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 保存成功状态
|
||||
lbCgb0032LogDao.updateStatus(lbCgb0032LogId, CGB0032LogStatusEnum.S1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ public class CGBOnlineBankingTransactionRecordsPullJob implements Job {
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
String yesterday = LocalDate.now().minusDays(1).format(GlobalConst.dateFormatterNone);
|
||||
try {
|
||||
cgbBankService.queryAndSaveTransactionDetailsToEbank(CGBconfProperties.OWNACCNUMBER, yesterday);
|
||||
cgbBankService.startProcess(CGBconfProperties.OWNACCNUMBER, yesterday);
|
||||
} catch (Throwable e) {
|
||||
log.error("定时任务拉取广发银行网银流水失败!拉取日期:" + yesterday + ",本方账号:" + CGBconfProperties.OWNACCNUMBER, e);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user