From 73420b31940f47385d7eef513037a3cf98407242 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 21 Apr 2023 15:11:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E8=B5=84=E6=BA=90=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/dto/ProvincialApplicationDTO.java | 1 + .../java/com/ningdatech/pmapi/provincial/Test.java | 36 +++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialApplicationDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialApplicationDTO.java index 22ebf5d..396f853 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialApplicationDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialApplicationDTO.java @@ -90,6 +90,7 @@ public class ProvincialApplicationDTO implements Serializable { private String publishSide; @Builder + @Data @JsonIgnoreProperties(value = { "handler"}) public static class Cloud implements Serializable { //云资源台数 11 diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java b/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java index db28189..7e7c9ec 100644 --- a/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java +++ b/pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java @@ -1,10 +1,19 @@ package com.ningdatech.pmapi.provincial; import cn.hutool.crypto.SecureUtil; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.ningdatech.file.service.FileService; import com.ningdatech.pmapi.AppTests; +import com.ningdatech.pmapi.projectdeclared.converter.ApplicationConverter; import com.ningdatech.pmapi.projectdeclared.manage.PrequalificationDeclaredProjectManage; +import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; +import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; import com.ningdatech.pmapi.projectlib.service.IProjectService; +import com.ningdatech.pmapi.provincial.service.IJoinReviewProvincialBureauService; +import com.ningdatech.pmapi.todocenter.constant.TodoCenterContant; +import com.wflow.exception.BusinessException; import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.StringUtils; @@ -15,6 +24,8 @@ import javax.crypto.spec.SecretKeySpec; import java.io.UnsupportedEncodingException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; +import java.time.LocalDateTime; +import java.util.List; /** * @Classname Test @@ -23,7 +34,7 @@ import java.security.NoSuchAlgorithmException; * @Author PoffyZhang */ @Slf4j -public class Test {//extends AppTests +public class Test extends AppTests{// @Autowired private PrequalificationDeclaredProjectManage prequalificationDeclaredProjectManage; @@ -31,6 +42,15 @@ public class Test {//extends AppTests @Autowired private IProjectService projectService; + @Autowired + private IProjectApplicationService applicationService; + + @Autowired + private FileService fileService; + + @Autowired + private IJoinReviewProvincialBureauService joinReviewProvincialBureauService; + @org.junit.Test public void test() throws NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeyException { // Long timeStamp = System.currentTimeMillis()/1000; @@ -59,4 +79,18 @@ public class Test {//extends AppTests String s = "Expires"; System.out.println(url.replaceAll("&?" + s + "=[^&]*&", StringUtils.EMPTY)); } + + @org.junit.Test + public void Test4444(){ + // 对接省级联审的接口 + Project p = projectService.getById(448); + + List applications = applicationService.list(Wrappers.lambdaQuery(ProjectApplication.class) + .eq(ProjectApplication::getProjectId, p.getId())); + if(!joinReviewProvincialBureauService.pushImportProject( + ApplicationConverter.convertProject(p,applications,fileService))){ + throw new BusinessException("提交省级部门联审失败"); + } + System.out.println("成功"); + } }