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("成功"); + } }