凭证
This commit is contained in:
parent
4acbc37ee8
commit
523ed5c1d7
@ -0,0 +1,19 @@
|
||||
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 AccountsPay 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;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
|
||||
|
||||
public class FinancialLeasCar {
|
||||
|
||||
}
|
||||
@ -0,0 +1,133 @@
|
||||
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.leasing.serviceImpl.voucher.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 CONSTARTNUM=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", "feetype16");
|
||||
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,nvl(LFIT.acc_number,'122905168210604') as ACCOUNTNO,CASE WHEN LCI.CONSTARTNUM IS NULL THEN '000000000000' ELSE LCI.CONSTARTNUM END AS CONSTARTNUM, "
|
||||
+" 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();
|
||||
CONSTARTNUM=dataList.get(i).get("CONSTARTNUM").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("CONSTARTNUM",CONSTARTNUM);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
// 租金部分
|
||||
map.clear();
|
||||
map.put("FlowUnid", FlowUnid);
|
||||
String rentIncomeSql="select ID,PLAN_ID,RENT,CORPUS,INTEREST,nvl(PENALTY,'0.00') as PENALTY,HIRE_DATE as FACT_DATE,ACCOUNTING_DATE as ACCOUNT_DATE,CONTRACT_ID,PLAN_LIST, "
|
||||
+ "own_number as ACCOUNTNO from LC_RENT_INCOME_TEMP where FLOWUNID=:FlowUnid ";
|
||||
List<Map<String,String>> RentdataList=DataOperatorUtil.getDataBySql(Sqlca, rentIncomeSql, map);
|
||||
|
||||
for (int i=0;i<RentdataList.size();i++){
|
||||
String ID=RentdataList.get(i).get("ID").toString();
|
||||
String PLAN_ID=RentdataList.get(i).get("PLAN_ID").toString();
|
||||
String RENT=RentdataList.get(i).get("RENT").toString();
|
||||
String CORPUS=RentdataList.get(i).get("CORPUS").toString();
|
||||
String INTEREST=RentdataList.get(i).get("INTEREST").toString();
|
||||
String PENALTY=RentdataList.get(i).get("PENALTY").toString();
|
||||
String PLAN_LIST=RentdataList.get(i).get("PLAN_LIST").toString();
|
||||
CONTRACT_ID=RentdataList.get(i).get("CONTRACT_ID").toString();
|
||||
String ACCOUNTNORent=RentdataList.get(i).get("ACCOUNTNO").toString();
|
||||
param.put("ID",ID);
|
||||
param.put("PLAN_ID",PLAN_ID);
|
||||
param.put("RENT", RENT);
|
||||
param.put("CORPUS",CORPUS);
|
||||
param.put("INTEREST",INTEREST);
|
||||
param.put("PENALTY",PENALTY);
|
||||
param.put("FACT_DATE",FACT_DATE);
|
||||
param.put("ACCOUNT_DATE", ACCOUNT_DATE);
|
||||
param.put("ACCOUNTNO", ACCOUNTNORent);
|
||||
|
||||
//createVoucherRentIncome createVoucherRentIncome=new createVoucherRentIncome();
|
||||
String Vparams=ID+","+PLAN_ID+","+RENT+","+CORPUS+","+INTEREST+","+PENALTY+","+CONTRACT_ID+","+FACT_DATE+","+ACCOUNT_DATE+","+"admin"+","+PLAN_LIST;
|
||||
//createVoucherRentIncome.setVparams(Vparams);
|
||||
//createVoucherRentIncome.createVoucher(Sqlca);
|
||||
|
||||
}
|
||||
if(Sqlca!=null){
|
||||
Sqlca.commit();
|
||||
}
|
||||
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user