1.租金红冲流程后更改租金计划表扣款状态。当全部红冲完后,状态清空,红冲部分,则改为‘部分收款’。
This commit is contained in:
parent
0bf990daa1
commit
984052fde1
@ -1,5 +1,6 @@
|
||||
package com.tenwa.lease.flow.rent.rentreback;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -7,6 +8,7 @@ import jbo.app.tenwa.calc.LC_FUND_INCOME;
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP;
|
||||
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 com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
@ -28,14 +30,17 @@ public class LCRentIncomeTempToFormalBusiness extends BaseBussiness{
|
||||
BizObjectManager fiTemp = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME);
|
||||
BizObjectManager riFormal = JBOFactory.getBizObjectManager(LC_RENT_INCOME.CLASS_NAME);
|
||||
BizObjectManager riTemp = JBOFactory.getBizObjectManager(LC_RENT_INCOME_TEMP.CLASS_NAME);
|
||||
BizObjectManager bom_lrp = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME);
|
||||
Sqlca.join(fiFormal);
|
||||
Sqlca.join(fiTemp);
|
||||
Sqlca.join(riFormal);
|
||||
Sqlca.join(riTemp);
|
||||
Sqlca.join(bom_lrp);
|
||||
List<BizObject> fits = DataOperatorUtil.getSetJBO(LC_FUND_INCOME_TEMP.CLASS_NAME, fromCondtion, Sqlca);
|
||||
List<BizObject> rits = DataOperatorUtil.getSetJBO(LC_RENT_INCOME_TEMP.CLASS_NAME, fromCondtion, Sqlca);
|
||||
String fsql="update O set ROLL_BACK=1 where ID=:ID ";
|
||||
String tsql="update O set IS_FLOWING=1 where ID=:ID ";
|
||||
String lsql = "update O set collect_status=:collect_status,collect_msg='×â½ðºì³å' where ID=:ID";
|
||||
Map<String,String>otherProperty=this.getDefaultOtherProperty();
|
||||
if(fits.size()>0){
|
||||
for(BizObject fit:fits){
|
||||
@ -51,6 +56,20 @@ public class LCRentIncomeTempToFormalBusiness extends BaseBussiness{
|
||||
}
|
||||
service.copyRentIncomeInfo(Sqlca, fromCondtion, null, otherProperty, ServiceOperatorEnum.TempToFormal,null);
|
||||
}
|
||||
List<BizObject> lrits = riTemp.createQuery("select plan_id from O where flowunid=:flowunid group by plan_id").setParameter("flowunid", this.getAttribute("flowunid").toString()).getResultList(false);
|
||||
if(lrits.size()>0){
|
||||
for(BizObject lrit:lrits){
|
||||
String status = "";
|
||||
String planId = lrit.getAttribute("plan_id").toString();
|
||||
BizObject bo_lrp = bom_lrp.createQuery("select rent from O where id=:id").setParameter("id", planId).getSingleResult(false);
|
||||
BizObject bo_lri = riFormal.createQuery("select sum(rent) as rent from O where plan_id=:plan_id group by plan_id").setParameter("plan_id", planId).getSingleResult(false);
|
||||
String lriRent = bo_lri.getAttribute("rent").toString();
|
||||
if(new BigDecimal(lriRent).compareTo(new BigDecimal("0"))==1&&new BigDecimal(lriRent).compareTo(new BigDecimal(bo_lrp.getAttribute("rent").toString()))==-1){
|
||||
status = "²¿·ÖÊÕ¿î";
|
||||
}
|
||||
bom_lrp.createQuery(lsql).setParameter("collect_status", status).setParameter("ID", planId).executeUpdate();
|
||||
}
|
||||
}
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user