|
@@ -176,7 +176,13 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
|
List<ReviewIncomeExpenditurePlan> planList = new ArrayList<>();
|
|
|
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;
|
|
|
}
|
|
|
|
|
@@ -1155,19 +1161,7 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
|
}
|
|
|
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;
|
|
@@ -1307,15 +1301,17 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
|
if (StringUtils.isBlank(masterContract.getContractNo())) {
|
|
|
//生成新的保理合同编号
|
|
|
contractNo = serialNumberGenerator.nextValue(ConstantUtil.REVIEW_MASTER_CONTRACT_DOMESTIC_CODE);
|
|
|
+ masterContract.setContractNo(contractNo);
|
|
|
}
|
|
|
if (StringUtils.isBlank(masterContract.getPoolFactoringFinancingConfirmNo())) {
|
|
|
int batch = quotaDisburse.getQuotaDisburseBatch();
|
|
|
String batchStr = StringUtil.formatNumber(batch);
|
|
|
poolFactoringFinancingConfirmNo = contractNo + "-" + batchStr + "-" + 2;
|
|
|
+ masterContract.setPoolFactoringFinancingConfirmNo(poolFactoringFinancingConfirmNo);
|
|
|
}
|
|
|
}
|
|
|
- masterContract.setPoolFactoringFinancingConfirmNo(poolFactoringFinancingConfirmNo);
|
|
|
- masterContract.setContractNo(contractNo);
|
|
|
+
|
|
|
+
|
|
|
reviewMasterContractService.addMasterContract(masterContract, quotaDisburse.isVisible());
|
|
|
}
|
|
|
}
|
|
@@ -1690,7 +1686,7 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
|
plan.setIncomeExpenditureType(IncomeExpenditureTypeDict.ChildEnum.PRINCIPAL.getCode());
|
|
|
plan.setFinalCashFlow(reviewFinancingInfo.getFinancingAmount().negate());
|
|
|
//收款主体默认为债权人
|
|
|
- plan.setReceivingSubject(ConstantUtil.CREDITOR);
|
|
|
+// plan.setReceivingSubject(ConstantUtil.CREDITOR);
|
|
|
planList.add(plan);
|
|
|
}
|
|
|
|