diff --git a/FortressGetDataInterface/src/main/java/com/nmggs/query/common/emnu/Constant.java b/FortressGetDataInterface/src/main/java/com/nmggs/query/common/emnu/Constant.java index 5bb41ef..c93de24 100644 --- a/FortressGetDataInterface/src/main/java/com/nmggs/query/common/emnu/Constant.java +++ b/FortressGetDataInterface/src/main/java/com/nmggs/query/common/emnu/Constant.java @@ -46,4 +46,7 @@ public class Constant { public static final String INTRANET_ZDYH_GET_EQUIPMENT_INFO = "GetDataInterface/ZDYH/getEquipmentInfo"; public static final String INTRANET_ZDYH_GET_USE_FREQUENCY = "GetDataInterface/ZDYH/getUseFrequency"; public static final String INTRANET_ZDYH_GET_WARNING_DATA = "GetDataInterface/ZDYH/getWarningData"; + public static final String INTRANET_ZDYH_GET_FENCE_DATA = "GetDataInterface/ZDYH/getFenceData"; + public static final String INTRANET_ZDYH_GET_HIDDEN_DANGER_AREA_DATA = "GetDataInterface/ZDYH/getHiddenDangerAreaData"; + public static final String INTRANET_ZDYH_GET_FATIGUE_DATA = "GetDataInterface/ZDYH/getFatigueData"; } diff --git a/FortressGetDataInterface/src/main/java/com/nmggs/query/controller/OutForwardInController.java b/FortressGetDataInterface/src/main/java/com/nmggs/query/controller/OutForwardInController.java index 5c6bb63..d0aa0f9 100644 --- a/FortressGetDataInterface/src/main/java/com/nmggs/query/controller/OutForwardInController.java +++ b/FortressGetDataInterface/src/main/java/com/nmggs/query/controller/OutForwardInController.java @@ -30,6 +30,72 @@ public class OutForwardInController { private RestTemplate restTemplate; + @PostMapping("/ZDYH/getFatigueData") + @ExecutionTimeLogger + public ResponseEntity getFatigueData(@RequestHeader Map headers, @RequestBody Map 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> requestEntity = new HttpEntity<>(body, requestHeaders); + + // 调用接口 + String url = urlSplicing(intranetIp, intranetPort,Constant.INTRANET_ZDYH_GET_FATIGUE_DATA); + ResponseEntity 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 getHiddenDangerAreaData(@RequestHeader Map headers, @RequestBody Map 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> requestEntity = new HttpEntity<>(body, requestHeaders); + + // 调用接口 + String url = urlSplicing(intranetIp, intranetPort,Constant.INTRANET_ZDYH_GET_HIDDEN_DANGER_AREA_DATA); + ResponseEntity 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 getFenceData(@RequestHeader Map headers, @RequestBody Map 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> requestEntity = new HttpEntity<>(body, requestHeaders); + + // 调用接口 + String url = urlSplicing(intranetIp, intranetPort,Constant.INTRANET_ZDYH_GET_FENCE_DATA); + ResponseEntity 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") @ExecutionTimeLogger public ResponseEntity uploadEtcGantryData(@RequestHeader Map headers, @RequestBody Map body) { @@ -52,6 +118,7 @@ public class OutForwardInController { log.info("[uuid:{}]-请求接口{}成功,响应状态码:{},响应体:{}", uuid, url, response.getStatusCode(), response.getBody()); return new ResponseEntity<>(response.getBody(), response.getStatusCode()); } + @PostMapping("/ZDYH/getWarningData") @ExecutionTimeLogger public ResponseEntity getWarningData(@RequestHeader Map headers, @RequestBody Map body) { diff --git a/FortressGetDataInterface/src/main/resources/version/1.0.1.txt b/FortressGetDataInterface/src/main/resources/version/1.0.1.txt deleted file mode 100644 index ffc0d2a..0000000 --- a/FortressGetDataInterface/src/main/resources/version/1.0.1.txt +++ /dev/null @@ -1,4 +0,0 @@ -序号 日期 版本号 说明 -1 2025年09月09日 1.0.0 堡垒机中间转发内外网请求 -2 2025年09月28日 1.0.1 增加ETC 门架计费扣费交易数据上传接口/DCPC/uploadEtcGantryPassData - diff --git a/FortressGetDataInterface/src/main/resources/version/1.0.2.txt b/FortressGetDataInterface/src/main/resources/version/1.0.2.txt new file mode 100644 index 0000000..6fe1021 --- /dev/null +++ b/FortressGetDataInterface/src/main/resources/version/1.0.2.txt @@ -0,0 +1,6 @@ +序号 日期 版本号 说明 +1 2025年09月09日 1.0.0 堡垒机中间转发内外网请求 +2 2025年09月28日 1.0.1 增加ETC 门架计费扣费交易数据上传接口/DCPC/uploadEtcGantryPassData +3 2025年10月10日 1.0.2 增加重点隐患车辆电子围栏接口/ZDYH/getFenceData + 隐患区域数据接口/ZDYH/getHiddenDangerAreaData + 违法车辆数据接口/ZDYH/getFatigueData diff --git a/FortressGetDataInterface/target/FortressGetDataInterface.war b/FortressGetDataInterface/target/FortressGetDataInterface.war index 11157dd..285f28f 100644 Binary files a/FortressGetDataInterface/target/FortressGetDataInterface.war and b/FortressGetDataInterface/target/FortressGetDataInterface.war differ diff --git a/FortressGetDataInterface/target/FortressGetDataInterface.war.original b/FortressGetDataInterface/target/FortressGetDataInterface.war.original index 9bc1d29..5182568 100644 Binary files a/FortressGetDataInterface/target/FortressGetDataInterface.war.original and b/FortressGetDataInterface/target/FortressGetDataInterface.war.original differ diff --git a/FortressGetDataInterface/target/FortressGetDataInterface/WEB-INF/classes/com/nmggs/query/common/emnu/Constant.class b/FortressGetDataInterface/target/FortressGetDataInterface/WEB-INF/classes/com/nmggs/query/common/emnu/Constant.class index 579fd40..7955109 100644 Binary files a/FortressGetDataInterface/target/FortressGetDataInterface/WEB-INF/classes/com/nmggs/query/common/emnu/Constant.class and b/FortressGetDataInterface/target/FortressGetDataInterface/WEB-INF/classes/com/nmggs/query/common/emnu/Constant.class differ diff --git a/FortressGetDataInterface/target/FortressGetDataInterface/WEB-INF/classes/com/nmggs/query/controller/OutForwardInController.class b/FortressGetDataInterface/target/FortressGetDataInterface/WEB-INF/classes/com/nmggs/query/controller/OutForwardInController.class index 30427b3..a771477 100644 Binary files a/FortressGetDataInterface/target/FortressGetDataInterface/WEB-INF/classes/com/nmggs/query/controller/OutForwardInController.class and b/FortressGetDataInterface/target/FortressGetDataInterface/WEB-INF/classes/com/nmggs/query/controller/OutForwardInController.class differ diff --git a/FortressGetDataInterface/target/classes/com/nmggs/query/common/emnu/Constant.class b/FortressGetDataInterface/target/classes/com/nmggs/query/common/emnu/Constant.class index 579fd40..7955109 100644 Binary files a/FortressGetDataInterface/target/classes/com/nmggs/query/common/emnu/Constant.class and b/FortressGetDataInterface/target/classes/com/nmggs/query/common/emnu/Constant.class differ diff --git a/FortressGetDataInterface/target/classes/com/nmggs/query/controller/OutForwardInController.class b/FortressGetDataInterface/target/classes/com/nmggs/query/controller/OutForwardInController.class index 30427b3..a771477 100644 Binary files a/FortressGetDataInterface/target/classes/com/nmggs/query/controller/OutForwardInController.class and b/FortressGetDataInterface/target/classes/com/nmggs/query/controller/OutForwardInController.class differ