From b8d4f65234187f1014a6570e4aafeb29f47e8b11 Mon Sep 17 00:00:00 2001 From: 58261 <58261@DESKTOP-AAAC71Q> Date: Thu, 27 Sep 2018 14:39:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E9=87=91=E6=8A=B5=E6=89=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CopyFundIncomeTempToFormal.java | 55 +++++++++---------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/src_tenwa/com/tenwa/flow/fund/actualpayment/CopyFundIncomeTempToFormal.java b/src_tenwa/com/tenwa/flow/fund/actualpayment/CopyFundIncomeTempToFormal.java index 0249fb2e9..1258ff9c2 100644 --- a/src_tenwa/com/tenwa/flow/fund/actualpayment/CopyFundIncomeTempToFormal.java +++ b/src_tenwa/com/tenwa/flow/fund/actualpayment/CopyFundIncomeTempToFormal.java @@ -6,45 +6,44 @@ import java.util.Map; 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 com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOFactory; -import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; +import com.amarsoft.biz.bizlet.Bizlet; import com.tenwa.comm.util.jboutil.DataOperatorUtil; -import com.tenwa.flow.baseBussion.BaseBussiness; +import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService; +import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum; +import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp; /** - * 拷贝资金付款数据到正式表(实际付款通过) + * 保证金抵扣拷贝收付数据临时表到正式表 * @author zhulh * */ -public class CopyFundIncomeTempToFormal extends BaseBussiness{ +public class CopyFundIncomeTempToFormal extends Bizlet{ public Object run(Transaction Sqlca) throws Exception{ - this.initBussinessParam(Sqlca.getTransaction()); - String sFlowUnid = (String)this.getAttribute("ObjectNo"); - BizObjectManager bomLFIT = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME); - Sqlca.join(bomLFIT); - bomLFIT.createQuery("update O set is_flowing='1' where flowunid=:FLOWUNID").setParameter("FLOWUNID", sFlowUnid).executeUpdate(); - List bos = bomLFIT.createQuery("flowunid=:flowunid").setParameter("flowunid", sFlowUnid).getResultList(false); - if(bos.size() > 0){ - for(BizObject bo:bos){ - Map fromCondition = new HashMap(); - fromCondition.put("INCOME_ID", bo.getAttribute("INCOME_ID").getString()); - Map toCondition = new HashMap(); - toCondition.put("ID", bo.getAttribute("INCOME_ID").getString()); - Map otherProperty = new HashMap(); - otherProperty.put("FLOWUNID", ""); - String payType = bo.getAttribute("PAY_TYPE").getString(); - if("pay_type_out".equals(payType)){ - otherProperty.put("PAY_STATUS", "have_paid"); - }else{ - otherProperty.put("PAY_STATUS", ""); - otherProperty.put("ROLL_BACK", "0"); - } - DataOperatorUtil.copySingleJBO(LC_FUND_INCOME_TEMP.CLASS_NAME, fromCondition,LC_FUND_INCOME.CLASS_NAME, toCondition, otherProperty,Sqlca.getTransaction()); - } + String flowunid = (String)this.getAttribute("ObjectNo"); + SqlObject so = new SqlObject("update lc_rent_income_temp set is_flowing='1' where flowunid='"+flowunid+"'"); + Sqlca.executeSQL(so); + so = new SqlObject("update lc_fund_income_temp set is_flowing='1' where flowunid='"+flowunid+"'"); + Sqlca.executeSQL(so); + List bos = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME).createQuery("flowunid=:flowunid").setParameter("flowunid", flowunid).getResultList(false); + for(BizObject bo:bos){ + Map fromCondition = new HashMap(); + fromCondition.put("ID", bo.getAttribute("ID").getString()); + Map otherProperty = new HashMap(); + otherProperty.put("FLOWUNID", ""); + otherProperty.put("PAY_STATUS", "have_paid"); + String deductionID = DataOperatorUtil.copySingleJBO(LC_FUND_INCOME_TEMP.CLASS_NAME, fromCondition,LC_FUND_INCOME.CLASS_NAME, null, otherProperty,Sqlca.getTransaction()); + fromCondition.clear(); + otherProperty.clear(); + fromCondition.put("DEDUCTION_ID", bo.getAttribute("ID").getString()); + otherProperty.put("DEDUCTION_ID", deductionID); + DataOperatorUtil.copySingleJBO(LC_RENT_INCOME_TEMP.CLASS_NAME, fromCondition,LC_RENT_INCOME.CLASS_NAME, null, otherProperty,Sqlca.getTransaction()); } String sMessage="true"; return sMessage;