From e26448a4188dc0f02e549a6950623a5c4c3ab46e Mon Sep 17 00:00:00 2001 From: ap007 Date: Fri, 20 Aug 2021 10:12:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=B7=E5=90=8E=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LBContractPersonBaseInfo.jsp | 4 +- WebContent/WEB-INF/etc/jbo/jbo_oti.xml | 5 +- .../WEB-INF/etc/sql/insertIntoCashFlow.xml | 22 +-- src_jbo/jbo/oti/FC_REQUEST_CHANNEL_LOG.java | 8 + src_jbo/jbo/oti/FC_YC_FILE_REPAY_RESULT.java | 4 + src_sql/鎶曚骇SQL/dailyfix/zhanglei20210728.sql | 47 +++++ .../quartzmession/CorpusSourceFileCopy.java | 171 +++++++++++++++--- .../CorpusSourceRentPlanCopy.java | 23 +-- .../CorpusSourceRentResultCopy.java | 107 +---------- 9 files changed, 236 insertions(+), 155 deletions(-) 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 6f26d0323..483a6c531 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_oti.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_oti.xml @@ -446,7 +446,8 @@ - + + @@ -494,6 +495,8 @@ + + diff --git a/WebContent/WEB-INF/etc/sql/insertIntoCashFlow.xml b/WebContent/WEB-INF/etc/sql/insertIntoCashFlow.xml index 251916275..cfaf58eba 100644 --- a/WebContent/WEB-INF/etc/sql/insertIntoCashFlow.xml +++ b/WebContent/WEB-INF/etc/sql/insertIntoCashFlow.xml @@ -34,7 +34,7 @@ concat('绗', cfrp.plan_list, '鏈熷垎娑﹂噾棰:', format(lpp.profit, 2)) flowindetail, 0 flowout, '' flowoutdetail, - lpp.profit - 0 cleanfow + ifnull(lpp.profit, 0) - 0 cleanfow from lc_rent_plan cfrp left join lc_profit_plan lpp on lpp.rent_plan_id = cfrp.ID where cfrp.CONTRACT_ID = :contractId @@ -48,8 +48,7 @@ if(fundplan.pay_type = 'pay_type_in', fundplan.plan_money, 0) flowin, if(fundplan.pay_type = 'pay_type_in', concat(tdd.itemname, ':', fundplan.plan_money), '') flowindetail, if(fundplan.pay_type = 'pay_type_out', fundplan.plan_money, 0) flowout, - if(fundplan.pay_type = 'pay_type_out', concat(tdd.itemname, ':', fundplan.plan_money), - '') flowoutdetail, + if(fundplan.pay_type = 'pay_type_out', concat(tdd.itemname, ':', fundplan.plan_money),'') flowoutdetail, if(fundplan.pay_type = 'pay_type_in', fundplan.plan_money, -fundplan.plan_money) cleanfow from lc_fund_plan fundplan left join code_library tdd on fundplan.fee_type = tdd.itemno and tdd.codeno = 'FeeType' @@ -57,21 +56,22 @@ and fundplan.fee_type in ('feetype2', 'feetype1', 'feetype10', 'feetype16', 'feetype17', 'feetype33', 'feetype24') union all - select '', - '', - '', - '', - '', + select lcc.PROJECT_ID, + lcc.PROJECT_PLAN_NUMBER, + lcc.CONTRACT_ID, + lcc.CONTRACT_PLAN_NUMBER, + lcc.PAYMENT_NUMBER, DATE_FORMAT(substr(LOAN_DATE, 1, 8), '%Y/%m/%d') as plan_date, - frl.TRANS_AMT as flowin, + ifnull(frl.TRANS_AMT,0) as flowin, concat('閭偍鍥炴閲戦:', frl.TRANS_AMT) as flowindetail, 0 as flowout, '' as flowoutdetail, - frl.TRANS_AMT as cleanfow + ifnull(frl.TRANS_AMT,0) as cleanfow from fc_request_loan frl left join fc_request fr on frl.FC_REQUEST_ID = fr.ID and frl.LOAN_NO = fr.FC_LOAN_ID + left join lc_calc_condition lcc on fr.CONTRACT_ID = lcc.CONTRACT_ID where fr.CONTRACT_ID = :contractId - :appendInfo + appendInfo ) t group by t.plan_date; ]]> diff --git a/src_jbo/jbo/oti/FC_REQUEST_CHANNEL_LOG.java b/src_jbo/jbo/oti/FC_REQUEST_CHANNEL_LOG.java index 7921750f1..3ecc5c5a2 100644 --- a/src_jbo/jbo/oti/FC_REQUEST_CHANNEL_LOG.java +++ b/src_jbo/jbo/oti/FC_REQUEST_CHANNEL_LOG.java @@ -43,6 +43,14 @@ public interface FC_REQUEST_CHANNEL_LOG { * 变更结果 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 ACTUAL_PAYMENT_BACK_AMOUNT = "ACTUAL_PAYMENT_BACK_AMOUNT"; /** * 创建时间 STRING(32)
*/ diff --git a/src_jbo/jbo/oti/FC_YC_FILE_REPAY_RESULT.java b/src_jbo/jbo/oti/FC_YC_FILE_REPAY_RESULT.java index 814f1ed02..1790c42d6 100644 --- a/src_jbo/jbo/oti/FC_YC_FILE_REPAY_RESULT.java +++ b/src_jbo/jbo/oti/FC_YC_FILE_REPAY_RESULT.java @@ -19,6 +19,10 @@ public interface FC_YC_FILE_REPAY_RESULT { * 文件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)
*/ 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 index 71d50f68d..81daf61bb 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceFileCopy.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/CorpusSourceFileCopy.java @@ -1,12 +1,17 @@ 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.base.util.QuartzUtil; 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; @@ -16,9 +21,6 @@ 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 org.quartz.Job; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; import java.math.BigDecimal; import java.text.ParseException; @@ -47,10 +49,11 @@ public class CorpusSourceFileCopy { } //遍历解析每个文件 for(BizObject ffpBo : ffpBoList){ - analyticalFile(ffpBo,tx); - ffpBo.setAttributeValue("FILE_STS","3"); - ffpBo.setAttributeValue("FILE_STS_DESC","拷贝成功"); - ffpBom.saveObject(ffpBo); + if(analyticalFile(ffpBo,tx)){ + ffpBo.setAttributeValue("FILE_STS","3"); + ffpBo.setAttributeValue("FILE_STS_DESC","拷贝成功"); + ffpBom.saveObject(ffpBo); + } } } @@ -60,12 +63,15 @@ public class CorpusSourceFileCopy { * @param tx * @throws Exception */ - public void analyticalFile(BizObject ffpBo,JBOTransaction tx) throws Exception { + public boolean analyticalFile(BizObject ffpBo,JBOTransaction tx) throws Exception { String fcFileId = ffpBo.getAttribute("ID").toString(); List fyfrpBoList = getFileInfoByFileId(fcFileId); - - respectiveDo(fyfrpBoList,tx); - + if(fyfrpBoList!=null&&fyfrpBoList.size()>0){ + respectiveDo(fyfrpBoList,tx); + return true; + }else{ + return false; + } } /** @@ -80,7 +86,6 @@ public class CorpusSourceFileCopy { if(contractMap.size()==0){ String fcFileId = fyfrpBoList.get(0).getAttribute("FC_REQUEST_ID").toString(); ARE.getLog().error("未找到FC_REQUEST_ID: "+fcFileId+" 对应的合同ID"); - throw new Exception("未找到FC_REQUEST_ID: "+fcFileId+" 对应的合同ID"); } Transaction Sqlca = Transaction.createTransaction(tx); //===顺序不能错=== @@ -113,7 +118,6 @@ public class CorpusSourceFileCopy { List fyfrpBoList = fyfrpBom.createQuery(sql).setParameter("fcFileId",fcFileId).getResultList(false); if(fyfrpBoList.size()==0){ ARE.getLog().error("未找到FC_REQUEST_ID: "+fcFileId+" 对应的资方还款计划"); - throw new Exception("未找到FC_REQUEST_ID: "+fcFileId+" 对应的资方还款计划"); } return fyfrpBoList; } @@ -413,6 +417,7 @@ public class CorpusSourceFileCopy { frclBo.setAttributeValue("CHANNEL_NAME","安鹏自有资金"); frclBo.setAttributeValue("REMARK","回购为安鹏自有资金"); frclBo.setAttributeValue("CHANGE_RESULT",result); + frclBo.setAttributeValue("CHANGE_TYPE","2"); frclBo.setAttributeValue("CREATETIME",StringFunction.getTodayNow()); frclBom.saveObject(frclBo); } @@ -433,10 +438,12 @@ public class CorpusSourceFileCopy { lrpBo.setAttributeValue("INTEREST",param.get("interest")); lrpBo.setAttributeValue("CORPUS_BUSINESS",param.get("principal")); lrpBo.setAttributeValue("INTEREST_BUSINESS",param.get("interest")); - lrpBo.setAttributeValue("ALL_REMAIN_CORPUS",param.get("0.00")); + lrpBo.setAttributeValue("ALL_REMAIN_CORPUS","0.00"); + lrpBo.setAttributeValue("COLLECT_STATUS","批量收款"); + lrpBo.setAttributeValue("COLLECT_MSG","邮储提前结清"); lrpBom.saveObject(lrpBo); //删除租金计划信息(大于提前结清当期期次的) - lrpBom.createQuery("delete from O where contract_id=:contractId and plan_list>:plan_list").setParameter("contractId",param.get("contractId")).setParameter("planList",param.get("termNo")).executeUpdate(); + lrpBom.createQuery("delete from O where contract_id=:contractId and plan_list>:planList").setParameter("contractId",param.get("contractId")).setParameter("planList",param.get("termNo")).executeUpdate(); } /** @@ -462,21 +469,22 @@ public class CorpusSourceFileCopy { String penalty = bo.getAttribute("ALR_PENALTY").toString(); String rent = new BigDecimal(principal).add(new BigDecimal(interest)).toString(); String repaymentMoney = bo.getAttribute("ALR_REPAYMENT_MONEY").toString(); + String repaymentFlag = bo.getAttribute("REPAYMENT_FLAG").toString(); + String repaymentSource = bo.getAttribute("REPAYMENT_SOURCE").toString(); String repaymentDate = bo.getAttribute("NEW_REPAY_DATE").toString(); //转换日期格式 Date date = new SimpleDateFormat("yyyyMMdd").parse(repaymentDate); repaymentDate = new SimpleDateFormat("yyyy/MM/dd").format(date); - String rentPlanId = null; - if(!contractIdSet.contains(contractId)){ - //获取对应租金计划Id - BizObject lrpBo = lrpBomQuery.setParameter("contractId",contractId).setParameter("planList",termNo).getSingleResult(false); - rentPlanId = lrpBo.getAttribute("ID").toString(); - //将由合同id获取的参数放进来 - Map param = getParamByContractId(contractId,tx); - rentIncomeParam.putAll(param); - contractIdSet.add(contractId); - } + //获取对应租金计划Id + BizObject lrpBo = lrpBomQuery.setParameter("contractId",contractId).setParameter("planList",termNo).getSingleResult(false); + String rentPlanId = lrpBo.getAttribute("ID").toString(); + //将由合同id获取的参数放进来 + Map param = getParamByContractId(contractId,tx); + rentIncomeParam.putAll(param); + + contractIdSet.add(contractId); + //存入参数 rentIncomeParam.put("fcRequestId",fcRequestId); rentIncomeParam.put("contractId",contractId); @@ -487,6 +495,8 @@ public class CorpusSourceFileCopy { rentIncomeParam.put("interest",interest); rentIncomeParam.put("penalty",penalty); rentIncomeParam.put("repaymentMoney",repaymentMoney); + rentIncomeParam.put("repaymentFlag",repaymentFlag); + rentIncomeParam.put("repaymentSource",repaymentSource); rentIncomeParam.put("repaymentDate",repaymentDate); rentIncomeParams.add(rentIncomeParam); @@ -525,7 +535,7 @@ public class CorpusSourceFileCopy { lriBo.setAttributeValue("PENALTY",param.get("penalty")); lriBo.setAttributeValue("PLAN_LIST",param.get("termNo")); lriBo.setAttributeValue("HIRE_LIST","1"); - lriBo.setAttributeValue("PLAN_DATE",param.get("repaymentDate")); + lriBo.setAttributeValue("HIRE_DATE",param.get("repaymentDate")); lriBo.setAttributeValue("INPUTUSERID","8009U00000002");//定时任务管理员 lriBo.setAttributeValue("INPUTTIME",StringFunction.getTodayNow()); lriBom.saveObject(lriBo); @@ -542,6 +552,7 @@ public class CorpusSourceFileCopy { BizObject lrpBo = lrpBom.createQuery("contract_id=:contractId and plan_list=:planList").setParameter("contractId",param.get("contractId")).setParameter("planList",param.get("termNo")).getSingleResult(true); lrpBo.setAttributeValue("COLLECT_STATUS","批量收款"); lrpBo.setAttributeValue("COLLECT_MSG","邮储代收"); + lrpBo.setAttributeValue("CHARGE_WAY","PSBC"); lrpBom.saveObject(lrpBo); } /** @@ -557,6 +568,112 @@ public class CorpusSourceFileCopy { lciBom.saveObject(lciBo); } + /** + * + * @throws JBOException + */ + public void createCashFlowByContractId(String contractId ,Transaction Sqlca) throws Exception { + //0.删除原有现金流 + String deleteSql = "delete from lc_cash_flow where contract_id=:contractId"; + SqlObject sql = new SqlObject(deleteSql); + sql.setParameter("contractId",contractId); + Sqlca.executeSQL(sql); + //1.插入新的现金流 + String appendInfo = " "; + String sqlPath = "/etc/sql/insertIntoCashFlow.xml"; + String xmlPath=ARE.getProperty("PRD_HOME")+sqlPath; + Map xmlFile= XMLDataUtil.readTableInfoFromXmlFile(xmlPath); + String sqlCode=xmlFile.get("table_sql").replaceAll("\r|\n|\t", " "); + String GPSsql = "select gps_difference from lc_calc_condition where contract_id='"+contractId+"'"; + String GPSDifference= Sqlca.getString(GPSsql); + if(GPSDifference!=null&&!"".equals(GPSDifference)&&!"0.00".equals(GPSDifference)){ + appendInfo = " union all select project_id,project_plan_number,contract_id,contract_plan_number,payment_number,plan_date,'"+GPSDifference+"' flowin,'GPS差额: "+GPSDifference+"' flowindetail,'' flowout,'' flowoutdetil,'"+GPSDifference+"' cleanfow from lc_fund_plan where contract_id =:contractId and fee_type='feetype10' "; + } + sqlCode = sqlCode.replace("appendInfo",appendInfo); + sql = new SqlObject(sqlCode); + sql.setParameter("contractId",contractId); + Sqlca.executeSQL(sql); + } + public void calcIRR(Map param,JBOTransaction tx) throws Exception { + String irr = getIRR(param,tx); + updateIRR(param.get("contractId"),irr,tx); + } + /** + * IRR计算,套用安硕计算方式 + * @param param + * @param tx + * @return + * @throws Exception + */ + public String getIRR(Map param,JBOTransaction tx) throws Exception { + BizObjectManager lccBom = JBOFactory.getBizObjectManager(LC_CALC_CONDITION.CLASS_NAME,tx); + BizObject lccBo = lccBom.createQuery("contract_id=:contractId").setParameter("contractId",contractId).getSingleResult(false); + String cashSql = "select NET_FLOW,PLAN_DATE from lc_cash_flow where contract_id='"+param.get("contractId")+"' order by plan_date"; + List> cashes = DataOperatorUtil.getDataBySql(tx, cashSql, null); + List netList = new ArrayList(); + List dateList = new ArrayList(); + for(Map cash :cashes){ + netList.add(cash.get("NET_FLOW")); + dateList.add(cash.get("PLAN_DATE")); + } + + String irr = ""; + String IrrType= ProductParamUtil.getProductParameterValue(param.get("productId"),"PRD0350","SYHS","SYHS"); + if("STAGE_IRR".equals(IrrType)){//按期IRR + BigDecimal issueRate= IRRCalculateUtil.getIRR2(netList); + irr=issueRate.multiply( new BigDecimal(1200/lccBo.getAttribute("INCOME_INTERVAL_MONTH").getInt())).setScale(6,BigDecimal.ROUND_HALF_UP).toString(); + }else if("MONTH_IRR".equals(IrrType)){//按月IRR + String upperListDate=""; + List newNetList=new ArrayList(); + List newDateList=new ArrayList(); + for(int i=0;i inflowPour=new ArrayList(); + String plandate=""; + for(int i=0;i1){ + for(int y=1;y fyfrrBoList = fyfrrBom.createQuery(sql).setParameter("fcFileId",fcFileId).getResultList(false); if(fyfrrBoList.size()==0){ ARE.getLog().error("未找到FC_REQUEST_ID: "+fcFileId+" 对应的资方还款计划"); - throw new Exception("未找到FC_REQUEST_ID: "+fcFileId+" 对应的资方还款计划"); } return fyfrrBoList; } - /** - * - * @throws JBOException - */ - public void createCashFlow(Mapparam ,Transaction Sqlca) throws Exception { - //0.删除原有现金流 - String deleteSql = "delete from lc_cash_flow where contract_id=:contractId"; - SqlObject sql = new SqlObject(deleteSql); - sql.setParameter("contractId",param.get("contractId")); - Sqlca.executeSQL(sql); - //1.插入新的现金流 - String appendInfo = " "; - String sqlPath = "/etc/sql/insertIntoCashFlow.xml"; - String xmlPath=ARE.getProperty("PRD_HOME").replace("/WEB-INF", "")+sqlPath; - Map xmlFile= XMLDataUtil.readTableInfoFromXmlFile(xmlPath); - String sqlCode=xmlFile.get("table_sql").replaceAll("\r|\n|\t", " "); - String GPSDifference= ProductParamUtil.getProductParameterValue(param.get("product_id"),"PRD0390","GPSDifference","GPSDifference"); - if(GPSDifference!=null&&!"".equals(GPSDifference)){ - appendInfo = "union all select '','','','','',plan_date,'"+GPSDifference+"' flowin,'GPS差额:"+GPSDifference+"' flowindetail,'' flowout,'' flowoutdetil,'"+GPSDifference+"' cleanfow from lc_fund_plan where contract_id =:contractId and fee_type='feetype10' "; - } - sql = new SqlObject(sqlCode); - sql.setParameter("appendInfo",appendInfo); - sql.setParameter("contractId",param.get("contractId")); - Sqlca.executeSQL(sql); - } - - public String calcIRR(Map param,JBOTransaction tx) throws Exception { - String cashSql = "select NET_FLOW,PLAN_DATE from lc_cash_flow where contract_id='"+param.get("contractId")+"' order by plan_date"; - List> cashes = DataOperatorUtil.getDataBySql(tx, cashSql, null); - List netList = new ArrayList(); - List dateList = new ArrayList(); - for(Map cash :cashes){ - netList.add(cash.get("NET_FLOW")); - dateList.add(cash.get("PLAN_DATE")); - } - String irr=""; - if("STAGE_IRR".equals(IrrType)){//按期IRR - BigDecimal issueRate= IRRCalculateUtil.getIRR2(netList); - irr=issueRate.multiply( new BigDecimal(1200/cb.getIncomeIntervalMonth())).setScale(6,BigDecimal.ROUND_HALF_UP).toString(); - }else if("MONTH_IRR".equals(IrrType)){//按月IRR - String upperListDate=""; - List newNetList=new ArrayList(); - List newDateList=new ArrayList(); - for(int i=0;i inflowPour=new ArrayList(); - String plandate=""; - for(int i=0;i1){ - for(int y=1;y