1.将出租人和承租人账户信息在生成本次付款明细的时候插入资金实收临时表。

This commit is contained in:
zhangbb 2019-03-15 16:06:20 +08:00
parent 6b141a50b4
commit 513ed0e21e

View File

@ -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<ids.length;i++){
BizObject boLFP = JBOFactory.createBizObjectQuery(LC_FUND_PLAN.CLASS_NAME, "id=:id").setParameter("id", ids[i]).getSingleResult(false);
BizObjectManager bomLFIT = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME);
tx.join(bomLFIT);
BizObject boLFI = bomLFIT.newObject();
boLFI.setAttributeValue("QUOT_ID", boLFP.getAttribute("QUOT_ID").getString());
@ -345,6 +383,12 @@ public class FundPayment {
boLFI.setAttributeValue("CHARGE_LIST", boLCFI.size()+boLCFIT.size()+1);
//安鹏要求改为当前时间
//boLFITOut.setAttributeValue("FACT_DATE", boLFPAMT.getAttribute("PLAN_DATE").getString());
boLFI.setAttributeValue("BANK", boLLI.getAttribute("LEASE_ACC_BANK").toString());
boLFI.setAttributeValue("ACCOUNT", boLLI.getAttribute("LEASE_ACC_NAME").toString());
boLFI.setAttributeValue("ACC_NUMBER", boLLI.getAttribute("LEASE_ACC_NUMBER").toString());
boLFI.setAttributeValue("CLIENT_BANK", boLTI.getAttribute("CLIENT_ACC_BANK").toString());
boLFI.setAttributeValue("CLIENT_ACCOUNT", boLTI.getAttribute("CLIENT_ACC_NAME").toString());
boLFI.setAttributeValue("CLIENT_ACCNUMBER", boLTI.getAttribute("CLIENT_ACC_NUMBER").toString());
boLFI.setAttributeValue("FACT_DATE", StringFunction.getToday());
boLFI.setAttributeValue("ACCOUNTING_DATE", StringFunction.getToday());
boLFI.setAttributeValue("FACT_MONEY", new BigDecimal(moneys[i]));
@ -418,6 +462,7 @@ public class FundPayment {
List<BizObject> 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()));