diff --git a/WebContent/Ample/Doc/DocListUploadNew.jsp b/WebContent/Ample/Doc/DocListUploadNew.jsp
index 9065653b2..c129b728a 100644
--- a/WebContent/Ample/Doc/DocListUploadNew.jsp
+++ b/WebContent/Ample/Doc/DocListUploadNew.jsp
@@ -78,6 +78,7 @@
for(BizObject bo : frfBoList){
bo.setAttributeValue("FC_FILE_STS","2");
bo.setAttributeValue("FC_FILE_STS_DESC","用户添加待补传");
+ frfBom.saveObject(bo);
}
BizObject frfBo = frfBom.newObject();
frfBo.setAttributeValue("FC_REQUEST_ID",params.get("fcRequestId"));
diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContractPersonBaseInfo/LBContractPersonBaseInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContractPersonBaseInfo/LBContractPersonBaseInfo.jsp
index 481955631..4d69908bd 100644
--- a/WebContent/Tenwa/Lease/Flow/Comm/LBContractPersonBaseInfo/LBContractPersonBaseInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContractPersonBaseInfo/LBContractPersonBaseInfo.jsp
@@ -77,9 +77,11 @@
$("#div_1390").find("[style='display:inline-block;width:6px;']").css("width","100");
$("#div_1054").find("[style='display:inline-block;width:6px;']").css("width","88");
$("#div_1058").find("[style='display:inline-block;width:6px;']").css("width","74");
- /* 右侧 样式微调*/
+
+ /!* 右侧 样式微调*!/
$("#A_div_900").find("[style='display:inline-block;width:6px;']").css("width","86");
$("#div_930").find("[style='display:inline-block;width:6px;']").css("width","86");
+ $("#A_div_1070").find("[style='display:inline-block;width:6px;']").css("width","86");
function saveRend(){
//校验业务合同号唯一性
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_oti.xml b/WebContent/WEB-INF/etc/jbo/jbo_oti.xml
index d7190b017..572077ce2 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_oti.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_oti.xml
@@ -392,7 +392,7 @@
-
+
@@ -410,6 +410,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -425,5 +485,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebContent/WEB-INF/etc/sql/insertIntoCashFlow.xml b/WebContent/WEB-INF/etc/sql/insertIntoCashFlow.xml
new file mode 100644
index 000000000..cfaf58eba
--- /dev/null
+++ b/WebContent/WEB-INF/etc/sql/insertIntoCashFlow.xml
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dataSource
+ false
+
+
+
\ No newline at end of file
diff --git a/WebContent/com/tenwa/apzl/settleLoan/CorpusSourceSettleLoanInfo.jsp b/WebContent/com/tenwa/apzl/settleLoan/CorpusSourceSettleLoanInfo.jsp
new file mode 100644
index 000000000..4e1a3ea38
--- /dev/null
+++ b/WebContent/com/tenwa/apzl/settleLoan/CorpusSourceSettleLoanInfo.jsp
@@ -0,0 +1,26 @@
+<%@ page contentType="text/html; charset=GBK"%><%@
+ include file="/Frame/resources/include/include_begin_info.jspf"%><%
+
+ String fcPrepayQueryID = CurPage.getParameter("fcPrepayQueryID");
+
+ ASObjectModel doTemp = new ASObjectModel("FC_YC_PREPAY_QUERY");
+ doTemp.setJboWhere("id='"+fcPrepayQueryID+"'");
+
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
+ dwTemp.ReadOnly = "1"; //设置是否只读 1:只读 0:可写
+ dwTemp.genHTMLObjectWindow("");
+
+ String sButtons[][] = {
+ {"true","","Button","返回","返回","returnList()","","","",""},
+ };
+%><%@include file="/Frame/resources/include/ui/include_info.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/com/tenwa/apzl/settleLoan/CorpusSourceSettleLoanList.jsp b/WebContent/com/tenwa/apzl/settleLoan/CorpusSourceSettleLoanList.jsp
new file mode 100644
index 000000000..c8abe1a46
--- /dev/null
+++ b/WebContent/com/tenwa/apzl/settleLoan/CorpusSourceSettleLoanList.jsp
@@ -0,0 +1,33 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
+ /*
+ Author: undefined 2021-08-04
+ Content:
+ History Log:
+ */
+ ASObjectModel doTemp = new ASObjectModel("FC_YC_PREPAY_QUERY");
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ dwTemp.Style="1"; //--设置为Grid风格--
+ dwTemp.ReadOnly = "1"; //只读模式
+ dwTemp.setPageSize(20);
+ dwTemp.genHTMLObjectWindow("");
+
+ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
+ String sButtons[][] = {
+ {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
+ };
+%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/com/tenwa/apzl/settleLoan/FcBuyBackInfo.jsp b/WebContent/com/tenwa/apzl/settleLoan/FcBuyBackInfo.jsp
new file mode 100644
index 000000000..7f87508e2
--- /dev/null
+++ b/WebContent/com/tenwa/apzl/settleLoan/FcBuyBackInfo.jsp
@@ -0,0 +1,58 @@
+<%@ page contentType="text/html; charset=GBK"%><%@
+ include file="/Frame/resources/include/include_begin_info.jspf"%><%
+
+ String id = CurPage.getParameter("ID");
+ String fcRequestId = CurPage.getParameter("fcRequestId");
+ String firstOverdueCorpus = CurPage.getParameter("firstOverdueCorpus");
+ String firstOverdueInterest = CurPage.getParameter("firstOverdueInterest");
+ String secondOverdueCorpus = CurPage.getParameter("secondOverdueCorpus");
+ String secondOverdueInterest = CurPage.getParameter("secondOverdueInterest");
+ String overdueList = CurPage.getParameter("overdueList");
+ String voucherStatus = CurPage.getParameter("voucherStatus");
+ String allRemainMoney = CurPage.getParameter("allRemainMoney");
+ String readOnly = "0";
+ if("1".equals(voucherStatus)){
+ readOnly="1";
+ }
+ ASObjectModel doTemp = new ASObjectModel("FC_BUYBACK_INFO");
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
+ dwTemp.ReadOnly = readOnly; //设置是否只读 1:只读 0:可写
+ dwTemp.genHTMLObjectWindow(id);
+
+ String sButtons[][] = {
+ {"0".equals(readOnly)?"true":"false","All","Button","保存","保存所有修改","save()","","","",""},
+ {"true","","Button","返回","返回","returnList()","","","",""},
+ };
+ sButtonPosition = "south";
+%><%@include file="/Frame/resources/include/ui/include_info.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/com/tenwa/apzl/settleLoan/FcBuyBackList.jsp b/WebContent/com/tenwa/apzl/settleLoan/FcBuyBackList.jsp
new file mode 100644
index 000000000..1edbfd0f3
--- /dev/null
+++ b/WebContent/com/tenwa/apzl/settleLoan/FcBuyBackList.jsp
@@ -0,0 +1,74 @@
+<%@ page contentType="text/html; charset=GBK"%>
+<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
+ /*
+ Author: undefined 2021-08-04
+ Content:
+ History Log:
+ */
+ ASObjectModel doTemp = new ASObjectModel("FC_BUYBACK_LIST");
+ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
+ dwTemp.Style="1"; //--设置为Grid风格--
+ dwTemp.ReadOnly = "1"; //只读模式
+ dwTemp.setPageSize(20);
+ dwTemp.genHTMLObjectWindow("");
+
+ //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
+ String sButtons[][] = {
+ {"true","","Button","新增","新增","newRecord()","","","","btn_icon_detail",""},
+ {"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_detail",""},
+ {"true","","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""},
+ };
+%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
+
+<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/src/com/ap/BuyBack.java b/src/com/ap/BuyBack.java
new file mode 100644
index 000000000..ed9386e6d
--- /dev/null
+++ b/src/com/ap/BuyBack.java
@@ -0,0 +1,109 @@
+package com.ap;
+
+import com.alibaba.fastjson.JSONObject;
+import com.amarsoft.are.jbo.*;
+import jbo.app.tenwa.calc.LC_RENT_INCOME;
+import jbo.app.tenwa.calc.LC_RENT_PLAN;
+import jbo.oti.FC_BUYBACK_INFO;
+import java.math.BigDecimal;
+
+public class BuyBack {
+
+ private String contractId;
+ private String fcRequestId;
+
+ /**
+ * 获取开始逾期的两期的本金利息以及开始期次
+ * @return JSON格式的字符串
+ * @throws JBOException
+ */
+ public String getBuyBackInfoByContract() throws JBOException {
+ JSONObject jsonObject = new JSONObject();
+ //获取实收表最后一期信息记录
+ String sql = "select sum(rent) as v.rent,sum(CORPUS) as v.corpus,sum(INTEREST) as v.interest,PLAN_LIST,PLAN_ID from O where CONTRACT_ID='"+contractId+"' "
+ + "and plan_list=(select max(plan_list) from O where CONTRACT_ID='"+contractId+"') group by PLAN_LIST";
+ BizObject boLRI = JBOFactory.getBizObjectManager(LC_RENT_INCOME.CLASS_NAME).createQuery(sql).getSingleResult(false);
+ //给出默认值,如果当查询结果为null时,就默认第一期开始就没还过钱,防止NPE
+ String rent_in = "0.00";
+ String corpus = "0.00";
+ String interest = "0.00";
+ int planList = 1;
+ if(boLRI!=null){
+ rent_in = boLRI.getAttribute("rent").getString();
+ corpus = boLRI.getAttribute("corpus").getString();
+ interest = boLRI.getAttribute("interest").getString();
+ planList = boLRI.getAttribute("PLAN_LIST").getInt();
+ }
+
+ //获取当期对应租金计划
+ BizObjectManager bomLRP = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME);
+ BizObjectQuery boqLRP = bomLRP.createQuery("contract_id=:contractId and plan_list=:planList").setParameter("contractId",contractId);
+ BizObject boLRP = boqLRP.setParameter("planList",planList).getSingleResult(false);
+ String rent_plan = boLRP.getAttribute("rent").getString();
+ String allRemainCorpus = boLRP.getAttribute("ALL_REMAIN_CORPUS").getString();
+ //检验当期是否结清
+ boolean planListIsComplete = new BigDecimal(rent_in).compareTo(new BigDecimal(rent_plan))>=0;
+
+ //不带0为当期;带1为下一期;带2为下两期
+ //+1期为通用,故挪到上面来
+ BizObject boLRP1 = boqLRP.setParameter("planList",planList+1).getSingleResult(false);
+ String corpus1 = "0.00";
+ String interest1 = "0.00";
+ if(boLRP1!=null){
+ corpus1 = boLRP1.getAttribute("corpus").toString();
+ interest1 = boLRP1.getAttribute("interest").toString();
+ }
+
+ if(planListIsComplete){
+ BizObject boLRP2 = boqLRP.setParameter("planList",planList+2).getSingleResult(false);
+ String corpus2 = "0.00";
+ String interest2 = "0.00";
+ if(boLRP2!=null){
+ corpus2 = boLRP2.getAttribute("corpus").toString();
+ interest2 = boLRP2.getAttribute("interest").toString();
+ }
+ jsonObject.put("FIRST_OVERDUE_CORPUS",corpus1);
+ jsonObject.put("FIRST_OVERDUE_INTEREST",interest1);
+ jsonObject.put("SECOND_OVERDUE_CORPUS",corpus2);
+ jsonObject.put("SECOND_OVERDUE_INTEREST",interest2);
+ jsonObject.put("OVERDUE_LIST",planList+1);
+ jsonObject.put("ALL_REMAIN_MONEY",new BigDecimal(allRemainCorpus).add(new BigDecimal(interest1)).add(new BigDecimal(interest2)).setScale(2,BigDecimal.ROUND_HALF_UP).toString());
+ }else{
+ String buyBackCorpus = new BigDecimal(boLRP.getAttribute("corpus").toString()).subtract(new BigDecimal(corpus)).setScale(2,BigDecimal.ROUND_HALF_UP).toString();
+ String buyBackInterest = new BigDecimal(boLRP.getAttribute("interest").toString()).subtract(new BigDecimal(interest)).setScale(2,BigDecimal.ROUND_HALF_UP).toString();
+ jsonObject.put("FIRST_OVERDUE_CORPUS",buyBackCorpus);
+ jsonObject.put("FIRST_OVERDUE_INTEREST",buyBackInterest);
+ jsonObject.put("SECOND_OVERDUE_CORPUS",corpus1);
+ jsonObject.put("SECOND_OVERDUE_INTEREST",interest1);
+ jsonObject.put("OVERDUE_LIST",planList);
+ jsonObject.put("ALL_REMAIN_MONEY", new BigDecimal(allRemainCorpus).subtract(new BigDecimal(corpus)).add(new BigDecimal(buyBackInterest)).add(new BigDecimal(interest1)).setScale(2,BigDecimal.ROUND_HALF_UP).toString());
+ }
+ return jsonObject.toString();
+ }
+
+ /**
+ * 检验是否已经回购
+ * @return
+ * @throws JBOException
+ */
+ public String isHasCheck() throws JBOException {
+ BizObjectManager bomFBI = JBOFactory.getBizObjectManager(FC_BUYBACK_INFO.CLASS_NAME);
+ int boFBI = bomFBI.createQuery("FC_REQUEST_ID=:fcRequestId").setParameter("fcRequestId",fcRequestId).getTotalCount();
+ return boFBI+"";
+ }
+
+ public String getContractId() {
+ return contractId;
+ }
+
+ public void setContractId(String contractId) {
+ this.contractId = contractId;
+ }
+ public String getFcRequestId() {
+ return fcRequestId;
+ }
+
+ public void setFcRequestId(String fcRequestId) {
+ this.fcRequestId = fcRequestId;
+ }
+}
diff --git a/src_jbo/jbo/oti/FC_BUYBACK_INFO.java b/src_jbo/jbo/oti/FC_BUYBACK_INFO.java
new file mode 100644
index 000000000..135c44a68
--- /dev/null
+++ b/src_jbo/jbo/oti/FC_BUYBACK_INFO.java
@@ -0,0 +1,79 @@
+package jbo.oti;
+
+/**
+* 接口资料表 - JBO命名常量类
+* Note: This file is generated by ADE tools, dont modify it.
+
+*/
+public interface FC_BUYBACK_INFO {
+ /**
+ * 接口资料表
+ * 代表本类映射的BizObjectClass
+ */
+ public static final String CLASS_NAME = "jbo.oti.FC_BUYBACK_INFO";
+ /**
+ * 唯一标识 STRING(32)
+ */
+ public static final String ID = "ID";
+ /**
+ * 资方请求id STRING(32)
+ */
+ public static final String FC_REQUEST_ID = "FC_REQUEST_ID";
+ /**
+ * 逾期开始期次 STRING(32)
+ */
+ public static final String OVERDUE_LIST = "OVERDUE_LIST";
+ /**
+ * 逾期第一期本金 STRING(32)
+ */
+ public static final String FIRST_OVERDUE_CORPUS = "FIRST_OVERDUE_CORPUS";
+ /**
+ * 逾期第一期利息 STRING(32)
+ */
+ public static final String FIRST_OVERDUE_INTEREST = "FIRST_OVERDUE_INTEREST";
+ /**
+ * 逾期第一期罚息 STRING(32)
+ */
+ public static final String FIRST_OVERDUE_PENALTY = "FIRST_OVERDUE_PENALTY";
+ /**
+ * 逾期第二期本金 STRING(32)
+ */
+ public static final String SECOND_OVERDUE_CORPUS = "SECOND_OVERDUE_CORPUS";
+ /**
+ * 逾期第二期利息 STRING(32)
+ */
+ public static final String SECOND_OVERDUE_INTEREST = "SECOND_OVERDUE_INTEREST";
+ /**
+ * 逾期第二期罚息 STRING(32)
+ */
+ public static final String SECOND_OVERDUE_PENALTY = "SECOND_OVERDUE_PENALTY";
+ /**
+ * 实际回购总金额 STRING(32)
+ */
+ public static final String BUYBACK_MONEY = "BUYBACK_MONEY";
+ /**
+ * 回购金额(本金+利息),不包含罚息 STRING(32)
+ */
+ public static final String ALL_REMAIN_MONEY = "ALL_REMAIN_MONEY";
+ /**
+ * 凭证状态:0,未生成,1,已生成 STRING(32)
+ */
+ public static final String VOUCHER_STATUS = "VOUCHER_STATUS";
+ /**
+ * INPUTUSERID STRING(32)
+ */
+ public static final String INPUTUSERID = "INPUTUSERID";
+ /**
+ * INPUTTIME STRING(32)
+ */
+ public static final String INPUTTIME = "INPUTTIME";
+ /**
+ * UPDATEUSERID STRING(32)
+ */
+ public static final String UPDATEUSERID = "UPDATEUSERID";
+ /**
+ * UPDATETIME STRING(32)
+ */
+ public static final String UPDATETIME = "UPDATETIME";
+
+}
\ No newline at end of file
diff --git a/src_jbo/jbo/oti/FC_REQUEST_CHANNEL_LOG.java b/src_jbo/jbo/oti/FC_REQUEST_CHANNEL_LOG.java
new file mode 100644
index 000000000..f764c5104
--- /dev/null
+++ b/src_jbo/jbo/oti/FC_REQUEST_CHANNEL_LOG.java
@@ -0,0 +1,55 @@
+package jbo.oti;
+
+/**
+* 接口资料表 - JBO命名常量类
+* Note: This file is generated by ADE tools, dont modify it.
+
+*/
+public interface FC_REQUEST_CHANNEL_LOG {
+ /**
+ * 接口资料表
+ * 代表本类映射的BizObjectClass
+ */
+ public static final String CLASS_NAME = "jbo.oti.FC_REQUEST_CHANNEL_LOG";
+ /**
+ * 唯一标识 STRING(32)
+ */
+ public static final String ID = "ID";
+ /**
+ * 资方请求id STRING(32)
+ */
+ public static final String FC_REQUEST_ID = "FC_REQUEST_ID";
+ /**
+ * 修改前资方编号 STRING(32)
+ */
+ public static final String PRE_CHANNEL_NO = "PRE_CHANNEL_NO";
+ /**
+ * 修改前资方名称 STRING(32)
+ */
+ public static final String PRE_CHANNEL_NAME = "PRE_CHANNEL_NAME";
+ /**
+ * 修改后资方编号 STRING(32)
+ */
+ public static final String CHANNEL_NO = "CHANNEL_NO";
+ /**
+ * 修改后资方名称 STRING(32)
+ */
+ public static final String CHANNEL_NAME = "CHANNEL_NAME";
+ /**
+ * 描述 STRING(32)
+ */
+ public static final String REMARK = "REMARK";
+ /**
+ * 变更结果 STRING(32)
+ */
+ public static final String CHANGE_RESULT = "CHANGE_RESULT";
+ /**
+ * 变更类型 STRING(32)
+ */
+ public static final String CHANGE_TYPE = "CHANGE_TYPE";
+ /**
+ * 创建时间 STRING(32)
+ */
+ public static final String CREATETIME = "CREATETIME";
+
+}
\ No newline at end of file
diff --git a/src_jbo/jbo/oti/FC_YC_FILE_REPAY_RESULT.java b/src_jbo/jbo/oti/FC_YC_FILE_REPAY_RESULT.java
new file mode 100644
index 000000000..1790c42d6
--- /dev/null
+++ b/src_jbo/jbo/oti/FC_YC_FILE_REPAY_RESULT.java
@@ -0,0 +1,83 @@
+package jbo.oti;
+
+/**
+* 接口资料表 - JBO命名常量类
+* Note: This file is generated by ADE tools, dont modify it.
+
+*/
+public interface FC_YC_FILE_REPAY_RESULT {
+ /**
+ * 接口资料表
+ * 代表本类映射的BizObjectClass
+ */
+ public static final String CLASS_NAME = "jbo.oti.FC_YC_FILE_REPAY_RESULT";
+ /**
+ * 唯一标识 STRING(32)
+ */
+ public static final String ID = "ID";
+ /**
+ * 文件ID STRING(32)
+ */
+ public static final String FC_FILE_ID = "FC_FILE_ID";
+ /**
+ * 请求ID STRING(32)
+ */
+ public static final String FC_REQUEST_ID = "FC_REQUEST_ID";
+ /**
+ * 放款请求编号 STRING(32)
+ */
+ public static final String LOAN_NO = "LOAN_NO";
+ /**
+ * 期次 STRING(32)
+ */
+ public static final String LEND_TERM = "TERM_NO";
+ /**
+ * 还款日期 STRING(32)
+ */
+ public static final String ANS_REPAYMENT_DATE = "NEW_REPAY_DATE";
+ /**
+ * 本金 STRING(32)
+ */
+ public static final String ANS_PRINCIPAL = "ALR_PRINCIPAL";
+ /**
+ * 利息 STRING(32)
+ */
+ public static final String ANS_INTEREST = "ALR_INTEREST";
+ /**
+ * 罚息 STRING(32)
+ */
+ public static final String ALR_PENALTY = "ALR_PENALTY";
+ /**
+ * 归还合计 STRING(32)
+ */
+ public static final String ANS_REPAYMENT_MONEY = "ALR_REPAYMENT_MONEY";
+ /**
+ * 还款标识:0-当期正常结清 、当期逾期结清、1-提前部分还款、2-逾期、3-提前结清 STRING(32)
+ */
+ public static final String REPAYMENT_FLAG = "REPAYMENT_FLAG";
+ /**
+ * 还款来源标识:0:借款人本人账户;1:非借款人本人账户 STRING(32)
+ */
+ public static final String REPAYMENT_SOURCE = "REPAYMENT_SOURCE";
+ /**
+ * 提前还款费用 STRING(32)
+ */
+ public static final String TRADE_FEE = "TRADE_FEE";
+ /**
+ * 还款账号 STRING(32)
+ */
+ public static final String REPAYMENT_ACCOUNT_NO = "REPAYMENT_ACCOUNT_NO";
+ /**
+ * 流水号 STRING(32)
+ */
+ public static final String FLOWNO = "FLOWNO";
+ /**
+ * 创建时间 STRING(32)
+ */
+ public static final String CREATE_TIME = "CREATE_TIME";
+ /**
+ * 修改时间 STRING(32)
+ */
+ public static final String UPDATE_TIME = "UPDATE_TIME";
+
+}
\ No newline at end of file
diff --git a/src_jbo/jbo/oti/FC_YC_PREPAY_QUERY.java b/src_jbo/jbo/oti/FC_YC_PREPAY_QUERY.java
new file mode 100644
index 000000000..397b2b9ea
--- /dev/null
+++ b/src_jbo/jbo/oti/FC_YC_PREPAY_QUERY.java
@@ -0,0 +1,108 @@
+package jbo.oti;
+
+import java.lang.String;
+
+/**
+* 提前结清试算接口内容 - JBO命名常量类
+* Note: This file is generated by ADE tools, dont modify it.
+
+*/
+public interface FC_YC_PREPAY_QUERY{
+ /**
+ * 提前结清试算接口内容
+ * 代表本类映射的BizObjectClass
+ */
+ public static final String CLASS_NAME = "jbo.oti.FC_YC_PREPAY_QUERY";
+ /**
+ * 唯一标识 STRING(32)
+ */
+ public static final String ID = "ID";
+ /**
+ * 资金渠道文件ID STRING(32)
+ */
+ public static final String FC_FILE_ID = "FC_FILE_ID";
+ /**
+ * 资金渠道申请ID STRING(32)
+ */
+ public static final String FC_REQUEST_ID = "FC_REQUEST_ID";
+ /**
+ * 放款申请编号 STRING(32)
+ */
+ public static final String LOAN_NO = "LOAN_NO";
+ /**
+ * 贷款余额 STRING(32)
+ */
+ public static final String LOAN_CAPITAL_BALANCE = "LOAN_CAPITAL_BALANCE";
+ /**
+ * STRING(32)
+ */
+ public static final String FC_FILE_PUSH_NAME = "FC_FILE_PUSH_NAME";
+ /**
+ * 币种 STRING(32)
+ */
+ public static final String CURRENCY = "CURRENCY";
+ /**
+ * 贷款利率 STRING(32)
+ */
+ public static final String LOAN_RATE = "LOAN_RATE";
+ /**
+ * 还款方式 STRING(32)
+ */
+ public static final String REPAY_KIND = "REPAY_KIND";
+ /**
+ * 贷款起期 STRING(32)
+ */
+ public static final String LOAN_BEGIN_DATE = "LOAN_BEGIN_DATE";
+ /**
+ * 贷款止期 STRING(32)
+ */
+ public static final String LOAN_END_DATE = "LOAN_END_DATE";
+ /**
+ * 还款账号 STRING(32)
+ */
+ public static final String REPAY_ACC_NO = "REPAY_ACC_NO";
+ /**
+ * 还款账号余额 STRING(32)
+ */
+ public static final String REPAY_BALANCE = "REPAY_BALANCE";
+ /**
+ * 提前还款类型 STRING(32)
+ */
+ public static final String REPAY_TYPE = "REPAY_TYPE";
+ /**
+ * 当期应还本息金额 STRING(32)
+ */
+ public static final String CURRENT_CAPITAL_BALANCE = "CURRENT_CAPITAL_BALANCE";
+ /**
+ * 当前应还利息 STRING(32)
+ */
+ public static final String CURRENT_CAPITAL_INT = "CURRENT_CAPITAL_INT";
+ /**
+ * 拖欠本金 STRING(32)
+ */
+ public static final String OVERDUE_CAPITAL_BALANCE = "OVERDUE_CAPITAL_BALANCE";
+ /**
+ * 拖欠利息 STRING(32)
+ */
+ public static final String OVERDUE_CAPITAL_INT = "OVERDUE_CAPITAL_INT";
+ /**
+ * 申请日期 STRING(32)
+ */
+ public static final String RECORD_DATE = "RECORD_DATE";
+ /**
+ * 归还本息金额 STRING(32)
+ */
+ public static final String PREREPAY_AMOUNT = "PREREPAY_AMOUNT";
+ /**
+ * 提前归还本金金额 STRING(32)
+ */
+ public static final String PREREPAY_AMOUNT1 = "PREREPAY_AMOUNT1";
+ /**
+ * 创建时间 STRING(32)
+ */
+ public static final String CREATE_TIME = "CREATE_TIME";
+ /**
+ * 修改时间 STRING(32)
+ */
+ public static final String UPDATE_TIME = "UPDATE_TIME";
+}
\ No newline at end of file
diff --git a/src_sql/鎶曚骇SQL/dailyfix/zhanglei20210728.sql b/src_sql/鎶曚骇SQL/dailyfix/zhanglei20210728.sql
index 9535e2231..76faa3bed 100644
--- a/src_sql/鎶曚骇SQL/dailyfix/zhanglei20210728.sql
+++ b/src_sql/鎶曚骇SQL/dailyfix/zhanglei20210728.sql
@@ -447,6 +447,18 @@ INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename,
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1070', '1070', '1', 'O', 'CONTRACT_NO', 'CONTRACT_NO', 'String', '', '合同编号', '', '1', 'Text', '1', '1', '', '', '', '32', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', '', '');
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1080', '1080', '1', 'O', 'PRODUCT_ID', 'PRODUCT_ID', 'String', '', '产品ID', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', '', '');
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1090', '1090', '1', 'O', 'PRODUCT_NAME', 'PRODUCT_NAME', 'String', '', '产品名称', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1100', '1100', '1', 'O', 'DISTRIBUTOR_ID', 'DISTRIBUTOR_ID', 'String', '', '资经销商ID', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1110', '1110', '1', 'O', 'DISTRIBUTOR_NAME', 'DISTRIBUTOR_NAME', 'String', '', '经销商名称', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1120', '1120', '1', 'O', 'CUSTOMER_ID', 'CUSTOMER_ID', 'String', '', '客户ID', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1130', '1130', '1', 'O', 'CUSTOMER_NAME', 'CUSTOMER_NAME', 'String', '', '客户名称', '', '1', 'Text', '1', '2', '', '', '', '32', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1140', '1140', '1', 'O', 'FC_STATUS', 'FC_STATUS', 'String', '', '当前状态', '', '1', 'Select', '1', '1', 'Code', 'fc_request_sts', 'style={width:200px}', '32', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1150', '1150', '1', 'O', 'FC_REMARK', 'FC_REMARK', 'String', '', '当前状态', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1155', '1155', '1', 'O', 'SUPPLEMENT_STS', 'SUPPLEMENT_STS', 'String', '', '是否需要补充资料', '', '1', 'Text', '1', '2', 'CodeTable', '0,否,1,是,2,提交完成待发送', '', '32', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', '', null);
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1156', '1156', '1', 'O', 'SUPPLEMENT_DESC', 'SUPPLEMENT_DESC', 'String', '', '补充描述', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', null, null);
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1157', '1157', '1', 'O', 'SUPPLEMENT_TIME', 'SUPPLEMENT_TIME', 'String', '', '资料补充时间', '', '1', 'Date', null, '2', '', '', '', '', '1', '1', '0', '1', '1', 1, null, '', '', null, null, 'administrator', '2021/07/08 17:03:12', null, '', null, '', '', '', null);
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1160', '1160', '1', 'O', 'CREATE_TIME', 'CREATE_TIME', 'String', '', '创建时间', '', '1', 'Date', '3', '2', '', '', '', '32', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:03:12', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1170', '1170', '1', 'O', 'UPDATE_TIME', 'UPDATE_TIME', 'String', '', '修改时间', '', '1', 'Date', '3', '2', '', '', '', '32', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/07/08 17:02:37', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FC_REQUEST', '1180', '1180', '1', 'O', 'DEL_FLAG', 'DEL_FLAG', 'String', '', '有效标志', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_DESIGNER', '2021/05/31 14:18:55', 'administrator', '2021/06/29 13:26:32', '', '', '1', '', '', '', '');
-- 资料清单页面模板
delete from awe_do_catalog where dono='FcRequestFileList';
@@ -462,6 +474,13 @@ INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename,
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FcRequestFileList', '1070', '1070', '1', 'O', 'FILE_NAME', 'FILE_NAME', 'String', '', '文件名称', '', '1', 'Text', '1', '1', '', '', 'style={width:200px;word-break:break-all;}', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_Designer', '2021/06/29 11:47:56', 'administrator', '2021/07/19 10:56:56', '', '', '1', '', '', '', '');
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FcRequestFileList', '1080', '1080', '1', 'O', 'FILE_PATH', 'FILE_PATH', 'String', '', '文件路径', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_Designer', '2021/06/29 11:47:56', 'administrator', '2021/07/19 10:56:56', '', '', '1', '', '', '', '');
INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FcRequestFileList', '1090', '1090', '1', 'O', 'FC_FILE_STS', 'FC_FILE_STS', 'String', '', '文件状态', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '1', '0', '1', '1', 1, '0', '', '', 'SYS_Designer', '2021/06/29 11:47:56', 'administrator', '2021/07/19 10:56:56', '0', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FcRequestFileList', '1095', '1150', '1', 'O', 'FC_RES_VALUE', 'FC_RES_VALUE', 'String', '', '邮储返回状态', '', '1', 'Text', null, '2', '', '', '', '', '1', '0', '0', '1', '1', 1, null, '', '', null, null, 'administrator', '2021/07/19 10:56:57', null, '', null, '', '', '', null);
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FcRequestFileList', '1100', '1160', '1', 'O', 'FC_FILE_STS_DESC', 'FC_FILE_STS_DESC', 'String', '', '文件状态描述', '', '1', 'Text', '1', '2', '', '', '', '32', '1', '0', '0', '1', '1', 1, '0', '', '', 'SYS_Designer', '2021/06/29 11:47:56', 'administrator', '2021/07/19 10:56:57', '0', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FcRequestFileList', '1110', '1110', '1', 'O', 'CREATE_TIME', 'CREATE_TIME', 'String', '', '创建时间', '', '1', 'Date', '3', '2', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_Designer', '2021/06/29 11:47:56', 'administrator', '2021/07/19 10:56:56', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FcRequestFileList', '1120', '1120', '1', 'O', 'UPDATE_TIME', 'UPDATE_TIME', 'String', '', '修改时间', '', '1', 'Date', '3', '2', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_Designer', '2021/06/29 11:47:56', 'administrator', '2021/07/19 10:56:56', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FcRequestFileList', '1130', '1130', '1', 'O', 'DEL_FLAG', 'DEL_FLAG', 'String', '', '有效标志', '', '1', 'Text', '1', '1', '', '', '', '32', '0', '0', '0', '1', '1', 1, '0', '', '', 'SYS_Designer', '2021/06/29 11:47:56', 'administrator', '2021/07/19 10:56:57', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FcRequestFileList', '1140', '1140', '1', '', 'com.ample.fundchannel.doc.cache.DocListCache.getFileByRequestId(FC_REQUEST_ID,FC_FILE_CODE)', 'fileList', 'String', '', '附件清单', '', '1', 'Text', '1', '1', '', '', 'style={width:600px;word-break:break-all;}', null, '1', '0', '0', '1', '0', 0, '', '', '', 'SYS_Designer', '2021/06/29 11:47:56', 'administrator', '2021/07/19 10:56:57', '', '', '1', '', '', '', '');
+INSERT INTO apzl.awe_do_library (dono, colindex, sortno, isinuse, coltablename, colactualname, colname, coltype, coldefaultvalue, colheader, colunit, colcolumntype, coleditstyle, colcheckformat, colalign, coleditsourcetype, coleditsource, colhtmlstyle, collimit, colvisible, colreadonly, colrequired, colsortable, isfilter, colspan, isautocomplete, groupid, colfilterrefid, inputuser, inputtime, updateuser, updatetime, isaudit, colfilterattrs, isupdate, parentcolindex, tips, colinnerbtevent, colfilteroptions) VALUES ('FcRequestFileList', '1150', '1125', '1', '', '''''', 'operation', 'String', '', '操作', '', '1', 'Text', '1', '2', '', '', 'style={width:100px;word-break:break-all;}', null, '1', '0', '0', '1', '0', 0, '', '', '', 'SYS_Designer', '2021/06/29 11:47:56', 'administrator', '2021/07/19 10:56:57', '', '', '1', '', '', '', '');
-- 租金计划转换 定时任务配置(数据字典中配置,还需要在系统中去配置定时任务触发)
delete from code_library where codeno='MissionName' and itemname='租金计划转换';
@@ -488,6 +507,34 @@ INSERT INTO apzl.code_library (codeno, itemno, itemname, bankno, sortno, isinuse
CREATE ALGORITHM=UNDEFINED DEFINER=`apzl`@`%` SQL SECURITY DEFINER VIEW `vi_lb_identity_check_creditauth` AS (select `a`.`name` AS `fullName`,`a`.`certid` AS `certId`,`a`.`relation` AS `relation`,`a`.`creditauth` AS `creditauth`,`a`.`credittype` AS `credittype`,`a`.`flowunid` AS `flowunid`,`a`.`phone` AS `phone` from (select `ut`.`name` AS `name`,`ut`.`certid` AS `certid`,(case when (`ut`.`Partner_` = 'Y') then '共同申请人' when ((`ut`.`Partner_` = 'N') and (`ut`.`Spouse_` = 'Y')) then '配偶' when (`ut`.`Partner_` = 'gua') then '担保人' when (`ut`.`Partner_` = 'cust') then '申请人' else '' end) AS `relation`,(case when (`ut`.`creditauth` = 'ap') then '征信授权书_安鹏' when (`ut`.`creditauth` = 'yc') then '征信授权书_邮储' when (`ut`.`creditauth` = 'yc_audit') then '借款服务确认书_邮储' else '' end) AS `creditauth`,(case when (`ut`.`creditauth` = 'ap') then '99001' when (`ut`.`creditauth` = 'yc') then '99002' when (`ut`.`creditauth` = 'yc_audit') then '99003' else '' end) AS `credittype`,`ut`.`flowunid` AS `flowunid`,`ut`.`phone` AS `phone` from (select `cf1`.`name` AS `name`,`cf1`.`certid` AS `certid`,`cf1`.`Partner_` AS `Partner_`,`cf1`.`Spouse_` AS `Spouse_`,'ap' AS `creditauth`,`cf1`.`flowunid` AS `flowunid`,`cf1`.`tel` AS `phone` from `apzl`.`customer_family_temp` `cf1` where (`cf1`.`Partner_` = 'Y') union all (select `lgut`.`FULLNAME` AS `FULLNAME`,`lgut`.`CERTID` AS `CERTID`,'gua' AS `Partner_`,'gua' AS `Spouse_`,'ap' AS `creditauth`,`lgut`.`FLOWUNID` AS `flowunid`,`lgut`.`MOBILE` AS `phone` from `apzl`.`lb_guarantee_unit_temp` `lgut`) union all (select `ccpt`.`FULLNAME` AS `FULLNAME`,`ccpt`.`CERTID` AS `CERTID`,'cust' AS `Partner_`,'cust' AS `Spouse_`,'ap' AS `creditauth`,`ccpt`.`FLOWUNID` AS `flowunid`,`ccpt`.`mobile` AS `phone` from `apzl`.`customer_person_temp` `ccpt` where (`ccpt`.`BALANCESHEET` = '申请人'))) `ut`) `a`);
CREATE ALGORITHM=UNDEFINED DEFINER=`apzl`@`%` SQL SECURITY DEFINER VIEW `vi_lb_identity_check_creditauth_loan` AS (select `a`.`name` AS `fullName`,`a`.`certid` AS `certId`,`a`.`relation` AS `relation`,`a`.`creditauth` AS `creditauth`,`a`.`credittype` AS `credittype`,`a`.`flowunid` AS `flowunid`,`a`.`phone` AS `phone` from (select `ut`.`name` AS `name`,`ut`.`certid` AS `certid`,(case when (`ut`.`Partner_` = 'Y') then '共同申请人' when ((`ut`.`Partner_` = 'N') and (`ut`.`Spouse_` = 'Y')) then '配偶' when (`ut`.`Partner_` = 'gua') then '担保人' when (`ut`.`Partner_` = 'cust') then '申请人' else '' end) AS `relation`,(case when (`ut`.`creditauth` = 'ap') then '征信授权书_安鹏' when (`ut`.`creditauth` = 'yc') then '征信授权书_邮储' when (`ut`.`creditauth` = 'yc_audit') then '借款服务确认书_邮储' else '' end) AS `creditauth`,(case when (`ut`.`creditauth` = 'ap') then '99001' when (`ut`.`creditauth` = 'yc') then '99002' when (`ut`.`creditauth` = 'yc_audit') then '99003' else '' end) AS `credittype`,`ut`.`flowunid` AS `flowunid`,`ut`.`phone` AS `phone` from (select `cf1`.`name` AS `name`,`cf1`.`certid` AS `certid`,`cf1`.`Partner_` AS `Partner_`,`cf1`.`Spouse_` AS `Spouse_`,'ap' AS `creditauth`,`cf1`.`PROJECT_ID` AS `flowunid`,`cf1`.`tel` AS `phone` from `apzl`.`customer_family` `cf1` where (`cf1`.`Partner_` = 'Y') union all (select `lgut`.`FULLNAME` AS `FULLNAME`,`lgut`.`CERTID` AS `CERTID`,'gua' AS `Partner_`,'gua' AS `Spouse_`,'ap' AS `creditauth`,`lgut`.`PROJECT_ID` AS `flowunid`,`lgut`.`MOBILE` AS `phone` from `apzl`.`lb_guarantee_unit` `lgut`) union all (select `ccpt`.`FULLNAME` AS `FULLNAME`,`ccpt`.`CERTID` AS `CERTID`,'cust' AS `Partner_`,'cust' AS `Spouse_`,'ap' AS `creditauth`,`lul`.`PROJECT_ID` AS `flowunid`,`ccpt`.`mobile` AS `phone` from (`apzl`.`customer_person` `ccpt` left join `apzl`.`lb_union_lessee` `lul` on((`ccpt`.`CUSTOMERID` = `lul`.`CUSTOMER_ID`))) where (`ccpt`.`BALANCESHEET` = '申请人'))) `ut`) `a`);
+-- 获取参数视图
+create or replace view vi_corpus_source_param as
+select `lci`.`ID` AS `contractId`,
+ lci.PROJECT_ID as projectId,
+ lcc.CONTRACT_PLAN_NUMBER as contractPlanNumber,
+ lcc.PROJECT_PLAN_NUMBER as projectPlanNumber,
+ `lci`.`PRODUCT_ID` AS `productId`,
+ `lci`.`distributor_id` AS `distributorId`,
+ `lci`.`corpus_source` AS `corpusSource`,
+ `lcc`.`PAYMENT_NUMBER` AS `paymentNumber`,
+ `bt`.`attribute5` AS `splitType`,
+ `lsr`.`splitting_ratio` AS `splittingRatio`,
+ `frl`.`BUSINESS_RATE` AS `corpusSourceRate`,
+ ca.bank_name as bankName,
+ ca.account as account,
+ ca.acc_number as accNumber
+from
+ fc_request_loan frl
+ join `apzl`.`fc_request` `fr` on frl.LOAN_NO = fr.FC_LOAN_ID
+ left join `apzl`.`lb_contract_info` `lci` on `fr`.`CONTRACT_ID` = `lci`.`id`
+ left join `apzl`.`lc_calc_condition` `lcc` on `lci`.`ID` = `lcc`.`CONTRACT_ID`
+ left join `apzl`.`business_type` `bt` on `bt`.`typeno` = `lci`.`PRODUCT_ID`
+ left join `apzl`.`lb_splitting_ratio` `lsr` on `lsr`.`distributor_id` = `lci`.`distributor_id` and `lsr`.`product_id` = `lci`.`PRODUCT_ID`
+ left join `apzl`.`lb_product_corpus_source` `lpcs` on `lpcs`.`product_id` = `lci`.`PRODUCT_ID` and `lpcs`.`corpus_source` = `lci`.`corpus_source`
+ left join lb_union_lessee lul on lul.CONTRACT_ID=lci.ID and lul.IS_MAIN='Y'
+ left join customer_account ca on ca.customerid=lul.CUSTOMER_ID and ca.CONTRACT_ID=lci.id
+where frl.DEL_FLAG='0' and fr.DEL_FLAG='0';
+
diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceFileCopy.java b/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceFileCopy.java
new file mode 100644
index 000000000..462c89472
--- /dev/null
+++ b/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceFileCopy.java
@@ -0,0 +1,689 @@
+package com.tenwa.lease.app.quartzmession;
+
+import com.amarsoft.app.util.ProductParamUtil;
+import com.amarsoft.app.util.XMLDataUtil;
+import com.amarsoft.are.ARE;
+import com.amarsoft.are.jbo.*;
+import com.amarsoft.are.util.StringFunction;
+import com.amarsoft.awe.util.SqlObject;
+import com.amarsoft.awe.util.Transaction;
+import com.tenwa.comm.util.jboutil.DataOperatorUtil;
+import com.tenwa.reckon.executor.CreateTransactionExecutor;
+import com.tenwa.reckon.util.DateUtils;
+import com.tenwa.reckon.util.IRRCalculateUtil;
+import com.tenwa.reckon.util.IrrTools;
+import jbo.app.tenwa.calc.*;
+import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
+import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP;
+import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
+import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP;
+import jbo.oti.FC_FILE_PUSH;
+import jbo.oti.FC_REQUEST_CHANNEL_LOG;
+import jbo.oti.FC_YC_FILE_REPAY_PLAN;
+import jbo.oti.LC_PROFIT_PLAN;
+
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+import static java.math.BigDecimal.ROUND_HALF_UP;
+
+/**
+ * 资方租金计划拷贝
+ */
+public class CorpusSourceFileCopy {
+
+ private String contractId;
+ private String fileType;
+
+ public void doCopy(JBOTransaction tx) throws Exception {
+ BizObjectManager ffpBom = null;
+ ffpBom = JBOFactory.getBizObjectManager(FC_FILE_PUSH.CLASS_NAME,tx);
+ //todo 添加渠道商的选择,哪些需要拷表哪些不需要
+ String fileSql = "select ID,FILE_STS from O where FILE_TYPE='"+fileType+"' and FILE_STS='2'";
+ List ffpBoList = ffpBom.createQuery(fileSql).getResultList(true);
+ if(ffpBoList.size()==0){
+ ARE.getLog().info("暂时没有需要拷表的资方文件");
+ return;
+ }
+ //遍历解析每个文件
+ for(BizObject ffpBo : ffpBoList){
+ if(analyticalFile(ffpBo,tx)){
+ ffpBo.setAttributeValue("FILE_STS","3");
+ ffpBo.setAttributeValue("FILE_STS_DESC","拷贝成功");
+ ffpBom.saveObject(ffpBo);
+ }
+ }
+ }
+
+ /**
+ * 解析文件
+ * @param ffpBo
+ * @param tx
+ * @throws Exception
+ */
+ public boolean analyticalFile(BizObject ffpBo,JBOTransaction tx) throws Exception {
+ String fcFileId = ffpBo.getAttribute("ID").toString();
+ List fyfrpBoList = getFileInfoByFileId(fcFileId);
+ if(fyfrpBoList!=null&&fyfrpBoList.size()>0){
+ respectiveDo(fyfrpBoList,tx);
+ return true;
+ }else{
+ return false;
+ }
+ }
+
+ /**
+ * 执行自己类所需的操作
+ * @param fyfrpBoList
+ * @param tx
+ * @throws Exception
+ */
+ public void respectiveDo(List fyfrpBoList , JBOTransaction tx) throws Exception {
+ //获取对应的合同
+ Map contractMap = this.getContractIdMap(fyfrpBoList);
+ if(contractMap.size()==0){
+ String fcFileId = fyfrpBoList.get(0).getAttribute("FC_REQUEST_ID").toString();
+ ARE.getLog().error("未找到FC_REQUEST_ID: "+fcFileId+" 对应的合同ID");
+ }
+ Transaction Sqlca = Transaction.createTransaction(tx);
+ //===顺序不能错===
+ //0.将租金计划拷贝到历史表
+ copyRentPlanFormatToHis(contractMap,"安鹏原正式租金计划",tx);
+ //1.更新租金计划表(直接文件每条信息更新,不需要遍历)
+ updateRentPlan(fyfrpBoList,tx);
+ for(Map.Entry entry : contractMap.entrySet()){
+ String contractId = entry.getKey();
+ Map param = getParamByContractId(contractId,tx);
+ //2.更新剩余本金
+ updateAllRemainCorpus(contractId,Sqlca);
+ //3.更新SP分润计划
+ updateSplitSP(param,Sqlca);
+ //4.插入分润计划
+ insertProfitPlan(param,tx);
+ }
+
+ }
+
+ /**
+ * 获取每个文件的文件信息
+ * @param fcFileId
+ * @return
+ * @throws Exception
+ */
+ public List getFileInfoByFileId(String fcFileId) throws Exception {
+ String sql = "select fr.CONTRACT_ID,O.FC_REQUEST_ID,O.LEND_TERM,O.ANS_REPAYMENT_DATE,O.ANS_PRINCIPAL,O.ANS_INTEREST,ANS_REPAYMENT_MONEY from O left join jbo.oti.FC_REQUEST fr on O.FC_REQUEST_ID=fr.ID where fr.DEL_FLAG='0' and O.FC_FILE_ID=:fcFileId";
+ BizObjectManager fyfrpBom = JBOFactory.getBizObjectManager(FC_YC_FILE_REPAY_PLAN.CLASS_NAME);
+ List fyfrpBoList = fyfrpBom.createQuery(sql).setParameter("fcFileId",fcFileId).getResultList(false);
+ if(fyfrpBoList.size()==0){
+ ARE.getLog().error("未找到FC_REQUEST_ID: "+fcFileId+" 对应的资方还款计划");
+ }
+ return fyfrpBoList;
+ }
+
+ /**
+ * copy租金计划到历史表
+ * @param contractMap
+ * @param tx
+ * @throws Exception
+ */
+ public void copyRentPlanFormatToHis(Map contractMap ,String memo,JBOTransaction tx) throws Exception {
+ for(Map.Entry entry: contractMap.entrySet()){
+ this.copyRentPlanFormatToHis(entry.getKey(),entry.getValue(),memo,tx);
+ }
+ }
+
+ /**
+ * copy租金计划到历史表
+ * @param contractId
+ * @param fcRequestId
+ * @param tx
+ * @throws Exception
+ */
+ public void copyRentPlanFormatToHis(String contractId,String fcRequestId,String memo,JBOTransaction tx) throws Exception {
+
+ Map fromCondtion=new HashMap();
+ fromCondtion.put("CONTRACT_ID",contractId);
+
+ Map otherProperty=new HashMap();
+ otherProperty.put("MEMO", memo);
+ otherProperty.put("FLOWUNID", fcRequestId);
+
+ copyRentPlanFormatToHis(fromCondtion,null,otherProperty,tx);
+
+ }
+
+ /**
+ * copy租金计划到历史表
+ * @param fromCondtion
+ * @param toCondtion
+ * @param otherProperty
+ * @param tx
+ * @throws Exception
+ */
+ public void copyRentPlanFormatToHis(Map fromCondtion,Map toCondtion,Map otherProperty,JBOTransaction tx) throws Exception {
+
+ DataOperatorUtil.copyJBOSet(LC_RENT_PLAN.CLASS_NAME, fromCondtion, LC_RENT_PLAN_HIS.CLASS_NAME,toCondtion, otherProperty, null, tx);
+
+ }
+
+ /**
+ * copy租金计划到历史表
+ * @param contractId
+ * @param fcRequestId
+ * @param tx
+ * @throws Exception
+ */
+ public void copyCashFlowFormatToHis(String contractId,String fcRequestId,JBOTransaction tx) throws Exception {
+
+ Map fromCondtion=new HashMap();
+ fromCondtion.put("CONTRACT_ID",contractId);
+
+ Map otherProperty=new HashMap();
+ otherProperty.put("FLOWUNID", fcRequestId);
+
+ copyCashFlowFormatToHis(fromCondtion,null,otherProperty,tx);
+
+ }
+
+ /**
+ * copy租金计划到历史表
+ * @param fromCondtion
+ * @param toCondtion
+ * @param otherProperty
+ * @param tx
+ * @throws Exception
+ */
+ public void copyCashFlowFormatToHis(Map fromCondtion,Map toCondtion,Map otherProperty,JBOTransaction tx) throws Exception {
+
+ DataOperatorUtil.copyJBOSet(LC_CASH_FLOW.CLASS_NAME, fromCondtion, LC_CASH_FLOW_HIS.CLASS_NAME,toCondtion, otherProperty, null, tx);
+
+ }
+
+ /**
+ * 获取对应的合同ID
+ * @param fyfrpBoList
+ * @return
+ * @throws JBOException
+ */
+ public Map getContractIdMap(List fyfrpBoList) throws JBOException {
+ Map contractMap = new HashMap<>();
+ for(BizObject bo : fyfrpBoList){
+ String contractId = bo.getAttribute("CONTRACT_ID").toString();
+ String fcRequestId = bo.getAttribute("FC_REQUEST_ID").toString();
+ contractMap.put(contractId,fcRequestId);
+ }
+ return contractMap;
+ }
+ /**
+ * 租金计划拷贝
+ * @param fyfrpBoList 每个回执文件包含的租金计划信息
+ * @return 每个回执文件包含的contract_id
+ * @throws JBOException
+ * @throws ParseException
+ */
+ public void updateRentPlan(List fyfrpBoList,JBOTransaction tx) throws JBOException, ParseException {
+ BizObjectManager lrpBom = null;
+ lrpBom = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME,tx);
+ //更新租金计划表
+ for(BizObject bo : fyfrpBoList){
+ //获取参数
+ String contractId = bo.getAttribute("CONTRACT_ID").toString();
+ String lendTerm = bo.getAttribute("LEND_TERM").toString();
+ String principal = bo.getAttribute("ANS_PRINCIPAL").toString();
+ String interest = bo.getAttribute("ANS_INTEREST").toString();
+ String rent = new BigDecimal(principal).add(new BigDecimal(interest)).toString();
+ String repaymentMoney = bo.getAttribute("ANS_REPAYMENT_MONEY").toString();
+ String repaymentDate = bo.getAttribute("ANS_REPAYMENT_DATE").toString();
+ //转换日期格式
+ Date date = new SimpleDateFormat("yyyyMMdd").parse(repaymentDate);
+ repaymentDate = new SimpleDateFormat("yyyy/MM/dd").format(date);
+ //更新租金计划表
+ BizObject lrpBo = lrpBom.createQuery("CONTRACT_ID=:contractId and PLAN_LIST=:lendTerm").setParameter("contractId",contractId).setParameter("lendTerm",lendTerm).getSingleResult(true);
+ lrpBo.setAttributeValue("RENT",rent);
+ lrpBo.setAttributeValue("CORPUS",principal);
+ lrpBo.setAttributeValue("INTEREST",interest);
+ lrpBo.setAttributeValue("CORPUS_BUSINESS",principal);
+ lrpBo.setAttributeValue("INTEREST_BUSINESS",interest);
+ lrpBo.setAttributeValue("PLAN_DATE",repaymentDate);
+ lrpBom.saveObject(lrpBo);
+ }
+ }
+
+ /**
+ * 更新剩余本金信息
+ * @throws JBOException
+ */
+ public void updateAllRemainCorpus(String contractId,JBOTransaction tx) throws JBOException {
+ BizObjectManager lrpBom = null;
+ lrpBom = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME,tx);
+ BizObjectManager lccBom = null;
+ lccBom = JBOFactory.getBizObjectManager(LC_CALC_CONDITION.CLASS_NAME,tx);
+
+ BizObject lccBo = lccBom.createQuery("select CLEAN_LEASE_MONEY from O where contract_id=:contractId").setParameter("contractId",contractId).getSingleResult(false);
+ String clean_lease_money = lccBo.getAttribute("CLEAN_LEASE_MONEY").toString();
+ BigDecimal cleanLeaseMoneyBd = new BigDecimal(clean_lease_money);
+ List lrpBos= lrpBom.createQuery("contract_id=:contractId order by plan_list").setParameter("contractId",contractId).getResultList(true);
+ for(BizObject bo :lrpBos){
+ String corpus = bo.getAttribute("corpus").toString();
+ BigDecimal corpusBd = new BigDecimal(corpus);
+ cleanLeaseMoneyBd = cleanLeaseMoneyBd.subtract(corpusBd).setScale(2,ROUND_HALF_UP);
+ bo.setAttributeValue("ALL_REMAIN_CORPUS",cleanLeaseMoneyBd.toString());
+ lrpBom.saveObject(bo);
+ }
+ }
+
+ /**
+ * 更新剩余本金信息
+ * @throws JBOException
+ */
+ public void updateAllRemainCorpus(JBOTransaction tx) throws JBOException {
+ updateAllRemainCorpus(contractId,tx);
+ }
+
+ /**
+ * 更新分润信息
+ * @throws Exception
+ */
+ public void updateSplitSP(Map param,Transaction Sqlca) throws Exception {
+
+ String splittingRatio = param.get("splittingRatio");
+ //必须的判断条件(配置了灵活分润的产品可能没有配置分润)
+ // 判断顺序,是否分润--》是否灵活分润
+ //是否灵活分润在insertRentPlan_SP()方法中判断
+ if (!"".equals(splittingRatio) && splittingRatio != null) {
+ String paymentNumber = param.get("paymentNumber");
+ String splitType = param.get("splitType");
+ CreateTransactionExecutor cre = new CreateTransactionExecutor();
+ cre.setPlannumber(paymentNumber);
+ cre.insertRentPlan_SP(splittingRatio, Sqlca, splitType);
+ }
+
+ }
+
+ /**
+ * 更新分润信息
+ * @throws Exception
+ */
+ public void updateSplitSP(JBOTransaction tx) {
+ Transaction Sqlca = null;
+ try {
+ Sqlca = Transaction.createTransaction(tx);
+ Map param = getParamByContractId(contractId,tx);
+ updateSplitSP(param,Sqlca);
+ } catch (JBOException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }finally {
+ try {
+ if (Sqlca != null) {
+ Sqlca.rollback();
+ }
+ } catch (JBOException e1) {
+ e1.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * 获取每个合同的参数
+ * @return
+ * @throws Exception
+ */
+ public Map getParamByContractId(String contractId,JBOTransaction tx) throws Exception {
+ String sql = "select * from vi_corpus_source_param where contractId='" + contractId + "'";
+ List