Merge branch 'develop' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into tangfutang

This commit is contained in:
tangfutang 2018-08-09 21:12:01 +08:00
commit fa25b702b9
33 changed files with 434 additions and 149 deletions

View File

@ -68,8 +68,19 @@
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info06;Describe=定义按钮事件-;]~*/%>
<script type="text/javascript">
/*~[Describe=保存记录;InputParam=无;OutPutParam=无;]~*/
function saveRecord(){
as_save("myiframe0","parent.AsDialog.ClosePage()");
function saveRecord(){
debugger;
var accountType = getItemValue(0, 0, "account_type");
var accType = getItemValue(0, 0, "acc_type");
var state = getItemValue(0, 0, "state_");
var FbSdk = getItemValue(0,0,"FbSdk");
var sParams = "accountType="+accountType+",accType="+accType+",state="+state+",FbSdk="+FbSdk;
var sReturn = RunJavaMethodTrans("com.tenwa.reckon.copydata.CalcRentCompare", "compare",sParams );
if(sReturn=="null"||(sReturn=="notNull"&&state!="0010")||(sReturn=="notNull"&&state=="0010"&&FbSdk!="Y")){
as_save("myiframe0","parent.AsDialog.ClosePage()");
}else{
alert("启用状态下的账户账号类型已存在,请检查!");
}
}
//请选择出租人

View File

@ -105,7 +105,7 @@
setColRequired();
})
function afterSearch(){
var rows = getRowCount(0);
/* var rows = getRowCount(0);
for(var i=0;i<rows;i++){
var CONTRACT_ID = getItemValue(0,i,"CONTRACT_ID");
var result = RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","getContactId","CONTRACT_ID="+CONTRACT_ID);
@ -114,7 +114,7 @@
sPars=result.split("@"); //×Ö·û·Ö¸î
sRun = "<a style='color:blue;font-size:15px;font-family:ËÎÌå;' onclick='opeTrigger("+ps+")'>" +sPars[1]+ "</a>";
getObj(0,i,"CONTRACT_ID").innerHTML = sRun;
}
} */
}
function createFundIncomeExcel(){
var rows = getCheckedRows(0);

View File

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

View File

@ -5,7 +5,7 @@
/*
sExpression = "!CustomerManager.GetCustomerName(2000042779)";
sExpression = Expression.pretreatMethod(sExpression,Sqlca);
String sReturn = Expression.getExpressionValue(sExpression,Sqlca).stringValue();
String sReturn = Expression.getExpressionValue(sExpression,Sqlca).stringValue();
out.println(sReturn);
*/
ASMethod asm = new ASMethod("CustomerManager","GetCustomerName",Sqlca);

File diff suppressed because one or more lines are too long

View File

@ -3392,5 +3392,31 @@
</managerProperties>
</manager>
</class>
<class name="VI_LI_INVOICE_RENT" label="" keyAttributes="contract_id">
<attributes>
<attribute name="contract_id" label="contract_id" type="STRING"/>
<attribute name="contract_no" label="contract_no" type="STRING"/>
<attribute name="payment_number" label="payment_number" type="STRING"/>
<attribute name="customer_id" label="customer_id" type="STRING"/>
<attribute name="customer_name" label="customer_name" type="STRING"/>
<attribute name="plan_list" label="plan_list" type="STRING"/>
<attribute name="plan_id" label="plan_id" type="STRING"/>
<attribute name="plan_date" label="plan_date" type="STRING"/>
<attribute name="plan_money" label="plan_money" type="STRING"/>
<attribute name="invoice_money" label="invoice_money" type="STRING"/>
<attribute name="cert_id" label="cert_id" type="STRING"/>
<attribute name="account" label="account" type="STRING"/>
<attribute name="acc_number" label="acc_number" type="STRING"/>
<attribute name="bank_name" label="bank_name" type="STRING"/>
<attribute name="telephone" label="telephone" type="STRING"/>
<attribute name="customer_type" label="customer_type" type="STRING"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="vi_li_invoice_rent" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -772,6 +772,7 @@
<attribute name="NOMINAL_INVOICE_TYPE" label="留购价发票类型" type="STRING" length="32"/>
<attribute name="CAUTION_RATE" label="保证金税率" type="STRING" length="32"/>
<attribute name="CAUTION_INVOICE_TYPE" label="保证金发开票类型" type="STRING" length="32"/>
<attribute name="gps_install_fee" label="GPS安装服务费" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>

View File

@ -715,6 +715,7 @@
<attribute name="BUSINESSTYPE" label="业务类型" type="STRING" length="64"/>
<attribute name="AREA_CODE" label="车牌号对应所在区号" type="STRING" length="32"/>
<attribute name="CAR_TYPE" label="车辆类型" type="STRING" length="64"/>
<attribute name="LENDING_TYPE" label="保单放款方法" type="STRING" length="10"/>
</attributes>
<manager>
<managerProperties>
@ -951,6 +952,7 @@
<attribute name="BUSINESSTYPE" label="业务类型" type="STRING" length="64"/>
<attribute name="AREA_CODE" label="车牌号对应所在区号" type="STRING" length="32"/>
<attribute name="CAR_TYPE" label="车辆类型" type="STRING" length="64"/>
<attribute name="LENDING_TYPE" label="保单放款方法" type="STRING" length="10"/>
</attributes>
<manager>
<managerProperties>
@ -2596,6 +2598,10 @@
<attribute name="CONTRACT_INVOICE_STATUS" label="合同开票状态" type="STRING" length="32"/>
<attribute name="VERSIONID" label="版本号" type="STRING" length="64"/>
<attribute name="distributor_id" label="distributor_id" type="STRING" length="32"/>
<attribute name="BUSINESSTYPE" label="业务类型" type="STRING" length="64"/>
<attribute name="AREA_CODE" label="车牌号对应所在区号" type="STRING" length="32"/>
<attribute name="CAR_TYPE" label="车辆类型" type="STRING" length="64"/>
<attribute name="LENDING_TYPE" label="保单放款方法" type="STRING" length="10"/>
</attributes>
<manager>
<managerProperties>
@ -4179,6 +4185,34 @@
</managerProperties>
</manager>
</class>
<class name="LB_CAR_LICENSE_PLATE_INFO_TEMP" label="" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="100"/>
<attribute name="car_id" label="车辆编号" type="STRING" length="40"/>
<attribute name="orgid" label="机构编号" type="STRING" length="40"/>
<attribute name="contract_id" label="合同id" type="STRING" length="100"/>
<attribute name="plate_status" label="上牌状态" type="STRING" length="100"/>
<attribute name="frame_number" label="车架号" type="STRING" length="100"/>
<attribute name="engine_number" label="发动机号" type="STRING" length="100"/>
<attribute name="plate_number" label="上牌号" type="STRING" length="100"/>
<attribute name="platetime" label="上牌时间" type="STRING" length="100"/>
<attribute name="inputuserid" label="登记人" type="STRING" length="100"/>
<attribute name="inputorgid" label="登记部门" type="STRING" length="100"/>
<attribute name="inputtime" label="登记时间" type="STRING" length="100"/>
<attribute name="updateuserid" label="更新人" type="STRING" length="100"/>
<attribute name="updateorgid" label="更新部门" type="STRING" length="100"/>
<attribute name="updatetime" label="更新时间" type="STRING" length="100"/>
<attribute name="car_unit" label="上牌单位" type="STRING" length="100"/>
<attribute name="car_location" label="上牌地点" type="STRING" length="100"/>
<attribute name="contract_no" label="合同编号" type="STRING" length="100"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_car_license_plate_info_temp" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
<package name="jbo.com.tenwa.lease.carbrand" >
<class name="LB_CLAIMS_BOOK_DETAIL" label="索赔申请书详情表" keyAttributes="ID">

View File

@ -82,6 +82,7 @@
<attribute name="INIT_CLASS" label="初始化类" type="STRING" length="1000"/>
<attribute name="VOUCHER_TYPE" label="凭证分类" type="STRING" length="32"/>
<attribute name="VOUCHER_NO" label="凭证编号" type="STRING" length="32"/>
<attribute name="FIR_KEY" label="关键字一" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>

View File

@ -1,9 +1,19 @@
package com.tenwa.reckon.copydata;
import jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.util.jboutil.BizObjectCompare;
public class CalcRentCompare implements BizObjectCompare{
private String accountType;
private String accType;
private String state;
private String FbSdk;
@Override
public boolean ObjectCompare(BizObject cObject, BizObject toObject)
@ -13,5 +23,39 @@ public class CalcRentCompare implements BizObjectCompare{
}
return false;
}
public String getAccountType() {
return accountType;
}
public void setAccountType(String accountType) {
this.accountType = accountType;
}
public String getAccType() {
return accType;
}
public void setAccType(String accType) {
this.accType = accType;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getFbSdk() {
return FbSdk;
}
public void setFbSdk(String fbSdk) {
FbSdk = fbSdk;
}
public String compare(JBOTransaction tx) throws JBOException{
String sql ="select * from O where O.state_='0010' and O.ACC_TYPE=:accType and ACCOUNT_TYPE=:accountType and FbSdk='Y'";
BizObject bo = JBOFactory.createBizObjectQuery(OWN_ACCOUNT.CLASS_NAME,sql)
.setParameter("accType", accType).setParameter("accountType", accountType).getSingleResult(false);
if(bo==null||"".equals(bo)){
return "null";
}
return "notNull";
}
}

View File

@ -39,11 +39,11 @@ public class CreateVoucherContractTerminate {
param.clear();
map.put("FlowUnid", FlowUnid);
//回款--收到违约金
if("PZ2018072100000026".equals(VOUCHERNO)||"PZ2018080400000083".equals(VOUCHERNO)){
if("PZ2018072100000026".equals(VOUCHERNO)||"PZ2018080400000083".equals(VOUCHERNO)||"PZ2018080400000093".equals(VOUCHERNO)){
sql= "SELECT IFNULL(HANDLING_CHARGE,0) AS MONEY ,ROUND(IFNULL(HANDLING_CHARGE,0)/1.06,2) AS MONEYNOTAX,(IFNULL(HANDLING_CHARGE,0)-ROUND(IFNULL(HANDLING_CHARGE,0)/1.06,2)) AS MONEYTAX,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_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 LFRA.FLOWUNID=:FLOWUNID";
}
//收到的提前还款
if("PZ2018072100000027".equals(VOUCHERNO)||"PZ2018080400000084".equals(VOUCHERNO)){
if("PZ2018072100000027".equals(VOUCHERNO)||"PZ2018080400000084".equals(VOUCHERNO)||"PZ2018080400000094".equals(VOUCHERNO)){
sql= "SELECT IFNULL(CORPUS_OVERAGE,0) 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,LCI.ID CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_FUND_RENT_ADJUST_TEMP LFRA INNER JOIN LC_CALC_CONDITION LCC ON LCC.PAYMENT_NUMBER=LFRA.PAYMENT_NUMBER INNER JOIN LB_CONTRACT_INFO LCI ON LCC.CONTRACT_ID=LCI.ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_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 LFRA.FLOWUNID=:FLOWUNID";
}
//提前还款-调整未实现利息收入(不含税金)
@ -69,8 +69,8 @@ public class CreateVoucherContractTerminate {
if("".equals(MONEY)||MONEY==null) MONEY="0.00";
double mon=Double.parseDouble(MONEY);
if(mon>0){
MONEYNOTAX=dataList.get(i).get("MONEYNOTAX").toString();
MONEYTAX=dataList.get(i).get("MONEYTAX").toString();
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();

View File

@ -13,114 +13,120 @@ import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.voucher.serviceImp.CreateVoucherServiceImpl;
public class CreateVoucherCustCautionMoneyIncome extends BaseBussiness{
public class CreateVoucherCustCautionMoneyIncome extends BaseBussiness {
public String CreateVoucher(String FlowUnid,String VOUCHERNO,String FeeType) throws Exception {
public String CreateVoucher(String FlowUnid, String VOUCHERNO, String FeeType) 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());
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 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 ACC_NUM=null;
String sql="";
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 ACC_NUM = null;
String sql = "";
param.clear();
map.put("FlowUnid", FlowUnid);
map.put("FEE_TYPE", FeeType);
sql= "SELECT LFIT.FACT_MONEY AS MONEY,ROUND(LFIT.FACT_MONEY/1.06,2) AS MONEYNOTAX,(LFIT.FACT_MONEY-ROUND(LFIT.FACT_MONEY/1.06,2)) AS MONEYTAX,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,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,LFIT.ACC_NUMBER 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 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.FEE_TYPE=:FEE_TYPE AND LFIT.FLOWUNID=:FLOWUNID ";
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
//sql= "SELECT LFIT.FACT_MONEY AS MONEY,ROUND(LFIT.FACT_MONEY/1.06,2)AS MONEYNOTAX,(LFIT.FACT_MONEY-ROUND(LFIT.FACT_MONEY/1.06,2)) AS MONEYTAX,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,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,LFIT.ACC_NUMBER 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 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.FEE_TYPE=:FEE_TYPE AND LFIT.FLOWUNID=:FLOWUNID AND DATE_FORMAT(LFIT.FACT_DATE,'%Y/%m')=DATE_FORMAT(SYSDATE(),'%Y/%m')";
sql = "SELECT LFIT.FACT_MONEY AS MONEY,ROUND(LFIT.FACT_MONEY/1.06,2) AS MONEYNOTAX,(LFIT.FACT_MONEY-ROUND(LFIT.FACT_MONEY/1.06,2)) AS MONEYTAX,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,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,LEC.ID AS CARID,LEC.MODEL ,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE,LFIT.ACC_NUMBER 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 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.FEE_TYPE=:FEE_TYPE AND LFIT.FLOWUNID=:FLOWUNID ";
// 查询sql, 将结果集封装到list集合中
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("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");
ACC_NUM=dataList.get(i).get("ACC_NUMBER");
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);
param.put("ACC_NUMBER",ACC_NUM);
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");
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);
}}
CreateVoucherServiceImpl vs = new CreateVoucherServiceImpl();
String VOUCHER_TYPE = "1";// 凭证分类 金蝶
String userid = "admin";
//遍历获取结果集, 将结果写入map中
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);
// 判断有金额, 封装值到map中
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");
ACC_NUM = dataList.get(i).get("ACC_NUMBER");
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);
param.put("ACC_NUMBER", ACC_NUM);
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");
param.put("FlowUnid", FlowUnid);
map.clear();
map.put("PROJ_TYPE", leas_form);
map.put("VOUCHER_NO", VOUCHERNO);
// 根据map中的参数, 查询LV_VOUCHER_CONFIG表数据
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){
if (Sqlca != null) {
Sqlca.commit();
}
String sMessage="true";
String sMessage = "true";
return sMessage;
}
}

View File

@ -42,7 +42,7 @@ public String CreateVoucher(String FlowUnid,String VOUCHERNO) throws Exception {
+ " DDIT LEFT JOIN DISTRIBUTOR_INFO DIF ON DIF.DISTRIBUTOR_NO=DDIT.DISTRIBUTOR_ID "
+ "WHERE DDIT.FLOWUNID=:FLOWUNID";
}
if("PZ2018072100000032".equals(VOUCHERNO)||"PZ2018080400000088".equals(VOUCHERNO)){
if("PZ2018072100000032".equals(VOUCHERNO)||"PZ2018080400000088".equals(VOUCHERNO)||"PZ2018080400000098".equals(VOUCHERNO)){
sql= "SELECT DDIT.CAUTION_MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d')"
+ " AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') "
+ "AS FACT_DATE,DDIT.payer,DIF.DISTRIBUTOR_CODING DISTRIBUTOR_NO,"

View File

@ -27,7 +27,9 @@ public class CreateVoucherInsuranceSettlement{
Map<String,String> param=new HashMap<String, String>();
String MONEY=null;
String FEEMONEY=null;
String MONEYNOTAX=null;
String MONEYTAX=null;
String RENTMONEY=null;
String ACCOUNT_DATE=null;
String FACT_DATE=null;
String CONTRACT_ID=null;
@ -46,7 +48,11 @@ public class CreateVoucherInsuranceSettlement{
String sql="";
String moneyType="MONEY";
sql="SELECT lic.claims_money AS MONEY,DATE_FORMAT(claims_start_date,'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(claims_start_date,'%Y/%m/%d') AS FACT_DATE,lii.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 LB_INSURANCE_CLAIM lic inner join LB_INSURANCE_INFO lii on lic.INSURANCE_ID=lii.INSURANCE_ID LEFT JOIN LB_CONTRACT_INFO LCI ON lii.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 DATE_FORMAT(lic.inputtime,'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')";
if("PZ2018080600000114".equals(voucherNo)){
sql="SELECT lic.claims_money AS MONEY,ROUND(nvl(LrIT.penalty / 1.06, 0),2) AS MONEYNOTAX,ROUND(nvl(LrIT.penalty,0),2) - ROUND(nvl(LrIT.penalty / 1.06, 0),2) AS MONEYTAX,ROUND(nvl(LrIT.RENT,0),2) AS RENTMONEY,DATE_FORMAT(claims_start_date, '%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(claims_start_date, '%Y/%m/%d') AS FACT_DATE,lii.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 LB_INSURANCE_CLAIM lic INNER JOIN LB_INSURANCE_INFO lii ON lic.INSURANCE_ID = lii.INSURANCE_ID LEFT JOIN LB_CONTRACT_INFO LCI ON lii.CONTRACT_ID = LCI.ID LEFT JOIN LC_rent_INCOME_temp LrIT 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 DATE_FORMAT(lic.inputtime, '%Y/%m') = DATE_FORMAT(SYSDATE(), '%Y/%m')";
}else{
sql="SELECT lic.claims_money AS MONEY,DATE_FORMAT(claims_start_date,'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(claims_start_date,'%Y/%m/%d') AS FACT_DATE,lii.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 LB_INSURANCE_CLAIM lic inner join LB_INSURANCE_INFO lii on lic.INSURANCE_ID=lii.INSURANCE_ID LEFT JOIN LB_CONTRACT_INFO LCI ON lii.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 DATE_FORMAT(lic.inputtime,'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')";
}
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, sql, map);
@ -56,10 +62,12 @@ public class CreateVoucherInsuranceSettlement{
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){
MONEYNOTAX=dataList.get(i).get("MONEYNOTAX").toString();
MONEYTAX=dataList.get(i).get("MONEYTAX").toString();
RENTMONEY=dataList.get(i).get("RENTMONEY").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();
@ -76,7 +84,9 @@ public class CreateVoucherInsuranceSettlement{
BUSINESSTYPE=dataList.get(i).get("BUSINESSTYPE");
param.put("FACT_MONEY",MONEY);
//param.put("FACT_MONEY",FEEMONEY);
param.put("INTERESTNOTAX",MONEYNOTAX);
param.put("TAX",MONEYTAX);
param.put("RENTMONEY",RENTMONEY);
param.put("ACCOUNT_DATE",ACCOUNT_DATE);
param.put("FACT_DATE",FACT_DATE);
param.put("CONTRACT_ID",CONTRACT_ID);

View File

@ -20,8 +20,8 @@ public class CleanLeaseMoney implements VoucherJavaParamService {
String FIRST_PAYMENT=param.get("FIRST_PAYMENT")==null?"0.00":param.get("FIRST_PAYMENT");
BigDecimal factmoney=new BigDecimal(EQUIP_AMT).subtract(new BigDecimal(FIRST_PAYMENT));
returnValue.putAll(param);
returnValue.put("FUNDTYPE","01");
returnValue.put("MONEY",factmoney.toString());
return returnValue;
}
}

View File

@ -19,8 +19,9 @@ public class ContractCapitalToTaxToJust implements VoucherJavaParamService{
String EQUIP_AMT=param.get("EQUIP_AMT")==null?"0.00":param.get("EQUIP_AMT");
String tax="1.06";
BigDecimal divisor= new BigDecimal(tax);
BigDecimal sumMoney=new BigDecimal(FIRST_PAYMENT).subtract(new BigDecimal(EQUIP_AMT));
BigDecimal sumMoney=new BigDecimal(EQUIP_AMT).subtract(new BigDecimal(FIRST_PAYMENT));
BigDecimal taxMoney=sumMoney.subtract(sumMoney.divide(divisor, 2, BigDecimal.ROUND_HALF_UP));
returnValue.put("FUNDTYPE","01");
returnValue.put("MONEY",taxMoney.toString());
return returnValue;
}

View File

@ -15,6 +15,7 @@ public class ContractEquipToJust implements VoucherJavaParamService{
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
returnValue.putAll(param);
returnValue.put("FUNDTYPE","01");
returnValue.put("MONEY",param.get("EQUIP_AMT"));
return returnValue;
}

View File

@ -0,0 +1,23 @@
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;
/**
* »ñÈ¡ÔÂ×â½ð
* @author xiezhiwen
*/
public class ContractMoneyToRent 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("RENTMONEY"));
return returnValue;
}
}

View File

@ -14,6 +14,7 @@ public class FundGPSFee implements VoucherJavaParamService{
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
returnValue.putAll(param);
returnValue.put("FUNDTYPE","01");
returnValue.put("MONEY",param.get("GPS_FEE_FINANCE"));
return returnValue;
}

View File

@ -23,7 +23,10 @@ public class OtherFee implements VoucherJavaParamService{
String INCIDENTAL=param.get("INCIDENTAL")==null?"0.00":param.get("INCIDENTAL");
// ×°äê·Ñ
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(TABLEWARE_FEE));
BigDecimal factmoney=new BigDecimal(INSURANCE_PREMIUM)
.add(new BigDecimal(PURCHASE_TAX))
.add(new BigDecimal(INCIDENTAL))
.add(new BigDecimal(TABLEWARE_FEE));
returnValue.putAll(param);
returnValue.put("FUNDTYPE","01");
returnValue.put("MONEY",factmoney.toString());

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;
/**
* ¹ºÖÃ˰+±£ÏÕ+GPS+×°ÊÎ×°äê
* @author xiezhiwen
*/
public class OtherFeeAddGps implements VoucherJavaParamService{
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
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 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(GPS_FEE_FINANCE))
.add(new BigDecimal(TABLEWARE_FEE));
returnValue.putAll(param);
returnValue.put("FUNDTYPE","01");
returnValue.put("MONEY",factmoney.toString());
return returnValue;
}
}

View File

@ -0,0 +1,28 @@
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;
/**
* ¹ºÖÃ˰+±£ÏÕ+GPS
* @author xiezhiwen
*/
public class OtherFeeMoneyToLoan implements VoucherJavaParamService{
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
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 GPS_FEE_FINANCE=param.get("GPS_FEE_FINANCE")==null?"0.00":param.get("GPS_FEE_FINANCE");
BigDecimal factmoney=new BigDecimal(INSURANCE_PREMIUM).add(new BigDecimal(PURCHASE_TAX)).add(new BigDecimal(GPS_FEE_FINANCE));
returnValue.putAll(param);
returnValue.put("FUNDTYPE","01");
returnValue.put("MONEY",factmoney.toString());
return returnValue;
}
}

View File

@ -0,0 +1,34 @@
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;
/**
* ¹ºÖÃ˰/±£ÏÕ/GPS/×°ÊÎ×°äêµÈ
* @author xiezhiwen
*/
public class OtherFees implements VoucherJavaParamService{
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
// ±£ÏÕ·Ñ
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 TABLEWARE_FEE=param.get("TABLEWARE_FEE")==null?"0.00":param.get("TABLEWARE_FEE");
// gps
String GPS_FEE_FINANCE=param.get("GPS_FEE_FINANCE")==null?"0.00":param.get("GPS_FEE_FINANCE");
BigDecimal factmoney=new BigDecimal(INSURANCE_PREMIUM).add(new BigDecimal(PURCHASE_TAX)).add(new BigDecimal(INCIDENTAL)).add(new BigDecimal(TABLEWARE_FEE)).add(new BigDecimal(GPS_FEE_FINANCE));
returnValue.putAll(param);
returnValue.put("FUNDTYPE","01");
returnValue.put("MONEY",factmoney.toString());
return returnValue;
}
}

View File

@ -11,19 +11,22 @@ import com.tenwa.voucher.service.VoucherJavaParamService;
* 났운-看마운+뭔零江+괏麴+GPS+陋干陋殃
* @author xiezhiwen
*/
public class SynthesizeLeaseMoneyToJust implements VoucherJavaParamService{
public class SynthesizeMoneyToJust implements VoucherJavaParamService{
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")==null?"0.00":param.get("EQUIP_AMT");
String FIRST_PAYMENT=param.get("FIRST_PAYMENT")==null?"0.00":param.get("FIRST_PAYMENT");
//³µ¿î-Ê׸¿î
BigDecimal factmoney1=new BigDecimal(EQUIP_AMT).subtract(new BigDecimal(FIRST_PAYMENT));
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 TABLEWARE_FEE=param.get("TABLEWARE_FEE")==null?"0.00":param.get("TABLEWARE_FEE");
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=factmoney1.add(new BigDecimal(INSURANCE_PREMIUM)).add(new BigDecimal(PURCHASE_TAX)).add(new BigDecimal(TABLEWARE_FEE)).add(new BigDecimal(GPS_FEE_FINANCE));
BigDecimal factmoney=factmoney1.add(new BigDecimal(INSURANCE_PREMIUM))
.add(new BigDecimal(PURCHASE_TAX))
.add(new BigDecimal(TABLEWARE_FEE))
.add(new BigDecimal(GPS_FEE_FINANCE));
returnValue.putAll(param);
returnValue.put("MONEY",factmoney.toString());
return returnValue;

View File

@ -11,7 +11,7 @@ public class CautionMoneyVoucher extends BaseBussiness {
String FlowUnid=this.getAttribute("FlowUnid").toString();
CreateVoucherCustCautionMoneyIncome cvcc=new CreateVoucherCustCautionMoneyIncome();
cvcc.CreateVoucher(FlowUnid, "PZ2018072400000059", "feetype17");//Í˻ر£Ö¤½ð--»Ø×â
cvcc.CreateVoucher(FlowUnid, "PZ2018080400000075", "feetype17");//Í˻ر£Ö¤½ð--Ö±×â
cvcc.CreateVoucher(FlowUnid, "PZ2018080400000075", "feetype17");//退回用户保证金--直租
return "true";
}
}
}

View File

@ -2,14 +2,13 @@ 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.CreateVoucherCustomerRentOrFee;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherHandlingMoney;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherLoanDistributor;
import com.tenwa.voucher.service.VoucherJavaParamService;
public class ContractOnhireVoucher extends BaseBussiness {
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String FlowUnid=this.getAttribute("FlowUnid").toString();
@ -25,12 +24,11 @@ public class ContractOnhireVoucher extends BaseBussiness {
cvld.CreateVoucher(FlowUnid, "PZ2018071000000006");//给经销商放款冲抵客户保证金--回租
cvld.CreateVoucher(FlowUnid, "PZ2018080300000071");//给经销商放款冲抵客户保证金--直租
cvld.CreateVoucher(FlowUnid, "PZ2018073100000062");//记录给经销商放款-其他购置税/保险/装饰装潢等 --回租
cvld.CreateVoucher(FlowUnid, "PZ2018080300000066");//记录给经销商放款-其他购置税/保险/装饰装潢等--直租
cvld.CreateVoucher(FlowUnid, "PZ2018073100000062");//购置税+保险+装饰 --回租
cvld.CreateVoucher(FlowUnid, "PZ2018080300000066");//购置税+保险+装饰 --直租
cvld.CreateVoucher(FlowUnid, "PZ2018073100000061");//GPS--回租
cvld.CreateVoucher(FlowUnid, "PZ2018080300000068");//GPS--直租
cvld.CreateVoucher(FlowUnid, "PZ2018073100000061");//记录给经销商放款-GPS--回租
cvld.CreateVoucher(FlowUnid, "PZ2018080300000068");//记录给经销商放款-GPS--直租
CreateVoucherCustomerRentOrFee cvcr=new CreateVoucherCustomerRentOrFee();
cvcr.CreateVoucher(FlowUnid, "PZ2018071000000005");//客户支付的应收账款总金额
@ -39,16 +37,17 @@ public class ContractOnhireVoucher extends BaseBussiness {
cvcr.CreateVoucher(FlowUnid, "PZ2018071100000010");//给经销商放款-车款及其他绑定款项--回租
cvcr.CreateVoucher(FlowUnid, "PZ2018080300000074");//给经销商放款-车款及其他绑定款项--直租
cvcr.CreateVoucher(FlowUnid, "PZ2018080600000116");//给经销商放款-代收代付部分--直租
CreateVoucherHandlingMoney cvhl=new CreateVoucherHandlingMoney();
cvhl.CreateVoucher(FlowUnid, "PZ2018071000000007");//给经销商放款冲抵确认手续费收入一次性确认收入--回租
cvhl.CreateVoucher(FlowUnid, "PZ2018080300000072");//给经销商放款冲抵确认手续费收入一次性确认收入--
cvhl.CreateVoucher(FlowUnid, "PZ2018080300000072");//给经销商放款冲抵确认手续费收入一次性确认收入--
cvhl.CreateVoucher(FlowUnid, "PZ2018071000000009");//给经销商放款冲抵确认收到手续费按月分摊收入--
cvhl.CreateVoucher(FlowUnid, "PZ2018080300000073");//给经销商放款冲抵确认收到手续费按月分摊收入--
cvhl.CreateVoucher(FlowUnid, "PZ2018071000000009");//给经销商放款冲抵确认收到手续费按月分摊收入--
cvhl.CreateVoucher(FlowUnid, "PZ2018080300000073");//给经销商放款冲抵确认收到手续费按月分摊收入--
//CreateVoucherCustCautionMoneyIncome cvci=new CreateVoucherCustCautionMoneyIncome();
return "true";
}
}

View File

@ -3,7 +3,11 @@ package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMethodSettle;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherContractTerminate;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherCustomerRentOrFee;
/**
* 回款
* @author xiezhiwen
*/
public class ContractTerminate extends BaseBussiness {
@Override
@ -24,6 +28,9 @@ public class ContractTerminate extends BaseBussiness {
cvct.CreateVoucher(FlowUnid, "PZ2018072100000046");//未实现的利息的税金--回租
cvct.CreateVoucher(FlowUnid, "PZ2018080400000100");//未实现的利息的税金--直租
CreateVoucherCustomerRentOrFee cvcr = new CreateVoucherCustomerRentOrFee();
cvcr.CreateVoucher(FlowUnid, "PZ2018080600000117");//收到代收代付款--直租
return "true";
}
}

View File

@ -25,13 +25,8 @@ public class IncomeVoucher extends BaseBussiness {
cvci.CreateVoucher(FlowUnid, "PZ2018072100000028", "feetype27");//ÌùÏ¢--»Ø×â
cvci.CreateVoucher(FlowUnid, "PZ2018080400000085", "feetype27");//ÌùÏ¢--Ö±×â
/*CreateVoucherRentIncome cvri=new CreateVoucherRentIncome();
cvri.CreateVoucher(FlowUnid, "PZ2018072100000024");//收到租金
cvri.CreateVoucher(FlowUnid, "PZ2018072100000025");//收到逾期利息
*/
cvci.CreateVoucher(FlowUnid, "PZ2018080400000103", "feetype27");//È·ÈÏÌùÏ¢ÊÕÈë--Ö±×â
return "true";
}

View File

@ -2,7 +2,11 @@ package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMethodSettle;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherContractTerminate;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherCustCautionMoneyIncome;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherCustomerRentOrFee;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherDistCautionMoneyRe;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherInsuranceSettlement;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherRedRentIncome;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherRentIncome;
@ -22,13 +26,12 @@ public class RedIncomeVoucher extends BaseBussiness {
cvci.CreateVoucher(FlowUnid, "PZ2018080400000090", "feetype1");//回款反冲-确认收到手续费按月分摊收入--直租
cvci.CreateVoucher(FlowUnid, "PZ2018072100000043", "feetype4");//回款反冲-收到名义货价--回租
cvci.CreateVoucher(FlowUnid, "PZ2018080400000097", "feetype4");//回款反冲-收到名义货价--
cvci.CreateVoucher(FlowUnid, "PZ2018080400000097", "feetype4");//回款反冲-收到名义货价--
cvci.CreateVoucher(FlowUnid, "PZ2018072100000041", "feetype27");//回款反冲-收到的贴息--回租
cvci.CreateVoucher(FlowUnid, "PZ2018080400000095", "feetype27");//回款反冲-收到的贴息--直租
CreateVoucherRedRentIncome cvri=new CreateVoucherRedRentIncome();
cvri.CreateVoucher(FlowUnid, "PZ2018072100000037");//收到的租金--回租
cvri.CreateVoucher(FlowUnid, "PZ2018080400000091");//收到的租金--直租
@ -36,6 +39,22 @@ public class RedIncomeVoucher extends BaseBussiness {
cvri.CreateVoucher(FlowUnid, "PZ2018072100000038");//收到逾期利息--回租
cvri.CreateVoucher(FlowUnid, "PZ2018080400000092");//收到逾期利息--直租
CreateVoucherContractTerminate cvct=new CreateVoucherContractTerminate();
cvct.CreateVoucher(FlowUnid, "PZ2018080400000094");//收到的提前还款--直租
cvct.CreateVoucher(FlowUnid, "PZ2018080400000093");//收到的违约金/罚款--直租
CreateVoucherInsuranceSettlement cvis=new CreateVoucherInsuranceSettlement();
cvis.CreateVoucher("PZ2018080400000096");//收到理赔保险费 --直租
CreateVoucherCustomerRentOrFee cvcr = new CreateVoucherCustomerRentOrFee();
cvcr.CreateVoucher(FlowUnid, "PZ2018080400000077");//收到代收代付款--直租
CreateVoucherDistCautionMoneyRe cvdc=new CreateVoucherDistCautionMoneyRe();
cvdc.CreateVoucher(FlowUnid, "PZ2018080400000098");//收到经销商保证金--直租
return "true";
}
}

View File

@ -47,7 +47,7 @@ public class CreateVoucherMonthSettlement{
String moneyType="MONEY";
if("PZ2018071200000017".equals(voucherNo)||"PZ2018080400000104".equals(voucherNo)) moneyType="FEEMONEY";
if("PZ2018071200000016".equals(voucherNo)||"PZ2018080400000102".equals(voucherNo)) moneyType="MONEY";
sql="SELECT CRM.INTEREST AS MONEY,CRM.FEE AS FEEMONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,CRM.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 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 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 DATE_FORMAT(STR_TO_DATE(CRM.END_DATE,'%Y/%m/%d'),'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')";
sql="SELECT ROUND(CRM.INTEREST/1.06,2) AS MONEY,CRM.FEE AS FEEMONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,CRM.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 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 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 DATE_FORMAT(STR_TO_DATE(CRM.END_DATE,'%Y/%m/%d'),'%Y/%m/%d')=DATE_FORMAT(SYSDATE(),'%Y/%m/%d')";
//×â½ðµÄÀûϢ˰½ð
if("PZ2018072100000055".equals(voucherNo)){
sql="SELECT LRP.INTEREST-ROUND(LRP.INTEREST/1.06,2) AS MONEY,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS ACCOUNT_DATE,DATE_FORMAT(SYSDATE(),'%Y/%m/%d') AS FACT_DATE,LCI.ID AS CONTRACT_ID,LCI.CONTRACT_NUMBER,LCI.PROJECT_NAME,LCI.LEAS_FORM,DI.DISTRIBUTOR_CODING DISTRIBUTOR_ID,DI.DISTRIBUTOR_NAME,CIF.CERTID AS CUSTOMERID,CIF.CUSTOMERNAME,CIF.CUSTOMERTYPE,LPI.BUSINESSTYPE FROM LC_RENT_PLAN LRP INNER JOIN LB_CONTRACT_INFO LCI ON LCI.ID=LRP.CONTRACT_ID INNER JOIN DISTRIBUTOR_INFO DI ON DI.DISTRIBUTOR_NO=LCI.DISTRIBUTOR_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 DATE_FORMAT(SYSDATE(),'%Y/%m/%d')=DATE_FORMAT(STR_TO_DATE(LRP.PLAN_DATE,'%Y/%m/%d'),'%Y/%m/%d')";

View File

@ -104,6 +104,7 @@ public class CreateVoucherServiceImpl {
}
param.put("VOUCHER_TYPE",voucherType);
BizObject user=JBOFactory.createBizObjectQuery(USER_INFO.CLASS_NAME, "USERID='"+userid+"'").getSingleResult(false);
// 调用方法加载凭证信息
this.createVoucher(tx, param,user);
}
@ -115,8 +116,8 @@ public class CreateVoucherServiceImpl {
*/
@SuppressWarnings("unchecked")
private void createVoucher(JBOTransaction tx,Map<String,String> param,BizObject user) throws Exception{
//1:检查生成凭证参数是否齐全
try{
//1:检查生成凭证参数是否齐全
checkParam(param);
}catch(BusinessException e){
e.printStackTrace();
@ -154,6 +155,7 @@ public class CreateVoucherServiceImpl {
vs=new VoucherToV8Impl();
}
if(vs!=null){
// 调用凭证生成的方法
vs.saveMessage(subList, param, user, tx);
}else{
logger.info("凭证生成类未实例化");
@ -272,6 +274,9 @@ public class CreateVoucherServiceImpl {
if("1".equals(bo.getAttribute("IS_CUSTOM_VALUE").getString())){//是否自定义取值
VoucherJavaParamService ps=null;
try{
String valuemode=bo.getAttribute("VALUE_MODE").getString();
System.out.println(valuemode);
Class<VoucherJavaParamService> c=(Class<VoucherJavaParamService>)Class.forName(bo.getAttribute("VALUE_MODE").getString());
ps=c.newInstance();
}catch(Exception e){
@ -287,7 +292,7 @@ public class CreateVoucherServiceImpl {
dataTemp=psi.getParamBasic(tx, basic, param);
}
subData.put("F5", abs);//摘要
subData.put("F5", abs);//摘要
subData.put("F6",sub.getAttribute("id").getString());//科目编码
subData.put("F1",dataTemp.get("ACCOUNT_DATE"));//会计处理日
subData.put("CUSTID",dataTemp.get("CUSTID"));//会计处理日
@ -309,6 +314,7 @@ public class CreateVoucherServiceImpl {
if(dataTemp.containsKey("CONTRACT_ID")){
subData.put("CONTRACT_ID", dataTemp.get("CONTRACT_ID"));
}
param.put("FUNDTYPE", dataTemp.get("FUNDTYPE"));
if(sub.getAttribute("AUXILIARY_TYPE").getString().length()>0){
subData.putAll(this.getAuxiliaryData(tx, param, sub.getAttribute("AUXILIARY_TYPE").getString()));
}
@ -327,6 +333,7 @@ public class CreateVoucherServiceImpl {
VoucherJavaParamService ps=null;
try{
Class<VoucherJavaParamService> c=(Class<VoucherJavaParamService>)Class.forName(con.getAttribute("VALUE_MODE").getString());
System.out.println(con.getAttribute("VALUE_MODE").getString());
ps=c.newInstance();
}catch(Exception e){
ps=null;

View File

@ -92,10 +92,8 @@ public class VoucherToV8Impl implements VoucherService {
log.error("合同号为空,无法构建对应的凭证信息!");
return null;
}
//检查合同ID是否是正确的
if(!Return_Dealer_Margin.equals(modularNumber)&&!Receive_Dealer_Margin.equals(modularNumber)&&!moduleName_value.equals(modularNumber) && !SPECIAL_MODULENAME.equals(modularNumber)){
BizObject contract=JBOFactory.createBizObjectQuery(LB_CONTRACT_INFO.CLASS_NAME, "id=:id").setParameter("id", contracid).getSingleResult(false);
if(contract==null){
message = message + "合同信息为空!";
@ -107,7 +105,6 @@ public class VoucherToV8Impl implements VoucherService {
d.put("dept_name", org.getAttribute("orgname").getString());
}
}
}
v8.setAttributesValue(list.get(i));

View File

@ -30,6 +30,7 @@ public class CreateVoucherRentIncomeMission implements Job {
cvis.CreateVoucher("PZ2018072100000054");//保险理赔 -记录理赔保险费--回租
cvis.CreateVoucher("PZ2018080200000064");//保险理赔 -记录理赔保险费--直租
cvis.CreateVoucher("PZ2018080600000114");//理赔保险费冲抵逾期利息及逾期租金--直租
QuartzUtil.insertLog(startime,"com.tenwa.comm.message.controller.BusinessCancelJob", "success", "成功");
} catch (Exception e) {
QuartzUtil.insertLog(startime,"com.tenwa.comm.message.controller.BusinessCancelJob", "error", "失败");