Kaynağa Gözat

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

liutao 1 ay önce
ebeveyn
işleme
58ccf04799

+ 18 - 0
src/main/java/com/inkasso/factoring/financingmanagement/dao/FinancingLoanInfoMapper.java

@@ -0,0 +1,18 @@
+package com.inkasso.factoring.financingmanagement.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.inkasso.factoring.financingmanagement.entity.FinancingLoanInfo;
+import org.apache.ibatis.annotations.Mapper;
+
+
+/**
+ * <p>
+ * 资方放款信息 Mapper 接口
+ * </p>
+ *
+ * @author liutao
+ * @since 2024-09-05
+ */
+@Mapper
+public interface FinancingLoanInfoMapper extends BaseMapper<FinancingLoanInfo> {
+}

+ 441 - 0
src/main/java/com/inkasso/factoring/financingmanagement/entity/FinancingLoanInfo.java

@@ -0,0 +1,441 @@
+package com.inkasso.factoring.financingmanagement.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.inkasso.adapter.bean.BaseBean;
+
+/**
+ * <p>
+ * 资方放款信息
+ * </p>
+ *
+ * @author liutao
+ * @since 2024-09-05
+ */
+@TableName("financing_loan_info")
+public class FinancingLoanInfo extends BaseBean {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * C端融资信息基础Id
+     */
+    @TableField("c_financing_basic_info_id")
+    private Long cFinancingBasicInfoId;
+
+    /**
+     * 合同编号
+     */
+    @TableField("contract_no")
+    private String contractNo;
+
+    /**
+     * 额度支用批次
+     */
+    @TableField("quota_disburse_batch")
+    private Integer quotaDisburseBatch;
+
+    /**
+     * 客户类型 1-企业
+     */
+    @TableField("customer_type")
+    private Integer customerType;
+
+    /**
+     * 用户唯一标识
+     */
+    @TableField("open_id")
+    private String openId;
+
+    /**
+     * 供应商企业信息Id
+     */
+    @TableField("c_enterprise_id")
+    private Long cEnterpriseId;
+
+    /**
+     * 供应商名称
+     */
+    @TableField(exist = false)
+    private String supplierName;
+
+    /**
+     * 供应商统一社会信用代码
+     */
+    @TableField(exist = false)
+    private String socialCreditCode;
+
+    /**
+     * 资方ID
+     */
+    @TableField("financing_management_id")
+    private Long financingManagementId;
+
+    /**
+     * 资方名称
+     */
+    @TableField("financing_institution_name")
+    private String financingInstitutionName;
+
+    /**
+     * 放款金额
+     */
+    @TableField("loan_amount")
+    private String loanAmount;
+
+    /**
+     * 申请编号
+     */
+    @TableField("payout_no")
+    private String payoutNo;
+
+    /**
+     * 借据编号
+     */
+    @TableField("due_bill_no")
+    private String dueBillNo;
+
+    /**
+     * 放款状态
+     */
+    @TableField("payout_status")
+    private String payoutStatus;
+
+    /**
+     * 失败原因
+     */
+    @TableField("fail_msg")
+    private String failMsg;
+
+    /**
+     * 放款日期
+     */
+    @TableField("payout_date")
+    private String payoutDate;
+
+    /**
+     * 到期日期
+     */
+    @TableField("maturity_date")
+    private String maturityDate;
+
+    /**
+     * 提款申请日期
+     */
+    @TableField("loan_apply_date")
+    private String loanApplyDate;
+
+    /**
+     * 还款方式
+     */
+    @TableField("repay_method")
+    private String repayMethod;
+
+    /**
+     * 长银融资期限
+     */
+    @TableField("term")
+    private String term;
+
+    /**
+     * 支付方式
+     */
+    @TableField("pay_way")
+    private String payWay;
+
+    /**
+     * 收款卡标识
+     */
+    @TableField("payee_inner_card_flag")
+    private String payeeInnerCardFlag;
+
+    /**
+     * 收款账户
+     */
+    @TableField("payee_acct_th_number")
+    private String payeeAcctThNumber;
+
+    /**
+     * 收款账户名
+     */
+    @TableField("payee_acct_th_name")
+    private String payeeAcctThName;
+
+    /**
+     * 还款账号
+     */
+    @TableField("repay_acct_no")
+    private String repayAcctNo;
+
+    /**
+     * 还款账户名
+     */
+    @TableField("repay_acct_name")
+    private String repayAcctName;
+
+    /**
+     * 还款账户账号类型
+     */
+    @TableField("repay_acct_type")
+    private String repayAcctType;
+
+    /**
+     * 业务编号(合作方业务编号)
+     */
+    @TableField("biz_no")
+    private String bizNo;
+
+    public Long getcFinancingBasicInfoId() {
+        return cFinancingBasicInfoId;
+    }
+
+    public void setcFinancingBasicInfoId(Long cFinancingBasicInfoId) {
+        this.cFinancingBasicInfoId = cFinancingBasicInfoId;
+    }
+
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+
+    public Integer getQuotaDisburseBatch() {
+        return quotaDisburseBatch;
+    }
+
+    public void setQuotaDisburseBatch(Integer quotaDisburseBatch) {
+        this.quotaDisburseBatch = quotaDisburseBatch;
+    }
+
+    public void setCustomerType(Integer customerType) {
+        this.customerType = customerType;
+    }
+
+    public Long getcEnterpriseId() {
+        return cEnterpriseId;
+    }
+
+    public void setcEnterpriseId(Long cEnterpriseId) {
+        this.cEnterpriseId = cEnterpriseId;
+    }
+
+    public Long getFinancingManagementId() {
+        return financingManagementId;
+    }
+
+    public void setFinancingManagementId(Long financingManagementId) {
+        this.financingManagementId = financingManagementId;
+    }
+
+    public String getFinancingInstitutionName() {
+        return financingInstitutionName;
+    }
+
+    public void setFinancingInstitutionName(String financingInstitutionName) {
+        this.financingInstitutionName = financingInstitutionName;
+    }
+
+    public String getLoanAmount() {
+        return loanAmount;
+    }
+
+    public void setLoanAmount(String loanAmount) {
+        this.loanAmount = loanAmount;
+    }
+
+    public String getPayoutNo() {
+        return payoutNo;
+    }
+
+    public void setPayoutNo(String payoutNo) {
+        this.payoutNo = payoutNo;
+    }
+
+    public String getDueBillNo() {
+        return dueBillNo;
+    }
+
+    public void setDueBillNo(String dueBillNo) {
+        this.dueBillNo = dueBillNo;
+    }
+
+    public String getPayoutStatus() {
+        return payoutStatus;
+    }
+
+    public void setPayoutStatus(String payoutStatus) {
+        this.payoutStatus = payoutStatus;
+    }
+
+    public String getFailMsg() {
+        return failMsg;
+    }
+
+    public void setFailMsg(String failMsg) {
+        this.failMsg = failMsg;
+    }
+
+    public String getPayoutDate() {
+        return payoutDate;
+    }
+
+    public void setPayoutDate(String payoutDate) {
+        this.payoutDate = payoutDate;
+    }
+
+    public String getMaturityDate() {
+        return maturityDate;
+    }
+
+    public void setMaturityDate(String maturityDate) {
+        this.maturityDate = maturityDate;
+    }
+
+    public String getLoanApplyDate() {
+        return loanApplyDate;
+    }
+
+    public void setLoanApplyDate(String loanApplyDate) {
+        this.loanApplyDate = loanApplyDate;
+    }
+
+    public String getRepayMethod() {
+        return repayMethod;
+    }
+
+    public void setRepayMethod(String repayMethod) {
+        this.repayMethod = repayMethod;
+    }
+
+    public String getTerm() {
+        return term;
+    }
+
+    public void setTerm(String term) {
+        this.term = term;
+    }
+
+    public String getPayWay() {
+        return payWay;
+    }
+
+    public void setPayWay(String payWay) {
+        this.payWay = payWay;
+    }
+
+    public String getPayeeInnerCardFlag() {
+        return payeeInnerCardFlag;
+    }
+
+    public void setPayeeInnerCardFlag(String payeeInnerCardFlag) {
+        this.payeeInnerCardFlag = payeeInnerCardFlag;
+    }
+
+    public String getPayeeAcctThNumber() {
+        return payeeAcctThNumber;
+    }
+
+    public void setPayeeAcctThNumber(String payeeAcctThNumber) {
+        this.payeeAcctThNumber = payeeAcctThNumber;
+    }
+
+    public String getPayeeAcctThName() {
+        return payeeAcctThName;
+    }
+
+    public void setPayeeAcctThName(String payeeAcctThName) {
+        this.payeeAcctThName = payeeAcctThName;
+    }
+
+    public String getRepayAcctNo() {
+        return repayAcctNo;
+    }
+
+    public void setRepayAcctNo(String repayAcctNo) {
+        this.repayAcctNo = repayAcctNo;
+    }
+
+    public String getRepayAcctName() {
+        return repayAcctName;
+    }
+
+    public void setRepayAcctName(String repayAcctName) {
+        this.repayAcctName = repayAcctName;
+    }
+
+    public String getRepayAcctType() {
+        return repayAcctType;
+    }
+
+    public void setRepayAcctType(String repayAcctType) {
+        this.repayAcctType = repayAcctType;
+    }
+
+    public Integer getCustomerType() {
+        return customerType;
+    }
+
+    public String getSupplierName() {
+        return supplierName;
+    }
+
+    public void setSupplierName(String supplierName) {
+        this.supplierName = supplierName;
+    }
+
+    public String getSocialCreditCode() {
+        return socialCreditCode;
+    }
+
+    public void setSocialCreditCode(String socialCreditCode) {
+        this.socialCreditCode = socialCreditCode;
+    }
+
+    public String getOpenId() {
+        return openId;
+    }
+
+    public void setOpenId(String openId) {
+        this.openId = openId;
+    }
+
+    public String getBizNo() {
+        return bizNo;
+    }
+
+    public void setBizNo(String bizNo) {
+        this.bizNo = bizNo;
+    }
+
+    @Override
+    public String toString() {
+        return "FinancingLoanInfo{" +
+                "cFinancingBasicInfoId=" + cFinancingBasicInfoId +
+                ", contractNo=" + contractNo +
+                ", quotaDisburseBatch=" + quotaDisburseBatch +
+                ", customerType=" + customerType +
+                ", cEnterpriseId=" + cEnterpriseId +
+                ", financingManagementId=" + financingManagementId +
+                ", financingInstitutionName=" + financingInstitutionName +
+                ", loanAmount=" + loanAmount +
+                ", payoutNo=" + payoutNo +
+                ", dueBillNo=" + dueBillNo +
+                ", payoutStatus=" + payoutStatus +
+                ", failMsg=" + failMsg +
+                ", payoutDate=" + payoutDate +
+                ", maturityDate=" + maturityDate +
+                ", loanApplyDate=" + loanApplyDate +
+                ", repayMethod=" + repayMethod +
+                ", term=" + term +
+                ", payWay=" + payWay +
+                ", payeeInnerCardFlag=" + payeeInnerCardFlag +
+                ", payeeAcctThNumber=" + payeeAcctThNumber +
+                ", payeeAcctThName=" + payeeAcctThName +
+                ", repayAcctNo=" + repayAcctNo +
+                ", repayAcctName=" + repayAcctName +
+                ", repayAcctType=" + repayAcctType +
+                "}";
+    }
+}

+ 27 - 0
src/main/java/com/inkasso/factoring/financingmanagement/entity/vo/PaymentCollectionBasic.java

@@ -1,5 +1,6 @@
 package com.inkasso.factoring.financingmanagement.entity.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.inkasso.factoring.dict.entity.Dictionary;
 import com.inkasso.factoring.system.user.entity.UserDO;
 
@@ -103,6 +104,16 @@ public class PaymentCollectionBasic {
      **/
     private Boolean tradeFactoring;
 
+    /**
+     * 还款账号
+     */
+    private String repayAcctNo;
+
+    /**
+     * 还款账户名
+     */
+    private String repayAcctName;
+
     public Long getId() {
         return id;
     }
@@ -254,4 +265,20 @@ public class PaymentCollectionBasic {
     public void setTradeFactoring(Boolean tradeFactoring) {
         this.tradeFactoring = tradeFactoring;
     }
+
+    public String getRepayAcctNo() {
+        return repayAcctNo;
+    }
+
+    public void setRepayAcctNo(String repayAcctNo) {
+        this.repayAcctNo = repayAcctNo;
+    }
+
+    public String getRepayAcctName() {
+        return repayAcctName;
+    }
+
+    public void setRepayAcctName(String repayAcctName) {
+        this.repayAcctName = repayAcctName;
+    }
 }

+ 15 - 0
src/main/java/com/inkasso/factoring/financingmanagement/service/IFinancingLoanInfoService.java

@@ -0,0 +1,15 @@
+package com.inkasso.factoring.financingmanagement.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.inkasso.factoring.financingmanagement.entity.FinancingLoanInfo;
+
+/**
+ * <p>
+ * 资方放款信息 服务类
+ * </p>
+ *
+ * @author liutao
+ * @since 2024-09-05
+ */
+public interface IFinancingLoanInfoService extends IService<FinancingLoanInfo> {
+}

+ 12 - 1
src/main/java/com/inkasso/factoring/financingmanagement/service/impl/FinancingApplyServiceImpl.java

@@ -142,6 +142,8 @@ public class FinancingApplyServiceImpl implements FinancingApplyService {
     private ReviewFinancingInfoService reviewFinancingInfoService;
     @Value("${sop.getReturnedPrincipalByBusinessNo}")
     private String getReturnedPrincipalByBusinessNo;
+    @Autowired
+    private IFinancingLoanInfoService financingLoanInfoService;
 
     @Override
     public GridPage<FinancingApplyListVo> list(FinancingSearch search) {
@@ -693,7 +695,16 @@ public class FinancingApplyServiceImpl implements FinancingApplyService {
                 throw new BusinessException(CodeUtil.FAIL, "查询sop最新收放款计划失败:" + jsonObject.getStr("msg"));
             }
             JSONObject data = jsonObject.getJSONObject("data");
-            return JSONUtil.toBean(data, PaymentCollectionBasic.class);
+            PaymentCollectionBasic paymentCollectionBasic = JSONUtil.toBean(data, PaymentCollectionBasic.class);
+            //判断是否是苏商资方放款项目,是的话新增还款账户、还款账户名字段
+            FinancingLoanInfo financingLoanInfo = financingLoanInfoService.lambdaQuery()
+                    .eq(FinancingLoanInfo::getcFinancingBasicInfoId, id)
+                    .eq(FinancingLoanInfo::getPayoutStatus, "02").one();
+            if (financingLoanInfo != null) {
+                paymentCollectionBasic.setRepayAcctName(financingLoanInfo.getRepayAcctName());
+                paymentCollectionBasic.setRepayAcctNo(financingLoanInfo.getRepayAcctNo());
+            }
+            return paymentCollectionBasic;
         }
         return null;
     }

+ 19 - 0
src/main/java/com/inkasso/factoring/financingmanagement/service/impl/FinancingLoanInfoServiceImpl.java

@@ -0,0 +1,19 @@
+package com.inkasso.factoring.financingmanagement.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.inkasso.factoring.financingmanagement.dao.FinancingLoanInfoMapper;
+import com.inkasso.factoring.financingmanagement.entity.FinancingLoanInfo;
+import com.inkasso.factoring.financingmanagement.service.IFinancingLoanInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 资方放款信息 服务实现类
+ * </p>
+ *
+ * @author liutao
+ * @since 2024-09-05
+ */
+@Service
+public class FinancingLoanInfoServiceImpl extends ServiceImpl<FinancingLoanInfoMapper, FinancingLoanInfo> implements IFinancingLoanInfoService {
+}