Преглед изворни кода

feat(红否原因):项目 供应商

liutao пре 6 месеци
родитељ
комит
f9f636325a

+ 42 - 0
src/main/java/com/sunxung/factoring/entity/financing/contractTemplate/ContractTemplate.java

@@ -34,8 +34,27 @@ public class ContractTemplate extends BaseEntity {
     /**
      *  是否启用 0 否 1 是
      */
+    @TableField("visible")
     private Integer visible;
 
+    /**
+     * 合同类型
+     */
+    @TableField("contract_type")
+    private String contractType;
+
+    /**
+     * 模板类型
+     */
+    @TableField("template_type")
+    private String templateType;
+
+    /**
+     * 模板code
+     */
+    @TableField("template_code")
+    private String templateCode;
+
     public String getVersion() {
         return version;
     }
@@ -59,4 +78,27 @@ public class ContractTemplate extends BaseEntity {
         this.visible = visible;
     }
 
+    public String getContractType() {
+        return contractType;
+    }
+
+    public void setContractType(String contractType) {
+        this.contractType = contractType;
+    }
+
+    public String getTemplateType() {
+        return templateType;
+    }
+
+    public void setTemplateType(String templateType) {
+        this.templateType = templateType;
+    }
+
+    public String getTemplateCode() {
+        return templateCode;
+    }
+
+    public void setTemplateCode(String templateCode) {
+        this.templateCode = templateCode;
+    }
 }

+ 39 - 0
src/main/java/com/sunxung/factoring/entity/financing/contractTemplate/vo/SynchronizeFileVo.java

@@ -23,6 +23,21 @@ public class SynchronizeFileVo {
      */
     private String fileType;
 
+    /**
+     * 合同类型
+     */
+    private String contractType;
+
+    /**
+     * 模板类型
+     */
+    private String templateType;
+
+    /**
+     * 模板code
+     */
+    private String templateCode;
+
 
     public SynchronizeFileVo() {
     }
@@ -50,4 +65,28 @@ public class SynchronizeFileVo {
     public void setFileType(String fileType) {
         this.fileType = fileType;
     }
+
+    public String getContractType() {
+        return contractType;
+    }
+
+    public void setContractType(String contractType) {
+        this.contractType = contractType;
+    }
+
+    public String getTemplateType() {
+        return templateType;
+    }
+
+    public void setTemplateType(String templateType) {
+        this.templateType = templateType;
+    }
+
+    public String getTemplateCode() {
+        return templateCode;
+    }
+
+    public void setTemplateCode(String templateCode) {
+        this.templateCode = templateCode;
+    }
 }

+ 1 - 0
src/main/java/com/sunxung/factoring/service/financing/contract/ContractMakingService.java

@@ -2,6 +2,7 @@ package com.sunxung.factoring.service.financing.contract;
 
 import com.sunxung.factoring.entity.financing.contract.ContractInfo;
 import com.sunxung.factoring.entity.financing.contract.UploadContractSignatory;
+import com.sunxung.factoring.entity.financing.contractTemplate.ContractTemplate;
 import com.sunxung.factoring.entity.sys.Dictionary;
 
 import java.util.List;

+ 15 - 1
src/main/java/com/sunxung/factoring/service/financing/contract/impl/ContractMakingServiceImpl.java

@@ -11,6 +11,7 @@ import com.sunxung.factoring.dict.impl.FileModuleDict;
 import com.sunxung.factoring.entity.entprise.Enterprise;
 import com.sunxung.factoring.entity.financing.apply.CFinancingBasicInfo;
 import com.sunxung.factoring.entity.financing.contract.*;
+import com.sunxung.factoring.entity.financing.contractTemplate.ContractTemplate;
 import com.sunxung.factoring.entity.financing.review.*;
 import com.sunxung.factoring.entity.sys.Dictionary;
 import com.sunxung.factoring.entity.sys.FileStorage;
@@ -18,6 +19,7 @@ import com.sunxung.factoring.entity.tradingPlatform.Platform;
 import com.sunxung.factoring.service.entprise.IEnterpriseService;
 import com.sunxung.factoring.service.financing.apply.ICFinancingBasicInfoService;
 import com.sunxung.factoring.service.financing.contract.*;
+import com.sunxung.factoring.service.financing.contractTemplate.IContractTemplateService;
 import com.sunxung.factoring.service.financing.review.*;
 import com.sunxung.factoring.service.project.BusinessAssigneeService;
 import com.sunxung.factoring.service.sys.DictionaryService;
@@ -108,6 +110,8 @@ public class ContractMakingServiceImpl implements ContractMakingService {
     private IContractElectronicCustomerInfoService contractElectronicCustomerInfoService;
     @Autowired
     private IElectronicPersonInfoService electronicPersonInfoService;
+    @Autowired
+    private IContractTemplateService contractTemplateService;
 
     @Override
     public ContractInfo edit(Long id) {
@@ -313,7 +317,15 @@ public class ContractMakingServiceImpl implements ContractMakingService {
 
     @Override
     public List<Dictionary> getElectronicSignList() {
-        return dictService.findByParentCode("firstContractCompany");
+        List<ContractTemplate> list = contractTemplateService.lambdaQuery().eq(ContractTemplate::getVisible, 1).list();
+        //todo 过滤合同
+        List<Dictionary> dictionaryList = list.stream().map(r -> {
+            Dictionary dictionary = new Dictionary();
+            dictionary.setCode(r.getTemplateCode());
+            dictionary.setName(r.getName());
+            return dictionary;
+        }).collect(Collectors.toList());
+        return dictionaryList;
     }
 
     @Override
@@ -928,6 +940,8 @@ public class ContractMakingServiceImpl implements ContractMakingService {
                             Platform platform = platformService.getOne(new QueryWrapper<Platform>().eq("socialCreditCode", uploadContractSignatory.getSocialCreditCode()));
                             if (platform != null) {
                                 customer.setPlatformId(platform.getId());
+                            }else {
+                                throw new BusinessException(CodeUtil.FAIL,"未查到企业信息!");
                             }
                         }
                         sysCustomerService.add(customer);

+ 31 - 5
src/main/java/com/sunxung/factoring/service/financing/contract/impl/NewContractMakingServiceImpl.java

@@ -12,25 +12,31 @@ import com.sunxung.factoring.entity.financing.apply.CFinancingBasicInfo;
 import com.sunxung.factoring.entity.financing.contract.ContractBasicContract;
 import com.sunxung.factoring.entity.financing.contract.ContractInfo;
 import com.sunxung.factoring.entity.financing.contract.ContractMasterContract;
+import com.sunxung.factoring.entity.financing.contractTemplate.ContractTemplate;
 import com.sunxung.factoring.entity.financing.review.ReviewFinancingInfo;
 import com.sunxung.factoring.entity.financing.review.ReviewMasterContract;
 import com.sunxung.factoring.entity.financing.review.ReviewMasterContractDebtor;
 import com.sunxung.factoring.entity.financing.review.ReviewQuotaDisburse;
 import com.sunxung.factoring.entity.salescontractmanagement.CSalesContractBasicInfo;
+import com.sunxung.factoring.entity.sys.FileStorage;
 import com.sunxung.factoring.service.entprise.IEnterpriseService;
 import com.sunxung.factoring.service.financing.apply.ICFinancingBasicInfoService;
 import com.sunxung.factoring.service.financing.contract.INewContractMakingService;
+import com.sunxung.factoring.service.financing.contractTemplate.IContractTemplateService;
 import com.sunxung.factoring.service.financing.review.ReviewFinancingInfoService;
 import com.sunxung.factoring.service.financing.review.ReviewMasterContractDebtorService;
 import com.sunxung.factoring.service.financing.review.ReviewMasterContractService;
 import com.sunxung.factoring.service.financing.review.ReviewQuotaDisburseService;
 import com.sunxung.factoring.service.salescontractmanagement.SalesContractService;
+import com.sunxung.factoring.service.sys.ISysAttachmentRefService;
+import com.sunxung.factoring.service.sys.dto.AttachmentDto;
 import org.apache.commons.io.FileUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.stereotype.Service;
 
 import java.io.File;
+import java.io.InputStream;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.util.*;
@@ -58,6 +64,10 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
     private IEnterpriseService enterpriseService;
     @Autowired
     private SalesContractService salesContractService;
+    @Autowired
+    private IContractTemplateService contractTemplateService;
+    @Autowired
+    private ISysAttachmentRefService sysAttachmentRefService;
 
     @Override
     public void createContractDocument(String type, Long id, ContractInfo contractInfo, List<File> list) {
@@ -84,7 +94,7 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
     /**
      * 下载(贸理通)三方协议
      */
-    public void dealNewtTripartiteAgreementFactoringDownload(ContractInfo contractInfo, List<File> list, Long basicContractId) {
+    public void dealNewtTripartiteAgreementFactoringDownload(ContractInfo contractInfo, List<File> list, Long basicContractId,String type) {
         try {
             Map<String, Object> map = new HashMap<>();
             ReviewQuotaDisburse reviewQuotaDisburse = reviewQuotaDisburseService.getById(contractInfo.getReviewQuotaDisburseId());
@@ -184,11 +194,20 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
                 map.put("month", month);
                 map.put("year", year);
 
-                ClassPathResource classPathResource = new ClassPathResource("ftl/contractTemplate/30、三方协议(贸理通).docx");
+//                ClassPathResource classPathResource = new ClassPathResource("ftl/contractTemplate/30、三方协议(贸理通).docx");
+                ContractTemplate contractTemplate = contractTemplateService.lambdaQuery().eq(ContractTemplate::getTemplateCode, type).eq(ContractTemplate::getVisible, 1).one();
+                AttachmentDto attachmentDto = AttachmentDto.builder()
+                        .setEntityId(contractTemplate.getId())
+                        .setChildEnum(FileModuleDict.ChildEnum.CONTRACT_TEMPLATE_FILE)
+                        .build();
+                List<FileStorage> files = sysAttachmentRefService.getFiles(attachmentDto);
+                FileStorage fileStorage = files.get(0);
+
                 LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
                 Configure configure = Configure.builder()
                         .bind("details", policy).build();
-                template = XWPFTemplate.compile(classPathResource.getPath(), configure).render(map);
+                template = XWPFTemplate.compile(fileStorage.getAbsolutePath(), configure).render(map);
+//                template = XWPFTemplate.compile(classPathResource.getPath(), configure).render(map);
                 path = FileUtil.getAbsolutePath("三方协议(贸理通)" + companyName, ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
                 File file = new File(path);
                 if (!file.exists()) {
@@ -258,8 +277,15 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
             dataMap.put("month", DateUtil.getMonth(date));
             dataMap.put("day", DateUtil.getDay(date));
             if (type.equals(ConstantConversionUtil.POOLFACTORINGBUSINESSCONTRACT)) {
-                ClassPathResource classPathResource = new ClassPathResource("ftl/contractTemplate/24、池保理业务合同.docx");
-                template = XWPFTemplate.compile(classPathResource.getInputStream()).render(dataMap);
+//                ClassPathResource classPathResource = new ClassPathResource("ftl/contractTemplate/24、池保理业务合同.docx");
+                ContractTemplate contractTemplate = contractTemplateService.lambdaQuery().eq(ContractTemplate::getTemplateCode, type).eq(ContractTemplate::getVisible, 1).one();
+                AttachmentDto attachmentDto = AttachmentDto.builder()
+                        .setEntityId(contractTemplate.getId())
+                        .setChildEnum(FileModuleDict.ChildEnum.CONTRACT_TEMPLATE_FILE)
+                        .build();
+                List<FileStorage> files = sysAttachmentRefService.getFiles(attachmentDto);
+                FileStorage fileStorage = files.get(0);
+                template = XWPFTemplate.compile(fileStorage.getAbsolutePath()).render(dataMap);
                 path = FileUtil.getAbsolutePath("池保理业务合同" + applicantCompanyName, ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
                 File file = new File(path);
                 if (!file.exists()) {

+ 86 - 37
src/main/java/com/sunxung/factoring/service/financing/contract/impl/SysCustomerServiceImpl.java

@@ -6,13 +6,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.sunxung.factoring.component.exception.ValidatorException;
 import com.sunxung.factoring.component.util.CodeUtil;
 import com.sunxung.factoring.component.util.ElectronicSignatureUtil;
+import com.sunxung.factoring.component.util.StringUtil;
 import com.sunxung.factoring.entity.entprise.Enterprise;
 import com.sunxung.factoring.entity.financing.contract.ElectronicPersonInfo;
 import com.sunxung.factoring.entity.financing.contract.SysCustomer;
+import com.sunxung.factoring.entity.tradingPlatform.Platform;
 import com.sunxung.factoring.mapper.financing.contract.SysCustomerMapper;
 import com.sunxung.factoring.service.entprise.IEnterpriseService;
 import com.sunxung.factoring.service.financing.contract.IElectronicPersonInfoService;
 import com.sunxung.factoring.service.financing.contract.ISysCustomerService;
+import com.sunxung.factoring.service.tradingPlatform.PlatformService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -36,6 +39,9 @@ public class SysCustomerServiceImpl extends ServiceImpl<SysCustomerMapper, SysCu
     @Autowired
     private IElectronicPersonInfoService electronicPersonInfoService;
 
+    @Autowired
+    private PlatformService platformService;
+
     @Override
     public SysCustomer getByName(String companyName) {
         return baseMapper.getByName(companyName);
@@ -45,7 +51,12 @@ public class SysCustomerServiceImpl extends ServiceImpl<SysCustomerMapper, SysCu
     @Transactional(rollbackFor = Exception.class)
     public void add(SysCustomer sysCustomer) {
         //是否存在该供应商
-        SysCustomer customer = getOne(new QueryWrapper<SysCustomer>().eq("ent_business_id", sysCustomer.getEntBusinessId()).eq("account_type", sysCustomer.getAccountType()).last("LIMIT 1"));
+        SysCustomer customer;
+        if (sysCustomer.getEntBusinessId() != null) {
+            customer = getOne(new QueryWrapper<SysCustomer>().eq("ent_business_id", sysCustomer.getEntBusinessId()).eq("account_type", sysCustomer.getAccountType()).last("LIMIT 1"));
+        } else {
+            customer = lambdaQuery().eq(SysCustomer::getPlatformId, sysCustomer.getPlatformId()).eq(SysCustomer::getAccountType, sysCustomer.getAccountType()).one();
+        }
         if (customer != null) {
             throw new ValidatorException(CodeUtil.FAIL, "已经存在该企业信息,请勿重复添加");
         }
@@ -62,45 +73,83 @@ public class SysCustomerServiceImpl extends ServiceImpl<SysCustomerMapper, SysCu
         }
 
         if (sysCustomer.getId() == null) {
-
-            String openId = getOpenId(sysCustomer);
-            //法大大认证
-            String customerId = null;
-            String authUrl = null;
-            //添加身份信息
-
-            String idType = sysCustomer.getElectronicPersonInfo() == null ? "" : sysCustomer.getElectronicPersonInfo().getCardTypeId();
-            String idNumber = sysCustomer.getElectronicPersonInfo() == null ? "" : sysCustomer.getElectronicPersonInfo().getSocialCreditCode();
             if (sysCustomer.getAccountType().equals("1")) {
-                customerId = ElectronicSignatureUtil.registerAccount(openId, sysCustomer.getAccountType());
-                String authResult = ElectronicSignatureUtil.getAuthUrl(sysCustomer.getAccountType(), customerId, null);
-                JSONObject authJson = (JSONObject) JSONObject.parse(authResult);
-                authUrl = authJson.getString("authUrl");
-            } else if (sysCustomer.getAccountType().equals("2")) {
-                String authResult = ElectronicSignatureUtil.getAuthUrl(sysCustomer.getAccountType(), openId, null);
-                JSONObject authJson = (JSONObject) JSONObject.parse(authResult);
-                authUrl = authJson.getString("authUrl");
-                customerId = authJson.getString("customerId");
-            }
+                String openId = getOpenId(sysCustomer);
+                //法大大认证
+                String customerId = null;
+                String authUrl = null;
+                //添加身份信息
 
-            if (authUrl == null || customerId == null) {
-                throw new ValidatorException(CodeUtil.FAIL, "生成认证链接出错");
+                String idType = sysCustomer.getElectronicPersonInfo() == null ? "" : sysCustomer.getElectronicPersonInfo().getCardTypeId();
+                String idNumber = sysCustomer.getElectronicPersonInfo() == null ? "" : sysCustomer.getElectronicPersonInfo().getSocialCreditCode();
+                if (sysCustomer.getAccountType().equals("1")) {
+                    customerId = ElectronicSignatureUtil.registerAccount(openId, sysCustomer.getAccountType());
+                    String authResult = ElectronicSignatureUtil.getAuthUrl(sysCustomer.getAccountType(), customerId, null);
+                    JSONObject authJson = (JSONObject) JSONObject.parse(authResult);
+                    authUrl = authJson.getString("authUrl");
+                    if (authUrl == null || customerId == null) {
+                        throw new ValidatorException(CodeUtil.FAIL, "生成认证链接出错");
+                    }
+                    String shortUrl = ElectronicSignatureUtil.shortUrl(null, authUrl);
+                    sysCustomer.setShortAuthUrl(shortUrl);
+                    sysCustomer.setShortAuthUrlCreate(new Date());
+                    sysCustomer.setFddCustomerId(customerId);
+                    sysCustomer.setAuthStatus(false);
+                    sysCustomer.setAuthUrl(authUrl);
+                    //开启自动签署
+                    String transactionId = UUID.randomUUID().toString().trim().replaceAll("-", "").toUpperCase();
+                    String beforeAutoSignUrl = ElectronicSignatureUtil.beforeAutoSign(transactionId, customerId, customerId);
+                    String shortAutoSignUrl = ElectronicSignatureUtil.shortUrl(null, beforeAutoSignUrl);
+                    sysCustomer.setShortAutoSignUrl(shortAutoSignUrl);
+                    sysCustomer.setShortAutoSignUrlCreate(new Date());
+                    sysCustomer.setTransactionId(transactionId);
+                    sysCustomer.setAutoSignStatus(0);
+                    sysCustomer.setAutoSignUrl(beforeAutoSignUrl);
+                }
+            } else if (sysCustomer.getAccountType().equals("2")) {
+                String shortUrl = null;
+                String customerId = null;
+                String authUrl = null;
+                String shortAutoSignUrl = null;
+                String transactionId = null;
+                String beforeAutoSignUrl = null;
+                Boolean authStatus = null;
+                Integer autoSignStatus = 0;
+                Date shortAuthUrlCreate = new Date();
+                Date shortAutoSignUrlCreate = new Date();
+                if (sysCustomer.getEntBusinessId() != null) {
+                    Enterprise enterprise = enterpriseService.getById(sysCustomer.getEntBusinessId());
+                    shortUrl = enterprise.getShortAuthUrl();
+                    customerId = enterprise.getFddCustomerId();
+                    authUrl = enterprise.getAuthUrl();
+                    shortAutoSignUrl = enterprise.getShortAutoSignUrl();
+                    beforeAutoSignUrl = enterprise.getAutoSignUrl();
+                    authStatus = enterprise.getAuthStatus();
+                    autoSignStatus = enterprise.getAutoSignStatus();
+                } else if (sysCustomer.getPlatformId() != null) {
+                    Platform platform = platformService.getById(sysCustomer.getPlatformId());
+                    shortUrl = platform.getShortAuthUrl();
+                    customerId = platform.getFddCustomerId();
+                    authUrl = platform.getAuthUrl();
+                    shortAutoSignUrl = platform.getShortAutoSignUrl();
+                    beforeAutoSignUrl = platform.getAutoSignUrl();
+                    authStatus = platform.getAuthStatus() == 0 ? false : true;
+                    autoSignStatus = platform.isAutoSignStatus() == true ? 1 : 0;
+                    shortAuthUrlCreate = platform.getShortAuthUrlCreate();
+                    shortAutoSignUrlCreate = platform.getShortAutoSignUrlCreate();
+                }
+                sysCustomer.setShortAuthUrl(shortUrl);
+                sysCustomer.setShortAuthUrlCreate(shortAuthUrlCreate);
+                sysCustomer.setFddCustomerId(customerId);
+                sysCustomer.setAuthStatus(authStatus);
+                sysCustomer.setAuthUrl(authUrl);
+                //开启自动签署
+                sysCustomer.setShortAutoSignUrl(shortAutoSignUrl);
+                sysCustomer.setShortAutoSignUrlCreate(shortAutoSignUrlCreate);
+                sysCustomer.setTransactionId(transactionId);
+                sysCustomer.setAutoSignStatus(autoSignStatus);
+                sysCustomer.setAutoSignUrl(beforeAutoSignUrl);
             }
-            String shortUrl = ElectronicSignatureUtil.shortUrl(null, authUrl);
-            sysCustomer.setShortAuthUrl(shortUrl);
-            sysCustomer.setShortAuthUrlCreate(new Date());
-            sysCustomer.setFddCustomerId(customerId);
-            sysCustomer.setAuthStatus(false);
-            sysCustomer.setAuthUrl(authUrl);
-            //开启自动签署
-            String transactionId = UUID.randomUUID().toString().trim().replaceAll("-", "").toUpperCase();
-            String beforeAutoSignUrl = ElectronicSignatureUtil.beforeAutoSign(transactionId, customerId, customerId);
-            String shortAutoSignUrl = ElectronicSignatureUtil.shortUrl(null, beforeAutoSignUrl);
-            sysCustomer.setShortAutoSignUrl(shortAutoSignUrl);
-            sysCustomer.setShortAutoSignUrlCreate(new Date());
-            sysCustomer.setTransactionId(transactionId);
-            sysCustomer.setAutoSignStatus(0);
-            sysCustomer.setAutoSignUrl(beforeAutoSignUrl);
 //            保存记录
             saveOrUpdate(sysCustomer);
         }

+ 7 - 1
src/main/java/com/sunxung/factoring/service/financing/contractTemplate/impl/ContractTemplateServiceImpl.java

@@ -72,10 +72,16 @@ public class ContractTemplateServiceImpl extends ServiceImpl<ContractTemplateMap
         }
         for (SynchronizeFileVo synchronizeFileVo : synchronizeFileVos) {
             //保存合同模板信息
+            String name = synchronizeFileVo.getName();
+            String contractType = synchronizeFileVo.getContractType();
+            String templateCode = synchronizeFileVo.getTemplateCode();
+            String templateType = synchronizeFileVo.getTemplateType();
             ContractTemplate contractTemplate = new ContractTemplate();
             contractTemplate.setVersion(versionNo);
-            String name = synchronizeFileVo.getName();
             contractTemplate.setName(name);
+            contractTemplate.setTemplateCode(templateCode);
+            contractTemplate.setTemplateType(templateType);
+            contractTemplate.setContractType(contractType);
             contractTemplate.setVisible(1);
             save(contractTemplate);
             //从sop获取文件

+ 1 - 8
src/main/java/com/sunxung/factoring/web/financing/ContractTemplateController.java

@@ -3,16 +3,9 @@ package com.sunxung.factoring.web.financing;
 import com.sunxung.factoring.entity.ResponseJson;
 import com.sunxung.factoring.entity.financing.contractTemplate.vo.SynchronizeVo;
 import com.sunxung.factoring.service.financing.contractTemplate.IContractTemplateService;
-import org.checkerframework.checker.units.qual.A;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
-import org.springframework.web.multipart.support.StandardServletMultipartResolver;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.Map;
 
 /**
  * @author liutao
@@ -25,7 +18,7 @@ public class ContractTemplateController {
     private IContractTemplateService contractTemplateService;
 
     @RequestMapping("api/synchronize/contract/template")
-    public ResponseJson SynchronizeContractTemplate(SynchronizeVo synchronizeVo){
+    public ResponseJson SynchronizeContractTemplate(SynchronizeVo synchronizeVo) {
         contractTemplateService.SynchronizeContractTemplate(synchronizeVo);
         return new ResponseJson();
     }

+ 3 - 0
src/main/resources/data/update/v1.0/20231117liutao.sql

@@ -1312,6 +1312,9 @@ CREATE TABLE `contract_template` (
                                               `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
                                               `version` varchar(50) DEFAULT '' COMMENT '合同版本',
                                               `name` varchar(200) DEFAULT '' COMMENT '合同名称',
+                                              `contract_type` varchar(200) DEFAULT '' COMMENT '合同类型',
+                                              `template_type` varchar(200) DEFAULT '' COMMENT '模板类型',
+                                              `template_code` varchar(200) DEFAULT '' COMMENT '模板code',
                                               `visible` tinyint(2) DEFAULT null COMMENT '是否启用',
 
                                               `user_create` varchar(32) DEFAULT '' COMMENT '创建人',