From 513ed0e21e11f46d847ffcb2cf40c61ddcabc574 Mon Sep 17 00:00:00 2001 From: zhangbb Date: Fri, 15 Mar 2019 16:06:20 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B0=86=E5=87=BA=E7=A7=9F=E4=BA=BA=E5=92=8C?= =?UTF-8?q?=E6=89=BF=E7=A7=9F=E4=BA=BA=E8=B4=A6=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=9C=A8=E7=94=9F=E6=88=90=E6=9C=AC=E6=AC=A1=E4=BB=98=E6=AC=BE?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E7=9A=84=E6=97=B6=E5=80=99=E6=8F=92=E5=85=A5?= =?UTF-8?q?=E8=B5=84=E9=87=91=E5=AE=9E=E6=94=B6=E4=B8=B4=E6=97=B6=E8=A1=A8?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flow/fund/flowpayment/FundPayment.java | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPayment.java b/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPayment.java index ac9f05322..0c6131af8 100644 --- a/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPayment.java +++ b/src_tenwa/com/tenwa/flow/fund/flowpayment/FundPayment.java @@ -9,6 +9,8 @@ import jbo.app.tenwa.calc.LC_FUND_INCOME; import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; import jbo.app.tenwa.calc.LC_FUND_PLAN; import jbo.app.tenwa.calc.VI_LC_FUND_PLAN; +import jbo.com.tenwa.lease.comm.LB_LESSOR_INFO; +import jbo.com.tenwa.lease.comm.LB_TENANTRY_INFO; import jbo.com.tenwa.lease.comm.LC_PAY_CONDTION; import jbo.com.tenwa.lease.comm.LC_PAY_CONDTION_TEMP; @@ -126,8 +128,12 @@ public class FundPayment { public String setDeductMoney(JBOTransaction tx) throws Exception{ try{ + BizObject boLFPAMT = JBOFactory.createBizObjectQuery(LC_FUND_PLAN.CLASS_NAME, "id=:id").setParameter("id", equipAMTID).getSingleResult(false); BizObjectManager bomLFIT = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME); + String contractId = boLFPAMT.getAttribute("contract_id").toString(); + BizObject boLLI = JBOFactory.createBizObjectQuery(LB_LESSOR_INFO.CLASS_NAME, "contract_id=:contractId").setParameter("contractId", contractId).getSingleResult(false); + BizObject boLTI = JBOFactory.createBizObjectQuery(LB_TENANTRY_INFO.CLASS_NAME, "contract_id=:contractId").setParameter("contractId", contractId).getSingleResult(false); String incomeID = UUIDUtil.getUUID(); BigDecimal outOverMoney = new BigDecimal(equipOverMoney); tx.join(bomLFIT); @@ -169,6 +175,12 @@ public class FundPayment { boLFITOut.setAttributeValue("CHARGE_LIST", boLCFI.size()+boLCFIT.size()+1); //安鹏要求改为当前时间 //boLFITOut.setAttributeValue("FACT_DATE", boLFPAMT.getAttribute("PLAN_DATE").getString()); + boLFITOut.setAttributeValue("BANK", boLLI.getAttribute("LEASE_ACC_BANK").toString()); + boLFITOut.setAttributeValue("ACCOUNT", boLLI.getAttribute("LEASE_ACC_NAME").toString()); + boLFITOut.setAttributeValue("ACC_NUMBER", boLLI.getAttribute("LEASE_ACC_NUMBER").toString()); + boLFITOut.setAttributeValue("CLIENT_BANK", boLTI.getAttribute("CLIENT_ACC_BANK").toString()); + boLFITOut.setAttributeValue("CLIENT_ACCOUNT", boLTI.getAttribute("CLIENT_ACC_NAME").toString()); + boLFITOut.setAttributeValue("CLIENT_ACCNUMBER", boLTI.getAttribute("CLIENT_ACC_NUMBER").toString()); boLFITOut.setAttributeValue("FACT_DATE", StringFunction.getToday()); boLFITOut.setAttributeValue("ACCOUNTING_DATE", StringFunction.getToday()); boLFITOut.setAttributeValue("FACT_MONEY", inOvermoney); @@ -203,6 +215,12 @@ public class FundPayment { boLFITIn.setAttributeValue("CHARGE_LIST", boLCFI.size()+boLCFIT.size()+1); //安鹏要求改为当前时间 //boLFITOut.setAttributeValue("FACT_DATE", boLFPAMT.getAttribute("PLAN_DATE").getString()); + boLFITIn.setAttributeValue("BANK", boLLI.getAttribute("LEASE_ACC_BANK").toString()); + boLFITIn.setAttributeValue("ACCOUNT", boLLI.getAttribute("LEASE_ACC_NAME").toString()); + boLFITIn.setAttributeValue("ACC_NUMBER", boLLI.getAttribute("LEASE_ACC_NUMBER").toString()); + boLFITIn.setAttributeValue("CLIENT_BANK", boLTI.getAttribute("CLIENT_ACC_BANK").toString()); + boLFITIn.setAttributeValue("CLIENT_ACCOUNT", boLTI.getAttribute("CLIENT_ACC_NAME").toString()); + boLFITIn.setAttributeValue("CLIENT_ACCNUMBER", boLTI.getAttribute("CLIENT_ACC_NUMBER").toString()); boLFITIn.setAttributeValue("FACT_DATE", StringFunction.getToday()); boLFITIn.setAttributeValue("ACCOUNTING_DATE", StringFunction.getToday()); boLFITIn.setAttributeValue("FACT_MONEY", inOvermoney); @@ -238,6 +256,12 @@ public class FundPayment { boEquipAmt.setAttributeValue("CHARGE_LIST", boLCFI.size()+boLCFIT.size()+1); //安鹏要求改为当前时间 //boLFITOut.setAttributeValue("FACT_DATE", boLFPAMT.getAttribute("PLAN_DATE").getString()); + boEquipAmt.setAttributeValue("BANK", boLLI.getAttribute("LEASE_ACC_BANK").toString()); + boEquipAmt.setAttributeValue("ACCOUNT", boLLI.getAttribute("LEASE_ACC_NAME").toString()); + boEquipAmt.setAttributeValue("ACC_NUMBER", boLLI.getAttribute("LEASE_ACC_NUMBER").toString()); + boEquipAmt.setAttributeValue("CLIENT_BANK", boLTI.getAttribute("CLIENT_ACC_BANK").toString()); + boEquipAmt.setAttributeValue("CLIENT_ACCOUNT", boLTI.getAttribute("CLIENT_ACC_NAME").toString()); + boEquipAmt.setAttributeValue("CLIENT_ACCNUMBER", boLTI.getAttribute("CLIENT_ACC_NUMBER").toString()); boEquipAmt.setAttributeValue("FACT_DATE",StringFunction.getToday()); boEquipAmt.setAttributeValue("ACCOUNTING_DATE", StringFunction.getToday()); boEquipAmt.setAttributeValue("FACT_MONEY", new BigDecimal(equipOverMoney).subtract(deductMoney)); @@ -265,6 +289,9 @@ public class FundPayment { try{ BizObject boLFPAMT = JBOFactory.createBizObjectQuery(LC_FUND_PLAN.CLASS_NAME, "id=:id").setParameter("id", equipAMTID).getSingleResult(false); BizObjectManager bomLFIT = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME); + String contractId = boLFPAMT.getAttribute("contract_id").toString(); + BizObject boLLI = JBOFactory.createBizObjectQuery(LB_LESSOR_INFO.CLASS_NAME, "contract_id=:contractId").setParameter("contractId", contractId).getSingleResult(false); + BizObject boLTI = JBOFactory.createBizObjectQuery(LB_TENANTRY_INFO.CLASS_NAME, "contract_id=:contractId").setParameter("contractId", contractId).getSingleResult(false); tx.join(bomLFIT); BizObject boEquipAmt = bomLFIT.newObject(); boEquipAmt.setAttributeValue("QUOT_ID", boLFPAMT.getAttribute("QUOT_ID").getString()); @@ -290,6 +317,12 @@ public class FundPayment { boEquipAmt.setAttributeValue("CHARGE_LIST", boLCFI.size()+boLCFIT.size()+1); //安鹏要求改为当前时间 //boLFITOut.setAttributeValue("FACT_DATE", boLFPAMT.getAttribute("PLAN_DATE").getString()); + boEquipAmt.setAttributeValue("BANK", boLLI.getAttribute("LEASE_ACC_BANK").toString()); + boEquipAmt.setAttributeValue("ACCOUNT", boLLI.getAttribute("LEASE_ACC_NAME").toString()); + boEquipAmt.setAttributeValue("ACC_NUMBER", boLLI.getAttribute("LEASE_ACC_NUMBER").toString()); + boEquipAmt.setAttributeValue("CLIENT_BANK", boLTI.getAttribute("CLIENT_ACC_BANK").toString()); + boEquipAmt.setAttributeValue("CLIENT_ACCOUNT", boLTI.getAttribute("CLIENT_ACC_NAME").toString()); + boEquipAmt.setAttributeValue("CLIENT_ACCNUMBER", boLTI.getAttribute("CLIENT_ACC_NUMBER").toString()); boEquipAmt.setAttributeValue("FACT_DATE", StringFunction.getToday()); boEquipAmt.setAttributeValue("ACCOUNTING_DATE", StringFunction.getToday()); boEquipAmt.setAttributeValue("FACT_MONEY", new BigDecimal(equipOverMoney)); @@ -317,9 +350,14 @@ public class FundPayment { try{ String[] ids = planids.split("@"); String[] moneys = overmoneys.split("@"); + BizObjectManager bomLFIT = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME); + BizObject lit = bomLFIT.createQuery("flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + String contractId = lit.getAttribute("contract_id").toString(); + BizObject boLLI = JBOFactory.createBizObjectQuery(LB_LESSOR_INFO.CLASS_NAME, "contract_id=:contractId").setParameter("contractId", contractId).getSingleResult(false); + BizObject boLTI = JBOFactory.createBizObjectQuery(LB_TENANTRY_INFO.CLASS_NAME, "contract_id=:contractId").setParameter("contractId", contractId).getSingleResult(false); for(int i=0;i boLCFIT = JBOFactory.createBizObjectQuery(LC_FUND_INCOME_TEMP.CLASS_NAME, "PLAN_ID=:PLAN_ID and IS_FLOWING = '0' and ROLL_BACK='0' and PAY_STATUS is null").setParameter("PLAN_ID", equipAMTID) .getResultList(false); boLFIT.setAttributeValue("CHARGE_LIST", boLCFI.size()+boLCFIT.size()+1); + boLFIT.setAttributeValue("FACT_DATE", StringFunction.getToday()); boLFIT.setAttributeValue("ACCOUNTING_DATE", StringFunction.getToday()); boLFIT.setAttributeValue("FACT_MONEY", new BigDecimal(bo.getAttribute("OVERMONEY").getString()));