Merge branch 'release20211231' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into release20211231

This commit is contained in:
zzk 2022-04-26 10:47:21 +08:00
commit 970089b1cb
2 changed files with 17 additions and 1 deletions

View File

@ -313,14 +313,20 @@ public class CreateTransactionExecutor implements Transaction {
public String carRunOnhire(com.amarsoft.awe.util.Transaction Sqlca) throws Exception {
JBOTransaction tx=null;
BizObjectManager Bm=JBOFactory.getBizObjectManager(LC_CALC_CONDITION.CLASS_NAME, Sqlca);
BizObjectManager lprrM=JBOFactory.getBizObjectManager(LC_PAY_RENT_PLAN.CLASS_NAME, Sqlca);
BizObject boLCC = Bm.createQuery("contract_id='" + contractId + "'").getSingleResult(true);
BizObjectManager bmLCI=JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME, Sqlca);
BizObject boLCI = bmLCI.createQuery("id='" + contractId + "'").getSingleResult(false);
List<BizObject> lprrs = lprrM.createQuery(" payment_number=:payment_number ").setParameter("payment_number", this.plannumber ).getResultList(false);
//»ñÈ¡ÆÚ´Î
if(boLCC != null) {
String settleMethod = boLCC.getAttribute("SETTLE_METHOD").getString();
String defaultDueDay = ProductParamUtil.getProductParameterValue(productId, "PRD0301", settleMethod, "DefaultDueDay");
int incomeNumber = boLCC.getAttribute("INCOME_NUMBER").getInt();
// int incomeNumber = boLCC.getAttribute("INCOME_NUMBER").getInt();
int incomeNumber = lprrs.size() ;
//ÆÚ³õ-ÆÚÄ©
String periodType = boLCC.getAttribute("PERIOD_TYPE").getString();
String incomeIntervalMonth = boLCC.getAttribute("INCOME_INTERVAL_MONTH").getInt() + "";
@ -358,6 +364,7 @@ public class CreateTransactionExecutor implements Transaction {
}
boLCC.setAttributeValue("start_date", startDate);
boLCC.setAttributeValue("lease_amt_date", startDate);
boLCC.setAttributeValue("INCOME_NUMBER", incomeNumber);
if(planDateList.size()>0)boLCC.setAttributeValue("first_plan_date", planDateList.get(0));
if(planDateList.size()>1)boLCC.setAttributeValue("second_plan_date", planDateList.get(1));
Bm.saveObject(boLCC);

View File

@ -43,6 +43,7 @@ public class SegmentedFinancingExecutor extends FundRentPlanExecutor {
List<String> overCorpuss = new ArrayList<>();
PlanDateServiceImpl pdsi = new PlanDateServiceImpl( tx );
ConditionBean cb = tcb.getCb();
BigDecimal maxIncomeNumber = BigDecimal.ZERO;
for ( BizObject bo : bos ) {
// ·ÖκÅ
String subsectionNumber = bo.getAttribute( "SUBSECTION_NUMBER" ).getString();
@ -54,6 +55,10 @@ public class SegmentedFinancingExecutor extends FundRentPlanExecutor {
BigDecimal preRate = rate.divide( incomeNumberYear, 20, 4 );
// ÆÚ´Î
BigDecimal incomeNumber = new BigDecimal( bo.getAttribute( "INCOME_NUMBER" ).getString() );
if(incomeNumber.compareTo(maxIncomeNumber) > 0 ) {
maxIncomeNumber = incomeNumber;
}
cb.setIncomeNumber( incomeNumber.intValue() );
List<String> planDateList = pdsi.getPlanDateList( cb, null );
if ( planDateList.size() > dates.size() ) {
@ -179,6 +184,10 @@ public class SegmentedFinancingExecutor extends FundRentPlanExecutor {
}
}
}
//将分段融的最大值赋值给测算期次
cb.setIncomeNumber( maxIncomeNumber.intValue() );
//分段融目前没有配置还款间隔默认为月付租赁期限和租赁次数一致
cb.setLeaseTerm( maxIncomeNumber.intValue() );
FundRentPlanBean fundRentPlanBean = new FundRentPlanBean();
fundRentPlanBean.setCorpusOverageBusinessList( overCorpuss );
fundRentPlanBean.setCorpusBusinessList( corpuss );