From fdc758278453171bf4905a01cf46fc162db2cae7 Mon Sep 17 00:00:00 2001 From: zhangbb Date: Tue, 13 Aug 2019 16:52:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E9=93=B6=E6=A0=B8=E9=94=80=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E7=BB=8F=E9=94=80=E5=95=86=E4=BF=9D=E8=AF=81?= =?UTF-8?q?=E9=87=91=E7=BA=A2=E5=86=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collectaudit/cache/CollectAuditInfoCache.java | 11 +++++++---- .../flow/rent/copyrent/InsertRentPlanStatus.java | 7 ++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java index 86793fffe..c4103780d 100644 --- a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java +++ b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditInfoCache.java @@ -58,7 +58,7 @@ public class CollectAuditInfoCache { * @return * @throws Exception */ - public void writeBackDistributor(String RENT_PLAN_ID,JBOTransaction tx) throws JBOException{ + public void writeBackDistributor(String RENT_PLAN_ID,Transaction Sqlca) throws JBOException{ BizObjectManager bmDCI = JBOFactory.getFactory().getManager(D_DEPOSITCHARGE_INFO.CLASS_NAME); BizObjectManager bmDRI = JBOFactory.getFactory().getManager(D_DEPOSITRETURN_INFO.CLASS_NAME); BizObjectManager bmDI = JBOFactory.getFactory().getManager(DISTRIBUTOR_INFO.CLASS_NAME); @@ -619,6 +619,7 @@ public class CollectAuditInfoCache { parms.append(",'"+str+"'"); } } + Transaction Sqlca = Transaction.createTransaction(tx); BizObjectManager bm = JBOFactory.getFactory().getManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME); BizObjectManager bc = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME); List bolist = bm.createQuery("select distinct O.contract_id,O.id,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 in ("+parms.toString()+")").getResultList(false); @@ -630,7 +631,8 @@ public class CollectAuditInfoCache { .setParameter("COLLECT_STATUS", "手工收款") .setParameter("COLLECT_MSG", "手工扣款") .setParameter("id", bo.getAttribute("id").toString()).executeUpdate(); - this.writeBackDistributor(bo.getAttribute("id").toString(), tx); + + this.writeBackDistributor(bo.getAttribute("id").toString(), Sqlca); } @@ -777,6 +779,7 @@ public class CollectAuditInfoCache { * @throws Exception */ public String queryBatchCollectStatus(JBOTransaction tx) throws Exception{ + Transaction Sqlca = Transaction.createTransaction(tx); BizObjectManager bm = JBOFactory.getFactory().getManager(VI_LC_AUDIT_RENT_PLAN.CLASS_NAME); BizObjectManager bc = JBOFactory.getFactory().getManager(LC_RENT_PLAN.CLASS_NAME); String[] ids = id.split("@"); @@ -843,7 +846,7 @@ public class CollectAuditInfoCache { .setParameter("COLLECT_MSG", "批量代收,收款成功") .setParameter("BATCH_STATUS", "complete")//更新批量处理状态-完成 .setParameter("id", bo.getAttribute("id").toString()).executeUpdate(); - this.writeBackDistributor(id,tx); + this.writeBackDistributor(id,Sqlca); bo.setAttributeValue("COLLECT_STATUS", "批量收款"); bo.setAttributeValue("COLLECT_MSG", "批量代收,收款成功"); bo.setAttributeValue("BATCH_STATUS", "complete"); @@ -880,7 +883,7 @@ public class CollectAuditInfoCache { .setParameter("COLLECT_MSG", "批量代收,收款成功") .setParameter("BATCH_STATUS", "complete")//更新批量处理状态-完成 .setParameter("id", bo.getAttribute("id").toString()).executeUpdate(); - this.writeBackDistributor(id,tx); + this.writeBackDistributor(id,Sqlca); bo.setAttributeValue("COLLECT_STATUS", "批量收款"); bo.setAttributeValue("COLLECT_MSG", "批量代收,收款成功"); bo.setAttributeValue("BATCH_STATUS", "complete"); diff --git a/src_tenwa/com/tenwa/flow/rent/copyrent/InsertRentPlanStatus.java b/src_tenwa/com/tenwa/flow/rent/copyrent/InsertRentPlanStatus.java index 0b59f41e6..75698bc90 100644 --- a/src_tenwa/com/tenwa/flow/rent/copyrent/InsertRentPlanStatus.java +++ b/src_tenwa/com/tenwa/flow/rent/copyrent/InsertRentPlanStatus.java @@ -7,22 +7,27 @@ import jbo.app.tenwa.calc.LC_RENT_PLAN; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; import com.amarsoft.awe.util.Transaction; +import com.tenwa.collectaudit.cache.CollectAuditInfoCache; import com.tenwa.flow.baseBussion.BaseBussiness; public class InsertRentPlanStatus extends BaseBussiness{ public Object run(Transaction Sqlca) throws Exception{ this.initBussinessParam(Sqlca.getTransaction()); String flowunid = (String)this.getAttribute("ObjectNo"); + List 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