CREATE TABLE  `rec_msxf_duebill_ctrl_tmp` (
  `id` bigint NOT NULL,
  `txn_amt_sum` varchar(200) DEFAULT NULL,
  `principal_bal_sum` varchar(200) DEFAULT NULL,
  `overdue_prin_sum` varchar(200) DEFAULT NULL,
  `interest_bal_sum` varchar(200) DEFAULT NULL,
  `overdue_int_sum` varchar(200) DEFAULT NULL,
  `penalty_sum` varchar(200) DEFAULT NULL,
  `remark` varchar(100) DEFAULT NULL,
  `trans_id` varchar(100) DEFAULT NULL,
  `deal_sts` varchar(128) DEFAULT '0',
  `data_date` varchar(64) DEFAULT NULL,
  `bank_code` varchar(128) DEFAULT NULL,
  `create_user` varchar(128) DEFAULT NULL,
  `create_org` varchar(64) DEFAULT NULL,
  `create_date` date DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT NULL,
  `update_user` varchar(128) DEFAULT NULL,
  `update_org` varchar(64) DEFAULT NULL,
  `update_date` date DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL,
  `cur_vers` int DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_data_date` (`data_date`)
 
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3

CREATE TABLE  `rec_msxf_duebill_ctrl_his` (
  `id` bigint NOT NULL,
  `txn_amt_sum` varchar(200) DEFAULT NULL,
  `principal_bal_sum` varchar(200) DEFAULT NULL,
  `overdue_prin_sum` varchar(200) DEFAULT NULL,
  `interest_bal_sum` varchar(200) DEFAULT NULL,
  `overdue_int_sum` varchar(200) DEFAULT NULL,
  `penalty_sum` varchar(200) DEFAULT NULL,
  `remark` varchar(100) DEFAULT NULL,
  `trans_id` varchar(100) DEFAULT NULL,
  `deal_sts` varchar(128) DEFAULT '0',
  `data_date` varchar(64) DEFAULT NULL,
  `bank_code` varchar(128) DEFAULT NULL,
  `create_user` varchar(128) DEFAULT NULL,
  `create_org` varchar(64) DEFAULT NULL,
  `create_date` date DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT NULL,
  `update_user` varchar(128) DEFAULT NULL,
  `update_org` varchar(64) DEFAULT NULL,
  `update_date` date DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL,
  `cur_vers` int DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_data_date` (`data_date`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3



ALTER TABLE biz_hxdata_correct_accrual_info
ADD COLUMN yes_total_jtlx DECIMAL(18,4) COMMENT '上日计提利息',
ADD COLUMN yes_total_jtfx DECIMAL(18,4) COMMENT '上日计提罚息';


ALTER TABLE  fac_loan_duebill
ADD COLUMN yes_total_jtlx DECIMAL(18,4) COMMENT '上日计提利息',
ADD COLUMN yes_total_jtfx DECIMAL(18,4) COMMENT '上日计提罚息';

create table `rec_msxf_repay_plan_ctrl_tmp` (
`id` bigint not null,
`principal_total_sum` varchar(255) COMMENT '应还本金总额',
`principal_paid_sum` varchar(255) COMMENT '已还本金总额',
`interest_total_sum` varchar(255) COMMENT '应还利息总额',
`interest_paid_sum` varchar(255) COMMENT '已还利息总额',
`penalty_due_sum` varchar(255) COMMENT '应还罚息总额',
`penalty_paid_sum` varchar(255) COMMENT '已还罚息总额',
`overdue_principal` varchar(255) COMMENT '最近一期逾期本金',
`overdue_interest` varchar(255) COMMENT '最近一期逾期利息',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_data_date` (`data_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3

ALTER TABLE rec_msxf_repay_plan_ctrl_tmp
COMMENT='还款计划对账临时表';
ALTER TABLE rec_msxf_repay_plan_ctrl_his
COMMENT='还款计划对账历史表';

create table `rec_msxf_repay_ctrl_tmp` (
`id` bigint not null,
`principal_due_sum` varchar(255) COMMENT '应还本金总额',
`principal_amt_sum` varchar(255) COMMENT '还款本金总额',
`interest_due_sum` varchar(255) COMMENT '应还利息总额',
`interest_amt_sum` varchar(255) COMMENT '还款利息总额',
`penalty_due_sum` varchar(255) COMMENT '应还罚息总额',
`penalty_amt_sum` varchar(255) COMMENT '还款罚息总额',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`data_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3

create table `rec_msxf_repay_ctrl_his` (
`id` bigint not null,
`principal_due_sum` varchar(255) COMMENT '应还本金总额',
`principal_amt_sum` varchar(255) COMMENT '还款本金总额',
`interest_due_sum` varchar(255) COMMENT '应还利息总额',
`interest_amt_sum` varchar(255) COMMENT '还款利息总额',
`penalty_due_sum` varchar(255) COMMENT '应还罚息总额',
`penalty_amt_sum` varchar(255) COMMENT '还款罚息总额',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`data_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3

ALTER TABLE rec_msxf_repay_ctrl_tmp
COMMENT='贷款还款明细对账';
ALTER TABLE rec_msxf_repay_ctrl_his
COMMENT='贷款还款明细对账历史表';

ALTER TABLE  cus_indiv ADD nationality varchar(10) NULL COMMENT '国籍';
ALTER TABLE  cus_indiv ADD dome_flag varchar(10) NULL COMMENT '境内境外标识 I:境内 O:境外';
ALTER TABLE  cus_indiv ADD resi_flag varchar(10) NULL COMMENT '居民标识 1：居民 2：非居民';

create table `rec_msxf_service_detail_svc_tmp` (
`id` bigint not null,
`biz_date` varchar(64) DEFAULT NULL,
`contr_nbr` varchar(50) COMMENT '合同号',
`ref_nbr` varchar(255) COMMENT '借据号',
`payment_amount` varchar(100) COMMENT '还款金额(罚息金额/理赔罚息金额)',
`settlement_amount` varchar(255) COMMENT '结算金额(服务费金额)',
`repay_ref_nbr` varchar(255) COMMENT '还款流水号(理赔还款，该字段为空)',
`policy_no` varchar(255) COMMENT '保单号',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3
ALTER TABLE rec_msxf_service_detail_svc_tmp
COMMENT='服务费对账文件临时表';

create table  `rec_msxf_service_detail_svc_his` (
`id` bigint not null,
`biz_date` varchar(64) DEFAULT NULL,
`contr_nbr` varchar(50) COMMENT '合同号',
`ref_nbr` varchar(255) COMMENT '借据号',
`payment_amount` varchar(100) COMMENT '还款金额(罚息金额/理赔罚息金额)',
`settlement_amount` varchar(255) COMMENT '结算金额(服务费金额)',
`repay_ref_nbr` varchar(255) COMMENT '还款流水号(理赔还款，该字段为空)',
`policy_no` varchar(255) COMMENT '保单号',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3

ALTER TABLE rec_msxf_service_detail_svc_his
COMMENT='服务费对账文件历史表';

create table `rec_msxf_settle_ctrl_tmp` (
`id` bigint not null,
`principal_due_sum` varchar(255) COMMENT '应还本金总额',
`principal_amt_sum` varchar(255) COMMENT '还款本金总额',
`interest_due_sum` varchar(255) COMMENT '应还利息总额',
`interest_amt_sum` varchar(255) COMMENT '还款利息总额',
`penalty_due_sum` varchar(255) COMMENT '应还罚息总额',
`penalty_amt_sum` varchar(255) COMMENT '还款罚息总额',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`data_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3

create table `rec_msxf_settle_ctrl_his` (
`id` bigint not null,
`principal_due_sum` varchar(255) COMMENT '应还本金总额',
`principal_amt_sum` varchar(255) COMMENT '还款本金总额',
`interest_due_sum` varchar(255) COMMENT '应还利息总额',
`interest_amt_sum` varchar(255) COMMENT '还款利息总额',
`penalty_due_sum` varchar(255) COMMENT '应还罚息总额',
`penalty_amt_sum` varchar(255) COMMENT '还款罚息总额',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`data_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3

ALTER TABLE rec_msxf_repay_ctrl_tmp
COMMENT='贷款理赔还款明细对账';
ALTER TABLE rec_msxf_repay_ctrl_his
COMMENT='贷款理赔还款明细对账历史表';

ALTER TABLE  rec_msxf_settle_tmp CHANGE pl_serial_nbr policy_number varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '保单号';
ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN policy_number varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '保单号';
ALTER TABLE  rec_msxf_settle_tmp DROP COLUMN ps_serial_nbr;

ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN ref_nbr varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '借据号';
ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN pay_date varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还日期';
ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN actual_pay_date varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '实还日期';
ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN pay_principal_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还本金 索赔申请本金';
ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN actual_pay_principal_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '实还本金 实还理赔本金';
ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN pay_interest_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还利息 索赔申请利息';
ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN actual_pay_interest_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '实还利息 实际理赔利息';
ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN pay_principal_penalty_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '索赔申请本罚息';
ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN actual_pay_principal_penalty_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '实际理赔罚息(没有罚息传0)';
ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN period_no varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '实还期次';
ALTER TABLE  rec_msxf_settle_tmp MODIFY COLUMN in_account_no varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '入账账号 保险入账张（行方来款账号，用于区别保险公司类型）';

ALTER TABLE  rec_msxf_settle_his CHANGE pl_serial_nbr policy_number varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '保单号';
ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN policy_number varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '保单号';
ALTER TABLE  rec_msxf_settle_his DROP COLUMN ps_serial_nbr;

ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN ref_nbr varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '借据号';
ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN pay_date varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还日期';
ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN actual_pay_date varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '实还日期';
ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN pay_principal_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还本金 索赔申请本金';
ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN actual_pay_principal_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '实还本金 实还理赔本金';
ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN pay_interest_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还利息 索赔申请利息';
ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN actual_pay_interest_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '实还利息 实际理赔利息';
ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN pay_principal_penalty_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '索赔申请本罚息';
ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN actual_pay_principal_penalty_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '实际理赔罚息(没有罚息传0)';
ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN period_no varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '实还期次';
ALTER TABLE  rec_msxf_settle_his MODIFY COLUMN in_account_no varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '入账账号 保险入账张（行方来款账号，用于区别保险公司类型）';

ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN uuid varchar(60) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '客户编号-客户在马上消费金融的唯一编号';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN contr_nbr varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '合同号-客户完成开户后，循环额度合同编号';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN ref_nbr varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '贷款编号';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN currency varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '币种-默认CNY';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN txn_status varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '贷款状态
1：正常
 3：提前结清
 4：逾期
 5：正常结清
 8：非应计
 9：理赔结清
 17:正常终止
 47:逾期终止
 12：冲正终止
 3、提前结清：账务会对还款计划进行并账，未来期应还本金并账至还款当期；
 8、非应计：逾期天数大于等于91天则为非应计；担保/保险模式不存在
 17、正常终止：我司内部对客户进行风控时发现异常情况，会针对还款计划进行并账，逻辑同提前结清，需要用户在还款日按并账后的还款计划还款；
 47、逾期终止：同17，我司并账后逾期或逾期状态下并账则为逾期终止。
 12、放款成功最终核实为失败的， 冲正日日终推送“冲正终止”状态';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN txn_date varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '放款日期-放款成功日';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN txn_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '放款金额-合作方银行承贷部分本金';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN init_term varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '放款总期数-借款期数';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN curr_term varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '当前期数';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN overdue_days varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '逾期天数-借据逾期天数，超出宽限期第二天开始计逾期。计头不计尾。';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN overdue_date varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '逾期起始日-最早逾期期次行方侧还款日次日';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN principal_bal varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '贷款本金余额-当笔贷款剩余未还本金总额';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN interest_bal varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '贷款利息余额-还款计划信息文件中该笔借据的应还利息总额-已还利息总额';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN overdue_prin varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '逾期贷款本金余额-当前逾期本金总额';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN overdue_int varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '逾期利息-当前逾期利息总额';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN penalty_bal varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '罚息余额-当笔贷款剩余未还罚息总额=罚息总额-已还罚息总额';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN int_type varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '利率类型 N:固定利率';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN int_flag varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '计息标志 ';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN card_no varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '贷款入帐账号-实际借款人卡号';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN guarantee_flag varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '贷款担保方式C000 无担保CC101 保证CC102 抵押CC103 质押CC104 信用CC105 担保C000 无担保---浮动收益模式、信托模式C101 保证-----保证险模式C102 抵押-----无C103 质押-----无C104 信用-----信用险模式C105 担保-----融担模式';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN pmt_type varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '还款方式-1-等额本息;2-等额本金';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN interest_rate varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '借款利率-合作方银行利率';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN penalty_rate varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '罚息利率-合作方银行罚息利率';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN int_rate_type varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '借款利率类型-D:日；M:月；Y:年';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN pen_rate_type varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '罚息利率类型-D:日； M:月； Y:年';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN policy_number varchar(60) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '保单号-保单/担保协议合同号，只有保险/担保模式联合放款才需赋值';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN loan_ratio varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '承贷比-马上：合作方，例如2:8，马上2，合作方8';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN coop_id varchar(61) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '合作方银行编码';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN accu_interest varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '计提利息(按日累加-本期期款利息按天，每日推送)';
ALTER TABLE  rec_msxf_duebill_tmp MODIFY COLUMN accu_penalty varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '计提罚息(每日新增)';

ALTER TABLE  rec_msxf_loan_tmp MODIFY COLUMN biz_date varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '业务日期';
ALTER TABLE  rec_msxf_loan_tmp MODIFY COLUMN contr_nbr varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '合同号';
ALTER TABLE  rec_msxf_loan_tmp MODIFY COLUMN ref_nbr varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '贷款编号';
ALTER TABLE  rec_msxf_loan_tmp MODIFY COLUMN txn_date varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '放款日期';
ALTER TABLE  rec_msxf_loan_tmp MODIFY COLUMN maturity varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '到期日期(最后一期还款的账单日)';
ALTER TABLE  rec_msxf_loan_tmp MODIFY COLUMN txn_amt varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '放款金额';
ALTER TABLE  rec_msxf_loan_tmp MODIFY COLUMN init_term varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '放款总期数';
ALTER TABLE  rec_msxf_loan_tmp MODIFY COLUMN pmt_type varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '还款方式1-等额本息;2-等额本金';
ALTER TABLE  rec_msxf_loan_tmp MODIFY COLUMN open_bank varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '放款银行卡名称';
ALTER TABLE  rec_msxf_loan_tmp MODIFY COLUMN card_no varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '放款银行卡号';
ALTER TABLE  rec_msxf_loan_tmp MODIFY COLUMN bank_serial_no varchar(256) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '放款支付流水号';

ALTER TABLE  rec_msxf_repay_plan_tmp
COMMENT='贷款还款计划临时表';

ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN biz_date varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '业务日期';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN contr_nbr varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '合同号';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN ref_nbr varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '贷款编号';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN term varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '还款期数';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN begin_date varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '开始日期';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN stmt_date varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '到期日期';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN grace_date varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '宽限期到期日';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN status varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '期数状态';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN principal varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还本金';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN principal_paid varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '已还本金';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN principal_due varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '逾期本金';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN principal_due_91 varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '非应计本金';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN interest varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还利息';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN interest_paid varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '已还利息';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN interest_due varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '逾期利息';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN interest_due_91 varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '表外利息';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN penalty_due varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还罚息';
ALTER TABLE  rec_msxf_repay_plan_tmp MODIFY COLUMN penalty_paid varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '已还罚息';

ALTER TABLE  rec_msxf_repay_tmp
COMMENT='贷款还款明细信息临时表';
ALTER TABLE  rec_msxf_settle_status_tmp
COMMENT='马上消费：理赔状态明细文件临时表';

ALTER TABLE  rec_msxf_settle_status_tmp MODIFY COLUMN duebill_no varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '借据号';
ALTER TABLE  rec_msxf_settle_status_tmp MODIFY COLUMN report_date varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '报案日期（理赔等待期最后一天，示例：1月1号账单日，等待期20天，1月21日为等待期最后一天，1月22报案。此处传值20200121）';
ALTER TABLE  rec_msxf_settle_status_tmp MODIFY COLUMN accept_date varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '受理日期(保险模式：保险侧回传理赔完成时间)';
ALTER TABLE  rec_msxf_settle_status_tmp MODIFY COLUMN claim_settlement_date varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '理赔日期';
ALTER TABLE  rec_msxf_settle_status_tmp MODIFY COLUMN insurer_code varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '保险公司代码"1：众安 2：永安 10：华安 11：永诚""保险：众安 1，永安 2，亚太 5，泰康 4，永诚 11， 中证信用 40 担保：为担保公司缩写，例如华章汉辰担保为 HZHCDB， 鸿飞担保为 HFDB"';
ALTER TABLE  rec_msxf_settle_status_tmp MODIFY COLUMN status varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '状态-1 已报案 3 已理赔报案时传1，推送理赔还款明细时推送3';

ALTER TABLE  rec_msxf_policy_detail_tmp
COMMENT='马上消费：保单信息明细文件临时表';
ALTER TABLE  rec_msxf_policy_detail_tmp ADD biz_date varchar(10) NULL COMMENT '业务日期';
ALTER TABLE  rec_msxf_policy_detail_tmp MODIFY COLUMN policy_no varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '保单号';
ALTER TABLE  rec_msxf_policy_detail_tmp MODIFY COLUMN duebill_no varchar(72) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '贷款账号（借据号）';
ALTER TABLE  rec_msxf_policy_detail_tmp MODIFY COLUMN loan_amt decimal(18,4) NULL COMMENT '贷款金额';
ALTER TABLE  rec_msxf_policy_detail_tmp MODIFY COLUMN loan_date varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '发放日期';
ALTER TABLE  rec_msxf_policy_detail_tmp MODIFY COLUMN insurer_code varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '保险公司标识
保险：众安 1，永安 2，亚太 5，泰康 4，永诚 11，
 中证信用 40
 担保：为担保公司缩写，例如汇丰融资担保HFRZDB';

ALTER TABLE  rec_msxf_duebill_ctrl_tmp
COMMENT='贷款借据对账文件临时表';
ALTER TABLE  rec_msxf_duebill_ctrl_tmp ADD file_size int NULL COMMENT '文件大小';
ALTER TABLE  rec_msxf_duebill_ctrl_tmp ADD data_count int NULL COMMENT '数据总条数';
ALTER TABLE  rec_msxf_duebill_ctrl_his ADD file_size int NULL COMMENT '文件大小';
ALTER TABLE  rec_msxf_duebill_ctrl_his ADD data_count int NULL COMMENT '数据总条数';
ALTER TABLE  rec_msxf_duebill_ctrl_his COMMENT='贷款借据对账历史表';
ALTER TABLE  rec_msxf_repay_plan_ctrl_tmp ADD file_size int NULL COMMENT '文件大小';
ALTER TABLE  rec_msxf_repay_plan_ctrl_tmp ADD data_count int NULL COMMENT '数据总条数';
ALTER TABLE  rec_msxf_repay_plan_ctrl_his ADD file_size int NULL COMMENT '文件大小';
ALTER TABLE  rec_msxf_repay_plan_ctrl_his ADD data_count int NULL COMMENT '数据总条数';
ALTER TABLE  rec_msxf_repay_ctrl_tmp ADD file_size int NULL COMMENT '文件大小';
ALTER TABLE  rec_msxf_repay_ctrl_tmp ADD data_count int NULL COMMENT '数据总条数';
ALTER TABLE  rec_msxf_repay_ctrl_his ADD file_size int NULL COMMENT '文件大小';
ALTER TABLE  rec_msxf_repay_ctrl_his ADD data_count int NULL COMMENT '数据总条数';
ALTER TABLE  rec_msxf_settle_ctrl_tmp ADD file_size int NULL COMMENT '文件大小';
ALTER TABLE  rec_msxf_settle_ctrl_tmp ADD data_count int NULL COMMENT '数据总条数';
ALTER TABLE  rec_msxf_settle_ctrl_his ADD file_size int NULL COMMENT '文件大小';
ALTER TABLE  rec_msxf_settle_ctrl_his ADD data_count int NULL COMMENT '数据总条数';
ALTER TABLE  rec_msxf_duebill_ctrl_tmp DROP COLUMN biz_date;
ALTER TABLE  rec_msxf_duebill_ctrl_tmp MODIFY COLUMN txn_amt_sum varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '放款金额总额';
ALTER TABLE  rec_msxf_duebill_ctrl_tmp MODIFY COLUMN principal_bal_sum varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '未还本金总额';
ALTER TABLE  rec_msxf_duebill_ctrl_tmp MODIFY COLUMN overdue_prin_sum varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '逾期本金总额';
ALTER TABLE  rec_msxf_duebill_ctrl_tmp MODIFY COLUMN interest_bal_sum varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '未还利息总额';
ALTER TABLE  rec_msxf_duebill_ctrl_tmp MODIFY COLUMN overdue_int_sum varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '逾期利息总额';
ALTER TABLE  rec_msxf_repay_plan_ctrl_tmp MODIFY COLUMN principal_total_sum varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还本金总额(贷款还款计划表中principal总额)';
ALTER TABLE  rec_msxf_repay_plan_ctrl_tmp MODIFY COLUMN principal_paid_sum varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '已还本金总额(贷款还款计划表中principal_paid总额)';
ALTER TABLE  rec_msxf_repay_plan_ctrl_tmp MODIFY COLUMN interest_total_sum varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还利息总额(贷款还款计划表中interest总额)';
ALTER TABLE  rec_msxf_repay_plan_ctrl_tmp MODIFY COLUMN interest_paid_sum varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '已还利息总额(贷款还款计划表中interest_paid总额)';
ALTER TABLE  rec_msxf_repay_plan_ctrl_tmp MODIFY COLUMN penalty_due_sum varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '应还罚息总额(贷款还款计划表中penalty_due总额)';
ALTER TABLE  rec_msxf_repay_plan_ctrl_tmp MODIFY COLUMN penalty_paid_sum varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '已还罚息总额(贷款还款计划表中penalty_paid总额)';
ALTER TABLE  rec_msxf_repay_plan_ctrl_tmp MODIFY COLUMN overdue_principal varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '最近一期逾期本金(最近一期逾期期数逾期本金)';
ALTER TABLE  rec_msxf_repay_ctrl_tmp ADD overdue_principal_sum varchar(100) NULL COMMENT '最近一期逾期期数逾期本金';
ALTER TABLE  rec_msxf_repay_ctrl_tmp ADD overdue_interest_sum varchar(100) NULL COMMENT '最近一期逾期利息';
ALTER TABLE  rec_msxf_repay_ctrl_his ADD overdue_principal_sum varchar(100) NULL COMMENT '最近一期逾期期数逾期本金';
ALTER TABLE  rec_msxf_repay_ctrl_his ADD overdue_interest_sum varchar(100) NULL COMMENT '最近一期逾期利息';
ALTER TABLE  rec_msxf_cus_info_his_dx ADD remark varchar(100) NULL;
ALTER TABLE  rec_msxf_cus_info_tmp_dx ADD remark varchar(100) NULL;

create table `dvp_msxf_fund_detail_dks_tmp` (
`id` bigint not null,
`biz_date` varchar(64) DEFAULT NULL,
`settlement_no` varchar(50) COMMENT '结算单号',
`contr_nbr` varchar(50) COMMENT '合同号',
`ref_nbr` varchar(100) COMMENT '借据号',
`pay_time` varchar(20) COMMENT '支付完成时间-结算单最后更新时间',
`trade_type` varchar(255) COMMENT '交易类型 001：放款；',
`tran_amt` varchar(128) COMMENT '交易金额',
`pay_ref_nbr` varchar(128) COMMENT '支付流水号(结算单表)',
`card_no` varchar(128) COMMENT '银行卡号-马上对公账户信息',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3;
ALTER TABLE dvp_msxf_fund_detail_dks_tmp
COMMENT='结算放款明细文件临时表';

create table `dvp_msxf_fund_detail_dks_his` (
`id` bigint not null,
`biz_date` varchar(64) DEFAULT NULL,
`settlement_no` varchar(50) COMMENT '结算单号',
`contr_nbr` varchar(50) COMMENT '合同号',
`ref_nbr` varchar(100) COMMENT '借据号',
`pay_time` varchar(20) COMMENT '支付完成时间-结算单最后更新时间',
`trade_type` varchar(255) COMMENT '交易类型 001：放款；',
`tran_amt` varchar(128) COMMENT '交易金额',
`pay_ref_nbr` varchar(128) COMMENT '支付流水号(结算单表)',
`card_no` varchar(128) COMMENT '银行卡号-马上对公账户信息',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3;
ALTER TABLE dvp_msxf_fund_detail_dks_his
COMMENT='结算放款明细文件临时表';

create table `dvp_msxf_fund_sum_dks_tmp` (
`id` bigint not null,
`biz_date` varchar(64) DEFAULT NULL,
`settlement_no` varchar(50) COMMENT '结算单号',
`pay_ref_nbr` varchar(128) COMMENT '支付流水号(结算单表)',
`pay_time` varchar(20) COMMENT '支付完成时间',
`trade_type` varchar(255) COMMENT '交易类型 001：放款；',
`tran_total_amt` varchar(128) COMMENT '交易总金额',
`card_no` varchar(128) COMMENT '银行卡号-马上对公账户信息',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3;
ALTER TABLE dvp_msxf_fund_sum_dks_tmp
COMMENT='结算放款汇总文件临时表';

create table `dvp_msxf_fund_sum_dks_his` (
`id` bigint not null,
`biz_date` varchar(64) DEFAULT NULL,
`settlement_no` varchar(50) COMMENT '结算单号',
`pay_ref_nbr` varchar(128) COMMENT '支付流水号(结算单表)',
`pay_time` varchar(20) COMMENT '支付完成时间',
`trade_type` varchar(255) COMMENT '交易类型 001：放款；',
`tran_total_amt` varchar(128) COMMENT '交易总金额',
`card_no` varchar(128) COMMENT '银行卡号-马上对公账户信息',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3;
ALTER TABLE dvp_msxf_fund_sum_dks_his
COMMENT='结算放款汇总文件历史表';

create table `dvp_msxf_fund_detail_dsf_tmp` (
`id` bigint not null,
`biz_date` varchar(64) DEFAULT NULL,
`settlement_no` varchar(50) COMMENT '结算单号',
`contr_nbr` varchar(50) COMMENT '合同号',
`ref_nbr` varchar(100) COMMENT '借据号',
`pay_time` varchar(20) COMMENT '支付完成时间-结算单最后更新时间',
`trade_type` varchar(255) COMMENT '交易类型 001：放款；',
`tran_amt` varchar(128) COMMENT '交易金额',
`pay_ref_nbr` varchar(128) COMMENT '支付流水号(结算单表)',
`card_no` varchar(128) COMMENT '银行卡号-马上对公账户信息',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3;
ALTER TABLE dvp_msxf_fund_detail_dsf_tmp
COMMENT='结算还款明细文件临时表';

create table `dvp_msxf_fund_detail_dsf_his` (
`id` bigint not null,
`biz_date` varchar(64) DEFAULT NULL,
`settlement_no` varchar(50) COMMENT '结算单号',
`contr_nbr` varchar(50) COMMENT '合同号',
`ref_nbr` varchar(100) COMMENT '借据号',
`pay_time` varchar(20) COMMENT '支付完成时间-结算单最后更新时间',
`trade_type` varchar(255) COMMENT '交易类型 001：放款；',
`tran_amt` varchar(128) COMMENT '交易金额',
`pay_ref_nbr` varchar(128) COMMENT '支付流水号(结算单表)',
`card_no` varchar(128) COMMENT '银行卡号-马上对公账户信息',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3;
ALTER TABLE dvp_fund_detail_dsf_his
COMMENT='结算还款明细文件临时表';

create table `dvp_msxf_fund_sum_dsf_tmp` (
`id` bigint not null,
`biz_date` varchar(64) DEFAULT NULL,
`settlement_no` varchar(50) COMMENT '结算单号',
`pay_ref_nbr` varchar(128) COMMENT '支付流水号(结算单表)',
`pay_time` varchar(20) COMMENT '支付完成时间',
`trade_type` varchar(255) COMMENT '交易类型 001：放款；',
`tran_total_amt` varchar(128) COMMENT '交易总金额',
`card_no` varchar(128) COMMENT '银行卡号-马上对公账户信息',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3;
ALTER TABLE dvp_msxf_fund_sum_dsf_tmp
COMMENT='结算放款汇总文件临时表';

create table `dvp_msxf_fund_sum_dsf_his` (
`id` bigint not null,
`biz_date` varchar(64) DEFAULT NULL,
`settlement_no` varchar(50) COMMENT '结算单号',
`pay_ref_nbr` varchar(128) COMMENT '支付流水号(结算单表)',
`pay_time` varchar(20) COMMENT '支付完成时间',
`trade_type` varchar(255) COMMENT '交易类型 001：放款；',
`tran_total_amt` varchar(128) COMMENT '交易总金额',
`card_no` varchar(128) COMMENT '银行卡号-马上对公账户信息',
`remark` varchar(100) default null,
`trans_id` varchar(100) default null,
`deal_sts` varchar(128) default '0',
`data_date` varchar(64) default null,
`bank_code` varchar(128) default null,
`create_user` varchar(128) default null,
`create_org` varchar(64) default null,
`create_date` date default null,
`create_time` timestamp null default null,
`update_user` varchar(128) default null,
`update_org` varchar(64) default null,
`update_date` date default null,
`update_time` timestamp null default null,
`cur_vers` int default '1',
primary key (`id`),
key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3;
ALTER TABLE dvp_msxf_fund_sum_dsf_his
COMMENT='结算放款汇总文件历史表';

CREATE TABLE ccb_clearing_tmp (
	`id` bigint not null,
	 biz_date varchar(64) COMMENT '业务日期',
    tran_date varchar(64) COMMENT '交易日期',
    tran_time varchar(255)  COMMENT '交易时间',
    cre_type varchar(255) COMMENT '凭证种类',
    cre_no varchar(255) COMMENT '凭证号码',
    message varchar(255) COMMENT '摘要',
    amt varchar(16)  COMMENT '发生额',
    amt1 varchar(16) COMMENT '余额',
    flag1 varchar(1) COMMENT '借贷标志',
    accno2 varchar(60) COMMENT '对方账号',
    acc_name1 varchar(240) COMMENT '对方户名',
    flag2 varchar(1) COMMENT '交易钞汇标志',
    tran_flow varchar(100) COMMENT '交易流水号',
    bflow varchar(100)  COMMENT '企业支付流水号',
    det_no varchar(10) COMMENT '活存账户明细号',
    det varchar(255) COMMENT '备注',
    real_trandate varchar(64)  COMMENT '交易日期',
    rltv_accno varchar(50) COMMENT '关联账号',
    cadbank_nm varchar(300)  COMMENT '对方账户开户行名称',
    ovrlsttn_trck_no varchar(255) COMMENT '全局跟踪号',
    exostm_py_rmrk varchar(255)  COMMENT '外系统支付备注',
	`remark` varchar(100) default null,
	`trans_id` varchar(100) default null,
	`deal_sts` varchar(128) default '0',
	`data_date` varchar(64) default null,
	`bank_code` varchar(128) default null,
	`create_user` varchar(128) default null,
	`create_org` varchar(64) default null,
	`create_date` date default null,
	`create_time` timestamp null default null,
	`update_user` varchar(128) default null,
	`update_org` varchar(64) default null,
	`update_date` date default null,
	`update_time` timestamp null default null,
	`cur_vers` int default '1',
	primary key (`id`),
	key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3

CREATE TABLE ccb_clearing_his (
	`id` bigint not null,
	 biz_date varchar(64) COMMENT '业务日期',
    tran_date varchar(64) COMMENT '交易日期',
    tran_time varchar(255)  COMMENT '交易时间',
    cre_type varchar(255) COMMENT '凭证种类',
    cre_no varchar(255) COMMENT '凭证号码',
    message varchar(255) COMMENT '摘要',
    amt varchar(16)  COMMENT '发生额',
    amt1 varchar(16) COMMENT '余额',
    flag1 varchar(1) COMMENT '借贷标志',
    accno2 varchar(60) COMMENT '对方账号',
    acc_name1 varchar(240) COMMENT '对方户名',
    flag2 varchar(1) COMMENT '交易钞汇标志',
    tran_flow varchar(100) COMMENT '交易流水号',
    bflow varchar(100)  COMMENT '企业支付流水号',
    det_no varchar(10) COMMENT '活存账户明细号',
    det varchar(255) COMMENT '备注',
    real_trandate varchar(64)  COMMENT '交易日期',
    rltv_accno varchar(50) COMMENT '关联账号',
    cadbank_nm varchar(300)  COMMENT '对方账户开户行名称',
    ovrlsttn_trck_no varchar(255) COMMENT '全局跟踪号',
    exostm_py_rmrk varchar(255)  COMMENT '外系统支付备注',
	`remark` varchar(100) default null,
	`trans_id` varchar(100) default null,
	`deal_sts` varchar(128) default '0',
	`data_date` varchar(64) default null,
	`bank_code` varchar(128) default null,
	`create_user` varchar(128) default null,
	`create_org` varchar(64) default null,
	`create_date` date default null,
	`create_time` timestamp null default null,
	`update_user` varchar(128) default null,
	`update_org` varchar(64) default null,
	`update_date` date default null,
	`update_time` timestamp null default null,
	`cur_vers` int default '1',
	primary key (`id`),
	key `idx_biz_date` (`biz_date`) ) ENGINE = InnoDB default CHARSET = utf8mb3

 ALTER TABLE ccb_clearing_tmp
COMMENT='建行活期账户明细临时表';
ALTER TABLE ccb_clearing_his
COMMENT='建行活期账户明细历史临时表';

CREATE TABLE `rec_msxf_re_installment_tmp` (
   `id` bigint NOT NULL,
  `biz_date` varchar(10) DEFAULT NULL COMMENT '业务日期',
  `loan_action_id` varchar(20) DEFAULT NULL COMMENT '再分期流水ID',
  `ref_nbr` varchar(72) DEFAULT NULL COMMENT '借据号',
  `re_installment_freq` int(11) DEFAULT NULL COMMENT '再分期办理次数',
  `re_installment_date` varchar(10) DEFAULT NULL COMMENT '再分期办理时间',
  `re_installment_rate` decimal(17,8) DEFAULT NULL COMMENT '再分期利率',
  `re_installment_term` int(11) DEFAULT NULL COMMENT '再分期期次',
  `loan_init_term` int(11) DEFAULT NULL COMMENT '借据总期次',
  `re_installment_principle` decimal(17,2) DEFAULT NULL COMMENT '再分期本金',
  `reversal_withdrawing_interest` decimal(17,2) DEFAULT NULL COMMENT '回冲计提利息',
  `new_withdrawing_interest` decimal(17,2) DEFAULT NULL COMMENT '重新计提利息',
  `re_installment_overdue_days` int(11) DEFAULT NULL COMMENT '办理前逾期天数',
  `union_bank_dpd_date` varchar(10) DEFAULT NULL COMMENT '办理前逾期起始日',
  `deal_sts` varchar(2) DEFAULT NULL COMMENT '处理状态0-未处理，1-处理成功 2-处理失败',
  `data_date` varchar(10) DEFAULT NULL COMMENT '数据日期',
  `bank_code` varchar(32) DEFAULT NULL COMMENT '银行编码',
  `create_user` varchar(8) DEFAULT NULL COMMENT '登记银行员工编号',
  `create_date` date DEFAULT NULL COMMENT '登记日期',
  `create_time` datetime DEFAULT NULL COMMENT '登记时间戳',
  `create_org` varchar(8) DEFAULT NULL COMMENT '登记机构编号',
  `update_user` varchar(8) DEFAULT NULL COMMENT '更新银行员工编号',
  `update_date` date DEFAULT NULL COMMENT '更新日期',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间戳',
  `update_org` varchar(8) DEFAULT NULL COMMENT '更新机构编号',
  `cur_vers` int NOT NULL DEFAULT '1' COMMENT '版本号',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`),
  KEY `rec_re_installment_tmp_bizdate` (`biz_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='马上消费剩余本金再分期临时表'

CREATE TABLE `rec_msxf_re_installment_his` (
   `id` bigint NOT NULL,
  `biz_date` varchar(10) DEFAULT NULL COMMENT '业务日期',
  `loan_action_id` varchar(20) DEFAULT NULL COMMENT '再分期流水ID',
  `ref_nbr` varchar(72) DEFAULT NULL COMMENT '借据号',
  `re_installment_freq` int(11) DEFAULT NULL COMMENT '再分期办理次数',
  `re_installment_date` varchar(10) DEFAULT NULL COMMENT '再分期办理时间',
  `re_installment_rate` decimal(17,8) DEFAULT NULL COMMENT '再分期利率',
  `re_installment_term` int(11) DEFAULT NULL COMMENT '再分期期次',
  `loan_init_term` int(11) DEFAULT NULL COMMENT '借据总期次',
  `re_installment_principle` decimal(17,2) DEFAULT NULL COMMENT '再分期本金',
  `reversal_withdrawing_interest` decimal(17,2) DEFAULT NULL COMMENT '回冲计提利息',
  `new_withdrawing_interest` decimal(17,2) DEFAULT NULL COMMENT '重新计提利息',
  `re_installment_overdue_days` int(11) DEFAULT NULL COMMENT '办理前逾期天数',
  `union_bank_dpd_date` varchar(10) DEFAULT NULL COMMENT '办理前逾期起始日',
  `deal_sts` varchar(2) DEFAULT NULL COMMENT '处理状态0-未处理，1-处理成功 2-处理失败',
  `data_date` varchar(10) DEFAULT NULL COMMENT '数据日期',
  `bank_code` varchar(32) DEFAULT NULL COMMENT '银行编码',
  `create_user` varchar(8) DEFAULT NULL COMMENT '登记银行员工编号',
  `create_date` date DEFAULT NULL COMMENT '登记日期',
  `create_time` datetime DEFAULT NULL COMMENT '登记时间戳',
  `create_org` varchar(8) DEFAULT NULL COMMENT '登记机构编号',
  `update_user` varchar(8) DEFAULT NULL COMMENT '更新银行员工编号',
  `update_date` date DEFAULT NULL COMMENT '更新日期',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间戳',
  `update_org` varchar(8) DEFAULT NULL COMMENT '更新机构编号',
  `cur_vers` int NOT NULL DEFAULT '1' COMMENT '版本号',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`),
  KEY `rec_re_installment_tmp_bizdate` (`biz_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='马上消费剩余本金再分期历史表'

ALTER TABLE sys_mq_record ADD duebill_no varchar(10) NOT NULL;
ALTER TABLE sys_mq_record ADD cust_no varchar(1024) NOT NULL;
ALTER TABLE sys_mq_record ADD duebill_no varchar(100) NOT NULL;

CREATE TABLE `rec_claim_sum_tmp` (
  `id` bigint NOT NULL,
  `biz_date` varchar(10) DEFAULT NULL COMMENT '业务日期',
  `claim_sum` decimal(17,2) DEFAULT NULL COMMENT '理赔总金额',
  `status` varchar(10) DEFAULT NULL COMMENT '状态',
  `pay_time` varchar(50) DEFAULT NULL COMMENT '付款时间',
  `business_no` varchar(10) DEFAULT NULL COMMENT '对公账户',
  `data_date` varchar(10) DEFAULT NULL COMMENT '数据日期',
  `bank_code` varchar(32) DEFAULT NULL COMMENT '银行编码',
  `create_user` varchar(8) DEFAULT NULL COMMENT '登记银行员工编号',
  `create_date` date DEFAULT NULL COMMENT '登记日期',
  `create_time` datetime DEFAULT NULL COMMENT '登记时间戳',
  `create_org` varchar(8) DEFAULT NULL COMMENT '登记机构编号',
  `update_user` varchar(8) DEFAULT NULL COMMENT '更新银行员工编号',
  `update_date` date DEFAULT NULL COMMENT '更新日期',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间戳',
  `update_org` varchar(8) DEFAULT NULL COMMENT '更新机构编号',
  `cur_vers` int NOT NULL DEFAULT '1' COMMENT '版本号',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`),
  KEY `rec_claim_sum_tmp_bizdate` (`biz_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='理赔结算汇总文件临时表'

CREATE TABLE `rec_claim_sum_his` (
  `id` bigint NOT NULL,
  `biz_date` varchar(10) DEFAULT NULL COMMENT '业务日期',
  `claim_sum` decimal(17,2) DEFAULT NULL COMMENT '理赔总金额',
  `status` varchar(10) DEFAULT NULL COMMENT '状态',
  `pay_time` varchar(50) DEFAULT NULL COMMENT '付款时间',
  `business_no` varchar(10) DEFAULT NULL COMMENT '对公账户',
  `data_date` varchar(10) DEFAULT NULL COMMENT '数据日期',
  `bank_code` varchar(32) DEFAULT NULL COMMENT '银行编码',
  `create_user` varchar(8) DEFAULT NULL COMMENT '登记银行员工编号',
  `create_date` date DEFAULT NULL COMMENT '登记日期',
  `create_time` datetime DEFAULT NULL COMMENT '登记时间戳',
  `create_org` varchar(8) DEFAULT NULL COMMENT '登记机构编号',
  `update_user` varchar(8) DEFAULT NULL COMMENT '更新银行员工编号',
  `update_date` date DEFAULT NULL COMMENT '更新日期',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间戳',
  `update_org` varchar(8) DEFAULT NULL COMMENT '更新机构编号',
  `cur_vers` int NOT NULL DEFAULT '1' COMMENT '版本号',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`),
  KEY `rec_claim_sum_his_bizdate` (`biz_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='理赔结算汇总文件明细历史表'

CREATE TABLE `rec_claim_detail_tmp` (
  `id` bigint NOT NULL,
  `biz_date` varchar(10) DEFAULT NULL COMMENT '业务日期',
  `ref_nbr` varchar(72) DEFAULT NULL COMMENT '借据号',
  `claim_amt` decimal(17,2) DEFAULT NULL COMMENT '理赔总金额',
  `data_date` varchar(10) DEFAULT NULL COMMENT '数据日期',
  `bank_code` varchar(32) DEFAULT NULL COMMENT '银行编码',
  `create_user` varchar(8) DEFAULT NULL COMMENT '登记银行员工编号',
  `create_date` date DEFAULT NULL COMMENT '登记日期',
  `create_time` datetime DEFAULT NULL COMMENT '登记时间戳',
  `create_org` varchar(8) DEFAULT NULL COMMENT '登记机构编号',
  `update_user` varchar(8) DEFAULT NULL COMMENT '更新银行员工编号',
  `update_date` date DEFAULT NULL COMMENT '更新日期',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间戳',
  `update_org` varchar(8) DEFAULT NULL COMMENT '更新机构编号',
  `cur_vers` int NOT NULL DEFAULT '1' COMMENT '版本号',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`),
  KEY `rec_claim_detail_tmp_bizdate` (`biz_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='理赔结算明细临时表


CREATE TABLE `rec_claim_detail_his` (
  `id` bigint NOT NULL,
  `biz_date` varchar(10) DEFAULT NULL COMMENT '业务日期',
  `ref_nbr` varchar(72) DEFAULT NULL COMMENT '借据号',
  `claim_amt` decimal(17,2) DEFAULT NULL COMMENT '理赔金额',
  `data_date` varchar(10) DEFAULT NULL COMMENT '数据日期',
  `bank_code` varchar(32) DEFAULT NULL COMMENT '银行编码',
  `create_user` varchar(8) DEFAULT NULL COMMENT '登记银行员工编号',
  `create_date` date DEFAULT NULL COMMENT '登记日期',
  `create_time` datetime DEFAULT NULL COMMENT '登记时间戳',
  `create_org` varchar(8) DEFAULT NULL COMMENT '登记机构编号',
  `update_user` varchar(8) DEFAULT NULL COMMENT '更新银行员工编号',
  `update_date` date DEFAULT NULL COMMENT '更新日期',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间戳',
  `update_org` varchar(8) DEFAULT NULL COMMENT '更新机构编号',
  `cur_vers` int NOT NULL DEFAULT '1' COMMENT '版本号',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`),
  KEY `rec_claim_detail_his_bizdate` (`biz_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='理赔结算明细历史表'

INSERT INTO oclpjob.xxl_job_info (job_group,job_desc,add_time,update_time,author,alarm_email,schedule_type,schedule_conf,misfire_strategy,executor_route_strategy,executor_handler,executor_block_strategy,executor_timeout,executor_fail_retry_count,glue_type,glue_source,glue_remark,glue_updatetime,child_jobid,trigger_status,trigger_last_time,trigger_next_time,executor_fail_retry_interval,executor_param) VALUES
(30,'【众邦还款明细信息文件】-给CN账务文件-[暂时停用]','2023-01-09 00:31:28','2023-01-09 00:31:28','DXBANK','','CRON','0 30 8 * * ?','DO_NOTHING','FIRST','callJobBatchHandler','SERIAL_EXECUTION',0,2,'BEAN','','GLUE代码初始化','2023-01-09 00:31:28','4314',0,0,0,1800,'{"path":"uploadRepayInfoZBtoCNTasklet"}')
,(30,'【众邦还款计划信息文件】-给CN账务文件-[暂时停用]','2023-01-09 00:31:28','2023-01-09 00:31:28','DXBANK','','CRON','0 30 8 * * ?','DO_NOTHING','FIRST','callJobBatchHandler','SERIAL_EXECUTION',0,2,'BEAN','','GLUE代码初始化','2023-01-09 00:31:28','4315',0,0,0,1800,'{"path":"uploadRepayPlanZBtoCNTasklet"}')
;

INSERT INTO oclpjob.xxl_job_info (job_group,job_desc,add_time,update_time,author,alarm_email,schedule_type,schedule_conf,misfire_strategy,executor_route_strategy,executor_handler,executor_block_strategy,executor_timeout,executor_fail_retry_count,glue_type,glue_source,glue_remark,glue_updatetime,child_jobid,trigger_status,trigger_last_time,trigger_next_time,executor_fail_retry_interval,executor_param) VALUES
(30,'马上消费：-服务费文件-借据号添加后缀','2024-01-16 18:05:12','2024-06-19 16:49:29','DXBANK','','CRON','0 30 6 * * ?','DO_NOTHING','FIRST','callJobBatchHandler','SERIAL_EXECUTION',0,0,'BEAN','','GLUE代码初始化','2024-01-16 18:05:12','',0,0,0,0,'{
	"path": "recMsxfServiceDetailSvcCheckTasklet"
}')
,(30,'马上消费：理赔结算明细临-借据号添加后缀','2024-01-16 18:05:12','2024-06-19 16:49:29','DXBANK','','CRON','0 30 6 * * ?','DO_NOTHING','FIRST','callJobBatchHandler','SERIAL_EXECUTION',0,0,'BEAN','','GLUE代码初始化','2024-01-16 18:05:12','',0,0,0,0,'{
	"path": "recClaimDetailTmpCheckTasklet"
}')
;

