From 978b71e611d121fa2c6c559dc75f33248c0614cf Mon Sep 17 00:00:00 2001 From: zhangbb Date: Wed, 26 Sep 2018 19:53:40 +0800 Subject: [PATCH 1/4] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=90=88=E5=90=8C?= =?UTF-8?q?=E8=B5=B7=E7=A7=9F=E7=94=B3=E8=AF=B7=E7=9A=84=E5=95=86=E5=8A=A1?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanBasicInfoBusiness.jsp | 1274 +++++++++++++++++ .../reckon/executor/FundFundPlanExecutor.java | 7 +- 2 files changed, 1279 insertions(+), 2 deletions(-) create mode 100644 WebContent/Accounting/LoanSimulation_onhire/LoanBasicInfoBusiness.jsp 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"); From 7f291340e99b8d09f7382e03f2d2960cb79f58c4 Mon Sep 17 00:00:00 2001 From: xiezhiwen Date: Wed, 26 Sep 2018 21:15:15 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=87=AD=E8=AF=81=E7=9B=B8=E5=85=B3--?= =?UTF-8?q?=E8=B5=B7=E7=A7=9F=E5=89=8D=E7=94=9F=E6=88=90=E5=87=AD=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...reateVoucherActualPaymentCarTradition.java | 168 ++++++++++++++++++ .../CreateVoucherActualPaymentTradition.java | 168 ++++++++++++++++++ ...tractActualPaymentCarTraditionVoucher.java | 39 ++++ ...ContractActualPaymentTraditionVoucher.java | 51 ++++++ .../ContractBeforeOnhireToVoucher.java | 15 +- .../ContractOnhireVoucher.java | 2 +- .../CreateVoucherToBeforeOnhire.java | 36 ++-- .../ContractGetMoneyToCautionMoney.java | 22 +++ .../ContractGetMoneyToEquip.java | 22 +++ ...ctGetMoneyToEquipAddInsuranceAddOther.java | 22 +++ ...eyToEquipAddInsuranceAddOtherSubFirst.java | 22 +++ .../ContractGetMoneyToEquipAddOthers.java | 28 +++ .../ContractGetMoneyToEquipNoTax.java | 22 +++ .../ContractGetMoneyToEquipTax.java | 22 +++ .../ContractGetMoneyToFirstPayment.java | 22 +++ .../ContractGetMoneyToFirstPaymentNoTax.java | 22 +++ .../ContractGetMoneyToFirstPaymentTax.java | 22 +++ .../ContractGetMoneyToHandlingCharge.java | 22 +++ ...ContractGetMoneyToHandlingChargeNoTax.java | 22 +++ .../ContractGetMoneyToHandlingChargeTax.java | 22 +++ .../ContractGetMoneyToInsuranceAddOther.java | 22 +++ ...tractGetMoneyToInsuranceAddOtherNoTax.java | 22 +++ ...ontractGetMoneyToInsuranceAddOtherTax.java | 22 +++ .../ContractGetMoneyToMoney.java | 20 +++ .../ContractGetMoneyToMoneyNoTax.java | 20 +++ .../ContractGetMoneyToMoneyTax.java | 20 +++ .../ContractGetMoneyToOther.java | 23 +++ .../ContractGetMoneyToOtherNoTax.java | 22 +++ .../ContractGetMoneyToOtherTax.java | 22 +++ .../ContractGetMoneyToOthersMath.java | 34 ++++ .../serviceImp/CreateVoucherServiceImpl.java | 9 +- 31 files changed, 981 insertions(+), 26 deletions(-) create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherActualPaymentCarTradition.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherActualPaymentTradition.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/ContractActualPaymentCarTraditionVoucher.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/ContractActualPaymentTraditionVoucher.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToCautionMoney.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquip.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddInsuranceAddOther.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddInsuranceAddOtherSubFirst.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddOthers.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipNoTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPayment.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPaymentNoTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPaymentTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingCharge.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingChargeNoTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingChargeTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOther.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOtherNoTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOtherTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoney.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoneyNoTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoneyTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOther.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOtherNoTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOtherTax.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOthersMath.java diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherActualPaymentCarTradition.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherActualPaymentCarTradition.java new file mode 100644 index 000000000..ebf50b945 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherActualPaymentCarTradition.java @@ -0,0 +1,168 @@ +package com.tenwa.voucher.CreateVoucherProcess; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import jbo.voucher.LV_VOUCHER_CONFIG; + +import com.amarsoft.app.util.ProductParamUtil; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.awe.util.Transaction; +import com.amarsoft.dict.als.cache.CacheLoaderFactory; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.flow.baseBussion.BaseBussiness; +import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl; +/** + * 汽车传统实际付款后生成凭证 + * @author xiezhiwen + */ +public class CreateVoucherActualPaymentCarTradition extends BaseBussiness{ + + public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { + // 创建事物 + Transaction Sqlca =null; + Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource()); + Map map=new HashMap(); + Map param=new HashMap(); + // 定义全局对象 + String EQUIP_AMT=null; // 设备款 + String EQUIP_AMT_NOTAX=null; // 设备款(不含税) + String EQUIP_AMT_TAX=null; // 设备款(税金) + String FIRST_PAYMENT=null; // 首付款 + String FIRST_PAYMENT_NOTAX=null; // 首付款(不含税) + String FIRST_PAYMENT_TAX=null; // 首付款(税金) + String INSURANCE_PREMIUM_ADD_OTHER=null;// 保险费+其他金额 + String INSURANCE_PREMIUM_ADD_OTHER_NOTAX=null;// 保险费+其他金额(不含税) + String INSURANCE_PREMIUM_ADD_OTHER_TAX=null; // 保险费+其他金额(税金) + String EQUIP_INSURACE_PREMIUM_OTHER=null;// 设备款+保险费+其他 + String OTHERSMONEY=null; // 车款+保险+其他-首付款 + String ACCOUNT_DATE=null; // 会计日期 + String FACT_DATE=null; // 实际付款日期 + String CONTRACT_ID=null; // 合同id + String CONTRACT_NUMBER=null; // 合同编号 + String PROJECT_NAME=null; // 项目名称 + String LEAS_FORM=null; // 项目类别 + String DISTRIBUTOR_ID=null; // 经销商编号 + String DISTRIBUTOR_NAME=null; // 经销商名称 + String CUSTOMERID=null; // 客户编号 + String CUSTOMERNAME=null; // 客户名称 + String CUSTOMERTYPE=null; // 客户类别 + String BUSINESSTYPE=null; // 业务类型 + String ACC_NUMBER=null; // 银行账号 + String PRODUCT_ID=null; // 产品编号 + String sql=""; + + sql="SELECT LCCT.EQUIP_AMT,ROUND(LCCT.EQUIP_AMT / getTax (LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2) AS EQUIP_AMT_NOTAX,(LCCT.EQUIP_AMT - ROUND(LCCT.EQUIP_AMT / getTax (LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2)) AS EQUIP_AMT_TAX,LCCT.FIRST_PAYMENT,ROUND(LCCT.FIRST_PAYMENT/getTax(LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2) AS FIRST_PAYMENT_NOTAX,(LCCT.FIRST_PAYMENT - ROUND(LCCT.FIRST_PAYMENT/getTax(LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2)) AS FIRST_PAYMENT_TAX,(LCCT.INSURANCE_PREMIUM+LCCT.OTHER_MONEY) AS INSURANCE_PREMIUM_ADD_OTHER,ROUND((LCCT.INSURANCE_PREMIUM+LCCT.OTHER_MONEY) / getTax (LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2) AS INSURANCE_PREMIUM_ADD_OTHER_NOTAX,((LCCT.INSURANCE_PREMIUM+LCCT.OTHER_MONEY) - ROUND((LCCT.INSURANCE_PREMIUM+LCCT.OTHER_MONEY) / getTax (LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2)) AS INSURANCE_PREMIUM_ADD_OTHER_TAX,(LCCT.EQUIP_AMT+LCCT.INSURANCE_PREMIUM+LCCT.OTHER_MONEY) AS EQUIP_INSURACE_PREMIUM_OTHER,(LCCT.EQUIP_AMT+LCCT.INSURANCE_PREMIUM+LCCT.OTHER_MONEY-LCCT.FIRST_PAYMENT) AS OTHERSMONEY,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING AS DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CUSTOMER_NUM AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,lfit.ACC_NUMBER,LPDI.PRODUCT_ID FROM LC_CALC_CONDITION LCCT INNER JOIN (SELECT contract_id,FLOWUNID,MIN(ACC_NUMBER) ACC_NUMBER FROM lc_fund_income_temp WHERE fee_type = 'feetype10' GROUP BY contract_id,FLOWUNID) lfit ON lfit.contract_id = lcct.contract_id LEFT JOIN LB_CONTRACT_INFO LCI ON LCI.ID = lfit.CONTRACT_ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO = LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID LEFT JOIN LB_PRODUCT_INFO LPDI ON LPDI.PRODUCT_ID = LPI.PRODUCT_ID WHERE LCI.BUSINESSTYPE = '3' AND lfit.FLOWUNID = :FLOWUNID "; + + param.clear(); + map.put("FLOWUNID", FlowUnid); + + // 查询sql, 将结果集封装到map中 + List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); + + // 创建生成凭证的类对象 + CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); + + // 设置常用参数 + String VOUCHER_TYPE="1"; // 凭证分类 金蝶 + String userid ="admin"; + + for (int i=0;i map=new HashMap(); + Map param=new HashMap(); + // 定义全局对象 + String EQUIP_AMT=null; // 设备款 + String EQUIP_AMT_NOTAX=null; // 设备款(不含税) + String EQUIP_AMT_TAX=null; // 设备款(税金) + String FIRST_PAYMENT=null; // 首付款 + String HANDLING_CHARGE_MONEY=null; // 手续费 + String HANDLING_CHARGE_MONEY_NOTAX=null;// 不含税手续费 + String HANDLING_CHARGE_MONEY_TAX=null; // 手续费税金 + String CAUTION_MONEY=null; // 保证金 + String OTHER_MONEY=null; // 其它金额 + String OTHER_MONEY_NOTAX=null; // 其它金额(不含税) + String OTHER_MONEY_TAX=null; // 其它金额(税金) + String ACCOUNT_DATE=null; // 会计日期 + String FACT_DATE=null; // 实际付款日期 + String CONTRACT_ID=null; // 合同id + String CONTRACT_NUMBER=null; // 合同编号 + String PROJECT_NAME=null; // 项目名称 + String LEAS_FORM=null; // 项目类别 + String DISTRIBUTOR_ID=null; // 经销商编号 + String DISTRIBUTOR_NAME=null; // 经销商名称 + String CUSTOMERID=null; // 客户编号 + String CUSTOMERNAME=null; // 客户名称 + String CUSTOMERTYPE=null; // 客户类别 + String BUSINESSTYPE=null; // 业务类型 + String ACC_NUMBER=null; // 银行账号 + String PRODUCT_ID=null; // 产品编号 + String sql=""; + + sql="SELECT LCCT.EQUIP_AMT,ROUND(LCCT.EQUIP_AMT/getTax(LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2) AS EQUIP_AMT_NOTAX,(LCCT.EQUIP_AMT-ROUND(LCCT.EQUIP_AMT/getTax(LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2)) AS EQUIP_AMT_TAX,LCCT.FIRST_PAYMENT,LCCT.HANDLING_CHARGE_MONEY,ROUND(LCCT.HANDLING_CHARGE_MONEY/ getTax(LCI.LEAS_FORM,'手续费',LCI.INPUTTIME),2) AS HANDLING_CHARGE_MONEY_NOTAX,(LCCT.HANDLING_CHARGE_MONEY - ROUND(LCCT.HANDLING_CHARGE_MONEY/ getTax(LCI.LEAS_FORM,'手续费',LCI.INPUTTIME),2)) AS HANDLING_CHARGE_MONEY_TAX,IFNULL(LCCT.CAUTION_MONEY, 0) AS CAUTION_MONEY,LCCT.OTHER_MONEY,ROUND(LCCT.OTHER_MONEY/getTax(LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2) AS OTHER_MONEY_NOTAX,(LCCT.OTHER_MONEY - ROUND(LCCT.OTHER_MONEY/getTax(LCI.LEAS_FORM,'本金',LCI.INPUTTIME),2)) AS OTHER_MONEY_TAX,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(), '%Y/%m/%d') AS FACT_DATE,LCCT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING AS DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CUSTOMER_NUM AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,lfit.ACC_NUMBER,LPDI.PRODUCT_ID FROM LC_CALC_CONDITION LCCT INNER JOIN (SELECT contract_id,FLOWUNID,MIN(ACC_NUMBER) ACC_NUMBER FROM lc_fund_income_temp WHERE fee_type = 'feetype10' GROUP BY contract_id,FLOWUNID) lfit ON lfit.contract_id = lcct.contract_id LEFT JOIN LB_CONTRACT_INFO LCI ON LCI.ID = lfit.CONTRACT_ID LEFT JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO = LCI.DISTRIBUTOR_ID LEFT JOIN lb_union_lessee lul ON lul.contract_id = lci.id LEFT JOIN customer_info cif ON cif.customerid = lul.customer_id LEFT JOIN LB_PROJECT_INFO LPI ON LPI.ID = LUL.PROJECT_ID LEFT JOIN LB_PRODUCT_INFO LPDI ON LPDI.PRODUCT_ID=LPI.PRODUCT_ID WHERE LCI.BUSINESSTYPE='2' AND lfit.FLOWUNID = :FLOWUNID "; + + param.clear(); + map.put("FLOWUNID", FlowUnid); + + // 查询sql, 将结果集封装到map中 + List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); + + // 创建生成凭证的类对象 + CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); + + // 设置常用参数 + String VOUCHER_TYPE="1"; // 凭证分类 金蝶 + String userid ="admin"; + + for (int i=0;i getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取保证金 + String CAUTION_MONEY=param.get("CAUTION_MONEY")==null?"0.00":param.get("CAUTION_MONEY"); + returnValue.put("MONEY",CAUTION_MONEY); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquip.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquip.java new file mode 100644 index 000000000..b167ec291 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquip.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取设备款 + * @author xiezhiwen + */ +public class ContractGetMoneyToEquip implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取设备款 + String EQUIP_AMT=param.get("EQUIP_AMT")==null?"0.00":param.get("EQUIP_AMT"); + returnValue.put("MONEY",EQUIP_AMT); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddInsuranceAddOther.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddInsuranceAddOther.java new file mode 100644 index 000000000..c01dd804a --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddInsuranceAddOther.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 设备+保险+其他 + * @author xiezhiwen + */ +public class ContractGetMoneyToEquipAddInsuranceAddOther implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取设备款 + String EQUIP_INSURACE_PREMIUM_OTHER=param.get("EQUIP_INSURACE_PREMIUM_OTHER")==null?"0.00":param.get("EQUIP_INSURACE_PREMIUM_OTHER"); + returnValue.put("MONEY",EQUIP_INSURACE_PREMIUM_OTHER); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddInsuranceAddOtherSubFirst.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddInsuranceAddOtherSubFirst.java new file mode 100644 index 000000000..7ac999967 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddInsuranceAddOtherSubFirst.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 设备+保险+其他-首付款 + * @author xiezhiwen + */ +public class ContractGetMoneyToEquipAddInsuranceAddOtherSubFirst implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取设备款 + String OTHERSMONEY=param.get("OTHERSMONEY")==null?"0.00":param.get("OTHERSMONEY"); + returnValue.put("MONEY",OTHERSMONEY); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddOthers.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddOthers.java new file mode 100644 index 000000000..dbb16374e --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipAddOthers.java @@ -0,0 +1,28 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 设备款+其他金额 + * @author xiezhiwen + */ +public class ContractGetMoneyToEquipAddOthers implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取设备款 + String EQUIP_AMT=param.get("EQUIP_AMT")==null?"0.00":param.get("EQUIP_AMT"); + // 获取其它金额 + String OTHER_MONEY=param.get("OTHER_MONEY")==null?"0.00":param.get("OTHER_MONEY"); + + // 其他款项+设备款 + BigDecimal FactMoney=new BigDecimal(EQUIP_AMT).add(new BigDecimal(OTHER_MONEY)); + returnValue.put("MONEY",FactMoney.toString()); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipNoTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipNoTax.java new file mode 100644 index 000000000..d743e1d8b --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipNoTax.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取设备款(不含税) + * @author xiezhiwen + */ +public class ContractGetMoneyToEquipNoTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取设备款 + String EQUIP_AMT_NOTAX=param.get("EQUIP_AMT_NOTAX")==null?"0.00":param.get("EQUIP_AMT_NOTAX"); + returnValue.put("MONEY",EQUIP_AMT_NOTAX); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipTax.java new file mode 100644 index 000000000..20aa09da3 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToEquipTax.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取设备款(税金) + * @author xiezhiwen + */ +public class ContractGetMoneyToEquipTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取设备款 + String EQUIP_AMT_TAX=param.get("EQUIP_AMT_TAX")==null?"0.00":param.get("EQUIP_AMT_TAX"); + returnValue.put("MONEY",EQUIP_AMT_TAX); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPayment.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPayment.java new file mode 100644 index 000000000..de432c84e --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPayment.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取首付款 + * @author xiezhiwen + */ +public class ContractGetMoneyToFirstPayment implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取首付款 + String FIRST_PAYMENT=param.get("FIRST_PAYMENT")==null?"0.00":param.get("FIRST_PAYMENT"); + returnValue.put("MONEY",FIRST_PAYMENT); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPaymentNoTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPaymentNoTax.java new file mode 100644 index 000000000..6e5551ff0 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPaymentNoTax.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 首付款(不含税) + * @author xiezhiwen + */ +public class ContractGetMoneyToFirstPaymentNoTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 首付款(不含税) + String FIRST_PAYMENT_NOTAX=param.get("FIRST_PAYMENT_NOTAX")==null?"0.00":param.get("FIRST_PAYMENT_NOTAX"); + returnValue.put("MONEY",FIRST_PAYMENT_NOTAX); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPaymentTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPaymentTax.java new file mode 100644 index 000000000..bb58b06de --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToFirstPaymentTax.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 首付款(税金) + * @author xiezhiwen + */ +public class ContractGetMoneyToFirstPaymentTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 首付款(税金) + String FIRST_PAYMENT_TAX=param.get("FIRST_PAYMENT_TAX")==null?"0.00":param.get("FIRST_PAYMENT_TAX"); + returnValue.put("MONEY",FIRST_PAYMENT_TAX); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingCharge.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingCharge.java new file mode 100644 index 000000000..9324dc22d --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingCharge.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取手续费 + * @author xiezhiwen + */ +public class ContractGetMoneyToHandlingCharge implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取手续费 + String HANDLING_CHARGE_MONEY=param.get("HANDLING_CHARGE_MONEY")==null?"0.00":param.get("HANDLING_CHARGE_MONEY"); + returnValue.put("MONEY",HANDLING_CHARGE_MONEY); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingChargeNoTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingChargeNoTax.java new file mode 100644 index 000000000..b4e98aa2b --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingChargeNoTax.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取手续费(不含税) + * @author xiezhiwen + */ +public class ContractGetMoneyToHandlingChargeNoTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取手续费(不含税) + String HANDLING_CHARGE_MONEY_NOTAX=param.get("HANDLING_CHARGE_MONEY_NOTAX")==null?"0.00":param.get("HANDLING_CHARGE_MONEY_NOTAX"); + returnValue.put("MONEY",HANDLING_CHARGE_MONEY_NOTAX); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingChargeTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingChargeTax.java new file mode 100644 index 000000000..fa3bb3f3d --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToHandlingChargeTax.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取手续费(税金) + * @author xiezhiwen + */ +public class ContractGetMoneyToHandlingChargeTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取手续费(税金) + String HANDLING_CHARGE_MONEY_TAX=param.get("HANDLING_CHARGE_MONEY_TAX")==null?"0.00":param.get("HANDLING_CHARGE_MONEY_TAX"); + returnValue.put("MONEY",HANDLING_CHARGE_MONEY_TAX); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOther.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOther.java new file mode 100644 index 000000000..5ccac5085 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOther.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 保险+其他 + * @author xiezhiwen + */ +public class ContractGetMoneyToInsuranceAddOther implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取设备款 + String INSURANCE_PREMIUM_ADD_OTHER=param.get("INSURANCE_PREMIUM_ADD_OTHER")==null?"0.00":param.get("INSURANCE_PREMIUM_ADD_OTHER"); + returnValue.put("MONEY",INSURANCE_PREMIUM_ADD_OTHER); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOtherNoTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOtherNoTax.java new file mode 100644 index 000000000..1c7109ae7 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOtherNoTax.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 保险+其他(不含税) + * @author xiezhiwen + */ +public class ContractGetMoneyToInsuranceAddOtherNoTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取设备款 + String INSURANCE_PREMIUM_ADD_OTHER_NOTAX=param.get("INSURANCE_PREMIUM_ADD_OTHER_NOTAX")==null?"0.00":param.get("INSURANCE_PREMIUM_ADD_OTHER_NOTAX"); + returnValue.put("MONEY",INSURANCE_PREMIUM_ADD_OTHER_NOTAX); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOtherTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOtherTax.java new file mode 100644 index 000000000..79defb5d9 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToInsuranceAddOtherTax.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 保险+其他(税金) + * @author xiezhiwen + */ +public class ContractGetMoneyToInsuranceAddOtherTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 保险+其他(税金) + String INSURANCE_PREMIUM_ADD_OTHER_TAX=param.get("INSURANCE_PREMIUM_ADD_OTHER_TAX")==null?"0.00":param.get("INSURANCE_PREMIUM_ADD_OTHER_TAX"); + returnValue.put("MONEY",INSURANCE_PREMIUM_ADD_OTHER_TAX); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoney.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoney.java new file mode 100644 index 000000000..5c91a7924 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoney.java @@ -0,0 +1,20 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取FACT_MONEY + * @author xiezhiwen + */ +public class ContractGetMoneyToMoney implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx,Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + returnValue.put("MONEY",param.get("FACT_MONEY")); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoneyNoTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoneyNoTax.java new file mode 100644 index 000000000..06cc158e3 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoneyNoTax.java @@ -0,0 +1,20 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取INTERESTNOTAX + * @author xiezhiwen + */ +public class ContractGetMoneyToMoneyNoTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx,Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + returnValue.put("MONEY",param.get("INTERESTNOTAX")); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoneyTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoneyTax.java new file mode 100644 index 000000000..3f3dc12ac --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToMoneyTax.java @@ -0,0 +1,20 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取TAX + * @author xiezhiwen + */ +public class ContractGetMoneyToMoneyTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx,Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + returnValue.put("MONEY",param.get("TAX")); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOther.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOther.java new file mode 100644 index 000000000..6ba47bc76 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOther.java @@ -0,0 +1,23 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取其它金额 + * @author xiezhiwen + */ +public class ContractGetMoneyToOther implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取其它金额 + String OTHER_MONEY=param.get("OTHER_MONEY")==null?"0.00":param.get("OTHER_MONEY"); + returnValue.put("MONEY",OTHER_MONEY); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOtherNoTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOtherNoTax.java new file mode 100644 index 000000000..46d5feade --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOtherNoTax.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取其它金额(不含税) + * @author xiezhiwen + */ +public class ContractGetMoneyToOtherNoTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取其它金额 + String OTHER_MONEY_NOTAX=param.get("OTHER_MONEY_NOTAX")==null?"0.00":param.get("OTHER_MONEY_NOTAX"); + returnValue.put("MONEY",OTHER_MONEY_NOTAX); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOtherTax.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOtherTax.java new file mode 100644 index 000000000..be577072a --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOtherTax.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 获取其它金额(不含税) + * @author xiezhiwen + */ +public class ContractGetMoneyToOtherTax implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取其它金额 + String OTHER_MONEY_TAX=param.get("OTHER_MONEY_TAX")==null?"0.00":param.get("OTHER_MONEY_TAX"); + returnValue.put("MONEY",OTHER_MONEY_TAX); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOthersMath.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOthersMath.java new file mode 100644 index 000000000..3df614451 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/VoucherGetMoneyForTradition/ContractGetMoneyToOthersMath.java @@ -0,0 +1,34 @@ +package com.tenwa.voucher.CreateVoucherProcess.VoucherGetMoneyForTradition; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.comm.exception.BusinessException; +import com.tenwa.voucher.service.VoucherJavaParamService; +/** + * 设备款+其他金额-首付款-手续费-保证金 + * @author xiezhiwen + */ +public class ContractGetMoneyToOthersMath implements VoucherJavaParamService{ + public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { + MapreturnValue=new HashMap(); + returnValue.putAll(param); + // 获取设备款 + String EQUIP_AMT=param.get("EQUIP_AMT")==null?"0.00":param.get("EQUIP_AMT"); + // 获取其它金额 + String OTHER_MONEY=param.get("OTHER_MONEY")==null?"0.00":param.get("OTHER_MONEY"); + // 获取首付款 + String FIRST_PAYMENT=param.get("FIRST_PAYMENT")==null?"0.00":param.get("FIRST_PAYMENT"); + // 获取保证金 + String CAUTION_MONEY=param.get("CAUTION_MONEY")==null?"0.00":param.get("CAUTION_MONEY"); + // 获取手续费 + String HANDLING_CHARGE_MONEY=param.get("HANDLING_CHARGE_MONEY")==null?"0.00":param.get("HANDLING_CHARGE_MONEY"); + // 其他款项+设备款 + BigDecimal FactMoney=new BigDecimal(EQUIP_AMT).add(new BigDecimal(OTHER_MONEY)).subtract(new BigDecimal(FIRST_PAYMENT)).subtract(new BigDecimal(CAUTION_MONEY)).subtract(new BigDecimal(HANDLING_CHARGE_MONEY)); + + returnValue.put("MONEY",FactMoney.toString()); + return returnValue; + } +} diff --git a/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java b/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java index cf088a8d6..97bf5dfb7 100644 --- a/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java +++ b/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java @@ -311,13 +311,16 @@ public class CreateVoucherServiceImpl { }else if("PZ2018082600000149".equals(VOUCHERNO) || "PZ2018082600000150".equals(VOUCHERNO) || "PZ2018070900000003".equals(VOUCHERNO) || "PZ2018080200000065".equals(VOUCHERNO)) { subData.put("CUSTID",dataTemp.get("DISTRIBUTOR_ID"));//经销商id subData.put("CUSTNAME",dataTemp.get("DISTRIBUTOR_NAME"));//经销商名称 - }else if("PZ2018072100000037".equals(VOUCHERNO)||"PZ2018080400000091".equals(VOUCHERNO) || "PZ2018072100000038".equals(VOUCHERNO)||"PZ2018080400000092".equals(VOUCHERNO)){ + }else if("PZ2018072100000037".equals(VOUCHERNO)||"PZ2018080400000091".equals(VOUCHERNO) || "PZ2018072100000038".equals(VOUCHERNO) || "PZ2018080400000092".equals(VOUCHERNO)){ subData.put("CUSTID","APZL00000000DC");//经销商id subData.put("CUSTNAME","业务系统待查客户");//经销商名称 - }else if("PZ2018092500000192".equals(VOUCHERNO)||"PZ2018092500000193".equals(VOUCHERNO) || "PZ2018092500000194".equals(VOUCHERNO)||"PZ2018092500000195".equals(VOUCHERNO)){ + }else if("PZ2018092500000192".equals(VOUCHERNO)||"PZ2018092500000193".equals(VOUCHERNO) || "PZ2018092500000194".equals(VOUCHERNO) || "PZ2018092500000195".equals(VOUCHERNO) || "PZ2018092600000240".equals(VOUCHERNO)||"PZ2018092600000241".equals(VOUCHERNO) || "PZ2018092600000242".equals(VOUCHERNO) || "PZ2018092600000243".equals(VOUCHERNO)){ subData.put("CUSTID","APZL00000000DC");//经销商id subData.put("CUSTNAME","业务系统待查客户");//经销商名称 - }else if("PZ2018092500000156".equals(VOUCHERNO)||"PZ2018092500000157".equals(VOUCHERNO) || "PZ2018092500000158".equals(VOUCHERNO)){ + }else if("PZ2018092500000164".equals(VOUCHERNO)||"PZ2018092600000229".equals(VOUCHERNO) || "PZ2018092500000166".equals(VOUCHERNO) || "PZ2018092600000231".equals(VOUCHERNO)){ + subData.put("CUSTID","APZL00000000DC");//经销商id + subData.put("CUSTNAME","业务系统待查客户");//经销商名称 + }else if("PZ2018092500000156".equals(VOUCHERNO)||"PZ2018092500000157".equals(VOUCHERNO) || "PZ2018092500000158".equals(VOUCHERNO) || "PZ2018092600000244".equals(VOUCHERNO)||"PZ2018092600000245".equals(VOUCHERNO) || "PZ2018092600000246".equals(VOUCHERNO)){ subData.put("CUSTID","APZL00000000DC");//经销商id subData.put("CUSTNAME","业务系统待查客户");//经销商名称 }else { From 74a06880d0390d63109ca95dc68d63c7fa65dc09 Mon Sep 17 00:00:00 2001 From: zhangbb Date: Wed, 26 Sep 2018 21:28:56 +0800 Subject: [PATCH 3/4] =?UTF-8?q?1.=E9=A3=8E=E6=8E=A7=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E9=A3=8E=E6=8E=A7=E5=8F=8A=E6=B3=95=E5=8A=A1?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/Tenwa/Lease/Flow/Comm/LBRisk/LBRistList.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBRisk/LBRistList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBRisk/LBRistList.jsp index 631f08786..d8447e80b 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBRisk/LBRistList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBRisk/LBRistList.jsp @@ -159,7 +159,7 @@ function upload(){ // deleteFile(); - var sparam="FlowUnid=<%=flowunid%>"+",ProjId=<%=projid%>"+",DocType=001,OneClassify=001003,DocName=风控报告"; + var sparam="FlowUnid=<%=flowunid%>"+",ProjId=<%=projid%>"+",DocType=001,OneClassify=001003,DocName=风控及法务报告"; var library_id=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateContractOfficeAction","NewCreditLibraryId",sparam); var param="Library_id="+library_id+"&FlowUnid=<%=flowunid%>"; From aa73293ce9e62570b2ac8e221f9e25ab10c8cf65 Mon Sep 17 00:00:00 2001 From: jianghongdong Date: Thu, 27 Sep 2018 09:52:37 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=85=B3=E4=BA=8E=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E5=A4=84=E7=BD=AE=E7=BB=93=E6=A1=88(=E4=BC=A0=E7=BB=9F)?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=B8=AD=E6=97=A0=E6=B3=95=E5=B8=A6=E5=87=BA?= =?UTF-8?q?=E7=BB=93=E6=A1=88=E4=BF=A1=E6=81=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssetsDisposal/AssetsDisposalEnd/AssetsDisposalEndInfo.jsp | 1 + 1 file changed, 1 insertion(+) diff --git a/WebContent/Tenwa/Lease/Flow/AssetsDisposal/AssetsDisposalEnd/AssetsDisposalEndInfo.jsp b/WebContent/Tenwa/Lease/Flow/AssetsDisposal/AssetsDisposalEnd/AssetsDisposalEndInfo.jsp index 36f10989d..b85fc9c11 100644 --- a/WebContent/Tenwa/Lease/Flow/AssetsDisposal/AssetsDisposalEnd/AssetsDisposalEndInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/AssetsDisposal/AssetsDisposalEnd/AssetsDisposalEndInfo.jsp @@ -16,6 +16,7 @@ if(null!=ishistory&&ishistory.equals("true")){ doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataInfoHistory");//如果是历史则新显示历史数据 } + doTemp.setDefaultValue("FLOWUNID", sFlowUnid); ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); CurPage.getCurComp().setAttribute("RightType", null); dwTemp.Style = "2";//