|
|
|
@ -30,6 +30,72 @@ public class OutForwardInController {
|
|
|
|
private RestTemplate restTemplate;
|
|
|
|
private RestTemplate restTemplate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/ZDYH/getFatigueData")
|
|
|
|
|
|
|
|
@ExecutionTimeLogger
|
|
|
|
|
|
|
|
public ResponseEntity<String> getFatigueData(@RequestHeader Map<String, String> headers, @RequestBody Map<String, Object> body) {
|
|
|
|
|
|
|
|
String uuid = UuidUtil.getUuid();
|
|
|
|
|
|
|
|
log.info("[uuid:{}]-接收到请求,请求头:{},请求体:{}",uuid, headers, body);
|
|
|
|
|
|
|
|
String intranetIp = PropertiesUtil.getValue("IntranetIp");
|
|
|
|
|
|
|
|
String intranetPort = PropertiesUtil.getValue("IntranetPort");
|
|
|
|
|
|
|
|
// 构造请求头
|
|
|
|
|
|
|
|
HttpHeaders requestHeaders = new HttpHeaders();
|
|
|
|
|
|
|
|
headers.forEach(requestHeaders::add);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 构造请求体
|
|
|
|
|
|
|
|
HttpEntity<Map<String, Object>> requestEntity = new HttpEntity<>(body, requestHeaders);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 调用接口
|
|
|
|
|
|
|
|
String url = urlSplicing(intranetIp, intranetPort,Constant.INTRANET_ZDYH_GET_FATIGUE_DATA);
|
|
|
|
|
|
|
|
ResponseEntity<String> response = restTemplate.postForEntity(url, requestEntity, String.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 返回接口的响应
|
|
|
|
|
|
|
|
log.info("[uuid:{}]-请求接口{}成功,响应状态码:{},响应体:{}", uuid, url, response.getStatusCode(), response.getBody());
|
|
|
|
|
|
|
|
return new ResponseEntity<>(response.getBody(), response.getStatusCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/ZDYH/getHiddenDangerAreaData")
|
|
|
|
|
|
|
|
@ExecutionTimeLogger
|
|
|
|
|
|
|
|
public ResponseEntity<String> getHiddenDangerAreaData(@RequestHeader Map<String, String> headers, @RequestBody Map<String, Object> body) {
|
|
|
|
|
|
|
|
String uuid = UuidUtil.getUuid();
|
|
|
|
|
|
|
|
log.info("[uuid:{}]-接收到请求,请求头:{},请求体:{}",uuid, headers, body);
|
|
|
|
|
|
|
|
String intranetIp = PropertiesUtil.getValue("IntranetIp");
|
|
|
|
|
|
|
|
String intranetPort = PropertiesUtil.getValue("IntranetPort");
|
|
|
|
|
|
|
|
// 构造请求头
|
|
|
|
|
|
|
|
HttpHeaders requestHeaders = new HttpHeaders();
|
|
|
|
|
|
|
|
headers.forEach(requestHeaders::add);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 构造请求体
|
|
|
|
|
|
|
|
HttpEntity<Map<String, Object>> requestEntity = new HttpEntity<>(body, requestHeaders);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 调用接口
|
|
|
|
|
|
|
|
String url = urlSplicing(intranetIp, intranetPort,Constant.INTRANET_ZDYH_GET_HIDDEN_DANGER_AREA_DATA);
|
|
|
|
|
|
|
|
ResponseEntity<String> response = restTemplate.postForEntity(url, requestEntity, String.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 返回接口的响应
|
|
|
|
|
|
|
|
log.info("[uuid:{}]-请求接口{}成功,响应状态码:{},响应体:{}", uuid, url, response.getStatusCode(), response.getBody());
|
|
|
|
|
|
|
|
return new ResponseEntity<>(response.getBody(), response.getStatusCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/ZDYH/getFenceData")
|
|
|
|
|
|
|
|
@ExecutionTimeLogger
|
|
|
|
|
|
|
|
public ResponseEntity<String> getFenceData(@RequestHeader Map<String, String> headers, @RequestBody Map<String, Object> body) {
|
|
|
|
|
|
|
|
String uuid = UuidUtil.getUuid();
|
|
|
|
|
|
|
|
log.info("[uuid:{}]-接收到请求,请求头:{},请求体:{}",uuid, headers, body);
|
|
|
|
|
|
|
|
String intranetIp = PropertiesUtil.getValue("IntranetIp");
|
|
|
|
|
|
|
|
String intranetPort = PropertiesUtil.getValue("IntranetPort");
|
|
|
|
|
|
|
|
// 构造请求头
|
|
|
|
|
|
|
|
HttpHeaders requestHeaders = new HttpHeaders();
|
|
|
|
|
|
|
|
headers.forEach(requestHeaders::add);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 构造请求体
|
|
|
|
|
|
|
|
HttpEntity<Map<String, Object>> requestEntity = new HttpEntity<>(body, requestHeaders);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 调用接口
|
|
|
|
|
|
|
|
String url = urlSplicing(intranetIp, intranetPort,Constant.INTRANET_ZDYH_GET_FENCE_DATA);
|
|
|
|
|
|
|
|
ResponseEntity<String> response = restTemplate.postForEntity(url, requestEntity, String.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 返回接口的响应
|
|
|
|
|
|
|
|
log.info("[uuid:{}]-请求接口{}成功,响应状态码:{},响应体:{}", uuid, url, response.getStatusCode(), response.getBody());
|
|
|
|
|
|
|
|
return new ResponseEntity<>(response.getBody(), response.getStatusCode());
|
|
|
|
|
|
|
|
}
|
|
|
|
@PostMapping("/DCPC/uploadEtcGantryPassData")
|
|
|
|
@PostMapping("/DCPC/uploadEtcGantryPassData")
|
|
|
|
@ExecutionTimeLogger
|
|
|
|
@ExecutionTimeLogger
|
|
|
|
public ResponseEntity<String> uploadEtcGantryData(@RequestHeader Map<String, String> headers, @RequestBody Map<String, Object> body) {
|
|
|
|
public ResponseEntity<String> uploadEtcGantryData(@RequestHeader Map<String, String> headers, @RequestBody Map<String, Object> body) {
|
|
|
|
@ -52,6 +118,7 @@ public class OutForwardInController {
|
|
|
|
log.info("[uuid:{}]-请求接口{}成功,响应状态码:{},响应体:{}", uuid, url, response.getStatusCode(), response.getBody());
|
|
|
|
log.info("[uuid:{}]-请求接口{}成功,响应状态码:{},响应体:{}", uuid, url, response.getStatusCode(), response.getBody());
|
|
|
|
return new ResponseEntity<>(response.getBody(), response.getStatusCode());
|
|
|
|
return new ResponseEntity<>(response.getBody(), response.getStatusCode());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/ZDYH/getWarningData")
|
|
|
|
@PostMapping("/ZDYH/getWarningData")
|
|
|
|
@ExecutionTimeLogger
|
|
|
|
@ExecutionTimeLogger
|
|
|
|
public ResponseEntity<String> getWarningData(@RequestHeader Map<String, String> headers, @RequestBody Map<String, Object> body) {
|
|
|
|
public ResponseEntity<String> getWarningData(@RequestHeader Map<String, String> headers, @RequestBody Map<String, Object> body) {
|
|
|
|
|