|
@@ -176,7 +176,13 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
List<ReviewIncomeExpenditurePlan> planList = new ArrayList<>();
|
|
List<ReviewIncomeExpenditurePlan> planList = new ArrayList<>();
|
|
preOrAfterInterest(reviewFinancingInfo, planList, dict);
|
|
preOrAfterInterest(reviewFinancingInfo, planList, dict);
|
|
|
|
|
|
- planList.sort(Comparator.comparing(ReviewIncomeExpenditurePlan::getIncomeExpenditureDate));
|
|
|
|
|
|
+ if (CollectionUtil.isNotEmpty(planList)) {
|
|
|
|
+ planList.sort(Comparator.comparing(ReviewIncomeExpenditurePlan::getIncomeExpenditureDate));
|
|
|
|
+ int i = 0;
|
|
|
|
+ for (ReviewIncomeExpenditurePlan plan : planList) {
|
|
|
|
+ plan.setRecordNo(++i);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return planList;
|
|
return planList;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1155,19 +1161,7 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
}
|
|
}
|
|
if (StringUtil.isNotEmpty(masterContractNo)) {
|
|
if (StringUtil.isNotEmpty(masterContractNo)) {
|
|
// 设置三方协议编号
|
|
// 设置三方协议编号
|
|
- String quotaBatchStr;
|
|
|
|
- // 判断是新池还是已有池
|
|
|
|
- ReviewQuotaDisburse oldQuotaDisburse = quotaDisburseMapper.selectOne(new QueryWrapper<ReviewQuotaDisburse>()
|
|
|
|
- .eq("business_number", quotaDisburse.getBusinessNumber())
|
|
|
|
- .ne("id", quotaDisburse.getId())
|
|
|
|
- .last("limit 1"));
|
|
|
|
- if (null == oldQuotaDisburse) {
|
|
|
|
- //新池
|
|
|
|
- quotaBatchStr = "01";
|
|
|
|
- } else {
|
|
|
|
- quotaBatchStr = String.valueOf(quotaDisburse.getQuotaDisburseBatch());
|
|
|
|
- }
|
|
|
|
- contractNo = masterContractNo + "-" + quotaBatchStr + "-" + mark + seq;
|
|
|
|
|
|
+ contractNo = masterContractNo + "-" + mark + seq;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return contractNo;
|
|
return contractNo;
|
|
@@ -1307,15 +1301,17 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
if (StringUtils.isBlank(masterContract.getContractNo())) {
|
|
if (StringUtils.isBlank(masterContract.getContractNo())) {
|
|
//生成新的保理合同编号
|
|
//生成新的保理合同编号
|
|
contractNo = serialNumberGenerator.nextValue(ConstantUtil.REVIEW_MASTER_CONTRACT_DOMESTIC_CODE);
|
|
contractNo = serialNumberGenerator.nextValue(ConstantUtil.REVIEW_MASTER_CONTRACT_DOMESTIC_CODE);
|
|
|
|
+ masterContract.setContractNo(contractNo);
|
|
}
|
|
}
|
|
if (StringUtils.isBlank(masterContract.getPoolFactoringFinancingConfirmNo())) {
|
|
if (StringUtils.isBlank(masterContract.getPoolFactoringFinancingConfirmNo())) {
|
|
int batch = quotaDisburse.getQuotaDisburseBatch();
|
|
int batch = quotaDisburse.getQuotaDisburseBatch();
|
|
String batchStr = StringUtil.formatNumber(batch);
|
|
String batchStr = StringUtil.formatNumber(batch);
|
|
poolFactoringFinancingConfirmNo = contractNo + "-" + batchStr + "-" + 2;
|
|
poolFactoringFinancingConfirmNo = contractNo + "-" + batchStr + "-" + 2;
|
|
|
|
+ masterContract.setPoolFactoringFinancingConfirmNo(poolFactoringFinancingConfirmNo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- masterContract.setPoolFactoringFinancingConfirmNo(poolFactoringFinancingConfirmNo);
|
|
|
|
- masterContract.setContractNo(contractNo);
|
|
|
|
|
|
+
|
|
|
|
+
|
|
reviewMasterContractService.addMasterContract(masterContract, quotaDisburse.isVisible());
|
|
reviewMasterContractService.addMasterContract(masterContract, quotaDisburse.isVisible());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1690,7 +1686,7 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
plan.setIncomeExpenditureType(IncomeExpenditureTypeDict.ChildEnum.PRINCIPAL.getCode());
|
|
plan.setIncomeExpenditureType(IncomeExpenditureTypeDict.ChildEnum.PRINCIPAL.getCode());
|
|
plan.setFinalCashFlow(reviewFinancingInfo.getFinancingAmount().negate());
|
|
plan.setFinalCashFlow(reviewFinancingInfo.getFinancingAmount().negate());
|
|
//收款主体默认为债权人
|
|
//收款主体默认为债权人
|
|
- plan.setReceivingSubject(ConstantUtil.CREDITOR);
|
|
|
|
|
|
+// plan.setReceivingSubject(ConstantUtil.CREDITOR);
|
|
planList.add(plan);
|
|
planList.add(plan);
|
|
}
|
|
}
|
|
|
|
|