ソースを参照

苏商提款成功后推送sop

liuj 13 時間 前
コミット
0111fdf1aa

+ 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.ValidatorException;
 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.financing.apply.CFinancingAccountsReceivableInfo;
 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.ICFinancingApplicantInfoService;
 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.smb.IFinancingFromInvestorsHistoryService;
 import com.sunxung.factoring.service.smb.IFinancingFromInvestorsService;
@@ -65,6 +68,8 @@ public class SmbTaskJob {
     private IEnterpriseService enterpriseService;
     @Autowired
     private SMBApiService smbApiService;
+    @Autowired
+    private IPaymentApplyService paymentApplyService;
 
     @Scheduled(cron = "0 0/30 * * * ?")
     public void process() {
@@ -210,4 +215,13 @@ public class SmbTaskJob {
         String openId = financingFromInvestors.getOpenId();
         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);
 
                 //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 {
             //sop支用上报