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