网银核销的时候经销商保证金红冲

This commit is contained in:
zhangbb 2019-08-13 16:52:48 +08:00
parent a7d4d301ad
commit fdc7582784
2 changed files with 13 additions and 5 deletions

View File

@ -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<BizObject> 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");

View File

@ -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<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);
String contractId = boLRIT.getAttribute("CONTRACT_ID").toString();
String planList = boLRIT.getAttribute("PLAN_LIST").toString();
String rentPlanId = boLRIT.getAttribute("id").toString();
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();
calc.writeBackDistributor(rentPlanId, Sqlca);
}
String sMessage="true";
return sMessage;