From e979996c8b591722e96d9f9237c8928cce2ffbf2 Mon Sep 17 00:00:00 2001 From: tangft <32189@windows10.microdone.cn> Date: Tue, 20 Jul 2021 16:18:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E6=AE=B5=E8=9E=8D?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanSimulation/LoanBasicInfo.jsp | 43 ++++++++- .../LoanSimulation/lbSubsectionTempList.jsp | 44 +++++++++ WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 29 ++++++ .../reckon/executor/ManageSubsectionData.java | 66 +++++++++++++ .../tenwa/calc/LB_SUBSECTION_INFO_TEMP.java | 92 +++++++++++++++++++ 5 files changed, 273 insertions(+), 1 deletion(-) create mode 100644 WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp create mode 100644 calc/com/tenwa/reckon/executor/ManageSubsectionData.java create mode 100644 src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 9c23a310f..78b172d26 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -18,6 +18,7 @@ <%@ include file="/Frame/resources/include/include_begin_info.jspf"%> <% /*获取参数*/ + String flowNo = CurPage.getParameter("FlowNo"); String flowunid = CurPage.getParameter("FlowUnid"); String plannumber=CurPage.getParameter("plannumber"); String productId=CurPage.getParameter("ProductId"); @@ -149,6 +150,8 @@ doTemp.setHtmlEvent("FIRST_PLAN_DATE", "onchange", "changeFistPlanDate");//第一期计划日期 doTemp.setHtmlEvent("CORPUS_RATIO", "onchange", "changeCorpusRatio");//期限内本金比例 doTemp.setHtmlEvent("EQUIP_AMT", "onchange", "changgeCompare");//车价 + doTemp.setHtmlEvent("is_subsection", "onchange", "isSubsection");//是否分段 + doTemp.setHtmlEvent("subsection_num", "onchange", "subsectionNum");//是否分段 /*设置字段事件*/ /*设置模板属性*/ @@ -180,6 +183,7 @@ doTemp.setDefaultValue(planCName, plannumber); doTemp.setDefaultValue("flowunid", flowunid); doTemp.setDefaultValue("PRODUCT_NAME", productName); + doTemp.setDefaultValue("is_subsection", "no"); doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'"); /* if(null!=ishistory&&ishistory.equals("true")){ --这个是插入到历史表中的每一步数据。 doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcCondtionInfoArachiveShow");//如果是历史则新显示历史数据 @@ -224,6 +228,8 @@ dwTemp.replaceColumn("condition_plan", "", CurPage.getObjectWindowOutput()); //dwTemp.replaceColumn("even_subsection", "", CurPage.getObjectWindowOutput()); //dwTemp.replaceColumn("knowing_config", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("subsection_info", "", CurPage.getObjectWindowOutput()); + String businessDate = DateHelper.getBusinessDate(); //获取对应车辆指导价 @@ -303,7 +309,11 @@ $(function(){ } var nominalPrice = "<%=nominalPrice%>" ; var carNum = parseInt("<%=carNum%>"); - setItemValue( 0, 0, 'NOMINAL_PRICE', Number(nominalPrice)*carNum ); + var flowNo = "<%=flowNo%>"; + if( "BusinessApplyFlow"==flowNo || "BusinessChangeFlow" == flowNo ){ + setItemValue( 0, 0, 'NOMINAL_PRICE', Number(nominalPrice)*carNum ); + } + isSubsection(); }); @@ -1557,5 +1567,36 @@ jQuery.validator.prototype.showLabel = function(element,message){ } fundError[id]=message; }; + + function isSubsection(){ + var isSubsection = getItemValue(0,getRow(),"is_subsection"); + if("yes" == isSubsection){ + showItem(0,"subsection_num",''); + showItem(0,"subsection_config",''); + setItemRequired(0,"subsection_num",true); + setItemRequired(0,"subsection_config",true); + var subsectionNum = getItemValue(0,getRow(),"subsection_num"); + if(typeof(subsectionNum) == "undefined" || subsectionNum.length == 0 ){ + subsectionNum = "0"; + } + $("#A_Group_0020").attr("style","display:block;");//显示 + subsection_list.window.saveData(subsectionNum); + }else{ + showItem(0,"subsection_num",'none'); + showItem(0,"subsection_config",'none'); + setItemRequired(0,"subsection_num",false); + setItemRequired(0,"subsection_config",false); + $("#A_Group_0020").attr("style","display:none;");//隐藏 + } + } + function subsectionNum(){ + var subsectionNum = getItemValue(0,getRow(),"subsection_num"); + if(typeof(subsectionNum) == "undefined" || subsectionNum.length == 0 ){ + subsectionNum = "0"; + } + subsection_list.window.saveData(subsectionNum); + } + + <%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp b/WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp new file mode 100644 index 000000000..bd40cb7b3 --- /dev/null +++ b/WebContent/Accounting/LoanSimulation/lbSubsectionTempList.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2021-07-20 + Content: + History Log: + */ + String flowunid = CurPage.getParameter("flowunid"); + String projectId = CurPage.getParameter("projectId"); + ASObjectModel doTemp = new ASObjectModel("lbSubsectionTempList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "0"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(flowunid); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"false","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""}, + {"false","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, + {"false","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","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/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 9d22dcaed..a9780c454 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -4628,5 +4628,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/calc/com/tenwa/reckon/executor/ManageSubsectionData.java b/calc/com/tenwa/reckon/executor/ManageSubsectionData.java new file mode 100644 index 000000000..a48fd77bf --- /dev/null +++ b/calc/com/tenwa/reckon/executor/ManageSubsectionData.java @@ -0,0 +1,66 @@ +package com.tenwa.reckon.executor; + +import java.util.List; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; + +import jbo.app.tenwa.calc.LB_SUBSECTION_INFO_TEMP; + +public class ManageSubsectionData { + + private String subsectionNumber; + private String projectId; + private String flowunid; + + public String getSubsectionNumber() { + return subsectionNumber; + } + public void setSubsectionNumber(String subsectionNumber) { + this.subsectionNumber = subsectionNumber; + } + public String getProjectId() { + return projectId; + } + public void setProjectId(String projectId) { + this.projectId = projectId; + } + public String getFlowunid() { + return flowunid; + } + public void setFlowunid(String flowunid) { + this.flowunid = flowunid; + } + + public String saveSubsection(JBOTransaction tx) throws Exception { + Integer sn = new Integer(subsectionNumber); + BizObjectManager lsitManger = JBOFactory.getBizObjectManager(LB_SUBSECTION_INFO_TEMP.CLASS_NAME, tx); + List lsitList = lsitManger.createQuery(" flowunid=:flowunid ").setParameter("flowunid", flowunid).getResultList(false); + if( sn >= 0 ) { + if(lsitList.size()==0 || sn > lsitList.size()) { + int i = ( lsitList.size()+1 ) ; + for( ; i<=sn ; i++ ) { + BizObject lsit = lsitManger.newObject(); + lsit.setAttributeValue("subsection_number", i); + lsit.setAttributeValue("projectid", projectId); + lsit.setAttributeValue("flowunid", flowunid); + lsitManger.saveObject(lsit); + } + }else if( sn < lsitList.size()){ + int i = (sn +1); + for( ; i<= lsitList.size() ; i++ ) { + BizObject lsit = lsitManger.createQuery("flowunid =:flowunid and subsection_number =:subsectionNumber").setParameter("flowunid", flowunid).setParameter("subsectionNumber", i).getSingleResult(true); + if(lsit!=null ) { + lsitManger.deleteObject(lsit); + } + } + } + } + return "success"; + } + + + +} diff --git a/src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java b/src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java new file mode 100644 index 000000000..dd6aa7433 --- /dev/null +++ b/src_jbo/jbo/app/tenwa/calc/LB_SUBSECTION_INFO_TEMP.java @@ -0,0 +1,92 @@ +package jbo.app.tenwa.calc; + +import java.lang.String; + +/** +* - JBO命名常量类

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

+ * 代表本类映射的BizObjectClass + */ + public static final String CLASS_NAME = "jbo.app.tenwa.calc.LB_SUBSECTION_INFO_TEMP"; + /** + * 主键 STRING(32)
+ */ + public static final String id = "id"; + /** + * 分段数 STRING(32)
+ */ + public static final String subsection_number = "subsection_number"; + /** + * 融资额比例 STRING(32)
+ */ + public static final String clean_lease_ratio = "clean_lease_ratio"; + /** + * 融资额 STRING(10)
+ */ + public static final String clean_lease_money = "clean_lease_money"; + /** + * 标准利率(贴息前利率) STRING(18)
+ */ + public static final String standard_ratio = "standard_ratio"; + /** + * 产品利率(贴息后利率) STRING(10)
+ */ + public static final String product_ratio = "product_ratio"; + /** + * 融资利率(客户利率) STRING(10)
+ */ + public static final String clean_lease_rate = "clean_lease_rate"; + /** + * 期次 STRING(10)
+ */ + public static final String income_number = "income_number"; + /** + * 贴息金额 STRING(20)
+ */ + public static final String discount_interest = "discount_interest"; + /** + * 贴息回款期次 STRING(32)
+ */ + public static final String discount_interest_number = "discount_interest_number"; + /** + * 项目id STRING(32)
+ */ + public static final String projectid = "projectid"; + /** + * 合同id STRING(32)
+ */ + public static final String contract_id = "contract_id"; + /** + * 流程编号 STRING(32)
+ */ + public static final String flowunid = "flowunid"; + /** + * 登记人 STRING(32)
+ */ + public static final String inputuserid = "inputuserid"; + /** + * 登记机构 STRING(32)
+ */ + public static final String inputorgid = "inputorgid"; + /** + * 登记时间 STRING(32)
+ */ + public static final String inputtime = "inputtime"; + /** + * 更新人 STRING(32)
+ */ + public static final String updateuserid = "updateuserid"; + /** + * 更新机构 STRING(32)
+ */ + public static final String updateorgid = "updateorgid"; + /** + * 更新时间 STRING(32)
+ */ + public static final String updatetime = "updatetime"; +} \ No newline at end of file