diff --git a/WebContent/Tenwa/Core/TaxInfo/TaxInfoDetials.jsp b/WebContent/Tenwa/Core/TaxInfo/TaxInfoDetials.jsp index 80d93621a..863a3f6a0 100644 --- a/WebContent/Tenwa/Core/TaxInfo/TaxInfoDetials.jsp +++ b/WebContent/Tenwa/Core/TaxInfo/TaxInfoDetials.jsp @@ -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); diff --git a/WebContent/WEB-INF/etc/jbo/jbo_comm.xml b/WebContent/WEB-INF/etc/jbo/jbo_comm.xml index 40fc98bc6..277882a20 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_comm.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_comm.xml @@ -937,6 +937,10 @@ + + + + diff --git a/calc/com/tenwa/reckon/bean/ConditionBean.java b/calc/com/tenwa/reckon/bean/ConditionBean.java index cb0dc16ba..183f6f2e0 100644 --- a/calc/com/tenwa/reckon/bean/ConditionBean.java +++ b/calc/com/tenwa/reckon/bean/ConditionBean.java @@ -173,6 +173,10 @@ public class ConditionBean implements Cloneable{ private String strategicCoefficient; // սϵ private String strategyROA; // սϵ //**********************************************************************ʽ + /* ******* ROAõIJ ****************/ + 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; + } + + } diff --git a/calc/com/tenwa/reckon/help/ConditionHelper.java b/calc/com/tenwa/reckon/help/ConditionHelper.java index e7a08fdea..a595d22ff 100644 --- a/calc/com/tenwa/reckon/help/ConditionHelper.java +++ b/calc/com/tenwa/reckon/help/ConditionHelper.java @@ -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> 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> 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; // ʶ diff --git a/src_jbo/jbo/com/tenwa/entity/comm/taxinfo/TAX_INFO.java b/src_jbo/jbo/com/tenwa/entity/comm/taxinfo/TAX_INFO.java index fb0898406..7cee60f79 100644 --- a/src_jbo/jbo/com/tenwa/entity/comm/taxinfo/TAX_INFO.java +++ b/src_jbo/jbo/com/tenwa/entity/comm/taxinfo/TAX_INFO.java @@ -110,6 +110,22 @@ public interface TAX_INFO{ */ public static final String rent = "rent"; /** + * Ϣ˰ STRING(10)
+ */ + public static final String discount_interest_rate = "discount_interest_rate"; + /** + * Ϣ˰ STRING(32)
+ */ + public static final String discount_interest_type = "discount_interest_type"; + /** + * ˰ STRING(10)
+ */ + public static final String personal_insurance_rate = "personal_insurance_rate"; + /** + * ˰ STRING(32)
+ */ + public static final String personal_insurance_type = "personal_insurance_type"; + /** * Ǽ STRING(32)
*/ public static final String INPUTUSERID = "INPUTUSERID"; diff --git a/src_sql/预投SQL/v20210415/tft20210415.sql b/src_sql/预投SQL/v20210415/tft20210415.sql index ea3f08320..93a204e3d 100644 --- a/src_sql/预投SQL/v20210415/tft20210415.sql +++ b/src_sql/预投SQL/v20210415/tft20210415.sql @@ -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','','','',''); \ No newline at end of file