凭证相关

This commit is contained in:
amarsoft 2018-08-03 09:23:15 +08:00
parent 4c43b37620
commit 098474e881
9 changed files with 194 additions and 14 deletions

View File

@ -29,6 +29,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
String PURCHASE_TAX=null;
String INCIDENTAL=null;
String GPS_FEE_FINANCE=null;
String TABLEWARE_FEE=null;
String INTEREST=null;
String INTERESTNOTAX=null;
String TAX=null;
@ -49,7 +50,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
//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,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION LCCT inner join lc_fund_income_temp lfit on lfit.contract_id=lcct.contract_id and lfit.fee_type='feetype10' 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 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 WHERE lfit.FLOWUNID=:FLOWUNID";
String sql="SELECT LCCT.EQUIP_AMT,LCCT.FIRST_PAYMENT,LCCT.CLEAN_LEASE_MONEY,LCCT.INSURANCE_PREMIUM,LCCT.PURCHASE_TAX,LCCT.INCIDENTAL,LCCT.GPS_FEE as GPS_FEE_FINANCE,LCCT.TABLEWARE_FEE,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,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION LCCT inner join (SELECT contract_id,FLOWUNID 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=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 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 WHERE lfit.FLOWUNID=:FLOWUNID";
param.clear();
map.put("FLOWUNID", FlowUnid);
@ -66,6 +67,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
PURCHASE_TAX=dataList.get(i).get("PURCHASE_TAX").toString();
INCIDENTAL=dataList.get(i).get("INCIDENTAL").toString();
GPS_FEE_FINANCE=dataList.get(i).get("GPS_FEE_FINANCE");
TABLEWARE_FEE=dataList.get(i).get("TABLEWARE_FEE");
INTEREST=dataList.get(i).get("INTEREST").toString();
INTERESTNOTAX=dataList.get(i).get("INTERESTNOTAX").toString();
TAX=dataList.get(i).get("TAX").toString();
@ -94,6 +96,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
param.put("PURCHASE_TAX",PURCHASE_TAX);
param.put("INCIDENTAL",INCIDENTAL);
param.put("GPS_FEE_FINANCE",GPS_FEE_FINANCE);
param.put("TABLEWARE_FEE",TABLEWARE_FEE);
param.put("INTEREST",INTEREST);
param.put("INTERESTNOTAX",INTERESTNOTAX);
param.put("TAX",TAX);

View File

@ -87,8 +87,8 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME);
param.put("CARID",CARID);
param.put("CARMODEL",CARMODEL);
param.put("CUSTID",CUSTID);
param.put("CUSTNAME",CUSTNAME);
param.put("CUSTID",DISTRIBUTOR_ID);
param.put("CUSTNAME",DISTRIBUTOR_NAME);
param.put("CUSTOMERTYPE",CUSTOMERTYPE);
param.put("BUSINESSTYPE",BUSINESSTYPE);

View File

@ -7,15 +7,14 @@ import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
public class AccountPayLend implements VoucherJavaParamService{
public class FundGPSFee 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);
//f10:났운-看마운
returnValue.put("MONEY",param.get("f10"));
returnValue.put("MONEY",param.get("GPS_FEE_FINANCE"));
return returnValue;
}

View File

@ -18,11 +18,11 @@ public class OtherFee implements VoucherJavaParamService{
String INSURANCE_PREMIUM=param.get("INSURANCE_PREMIUM")==null?"0.00":param.get("INSURANCE_PREMIUM");
String PURCHASE_TAX=param.get("PURCHASE_TAX")==null?"0.00":param.get("PURCHASE_TAX");
String INCIDENTAL=param.get("INCIDENTAL")==null?"0.00":param.get("INCIDENTAL");
String GPS_FEE_FINANCE=param.get("GPS_FEE_FINANCE")==null?"0.00":param.get("GPS_FEE_FINANCE");
String TABLEWARE_FEE=param.get("TABLEWARE_FEE")==null?"0.00":param.get("TABLEWARE_FEE");
BigDecimal factmoney=new BigDecimal(INSURANCE_PREMIUM)
.add(new BigDecimal(PURCHASE_TAX))
.add(new BigDecimal(INCIDENTAL))
.add(new BigDecimal(GPS_FEE_FINANCE));
.add(new BigDecimal(TABLEWARE_FEE));
returnValue.putAll(param);
returnValue.put("FUNDTYPE","01");

View File

@ -54,10 +54,17 @@ public class CreateVoucherLoanDistributor {
if("PZ2018070900000004".equals(VOUCHERNO)||"PZ2018071000000006".equals(VOUCHERNO)){
moneyDataSource="LCCT.CAUTION_MONEY";
}
if("PZ2018073100000061".equals(VOUCHERNO)){
moneyDataSource="LCCT.GPS_FEE";
}
if("PZ2018073100000062".equals(VOUCHERNO)){
moneyDataSource="(LCCT.PURCHASE_TAX+LCCT.INSURANCE_PREMIUM+LCCT.INCIDENTAL+LCCT.TABLEWARE_FEE)";
}
//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,CIF.CUSTOMERID,CIF.CUSTOMERNAME 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 LEFT JOIN lb_union_lessee lul ON lul.contract_id=lci.id LEFT JOIN customer_info cif ON cif.customerid=lul.customer_id WHERE LCCT.FLOWUNID=:FLOWUNID";
sql="SELECT "+moneyDataSource+ " AS MONEY,ROUND("+moneyDataSource+ "/1.06,2) AS MONEYNOTAX, ("+moneyDataSource+ "-ROUND("+moneyDataSource+ "/1.06,2)) AS MONEYTAX,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 DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION LCCT INNER JOIN lc_fund_income_temp lfit ON lfit.contract_id=lcct.contract_id AND lfit.fee_type='feetype10' 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 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 WHERE lfit.FLOWUNID=:FLOWUNID";
sql="SELECT "+moneyDataSource+ " AS MONEY,ROUND("+moneyDataSource+ "/1.06,2) AS MONEYNOTAX, ("+moneyDataSource+ "-ROUND("+moneyDataSource+ "/1.06,2)) AS MONEYTAX,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 DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_CALC_CONDITION LCCT INNER JOIN (select contract_id,FLOWUNID 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 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 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 WHERE lfit.FLOWUNID=:FLOWUNID";
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl();
String VOUCHER_TYPE="1";// ƾ֤·ÖÀà ½ðµû
String userid ="admin";
@ -96,8 +103,12 @@ public class CreateVoucherLoanDistributor {
param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME);
param.put("CARID",CARID);
param.put("CARMODEL",CARMODEL);
param.put("CUSTID",CUSTID);
param.put("CUSTNAME",CUSTNAME);
param.put("CUSTID",DISTRIBUTOR_ID);
param.put("CUSTNAME",DISTRIBUTOR_NAME);
/*if("PZ2018070900000002".equals(VOUCHERNO)||"PZ2018072400000060".equals(VOUCHERNO)){
param.put("CUSTID",CUSTID);
param.put("CUSTNAME",CUSTNAME);
}*/
param.put("CUSTOMERTYPE",CUSTOMERTYPE);
param.put("BUSINESSTYPE",BUSINESSTYPE);

View File

@ -19,6 +19,8 @@ public class ContractOnhireVoucher extends BaseBussiness {
cvld.CreateVoucher(FlowUnid, "PZ2018070900000003");//经销商支付的预付款(首付)
cvld.CreateVoucher(FlowUnid, "PZ2018070900000004");//记录保证金合同结束后要退回给客户或者冲抵其他款项
cvld.CreateVoucher(FlowUnid, "PZ2018071000000006");//给经销商放款冲抵客户保证金
cvld.CreateVoucher(FlowUnid, "PZ2018073100000062");//¹ºÖÃ˰+±£ÏÕ+×°ÊÎ
cvld.CreateVoucher(FlowUnid, "PZ2018073100000061");//GPS
CreateVoucherCustomerRentOrFee cvcr=new CreateVoucherCustomerRentOrFee();
cvcr.CreateVoucher(FlowUnid, "PZ2018071000000005");//客户支付的应收账款总金额

View File

@ -17,8 +17,7 @@ public class IncomeVoucher extends BaseBussiness {
cvci.CreateVoucher(FlowUnid, "PZ2018072100000023", "feetype1");//按月分摊的保证金
cvci.CreateVoucher(FlowUnid, "PZ2018072100000031", "feetype4");//都到留购价款
cvci.CreateVoucher(FlowUnid, "PZ2018072100000028", "feetype27");//贴息
cvci.CreateVoucher(FlowUnid, "PZ2018073100000062", null);//¹ºÖÃ˰+±£ÏÕ+×°ÊÎ
cvci.CreateVoucher(FlowUnid, "PZ2018073100000061", "feetype24");//GPS
/*CreateVoucherRentIncome cvri=new CreateVoucherRentIncome();
cvri.CreateVoucher(FlowUnid, "PZ2018072100000024");//收到租金

View File

@ -0,0 +1,30 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMethodSettle;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherCustCautionMoneyIncome;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherRedRentIncome;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherRentIncome;
public class RedIncomeVoucher extends BaseBussiness {
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String FlowUnid=this.getAttribute("FlowUnid").toString();
/***
* 回款反冲的凭证生成
*/
CreateVoucherCustCautionMoneyIncome cvci=new CreateVoucherCustCautionMoneyIncome();
cvci.CreateVoucher(FlowUnid, "PZ2018072100000034", "feetype2");//收到客户保证金
cvci.CreateVoucher(FlowUnid, "PZ2018072100000036", "feetype1");//按月分摊的保证金
cvci.CreateVoucher(FlowUnid, "PZ2018072100000043", "feetype4");//都到留购价款
cvci.CreateVoucher(FlowUnid, "PZ2018072100000041", "feetype27");//贴息
CreateVoucherRedRentIncome cvri=new CreateVoucherRedRentIncome();
cvri.CreateVoucher(FlowUnid, "PZ2018072100000037");//收到租金
cvri.CreateVoucher(FlowUnid, "PZ2018072100000038");//收到逾期利息
return "true";
}
}

View File

@ -0,0 +1,136 @@
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.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.voucher.serviceImp.CreateVoucherServiceImpl;
public class CreateVoucherRedRentIncome {
public void CreateVoucher(String FlowUnid,String VOUCHERNO){
Transaction Sqlca =null;
try{
Map<String,String> map=new HashMap<String, String>();
Map<String,String> param=new HashMap<String, String>();
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
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 DISTRIBUTOR_ID=null;
String DISTRIBUTOR_NAME=null;
String CARID=null;
String CARMODEL=null;
String CUSTID=null;
String CUSTNAME=null;
String CUSTOMERTYPE=null;
String BUSINESSTYPE=null;
String sql="";
param.clear();
map.clear();
map.put("FLOWUNID", FlowUnid);
if("PZ2018072100000037".equals(VOUCHERNO)){
sql= "SELECT LRIT.rent AS MONEY,0 AS MONEYNOTAX,0 AS MONEYTAX, DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME_temp LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.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 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 WHERE LrIT.FLOWUNID=:FLOWUNID";
}
if("PZ2018072100000038".equals(VOUCHERNO)){
sql= "SELECT LrIT.penalty AS MONEY,ROUND(LrIT.penalty/1.06,2) AS MONEYNOTAX,LrIT.penalty-ROUND(LrIT.penalty/1.06,2) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LrIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LrIT.FLOWUNID,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_rent_INCOME_temp LrIT LEFT JOIN LB_CONTRACT_INFO LCI ON LrIT.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 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 WHERE LrIT.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++){
MONEY=dataList.get(i).get("MONEY").toString();
if("".equals(MONEY)||MONEY==null) MONEY="0.00";
double mon=Double.parseDouble(MONEY);
if(Math.abs(mon)>0){
MONEYNOTAX=dataList.get(i).get("MONEYNOTAX").toString();
MONEYTAX=dataList.get(i).get("MONEYTAX").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();
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");
CUSTID=dataList.get(i).get("CUSTOMERID");
CUSTNAME=dataList.get(i).get("CUSTOMERNAME");
CUSTOMERTYPE=dataList.get(i).get("CUSTOMERTYPE");
BUSINESSTYPE=dataList.get(i).get("BUSINESSTYPE");
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("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("CUSTID",CUSTID);
param.put("CUSTNAME",CUSTNAME);
param.put("CUSTOMERTYPE",CUSTOMERTYPE);
param.put("BUSINESSTYPE",BUSINESSTYPE);
if("1".equals(BUSINESSTYPE)){
param.put("LEASFORMASSET", "04"); // 融资租赁资产
param.put("DEPT", "02"); // 部门
if("03".equals(CUSTOMERTYPE)){ // 如果是个人业务
param.put("LEASINCOMEFORM", "02"); // C端
}else if("01".equals(CUSTOMERTYPE)){
param.put("LEASINCOMEFORM", "01"); // B端
}
}
//param.put("FUNDTYPE", ""); // 主营类型
param.put("BUSINESSTYPE", "06");
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;
}
}
}
}