Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
WendyYang 1 year ago
parent
commit
aa858aba3b
4 changed files with 7 additions and 10 deletions
  1. +0
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/common/config/ConfigurerAdapter.java
  2. +2
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/provincial/controller/TestController.java
  3. +2
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/IJoinReviewProvincialBureauService.java
  4. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java

+ 0
- 5
pmapi/src/main/java/com/ningdatech/pmapi/common/config/ConfigurerAdapter.java View File

@@ -3,15 +3,10 @@ package com.ningdatech.pmapi.common.config;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.nio.charset.StandardCharsets;


+ 2
- 1
pmapi/src/main/java/com/ningdatech/pmapi/provincial/controller/TestController.java View File

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.provincial.controller;

import com.ningdatech.basic.model.ApiResponse;
import com.ningdatech.pmapi.projectdeclared.manage.ReviewByProvincialDeptManage;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.provincial.model.dto.ProvincialProjectDTO;
@@ -39,7 +40,7 @@ public class TestController {

@GetMapping("/detail")
@ApiOperation("测试获取详情")
private String detail(@RequestParam String projectId){
private ApiResponse detail(@RequestParam String projectId){
return joinReviewProvincialBureauService.processInfo(projectId);
}
}

+ 2
- 1
pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/IJoinReviewProvincialBureauService.java View File

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.provincial.service;

import com.ningdatech.basic.model.ApiResponse;
import com.ningdatech.pmapi.provincial.model.dto.ProvincialProjectDTO;

/**
@@ -21,5 +22,5 @@ public interface IJoinReviewProvincialBureauService {
* 查看 本区域 省局联审 的项目审核详情
* @return
*/
String processInfo(String projectId);
ApiResponse processInfo(String projectId);
}

+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java View File

@@ -78,13 +78,13 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc
* @return
*/
@Override
public String processInfo(String projectId) {
public ApiResponse processInfo(String projectId) {
Long timeStamp = System.currentTimeMillis()/1000;
String url = provincialProperties.getHost() + provincialProperties.getDetailUrl()
+ "?timestamp=" + timeStamp;

log.info("省局获取审核详情 url {}",url);
ResponseEntity<String> responseEntity = null;
ResponseEntity<ApiResponse> responseEntity = null;

String signature = getSha256(timeStamp,provincialProperties.getDetailUrl(),
HttpMethod.POST.name());
@@ -100,7 +100,7 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc
.body(projectId); //也可以是DTO

try {
responseEntity = restTemplate.exchange(requestEntity,String.class);
responseEntity = restTemplate.exchange(requestEntity,ApiResponse.class);
log.info("获取审批详情 响应 :{}",responseEntity);
} catch (Exception e) {
log.error("[省局获取审核详情] http request error", e);


Loading…
Cancel
Save