From c296f995ebc051c3b0cd4d191e0a98e3e8c82069 Mon Sep 17 00:00:00 2001 From: amarsoft Date: Sat, 21 Jul 2018 10:58:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=AD=E8=AF=81=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VoucherConfig/LvVoucherConfigList.jsp | 2 +- .../AccountChangeApprovalApplyList.jsp | 2 +- WebContent/WEB-INF/etc/jbo/jbo_voucher.xml | 2 +- ... CreateVoucherCustCautionMoneyIncome.java} | 74 +++++----- .../CreateVoucherCustomerRentOrFee.java | 130 ++++++++++++++++++ .../CreateVoucherDistCautionMoneyRe.java | 84 +++++++++++ ...y.java => CreateVoucherHandlingMoney.java} | 79 ++++++----- .../CreateVoucherLendDistributor.java | 117 ---------------- ...ountsRecieve.java => CleanLeaseMoney.java} | 12 +- ...rginForLoan.java => ContractInterest.java} | 4 +- ...easCar.java => ContractInterestNoTax.java} | 4 +- ...kReceipt.java => ContractInterestTax.java} | 4 +- .../OtherAccountPayLend.java | 28 ---- .../CreateVoucherLoan/OtherFee.java | 32 +++++ .../CreateVoucherLoan/SaveMargin.java | 20 --- .../SynthesizeLeaseMoney.java | 37 +++++ .../CreateVoucherLoanDistributor.java | 59 +++++--- .../ContractOnhireVoucher.java | 18 +++ .../CreateVoucherMonthSettlement.java | 113 +++++++++++++++ .../CreateVoucherReceiveDealerMargin.java | 68 --------- .../CreateVoucherReceiveMargin.java | 98 ------------- .../auxiliaryInfo/auxiliaryContractAcc.java | 24 ++++ .../auxiliaryInfo/auxiliaryContractCar.java | 22 +++ .../auxiliaryContractCustomer.java | 22 +++ .../auxiliaryContractFactDate.java | 20 +++ .../auxiliaryContractNumber.java | 22 +++ .../auxiliaryInfo/auxiliaryContractOrg.java | 22 +++ .../auxiliaryContractPlanList.java | 21 +++ .../auxiliaryContractStartNum.java | 20 +++ .../serviceImp/CreateVoucherServiceImpl.java | 2 +- .../voucher/serviceImp/VoucherToV8Impl.java | 6 + .../CreateVoucherMonthSettlementMission.java | 17 +++ 32 files changed, 754 insertions(+), 431 deletions(-) rename src_core/com/tenwa/voucher/CreateVoucherProcess/{CreateVoucherBackDealerMargin.java => CreateVoucherCustCautionMoneyIncome.java} (54%) create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherDistCautionMoneyRe.java rename src_core/com/tenwa/voucher/CreateVoucherProcess/{CreateVoucherDownPay.java => CreateVoucherHandlingMoney.java} (51%) delete mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLendDistributor.java rename src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/{AccountsRecieve.java => CleanLeaseMoney.java} (58%) rename src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/{ReceiveDealerMarginForLoan.java => ContractInterest.java} (75%) rename src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/{FinancialLeasCar.java => ContractInterestNoTax.java} (77%) rename src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/{BankReceipt.java => ContractInterestTax.java} (79%) delete mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherAccountPayLend.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherFee.java delete mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/SaveMargin.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/SynthesizeLeaseMoney.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/ContractOnhireVoucher.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMonthSettlement.java delete mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveDealerMargin.java delete mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveMargin.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractAcc.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractCar.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractCustomer.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractFactDate.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractNumber.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractOrg.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractPlanList.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractStartNum.java create mode 100644 src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherMonthSettlementMission.java diff --git a/WebContent/Tenwa/Core/Voucher/VoucherConfig/LvVoucherConfigList.jsp b/WebContent/Tenwa/Core/Voucher/VoucherConfig/LvVoucherConfigList.jsp index ac9d5dda4..ef4b75166 100644 --- a/WebContent/Tenwa/Core/Voucher/VoucherConfig/LvVoucherConfigList.jsp +++ b/WebContent/Tenwa/Core/Voucher/VoucherConfig/LvVoucherConfigList.jsp @@ -9,7 +9,7 @@ ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.Style="1"; //--设置为Grid风格-- dwTemp.ReadOnly = "1"; //只读模式 - dwTemp.setPageSize(10); + dwTemp.setPageSize(50); dwTemp.genHTMLObjectWindow(""); //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 diff --git a/WebContent/Tenwa/Lease/Flow/AccountInfoChange/AccountChangeApprovalApplyList.jsp b/WebContent/Tenwa/Lease/Flow/AccountInfoChange/AccountChangeApprovalApplyList.jsp index f3d482d9e..d3b3f6d1f 100644 --- a/WebContent/Tenwa/Lease/Flow/AccountInfoChange/AccountChangeApprovalApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/AccountInfoChange/AccountChangeApprovalApplyList.jsp @@ -54,7 +54,7 @@ var customerType=sReturn[4]; var customerId=sReturn[5]; var contractNumber=sReturn[6]; - var param="contractId="+contractId+",productId="+productId+",product_Name="+product_Name+",projectId="+projectId+",customerType="+customerType+",customerId="+customerId+",contractNumber="+contractNumber; + var param="ContractId="+contractId+",productId="+productId+",product_Name="+product_Name+",projectId="+projectId+",CustomerType="+customerType+",customerId="+customerId+",contractNumber="+contractNumber; var sParams =param+",ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>"; var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",sParams); if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return; diff --git a/WebContent/WEB-INF/etc/jbo/jbo_voucher.xml b/WebContent/WEB-INF/etc/jbo/jbo_voucher.xml index 35c208667..ed488e600 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_voucher.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_voucher.xml @@ -76,7 +76,7 @@ - + diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherBackDealerMargin.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustCautionMoneyIncome.java similarity index 54% rename from src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherBackDealerMargin.java rename to src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustCautionMoneyIncome.java index ee5830bea..8e8655ae4 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherBackDealerMargin.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustCautionMoneyIncome.java @@ -12,79 +12,85 @@ import com.tenwa.comm.util.jboutil.DataOperatorUtil; import com.tenwa.flow.baseBussion.BaseBussiness; import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl; -public class CreateVoucherBackDealerMargin extends BaseBussiness{ +public class CreateVoucherCustCautionMoneyIncome extends BaseBussiness{ + @Override public Object run(Transaction Sqlca) throws Exception { this.initBussinessParam(Sqlca); Map map=new HashMap(); Map param=new HashMap(); + String MONEY=null; String ACCOUNT_DATE=null; String FACT_DATE=null; String CONTRACT_ID=null; String CONTRACT_NUMBER=null; String PROJECT_NAME=null; String leas_form=null; - String ORGNAME=null; - String ORGID=null; - String MONEY=null; - String ACCOUNTNO=null; - String CUSTOMERID=null; - String CUSTOMERNAME=null; + String DISTRIBUTOR_ID=null; + String DISTRIBUTOR_NAME=null; + String CARID=null; + String CARMODEL=null; String FlowUnid=this.getAttribute("FlowUnid").toString(); + String sql=""; + String VOUCHERNO=this.getAttribute("VoucherNo").toString(); + String FeeType=this.getAttribute("FeeType").toString(); param.clear(); map.put("FlowUnid", FlowUnid); - map.put("FEE_TYPE", "feetype5"); - String sql= - " SELECT LFIT.FACT_MONEY AS MONEY,LFIT.ACCOUNTING_DATE AS ACCOUNT_DATE, " - +" LFIT.FACT_DATE,LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER, " - +" LCI.PROJECT_NAME,LCI.LEAS_FORM,IFNULL(LFIT.acc_number,'000000000000000') as ACCOUNTNO, " - +" ORG.ORGNAME,ORG.ORGID,LESS.CUSTOMER_ID as CUSTOMERID,LESS.CUSTOMER_NAME AS CUSTOMERNAME " - +" FROM LC_FUND_INCOME_TEMP LFIT " - +" LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID " - +" LEFT JOIN ORG_INFO ORG ON ORG.ORGID=LCI.PROJECT_DEPT " - +" LEFT JOIN LB_UNION_LESSEE LESS ON LESS.CONTRACT_ID=LCI.ID " - +" where LFIT.FEE_TYPE=:FEE_TYPE and LFIT.FLOWUNID=:FlowUnid "; + map.put("FEE_TYPE", FeeType); + + sql= "SELECT LFIT.FACT_MONEY AS MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') " + + "AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE," + + "LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM," + + "LCI.DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL " + + "FROM LC_FUND_INCOME_TEMP LFIT LEFT JOIN LB_CONTRACT_INFO LCI " + + "ON LFIT.CONTRACT_ID=LCI.ID LEFT JOIN DISTRIBUTOR_INFO DI ON " + + "DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN LB_EQUIPMENT_CAR " + + "LEC ON LEC.CONTRACT_ID=LCI.ID WHERE LFIT.FEE_TYPE=:FEE_TYPE " + + "AND LFIT.FLOWUNID=:FLOWUNID "; + List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); String VOUCHER_TYPE="1";// 凭证分类 金蝶 String userid ="admin"; for (int i=0;i0){ ACCOUNT_DATE=dataList.get(i).get("ACCOUNT_DATE").toString(); FACT_DATE =dataList.get(i).get("FACT_DATE").toString(); CONTRACT_ID=dataList.get(i).get("CONTRACT_ID").toString(); CONTRACT_NUMBER=dataList.get(i).get("CONTRACT_NUMBER").toString(); PROJECT_NAME=dataList.get(i).get("PROJECT_NAME").toString(); leas_form=dataList.get(i).get("LEAS_FORM").toString(); - ORGNAME=dataList.get(i).get("ORGNAME").toString(); - ORGID=dataList.get(i).get("ORGID").toString(); - MONEY=dataList.get(i).get("MONEY").toString(); - ACCOUNTNO=dataList.get(i).get("ACCOUNTNO").toString(); - CUSTOMERID=dataList.get(i).get("CUSTOMERID"); - CUSTOMERNAME=dataList.get(i).get("CUSTOMERNAME"); + DISTRIBUTOR_ID=dataList.get(i).get("DISTRIBUTOR_ID"); + DISTRIBUTOR_NAME=dataList.get(i).get("DISTRIBUTOR_NAME"); + CARID=dataList.get(i).get("CARID"); + CARMODEL=dataList.get(i).get("MODEL"); + + param.put("FACT_MONEY",MONEY); param.put("ACCOUNT_DATE",ACCOUNT_DATE); param.put("FACT_DATE",FACT_DATE); param.put("CONTRACT_ID",CONTRACT_ID); param.put("CONTRACT_NUMBER",CONTRACT_NUMBER); param.put("PROJECT_NAME",PROJECT_NAME); - param.put("ORGNAME",ORGNAME); - param.put("ORGID",ORGID); param.put("LEAS_FORM",leas_form); - param.put("FACT_MONEY",MONEY); - param.put("ACCOUNTNO",ACCOUNTNO); + param.put("DISTRIBUTOR_ID",DISTRIBUTOR_ID); + param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME); + param.put("CARID",CARID); + param.put("CARMODEL",CARMODEL); + param.put("FlowUnid", FlowUnid); - param.put("CUSTOMERID",CUSTOMERID); - param.put("CUSTOMERNAME",CUSTOMERNAME); map.clear(); map.put("PROJ_TYPE", leas_form); - map.put("MODULAR_NUMBER", "经销商支付的预付款(首付)"); + map.put("VOUCHER_NO", VOUCHERNO); BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca); if(vouch!=null){ - vs.createVoucher("经销商支付的预付款(首付)", vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca); - } + vs.createVoucher(vouch.getAttribute("MODULAR_NUMBER").getString(), vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca); + }} } diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java new file mode 100644 index 000000000..dc87a0b7f --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherCustomerRentOrFee.java @@ -0,0 +1,130 @@ +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.are.jbo.BizObject; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.flow.baseBussion.BaseBussiness; +import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl; + +public class CreateVoucherCustomerRentOrFee extends BaseBussiness{ + + @Override + public Object run(Transaction Sqlca) throws Exception { + this.initBussinessParam(Sqlca); + Map map=new HashMap(); + Map param=new HashMap(); + + String EQUIP_AMT=null; + String FIRST_PAYMENT=null; + String CLEAN_LEASE_MONEY=null; + String INSURANCE_PREMIUM=null; + String PURCHASE_TAX=null; + String INCIDENTAL=null; + String GPS_FEE_FINANCE=null; + String INTEREST=null; + String INTERESTNOTAX=null; + String TAX=null; + String ACCOUNT_DATE=null; + String FACT_DATE=null; + String CONTRACT_ID=null; + String CONTRACT_NUMBER=null; + String PROJECT_NAME=null; + String leas_form=null; + String DISTRIBUTOR_ID=null; + String DISTRIBUTOR_NAME=null; + String CARID=null; + String CARMODEL=null; + String FlowUnid=this.getAttribute("FlowUnid").toString(); + //String VOUCHERNO="PZ2018071000000005"; + String VOUCHERNO=this.getAttribute("VoucherNo").toString(); + String sql="SELECT LCCT.EQUIP_AMT,LCCT.FIRST_PAYMENT,LCCT.CLEAN_LEASE_MONEY," + + "LCCT.INSURANCE_PREMIUM,LCCT.PURCHASE_TAX,LCCT.INCIDENTAL," + + "LCCT.GPS_FEE_FINANCE,LRPT.INTEREST,LRPT.INTERESTNOTAX,LRPT.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,LCI.DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME," + + "LEC.ID AS CARID,LEC.MODEL FROM LC_CALC_CONDITION_TEMP LCCT LEFT JOIN " + + "LB_CONTRACT_INFO LCI ON LCI.ID=LCCT.CONTRACT_ID LEFT JOIN (SELECT FLOWUNID," + + "SUM(INTEREST) AS INTEREST,SUM(ROUND((INTEREST/1.06),2)) AS INTERESTNOTAX," + + "SUM(INTEREST-ROUND((INTEREST/1.06),2)) AS TAX FROM LC_RENT_PLAN_TEMP " + + "GROUP BY FLOWUNID) LRPT ON LRPT.FLOWUNID=LCCT.FLOWUNID LEFT JOIN " + + "DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN " + + "LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID WHERE LCCT.FLOWUNID=:FLOWUNID"; + param.clear(); + map.put("FLOWUNID", FlowUnid); + + 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 MONEY=null; + String ACCOUNT_DATE=null; + String FACT_DATE=null; + String leas_form=null; + String DISTRIBUTOR_ID=null; + String DISTRIBUTOR_NAME=null; + String FlowUnid=this.getAttribute("FlowUnid").toString(); + String sql=""; + String VOUCHERNO=this.getAttribute("VoucherNo").toString(); + param.clear(); + map.put("FlowUnid", FlowUnid); + + sql= "SELECT DDIT.CAUTION_MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') " + + "AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE," + + "DDIT.REFUND_PERSON,DIF.DISTRIBUTOR_NO,DIF.DISTRIBUTOR_NAME FROM D_DEPOSITRETURN_INFO_TEMP" + + " DDIT LEFT JOIN DISTRIBUTOR_INFO DIF ON DIF.ID=DIF.DISTRIBUTOR_ID " + + "WHERE DDIT.FLOWUNID=:FLOWUNID"; + + List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); + + CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); + String VOUCHER_TYPE="1";// 凭证分类 金蝶 + String userid ="admin"; + for (int i=0;i0){ + ACCOUNT_DATE=dataList.get(i).get("ACCOUNT_DATE").toString(); + FACT_DATE =dataList.get(i).get("FACT_DATE").toString(); + leas_form="01"; + DISTRIBUTOR_ID=dataList.get(i).get("DISTRIBUTOR_NO"); + DISTRIBUTOR_NAME=dataList.get(i).get("DISTRIBUTOR_NAME"); + + param.put("FACT_MONEY",MONEY); + param.put("ACCOUNT_DATE",ACCOUNT_DATE); + param.put("FACT_DATE",FACT_DATE); + param.put("LEAS_FORM",leas_form); + param.put("DISTRIBUTOR_ID",DISTRIBUTOR_ID); + param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME); + + param.put("FlowUnid", FlowUnid); + map.clear(); + map.put("PROJ_TYPE", leas_form); + map.put("VOUCHER_NO", VOUCHERNO); + BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca); + + if(vouch!=null){ + vs.createVoucher(vouch.getAttribute("MODULAR_NUMBER").getString(), vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca); + }} + } + if(Sqlca!=null){ + Sqlca.commit(); + } + String sMessage="true"; + return sMessage; + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherDownPay.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java similarity index 51% rename from src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherDownPay.java rename to src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java index 49f402d18..1f94ea702 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherDownPay.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherHandlingMoney.java @@ -12,79 +12,90 @@ import com.tenwa.comm.util.jboutil.DataOperatorUtil; import com.tenwa.flow.baseBussion.BaseBussiness; import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl; -public class CreateVoucherDownPay extends BaseBussiness{ +public class CreateVoucherHandlingMoney extends BaseBussiness{ + @Override public Object run(Transaction Sqlca) throws Exception { this.initBussinessParam(Sqlca); Map map=new HashMap(); Map param=new HashMap(); + String MONEY=null; + String MONEYNOTAX=null; + String MONEYTAX=null; String ACCOUNT_DATE=null; String FACT_DATE=null; String CONTRACT_ID=null; String CONTRACT_NUMBER=null; String PROJECT_NAME=null; String leas_form=null; - String ORGNAME=null; - String ORGID=null; - String MONEY=null; - String ACCOUNTNO=null; - String CUSTOMERID=null; - String CUSTOMERNAME=null; + String DISTRIBUTOR_ID=null; + String DISTRIBUTOR_NAME=null; + String CARID=null; + String CARMODEL=null; String FlowUnid=this.getAttribute("FlowUnid").toString(); + String sql=""; + String VOUCHERNO=this.getAttribute("VoucherNo").toString(); param.clear(); map.put("FlowUnid", FlowUnid); - map.put("FEE_TYPE", "feetype5"); - String sql= - " SELECT LFIT.FACT_MONEY AS MONEY,LFIT.ACCOUNTING_DATE AS ACCOUNT_DATE, " - +" LFIT.FACT_DATE,LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER, " - +" LCI.PROJECT_NAME,LCI.LEAS_FORM,IFNULL(LFIT.acc_number,'000000000000000') as ACCOUNTNO, " - +" ORG.ORGNAME,ORG.ORGID,LESS.CUSTOMER_ID as CUSTOMERID,LESS.CUSTOMER_NAME AS CUSTOMERNAME " - +" FROM LC_FUND_INCOME_TEMP LFIT " - +" LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID " - +" LEFT JOIN ORG_INFO ORG ON ORG.ORGID=LCI.PROJECT_DEPT " - +" LEFT JOIN LB_UNION_LESSEE LESS ON LESS.CONTRACT_ID=LCI.ID " - +" where LFIT.FEE_TYPE=:FEE_TYPE and LFIT.FLOWUNID=:FlowUnid "; + sql= "SELECT LCCT.HANDLING_CHARGE_MONEY AS MONEY,LCCT.HANDLING_CHARGE_MONEY/1.06 " + + "AS HANDLFEENOTAX,(LCCT.HANDLING_CHARGE_MONEY-LCCT.HANDLING_CHARGE_MONEY/1.06)" + + " AS HANDLTAX,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,LCI.DISTRIBUTOR_ID," + + "DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL FROM LC_CALC_CONDITION_TEMP " + + "LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN " + + "DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN " + + "LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID WHERE LCCT.FLOWUNID=:FLOWUNID"; + List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); String VOUCHER_TYPE="1";// 凭证分类 金蝶 String userid ="admin"; for (int i=0;i0){ + MONEYNOTAX=dataList.get(i).get("HANDLFEENOTAX").toString(); + MONEYTAX=dataList.get(i).get("HANDLTAX").toString(); + ACCOUNT_DATE=dataList.get(i).get("ACCOUNT_DATE").toString(); FACT_DATE =dataList.get(i).get("FACT_DATE").toString(); CONTRACT_ID=dataList.get(i).get("CONTRACT_ID").toString(); CONTRACT_NUMBER=dataList.get(i).get("CONTRACT_NUMBER").toString(); PROJECT_NAME=dataList.get(i).get("PROJECT_NAME").toString(); leas_form=dataList.get(i).get("LEAS_FORM").toString(); - ORGNAME=dataList.get(i).get("ORGNAME").toString(); - ORGID=dataList.get(i).get("ORGID").toString(); - MONEY=dataList.get(i).get("MONEY").toString(); - ACCOUNTNO=dataList.get(i).get("ACCOUNTNO").toString(); - CUSTOMERID=dataList.get(i).get("CUSTOMERID"); - CUSTOMERNAME=dataList.get(i).get("CUSTOMERNAME"); + DISTRIBUTOR_ID=dataList.get(i).get("DISTRIBUTOR_ID"); + DISTRIBUTOR_NAME=dataList.get(i).get("DISTRIBUTOR_NAME"); + CARID=dataList.get(i).get("CARID"); + CARMODEL=dataList.get(i).get("MODEL"); + + param.put("FACT_MONEY",MONEY); + param.put("INTERESTNOTAX",MONEYNOTAX); + param.put("TAX",MONEYTAX); param.put("ACCOUNT_DATE",ACCOUNT_DATE); param.put("FACT_DATE",FACT_DATE); param.put("CONTRACT_ID",CONTRACT_ID); param.put("CONTRACT_NUMBER",CONTRACT_NUMBER); param.put("PROJECT_NAME",PROJECT_NAME); - param.put("ORGNAME",ORGNAME); - param.put("ORGID",ORGID); param.put("LEAS_FORM",leas_form); - param.put("FACT_MONEY",MONEY); - param.put("ACCOUNTNO",ACCOUNTNO); + param.put("DISTRIBUTOR_ID",DISTRIBUTOR_ID); + param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME); + param.put("CARID",CARID); + param.put("CARMODEL",CARMODEL); + + param.put("FlowUnid", FlowUnid); - param.put("CUSTOMERID",CUSTOMERID); - param.put("CUSTOMERNAME",CUSTOMERNAME); map.clear(); map.put("PROJ_TYPE", leas_form); - map.put("MODULAR_NUMBER", "经销商支付的预付款(首付)"); + map.put("VOUCHER_NO", VOUCHERNO); BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca); if(vouch!=null){ - vs.createVoucher("经销商支付的预付款(首付)", vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca); - } + vs.createVoucher(vouch.getAttribute("MODULAR_NUMBER").getString(), vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca); + }} } diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLendDistributor.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLendDistributor.java deleted file mode 100644 index 7df3c76a0..000000000 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLendDistributor.java +++ /dev/null @@ -1,117 +0,0 @@ -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.are.jbo.BizObject; -import com.amarsoft.awe.util.Transaction; -import com.tenwa.comm.util.jboutil.DataOperatorUtil; -import com.tenwa.flow.baseBussion.BaseBussiness; -import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl; - -public class CreateVoucherLendDistributor extends BaseBussiness{ - @Override - public Object run(Transaction Sqlca) throws Exception { - this.initBussinessParam(Sqlca); - Map map=new HashMap(); - Map param=new HashMap(); - String ACCOUNT_DATE=null; - String FACT_DATE=null; - String CONTRACT_ID=null; - String CONTRACT_NUMBER=null; - String PROJECT_NAME=null; - String leas_form=null; - String ORGNAME=null; - String ORGID=null; - //String MONEY=null; - String f10=null; - String f20=null; - String f21=null; - String f23=null; - String f24=null; - String ACCOUNTNO=null; - String DISTRIBUTORID=null; - String DISTRIBUTORNAME=null; - String FlowUnid=this.getAttribute("FlowUnid").toString(); - param.clear(); - map.put("FlowUnid", FlowUnid); - - String sql= - " SELECT SUM(CASE WHEN LFIT.FEE_TYPE='feetype10' THEN LFIT.FACT_MONEY ELSE 0 END) AS f10, " - +" SUM(CASE WHEN LFIT.FEE_TYPE='feetype20' THEN LFIT.FACT_MONEY ELSE 0 END) AS f20, " - +" SUM(CASE WHEN LFIT.FEE_TYPE='feetype21' THEN LFIT.FACT_MONEY ELSE 0 END) AS f21, " - +" SUM(CASE WHEN LFIT.FEE_TYPE='feetype24' THEN LFIT.FACT_MONEY ELSE 0 END) AS f24, " - +" SUM(CASE WHEN LFIT.FEE_TYPE='feetype23' THEN LFIT.FACT_MONEY ELSE 0 END) AS f23, " - +" MAX(LFIT.FEE_TYPE) AS FEE_TYPE,MAX(LFIT.ACCOUNTING_DATE) AS ACCOUNT_DATE, " - +" MAX(LFIT.FACT_DATE) AS FACT_DATE,MAX(LFIT.CONTRACT_ID) AS CONTRACT_ID,MAX(LCI.CONTRACT_NUMBER) AS CONTRACT_NUMBER, " - +" MAX(LCI.PROJECT_NAME) AS PROJECT_NAME,MAX(LCI.LEAS_FORM) AS LEAS_FORM,IFNULL(MAX(LFIT.acc_number),'000000000000000') AS ACCOUNTNO, " - +" MAX(ORG.ORGNAME) AS ORGNAME,MAX(ORG.ORGID) AS ORGID,MAX(LCI.DISTRIBUTOR_ID) AS DISTRIBUTORID,MAX(DI.DISTRIBUTOR_NAME) AS DISTRIBUTORNAME " - +" FROM LC_FUND_INCOME_TEMP LFIT " - +" LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID " - +" LEFT JOIN ORG_INFO ORG ON ORG.ORGID=LCI.PROJECT_DEPT " - +" LEFT JOIN DISTRIBUTOR_INFO DI ON DI.ID=LCI.DISTRIBUTOR_ID " - +" where LFIT.FEE_TYPE in ('feetype10','feetype20','feetype21','feetype24','feetype23') and LFIT.FLOWUNID=:FlowUnid GROUP BY LFIT.FLOWUNID"; - 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(); + //subtract + String EQUIP_AMT=param.get("EQUIP_AMT"); + String FIRST_PAYMENT=param.get("FIRST_PAYMENT"); + BigDecimal factmoney=new BigDecimal(EQUIP_AMT).subtract(new BigDecimal(FIRST_PAYMENT)); + returnValue.putAll(param); - returnValue.put("MONEY",param.get("FACT_MONEY")); + returnValue.put("MONEY",factmoney.toString()); return returnValue; } - + } diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ReceiveDealerMarginForLoan.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ContractInterest.java similarity index 75% rename from src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ReceiveDealerMarginForLoan.java rename to src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ContractInterest.java index 995ad1a2d..fcc1ddcd5 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ReceiveDealerMarginForLoan.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ContractInterest.java @@ -1,5 +1,6 @@ package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan; +import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; @@ -7,13 +8,14 @@ import com.amarsoft.are.jbo.JBOTransaction; import com.tenwa.comm.exception.BusinessException; import com.tenwa.voucher.service.VoucherJavaParamService; -public class ReceiveDealerMarginForLoan implements VoucherJavaParamService { +public class ContractInterest implements VoucherJavaParamService{ @Override public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { MapreturnValue=new HashMap(); returnValue.putAll(param); + returnValue.put("MONEY",param.get("INTEREST")); return returnValue; } diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/FinancialLeasCar.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ContractInterestNoTax.java similarity index 77% rename from src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/FinancialLeasCar.java rename to src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ContractInterestNoTax.java index 15ab4028c..1967ea004 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/FinancialLeasCar.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ContractInterestNoTax.java @@ -7,14 +7,14 @@ import com.amarsoft.are.jbo.JBOTransaction; import com.tenwa.comm.exception.BusinessException; import com.tenwa.voucher.service.VoucherJavaParamService; -public class FinancialLeasCar implements VoucherJavaParamService{ +public class ContractInterestNoTax implements VoucherJavaParamService{ @Override public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { MapreturnValue=new HashMap(); returnValue.putAll(param); - returnValue.put("MONEY",param.get("FACT_MONEY")); + returnValue.put("MONEY",param.get("INTERESTNOTAX")); return returnValue; } diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/BankReceipt.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ContractInterestTax.java similarity index 79% rename from src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/BankReceipt.java rename to src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ContractInterestTax.java index 7f6610e18..7c10f305e 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/BankReceipt.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/ContractInterestTax.java @@ -7,14 +7,14 @@ import com.amarsoft.are.jbo.JBOTransaction; import com.tenwa.comm.exception.BusinessException; import com.tenwa.voucher.service.VoucherJavaParamService; -public class BankReceipt implements VoucherJavaParamService{ +public class ContractInterestTax implements VoucherJavaParamService{ @Override public Map getJavaParam(JBOTransaction tx, Map param) throws BusinessException { MapreturnValue=new HashMap(); returnValue.putAll(param); - returnValue.put("MONEY",param.get("FACT_MONEY")); + returnValue.put("MONEY",param.get("TAX")); return returnValue; } diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherAccountPayLend.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherAccountPayLend.java deleted file mode 100644 index 24da2e432..000000000 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherAccountPayLend.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan; - -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; - -public class OtherAccountPayLend implements VoucherJavaParamService{ - - @Override - public Map getJavaParam(JBOTransaction tx, - Map param) throws BusinessException { - //购置税(f20)+保险(f21)+GPS(f24)+装饰装潢(f23) - BigDecimal otherMoney=new BigDecimal(param.get("f20")); - otherMoney=otherMoney.add(new BigDecimal(param.get("f21"))); - otherMoney=otherMoney.add(new BigDecimal(param.get("f23"))); - otherMoney=otherMoney.add(new BigDecimal(param.get("f24"))); - - MapreturnValue=new HashMap(); - returnValue.putAll(param); - returnValue.put("MONEY",param.get("otherMoney")); - return returnValue; - } - -} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherFee.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherFee.java new file mode 100644 index 000000000..4a7464197 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherFee.java @@ -0,0 +1,32 @@ +package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan; + +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; + +public class OtherFee implements VoucherJavaParamService{ + + @Override + public Map getJavaParam(JBOTransaction tx, + Map param) throws BusinessException { + MapreturnValue=new HashMap(); + //其他(购置税/保险/GPS/装饰装潢等) + String INSURANCE_PREMIUM=param.get("INSURANCE_PREMIUM"); + String PURCHASE_TAX=param.get("PURCHASE_TAX"); + String INCIDENTAL=param.get("INCIDENTAL"); + String GPS_FEE_FINANCE=param.get("GPS_FEE_FINANCE"); + BigDecimal factmoney=new BigDecimal(INSURANCE_PREMIUM) + .add(new BigDecimal(PURCHASE_TAX)) + .add(new BigDecimal(INCIDENTAL)) + .add(new BigDecimal(GPS_FEE_FINANCE)); + + returnValue.putAll(param); + returnValue.put("MONEY",factmoney.toString()); + return returnValue; + } + +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/SaveMargin.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/SaveMargin.java deleted file mode 100644 index 9bc994407..000000000 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/SaveMargin.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan; - -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; - -public class SaveMargin implements VoucherJavaParamService{ - - @Override - public Map getJavaParam(JBOTransaction tx, - Map param) throws BusinessException { - MapreturnValue=new HashMap(); - returnValue.putAll(param); - return returnValue; - } - -} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/SynthesizeLeaseMoney.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/SynthesizeLeaseMoney.java new file mode 100644 index 000000000..72238cd67 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/SynthesizeLeaseMoney.java @@ -0,0 +1,37 @@ +package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan; + +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 amarsoft + */ +public class SynthesizeLeaseMoney implements VoucherJavaParamService{ + + @Override + public Map getJavaParam(JBOTransaction tx, + Map param) throws BusinessException { + MapreturnValue=new HashMap(); + String EQUIP_AMT=param.get("EQUIP_AMT"); + String FIRST_PAYMENT=param.get("FIRST_PAYMENT"); + BigDecimal factmoney1=new BigDecimal(EQUIP_AMT).subtract(new BigDecimal(FIRST_PAYMENT)); + + String INSURANCE_PREMIUM=param.get("INSURANCE_PREMIUM"); + String PURCHASE_TAX=param.get("PURCHASE_TAX"); + String INCIDENTAL=param.get("INCIDENTAL"); + String GPS_FEE_FINANCE=param.get("GPS_FEE_FINANCE"); + BigDecimal factmoney=factmoney1.add(new BigDecimal(INSURANCE_PREMIUM)) + .add(new BigDecimal(PURCHASE_TAX)) + .add(new BigDecimal(INCIDENTAL)) + .add(new BigDecimal(GPS_FEE_FINANCE)); + returnValue.putAll(param); + returnValue.put("MONEY",factmoney.toString()); + return returnValue; + } + +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java index c6fe0da1e..7d631d4de 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoanDistributor.java @@ -8,17 +8,20 @@ import jbo.voucher.LV_VOUCHER_CONFIG; 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; -public class CreateVoucherLoanDistributor extends BaseBussiness{ - @Override - public Object run(Transaction Sqlca) throws Exception { - this.initBussinessParam(Sqlca); +public class CreateVoucherLoanDistributor { + public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception { + + Transaction Sqlca =null; + Map map=new HashMap(); Map param=new HashMap(); + Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource()); + String MONEY=null; String ACCOUNT_DATE=null; String FACT_DATE=null; @@ -28,27 +31,39 @@ public class CreateVoucherLoanDistributor extends BaseBussiness{ String leas_form=null; String DISTRIBUTOR_ID=null; String DISTRIBUTOR_NAME=null; - - String FlowUnid=this.getAttribute("FlowUnid").toString(); + String CARID=null; + String CARMODEL=null; + String sql=""; + String moneyDataSource=""; param.clear(); map.put("FlowUnid", FlowUnid); - map.put("FEE_TYPE", "feetype10"); - String sql= - " SELECT LFIT.FACT_MONEY AS MONEY,LFIT.ACCOUNTING_DATE AS ACCOUNT_DATE, " - +" LFIT.FACT_DATE,LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER, " - +" LCI.PROJECT_NAME,LCI.LEAS_FORM,LCI.DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME " - +" FROM LC_FUND_INCOME_TEMP LFIT " - +" LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID " - +" LEFT JOIN DISTRIBUTOR_INFO DI ON DI.ID=LCI.DISTRIBUTOR_ID " - +" where LFIT.FEE_TYPE=:FEE_TYPE and LFIT.FLOWUNID=:FlowUnid "; + if("PZ2018070900000002".equals(VOUCHERNO)){ + moneyDataSource="LCCT.EQUIP_AMT"; + } + if("PZ2018070900000003".equals(VOUCHERNO)){ + moneyDataSource="LCCT.FIRST_PAYMENT"; + } + if("PZ2018070900000004".equals(VOUCHERNO)||"PZ2018071000000006".equals(VOUCHERNO)){ + moneyDataSource="LCCT.CAUTION_MONEY"; + } + sql= "SELECT "+moneyDataSource+" AS MONEY,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,LCI.DISTRIBUTOR_ID," + + "DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL FROM LC_CALC_CONDITION_TEMP " + + "LCCT LEFT JOIN LB_CONTRACT_INFO LCI ON LCCT.CONTRACT_ID=LCI.ID LEFT JOIN " + + "DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN " + + "LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID WHERE LCCT.FLOWUNID=:FLOWUNID"; + List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); String VOUCHER_TYPE="1";// 凭证分类 金蝶 String userid ="admin"; for (int i=0;i0){ ACCOUNT_DATE=dataList.get(i).get("ACCOUNT_DATE").toString(); FACT_DATE =dataList.get(i).get("FACT_DATE").toString(); CONTRACT_ID=dataList.get(i).get("CONTRACT_ID").toString(); @@ -57,6 +72,8 @@ public class CreateVoucherLoanDistributor extends BaseBussiness{ leas_form=dataList.get(i).get("LEAS_FORM").toString(); DISTRIBUTOR_ID=dataList.get(i).get("DISTRIBUTOR_ID"); DISTRIBUTOR_NAME=dataList.get(i).get("DISTRIBUTOR_NAME"); + CARID=dataList.get(i).get("CARID"); + CARMODEL=dataList.get(i).get("MODEL"); param.put("FACT_MONEY",MONEY); param.put("ACCOUNT_DATE",ACCOUNT_DATE); @@ -67,16 +84,18 @@ public class CreateVoucherLoanDistributor extends BaseBussiness{ param.put("LEAS_FORM",leas_form); param.put("DISTRIBUTOR_ID",DISTRIBUTOR_ID); param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME); + param.put("CARID",CARID); + param.put("CARMODEL",CARMODEL); param.put("FlowUnid", FlowUnid); map.clear(); map.put("PROJ_TYPE", leas_form); - map.put("MODULAR_NUMBER", "给经销商放款-车款全款"); + map.put("VOUCHER_NO", VOUCHERNO); BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca); if(vouch!=null){ - vs.createVoucher("给经销商放款-车款全款", vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca); - } + vs.createVoucher(vouch.getAttribute("MODULAR_NUMBER").getString(), vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca); + }} } diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/ContractOnhireVoucher.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/ContractOnhireVoucher.java new file mode 100644 index 000000000..54abed9ba --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMethodSettle/ContractOnhireVoucher.java @@ -0,0 +1,18 @@ +package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMethodSettle; + +import com.amarsoft.awe.util.Transaction; +import com.tenwa.flow.baseBussion.BaseBussiness; + +public class ContractOnhireVoucher extends BaseBussiness { + + @Override + public Object run(Transaction Sqlca) throws Exception { + this.initBussinessParam(Sqlca); + String FlowUnid=this.getAttribute("FlowUnid").toString(); + + + + return null; + } + +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMonthSettlement.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMonthSettlement.java new file mode 100644 index 000000000..4926718d8 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherMonthSettlement.java @@ -0,0 +1,113 @@ +package com.tenwa.voucher.CreateVoucherProcess; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; + +import jbo.voucher.LV_VOUCHER_CONFIG; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.JBOException; +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; + +public class CreateVoucherMonthSettlement{ + public void CreateVoucher(String voucherNo) { + Transaction Sqlca =null; + try{ + Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource()); + Map map=new HashMap(); + Map param=new HashMap(); + + String MONEY=null; + String FEEMONEY=null; + String ACCOUNT_DATE=null; + String FACT_DATE=null; + String CONTRACT_ID=null; + String CONTRACT_NUMBER=null; + String PROJECT_NAME=null; + String leas_form=null; + String DISTRIBUTOR_ID=null; + String DISTRIBUTOR_NAME=null; + String CARID=null; + String CARMODEL=null; + param.clear(); + String moneyType=""; + if("PZ2018071200000017".equals(voucherNo)) moneyType="FEEMONEY"; + if("PZ2018071200000016".equals(voucherNo)) moneyType="MONEY"; + String sql="SELECT CRM.INTEREST AS MONEY,CRM.FEE AS FEEMONEY,'2018/07/31' " + + "AS ACCOUNT_DATE,'2018/07/31' AS FACT_DATE,CRM.CONTRACT_ID," + + "LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,LCI.DISTRIBUTOR_ID," + + "DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL FROM CONTRACT_RENT_MONTH " + + "CRM LEFT JOIN LB_CONTRACT_INFO LCI ON CRM.CONTRACT_ID=LCI.ID LEFT JOIN " + + "DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_ID LEFT JOIN " + + "LB_EQUIPMENT_CAR LEC ON LEC.CONTRACT_ID=LCI.ID WHERE CRM.END_DATE='2018/07/31'"; + List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); + + CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); + String VOUCHER_TYPE="1";// 凭证分类 金蝶 + String userid ="admin"; + for (int i=0;i0){ + ACCOUNT_DATE=dataList.get(i).get("ACCOUNT_DATE").toString(); + FACT_DATE =dataList.get(i).get("FACT_DATE").toString(); + CONTRACT_ID=dataList.get(i).get("CONTRACT_ID").toString(); + CONTRACT_NUMBER=dataList.get(i).get("CONTRACT_NUMBER").toString(); + PROJECT_NAME=dataList.get(i).get("PROJECT_NAME").toString(); + leas_form=dataList.get(i).get("LEAS_FORM").toString(); + DISTRIBUTOR_ID=dataList.get(i).get("DISTRIBUTOR_ID"); + DISTRIBUTOR_NAME=dataList.get(i).get("DISTRIBUTOR_NAME"); + CARID=dataList.get(i).get("CARID"); + CARMODEL=dataList.get(i).get("MODEL"); + + param.put("FACT_MONEY",MONEY); + //param.put("FACT_MONEY",FEEMONEY); + param.put("ACCOUNT_DATE",ACCOUNT_DATE); + param.put("FACT_DATE",FACT_DATE); + param.put("CONTRACT_ID",CONTRACT_ID); + param.put("CONTRACT_NUMBER",CONTRACT_NUMBER); + param.put("PROJECT_NAME",PROJECT_NAME); + param.put("LEAS_FORM",leas_form); + param.put("DISTRIBUTOR_ID",DISTRIBUTOR_ID); + param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME); + param.put("CARID",CARID); + param.put("CARMODEL",CARMODEL); + + map.clear(); + map.put("PROJ_TYPE", leas_form); + map.put("VOUCHER_NO",voucherNo); + BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca); + + if(vouch!=null){ + vs.createVoucher(vouch.getAttribute("MODULAR_NUMBER").getString(), vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca); + } + } + if(Sqlca!=null){ + Sqlca.commit(); + }} + }catch (Exception e){ + e.printStackTrace(); + }finally{ + if(Sqlca!=null){ + try { + Sqlca.disConnect(); + } catch (JBOException e) { + e.printStackTrace(); + } + Sqlca = null; + } + } + } +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveDealerMargin.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveDealerMargin.java deleted file mode 100644 index 6d4d8a6b0..000000000 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveDealerMargin.java +++ /dev/null @@ -1,68 +0,0 @@ -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.are.jbo.BizObject; -import com.amarsoft.awe.util.Transaction; -import com.tenwa.comm.util.jboutil.DataOperatorUtil; -import com.tenwa.flow.baseBussion.BaseBussiness; -import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl; - -public class CreateVoucherReceiveDealerMargin extends BaseBussiness{ - @Override - public Object run(Transaction Sqlca) throws Exception { - this.initBussinessParam(Sqlca); - - Map map=new HashMap(); - Map param=new HashMap(); - String MONEY=null; - String ACCOUNTING_DATE=null; - String FACT_DATE=null; - String LEAS_FORM=null; - String DISTRIBUTOR_NO=null; - String DISTRIBUTOR_NAME=null; - String FlowUnid=this.getAttribute("FlowUnid").toString(); - map.put("FlowUnid", FlowUnid); - String sql="SELECT DDIT.CAUTION_MONEY AS MONEY,DDIT.COLLECT_TIME AS ACCOUNTING_DATE," - + "DDIT.COLLECT_TIME AS FACT_DATE ,'02' AS LEAS_FORM ,DIF.DISTRIBUTOR_NO," - + "DIF.DISTRIBUTOR_NAME FROM D_DEPOSITCHARGE_INFO_TEMP DDIT LEFT JOIN " - + "DISTRIBUTOR_INFO DIF ON DDIT.DISTRIBUTOR_ID=DIF.ID WHERE DDIT.FLOWUNID=:FLOWUNID"; - List> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map); - - CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl(); - String VOUCHER_TYPE="1";// 凭证分类 金蝶 - String userid ="admin"; - - for(Map ma:dataList){ - MONEY=ma.get("MONEY"); - ACCOUNTING_DATE=ma.get("ACCOUNTING_DATE"); - FACT_DATE=ma.get("FACT_DATE"); - LEAS_FORM=ma.get("LEAS_FORM"); - DISTRIBUTOR_NO=ma.get("DISTRIBUTOR_NO"); - DISTRIBUTOR_NAME=ma.get("DISTRIBUTOR_NAME"); - - param.put("MONEY", MONEY); - param.put("ACCOUNT_DATE", ACCOUNTING_DATE); - param.put("FACT_DATE", FACT_DATE); - param.put("LEAS_FORM", LEAS_FORM); - param.put("DISTRIBUTOR_NO", DISTRIBUTOR_NO); - param.put("DISTRIBUTOR_NAME", DISTRIBUTOR_NAME); - - map.clear(); - map.put("PROJ_TYPE", LEAS_FORM); - map.put("MODULAR_NUMBER", "记录经销商保证金"); - BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca); - - /*if(vouch!=null){ - vs.createVoucher("记录经销商保证金", vouch.getAttribute("OWNED_COMPANY").getString(), LEAS_FORM, VOUCHER_TYPE, userid,param, Sqlca); - }*/ - } - return "true"; - } - - -} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveMargin.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveMargin.java deleted file mode 100644 index f784d6b3d..000000000 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveMargin.java +++ /dev/null @@ -1,98 +0,0 @@ -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.are.jbo.BizObject; -import com.amarsoft.awe.util.Transaction; -import com.tenwa.comm.util.jboutil.DataOperatorUtil; -import com.tenwa.flow.baseBussion.BaseBussiness; -import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl; - -public class CreateVoucherReceiveMargin extends BaseBussiness{ - @Override - public Object run(Transaction Sqlca) throws Exception { - this.initBussinessParam(Sqlca); - Map map=new HashMap(); - Map param=new HashMap(); - - String ACCOUNT_DATE=null; - String FACT_DATE=null; - String CONTRACT_ID=null; - String CONTRACT_NUMBER=null; - String PROJECT_NAME=null; - String leas_form=null; - String ORGNAME=null; - String ORGID=null; - String MONEY=null; - String ACCOUNTNO=null; - String CUSTOMERID=null; - String CUSTOMERNAME=null; - String FlowUnid=this.getAttribute("FlowUnid").toString(); - param.clear(); - map.put("FlowUnid", FlowUnid); - map.put("FEE_TYPE", "feetype2"); - String sql= - " SELECT LFIT.FACT_MONEY AS MONEY,LFIT.ACCOUNTING_DATE AS ACCOUNT_DATE, " - +" LFIT.FACT_DATE,LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER, " - +" LCI.PROJECT_NAME,LCI.LEAS_FORM,IFNULL(LFIT.acc_number,'000000000000000') as ACCOUNTNO, " - +" ORG.ORGNAME,ORG.ORGID,LESS.CUSTOMER_ID as CUSTOMERID,LESS.CUSTOMER_NAME AS CUSTOMERNAME " - +" FROM LC_FUND_INCOME_TEMP LFIT " - +" LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID " - +" LEFT JOIN ORG_INFO ORG ON ORG.ORGID=LCI.PROJECT_DEPT " - +" LEFT JOIN LB_UNION_LESSEE LESS ON LESS.CONTRACT_ID=LCI.ID " - +" where LFIT.FEE_TYPE=:FEE_TYPE and LFIT.FLOWUNID=:FlowUnid "; - 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(); + String ACC_BANK=param.get("ACC_BANK"); + String ACC_NUMBER=param.get("ACC_NUMBER"); + String BANK_NAME=param.get("BANK_NAME"); + returnValue.put("ACC_BANK",ACC_BANK); + returnValue.put("ACC_NUMBER",ACC_NUMBER); + returnValue.put("BANK_NAME",BANK_NAME); + return returnValue; +} +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractCar.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractCar.java new file mode 100644 index 000000000..19225a94e --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractCar.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo; + +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; + +public class auxiliaryContractCar implements VoucherJavaParamService { + +@Override +public Map getJavaParam(JBOTransaction tx, + Map param) throws BusinessException { + MapreturnValue=new HashMap(); + String CARID=param.get("CARID"); + String CARMODEL=param.get("CARMODEL"); + returnValue.put("CARID",CARID); + returnValue.put("CARMODEL",CARMODEL); + return returnValue; +} +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractCustomer.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractCustomer.java new file mode 100644 index 000000000..ad7c4c622 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractCustomer.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo; + +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; + +public class auxiliaryContractCustomer implements VoucherJavaParamService { + +@Override +public Map getJavaParam(JBOTransaction tx, + Map param) throws BusinessException { + MapreturnValue=new HashMap(); + String DISTRIBUTOR_ID=param.get("DISTRIBUTOR_ID"); + String DISTRIBUTOR_NAME=param.get("DISTRIBUTOR_NAME"); + returnValue.put("DISTRIBUTOR_ID",DISTRIBUTOR_ID); + returnValue.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME); + return returnValue; +} +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractFactDate.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractFactDate.java new file mode 100644 index 000000000..641d5b1e9 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractFactDate.java @@ -0,0 +1,20 @@ +package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo; + +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; + +public class auxiliaryContractFactDate implements VoucherJavaParamService { + +@Override +public Map getJavaParam(JBOTransaction tx, + Map param) throws BusinessException { + MapreturnValue=new HashMap(); + String FACT_DATE=param.get("FACT_DATE"); + returnValue.put("FACT_DATE",FACT_DATE); + return returnValue; +} +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractNumber.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractNumber.java new file mode 100644 index 000000000..b7c54a77a --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractNumber.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo; + +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; + +public class auxiliaryContractNumber implements VoucherJavaParamService { + +@Override +public Map getJavaParam(JBOTransaction tx, + Map param) throws BusinessException { + MapreturnValue=new HashMap(); + String CONTRACT_NUMBER=param.get("CONTRACT_NUMBER"); + String PROJECT_NAME=param.get("PROJECT_NAME"); + returnValue.put("CONTRACT_NUMBER",CONTRACT_NUMBER); + returnValue.put("PROJECT_NAME",PROJECT_NAME); + return returnValue; +} +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractOrg.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractOrg.java new file mode 100644 index 000000000..708fbfb7a --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractOrg.java @@ -0,0 +1,22 @@ +package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo; + +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; + +public class auxiliaryContractOrg implements VoucherJavaParamService { + +@Override +public Map getJavaParam(JBOTransaction tx, + Map param) throws BusinessException { + MapreturnValue=new HashMap(); + String ORGID=param.get("ORGID"); + String ORGNAME=param.get("ORGNAME"); + returnValue.put("ORGID",ORGID); + returnValue.put("ORGNAME",ORGNAME); + return returnValue; +} +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractPlanList.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractPlanList.java new file mode 100644 index 000000000..cf91e2c63 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractPlanList.java @@ -0,0 +1,21 @@ +package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo; + +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; + +public class auxiliaryContractPlanList implements VoucherJavaParamService { + +@Override +public Map getJavaParam(JBOTransaction tx, + Map param) throws BusinessException { + MapreturnValue=new HashMap(); + String PLAN_LIST=param.get("PLAN_LIST"); + returnValue.put("PLAN_LIST",PLAN_LIST); + + return returnValue; +} +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractStartNum.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractStartNum.java new file mode 100644 index 000000000..bd02aef7a --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/auxiliaryInfo/auxiliaryContractStartNum.java @@ -0,0 +1,20 @@ +package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo; + +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; + +public class auxiliaryContractStartNum implements VoucherJavaParamService { + +@Override +public Map getJavaParam(JBOTransaction tx, + Map param) throws BusinessException { + MapreturnValue=new HashMap(); + String CONSTARTNUM=param.get("CONSTARTNUM"); + returnValue.put("CONSTARTNUM",CONSTARTNUM); + return returnValue; +} +} diff --git a/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java b/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java index a7fcb7955..229c58c83 100644 --- a/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java +++ b/src_core/com/tenwa/voucher/serviceImp/CreateVoucherServiceImpl.java @@ -228,7 +228,7 @@ public class CreateVoucherServiceImpl { Map dataTemp=new HashMap(); VoucherParamServiceImpl psi=new VoucherParamServiceImpl(); //获取数据 - if("1".equals(bo.getAttribute("IS_CUSTOM_VALUE").getString())){ + if("1".equals(bo.getAttribute("IS_CUSTOM_VALUE").getString())){//是否自定义取值 VoucherJavaParamService ps=null; try{ Class c=(Class)Class.forName(bo.getAttribute("VALUE_MODE").getString()); diff --git a/src_core/com/tenwa/voucher/serviceImp/VoucherToV8Impl.java b/src_core/com/tenwa/voucher/serviceImp/VoucherToV8Impl.java index 47e00d5ab..a05ef6c8b 100644 --- a/src_core/com/tenwa/voucher/serviceImp/VoucherToV8Impl.java +++ b/src_core/com/tenwa/voucher/serviceImp/VoucherToV8Impl.java @@ -122,6 +122,12 @@ public class VoucherToV8Impl implements VoucherService { d.put("F12", user.getAttribute("username").getString());//制单人 d.put("F59", i+1+""); d.put("F62",list.get(i).get("F6")); + + d.put("F60",list.get(i).get("CONTRACT_NUMBER")); + d.put("F61",list.get(i).get("PROJECT_NAME")); + d.put("F66",list.get(i).get("DISTRIBUTOR_NAME")); + d.put("F64",list.get(i).get("CARMODEL")); + d.put("inputuserid",user.getAttribute("userid").getString()); d.put("v8_status",status); d.put("v8_flag",eas_flag); diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherMonthSettlementMission.java b/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherMonthSettlementMission.java new file mode 100644 index 000000000..c0a7320b5 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherMonthSettlementMission.java @@ -0,0 +1,17 @@ +package com.tenwa.lease.app.quartzmession; + +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMonthSettlement; + +public class CreateVoucherMonthSettlementMission implements Job { + + @Override + public void execute(JobExecutionContext arg0) throws JobExecutionException { + CreateVoucherMonthSettlement vouchermanage=new CreateVoucherMonthSettlement(); + vouchermanage.CreateVoucher("PZ2018071200000017"); + vouchermanage.CreateVoucher("PZ2018071200000016"); + } + +}