Browse Source

Merge branch 'smb' of http://192.168.0.200:3000/liuj/factoring-trade-backend into smb

wanglang 1 month ago
parent
commit
5c86cb0716

+ 42 - 0
src/main/java/com/sunxung/factoring/entity/smb/FinancingFromInvestorsNotice.java

@@ -138,6 +138,48 @@ public class FinancingFromInvestorsNotice extends BaseEntity {
     @TableField(exist = false)
     @TableField(exist = false)
     private FileStorage file327;
     private FileStorage file327;
 
 
+    /**
+     * 还款账号
+     */
+    @TableField(exist = false)
+    private String repaymentAccount;
+
+    /**
+     * 还款账户名
+     */
+    @TableField(exist = false)
+    private String repaymentAccountName;
+
+    /**
+     * 还款账户账号类型
+     */
+    @TableField(exist = false)
+    private String repaymentAccountType;
+
+    public String getRepaymentAccount() {
+        return repaymentAccount;
+    }
+
+    public void setRepaymentAccount(String repaymentAccount) {
+        this.repaymentAccount = repaymentAccount;
+    }
+
+    public String getRepaymentAccountName() {
+        return repaymentAccountName;
+    }
+
+    public void setRepaymentAccountName(String repaymentAccountName) {
+        this.repaymentAccountName = repaymentAccountName;
+    }
+
+    public String getRepaymentAccountType() {
+        return repaymentAccountType;
+    }
+
+    public void setRepaymentAccountType(String repaymentAccountType) {
+        this.repaymentAccountType = repaymentAccountType;
+    }
+
     public FileStorage getFile301() {
     public FileStorage getFile301() {
         return file301;
         return file301;
     }
     }

+ 14 - 0
src/main/java/com/sunxung/factoring/job/impl/SmbTaskJob.java

@@ -6,6 +6,7 @@ import com.snb.fsos.bean.LoanApply;
 import com.sunxung.factoring.component.exception.BusinessException;
 import com.sunxung.factoring.component.exception.BusinessException;
 import com.sunxung.factoring.component.exception.ValidatorException;
 import com.sunxung.factoring.component.exception.ValidatorException;
 import com.sunxung.factoring.component.util.CodeUtil;
 import com.sunxung.factoring.component.util.CodeUtil;
+import com.sunxung.factoring.component.util.ConstantUtil;
 import com.sunxung.factoring.entity.entprise.Enterprise;
 import com.sunxung.factoring.entity.entprise.Enterprise;
 import com.sunxung.factoring.entity.financing.apply.CFinancingAccountsReceivableInfo;
 import com.sunxung.factoring.entity.financing.apply.CFinancingAccountsReceivableInfo;
 import com.sunxung.factoring.entity.financing.apply.CFinancingApplicantInfo;
 import com.sunxung.factoring.entity.financing.apply.CFinancingApplicantInfo;
@@ -17,6 +18,8 @@ import com.sunxung.factoring.service.entprise.IEnterpriseService;
 import com.sunxung.factoring.service.financing.apply.ICFinancingAccountsReceivableInfoService;
 import com.sunxung.factoring.service.financing.apply.ICFinancingAccountsReceivableInfoService;
 import com.sunxung.factoring.service.financing.apply.ICFinancingApplicantInfoService;
 import com.sunxung.factoring.service.financing.apply.ICFinancingApplicantInfoService;
 import com.sunxung.factoring.service.financing.apply.ICFinancingBasicInfoService;
 import com.sunxung.factoring.service.financing.apply.ICFinancingBasicInfoService;
+import com.sunxung.factoring.service.financing.payment.IPaymentApplyService;
+import com.sunxung.factoring.service.financing.payment.IPaymentApprovalService;
 import com.sunxung.factoring.service.financing.review.ReviewQuotaDisburseService;
 import com.sunxung.factoring.service.financing.review.ReviewQuotaDisburseService;
 import com.sunxung.factoring.service.smb.IFinancingFromInvestorsHistoryService;
 import com.sunxung.factoring.service.smb.IFinancingFromInvestorsHistoryService;
 import com.sunxung.factoring.service.smb.IFinancingFromInvestorsService;
 import com.sunxung.factoring.service.smb.IFinancingFromInvestorsService;
@@ -65,6 +68,8 @@ public class SmbTaskJob {
     private IEnterpriseService enterpriseService;
     private IEnterpriseService enterpriseService;
     @Autowired
     @Autowired
     private SMBApiService smbApiService;
     private SMBApiService smbApiService;
+    @Autowired
+    private IPaymentApplyService paymentApplyService;
 
 
     @Scheduled(cron = "0 0/30 * * * ?")
     @Scheduled(cron = "0 0/30 * * * ?")
     public void process() {
     public void process() {
@@ -210,4 +215,13 @@ public class SmbTaskJob {
         String openId = financingFromInvestors.getOpenId();
         String openId = financingFromInvestors.getOpenId();
         smbApiService.loanApply(loanApplyReq, loanCreditRiskMsg, openId);
         smbApiService.loanApply(loanApplyReq, loanCreditRiskMsg, openId);
     }
     }
+
+    /**
+     * 苏商提款状态查询接口(每小时执行一次)
+     */
+    @Scheduled(cron = "0 0 */1 * * ?")
+    public void financingToSopProcess() {
+        CFinancingBasicInfo financingBasicInfo = financingBasicInfoService.getById(63L);
+        paymentApplyService.financingToSop(financingBasicInfo, ConstantUtil.JIANGSU_SUSHANG_BANK, "2027-04-24");
+    }
 }
 }

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

@@ -944,11 +944,11 @@ public class PaymentApplyServiceImpl extends ServiceImpl<PaymentApplyMapper, Pay
                 quotaDisburseReport.setPlanFactoringList(planFactoringList);
                 quotaDisburseReport.setPlanFactoringList(planFactoringList);
 
 
                 //sop支用上报
                 //sop支用上报
-                ResponseEntity<String> postResponseEntity = restTemplate.postForEntity(quotaDisburseReportUrl, quotaDisburseReport, String.class);
-                ResponseJson postResponseJson = JSONUtil.toBean(postResponseEntity.getBody(), ResponseJson.class);
-                if (postResponseEntity.getStatusCode().value() != HttpStatus.OK.value() || !postResponseJson.isSuccess()) {
-                    throw new BusinessException(CodeUtil.FAIL, "sop支用上报失败:" + postResponseJson.getMsg());
-                }
+//                ResponseEntity<String> postResponseEntity = restTemplate.postForEntity(quotaDisburseReportUrl, quotaDisburseReport, String.class);
+//                ResponseJson postResponseJson = JSONUtil.toBean(postResponseEntity.getBody(), ResponseJson.class);
+//                if (postResponseEntity.getStatusCode().value() != HttpStatus.OK.value() || !postResponseJson.isSuccess()) {
+//                    throw new BusinessException(CodeUtil.FAIL, "sop支用上报失败:" + postResponseJson.getMsg());
+//                }
             }
             }
         } else {
         } else {
             //sop支用上报
             //sop支用上报

+ 6 - 0
src/main/java/com/sunxung/factoring/service/project/impl/BusinessProcessingTaskServiceImpl.java

@@ -171,6 +171,8 @@ public class BusinessProcessingTaskServiceImpl implements BusinessProcessingTask
     @Autowired
     @Autowired
     private RepositoryService repositoryService;
     private RepositoryService repositoryService;
     @Autowired
     @Autowired
+    private IFinancingFromInvestorsService financingFromInvestorsService;
+    @Autowired
     private IFinancingFromInvestorsHistoryService financingFromInvestorsHistoryService;
     private IFinancingFromInvestorsHistoryService financingFromInvestorsHistoryService;
     @Autowired
     @Autowired
     private IFinancingFromInvestorsNoticeService financingFromInvestorsNoticeService;
     private IFinancingFromInvestorsNoticeService financingFromInvestorsNoticeService;
@@ -1050,6 +1052,7 @@ public class BusinessProcessingTaskServiceImpl implements BusinessProcessingTask
             List<FinancingFromInvestorsHistory> financingFromInvestorsHistories = financingFromInvestorsHistoryService.lambdaQuery().eq(FinancingFromInvestorsHistory::getFinancingFromInvestorsId, businessKey).list();
             List<FinancingFromInvestorsHistory> financingFromInvestorsHistories = financingFromInvestorsHistoryService.lambdaQuery().eq(FinancingFromInvestorsHistory::getFinancingFromInvestorsId, businessKey).list();
             if(CollectionUtil.isNotEmpty(financingFromInvestorsHistories)){
             if(CollectionUtil.isNotEmpty(financingFromInvestorsHistories)){
                 for (FinancingFromInvestorsHistory financingFromInvestorsHistory : financingFromInvestorsHistories) {
                 for (FinancingFromInvestorsHistory financingFromInvestorsHistory : financingFromInvestorsHistories) {
+                    FinancingFromInvestors financingFromInvestors = financingFromInvestorsService.getById(financingFromInvestorsHistory.getFinancingFromInvestorsId());
                     FileStorageDO storageDO = fileService.findOneByBusinessId(financingFromInvestorsHistory.getId(), FileModuleDict.ChildEnum.SMB_BUSINESS_LICENSE_FILE_HISTORY.getCode());
                     FileStorageDO storageDO = fileService.findOneByBusinessId(financingFromInvestorsHistory.getId(), FileModuleDict.ChildEnum.SMB_BUSINESS_LICENSE_FILE_HISTORY.getCode());
                     financingFromInvestorsHistory.setFileStorageDO(storageDO);
                     financingFromInvestorsHistory.setFileStorageDO(storageDO);
                     SupplierInfo supplierInfo = supplierInfoService.get(financingFromInvestorsHistory.getSupplierInfoId());
                     SupplierInfo supplierInfo = supplierInfoService.get(financingFromInvestorsHistory.getSupplierInfoId());
@@ -1138,6 +1141,9 @@ public class BusinessProcessingTaskServiceImpl implements BusinessProcessingTask
                     Dictionary limit = dictService.getByCode(financingFromInvestorsNotice.getLimitStatus());
                     Dictionary limit = dictService.getByCode(financingFromInvestorsNotice.getLimitStatus());
                     financingFromInvestorsNotice.setApplyStatus(apply.getName());
                     financingFromInvestorsNotice.setApplyStatus(apply.getName());
                     financingFromInvestorsNotice.setLimitStatus(limit.getName());
                     financingFromInvestorsNotice.setLimitStatus(limit.getName());
+                    financingFromInvestorsNotice.setRepaymentAccount(financingFromInvestors.getRepaymentAccount());
+                    financingFromInvestorsNotice.setRepaymentAccountType(financingFromInvestors.getRepaymentAccountType());
+                    financingFromInvestorsNotice.setRepaymentAccountName(financingFromInvestors.getRepaymentAccountName());
                     BusinessHistoricDetailVo back = new BusinessHistoricDetailVo();
                     BusinessHistoricDetailVo back = new BusinessHistoricDetailVo();
                     back.setFormBusinessName("苏商银行回调");
                     back.setFormBusinessName("苏商银行回调");
                     BusinessProcessingLogVo businessProcessingLogBack = new BusinessProcessingLogVo();
                     BusinessProcessingLogVo businessProcessingLogBack = new BusinessProcessingLogVo();

+ 4 - 0
src/main/java/com/sunxung/factoring/service/smb/impl/FinancingFromInvestorsServiceImpl.java

@@ -163,6 +163,10 @@ public class FinancingFromInvestorsServiceImpl extends ServiceImpl<FinancingFrom
                 throw new BusinessException(CodeUtil.FAIL, "未到可再次申请日期,无法续授信!");
                 throw new BusinessException(CodeUtil.FAIL, "未到可再次申请日期,无法续授信!");
             }
             }
             financingFromInvestors.setId(null);
             financingFromInvestors.setId(null);
+            financingFromInvestors.setCreditStatus(null);
+            financingFromInvestors.setRepaymentAccount(null);
+            financingFromInvestors.setRepaymentAccountName(null);
+            financingFromInvestors.setRepaymentAccountType(null);
         }
         }
         List<SMBFileUpload> fileList = new ArrayList<>();
         List<SMBFileUpload> fileList = new ArrayList<>();
         List<Long> registeredAddressCodeList = financingFromInvestors.getRegisteredAddressCodeList();
         List<Long> registeredAddressCodeList = financingFromInvestors.getRegisteredAddressCodeList();