ROA中的收入计算添加贴息和个人意外险

This commit is contained in:
tangfutang 2021-03-30 16:07:48 +08:00
parent 61654d8585
commit 391a8f230d
6 changed files with 60 additions and 5 deletions

View File

@ -28,7 +28,7 @@
AsControl.OpenView("/Tenwa/Core/TaxInfo/TaxInfoList.jsp", "","_self","");
}
function saveRecord(){
as_save("myiframe0");
as_save("myiframe0" , "goBack()");
}
function setContractTime(param){
setItemValue(0,getRow(),"BEFORE_AFTER",param);

View File

@ -937,6 +937,10 @@
<attribute name="penalty" label="违约金" type="STRING" length="32"/>
<attribute name="break_money" label="逾期利息" type="STRING" length="32"/>
<attribute name="rent" label="租金" type="STRING" length="32"/>
<attribute name="discount_interest_rate" label="贴息税率" type="STRING" length="10"/>
<attribute name="discount_interest_type" label="贴息税率类型" type="STRING" length="32"/>
<attribute name="personal_insurance_rate" label="个人意外险税率" type="STRING" length="10"/>
<attribute name="personal_insurance_type" label="个人意外险税率类型" 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

@ -173,6 +173,10 @@ public class ConditionBean implements Cloneable{
private String strategicCoefficient; // 战略系数
private String strategyROA; // 战略系数
//**********************************************************************众联车贷测算参与融资资金项结束
/* ******* ROA计算所用的参数 ****************/
private String discountInterest; // 贴息(不参与融资)
private String personalInsurance; // 个人意外险
/*****************************/
/***********************************************************************************
* 暂时未使用字段(历史版本字段)
@ -1812,4 +1816,22 @@ public class ConditionBean implements Cloneable{
public void setStrategyROA(String strategyROA) {
this.strategyROA = strategyROA;
}
public String getDiscountInterest() {
return discountInterest;
}
public void setDiscountInterest(String discountInterest) {
this.discountInterest = discountInterest;
}
public String getPersonalInsurance() {
return personalInsurance;
}
public void setPersonalInsurance(String personalInsurance) {
this.personalInsurance = personalInsurance;
}
}

View File

@ -108,15 +108,20 @@ public class ConditionHelper {
BigDecimal handRate =null; //手续费税率
BigDecimal gpsInstallFee =null;//GPS税率
BigDecimal rentRate =null;// 租金税率
BigDecimal discountInterestRate =null;// 贴息税率
BigDecimal personalInsuranceRate =null;// 个人意外险税率
BigDecimal percentage = new BigDecimal("100");
if( pslData!=null && pslData.size()>0){
String leasform = pslData.get(0).get("leasform");
List<Map<String, String>> rateData = DataOperatorUtil.getDataBySql("select t.INTEREST_RATE,t.HAND_RATE,t.gps_install_fee,t.rent from (select INTEREST_RATE,HAND_RATE,gps_install_fee,rent,CONTRACT_DATE from TAX_INFO where CONTRACT_DATE<= DATE_FORMAT(NOW(),'%Y/%m/%d') and BEFORE_AFTER='after' and lease_form='"+leasform+"' union all select INTEREST_RATE,HAND_RATE,gps_install_fee,rent,CONTRACT_DATE from TAX_INFO where CONTRACT_DATE>=DATE_FORMAT(NOW(),'%Y/%m/%d') and BEFORE_AFTER='before' and lease_form='"+leasform+"' ) t order by t.CONTRACT_DATE desc limit 1");
if( rateData!=null && rateData.size()>0 ){
List<Map<String, String>> rateData = DataOperatorUtil.getDataBySql("select t.INTEREST_RATE,t.HAND_RATE,t.gps_install_fee,t.rent,t.discount_interest_rate,t.personal_insurance_rate from (select INTEREST_RATE,HAND_RATE,gps_install_fee,rent,CONTRACT_DATE,discount_interest_rate,personal_insurance_rate from TAX_INFO where CONTRACT_DATE<= DATE_FORMAT(NOW(),'%Y/%m/%d') and BEFORE_AFTER='after' and lease_form='"+leasform+"' union all select INTEREST_RATE,HAND_RATE,gps_install_fee,rent,CONTRACT_DATE,discount_interest_rate,personal_insurance_rate from TAX_INFO where CONTRACT_DATE>=DATE_FORMAT(NOW(),'%Y/%m/%d') and BEFORE_AFTER='before' and lease_form='"+leasform+"' ) t order by t.CONTRACT_DATE desc limit 1");
if( rateData!=null && rateData.size()>0 && rateData.get(0).get("discount_interest_rate") != null && rateData.get(0).get("personal_insurance_rate") != null){
interestRate = BigDecimal.ONE.add( new BigDecimal ( rateData.get(0).get("INTEREST_RATE") ).divide(percentage) );
handRate = BigDecimal.ONE.add( new BigDecimal (rateData.get(0).get("HAND_RATE") ).divide(percentage) );
gpsInstallFee = BigDecimal.ONE.add( new BigDecimal (rateData.get(0).get("gps_install_fee") ).divide( percentage ) );
rentRate = BigDecimal.ONE.add( new BigDecimal ( rateData.get(0).get("rent") ).divide( percentage ) );
discountInterestRate = BigDecimal.ONE.add( new BigDecimal ( rateData.get(0).get("discount_interest_rate") ).divide( percentage ) );
personalInsuranceRate = BigDecimal.ONE.add( new BigDecimal ( rateData.get(0).get("personal_insurance_rate") ).divide( percentage ) );
}else{
throw new BusinessException( "未配置对应税率!" );
}
@ -129,13 +134,14 @@ public class ConditionHelper {
for ( String interestBusiness : interestBusinessList ) {
allInterest = allInterest.add( new BigDecimal( interestBusiness ) );
}
// 手续费
BigDecimal handlingChargeMoney = new BigDecimal( cb.getHandlingChargeMoney() );
// GPS差额
// BigDecimal gpsDifference = new BigDecimal( cb.getGPSDifference() );
BigDecimal gpsDifference = new BigDecimal( productRevenues.get( "GPSDifference" ).get( "GPSDifference" ) );//取产品收益中的GPS差额配置
// 收入
BigDecimal in = allInterest.divide( interestRate , 2, 4 ).add( handlingChargeMoney.divide( handRate, 2, 4 ) ).add( gpsDifference.divide( gpsInstallFee, 2, 4 ) );
BigDecimal in = allInterest.divide( interestRate , 2, 4 ).add( handlingChargeMoney.divide( handRate, 2, 4 ) ).add( gpsDifference.divide( gpsInstallFee, 2, 4 ) ).add( new BigDecimal( cb.getDiscountInterest() ).divide(discountInterestRate , 2 ,4 ) ).add( new BigDecimal( cb.getPersonalInsurance() ).divide( personalInsuranceRate , 2 ,4 ) );
// 租赁年限
int leaseTerm = cb.getLeaseTerm()/12;
// 融资额

View File

@ -110,6 +110,22 @@ public interface TAX_INFO{
*/
public static final String rent = "rent";
/**
* 贴息税率 STRING(10)<br>
*/
public static final String discount_interest_rate = "discount_interest_rate";
/**
* 贴息税率类型 STRING(32)<br>
*/
public static final String discount_interest_type = "discount_interest_type";
/**
* 个人意外险税率 STRING(10)<br>
*/
public static final String personal_insurance_rate = "personal_insurance_rate";
/**
* 个人意外险税率类型 STRING(32)<br>
*/
public static final String personal_insurance_type = "personal_insurance_type";
/**
* 登记人 STRING(32)<br>
*/
public static final String INPUTUSERID = "INPUTUSERID";

View File

@ -45,5 +45,12 @@ Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualn
Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('LB_CONTRACT_INFO_PAY','1038','1038','1','O','ZC_CONTRACT_NUMBER','ZC_CONTRACT_NUMBER','String','','ÖгµºÏͬºÅ','','1','Text','1','1','','','','32','1','0','0','1','0',0,'','0010','','SYS_Designer','2021/03/26 11:36:27','SYS_Designer','2021/03/26 11:42:57','0','','1','','','','');
Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('LB_CONTRACT_INFO_PAY','6060','6060','1','O','CHANNEL','CHANNEL','String','','ÇþµÀ','','1','Text','1','1','','','','32','0','0','0','1','0',0,'','','','SYS_Designer','2021/03/26 11:36:27','SYS_Designer','2021/03/26 11:36:27','0','','1','','','','');
-- 以上生产环境已执行--------------------------------------------
-- 税率维护添加贴息、个人意外险税率
Alter table TAX_INFO add column discount_interest_rate varchar(10) NULL COMMENT '贴息税率' after rent, add column discount_interest_type varchar(32) NULL COMMENT '贴息税率类型' after discount_interest_rate, add column personal_insurance_rate varchar(10) NULL COMMENT '个人意外险税率' after discount_interest_type, add column personal_insurance_type varchar(32) NULL COMMENT '个人意外险税率类型' after personal_insurance_rate;
-- 税率维护添加贴息费率和个人意外险税率
Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('TaxInfoDetails','1320','1320','1','O','discount_interest_rate','discount_interest_rate','String','','贴息税率','%','1','Text','1','3','','','','10','1','0','1','1','0',0,'','','','SYS_Designer','2021/03/30 15:23:43','SYS_Designer','2021/03/30 15:25:44','0','','1','','','','');
Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('TaxInfoDetails','1340','1340','1','O','personal_insurance_rate','personal_insurance_rate','String','','个人意外险税率','%','1','Text','1','3','','','','10','1','0','1','1','0',0,'','','','SYS_Designer','2021/03/30 15:23:43','SYS_Designer','2021/03/30 15:25:44','0','','1','','','','');
Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('TaxInfoList','1300','1300','1','O','discount_interest_rate','discount_interest_rate','String','','贴息税率','%','1','Text','1','1','','','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2021/03/29 18:34:01','SYS_Designer','2021/03/29 18:34:01','','','1','','','','');
Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('TaxInfoList','1320','1320','1','O','personal_insurance_rate','personal_insurance_rate','String','','个人意外险税率','%','1','Text','1','1','','','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2021/03/29 18:34:01','SYS_Designer','2021/03/29 18:34:01','','','1','','','','');