@@ -14,6 +14,8 @@ import org.springframework.http.ResponseEntity; | |||||
import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
import org.springframework.web.client.RestTemplate; | import org.springframework.web.client.RestTemplate; | ||||
import java.io.UnsupportedEncodingException; | |||||
import java.net.URLEncoder; | |||||
import java.security.NoSuchAlgorithmException; | import java.security.NoSuchAlgorithmException; | ||||
/** | /** | ||||
@@ -87,4 +89,23 @@ public class DingInfoPullController { | |||||
public String init() { | public String init() { | ||||
return procDefManage.init(); | return procDefManage.init(); | ||||
} | } | ||||
@ApiOperation(value = "系统流程配置初始化", notes = "系统流程配置初始化") | |||||
@GetMapping("/test") | |||||
public String test() throws NoSuchAlgorithmException, UnsupportedEncodingException { | |||||
String appSecret = "e066f496194540afa829c66983d4710e"; | |||||
String appkey = "8fb070a1f1194b2ebffdc6f596bb8a96"; | |||||
String dataName = URLEncoder.encode("丽水市数管公司","UTF-8"); | |||||
long timestamp = System.currentTimeMillis(); | |||||
String sign = CryptUtils.MD5Encode(appkey + appSecret + timestamp); | |||||
String url = "https://interface.ls.local/a/api/shared/1689239219101?data_name=" + dataName + "&appKey=" + appkey + | |||||
"&sign=" + sign + "&requestTime=" + timestamp; | |||||
RestTemplate restTemplate = new RestTemplate(); | |||||
log.info("url:" + url); | |||||
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class); | |||||
System.out.println(JSON.toJSONString(forEntity)); | |||||
return JSON.toJSONString(forEntity); | |||||
} | |||||
} | } |
@@ -684,13 +684,13 @@ public class ProjectLibManage { | |||||
// 如果是建设方案申报后的项目,过滤掉初步方案的应用信息 | // 如果是建设方案申报后的项目,过滤掉初步方案的应用信息 | ||||
if (Boolean.TRUE.equals(projectInfo.getIsConstruct())){ | if (Boolean.TRUE.equals(projectInfo.getIsConstruct())){ | ||||
applicationList = applications.stream() | applicationList = applications.stream() | ||||
.filter(a -> !projectIdList.contains(a.getProjectId())) | |||||
.filter(a -> !projectIdList.contains(a.getProjectCode())) | |||||
.collect(Collectors.toList()); | .collect(Collectors.toList()); | ||||
} | } | ||||
// 如果不是,展示初步方案的应用信息 | // 如果不是,展示初步方案的应用信息 | ||||
else { | else { | ||||
applicationList = applications.stream() | applicationList = applications.stream() | ||||
.filter(a -> projectIdList.contains(a.getProjectId())) | |||||
.filter(a -> projectIdList.contains(a.getProjectCode())) | |||||
.collect(Collectors.toList()); | .collect(Collectors.toList()); | ||||
} | } | ||||
@@ -0,0 +1,38 @@ | |||||
package com.ningdatech.pmapi.irs; | |||||
import com.alibaba.fastjson.JSON; | |||||
import com.ningdatech.pmapi.common.util.CryptUtils; | |||||
import com.ningdatech.pmapi.common.util.RefreshKeyUtil; | |||||
import org.junit.Test; | |||||
import org.springframework.http.ResponseEntity; | |||||
import org.springframework.web.client.RestTemplate; | |||||
import java.io.UnsupportedEncodingException; | |||||
import java.net.URLEncoder; | |||||
import java.security.NoSuchAlgorithmException; | |||||
/** | |||||
* @Classname IrsTest2 | |||||
* @Description | |||||
* @Date 2023/7/20 10:48 | |||||
* @Author PoffyZhang | |||||
*/ | |||||
public class IrsTest2 { | |||||
@Test | |||||
public void test() throws UnsupportedEncodingException, NoSuchAlgorithmException { | |||||
String appSecret = "e066f496194540afa829c66983d4710e"; | |||||
String appkey = "8fb070a1f1194b2ebffdc6f596bb8a96"; | |||||
String dataName = URLEncoder.encode("丽水市大数据","UTF-8"); | |||||
long timestamp = System.currentTimeMillis(); | |||||
String sign = CryptUtils.MD5Encode(appkey + appSecret + timestamp); | |||||
String url = "https://interface.ls.local/a/api/shared/1689239219101?data_name=" + dataName + "&appKey=" + appkey + | |||||
"&sign=" + sign + "&requestTime=" + timestamp; | |||||
RestTemplate restTemplate = new RestTemplate(); | |||||
System.out.println("url:" + url); | |||||
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class); | |||||
System.out.println(JSON.toJSONString(forEntity)); | |||||
} | |||||
} |