Преглед изворни кода

Merge remote-tracking branch 'origin/master'

tags/24080901
WendyYang пре 1 година
родитељ
комит
aa858aba3b
4 измењених фајлова са 7 додато и 10 уклоњено
  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 Прегледај датотеку

@@ -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;


+ 2
- 1
pmapi/src/main/java/com/ningdatech/pmapi/provincial/controller/TestController.java Прегледај датотеку

@@ -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);
} }
} }

+ 2
- 1
pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/IJoinReviewProvincialBureauService.java Прегледај датотеку

@@ -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);
} }

+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java Прегледај датотеку

@@ -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);


Loading…
Откажи
Сачувај