|
@@ -238,7 +238,9 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
public void editReviewQuotaDisburse(ReviewQuotaDisburse quotaDisburse) throws Exception {
|
|
public void editReviewQuotaDisburse(ReviewQuotaDisburse quotaDisburse) throws Exception {
|
|
if (null != quotaDisburse) {
|
|
if (null != quotaDisburse) {
|
|
// 验证额度支用数据的合法性
|
|
// 验证额度支用数据的合法性
|
|
- checkQuotaDisburseLegality(quotaDisburse);
|
|
|
|
|
|
+ if (ConstantConversionUtil.APPROVAL_RESULT_PASS.equals(quotaDisburse.getApprovalConclusion())) {
|
|
|
|
+ checkQuotaDisburseLegality(quotaDisburse);
|
|
|
|
+ }
|
|
//IRR处理
|
|
//IRR处理
|
|
if (quotaDisburse.getPlanIrrStr() != null) {
|
|
if (quotaDisburse.getPlanIrrStr() != null) {
|
|
Number number = PercentageUtil.convertDouble(quotaDisburse.getPlanIrrStr());
|
|
Number number = PercentageUtil.convertDouble(quotaDisburse.getPlanIrrStr());
|
|
@@ -262,6 +264,9 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
financingBasicInfo.setFinancingAmount(quotaDisburse.getReviewFinancingInfo().getFinancingAmount());
|
|
financingBasicInfo.setFinancingAmount(quotaDisburse.getReviewFinancingInfo().getFinancingAmount());
|
|
}
|
|
}
|
|
financingBasicInfoService.updateById(financingBasicInfo);
|
|
financingBasicInfoService.updateById(financingBasicInfo);
|
|
|
|
+ }else if (ConstantConversionUtil.APPROVAL_RESULT_BACK.equals(quotaDisburse.getApprovalConclusion())){
|
|
|
|
+ financingBasicInfo.setCurrentStage("");
|
|
|
|
+ financingBasicInfoService.updateById(financingBasicInfo);
|
|
}
|
|
}
|
|
|
|
|
|
Map<String, Object> procVariables = new HashMap<>();
|
|
Map<String, Object> procVariables = new HashMap<>();
|
|
@@ -298,232 +303,236 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
//保存主表历史信息
|
|
//保存主表历史信息
|
|
ReviewQuotaDisburseHis reviewQuotaDisburseHis = new ReviewQuotaDisburseHis();
|
|
ReviewQuotaDisburseHis reviewQuotaDisburseHis = new ReviewQuotaDisburseHis();
|
|
BeanUtils.copyProperties(quotaDisburse, reviewQuotaDisburseHis, "id");
|
|
BeanUtils.copyProperties(quotaDisburse, reviewQuotaDisburseHis, "id");
|
|
|
|
+ reviewQuotaDisburseHis.setReviewQuotaDisburseId(quotaDisburse.getId());
|
|
reviewQuotaDisburseHisService.save(reviewQuotaDisburseHis);
|
|
reviewQuotaDisburseHisService.save(reviewQuotaDisburseHis);
|
|
// 融资信息
|
|
// 融资信息
|
|
- ReviewFinancingInfo financingInfo = reviewFinancingInfoService.getOne(new QueryWrapper<ReviewFinancingInfo>().eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
- if (financingInfo != null) {
|
|
|
|
- ReviewFinancingInfoHis reviewFinancingInfoHis = new ReviewFinancingInfoHis();
|
|
|
|
- BeanUtils.copyProperties(financingInfo, reviewFinancingInfoHis, "id");
|
|
|
|
- reviewFinancingInfoHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
- reviewFinancingInfoHisService.save(reviewFinancingInfoHis);
|
|
|
|
- }
|
|
|
|
- // 填充收支计划信息
|
|
|
|
- List<ReviewIncomeExpenditurePlan> list = reviewIncomeExpenditurePlanService.list(new QueryWrapper<ReviewIncomeExpenditurePlan>().eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
- if (list != null && list.size() > 0) {
|
|
|
|
- for (ReviewIncomeExpenditurePlan reviewIncomeExpenditurePlan : list) {
|
|
|
|
- ReviewIncomeExpenditurePlanHis reviewIncomeExpenditurePlanHis = new ReviewIncomeExpenditurePlanHis();
|
|
|
|
- BeanUtils.copyProperties(reviewIncomeExpenditurePlan, reviewIncomeExpenditurePlanHis, "id");
|
|
|
|
- reviewIncomeExpenditurePlanHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
- reviewIncomeExpenditurePlanHisService.save(reviewIncomeExpenditurePlanHis);
|
|
|
|
|
|
+ if (ConstantConversionUtil.APPROVAL_RESULT_PASS.equals(quotaDisburse.getApprovalConclusion())) {
|
|
|
|
+ ReviewFinancingInfo financingInfo = reviewFinancingInfoService.getOne(new QueryWrapper<ReviewFinancingInfo>().eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
+ if (financingInfo != null) {
|
|
|
|
+ ReviewFinancingInfoHis reviewFinancingInfoHis = new ReviewFinancingInfoHis();
|
|
|
|
+ BeanUtils.copyProperties(financingInfo, reviewFinancingInfoHis, "id");
|
|
|
|
+ reviewFinancingInfoHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
+ reviewFinancingInfoHisService.save(reviewFinancingInfoHis);
|
|
}
|
|
}
|
|
- }
|
|
|
|
- // 填充主合同信息
|
|
|
|
- ReviewMasterContract masterContract = reviewMasterContractService.getOne(new QueryWrapper<ReviewMasterContract>()
|
|
|
|
- .eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
- if (null != masterContract) {
|
|
|
|
- ReviewMasterContractHis reviewMasterContractHis = new ReviewMasterContractHis();
|
|
|
|
- BeanUtils.copyProperties(masterContract, reviewMasterContractHis, "id");
|
|
|
|
- reviewMasterContractHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
- reviewMasterContractHisService.save(reviewMasterContractHis);
|
|
|
|
- List<ReviewMasterContractDebtor> reviewMasterContractDebtorList = reviewMasterContractDebtorService.list(new QueryWrapper<ReviewMasterContractDebtor>().eq("review_master_contract_id", masterContract.getId()));
|
|
|
|
- if (null != reviewMasterContractDebtorList && reviewMasterContractDebtorList.size() > 0) {
|
|
|
|
- for (ReviewMasterContractDebtor reviewMasterContractDebtor : reviewMasterContractDebtorList) {
|
|
|
|
- ReviewMasterContractDebtorHis debtorHis = new ReviewMasterContractDebtorHis();
|
|
|
|
- BeanUtils.copyProperties(reviewMasterContractDebtor, debtorHis, "id");
|
|
|
|
- debtorHis.setReviewMasterContractHisId(reviewMasterContractHis.getId());
|
|
|
|
- reviewMasterContractDebtorHisService.save(debtorHis);
|
|
|
|
|
|
+ // 填充收支计划信息
|
|
|
|
+ List<ReviewIncomeExpenditurePlan> list = reviewIncomeExpenditurePlanService.list(new QueryWrapper<ReviewIncomeExpenditurePlan>().eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
+ if (list != null && list.size() > 0) {
|
|
|
|
+ for (ReviewIncomeExpenditurePlan reviewIncomeExpenditurePlan : list) {
|
|
|
|
+ ReviewIncomeExpenditurePlanHis reviewIncomeExpenditurePlanHis = new ReviewIncomeExpenditurePlanHis();
|
|
|
|
+ BeanUtils.copyProperties(reviewIncomeExpenditurePlan, reviewIncomeExpenditurePlanHis, "id");
|
|
|
|
+ reviewIncomeExpenditurePlanHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
+ reviewIncomeExpenditurePlanHisService.save(reviewIncomeExpenditurePlanHis);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 填充主合同信息
|
|
|
|
+ ReviewMasterContract masterContract = reviewMasterContractService.getOne(new QueryWrapper<ReviewMasterContract>()
|
|
|
|
+ .eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
+ if (null != masterContract) {
|
|
|
|
+ ReviewMasterContractHis reviewMasterContractHis = new ReviewMasterContractHis();
|
|
|
|
+ BeanUtils.copyProperties(masterContract, reviewMasterContractHis, "id");
|
|
|
|
+ reviewMasterContractHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
+ reviewMasterContractHisService.save(reviewMasterContractHis);
|
|
|
|
+ List<ReviewMasterContractDebtor> reviewMasterContractDebtorList = reviewMasterContractDebtorService.list(new QueryWrapper<ReviewMasterContractDebtor>().eq("review_master_contract_id", masterContract.getId()));
|
|
|
|
+ if (null != reviewMasterContractDebtorList && reviewMasterContractDebtorList.size() > 0) {
|
|
|
|
+ for (ReviewMasterContractDebtor reviewMasterContractDebtor : reviewMasterContractDebtorList) {
|
|
|
|
+ ReviewMasterContractDebtorHis debtorHis = new ReviewMasterContractDebtorHis();
|
|
|
|
+ BeanUtils.copyProperties(reviewMasterContractDebtor, debtorHis, "id");
|
|
|
|
+ debtorHis.setReviewMasterContractHisId(reviewMasterContractHis.getId());
|
|
|
|
+ reviewMasterContractDebtorHisService.save(debtorHis);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
- // 填充应收转让信息
|
|
|
|
- ReviewTransferReceivable transferReceivable = reviewTransferReceivableService.getOne(new QueryWrapper<ReviewTransferReceivable>()
|
|
|
|
- .eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
- if (null != transferReceivable) {
|
|
|
|
- ReviewTransferReceivableHis transferReceivableHis = new ReviewTransferReceivableHis();
|
|
|
|
- BeanUtils.copyProperties(transferReceivable, transferReceivableHis, "id");
|
|
|
|
- transferReceivableHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
- reviewTransferReceivableHisService.save(transferReceivableHis);
|
|
|
|
- }
|
|
|
|
|
|
+ // 填充应收转让信息
|
|
|
|
+ ReviewTransferReceivable transferReceivable = reviewTransferReceivableService.getOne(new QueryWrapper<ReviewTransferReceivable>()
|
|
|
|
+ .eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
+ if (null != transferReceivable) {
|
|
|
|
+ ReviewTransferReceivableHis transferReceivableHis = new ReviewTransferReceivableHis();
|
|
|
|
+ BeanUtils.copyProperties(transferReceivable, transferReceivableHis, "id");
|
|
|
|
+ transferReceivableHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
+ reviewTransferReceivableHisService.save(transferReceivableHis);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 填充基础交易合同信息
|
|
|
|
+ List<ReviewBasicContract> reviewBasicContracts = reviewBasicContractService.list(new QueryWrapper<ReviewBasicContract>()
|
|
|
|
+ .eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
+ if (null != reviewBasicContracts && reviewBasicContracts.size() > 0) {
|
|
|
|
+ for (ReviewBasicContract reviewBasicContract : reviewBasicContracts) {
|
|
|
|
+ ReviewBasicContractHis reviewBasicContractHis = new ReviewBasicContractHis();
|
|
|
|
+ BeanUtils.copyProperties(reviewBasicContract, reviewBasicContractHis, "id");
|
|
|
|
+ reviewBasicContractHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
+ reviewBasicContractHisService.save(reviewBasicContractHis);
|
|
|
|
|
|
- // 填充基础交易合同信息
|
|
|
|
- List<ReviewBasicContract> reviewBasicContracts = reviewBasicContractService.list(new QueryWrapper<ReviewBasicContract>()
|
|
|
|
- .eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
- if (null != reviewBasicContracts && reviewBasicContracts.size() > 0) {
|
|
|
|
- for (ReviewBasicContract reviewBasicContract : reviewBasicContracts) {
|
|
|
|
- ReviewBasicContractHis reviewBasicContractHis = new ReviewBasicContractHis();
|
|
|
|
- BeanUtils.copyProperties(reviewBasicContract, reviewBasicContractHis, "id");
|
|
|
|
- reviewBasicContractHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
- reviewBasicContractHisService.save(reviewBasicContractHis);
|
|
|
|
-
|
|
|
|
- List<ReviewBasicContractChangeContent> reviewBasicContractChangeContentList = reviewBasicContractChangeContentService.list(new QueryWrapper<ReviewBasicContractChangeContent>()
|
|
|
|
- .eq("review_basic_contract_id", reviewBasicContract.getId()));
|
|
|
|
- if (reviewBasicContractChangeContentList != null && reviewBasicContractChangeContentList.size() > 0) {
|
|
|
|
- for (ReviewBasicContractChangeContent reviewBasicContractChangeContent : reviewBasicContractChangeContentList) {
|
|
|
|
- ReviewBasicContractChangeContentHis contractChangeContentHis = new ReviewBasicContractChangeContentHis();
|
|
|
|
- BeanUtils.copyProperties(reviewBasicContractChangeContent, contractChangeContentHis, "id");
|
|
|
|
- contractChangeContentHis.setReviewBasicContractHisId(reviewBasicContractHis.getId());
|
|
|
|
- reviewBasicContractChangeContentHisService.save(contractChangeContentHis);
|
|
|
|
|
|
+ List<ReviewBasicContractChangeContent> reviewBasicContractChangeContentList = reviewBasicContractChangeContentService.list(new QueryWrapper<ReviewBasicContractChangeContent>()
|
|
|
|
+ .eq("review_basic_contract_id", reviewBasicContract.getId()));
|
|
|
|
+ if (reviewBasicContractChangeContentList != null && reviewBasicContractChangeContentList.size() > 0) {
|
|
|
|
+ for (ReviewBasicContractChangeContent reviewBasicContractChangeContent : reviewBasicContractChangeContentList) {
|
|
|
|
+ ReviewBasicContractChangeContentHis contractChangeContentHis = new ReviewBasicContractChangeContentHis();
|
|
|
|
+ BeanUtils.copyProperties(reviewBasicContractChangeContent, contractChangeContentHis, "id");
|
|
|
|
+ contractChangeContentHis.setReviewBasicContractHisId(reviewBasicContractHis.getId());
|
|
|
|
+ reviewBasicContractChangeContentHisService.save(contractChangeContentHis);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
// // 填充授信信息
|
|
// // 填充授信信息
|
|
// ReviewCreditInfo creditInfo = reviewCreditInfoService.getReviewCreditInfoForView(entityId);
|
|
// ReviewCreditInfo creditInfo = reviewCreditInfoService.getReviewCreditInfoForView(entityId);
|
|
// if (null != creditInfo) {
|
|
// if (null != creditInfo) {
|
|
// creditInfo.setReviewQuotaDisburse(quotaDisburse);
|
|
// creditInfo.setReviewQuotaDisburse(quotaDisburse);
|
|
// reviewCreditInfoService.addReviewCreditInfoHistory(creditInfo);
|
|
// reviewCreditInfoService.addReviewCreditInfoHistory(creditInfo);
|
|
// }
|
|
// }
|
|
- // 2021.7.18新增 填充相关还款责任人信息
|
|
|
|
- List<ReviewRltRepay> reviewRltRepayList = reviewRltRepayService.list(new QueryWrapper<ReviewRltRepay>().eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
- if (null != reviewRltRepayList && reviewRltRepayList.size() > 0) {
|
|
|
|
- for (ReviewRltRepay reviewRltRepay : reviewRltRepayList) {
|
|
|
|
- ReviewRltRepayHis reviewRltRepayHis = new ReviewRltRepayHis();
|
|
|
|
- BeanUtils.copyProperties(reviewRltRepay, reviewRltRepayHis, "id");
|
|
|
|
- reviewRltRepayHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
- reviewRltRepayHisService.save(reviewRltRepayHis);
|
|
|
|
- //保存附件
|
|
|
|
- List<ReviewGuaranteeFile> reviewGuaranteeFiles = reviewGuaranteeSecondFileService.lambdaQuery().eq(ReviewGuaranteeFile::getGuaranteeId, reviewRltRepay.getId())
|
|
|
|
- .eq(ReviewGuaranteeFile::getGuaranteeFileType, ConstantConversionUtil.GUARANTEEINFO_FILE).list();
|
|
|
|
- if (CollectionUtil.isNotEmpty(reviewGuaranteeFiles)) {
|
|
|
|
- reviewGuaranteeFiles.forEach(reviewGuaranteeSecondFile -> {
|
|
|
|
- ReviewGuaranteeFileHis reviewGuaranteeFileHis = new ReviewGuaranteeFileHis();
|
|
|
|
- reviewGuaranteeFileHis.setFileId(reviewGuaranteeSecondFile.getFileId());
|
|
|
|
- reviewGuaranteeFileHis.setGuaranteeFileType(reviewGuaranteeSecondFile.getGuaranteeFileType());
|
|
|
|
- reviewGuaranteeFileHis.setGuaranteeId(reviewRltRepayHis.getId());
|
|
|
|
- reviewGuaranteeSecondFileHistoryService.save(reviewGuaranteeFileHis);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- // 新增房产信息
|
|
|
|
- List<ReviewRltRepayEstate> reviewRltRepayEstates = reviewRltRepayEstateService.lambdaQuery().eq(ReviewRltRepayEstate::getReviewRltRepayId, reviewRltRepay.getId()).list();
|
|
|
|
- if (CollectionUtil.isNotEmpty(reviewRltRepayEstates)) {
|
|
|
|
- reviewRltRepayEstates.forEach(reviewRltRepayEstate -> {
|
|
|
|
- ReviewRltRepayEstateHistory reviewRltRepayEstateHistory = new ReviewRltRepayEstateHistory();
|
|
|
|
- BeanUtils.copyProperties(reviewRltRepayEstate, reviewRltRepayEstateHistory, "id");
|
|
|
|
- reviewRltRepayEstateHistory.setReviewRltRepayId(reviewRltRepayHis.getId());
|
|
|
|
- reviewRltRepayEstateHistoryService.save(reviewRltRepayEstateHistory);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- // 新增土地信息
|
|
|
|
- List<ReviewRltRepayLand> reviewRltRepayLands = reviewRltRepayLandService.lambdaQuery().eq(ReviewRltRepayLand::getReviewRltRepayId, reviewRltRepay.getId()).list();
|
|
|
|
- if (CollectionUtil.isNotEmpty(reviewRltRepayLands)) {
|
|
|
|
- reviewRltRepayLands.forEach(reviewRltRepayLand -> {
|
|
|
|
- ReviewRltRepayLandHistory reviewRltRepayLandHistory = new ReviewRltRepayLandHistory();
|
|
|
|
- BeanUtils.copyProperties(reviewRltRepayLand, reviewRltRepayLandHistory, "id");
|
|
|
|
- reviewRltRepayLandHistory.setReviewRltRepayId(reviewRltRepayHis.getId());
|
|
|
|
- reviewRltRepayLandHistoryService.save(reviewRltRepayLandHistory);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- // 新增车辆信息
|
|
|
|
- List<ReviewRltRepayVehicle> reviewRltRepayVehicles = reviewRltRepayVehicleService.lambdaQuery().eq(ReviewRltRepayVehicle::getReviewRltRepayId, reviewRltRepay.getId()).list();
|
|
|
|
- if (CollectionUtil.isNotEmpty(reviewRltRepayVehicles)) {
|
|
|
|
- reviewRltRepayVehicles.forEach(reviewRltRepayVehicle -> {
|
|
|
|
- ReviewRltRepayVehicleHistory reviewRltRepayVehicleHistory = new ReviewRltRepayVehicleHistory();
|
|
|
|
- BeanUtils.copyProperties(reviewRltRepayVehicle, reviewRltRepayVehicleHistory, "id");
|
|
|
|
- reviewRltRepayVehicleHistory.setReviewRltRepayId(reviewRltRepayHis.getId());
|
|
|
|
- reviewRltRepayVehicleHistoryService.save(reviewRltRepayVehicleHistory);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- // 新增股权资产信息
|
|
|
|
- List<ReviewRltRepayEquityAssets> reviewRltRepayEquityAssets = reviewRltRepayEquityAssetsService.lambdaQuery().eq(ReviewRltRepayEquityAssets::getReviewRltRepayId, reviewRltRepay.getId()).list();
|
|
|
|
- if (CollectionUtil.isNotEmpty(reviewRltRepayEquityAssets)) {
|
|
|
|
- reviewRltRepayEquityAssets.forEach(reviewRltRepayEquityAsset -> {
|
|
|
|
- ReviewRltRepayEquityAssetsHistory reviewRltRepayEquityAssetsHistory = new ReviewRltRepayEquityAssetsHistory();
|
|
|
|
- BeanUtils.copyProperties(reviewRltRepayEquityAsset, reviewRltRepayEquityAssetsHistory, "id");
|
|
|
|
- reviewRltRepayEquityAssetsHistory.setReviewRltRepayId(reviewRltRepayHis.getId());
|
|
|
|
- reviewRltRepayEquityAssetsHistoryService.save(reviewRltRepayEquityAssetsHistory);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- // 新增其他资产信息
|
|
|
|
- List<ReviewRltRepayOtherAssets> reviewRltRepayOtherAssets = reviewRltRepayOtherAssetsService.lambdaQuery().eq(ReviewRltRepayOtherAssets::getReviewRltRepayId, reviewRltRepay.getId()).list();
|
|
|
|
- if (CollectionUtil.isNotEmpty(reviewRltRepayOtherAssets)) {
|
|
|
|
- reviewRltRepayOtherAssets.forEach(reviewRltRepayOtherAsset -> {
|
|
|
|
- ReviewRltRepayOtherAssetsHistory reviewRltRepayOtherAssetsHistory = new ReviewRltRepayOtherAssetsHistory();
|
|
|
|
- BeanUtils.copyProperties(reviewRltRepayOtherAsset, reviewRltRepayOtherAssetsHistory, "id");
|
|
|
|
- reviewRltRepayOtherAssetsHistory.setReviewRltRepayId(reviewRltRepayHis.getId());
|
|
|
|
- reviewRltRepayOtherAssetsHistoryService.save(reviewRltRepayOtherAssetsHistory);
|
|
|
|
- });
|
|
|
|
|
|
+ // 2021.7.18新增 填充相关还款责任人信息
|
|
|
|
+ List<ReviewRltRepay> reviewRltRepayList = reviewRltRepayService.list(new QueryWrapper<ReviewRltRepay>().eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
+ if (null != reviewRltRepayList && reviewRltRepayList.size() > 0) {
|
|
|
|
+ for (ReviewRltRepay reviewRltRepay : reviewRltRepayList) {
|
|
|
|
+ ReviewRltRepayHis reviewRltRepayHis = new ReviewRltRepayHis();
|
|
|
|
+ BeanUtils.copyProperties(reviewRltRepay, reviewRltRepayHis, "id");
|
|
|
|
+ reviewRltRepayHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
+ reviewRltRepayHisService.save(reviewRltRepayHis);
|
|
|
|
+ //保存附件
|
|
|
|
+ List<ReviewGuaranteeFile> reviewGuaranteeFiles = reviewGuaranteeSecondFileService.lambdaQuery().eq(ReviewGuaranteeFile::getGuaranteeId, reviewRltRepay.getId())
|
|
|
|
+ .eq(ReviewGuaranteeFile::getGuaranteeFileType, ConstantConversionUtil.GUARANTEEINFO_FILE).list();
|
|
|
|
+ if (CollectionUtil.isNotEmpty(reviewGuaranteeFiles)) {
|
|
|
|
+ reviewGuaranteeFiles.forEach(reviewGuaranteeSecondFile -> {
|
|
|
|
+ ReviewGuaranteeFileHis reviewGuaranteeFileHis = new ReviewGuaranteeFileHis();
|
|
|
|
+ reviewGuaranteeFileHis.setFileId(reviewGuaranteeSecondFile.getFileId());
|
|
|
|
+ reviewGuaranteeFileHis.setGuaranteeFileType(reviewGuaranteeSecondFile.getGuaranteeFileType());
|
|
|
|
+ reviewGuaranteeFileHis.setGuaranteeId(reviewRltRepayHis.getId());
|
|
|
|
+ reviewGuaranteeSecondFileHistoryService.save(reviewGuaranteeFileHis);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 新增房产信息
|
|
|
|
+ List<ReviewRltRepayEstate> reviewRltRepayEstates = reviewRltRepayEstateService.lambdaQuery().eq(ReviewRltRepayEstate::getReviewRltRepayId, reviewRltRepay.getId()).list();
|
|
|
|
+ if (CollectionUtil.isNotEmpty(reviewRltRepayEstates)) {
|
|
|
|
+ reviewRltRepayEstates.forEach(reviewRltRepayEstate -> {
|
|
|
|
+ ReviewRltRepayEstateHistory reviewRltRepayEstateHistory = new ReviewRltRepayEstateHistory();
|
|
|
|
+ BeanUtils.copyProperties(reviewRltRepayEstate, reviewRltRepayEstateHistory, "id");
|
|
|
|
+ reviewRltRepayEstateHistory.setReviewRltRepayId(reviewRltRepayHis.getId());
|
|
|
|
+ reviewRltRepayEstateHistoryService.save(reviewRltRepayEstateHistory);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 新增土地信息
|
|
|
|
+ List<ReviewRltRepayLand> reviewRltRepayLands = reviewRltRepayLandService.lambdaQuery().eq(ReviewRltRepayLand::getReviewRltRepayId, reviewRltRepay.getId()).list();
|
|
|
|
+ if (CollectionUtil.isNotEmpty(reviewRltRepayLands)) {
|
|
|
|
+ reviewRltRepayLands.forEach(reviewRltRepayLand -> {
|
|
|
|
+ ReviewRltRepayLandHistory reviewRltRepayLandHistory = new ReviewRltRepayLandHistory();
|
|
|
|
+ BeanUtils.copyProperties(reviewRltRepayLand, reviewRltRepayLandHistory, "id");
|
|
|
|
+ reviewRltRepayLandHistory.setReviewRltRepayId(reviewRltRepayHis.getId());
|
|
|
|
+ reviewRltRepayLandHistoryService.save(reviewRltRepayLandHistory);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 新增车辆信息
|
|
|
|
+ List<ReviewRltRepayVehicle> reviewRltRepayVehicles = reviewRltRepayVehicleService.lambdaQuery().eq(ReviewRltRepayVehicle::getReviewRltRepayId, reviewRltRepay.getId()).list();
|
|
|
|
+ if (CollectionUtil.isNotEmpty(reviewRltRepayVehicles)) {
|
|
|
|
+ reviewRltRepayVehicles.forEach(reviewRltRepayVehicle -> {
|
|
|
|
+ ReviewRltRepayVehicleHistory reviewRltRepayVehicleHistory = new ReviewRltRepayVehicleHistory();
|
|
|
|
+ BeanUtils.copyProperties(reviewRltRepayVehicle, reviewRltRepayVehicleHistory, "id");
|
|
|
|
+ reviewRltRepayVehicleHistory.setReviewRltRepayId(reviewRltRepayHis.getId());
|
|
|
|
+ reviewRltRepayVehicleHistoryService.save(reviewRltRepayVehicleHistory);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 新增股权资产信息
|
|
|
|
+ List<ReviewRltRepayEquityAssets> reviewRltRepayEquityAssets = reviewRltRepayEquityAssetsService.lambdaQuery().eq(ReviewRltRepayEquityAssets::getReviewRltRepayId, reviewRltRepay.getId()).list();
|
|
|
|
+ if (CollectionUtil.isNotEmpty(reviewRltRepayEquityAssets)) {
|
|
|
|
+ reviewRltRepayEquityAssets.forEach(reviewRltRepayEquityAsset -> {
|
|
|
|
+ ReviewRltRepayEquityAssetsHistory reviewRltRepayEquityAssetsHistory = new ReviewRltRepayEquityAssetsHistory();
|
|
|
|
+ BeanUtils.copyProperties(reviewRltRepayEquityAsset, reviewRltRepayEquityAssetsHistory, "id");
|
|
|
|
+ reviewRltRepayEquityAssetsHistory.setReviewRltRepayId(reviewRltRepayHis.getId());
|
|
|
|
+ reviewRltRepayEquityAssetsHistoryService.save(reviewRltRepayEquityAssetsHistory);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ // 新增其他资产信息
|
|
|
|
+ List<ReviewRltRepayOtherAssets> reviewRltRepayOtherAssets = reviewRltRepayOtherAssetsService.lambdaQuery().eq(ReviewRltRepayOtherAssets::getReviewRltRepayId, reviewRltRepay.getId()).list();
|
|
|
|
+ if (CollectionUtil.isNotEmpty(reviewRltRepayOtherAssets)) {
|
|
|
|
+ reviewRltRepayOtherAssets.forEach(reviewRltRepayOtherAsset -> {
|
|
|
|
+ ReviewRltRepayOtherAssetsHistory reviewRltRepayOtherAssetsHistory = new ReviewRltRepayOtherAssetsHistory();
|
|
|
|
+ BeanUtils.copyProperties(reviewRltRepayOtherAsset, reviewRltRepayOtherAssetsHistory, "id");
|
|
|
|
+ reviewRltRepayOtherAssetsHistory.setReviewRltRepayId(reviewRltRepayHis.getId());
|
|
|
|
+ reviewRltRepayOtherAssetsHistoryService.save(reviewRltRepayOtherAssetsHistory);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
- //新增 填充抵质押信息
|
|
|
|
- List<ReviewQuotaMortgageRel> quotaMortgageRelList = reviewQuotaMortgageRelService.list(new QueryWrapper<ReviewQuotaMortgageRel>().eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
- if (quotaMortgageRelList != null && !quotaMortgageRelList.isEmpty()) {
|
|
|
|
- for (ReviewQuotaMortgageRel quotaMortgageRel : quotaMortgageRelList) {
|
|
|
|
- ReviewMortgageBasicInfo mortgageBasicInfo = reviewMortgageBasicInfoService.getById(quotaMortgageRel.getReviewMortgageBasicId());
|
|
|
|
- Long mortgageBasicInfoId = mortgageBasicInfo.getId();
|
|
|
|
- if (mortgageBasicInfo != null && mortgageBasicInfo.getId() != null) {
|
|
|
|
- ReviewMortgageBasicInfoHis reviewMortgageBasicInfoHis = new ReviewMortgageBasicInfoHis();
|
|
|
|
- BeanUtils.copyProperties(mortgageBasicInfo, reviewMortgageBasicInfoHis, "id");
|
|
|
|
- reviewMortgageBasicInfoHisService.save(reviewMortgageBasicInfoHis);
|
|
|
|
-
|
|
|
|
- ReviewQuotaMortgageRelHis reviewQuotaMortgageRelHis = new ReviewQuotaMortgageRelHis();
|
|
|
|
- reviewQuotaMortgageRelHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
- reviewQuotaMortgageRelHis.setReviewMortgageBasicHisId(reviewMortgageBasicInfoHis.getId());
|
|
|
|
- reviewQuotaMortgageRelHisService.save(reviewQuotaMortgageRelHis);
|
|
|
|
-
|
|
|
|
- //获取抵押物信息
|
|
|
|
- List<ReviewMortgageCollateralInfo> collateralInfoList = reviewMortgageCollateralInfoService.list(new QueryWrapper<ReviewMortgageCollateralInfo>()
|
|
|
|
- .eq("review_mortgage_basic_id", mortgageBasicInfoId));
|
|
|
|
- if (collateralInfoList != null && collateralInfoList.size() > 0) {
|
|
|
|
- for (ReviewMortgageCollateralInfo reviewMortgageCollateralInfo : collateralInfoList) {
|
|
|
|
- ReviewMortgageCollateralInfoHis reviewMortgageCollateralInfoHis = new ReviewMortgageCollateralInfoHis();
|
|
|
|
- BeanUtils.copyProperties(reviewMortgageCollateralInfo, reviewMortgageCollateralInfoHis, "id");
|
|
|
|
- reviewMortgageCollateralInfoHis.setReviewMortgageBasicHisId(reviewMortgageBasicInfoHis.getId());
|
|
|
|
- reviewMortgageCollateralInfoHisService.save(reviewMortgageCollateralInfoHis);
|
|
|
|
- //保存附件
|
|
|
|
- List<ReviewGuaranteeFile> reviewGuaranteeFiles = reviewGuaranteeSecondFileService.lambdaQuery().eq(ReviewGuaranteeFile::getGuaranteeId, reviewMortgageCollateralInfo.getId())
|
|
|
|
- .eq(ReviewGuaranteeFile::getGuaranteeFileType, ConstantConversionUtil.CHATTELMORTGAGE_FILE).list();
|
|
|
|
- if (CollectionUtil.isNotEmpty(reviewGuaranteeFiles)) {
|
|
|
|
- reviewGuaranteeFiles.forEach(reviewGuaranteeSecondFile -> {
|
|
|
|
- ReviewGuaranteeFileHis reviewGuaranteeFileHis = new ReviewGuaranteeFileHis();
|
|
|
|
- reviewGuaranteeFileHis.setFileId(reviewGuaranteeSecondFile.getFileId());
|
|
|
|
- reviewGuaranteeFileHis.setGuaranteeFileType(reviewGuaranteeSecondFile.getGuaranteeFileType());
|
|
|
|
- reviewGuaranteeFileHis.setGuaranteeId(reviewMortgageCollateralInfoHis.getId());
|
|
|
|
- reviewGuaranteeSecondFileHistoryService.save(reviewGuaranteeFileHis);
|
|
|
|
- });
|
|
|
|
|
|
+ //新增 填充抵质押信息
|
|
|
|
+ List<ReviewQuotaMortgageRel> quotaMortgageRelList = reviewQuotaMortgageRelService.list(new QueryWrapper<ReviewQuotaMortgageRel>().eq("review_quota_disburse_id", quotaDisburse.getId()));
|
|
|
|
+ if (quotaMortgageRelList != null && !quotaMortgageRelList.isEmpty()) {
|
|
|
|
+ for (ReviewQuotaMortgageRel quotaMortgageRel : quotaMortgageRelList) {
|
|
|
|
+ ReviewMortgageBasicInfo mortgageBasicInfo = reviewMortgageBasicInfoService.getById(quotaMortgageRel.getReviewMortgageBasicId());
|
|
|
|
+ Long mortgageBasicInfoId = mortgageBasicInfo.getId();
|
|
|
|
+ if (mortgageBasicInfo != null && mortgageBasicInfo.getId() != null) {
|
|
|
|
+ ReviewMortgageBasicInfoHis reviewMortgageBasicInfoHis = new ReviewMortgageBasicInfoHis();
|
|
|
|
+ BeanUtils.copyProperties(mortgageBasicInfo, reviewMortgageBasicInfoHis, "id");
|
|
|
|
+ reviewMortgageBasicInfoHisService.save(reviewMortgageBasicInfoHis);
|
|
|
|
+
|
|
|
|
+ ReviewQuotaMortgageRelHis reviewQuotaMortgageRelHis = new ReviewQuotaMortgageRelHis();
|
|
|
|
+ reviewQuotaMortgageRelHis.setReviewQuotaDisburseHisId(reviewQuotaDisburseHis.getId());
|
|
|
|
+ reviewQuotaMortgageRelHis.setReviewMortgageBasicHisId(reviewMortgageBasicInfoHis.getId());
|
|
|
|
+ reviewQuotaMortgageRelHisService.save(reviewQuotaMortgageRelHis);
|
|
|
|
+
|
|
|
|
+ //获取抵押物信息
|
|
|
|
+ List<ReviewMortgageCollateralInfo> collateralInfoList = reviewMortgageCollateralInfoService.list(new QueryWrapper<ReviewMortgageCollateralInfo>()
|
|
|
|
+ .eq("review_mortgage_basic_id", mortgageBasicInfoId));
|
|
|
|
+ if (collateralInfoList != null && collateralInfoList.size() > 0) {
|
|
|
|
+ for (ReviewMortgageCollateralInfo reviewMortgageCollateralInfo : collateralInfoList) {
|
|
|
|
+ ReviewMortgageCollateralInfoHis reviewMortgageCollateralInfoHis = new ReviewMortgageCollateralInfoHis();
|
|
|
|
+ BeanUtils.copyProperties(reviewMortgageCollateralInfo, reviewMortgageCollateralInfoHis, "id");
|
|
|
|
+ reviewMortgageCollateralInfoHis.setReviewMortgageBasicHisId(reviewMortgageBasicInfoHis.getId());
|
|
|
|
+ reviewMortgageCollateralInfoHisService.save(reviewMortgageCollateralInfoHis);
|
|
|
|
+ //保存附件
|
|
|
|
+ List<ReviewGuaranteeFile> reviewGuaranteeFiles = reviewGuaranteeSecondFileService.lambdaQuery().eq(ReviewGuaranteeFile::getGuaranteeId, reviewMortgageCollateralInfo.getId())
|
|
|
|
+ .eq(ReviewGuaranteeFile::getGuaranteeFileType, ConstantConversionUtil.CHATTELMORTGAGE_FILE).list();
|
|
|
|
+ if (CollectionUtil.isNotEmpty(reviewGuaranteeFiles)) {
|
|
|
|
+ reviewGuaranteeFiles.forEach(reviewGuaranteeSecondFile -> {
|
|
|
|
+ ReviewGuaranteeFileHis reviewGuaranteeFileHis = new ReviewGuaranteeFileHis();
|
|
|
|
+ reviewGuaranteeFileHis.setFileId(reviewGuaranteeSecondFile.getFileId());
|
|
|
|
+ reviewGuaranteeFileHis.setGuaranteeFileType(reviewGuaranteeSecondFile.getGuaranteeFileType());
|
|
|
|
+ reviewGuaranteeFileHis.setGuaranteeId(reviewMortgageCollateralInfoHis.getId());
|
|
|
|
+ reviewGuaranteeSecondFileHistoryService.save(reviewGuaranteeFileHis);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
- //获取质押物信息
|
|
|
|
- List<ReviewMortgagePledgeInfo> pledgeInfoList = reviewMortgagePledgeInfoService.list(new QueryWrapper<ReviewMortgagePledgeInfo>()
|
|
|
|
- .eq("review_mortgage_basic_id", mortgageBasicInfoId));
|
|
|
|
- if (pledgeInfoList != null && pledgeInfoList.size() > 0) {
|
|
|
|
- for (ReviewMortgagePledgeInfo reviewMortgagePledgeInfo : pledgeInfoList) {
|
|
|
|
- ReviewMortgagePledgeInfoHis reviewMortgagePledgeInfoHis = new ReviewMortgagePledgeInfoHis();
|
|
|
|
- BeanUtils.copyProperties(reviewMortgagePledgeInfo, reviewMortgagePledgeInfoHis, "id");
|
|
|
|
- reviewMortgagePledgeInfoHis.setReviewMortgageBasicHisId(reviewMortgageBasicInfoHis.getId());
|
|
|
|
- reviewMortgagePledgeInfoHisService.save(reviewMortgagePledgeInfoHis);
|
|
|
|
- //保存附件
|
|
|
|
- List<ReviewGuaranteeFile> reviewGuaranteeFiles = reviewGuaranteeSecondFileService.lambdaQuery().eq(ReviewGuaranteeFile::getGuaranteeId, reviewMortgagePledgeInfo.getId())
|
|
|
|
- .eq(ReviewGuaranteeFile::getGuaranteeFileType, ConstantConversionUtil.PLEDGEINFORMATION_FILE).list();
|
|
|
|
- if (CollectionUtil.isNotEmpty(reviewGuaranteeFiles)) {
|
|
|
|
- reviewGuaranteeFiles.forEach(reviewGuaranteeSecondFile -> {
|
|
|
|
- ReviewGuaranteeFileHis reviewGuaranteeFileHis = new ReviewGuaranteeFileHis();
|
|
|
|
- reviewGuaranteeFileHis.setFileId(reviewGuaranteeSecondFile.getFileId());
|
|
|
|
- reviewGuaranteeFileHis.setGuaranteeFileType(reviewGuaranteeSecondFile.getGuaranteeFileType());
|
|
|
|
- reviewGuaranteeFileHis.setGuaranteeId(reviewMortgagePledgeInfoHis.getId());
|
|
|
|
- reviewGuaranteeSecondFileHistoryService.save(reviewGuaranteeFileHis);
|
|
|
|
- });
|
|
|
|
|
|
+ //获取质押物信息
|
|
|
|
+ List<ReviewMortgagePledgeInfo> pledgeInfoList = reviewMortgagePledgeInfoService.list(new QueryWrapper<ReviewMortgagePledgeInfo>()
|
|
|
|
+ .eq("review_mortgage_basic_id", mortgageBasicInfoId));
|
|
|
|
+ if (pledgeInfoList != null && pledgeInfoList.size() > 0) {
|
|
|
|
+ for (ReviewMortgagePledgeInfo reviewMortgagePledgeInfo : pledgeInfoList) {
|
|
|
|
+ ReviewMortgagePledgeInfoHis reviewMortgagePledgeInfoHis = new ReviewMortgagePledgeInfoHis();
|
|
|
|
+ BeanUtils.copyProperties(reviewMortgagePledgeInfo, reviewMortgagePledgeInfoHis, "id");
|
|
|
|
+ reviewMortgagePledgeInfoHis.setReviewMortgageBasicHisId(reviewMortgageBasicInfoHis.getId());
|
|
|
|
+ reviewMortgagePledgeInfoHisService.save(reviewMortgagePledgeInfoHis);
|
|
|
|
+ //保存附件
|
|
|
|
+ List<ReviewGuaranteeFile> reviewGuaranteeFiles = reviewGuaranteeSecondFileService.lambdaQuery().eq(ReviewGuaranteeFile::getGuaranteeId, reviewMortgagePledgeInfo.getId())
|
|
|
|
+ .eq(ReviewGuaranteeFile::getGuaranteeFileType, ConstantConversionUtil.PLEDGEINFORMATION_FILE).list();
|
|
|
|
+ if (CollectionUtil.isNotEmpty(reviewGuaranteeFiles)) {
|
|
|
|
+ reviewGuaranteeFiles.forEach(reviewGuaranteeSecondFile -> {
|
|
|
|
+ ReviewGuaranteeFileHis reviewGuaranteeFileHis = new ReviewGuaranteeFileHis();
|
|
|
|
+ reviewGuaranteeFileHis.setFileId(reviewGuaranteeSecondFile.getFileId());
|
|
|
|
+ reviewGuaranteeFileHis.setGuaranteeFileType(reviewGuaranteeSecondFile.getGuaranteeFileType());
|
|
|
|
+ reviewGuaranteeFileHis.setGuaranteeId(reviewMortgagePledgeInfoHis.getId());
|
|
|
|
+ reviewGuaranteeSecondFileHistoryService.save(reviewGuaranteeFileHis);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
- // 填充附件信息
|
|
|
|
- List<ReviewGuaranteeFile> reviewGuaranteeFiles = reviewGuaranteeSecondFileService.lambdaQuery().eq(ReviewGuaranteeFile::getGuaranteeId, mortgageBasicInfoId)
|
|
|
|
- .eq(ReviewGuaranteeFile::getGuaranteeFileType, ConstantConversionUtil.MORTGAGEINFORMATION_FILE).list();
|
|
|
|
- if (CollectionUtil.isNotEmpty(reviewGuaranteeFiles)) {
|
|
|
|
- reviewGuaranteeFiles.forEach(reviewGuaranteeSecondFile -> {
|
|
|
|
- ReviewGuaranteeFileHis reviewGuaranteeFileHis = new ReviewGuaranteeFileHis();
|
|
|
|
- reviewGuaranteeFileHis.setFileId(reviewGuaranteeSecondFile.getFileId());
|
|
|
|
- reviewGuaranteeFileHis.setGuaranteeFileType(reviewGuaranteeSecondFile.getGuaranteeFileType());
|
|
|
|
- reviewGuaranteeFileHis.setGuaranteeId(mortgageBasicInfo.getId());
|
|
|
|
- reviewGuaranteeSecondFileHistoryService.save(reviewGuaranteeFileHis);
|
|
|
|
- });
|
|
|
|
|
|
+ // 填充附件信息
|
|
|
|
+ List<ReviewGuaranteeFile> reviewGuaranteeFiles = reviewGuaranteeSecondFileService.lambdaQuery().eq(ReviewGuaranteeFile::getGuaranteeId, mortgageBasicInfoId)
|
|
|
|
+ .eq(ReviewGuaranteeFile::getGuaranteeFileType, ConstantConversionUtil.MORTGAGEINFORMATION_FILE).list();
|
|
|
|
+ if (CollectionUtil.isNotEmpty(reviewGuaranteeFiles)) {
|
|
|
|
+ reviewGuaranteeFiles.forEach(reviewGuaranteeSecondFile -> {
|
|
|
|
+ ReviewGuaranteeFileHis reviewGuaranteeFileHis = new ReviewGuaranteeFileHis();
|
|
|
|
+ reviewGuaranteeFileHis.setFileId(reviewGuaranteeSecondFile.getFileId());
|
|
|
|
+ reviewGuaranteeFileHis.setGuaranteeFileType(reviewGuaranteeSecondFile.getGuaranteeFileType());
|
|
|
|
+ reviewGuaranteeFileHis.setGuaranteeId(mortgageBasicInfo.getId());
|
|
|
|
+ reviewGuaranteeSecondFileHistoryService.save(reviewGuaranteeFileHis);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return quotaDisburse.getId();
|
|
|
|
|
|
+
|
|
|
|
+ return reviewQuotaDisburseHis.getId();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -735,7 +744,8 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
*/
|
|
*/
|
|
public ReviewQuotaDisburse add(ReviewQuotaDisburse reviewQuotaDisburse) throws IOException {
|
|
public ReviewQuotaDisburse add(ReviewQuotaDisburse reviewQuotaDisburse) throws IOException {
|
|
|
|
|
|
- if (reviewQuotaDisburse.isVisible()) {
|
|
|
|
|
|
+ if (reviewQuotaDisburse.isVisible()
|
|
|
|
+ && ConstantConversionUtil.APPROVAL_RESULT_PASS.equals(reviewQuotaDisburse.getApprovalConclusion())) {
|
|
ValidatorUtil.validator(ValidatorEntity.ValidatorType.ADD, reviewQuotaDisburse);
|
|
ValidatorUtil.validator(ValidatorEntity.ValidatorType.ADD, reviewQuotaDisburse);
|
|
int batch = quotaDisburseMapper.getMaxBatchByBusinessNo(reviewQuotaDisburse.getBusinessNumber());
|
|
int batch = quotaDisburseMapper.getMaxBatchByBusinessNo(reviewQuotaDisburse.getBusinessNumber());
|
|
reviewQuotaDisburse.setQuotaDisburseBatch(batch + 1);
|
|
reviewQuotaDisburse.setQuotaDisburseBatch(batch + 1);
|
|
@@ -743,20 +753,22 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
ValidatorUtil.validator(ValidatorEntity.ValidatorType.TEMP, reviewQuotaDisburse);
|
|
ValidatorUtil.validator(ValidatorEntity.ValidatorType.TEMP, reviewQuotaDisburse);
|
|
}
|
|
}
|
|
quotaDisburseMapper.insert(reviewQuotaDisburse);
|
|
quotaDisburseMapper.insert(reviewQuotaDisburse);
|
|
- // 新增融资信息
|
|
|
|
- addFinancingInfo(reviewQuotaDisburse);
|
|
|
|
- // 新增收支计划信息
|
|
|
|
- addIncomeExpenditurePlan(reviewQuotaDisburse);
|
|
|
|
- // 新增主合同信息
|
|
|
|
- addMasterContract(reviewQuotaDisburse);
|
|
|
|
- // 新增基础交易合同信息
|
|
|
|
- addBasicContract(reviewQuotaDisburse);
|
|
|
|
- // 新增应收账款转让信息
|
|
|
|
- addReviewTransferReceivable(reviewQuotaDisburse);
|
|
|
|
- // 新增相关还款责任人
|
|
|
|
- addReviewRltRepay(reviewQuotaDisburse);
|
|
|
|
- // 新增抵质押信息
|
|
|
|
- addMortgageInfo(reviewQuotaDisburse);
|
|
|
|
|
|
+ if (ConstantConversionUtil.APPROVAL_RESULT_PASS.equals(reviewQuotaDisburse.getApprovalConclusion())) {
|
|
|
|
+ // 新增融资信息
|
|
|
|
+ addFinancingInfo(reviewQuotaDisburse);
|
|
|
|
+ // 新增收支计划信息
|
|
|
|
+ addIncomeExpenditurePlan(reviewQuotaDisburse);
|
|
|
|
+ // 新增主合同信息
|
|
|
|
+ addMasterContract(reviewQuotaDisburse);
|
|
|
|
+ // 新增基础交易合同信息
|
|
|
|
+ addBasicContract(reviewQuotaDisburse);
|
|
|
|
+ // 新增应收账款转让信息
|
|
|
|
+ addReviewTransferReceivable(reviewQuotaDisburse);
|
|
|
|
+ // 新增相关还款责任人
|
|
|
|
+ addReviewRltRepay(reviewQuotaDisburse);
|
|
|
|
+ // 新增抵质押信息
|
|
|
|
+ addMortgageInfo(reviewQuotaDisburse);
|
|
|
|
+ }
|
|
return reviewQuotaDisburse;
|
|
return reviewQuotaDisburse;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -766,7 +778,8 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
*/
|
|
*/
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public ReviewQuotaDisburse update(ReviewQuotaDisburse reviewQuotaDisburse) throws IOException {
|
|
public ReviewQuotaDisburse update(ReviewQuotaDisburse reviewQuotaDisburse) throws IOException {
|
|
- if (reviewQuotaDisburse.isVisible()) {
|
|
|
|
|
|
+ if (reviewQuotaDisburse.isVisible()
|
|
|
|
+ && ConstantConversionUtil.APPROVAL_RESULT_PASS.equals(reviewQuotaDisburse.getApprovalConclusion())) {
|
|
ReviewQuotaDisburse hisQuotaDisburse = quotaDisburseMapper.selectById(reviewQuotaDisburse.getId());
|
|
ReviewQuotaDisburse hisQuotaDisburse = quotaDisburseMapper.selectById(reviewQuotaDisburse.getId());
|
|
if (null == hisQuotaDisburse || StringUtil.isEmpty(hisQuotaDisburse.getBusinessNumber())) {
|
|
if (null == hisQuotaDisburse || StringUtil.isEmpty(hisQuotaDisburse.getBusinessNumber())) {
|
|
throw new BusinessException(CodeUtil.FAIL, "修改额度支用时,业务编号不能为空");
|
|
throw new BusinessException(CodeUtil.FAIL, "修改额度支用时,业务编号不能为空");
|
|
@@ -802,21 +815,23 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
addReviewTransferReceivable(reviewQuotaDisburse);
|
|
addReviewTransferReceivable(reviewQuotaDisburse);
|
|
//修改相关还款责任人信息
|
|
//修改相关还款责任人信息
|
|
List<ReviewRltRepay> oldRltRepas = reviewRltRepayService.list(new QueryWrapper<ReviewRltRepay>().eq("review_quota_disburse_id", reviewQuotaDisburse.getId()));
|
|
List<ReviewRltRepay> oldRltRepas = reviewRltRepayService.list(new QueryWrapper<ReviewRltRepay>().eq("review_quota_disburse_id", reviewQuotaDisburse.getId()));
|
|
- oldRltRepas.forEach(reviewRltRepay -> {
|
|
|
|
- // 删除房产信息
|
|
|
|
- reviewRltRepayEstateService.lambdaUpdate().eq(ReviewRltRepayEstate::getReviewRltRepayId, reviewRltRepay.getId()).remove();
|
|
|
|
- // 删除土地信息
|
|
|
|
- reviewRltRepayLandService.lambdaUpdate().eq(ReviewRltRepayLand::getReviewRltRepayId, reviewRltRepay.getId()).remove();
|
|
|
|
- // 删除车辆信息
|
|
|
|
- reviewRltRepayVehicleService.lambdaUpdate().eq(ReviewRltRepayVehicle::getReviewRltRepayId, reviewRltRepay.getId()).remove();
|
|
|
|
- // 删除股权资产信息
|
|
|
|
- reviewRltRepayEquityAssetsService.lambdaUpdate().eq(ReviewRltRepayEquityAssets::getReviewRltRepayId, reviewRltRepay.getId()).remove();
|
|
|
|
- // 删除其他资产信息
|
|
|
|
- reviewRltRepayOtherAssetsService.lambdaUpdate().eq(ReviewRltRepayOtherAssets::getReviewRltRepayId, reviewRltRepay.getId()).remove();
|
|
|
|
- // 删除附件
|
|
|
|
- reviewGuaranteeSecondFileService.lambdaUpdate().eq(ReviewGuaranteeFile::getGuaranteeId, reviewRltRepay.getId())
|
|
|
|
- .eq(ReviewGuaranteeFile::getGuaranteeFileType, ConstantConversionUtil.MORTGAGEINFORMATION_FILE).remove();
|
|
|
|
- });
|
|
|
|
|
|
+ if (CollectionUtil.isNotEmpty(oldRltRepas)) {
|
|
|
|
+ oldRltRepas.forEach(reviewRltRepay -> {
|
|
|
|
+ // 删除房产信息
|
|
|
|
+ reviewRltRepayEstateService.lambdaUpdate().eq(ReviewRltRepayEstate::getReviewRltRepayId, reviewRltRepay.getId()).remove();
|
|
|
|
+ // 删除土地信息
|
|
|
|
+ reviewRltRepayLandService.lambdaUpdate().eq(ReviewRltRepayLand::getReviewRltRepayId, reviewRltRepay.getId()).remove();
|
|
|
|
+ // 删除车辆信息
|
|
|
|
+ reviewRltRepayVehicleService.lambdaUpdate().eq(ReviewRltRepayVehicle::getReviewRltRepayId, reviewRltRepay.getId()).remove();
|
|
|
|
+ // 删除股权资产信息
|
|
|
|
+ reviewRltRepayEquityAssetsService.lambdaUpdate().eq(ReviewRltRepayEquityAssets::getReviewRltRepayId, reviewRltRepay.getId()).remove();
|
|
|
|
+ // 删除其他资产信息
|
|
|
|
+ reviewRltRepayOtherAssetsService.lambdaUpdate().eq(ReviewRltRepayOtherAssets::getReviewRltRepayId, reviewRltRepay.getId()).remove();
|
|
|
|
+ // 删除附件
|
|
|
|
+ reviewGuaranteeSecondFileService.lambdaUpdate().eq(ReviewGuaranteeFile::getGuaranteeId, reviewRltRepay.getId())
|
|
|
|
+ .eq(ReviewGuaranteeFile::getGuaranteeFileType, ConstantConversionUtil.MORTGAGEINFORMATION_FILE).remove();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
reviewRltRepayService.remove(new QueryWrapper<ReviewRltRepay>().eq("review_quota_disburse_id", reviewQuotaDisburse.getId()));
|
|
reviewRltRepayService.remove(new QueryWrapper<ReviewRltRepay>().eq("review_quota_disburse_id", reviewQuotaDisburse.getId()));
|
|
addReviewRltRepay(reviewQuotaDisburse);
|
|
addReviewRltRepay(reviewQuotaDisburse);
|
|
//修改抵质押信息
|
|
//修改抵质押信息
|