diff --git a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java index bf5af3a8c..f39b4d319 100644 --- a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java +++ b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java @@ -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 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");