凭证相关

This commit is contained in:
amarsoft 2018-07-21 10:58:55 +08:00
parent 88c4140902
commit c296f995eb
32 changed files with 754 additions and 431 deletions

View File

@ -9,7 +9,7 @@
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(10);
dwTemp.setPageSize(50);
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格

View File

@ -54,7 +54,7 @@
var customerType=sReturn[4];
var customerId=sReturn[5];
var contractNumber=sReturn[6];
var param="contractId="+contractId+",productId="+productId+",product_Name="+product_Name+",projectId="+projectId+",customerType="+customerType+",customerId="+customerId+",contractNumber="+contractNumber;
var param="ContractId="+contractId+",productId="+productId+",product_Name="+product_Name+",projectId="+projectId+",CustomerType="+customerType+",customerId="+customerId+",contractNumber="+contractNumber;
var sParams =param+",ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",sParams);
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return;

View File

@ -76,7 +76,7 @@
<class name="LV_VOUCHER_CONFIG" label="凭证配置" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="MODULAR_NUMBER" label="模块编号" type="STRING" length="32"/>
<attribute name="MODULAR_NUMBER" label="模块编号" type="STRING" length="200"/>
<attribute name="OWNED_COMPANY" label="所属公司" type="STRING" length="200"/>
<attribute name="PROJ_TYPE" label="项目类型" type="STRING" length="32"/>
<attribute name="INIT_CLASS" label="初始化类" type="STRING" length="1000"/>

View File

@ -12,79 +12,85 @@ import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl;
public class CreateVoucherBackDealerMargin extends BaseBussiness{
public class CreateVoucherCustCautionMoneyIncome 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 MONEY=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 ORGNAME=null;
String ORGID=null;
String MONEY=null;
String ACCOUNTNO=null;
String CUSTOMERID=null;
String CUSTOMERNAME=null;
String DISTRIBUTOR_ID=null;
String DISTRIBUTOR_NAME=null;
String CARID=null;
String CARMODEL=null;
String FlowUnid=this.getAttribute("FlowUnid").toString();
String sql="";
String VOUCHERNO=this.getAttribute("VoucherNo").toString();
String FeeType=this.getAttribute("FeeType").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 ";
map.put("FEE_TYPE", FeeType);
sql= "SELECT LFIT.FACT_MONEY AS MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') "
+ "AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,"
+ "LFIT.CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,"
+ "LCI.DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL "
+ "FROM LC_FUND_INCOME_TEMP LFIT LEFT JOIN LB_CONTRACT_INFO LCI "
+ "ON LFIT.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 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++){
MONEY=dataList.get(i).get("MONEY").toString();
if("".equals(MONEY)||MONEY==null) MONEY="0.00";
double mon=Double.parseDouble(MONEY);
if(mon>0){
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");
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");
param.put("FACT_MONEY",MONEY);
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("DISTRIBUTOR_ID",DISTRIBUTOR_ID);
param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME);
param.put("CARID",CARID);
param.put("CARMODEL",CARMODEL);
param.put("FlowUnid", FlowUnid);
param.put("CUSTOMERID",CUSTOMERID);
param.put("CUSTOMERNAME",CUSTOMERNAME);
map.clear();
map.put("PROJ_TYPE", leas_form);
map.put("MODULAR_NUMBER", "쒔饋<EFBFBD>連마돨渡마운(看마)");
map.put("VOUCHER_NO", VOUCHERNO);
BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca);
if(vouch!=null){
vs.createVoucher("쒔饋<EFBFBD>連마돨渡마운(看마)", vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca);
}
vs.createVoucher(vouch.getAttribute("MODULAR_NUMBER").getString(), vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca);
}}
}

View File

@ -0,0 +1,130 @@
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 CreateVoucherCustomerRentOrFee 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 EQUIP_AMT=null;
String FIRST_PAYMENT=null;
String CLEAN_LEASE_MONEY=null;
String INSURANCE_PREMIUM=null;
String PURCHASE_TAX=null;
String INCIDENTAL=null;
String GPS_FEE_FINANCE=null;
String INTEREST=null;
String INTERESTNOTAX=null;
String TAX=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 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,LCI.DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,"
+ "LEC.ID AS CARID,LEC.MODEL FROM LC_CALC_CONDITION_TEMP LCCT 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 WHERE LCCT.FLOWUNID=:FLOWUNID";
param.clear();
map.put("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++){
EQUIP_AMT=dataList.get(i).get("EQUIP_AMT").toString();
FIRST_PAYMENT=dataList.get(i).get("FIRST_PAYMENT").toString();
CLEAN_LEASE_MONEY=dataList.get(i).get("CLEAN_LEASE_MONEY").toString();
INSURANCE_PREMIUM=dataList.get(i).get("INSURANCE_PREMIUM").toString();
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");
INTEREST=dataList.get(i).get("INTEREST").toString();
INTERESTNOTAX=dataList.get(i).get("INTERESTNOTAX").toString();
TAX=dataList.get(i).get("TAX").toString();
if("".equals(GPS_FEE_FINANCE)||GPS_FEE_FINANCE==null) GPS_FEE_FINANCE="0.00";
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");
param.put("EQUIP_AMT",EQUIP_AMT);
param.put("FIRST_PAYMENT",FIRST_PAYMENT);
param.put("FACT_MONEY",CLEAN_LEASE_MONEY);
param.put("INSURANCE_PREMIUM",INSURANCE_PREMIUM);
param.put("PURCHASE_TAX",PURCHASE_TAX);
param.put("INCIDENTAL",INCIDENTAL);
param.put("GPS_FEE_FINANCE",GPS_FEE_FINANCE);
param.put("INTEREST",INTEREST);
param.put("INTERESTNOTAX",INTERESTNOTAX);
param.put("TAX",TAX);
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("FlowUnid", FlowUnid);
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();
}
String sMessage="true";
return sMessage;
}
}

View File

@ -0,0 +1,84 @@
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;
/***
* 经销商的保证金的收取和退回
* @author amarsoft
*
*/
public class CreateVoucherDistCautionMoneyRe 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 MONEY=null;
String ACCOUNT_DATE=null;
String FACT_DATE=null;
String leas_form=null;
String DISTRIBUTOR_ID=null;
String DISTRIBUTOR_NAME=null;
String FlowUnid=this.getAttribute("FlowUnid").toString();
String sql="";
String VOUCHERNO=this.getAttribute("VoucherNo").toString();
param.clear();
map.put("FlowUnid", FlowUnid);
sql= "SELECT DDIT.CAUTION_MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') "
+ "AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,"
+ "DDIT.REFUND_PERSON,DIF.DISTRIBUTOR_NO,DIF.DISTRIBUTOR_NAME FROM D_DEPOSITRETURN_INFO_TEMP"
+ " DDIT LEFT JOIN DISTRIBUTOR_INFO DIF ON DIF.ID=DIF.DISTRIBUTOR_ID "
+ "WHERE DDIT.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("CAUTION_MONEY").toString();
if("".equals(MONEY)||MONEY==null) MONEY="0.00";
double mon=Double.parseDouble(MONEY);
if(mon>0){
ACCOUNT_DATE=dataList.get(i).get("ACCOUNT_DATE").toString();
FACT_DATE =dataList.get(i).get("FACT_DATE").toString();
leas_form="01";
DISTRIBUTOR_ID=dataList.get(i).get("DISTRIBUTOR_NO");
DISTRIBUTOR_NAME=dataList.get(i).get("DISTRIBUTOR_NAME");
param.put("FACT_MONEY",MONEY);
param.put("ACCOUNT_DATE",ACCOUNT_DATE);
param.put("FACT_DATE",FACT_DATE);
param.put("LEAS_FORM",leas_form);
param.put("DISTRIBUTOR_ID",DISTRIBUTOR_ID);
param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME);
param.put("FlowUnid", FlowUnid);
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();
}
String sMessage="true";
return sMessage;
}
}

View File

@ -12,79 +12,90 @@ import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl;
public class CreateVoucherDownPay extends BaseBussiness{
public class CreateVoucherHandlingMoney 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 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 ORGNAME=null;
String ORGID=null;
String MONEY=null;
String ACCOUNTNO=null;
String CUSTOMERID=null;
String CUSTOMERNAME=null;
String DISTRIBUTOR_ID=null;
String DISTRIBUTOR_NAME=null;
String CARID=null;
String CARMODEL=null;
String FlowUnid=this.getAttribute("FlowUnid").toString();
String sql="";
String VOUCHERNO=this.getAttribute("VoucherNo").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 ";
sql= "SELECT LCCT.HANDLING_CHARGE_MONEY AS MONEY,LCCT.HANDLING_CHARGE_MONEY/1.06 "
+ "AS HANDLFEENOTAX,(LCCT.HANDLING_CHARGE_MONEY-LCCT.HANDLING_CHARGE_MONEY/1.06)"
+ " AS HANDLTAX,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 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 WHERE LCCT.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(mon>0){
MONEYNOTAX=dataList.get(i).get("HANDLFEENOTAX").toString();
MONEYTAX=dataList.get(i).get("HANDLTAX").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();
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");
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");
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("ORGNAME",ORGNAME);
param.put("ORGID",ORGID);
param.put("LEAS_FORM",leas_form);
param.put("FACT_MONEY",MONEY);
param.put("ACCOUNTNO",ACCOUNTNO);
param.put("DISTRIBUTOR_ID",DISTRIBUTOR_ID);
param.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME);
param.put("CARID",CARID);
param.put("CARMODEL",CARMODEL);
param.put("FlowUnid", FlowUnid);
param.put("CUSTOMERID",CUSTOMERID);
param.put("CUSTOMERNAME",CUSTOMERNAME);
map.clear();
map.put("PROJ_TYPE", leas_form);
map.put("MODULAR_NUMBER", "쒔饋<EFBFBD>連마돨渡마운(看마)");
map.put("VOUCHER_NO", VOUCHERNO);
BizObject vouch=DataOperatorUtil.getSingleJBO(LV_VOUCHER_CONFIG.CLASS_NAME, map, Sqlca);
if(vouch!=null){
vs.createVoucher("쒔饋<EFBFBD>連마돨渡마운(看마)", vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca);
}
vs.createVoucher(vouch.getAttribute("MODULAR_NUMBER").getString(), vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca);
}}
}

View File

@ -1,117 +0,0 @@
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 CreateVoucherLendDistributor 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 f10=null;
String f20=null;
String f21=null;
String f23=null;
String f24=null;
String ACCOUNTNO=null;
String DISTRIBUTORID=null;
String DISTRIBUTORNAME=null;
String FlowUnid=this.getAttribute("FlowUnid").toString();
param.clear();
map.put("FlowUnid", FlowUnid);
String sql=
" SELECT SUM(CASE WHEN LFIT.FEE_TYPE='feetype10' THEN LFIT.FACT_MONEY ELSE 0 END) AS f10, "
+" SUM(CASE WHEN LFIT.FEE_TYPE='feetype20' THEN LFIT.FACT_MONEY ELSE 0 END) AS f20, "
+" SUM(CASE WHEN LFIT.FEE_TYPE='feetype21' THEN LFIT.FACT_MONEY ELSE 0 END) AS f21, "
+" SUM(CASE WHEN LFIT.FEE_TYPE='feetype24' THEN LFIT.FACT_MONEY ELSE 0 END) AS f24, "
+" SUM(CASE WHEN LFIT.FEE_TYPE='feetype23' THEN LFIT.FACT_MONEY ELSE 0 END) AS f23, "
+" MAX(LFIT.FEE_TYPE) AS FEE_TYPE,MAX(LFIT.ACCOUNTING_DATE) AS ACCOUNT_DATE, "
+" MAX(LFIT.FACT_DATE) AS FACT_DATE,MAX(LFIT.CONTRACT_ID) AS CONTRACT_ID,MAX(LCI.CONTRACT_NUMBER) AS CONTRACT_NUMBER, "
+" MAX(LCI.PROJECT_NAME) AS PROJECT_NAME,MAX(LCI.LEAS_FORM) AS LEAS_FORM,IFNULL(MAX(LFIT.acc_number),'000000000000000') AS ACCOUNTNO, "
+" MAX(ORG.ORGNAME) AS ORGNAME,MAX(ORG.ORGID) AS ORGID,MAX(LCI.DISTRIBUTOR_ID) AS DISTRIBUTORID,MAX(DI.DISTRIBUTOR_NAME) AS DISTRIBUTORNAME "
+" 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 DISTRIBUTOR_INFO DI ON DI.ID=LCI.DISTRIBUTOR_ID "
+" where LFIT.FEE_TYPE in ('feetype10','feetype20','feetype21','feetype24','feetype23') and LFIT.FLOWUNID=:FlowUnid GROUP BY LFIT.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();
f10=dataList.get(i).get("f10").toString();
f20=dataList.get(i).get("f20").toString();
f21=dataList.get(i).get("f21").toString();
f23=dataList.get(i).get("f23").toString();
f24=dataList.get(i).get("f24").toString();
ACCOUNTNO=dataList.get(i).get("ACCOUNTNO").toString();
DISTRIBUTORID=dataList.get(i).get("DISTRIBUTORID");
DISTRIBUTORNAME=dataList.get(i).get("DISTRIBUTORNAME");
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("f10",f10);
param.put("f20",f20);
param.put("f21",f21);
param.put("f23",f23);
param.put("f24",f24);
param.put("ACCOUNTNO",ACCOUNTNO);
param.put("FlowUnid", FlowUnid);
param.put("DISTRIBUTORID",DISTRIBUTORID);
map.clear();
//map.put("FEE_TYPE", dataList.get(i).get("FEE_TYPE").toString());
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 sMessage;
}
}

View File

@ -1,5 +1,6 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
@ -7,15 +8,20 @@ import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
public class AccountsRecieve implements VoucherJavaParamService{
public class CleanLeaseMoney implements VoucherJavaParamService {
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
//subtract
String EQUIP_AMT=param.get("EQUIP_AMT");
String FIRST_PAYMENT=param.get("FIRST_PAYMENT");
BigDecimal factmoney=new BigDecimal(EQUIP_AMT).subtract(new BigDecimal(FIRST_PAYMENT));
returnValue.putAll(param);
returnValue.put("MONEY",param.get("FACT_MONEY"));
returnValue.put("MONEY",factmoney.toString());
return returnValue;
}
}

View File

@ -1,5 +1,6 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
@ -7,13 +8,14 @@ import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
public class ReceiveDealerMarginForLoan implements VoucherJavaParamService {
public class ContractInterest 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("INTEREST"));
return returnValue;
}

View File

@ -7,14 +7,14 @@ import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
public class FinancialLeasCar implements VoucherJavaParamService{
public class ContractInterestNoTax 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"));
returnValue.put("MONEY",param.get("INTERESTNOTAX"));
return returnValue;
}

View File

@ -7,14 +7,14 @@ import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
public class BankReceipt implements VoucherJavaParamService{
public class ContractInterestTax 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"));
returnValue.put("MONEY",param.get("TAX"));
return returnValue;
}

View File

@ -1,28 +0,0 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
import java.math.BigDecimal;
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 OtherAccountPayLend implements VoucherJavaParamService{
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
//¹ºÖÃ˰(f20)+±£ÏÕ(f21)+GPS(f24)+×°ÊÎ×°äê(f23)
BigDecimal otherMoney=new BigDecimal(param.get("f20"));
otherMoney=otherMoney.add(new BigDecimal(param.get("f21")));
otherMoney=otherMoney.add(new BigDecimal(param.get("f23")));
otherMoney=otherMoney.add(new BigDecimal(param.get("f24")));
Map<String,String>returnValue=new HashMap<String,String>();
returnValue.putAll(param);
returnValue.put("MONEY",param.get("otherMoney"));
return returnValue;
}
}

View File

@ -0,0 +1,32 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
import java.math.BigDecimal;
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 OtherFee implements VoucherJavaParamService{
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
//ÆäËû£¨¹ºÖÃ˰/±£ÏÕ/GPS/×°ÊÎ×°äêµÈ£©
String INSURANCE_PREMIUM=param.get("INSURANCE_PREMIUM");
String PURCHASE_TAX=param.get("PURCHASE_TAX");
String INCIDENTAL=param.get("INCIDENTAL");
String GPS_FEE_FINANCE=param.get("GPS_FEE_FINANCE");
BigDecimal factmoney=new BigDecimal(INSURANCE_PREMIUM)
.add(new BigDecimal(PURCHASE_TAX))
.add(new BigDecimal(INCIDENTAL))
.add(new BigDecimal(GPS_FEE_FINANCE));
returnValue.putAll(param);
returnValue.put("MONEY",factmoney.toString());
return returnValue;
}
}

View File

@ -1,20 +0,0 @@
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 SaveMargin 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);
return returnValue;
}
}

View File

@ -0,0 +1,37 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoan;
import java.math.BigDecimal;
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;
/***
* ×ÛºÏÈÚ×Êî
* @author amarsoft
*/
public class SynthesizeLeaseMoney implements VoucherJavaParamService{
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String EQUIP_AMT=param.get("EQUIP_AMT");
String FIRST_PAYMENT=param.get("FIRST_PAYMENT");
BigDecimal factmoney1=new BigDecimal(EQUIP_AMT).subtract(new BigDecimal(FIRST_PAYMENT));
String INSURANCE_PREMIUM=param.get("INSURANCE_PREMIUM");
String PURCHASE_TAX=param.get("PURCHASE_TAX");
String INCIDENTAL=param.get("INCIDENTAL");
String GPS_FEE_FINANCE=param.get("GPS_FEE_FINANCE");
BigDecimal factmoney=factmoney1.add(new BigDecimal(INSURANCE_PREMIUM))
.add(new BigDecimal(PURCHASE_TAX))
.add(new BigDecimal(INCIDENTAL))
.add(new BigDecimal(GPS_FEE_FINANCE));
returnValue.putAll(param);
returnValue.put("MONEY",factmoney.toString());
return returnValue;
}
}

View File

@ -8,17 +8,20 @@ import jbo.voucher.LV_VOUCHER_CONFIG;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
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);
public class CreateVoucherLoanDistributor {
public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
Transaction Sqlca =null;
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 ACCOUNT_DATE=null;
String FACT_DATE=null;
@ -28,27 +31,39 @@ public class CreateVoucherLoanDistributor extends BaseBussiness{
String leas_form=null;
String DISTRIBUTOR_ID=null;
String DISTRIBUTOR_NAME=null;
String FlowUnid=this.getAttribute("FlowUnid").toString();
String CARID=null;
String CARMODEL=null;
String sql="";
String moneyDataSource="";
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,LCI.DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME "
+" FROM LC_FUND_INCOME_TEMP LFIT "
+" LEFT JOIN LB_CONTRACT_INFO LCI ON LFIT.CONTRACT_ID=LCI.ID "
+" LEFT JOIN DISTRIBUTOR_INFO DI ON DI.ID=LCI.DISTRIBUTOR_ID "
+" where LFIT.FEE_TYPE=:FEE_TYPE and LFIT.FLOWUNID=:FlowUnid ";
if("PZ2018070900000002".equals(VOUCHERNO)){
moneyDataSource="LCCT.EQUIP_AMT";
}
if("PZ2018070900000003".equals(VOUCHERNO)){
moneyDataSource="LCCT.FIRST_PAYMENT";
}
if("PZ2018070900000004".equals(VOUCHERNO)||"PZ2018071000000006".equals(VOUCHERNO)){
moneyDataSource="LCCT.CAUTION_MONEY";
}
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 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 WHERE LCCT.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(mon>0){
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();
@ -57,6 +72,8 @@ public class CreateVoucherLoanDistributor extends BaseBussiness{
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");
param.put("FACT_MONEY",MONEY);
param.put("ACCOUNT_DATE",ACCOUNT_DATE);
@ -67,16 +84,18 @@ public class CreateVoucherLoanDistributor extends BaseBussiness{
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("FlowUnid", FlowUnid);
map.clear();
map.put("PROJ_TYPE", leas_form);
map.put("MODULAR_NUMBER", "给经销商放款-车款全款");
map.put("VOUCHER_NO", VOUCHERNO);
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);
}
vs.createVoucher(vouch.getAttribute("MODULAR_NUMBER").getString(), vouch.getAttribute("OWNED_COMPANY").getString(), leas_form, VOUCHER_TYPE, userid,param, Sqlca);
}}
}

View File

@ -0,0 +1,18 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMethodSettle;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.flow.baseBussion.BaseBussiness;
public class ContractOnhireVoucher extends BaseBussiness {
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String FlowUnid=this.getAttribute("FlowUnid").toString();
return null;
}
}

View File

@ -0,0 +1,113 @@
package com.tenwa.voucher.CreateVoucherProcess;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
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.flow.baseBussion.BaseBussiness;
import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl;
public class CreateVoucherMonthSettlement{
public void CreateVoucher(String voucherNo) {
Transaction Sqlca =null;
try{
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
Map<String,String> map=new HashMap<String, String>();
Map<String,String> param=new HashMap<String, String>();
String MONEY=null;
String FEEMONEY=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;
param.clear();
String moneyType="";
if("PZ2018071200000017".equals(voucherNo)) moneyType="FEEMONEY";
if("PZ2018071200000016".equals(voucherNo)) moneyType="MONEY";
String sql="SELECT CRM.INTEREST AS MONEY,CRM.FEE AS FEEMONEY,'2018/07/31' "
+ "AS ACCOUNT_DATE,'2018/07/31' AS FACT_DATE,CRM.CONTRACT_ID,"
+ "LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,LCI.DISTRIBUTOR_ID,"
+ "DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL FROM CONTRACT_RENT_MONTH "
+ "CRM LEFT JOIN LB_CONTRACT_INFO LCI ON CRM.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 WHERE CRM.END_DATE='2018/07/31'";
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(moneyType).toString();
//FEEMONEY=dataList.get(i).get(FEEMONEY).toString();
if("".equals(MONEY)||MONEY==null) MONEY="0.00";
double mon=Double.parseDouble(MONEY);
if(mon>0){
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");
param.put("FACT_MONEY",MONEY);
//param.put("FACT_MONEY",FEEMONEY);
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);
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;
}
}
}
}

View File

@ -1,68 +0,0 @@
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 CreateVoucherReceiveDealerMargin 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 MONEY=null;
String ACCOUNTING_DATE=null;
String FACT_DATE=null;
String LEAS_FORM=null;
String DISTRIBUTOR_NO=null;
String DISTRIBUTOR_NAME=null;
String FlowUnid=this.getAttribute("FlowUnid").toString();
map.put("FlowUnid", FlowUnid);
String sql="SELECT DDIT.CAUTION_MONEY AS MONEY,DDIT.COLLECT_TIME AS ACCOUNTING_DATE,"
+ "DDIT.COLLECT_TIME AS FACT_DATE ,'02' AS LEAS_FORM ,DIF.DISTRIBUTOR_NO,"
+ "DIF.DISTRIBUTOR_NAME FROM D_DEPOSITCHARGE_INFO_TEMP DDIT LEFT JOIN "
+ "DISTRIBUTOR_INFO DIF ON DDIT.DISTRIBUTOR_ID=DIF.ID WHERE DDIT.FLOWUNID=:FLOWUNID";
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
CreateVoucherServiceImpl vs=new CreateVoucherServiceImpl();
String VOUCHER_TYPE="1";// 凭证分类 金蝶
String userid ="admin";
for(Map<String,String> ma:dataList){
MONEY=ma.get("MONEY");
ACCOUNTING_DATE=ma.get("ACCOUNTING_DATE");
FACT_DATE=ma.get("FACT_DATE");
LEAS_FORM=ma.get("LEAS_FORM");
DISTRIBUTOR_NO=ma.get("DISTRIBUTOR_NO");
DISTRIBUTOR_NAME=ma.get("DISTRIBUTOR_NAME");
param.put("MONEY", MONEY);
param.put("ACCOUNT_DATE", ACCOUNTING_DATE);
param.put("FACT_DATE", FACT_DATE);
param.put("LEAS_FORM", LEAS_FORM);
param.put("DISTRIBUTOR_NO", DISTRIBUTOR_NO);
param.put("DISTRIBUTOR_NAME", DISTRIBUTOR_NAME);
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);
}*/
}
return "true";
}
}

View File

@ -1,98 +0,0 @@
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<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", "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<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 sMessage;
}
}

View File

@ -0,0 +1,24 @@
package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo;
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 auxiliaryContractAcc implements VoucherJavaParamService {
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String ACC_BANK=param.get("ACC_BANK");
String ACC_NUMBER=param.get("ACC_NUMBER");
String BANK_NAME=param.get("BANK_NAME");
returnValue.put("ACC_BANK",ACC_BANK);
returnValue.put("ACC_NUMBER",ACC_NUMBER);
returnValue.put("BANK_NAME",BANK_NAME);
return returnValue;
}
}

View File

@ -0,0 +1,22 @@
package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo;
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 auxiliaryContractCar implements VoucherJavaParamService {
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String CARID=param.get("CARID");
String CARMODEL=param.get("CARMODEL");
returnValue.put("CARID",CARID);
returnValue.put("CARMODEL",CARMODEL);
return returnValue;
}
}

View File

@ -0,0 +1,22 @@
package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo;
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 auxiliaryContractCustomer implements VoucherJavaParamService {
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String DISTRIBUTOR_ID=param.get("DISTRIBUTOR_ID");
String DISTRIBUTOR_NAME=param.get("DISTRIBUTOR_NAME");
returnValue.put("DISTRIBUTOR_ID",DISTRIBUTOR_ID);
returnValue.put("DISTRIBUTOR_NAME",DISTRIBUTOR_NAME);
return returnValue;
}
}

View File

@ -0,0 +1,20 @@
package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo;
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 auxiliaryContractFactDate implements VoucherJavaParamService {
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String FACT_DATE=param.get("FACT_DATE");
returnValue.put("FACT_DATE",FACT_DATE);
return returnValue;
}
}

View File

@ -0,0 +1,22 @@
package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo;
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 auxiliaryContractNumber implements VoucherJavaParamService {
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String CONTRACT_NUMBER=param.get("CONTRACT_NUMBER");
String PROJECT_NAME=param.get("PROJECT_NAME");
returnValue.put("CONTRACT_NUMBER",CONTRACT_NUMBER);
returnValue.put("PROJECT_NAME",PROJECT_NAME);
return returnValue;
}
}

View File

@ -0,0 +1,22 @@
package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo;
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 auxiliaryContractOrg implements VoucherJavaParamService {
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String ORGID=param.get("ORGID");
String ORGNAME=param.get("ORGNAME");
returnValue.put("ORGID",ORGID);
returnValue.put("ORGNAME",ORGNAME);
return returnValue;
}
}

View File

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

View File

@ -0,0 +1,20 @@
package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo;
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 auxiliaryContractStartNum implements VoucherJavaParamService {
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String CONSTARTNUM=param.get("CONSTARTNUM");
returnValue.put("CONSTARTNUM",CONSTARTNUM);
return returnValue;
}
}

View File

@ -228,7 +228,7 @@ public class CreateVoucherServiceImpl {
Map<String,String> dataTemp=new HashMap<String, String>();
VoucherParamServiceImpl psi=new VoucherParamServiceImpl();
//获取数据
if("1".equals(bo.getAttribute("IS_CUSTOM_VALUE").getString())){
if("1".equals(bo.getAttribute("IS_CUSTOM_VALUE").getString())){//是否自定义取值
VoucherJavaParamService ps=null;
try{
Class<VoucherJavaParamService> c=(Class<VoucherJavaParamService>)Class.forName(bo.getAttribute("VALUE_MODE").getString());

View File

@ -122,6 +122,12 @@ public class VoucherToV8Impl implements VoucherService {
d.put("F12", user.getAttribute("username").getString());//ÖÆµ¥ÈË
d.put("F59", i+1+"");
d.put("F62",list.get(i).get("F6"));
d.put("F60",list.get(i).get("CONTRACT_NUMBER"));
d.put("F61",list.get(i).get("PROJECT_NAME"));
d.put("F66",list.get(i).get("DISTRIBUTOR_NAME"));
d.put("F64",list.get(i).get("CARMODEL"));
d.put("inputuserid",user.getAttribute("userid").getString());
d.put("v8_status",status);
d.put("v8_flag",eas_flag);

View File

@ -0,0 +1,17 @@
package com.tenwa.lease.app.quartzmession;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMonthSettlement;
public class CreateVoucherMonthSettlementMission implements Job {
@Override
public void execute(JobExecutionContext arg0) throws JobExecutionException {
CreateVoucherMonthSettlement vouchermanage=new CreateVoucherMonthSettlement();
vouchermanage.CreateVoucher("PZ2018071200000017");
vouchermanage.CreateVoucher("PZ2018071200000016");
}
}