放款凭证

This commit is contained in:
liuzhao 2018-06-24 11:23:40 +08:00
parent 8195bbd2b1
commit 3f182f8bfa
2 changed files with 115 additions and 1 deletions

View File

@ -1,5 +1,21 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
public class FinancialLeasCar {
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 FinancialLeasCar implements VoucherJavaParamService{
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
returnValue.putAll(param);
returnValue.put("MONEY",param.get("FACT_MONEY"));
return returnValue;
}
}

View File

@ -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 CreateVoucherLoanDistributor extends BaseBussiness{
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
Map<String,String> map=new HashMap<String, String>();
Map<String,String> param=new HashMap<String, String>();
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", "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,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<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl();
String VOUCHER_TYPE="1";// 凭证分类 金蝶
String userid ="admin";
for (int i=0;i<dataList.size();i++){
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");
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("FlowUnid", FlowUnid);
param.put("CUSTOMERID",CUSTOMERID);
param.put("CUSTOMERNAME",CUSTOMERNAME);
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);
}
}
if(Sqlca!=null){
Sqlca.commit();
}
String sMessage="true";
return new Exception();
}
}