Ver código fonte

云资源提交

tags/24080901
PoffyZhang 1 ano atrás
pai
commit
73420b3194
2 arquivos alterados com 36 adições e 1 exclusões
  1. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialApplicationDTO.java
  2. +35
    -1
      pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java

+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialApplicationDTO.java Ver arquivo

@@ -90,6 +90,7 @@ public class ProvincialApplicationDTO implements Serializable {
private String publishSide;

@Builder
@Data
@JsonIgnoreProperties(value = { "handler"})
public static class Cloud implements Serializable {
//云资源台数 11


+ 35
- 1
pmapi/src/test/java/com/ningdatech/pmapi/provincial/Test.java Ver arquivo

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

Carregando…
Cancelar
Salvar