Bladeren bron

Merge remote-tracking branch 'origin/smb' into smb

liutao 1 maand geleden
bovenliggende
commit
9db06e6a99

+ 13 - 0
src/main/java/com/sunxung/factoring/service/financing/payment/impl/PaymentApplyServiceImpl.java

@@ -560,6 +560,19 @@ public class PaymentApplyServiceImpl extends ServiceImpl<PaymentApplyMapper, Pay
                         if (CollectionUtil.isNotEmpty(files)) {
                             acceptanceFiles.addAll(files);
                         }
+                        //获取下游验收文件
+                        List<FileStorageDO> fileStorageDOList = fileService.findByBusinessId(goodsInfo.getcAcceptanceBasicInfoId(), FileModuleDict.ChildEnum.ACCEPTANCE_FILE.getCode());
+                        if (CollectionUtil.isNotEmpty(fileStorageDOList)) {
+                            fileStorageDOList.forEach(fileStorageDO -> {
+                                FileStorage fileStorage = new FileStorage();
+                                fileStorage.setAbsolutePath(fileStorageDO.getAbsolutePath());
+                                fileStorage.setName(fileStorageDO.getOriginalName());
+                                fileStorage.setPath(fileStorageDO.getPath());
+                                fileStorage.setId(fileStorageDO.getId());
+                                fileStorage.setOriginalName(fileStorageDO.getOriginalName());
+                                acceptanceFiles.add(fileStorage);
+                            });
+                        }
 //                        AcceptanceSignConfirmation acceptanceSignConfirmation = acceptanceSignConfirmationService.lambdaQuery()
 //                                .eq(AcceptanceSignConfirmation::getAcceptanceBasicInfoId, goodsInfo.getcAcceptanceBasicInfoId()).one();
 //                        if (acceptanceSignConfirmation != null) {

+ 13 - 0
src/main/java/com/sunxung/factoring/service/financing/payment/impl/PaymentApprovalServiceImpl.java

@@ -268,6 +268,19 @@ public class PaymentApprovalServiceImpl extends ServiceImpl<PaymentApprovalMappe
                         if (CollectionUtil.isNotEmpty(files)) {
                             acceptanceFiles.addAll(files);
                         }
+                        //获取下游验收文件
+                        List<FileStorageDO> fileStorageDOList = fileService.findByBusinessId(goodsInfo.getcAcceptanceBasicInfoId(), FileModuleDict.ChildEnum.ACCEPTANCE_FILE.getCode());
+                        if (CollectionUtil.isNotEmpty(fileStorageDOList)) {
+                            fileStorageDOList.forEach(fileStorageDO -> {
+                                FileStorage fileStorage = new FileStorage();
+                                fileStorage.setAbsolutePath(fileStorageDO.getAbsolutePath());
+                                fileStorage.setName(fileStorageDO.getOriginalName());
+                                fileStorage.setPath(fileStorageDO.getPath());
+                                fileStorage.setId(fileStorageDO.getId());
+                                fileStorage.setOriginalName(fileStorageDO.getOriginalName());
+                                acceptanceFiles.add(fileStorage);
+                            });
+                        }
                     }
                 }
             }

+ 9 - 9
src/main/java/com/sunxung/factoring/service/financing/review/impl/ReviewQuotaDisburseServiceImpl.java

@@ -1167,12 +1167,12 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
     private void addReviewRltRepay(ReviewQuotaDisburse quotaDisburse) {
 
         if (null != quotaDisburse && null != quotaDisburse.getId()) {
-            if (quotaDisburse.getReviewFinancingInfo() == null || quotaDisburse.getReviewFinancingInfo().getFinancingAmount() == null) {
-                throw new BusinessException(CodeUtil.FAIL, "获取不到融资金额信息");
-            }
-
             List<ReviewRltRepay> list = quotaDisburse.getRltRepayList();
             if (null != list && list.size() > 0) {
+                if (quotaDisburse.getReviewFinancingInfo() == null || quotaDisburse.getReviewFinancingInfo().getFinancingAmount() == null) {
+                    throw new BusinessException(CodeUtil.FAIL, "获取不到融资金额信息");
+                }
+
                 int i = 0;
                 Dictionary arlpTypeDict = dictService.getByCode("arlpType_BZR");
                 if (arlpTypeDict == null || arlpTypeDict.getId() == null) {
@@ -1940,8 +1940,8 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
             plan.setIncomeExpenditureDate(endDate);
             plan.setIncomeExpenditureType(IncomeExpenditureTypeDict.ChildEnum.PRINCIPAL.getCode());
             plan.setFinalCashFlow(reviewFinancingInfo.getFinancingAmount());
-            //收款主体默认为债
-            plan.setReceivingSubject(ConstantUtil.CREDITOR);
+            //收款主体默认为债
+            plan.setReceivingSubject(ConstantUtil.DEBTOR);
             planList.add(plan);
         }
 
@@ -2050,8 +2050,8 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
                         plan.setIncomeExpenditureDate(repayDate);
                         plan.setIncomeExpenditureType(IncomeExpenditureTypeDict.ChildEnum.PRINCIPAL.getCode());
                         plan.setFinalCashFlow(principal);
-                        //收款主体默认为债
-                        plan.setReceivingSubject(ConstantUtil.CREDITOR);
+                        //收款主体默认为债
+                        plan.setReceivingSubject(ConstantUtil.DEBTOR);
                         planList.add(plan);
                     }
                     if (StringUtils.isNotBlank(repayPlan.getInterest()) && !"0".equals(repayPlan.getInterest())) {
@@ -2102,7 +2102,7 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
         //还款方式
         repayPlanTrial.setRepayMethod("2");
         //还款周期
-        repayPlanTrial.setRepayCycl("1MA20");
+        repayPlanTrial.setRepayCycl("1MA21");
         //查询授信完成后客户的openId
         FinancingFromInvestors financingFromInvestors = getFinancingFromInvestors(reviewFinancingInfo);
         if (financingFromInvestors == null || financingFromInvestors.getOpenId() == null) {