1.网银收款后经销商保证金代偿红冲出现两次问题。
This commit is contained in:
parent
dfa3a6c9a5
commit
84932ccc39
@ -1,6 +1,8 @@
|
||||
package com.tenwa.flow.rent.copyrent;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_RENT_INCOME;
|
||||
import jbo.app.tenwa.calc.LC_RENT_INCOME_TEMP;
|
||||
import jbo.app.tenwa.calc.LC_RENT_PLAN;
|
||||
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO;
|
||||
@ -20,7 +22,7 @@ public class InsertRentPlanStatus extends BaseBussiness{
|
||||
|
||||
List<BizObject> boLRITs=JBOFactory.createBizObjectQuery(LC_RENT_INCOME_TEMP.CLASS_NAME,"flowunid=:flowunid").setParameter("flowunid", flowunid).getResultList(false);
|
||||
BizObjectManager bomLRP = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME, Sqlca.getTransaction());
|
||||
|
||||
|
||||
CollectAuditInfoCache calc = new CollectAuditInfoCache();
|
||||
for(int i=0;i<boLRITs.size();i++){
|
||||
BizObject boLRIT = boLRITs.get(i);
|
||||
@ -30,7 +32,12 @@ public class InsertRentPlanStatus extends BaseBussiness{
|
||||
bomLRP.createQuery("update O set COLLECT_STATUS='ÍøÒøÊÕ¿î',COLLECT_MSG='ÍøÒøÊÕ¿î' where CONTRACT_ID=:CONTRACT_ID and PLAN_LIST=:PLAN_LIST")
|
||||
.setParameter("CONTRACT_ID", contractId).setParameter("PLAN_LIST", planList).executeUpdate();
|
||||
BizObject boDDI=JBOFactory.createBizObjectQuery(D_DEPOSITRETURN_INFO.CLASS_NAME,"RENT_PLAN_ID=:rentPlanId").setParameter("rentPlanId", rentPlanId).getSingleResult(false);
|
||||
if(boDDI!=null){
|
||||
String sSql = "SELECT IFNULL(SUM(IFNULL(O.rent,0)),0) + IFNULL(SUM(IFNULL(O.penalty,0)),0) - IFNULL(SUM(IFNULL(O.corpus_adjust,0)),0) - IFNULL(SUM(IFNULL(O.interest_adjust,0)),0) - IFNULL(SUM(IFNULL(O.penalty_adjust,0)),0) - lrp.rent - getRentPenalty(lrp.payment_number,lrp.plan_list,DATE_FORMAT(SYSDATE(),'%Y/%m/%d')) AS flag FROM lc_rent_income O LEFT JOIN LC_RENT_PLAN lrp ON O.plan_id=lrp.id WHERE O.PLAN_ID='"+rentPlanId+"'";
|
||||
String money = Sqlca.getString(sSql);
|
||||
BigDecimal balance_money = new BigDecimal(money).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
System.out.println("===========租金差额为: "+money);
|
||||
//有代偿记录,并且本次租金已经还完
|
||||
if(boDDI!=null&&balance_money.compareTo(new BigDecimal("0"))>-1){
|
||||
calc.writeBackDistributor(rentPlanId, Sqlca);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user