diff --git a/WebContent/Accounting/LoanSimulation_onhire/LoanBasicInfoBusiness.jsp b/WebContent/Accounting/LoanSimulation_onhire/LoanBasicInfoBusiness.jsp new file mode 100644 index 000000000..5db307d87 --- /dev/null +++ b/WebContent/Accounting/LoanSimulation_onhire/LoanBasicInfoBusiness.jsp @@ -0,0 +1,1274 @@ +<%@page import="jbo.prd.BUSINESS_TYPE"%> +<%@page import="com.tenwa.reckon.util.TbBeanTools"%> +<%@page import="com.tenwa.reckon.bean.TabCalBean"%> +<%@page import="com.amarsoft.awe.control.model.Parameter"%> +<%@page import="com.amarsoft.app.base.util.DateHelper"%> +<%@page import="com.tenwa.util.SerialNumberUtil"%> +<%@page import="com.tenwa.reckon.product.ProductCondition"%> +<%@page import="com.amarsoft.app.util.ProductParamUtil"%> +<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %> +<%@ page import="java.util.Vector" %> +<%@ page import="com.amarsoft.awe.dw.ui.validator.ValidateRule" %> +<%@ page import="com.tenwa.reckon.product.ASObjectWindowCalc" %> +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%> +<% + /*获取参数*/ + String flowunid = CurPage.getParameter("FlowUnid"); + String plannumber=CurPage.getParameter("plannumber"); + String productId=CurPage.getParameter("ProductId"); + String ishistory=CurPage.getParameter("IsHistory"); + String nodeNo=CurPage.getParameter("NodeNo"); + String RightType= CurPage.getParameter("RightType"); + String calType = CurPage.getParameter("calType"); + //判断是否为汽车业务 + boolean isCarProduct = "004".equals(productId) ? false : true; + /*获取参数*/ + /*根据参数判断 是否去数据库查询*/ + BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid); + if(productId==null){ + productId=flow.getAttribute("productId").getString(); + } + if(calType == null){ + calType = "proj_process"; + } + TabCalBean tcb=TbBeanTools.getTabInfo(calType); + String planCName=tcb.getPlanCName(); + //方案编号 + if(plannumber==null){ + if("pay_process".equals(calType)||"onHire_process".equals(calType)){ + BizObject condtion=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid and PAYMENT_NUMBER is not null and length(PAYMENT_NUMBER)>0 ").setParameter("flowunid", flowunid).getSingleResult(false); + if(condtion!=null){ + plannumber=condtion.getAttribute(planCName).getString(); + } + }else{ + String planType=ProductParamUtil.getProductParameterValue(productId, "PRD0314", "planinformation"); + if("SinglePlan".equals(planType)){ + BizObject condtion=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + if(condtion!=null){ + plannumber=condtion.getAttribute(planCName).getString(); + } + } + } + } + //新增数据 自动生成方案编号 + if(plannumber==null){ + String sSerialType=""; + JBOTransaction tx=JBOFactory.createJBOTransaction(); + if("proj_process".equals(calType)){ + BizObject proj=JBOFactory.createBizObjectQuery("jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + sSerialType=proj.getAttribute("PROJECT_NO").getString(); + }else{ + BizObject contract=JBOFactory.createBizObjectQuery("jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + sSerialType=contract.getAttribute("CONTRACT_NO").getString(); + } + plannumber=SerialNumberUtil.getPlannumber(sSerialType,calType,tx); + tx.commit(); + } + /*根据参数判断 是否去数据库查询*/ + + String sTempletNo = "TLoanSimulationBasicInfo_onhire";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + + + + /*设置字段事件*/ + doTemp.setHtmlEvent("SETTLE_METHOD", "onchange", "changeSettleMethod");//租金计算方式 + doTemp.setHtmlEvent("RENT_OR_RATE", "onchange", "rentOrRateChange");//租金推算方法 + doTemp.setHtmlEvent("INCOME_NUMBER_YEAR", "onchange", "changeIncomeNumber");//还款间隔 + doTemp.setHtmlEvent("INCOME_INTERVAL_MONTH", "onchange", "changeIntervalMonth");//还款间隔(月) + doTemp.setHtmlEvent("INCOME_NUMBER", "onchange", "changeNumber");//还款次数 + doTemp.setHtmlEvent("PERIOD_TYPE", "onchange", "changePeriod");//期初/期末 + doTemp.setHtmlEvent("GRACE", "onchange", "changeGrace");//宽限期RATTermID + doTemp.setHtmlEvent("RATE_FLOAT_TYPE", "onchange", "changeRateFloat");//利率计算方式 + doTemp.setHtmlEvent("BASE_RATE", "onchange", "changeBaseRate");//基准利率 + doTemp.setHtmlEvent("RATE_FLOAT_AMT", "onchange", "changeRateFloatAmt");//利率调整值 + doTemp.setHtmlEvent("CAUTION_MONEY", "onchange", "cautionMoney");//保证金 + doTemp.setHtmlEvent("CAUTION_DEDUCTION_MONEY", "onchange", "cautionDeductionMoney");//保证金抵扣金额 + doTemp.setHtmlEvent("LEASE_AMT_DATE", "onchange", "changeLeaseAmtDate");//投放日 + doTemp.setHtmlEvent("START_DATE", "onchange", "changeStartDate");//起租日 + doTemp.setHtmlEvent("FIRST_PLAN_DATE", "onchange", "changeFistPlanDate");//第一期计划日期 + doTemp.setHtmlEvent("CORPUS_RATIO", "onchange", "changeCorpusRatio");//期限内本金比例 + doTemp.setHtmlEvent("RATE_TYPE", "onchange", "changeRateTypeNew");//利率类型 + /*设置字段事件*/ + + /*设置模板属性*/ + Vector vali=new Vector(); + //费用规则 + ProductCondition pc=new ProductCondition(); + pc.getProductFundRules(doTemp, productId); + String calcRules=pc.getProductRulesBusiness(doTemp, productId,vali); + + if("quoted_price".equals(calType)){//客户报价 流程号存的是客户主键 + doTemp.setDefaultValue("cust_id", flowunid); + } + doTemp.setColumnAttribute(planCName,"isipdate","1"); + doTemp.setJboClass(tcb.getCondition_tb()); + doTemp.setDefaultValue(planCName, plannumber); + doTemp.setDefaultValue("flowunid", flowunid); + doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'"); + if(null!=ishistory&&ishistory.equals("true")){ + doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcCondtionInfoArachiveShow");//如果是历史则新显示历史数据 + } + /*设置模板属性*/ + + /*设置页面属性*/ + CurPage.getCurComp().setAttribute("RightType", null); + Parameter p=new Parameter("plannumber",plannumber); + Vector v=CurPage.parameterList; + v.add(p); + /*设置页面属性*/ + + + ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request); + + + dwTemp.Style = "2";//freeform + if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ + dwTemp.ReadOnly = "-2";//只读模式 + isShowButton=false; + }else{ + isShowButton=true; + } + dwTemp.setVali(vali); + dwTemp.setAttr("inputWidth","120"); + dwTemp.setAttr("spanWidth","107"); + dwTemp.setAttr("showRatio", true); + dwTemp.genHTMLObjectWindow(flowunid); + RightType="ReadOnly"; + CurPage.getCurComp().setAttribute("RightType", RightType); + + String compClientID = request.getParameter("CompClientID"); + dwTemp.replaceColumn("condition_plan", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("even_subsection", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("knowing_config", "", CurPage.getObjectWindowOutput()); + String businessDate = DateHelper.getBusinessDate(); + String sButtons[][] = { + //{"true","All","Button","重置","重置","reloadSelf()","","","",""}, + {"true","","Button","租金测算","租金测算","saveRecord()","","","","btn_icon_save"}, + // {((isCarProduct) && ("proj_process".equals(calType)||"cont_process".equals(calType)))?"true":"false","","Button","引入客户报价","引入客户报价","importCustomerQuot()","","","","btn_icon_edit"} + }; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java b/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java index ad4370d92..393bd7865 100644 --- a/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java +++ b/calc/com/tenwa/reckon/executor/FundFundPlanExecutor.java @@ -212,8 +212,11 @@ public class FundFundPlanExecutor { BizObjectManager bomLFP = JBOFactory.getBizObjectManager(LC_FUND_PLAN.CLASS_NAME,tx); BizObject boLFP = bomLFP.createQuery("select id from O where contract_id='"+tcb.getCb().getContractId()+"' and fee_type='"+item.getItemNo()+"'") .getSingleResult(true); - ffcp.setId(boLFP.getAttribute("id").getString()); - bomLFP.deleteObject(boLFP); + if(boLFP!=null){ + ffcp.setId(boLFP.getAttribute("id").getString()); + bomLFP.deleteObject(boLFP); + } + } ffcp.setFeeType(item.getItemNo());//费用类型 ffcp.setPlanList("1");