apzl_leasing/WebContent/Tenwa/Lease/Flow/Rent/CautionMoneyDeduction/CheckCautionDeductionPlanOverMoney.jsp
2018-06-03 22:26:41 +08:00

23 lines
1.6 KiB
Plaintext

<%@page import="jbo.app.tenwa.calc.LC_RENT_INCOME_TEMP"%>
<%@page import="com.amarsoft.app.awe.config.InitDBType"%>
<%@page import="com.amarsoft.are.jbo.BizObject"%>
<%@page import="jbo.app.tenwa.calc.VI_LC_RENT_PLAN"%>
<%@page import="com.amarsoft.are.jbo.JBOFactory"%>
<%@page import="com.amarsoft.are.jbo.JBOTransaction"%>
<%@page import="java.math.BigDecimal"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBeginMDAJAX.jsp"%><%
String flowunid = CurPage.getParameter("flowunid");
String deductionID = CurPage.getParameter("deductionID");
String id = CurPage.getParameter("ID");
//该笔租金对应的保证金抵扣的金额
String dedutionMoney = Sqlca.getString("select fact_money from lc_fund_income_temp where flowunid='"+flowunid+"' and id='"+deductionID+"'");
BigDecimal otherDeductionRent = new BigDecimal(0);//租金对应保证金抵扣其他租金之和
List<BizObject> otherDeductionRentLists = JBOFactory.createBizObjectQuery(LC_RENT_INCOME_TEMP.CLASS_NAME, "flowunid='"+flowunid+"' and DEDUCTION_ID='"+deductionID+"' AND ID<>'"+id+"' ").getResultList(false);
if(otherDeductionRentLists.size()>0){
for(BizObject otherDeductionRentList:otherDeductionRentLists){
otherDeductionRent = otherDeductionRent.add(new BigDecimal(otherDeductionRentList.getAttribute("CORPUS").toString())).add(new BigDecimal(otherDeductionRentList.getAttribute("INTEREST").toString())).add(new BigDecimal(otherDeductionRentList.getAttribute("PENALTY").toString()));
}
}
out.println(new BigDecimal(dedutionMoney).subtract(otherDeductionRent).setScale(2).toString());
%><%@ include file="/IncludeEndAJAX.jsp"%>