经销商保证金红冲增加条件。

This commit is contained in:
zhangbb 2019-08-20 17:20:40 +08:00
parent 5e30e97f2e
commit 96890ce5ce

View File

@ -631,8 +631,11 @@ public class CollectAuditInfoCache {
.setParameter("COLLECT_STATUS", "手工收款")
.setParameter("COLLECT_MSG", "手工扣款")
.setParameter("id", bo.getAttribute("id").toString()).executeUpdate();
BizObject boDDI=JBOFactory.createBizObjectQuery(D_DEPOSITRETURN_INFO.CLASS_NAME,"RENT_PLAN_ID=:rentPlanId").setParameter("rentPlanId", bo.getAttribute("id").toString()).getSingleResult(false);
if(boDDI!=null){
this.writeBackDistributor(bo.getAttribute("id").toString(), Sqlca);
}
this.writeBackDistributor(bo.getAttribute("id").toString(), Sqlca);
}
@ -655,11 +658,11 @@ public class CollectAuditInfoCache {
BizObjectManager bdi = JBOFactory.getFactory().getManager(DISTRIBUTOR_INFO.CLASS_NAME);
for(int c=0;c<ids.length;c++){
BizObject bom = bm.createQuery("select distinct O.contract_id,O.plan_list,O.plan_date,O.id,ca.ACC_NUMBER,ca.ACCOUNT,O.rent from O , jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca where O.contract_id=ca.contract_id and ca.acc_type = 'Debit' and O.id ='"+ids[c]+"'").getSingleResult(false);
BizObject boc = bc.createQuery("id=:id").setParameter("id", bom.getAttribute("id").toString()).getSingleResult(false);
BigDecimal rent =new BigDecimal(boc.getAttribute("rent").getString());
BizObject bom = bm.createQuery("select distinct O.contract_id,O.plan_list,O.plan_date,O.id,O.corpus,O.interest,ca.ACC_NUMBER,ca.ACCOUNT,O.rent from O , jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca where O.contract_id=ca.contract_id and ca.acc_type = 'Debit' and O.id ='"+ids[c]+"'").getSingleResult(false);
BigDecimal corpus =new BigDecimal(bom.getAttribute("corpus").getString());
BigDecimal interest =new BigDecimal(bom.getAttribute("interest").getString());
BigDecimal penalty = new BigDecimal(penaltyArray[c]);
String t_rent = rent.add(penalty).toString();
String t_rent = corpus.add(interest).add(penalty).toString();
//handcraftsingleCollectMoeny方法的最后一个参数原为hire_list现改为客户输入核销罚息参数周亚辉
//代偿不再往租金实收表插入数据
// Map<String, String> map = handcraftsingleCollectMoenyDistrbutor(tx,bc,bom,rent,penaltyArray[c]);
@ -860,7 +863,10 @@ public class CollectAuditInfoCache {
.setParameter("COLLECT_MSG", "批量代收,收款成功")
.setParameter("BATCH_STATUS", "complete")//更新批量处理状态-完成
.setParameter("id", bo.getAttribute("id").toString()).executeUpdate();
this.writeBackDistributor(id,Sqlca);
BizObject boDDI=JBOFactory.createBizObjectQuery(D_DEPOSITRETURN_INFO.CLASS_NAME,"RENT_PLAN_ID=:rentPlanId").setParameter("rentPlanId", id).getSingleResult(false);
if(boDDI!=null){
this.writeBackDistributor(id,Sqlca);
}
bo.setAttributeValue("COLLECT_STATUS", "批量收款");
bo.setAttributeValue("COLLECT_MSG", "批量代收,收款成功");
bo.setAttributeValue("BATCH_STATUS", "complete");
@ -897,7 +903,10 @@ public class CollectAuditInfoCache {
.setParameter("COLLECT_MSG", "批量代收,收款成功")
.setParameter("BATCH_STATUS", "complete")//更新批量处理状态-完成
.setParameter("id", bo.getAttribute("id").toString()).executeUpdate();
this.writeBackDistributor(id,Sqlca);
BizObject boDDI=JBOFactory.createBizObjectQuery(D_DEPOSITRETURN_INFO.CLASS_NAME,"RENT_PLAN_ID=:rentPlanId").setParameter("rentPlanId", id).getSingleResult(false);
if(boDDI!=null){
this.writeBackDistributor(id,Sqlca);
}
bo.setAttributeValue("COLLECT_STATUS", "批量收款");
bo.setAttributeValue("COLLECT_MSG", "批量代收,收款成功");
bo.setAttributeValue("BATCH_STATUS", "complete");