From a6d5138d83d33e654e80338fb1d8987a81657d63 Mon Sep 17 00:00:00 2001 From: liuzhao Date: Mon, 2 Jul 2018 13:09:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=AD=E8=AF=81=EF=BC=9A=E6=94=B6=E5=88=B0?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=BF=9D=E8=AF=81=E9=87=91=E5=92=8C=E7=BB=8F?= =?UTF-8?q?=E9=94=80=E5=95=86=E9=A6=96=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CreateVoucherDownPay.java | 98 +++++++++++++++++++ .../CreateVoucherLoan/AccountsPayFirst.java | 21 ++++ .../CreateVoucherLoan/AccountsRecieve.java | 21 ++++ .../CreateVoucherLoan/BankReceipt.java | 21 ++++ .../CreateVoucherLoan/OtherReceiveMargin.java | 21 ++++ .../CreateVoucherReceiveMargin.java | 98 +++++++++++++++++++ 6 files changed, 280 insertions(+) create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherDownPay.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/AccountsPayFirst.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/AccountsRecieve.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/BankReceipt.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherReceiveMargin.java create mode 100644 src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveMargin.java diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherDownPay.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherDownPay.java new file mode 100644 index 000000000..49f402d18 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherDownPay.java @@ -0,0 +1,98 @@ +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 CreateVoucherDownPay 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", "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 "; + 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); + returnValue.put("MONEY",param.get("FACT_MONEY")); + return returnValue; + } + +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/AccountsRecieve.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/AccountsRecieve.java new file mode 100644 index 000000000..558e57592 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/AccountsRecieve.java @@ -0,0 +1,21 @@ +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 AccountsRecieve 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")); + return returnValue; + } + +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/BankReceipt.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/BankReceipt.java new file mode 100644 index 000000000..7f6610e18 --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/BankReceipt.java @@ -0,0 +1,21 @@ +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 BankReceipt 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")); + return returnValue; + } + +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherReceiveMargin.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherReceiveMargin.java new file mode 100644 index 000000000..1ff7e808d --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherLoan/OtherReceiveMargin.java @@ -0,0 +1,21 @@ +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 OtherReceiveMargin 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")); + return returnValue; + } + +} diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveMargin.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveMargin.java new file mode 100644 index 000000000..f784d6b3d --- /dev/null +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CreateVoucherReceiveMargin.java @@ -0,0 +1,98 @@ +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