소스 검색

feat(苏商银行):合同签署修改

liutao 1 개월 전
부모
커밋
9867d437d3

+ 18 - 1
src/main/java/com/inkasso/factoring/financingmanagement/service/impl/ContractSignConfirmServiceImpl.java

@@ -25,9 +25,10 @@ import com.inkasso.factoring.financingmanagement.service.IContractElectronicCust
 import com.inkasso.factoring.financingmanagement.service.IContractElectronicInfoService;
 import com.inkasso.factoring.financingmanagement.service.IContractSignConfirmService;
 import com.inkasso.factoring.financingmanagement.service.ISysCustomerService;
+import com.inkasso.factoring.smb.entity.SmbContractInfo;
+import com.inkasso.factoring.smb.service.ISmbContractInfoService;
 import com.inkasso.factoring.tradingPlatform.entity.Platform;
 import com.inkasso.factoring.tradingPlatform.service.ITradingPlatformService;
-import org.apache.bcel.classfile.Code;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.HttpStatus;
@@ -37,6 +38,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.client.RestTemplate;
 
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * @Description :
@@ -66,6 +68,9 @@ public class ContractSignConfirmServiceImpl extends ServiceImpl<ContractSignConf
     @Value("${trade.contractSignConfirmSubmitUrl}")
     private String contractSignConfirmSubmitUrl;
 
+    @Autowired
+    private ISmbContractInfoService smbContractInfoService;
+
     @Override
     public ContractSignConfirm getSignConfirmDetail(Long id) {
 
@@ -78,6 +83,18 @@ public class ContractSignConfirmServiceImpl extends ServiceImpl<ContractSignConf
         List<ContractElectronicInfo> electronicInfoList = contractElectronicInfoService.list(new QueryWrapper<ContractElectronicInfo>()
                 .eq("contract_info_id", contractInfoId));
         if (CollectionUtil.isNotEmpty(electronicInfoList)) {
+            electronicInfoList = electronicInfoList.stream().filter(r->{
+                SmbContractInfo smbContractInfo = smbContractInfoService.lambdaQuery().eq(SmbContractInfo::getContractElectronicInfoId, r.getId()).one();
+                if(smbContractInfo != null){
+                    if(smbContractInfo.getSignStatus()){
+                        return false;
+                    }else {
+                        return true;
+                    }
+                }else {
+                    return true;
+                }
+            }).collect(Collectors.toList());
             Set<Long> sysCustomerIds = getCustomerIds(electronicInfoList);
             //生成签署链接
             doSign(electronicInfoList, sysCustomerIds);

+ 17 - 0
src/main/java/com/inkasso/factoring/smb/dao/SmbContractInfoMapper.java

@@ -0,0 +1,17 @@
+package com.inkasso.factoring.smb.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.inkasso.factoring.smb.entity.SmbContractInfo;
+
+
+/**
+ * <p>
+ * 苏商电子签合同 Mapper 接口
+ * </p>
+ *
+ * @author liutao
+ * @since 2024-09-05
+ */
+public interface SmbContractInfoMapper extends BaseMapper<SmbContractInfo> {
+
+}

+ 188 - 0
src/main/java/com/inkasso/factoring/smb/entity/SmbContractInfo.java

@@ -0,0 +1,188 @@
+package com.inkasso.factoring.smb.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.inkasso.factoring.common.entity.BaseEntity;
+
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 苏商电子签合同
+ * </p>
+ *
+ * @author liutao
+ * @since 2024-09-05
+ */
+@TableName("smb_contract_info")
+public class SmbContractInfo extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 合同电子签信息id
+     */
+    @TableField("contract_electronic_info_id")
+    private Long contractElectronicInfoId;
+
+    /**
+     * 供应商id
+     */
+    @TableField("supplier_id")
+    private Long supplierId;
+
+    /**
+     * 合同类型 1 主合同 2 担保合同
+     */
+    @TableField("contract_type")
+    private Long contractType;
+
+    /**
+     * 合同编号
+     */
+    @TableField("contract_number")
+    private String contractNumber;
+
+    /**
+     * name
+     */
+    @TableField("name")
+    private String name;
+
+    /**
+     * 证件号
+     */
+    @TableField("social_code")
+    private String socialCode;
+
+    /**
+     * 金额
+     */
+    @TableField("amount")
+    private BigDecimal amount;
+
+    /**
+     * 签署状态
+     */
+    @TableField("sign_status")
+    private Boolean signStatus;
+
+    /**
+     * 失败原因
+     */
+    @TableField("fail_reason")
+    private String failReason;
+
+    /**
+     * 文件类型
+     */
+    @TableField("fail_reason")
+    private String fileType;
+    /**
+     * 文件路径
+     */
+    @TableField("fail_reason")
+    private String filePath;
+    /**
+     * 文件名称
+     */
+    @TableField("fail_reason")
+    private String filename;
+
+
+    public String getFileType() {
+        return fileType;
+    }
+
+    public void setFileType(String fileType) {
+        this.fileType = fileType;
+    }
+
+    public String getFilePath() {
+        return filePath;
+    }
+
+    public void setFilePath(String filePath) {
+        this.filePath = filePath;
+    }
+
+    public String getFilename() {
+        return filename;
+    }
+
+    public void setFilename(String filename) {
+        this.filename = filename;
+    }
+
+    public String getContractNumber() {
+        return contractNumber;
+    }
+
+    public void setContractNumber(String contractNumber) {
+        this.contractNumber = contractNumber;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSocialCode() {
+        return socialCode;
+    }
+
+    public Long getContractType() {
+        return contractType;
+    }
+
+    public void setContractType(Long contractType) {
+        this.contractType = contractType;
+    }
+
+    public void setSocialCode(String socialCode) {
+        this.socialCode = socialCode;
+    }
+
+    public BigDecimal getAmount() {
+        return amount;
+    }
+
+    public void setAmount(BigDecimal amount) {
+        this.amount = amount;
+    }
+
+    public Long getSupplierId() {
+        return supplierId;
+    }
+
+    public void setSupplierId(Long supplierId) {
+        this.supplierId = supplierId;
+    }
+
+    public Long getContractElectronicInfoId() {
+        return contractElectronicInfoId;
+    }
+
+    public void setContractElectronicInfoId(Long contractElectronicInfoId) {
+        this.contractElectronicInfoId = contractElectronicInfoId;
+    }
+
+    public Boolean getSignStatus() {
+        return signStatus;
+    }
+
+    public void setSignStatus(Boolean signStatus) {
+        this.signStatus = signStatus;
+    }
+    public String getFailReason() {
+        return failReason;
+    }
+
+    public void setFailReason(String failReason) {
+        this.failReason = failReason;
+    }
+
+}

+ 17 - 0
src/main/java/com/inkasso/factoring/smb/service/ISmbContractInfoService.java

@@ -0,0 +1,17 @@
+package com.inkasso.factoring.smb.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.inkasso.factoring.smb.entity.SmbContractInfo;
+
+/**
+ * <p>
+ * 苏商电子签合同 服务类
+ * </p>
+ *
+ * @author liutao
+ * @since 2024-09-05
+ */
+public interface ISmbContractInfoService extends IService<SmbContractInfo> {
+
+}

+ 21 - 0
src/main/java/com/inkasso/factoring/smb/service/impl/SmbContractInfoServiceImpl.java

@@ -0,0 +1,21 @@
+package com.inkasso.factoring.smb.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.inkasso.factoring.smb.dao.SmbContractInfoMapper;
+import com.inkasso.factoring.smb.entity.SmbContractInfo;
+import com.inkasso.factoring.smb.service.ISmbContractInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 苏商电子签合同 服务实现类
+ * </p>
+ *
+ * @author liutao
+ * @since 2024-09-05
+ */
+@Service
+public class SmbContractInfoServiceImpl extends ServiceImpl<SmbContractInfoMapper, SmbContractInfo> implements ISmbContractInfoService {
+
+
+}