商务测算
This commit is contained in:
parent
4aea2bff75
commit
5821ab4993
@ -548,6 +548,7 @@ CalcControl.RentOrRateView=function(){
|
||||
setEnable(ids2);
|
||||
CalcControl.RateFloatTypeView();
|
||||
setItemRequired(0,"YEAR_RATE",true);
|
||||
setItemValue(0, 0, "RENT_VALUE", "");
|
||||
}
|
||||
|
||||
}else if(rentOrRate == 'rent'){//按租金算年利率
|
||||
@ -715,7 +716,6 @@ function changeRateType(){
|
||||
|
||||
var RATE_FLOAT_TYPE=getItemValue(0,0,"RATE_FLOAT_TYPE");
|
||||
var adjustTypeValue=getItemValue(0,0,"ADJUST_TYPE");
|
||||
|
||||
$("#ADJUST_TYPE").empty();
|
||||
$(adjustType).each(function(){
|
||||
var value=$(this).attr("value");
|
||||
@ -724,9 +724,9 @@ function changeRateType(){
|
||||
}
|
||||
});
|
||||
$("#ADJUST_TYPE").val(adjustTypeValue);
|
||||
if(count>0||adjustTypeValue==""){
|
||||
/* if(count>0||adjustTypeValue==""){
|
||||
$("#ADJUST_TYPE").val("fixed");
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
//根据金额算比例
|
||||
@ -755,7 +755,7 @@ function getRatioByMoney(e){
|
||||
}
|
||||
//计算融资额
|
||||
setItemValue(0, 0, "TOTAL_ALL", allMoney + "");
|
||||
cleanLeaseMoney = allMoney - firstPayment - Number(getItemValue(0, 0, "EQUIP_END_VALUE"));
|
||||
cleanLeaseMoney = allMoney - firstPayment;
|
||||
setItemValue(0, 0, "CLEAN_LEASE_MONEY", cleanLeaseMoney + "")
|
||||
|
||||
for(var key in fundRules){
|
||||
@ -1080,7 +1080,6 @@ function rentOrRateChange(){
|
||||
CalcControl.RentOrRateView();
|
||||
|
||||
//document.all("frame_list_knowing").src = document.all("frame_list_knowing").src;
|
||||
debugger;
|
||||
if(count > 0){
|
||||
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runDelteKnowing","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>,planCName=<%=planCName%>,calType=<%=calType%>");
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -164,6 +164,7 @@ public class ConditionBean implements Cloneable{
|
||||
private String corpus; // 期限内本金
|
||||
private String finalPayment; //尾款
|
||||
private String finalPaymentMethod; //尾款处置方式
|
||||
private String productType; //增加一个产品类型字段方便判断
|
||||
//**********************************************************************【众联车贷测算参与融资资金项结束!】
|
||||
|
||||
/***********************************************************************************
|
||||
@ -1730,5 +1731,10 @@ public class ConditionBean implements Cloneable{
|
||||
public void setDeferStr(Boolean deferStr) {
|
||||
this.deferStr = deferStr;
|
||||
}
|
||||
|
||||
public String getProductType() {
|
||||
return productType;
|
||||
}
|
||||
public void setProductType(String productType) {
|
||||
this.productType = productType;
|
||||
}
|
||||
}
|
||||
|
||||
@ -117,11 +117,7 @@ public class CreateTransactionExecutor implements Transaction {
|
||||
com.amarsoft.awe.util.Transaction Sqlca = com.amarsoft.awe.util.Transaction.createTransaction(tx);
|
||||
String productType = Sqlca.getString(new SqlObject("select attribute2 from business_type where typeno='"+productId+"'"));
|
||||
bean.setProductType(productType);
|
||||
|
||||
if("business_product".equals(productType)) {
|
||||
bean.getCb().setCleanLeaseMoney(new BigDecimal(bean.getCb().getCleanLeaseMoney()).add(new BigDecimal(bean.getCb().getEquipEndValue())).toString());
|
||||
}
|
||||
|
||||
bean.getCb().setProductType(productType);
|
||||
jsonObject.appendElement("year_rate", bean.getCb().getYearRate());
|
||||
FundRentPlanBean rentPlan = this.createRentPlan(bean,tx);
|
||||
this.createFundPlan(rentPlan, bean,tx);
|
||||
|
||||
@ -79,7 +79,7 @@ public class RentalServiceImpl {
|
||||
rent = new BigDecimal(RentTools.getPMT(preRate, cb.getIncomeNumber() + "", cleanLeaseMoney, finalPayment.toString(), cb.getPeriodType())).toString();
|
||||
}
|
||||
} else {
|
||||
rent = new BigDecimal(RentTools.getPMT(preRate, cb.getIncomeNumber() + "", cleanLeaseMoney, cb.getEquipEndValue(), cb.getPeriodType())).toString();
|
||||
rent = new BigDecimal(RentTools.getPMT(preRate, cb.getIncomeNumber() + "", cleanLeaseMoney, "0", cb.getPeriodType())).toString();
|
||||
}
|
||||
if(cb.getRentRound().length()>0){
|
||||
rent=NumberUtils.rentRound(rent, cb.getRentRound(),cb.getRentRoundType());
|
||||
@ -202,8 +202,10 @@ public class RentalServiceImpl {
|
||||
*/
|
||||
public List<String> getNormalRentList(ConditionBean cb, List<String> rent_list, String rent) {
|
||||
BigDecimal finalPayment = new BigDecimal(cb.getFinalPayment()==null?"0":cb.getFinalPayment());
|
||||
String productType = cb.getProductType();
|
||||
for (int i = 0; i < cb.getIncomeNumber(); i++) {
|
||||
if(i == cb.getIncomeNumber() - 1 && finalPayment.compareTo(BigDecimal.ONE) != 0 && "final_payment_method02".equals(cb.getFinalPaymentMethod())) {
|
||||
if(i == cb.getIncomeNumber() - 1 && finalPayment.compareTo(BigDecimal.ONE) != 0
|
||||
&& ("business_product".equals(productType) || "final_payment_method02".equals(cb.getFinalPaymentMethod()))) {
|
||||
rent_list.add(finalPayment.add(new BigDecimal(rent)).toString());
|
||||
} else {
|
||||
rent_list.add(rent);
|
||||
|
||||
@ -970,7 +970,7 @@ public class IrrTools {
|
||||
BigDecimal daoRate=BigDecimal.ZERO; // 1/(1+irr)
|
||||
BigDecimal netflowNow; //净流量现值
|
||||
BigDecimal error = new BigDecimal("0.0000000001"); //误差
|
||||
int size = cashList.size(); //现金流大小
|
||||
int size = cashList.size(); //现金流大小
|
||||
int j = 0; //迭代次数
|
||||
double k = 0;
|
||||
String startDate = "";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user