|
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ancun.netsign.client.NetSignClient;
|
|
|
import com.ancun.netsign.model.*;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
-import com.google.common.collect.Table;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import net.yaoyi.gulop.member.auth.constant.enums.ContractStatus;
|
|
@@ -16,8 +15,10 @@ import net.yaoyi.gulop.member.auth.util.CommonResult;
|
|
|
import net.yaoyi.gulop.member.auth.util.ContractNumberGenerator;
|
|
|
import net.yaoyi.gulop.member.auth.util.RemoteFileUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
+import java.io.InputStream;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.*;
|
|
|
import java.util.function.Function;
|
|
@@ -317,6 +318,48 @@ public class GigConfigServiceImpl implements GigConfigService {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public CommonResult createContract(ContractInput contractInput){
|
|
|
+ UmsExtConfig config = getConfig();
|
|
|
+ NetSignClient netSignClient = new NetSignClient("https://prev.asign.cn/", config.getExtId(), config.getExtSecret());
|
|
|
+
|
|
|
+ ApiRespBody<ContractOutput> apiRespBody = netSignClient.createContract(contractInput);
|
|
|
+
|
|
|
+ return CommonResult.ok(apiRespBody);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CommonResult createContract1(ContractInput contractInput, MultipartFile file) throws IOException {
|
|
|
+ UmsExtConfig config = getConfig();
|
|
|
+ NetSignClient netSignClient = new NetSignClient("https://prev.asign.cn/", config.getExtId(), config.getExtSecret());
|
|
|
+
|
|
|
+
|
|
|
+ InputStream inputStream = file.getInputStream();
|
|
|
+ String fileName = "20250427095713.docx";
|
|
|
+
|
|
|
+ // 封装到FileDto
|
|
|
+ FileDto fileDto = new FileDto();
|
|
|
+ fileDto.setFileName(fileName);
|
|
|
+ fileDto.setFileInputStream(inputStream);
|
|
|
+ List<FileDto> files = new ArrayList<>();
|
|
|
+ files.add(fileDto);
|
|
|
+
|
|
|
+ contractInput.setContractFiles(files);
|
|
|
+
|
|
|
+ ApiRespBody<ContractOutput> apiRespBody = netSignClient.createContract(contractInput);
|
|
|
+
|
|
|
+ return CommonResult.ok(apiRespBody);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CommonResult addSigner(List<ContractUserInput> contractUserInputs){
|
|
|
+ UmsExtConfig config = getConfig();
|
|
|
+ NetSignClient netSignClient = new NetSignClient("https://prev.asign.cn/", config.getExtId(), config.getExtSecret());
|
|
|
+
|
|
|
+ ApiRespBody<ContractOutput> apiRespBody = netSignClient.addSigner(contractUserInputs);
|
|
|
+
|
|
|
+ return CommonResult.ok(apiRespBody);
|
|
|
+ }
|
|
|
|
|
|
//同步状态
|
|
|
public CommonResult signCheck(Long contractId, long userId){
|