fix:提前结清测算功能调整
This commit is contained in:
parent
fa2e6ae924
commit
dd00aacad8
@ -64,7 +64,8 @@
|
||||
ratioRes = terminateInfo.ratio;
|
||||
yearrate = terminateInfo.yearrate;
|
||||
nominalPrice = terminateInfo.nominalPrice;
|
||||
cautionmoney = terminateInfo.cautionmoney;
|
||||
cautionmoney=AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentTerminateHelper","getCautionMoney","contractId="+sReturn[0]);
|
||||
//cautionmoney = terminateInfo.cautionmoney;
|
||||
// alert("contractId=" + sReturn[0]);
|
||||
// alert("paymentnumber=" + paymentnumber);
|
||||
// alert("ratioRes=" + ratioRes);
|
||||
|
||||
52
calc/com/tenwa/reckon/executor/RentTerminateHelper.java
Normal file
52
calc/com/tenwa/reckon/executor/RentTerminateHelper.java
Normal file
@ -0,0 +1,52 @@
|
||||
package com.tenwa.reckon.executor;
|
||||
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.tenwa.reckon.util.Conn;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class RentTerminateHelper {
|
||||
private String contractId;
|
||||
/**
|
||||
* 获取提期结清的 其他应退
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public String getCautionMoney() throws Exception {
|
||||
String fundSql ="select ifnull(round( sum(case lfi.FEE_TYPE when 'feetype2' then FACT_MONEY else 0 end)- sum(case lfi.FEE_TYPE when 'feetype2' then 0 else FACT_MONEY end ),2),0) as over_caution_monry" +
|
||||
" from lc_fund_income lfi where lfi.CONTRACT_ID = ? and lfi.FEE_TYPE in ('feetype2', 'feetype16', 'feetype17')";
|
||||
JBOTransaction tx=null;
|
||||
try {
|
||||
tx= JBOFactory.createJBOTransaction();
|
||||
Conn conn = new Conn(tx);
|
||||
List<Map<String, String>> list = conn.executeQuery(fundSql, this.contractId);
|
||||
if(null != list && list.size() > 0 ){
|
||||
Map<String, String> fundMap = list.get(0);
|
||||
return fundMap.get("over_caution_monry");
|
||||
}else{
|
||||
return "0";
|
||||
}
|
||||
} catch (JBOException e) {
|
||||
tx.rollback();
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
if(tx!=null){
|
||||
tx.commit();
|
||||
}
|
||||
}
|
||||
return "-1";
|
||||
}
|
||||
|
||||
|
||||
public String getContractId() {
|
||||
return contractId;
|
||||
}
|
||||
|
||||
public void setContractId(String contractId) {
|
||||
this.contractId = contractId;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user