@@ -3,15 +3,10 @@ package com.ningdatech.pmapi.common.config; | |||||
import com.alibaba.fastjson.serializer.SerializerFeature; | import com.alibaba.fastjson.serializer.SerializerFeature; | ||||
import com.alibaba.fastjson.support.config.FastJsonConfig; | import com.alibaba.fastjson.support.config.FastJsonConfig; | ||||
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; | import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; | ||||
import org.springframework.context.annotation.Bean; | |||||
import org.springframework.context.annotation.Configuration; | import org.springframework.context.annotation.Configuration; | ||||
import org.springframework.http.MediaType; | import org.springframework.http.MediaType; | ||||
import org.springframework.http.converter.HttpMessageConverter; | 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.EnableWebMvc; | ||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; | |||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||||
import java.nio.charset.StandardCharsets; | import java.nio.charset.StandardCharsets; | ||||
@@ -1,5 +1,6 @@ | |||||
package com.ningdatech.pmapi.provincial.controller; | package com.ningdatech.pmapi.provincial.controller; | ||||
import com.ningdatech.basic.model.ApiResponse; | |||||
import com.ningdatech.pmapi.projectdeclared.manage.ReviewByProvincialDeptManage; | import com.ningdatech.pmapi.projectdeclared.manage.ReviewByProvincialDeptManage; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.provincial.model.dto.ProvincialProjectDTO; | import com.ningdatech.pmapi.provincial.model.dto.ProvincialProjectDTO; | ||||
@@ -39,7 +40,7 @@ public class TestController { | |||||
@GetMapping("/detail") | @GetMapping("/detail") | ||||
@ApiOperation("测试获取详情") | @ApiOperation("测试获取详情") | ||||
private String detail(@RequestParam String projectId){ | private ApiResponse detail(@RequestParam String projectId){ | ||||
return joinReviewProvincialBureauService.processInfo(projectId); | return joinReviewProvincialBureauService.processInfo(projectId); | ||||
} | } | ||||
} | } |
@@ -1,5 +1,6 @@ | |||||
package com.ningdatech.pmapi.provincial.service; | package com.ningdatech.pmapi.provincial.service; | ||||
import com.ningdatech.basic.model.ApiResponse; | |||||
import com.ningdatech.pmapi.provincial.model.dto.ProvincialProjectDTO; | import com.ningdatech.pmapi.provincial.model.dto.ProvincialProjectDTO; | ||||
/** | /** | ||||
@@ -21,5 +22,5 @@ public interface IJoinReviewProvincialBureauService { | |||||
* 查看 本区域 省局联审 的项目审核详情 | * 查看 本区域 省局联审 的项目审核详情 | ||||
* @return | * @return | ||||
*/ | */ | ||||
String processInfo(String projectId); | ApiResponse processInfo(String projectId); | ||||
} | } |
@@ -78,13 +78,13 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc | |||||
* @return | * @return | ||||
*/ | */ | ||||
@Override | @Override | ||||
public String processInfo(String projectId) { | public ApiResponse processInfo(String projectId) { | ||||
Long timeStamp = System.currentTimeMillis()/1000; | Long timeStamp = System.currentTimeMillis()/1000; | ||||
String url = provincialProperties.getHost() + provincialProperties.getDetailUrl() | String url = provincialProperties.getHost() + provincialProperties.getDetailUrl() | ||||
+ "?timestamp=" + timeStamp; | + "?timestamp=" + timeStamp; | ||||
log.info("省局获取审核详情 url {}",url); | log.info("省局获取审核详情 url {}",url); | ||||
ResponseEntity<String> responseEntity = null; | ResponseEntity<ApiResponse> responseEntity = null; | ||||
String signature = getSha256(timeStamp,provincialProperties.getDetailUrl(), | String signature = getSha256(timeStamp,provincialProperties.getDetailUrl(), | ||||
HttpMethod.POST.name()); | HttpMethod.POST.name()); | ||||
@@ -100,7 +100,7 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc | |||||
.body(projectId); //也可以是DTO | .body(projectId); //也可以是DTO | ||||
try { | try { | ||||
responseEntity = restTemplate.exchange(requestEntity,String.class); | responseEntity = restTemplate.exchange(requestEntity,ApiResponse.class); | ||||
log.info("获取审批详情 响应 :{}",responseEntity); | log.info("获取审批详情 响应 :{}",responseEntity); | ||||
} catch (Exception e) { | } catch (Exception e) { | ||||
log.error("[省局获取审核详情] http request error", e); | log.error("[省局获取审核详情] http request error", e); | ||||