From 177c9be16b408a6b6b2ebd292c7e12f361996176 Mon Sep 17 00:00:00 2001 From: panbaolin <13071138970@163.com> Date: Fri, 12 Dec 2025 16:54:13 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=B5=B7=E6=B4=8B=E6=8A=A5?= =?UTF-8?q?=E8=AD=A6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MapSituationDisplayController.java | 34 ++ .../jeecg/gis/service/HYAlarmJsonData.java | 464 ++++++++++++++++++ .../service/MapSituationDisplayService.java | 4 +- .../impl/MapSituationDisplayServiceImpl.java | 6 +- .../vo/AlarmRecordVO.java} | 63 ++- ...cy.java => DataProvisionEfficiencyVO.java} | 2 +- .../controller/OceanFeignController.java | 62 --- 7 files changed, 553 insertions(+), 82 deletions(-) create mode 100644 jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/HYAlarmJsonData.java rename jeecg-module-large-screen/src/main/java/org/jeecg/{ocean/entity/AlarmRecord.java => gis/vo/AlarmRecordVO.java} (61%) rename jeecg-module-large-screen/src/main/java/org/jeecg/gis/vo/{DataProvisionEfficiency.java => DataProvisionEfficiencyVO.java} (94%) delete mode 100644 jeecg-module-large-screen/src/main/java/org/jeecg/ocean/controller/OceanFeignController.java diff --git a/jeecg-module-large-screen/src/main/java/org/jeecg/gis/controller/MapSituationDisplayController.java b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/controller/MapSituationDisplayController.java index 8adda9d..3b30318 100644 --- a/jeecg-module-large-screen/src/main/java/org/jeecg/gis/controller/MapSituationDisplayController.java +++ b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/controller/MapSituationDisplayController.java @@ -1,18 +1,25 @@ package org.jeecg.gis.controller; +import com.alibaba.fastjson.JSON; import lombok.RequiredArgsConstructor; import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.properties.HttpClientHostProperties; +import org.jeecg.gis.service.HYAlarmJsonData; import org.jeecg.gis.service.MapSituationDisplayService; +import org.jeecg.gis.vo.AlarmRecordVO; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.io.IOException; +import java.util.List; @RestController @RequestMapping("gis") @RequiredArgsConstructor public class MapSituationDisplayController { + private final HttpClientHostProperties hostProperties; private final MapSituationDisplayService mapSituationDisplayService; @AutoLog(value = "查询全球站点信息") @@ -56,4 +63,31 @@ public class MapSituationDisplayController { public Result getAllAccelerator() { return Result.OK(mapSituationDisplayService.getAllAccelerator()); } + + @AutoLog(value = "海洋报警信息") + @GetMapping(value = "/getAlarmRecords") + public Result getAlarmRecords() throws IOException { +// String getUrl = hostProperties.getOceanHost() + "bizAlarmRecords/list?pageNo=1&pageSize=10000"; +// Map getHeaders = Map.of("Authorization", ""); +// String getResult = HttpClientUtil.doGet(getUrl, getHeaders, true); // 启用 SSL +// try { +// // 创建 ObjectMapper 实例 +// ObjectMapper objectMapper = new ObjectMapper(); +// // 使用 TypeReference 来指定泛型类型 +// Result> pageResult = objectMapper.readValue(getResult, new TypeReference<>() {}); +// // 检查响应是否成功 +// if (pageResult.getCode() == 200) { // 假设 200 表示成功,根据实际 API 文档调整 +// return pageResult; +// } else { +// return Result.error("API 请求失败, 错误码: " + pageResult.getCode() + ", 消息: " + pageResult.getMessage()); +// } +// +// } catch (Exception e) { +// e.printStackTrace(); +// return Result.error("JSON 解析失败: " + e.getMessage()); +// } + String json = HYAlarmJsonData.getJson(); + List alarmRecords = JSON.parseArray(json, AlarmRecordVO.class); + return Result.OK(alarmRecords); + } } diff --git a/jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/HYAlarmJsonData.java b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/HYAlarmJsonData.java new file mode 100644 index 0000000..f46fc5f --- /dev/null +++ b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/HYAlarmJsonData.java @@ -0,0 +1,464 @@ +package org.jeecg.gis.service; + +public class HYAlarmJsonData { + + public static String getJson(){ + return "[\n" + + "\t{\n" + + "\t\t\"id\": \"1957961491688742913\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 74,\n" + + "\t\t\"samplingTime\": \"2020-09-29 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:22:51\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651471\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961540074233857\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 74,\n" + + "\t\t\"samplingTime\": \"2020-09-29 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:02\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651471\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1\",\n" + + "\t\t\"taskName\": \"nuclide_global的Cs-134核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": 111,\n" + + "\t\t\"latitude\": 111,\n" + + "\t\t\"samplingTime\": \"2025-08-05 15:26:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-05 15:26:02\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"111\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"2\",\n" + + "\t\t\"taskName\": \"nuclide_global的Cs-134核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": 111,\n" + + "\t\t\"latitude\": 111,\n" + + "\t\t\"samplingTime\": \"2025-08-05 15:26:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-05 15:26:02\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"111\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961617169735682\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 74,\n" + + "\t\t\"samplingTime\": \"2020-09-29 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:21\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651475\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"3\",\n" + + "\t\t\"taskName\": \"nuclide_global的Cs-134核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": 111,\n" + + "\t\t\"latitude\": 111,\n" + + "\t\t\"samplingTime\": \"2025-08-05 15:26:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-05 15:26:02\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"111\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961621728944130\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 74,\n" + + "\t\t\"samplingTime\": \"2020-09-29 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:22\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651475\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961626439147522\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 74,\n" + + "\t\t\"samplingTime\": \"2020-09-29 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:23\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651479\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961632130818050\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -153,\n" + + "\t\t\"latitude\": 75,\n" + + "\t\t\"samplingTime\": \"2020-09-25 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:24\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651480\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961636685832193\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 74,\n" + + "\t\t\"samplingTime\": \"2020-09-29 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:26\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651470\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961640863358978\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -153,\n" + + "\t\t\"latitude\": 75,\n" + + "\t\t\"samplingTime\": \"2020-09-25 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:27\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651483\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961645233823745\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -153,\n" + + "\t\t\"latitude\": 75,\n" + + "\t\t\"samplingTime\": \"2020-09-25 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:28\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651484\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961649595899906\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -153,\n" + + "\t\t\"latitude\": 75,\n" + + "\t\t\"samplingTime\": \"2020-09-25 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:29\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651488\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961654054445058\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 74,\n" + + "\t\t\"samplingTime\": \"2020-09-29 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:30\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651474\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961658361995266\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -153,\n" + + "\t\t\"latitude\": 75,\n" + + "\t\t\"samplingTime\": \"2020-09-25 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:31\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651487\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961662979923970\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 74,\n" + + "\t\t\"samplingTime\": \"2020-09-29 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:32\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651472\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961667086147585\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 74,\n" + + "\t\t\"samplingTime\": \"2020-09-29 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:33\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651476\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961671469195266\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -135,\n" + + "\t\t\"latitude\": 77,\n" + + "\t\t\"samplingTime\": \"2020-09-18 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:34\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651492\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961677286694914\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -135,\n" + + "\t\t\"latitude\": 77,\n" + + "\t\t\"samplingTime\": \"2020-09-18 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:35\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651492\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961681397112834\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -153,\n" + + "\t\t\"latitude\": 75,\n" + + "\t\t\"samplingTime\": \"2020-09-25 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:36\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651481\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961685989875714\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -153,\n" + + "\t\t\"latitude\": 75,\n" + + "\t\t\"samplingTime\": \"2020-09-25 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:37\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651485\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961690259677186\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -135,\n" + + "\t\t\"latitude\": 77,\n" + + "\t\t\"samplingTime\": \"2020-09-18 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:38\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651496\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961694613364738\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 77,\n" + + "\t\t\"samplingTime\": \"2020-09-20 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:39\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651500\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961698799280129\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 74,\n" + + "\t\t\"samplingTime\": \"2020-09-29 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:40\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651479\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961704738414593\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 77,\n" + + "\t\t\"samplingTime\": \"2020-09-20 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:42\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651504\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961708966273025\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -153,\n" + + "\t\t\"latitude\": 75,\n" + + "\t\t\"samplingTime\": \"2020-09-25 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:43\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651483\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961713504509953\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -153,\n" + + "\t\t\"latitude\": 75,\n" + + "\t\t\"samplingTime\": \"2020-09-25 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:44\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651489\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961717908529153\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -147,\n" + + "\t\t\"latitude\": 78,\n" + + "\t\t\"samplingTime\": \"2020-09-23 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:45\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651508\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961722924916738\",\n" + + "\t\t\"taskName\": \"nuclide_global的U-236核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -153,\n" + + "\t\t\"latitude\": 75,\n" + + "\t\t\"samplingTime\": \"2020-09-25 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:46\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651487\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961727719006209\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -135,\n" + + "\t\t\"latitude\": 77,\n" + + "\t\t\"samplingTime\": \"2020-09-18 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:47\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651496\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961731888144385\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 77,\n" + + "\t\t\"samplingTime\": \"2020-09-20 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:48\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651500\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961738963935234\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -135,\n" + + "\t\t\"latitude\": 77,\n" + + "\t\t\"samplingTime\": \"2020-09-18 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:50\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651493\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961743686721537\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -140,\n" + + "\t\t\"latitude\": 77,\n" + + "\t\t\"samplingTime\": \"2020-09-20 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:51\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651504\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961749651021826\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -153,\n" + + "\t\t\"latitude\": 78,\n" + + "\t\t\"samplingTime\": \"2020-09-23 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:52\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651536\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t},\n" + + "\t{\n" + + "\t\t\"id\": \"1957961754076012545\",\n" + + "\t\t\"taskName\": \"nuclide_global的I-129核素数据超出阈值\",\n" + + "\t\t\"alarmStatus\": 0,\n" + + "\t\t\"longitude\": -147,\n" + + "\t\t\"latitude\": 78,\n" + + "\t\t\"samplingTime\": \"2020-09-23 00:00:00\",\n" + + "\t\t\"alarmTime\": \"2025-08-20 08:23:53\",\n" + + "\t\t\"sourceType\": 5,\n" + + "\t\t\"dataId\": \"651508\",\n" + + "\t\t\"alarmValue\": null,\n" + + "\t\t\"thresholdValue\": null\n" + + "\t}\n" + + "]"; + } +} diff --git a/jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/MapSituationDisplayService.java b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/MapSituationDisplayService.java index 8596efd..2caecbd 100644 --- a/jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/MapSituationDisplayService.java +++ b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/MapSituationDisplayService.java @@ -1,6 +1,6 @@ package org.jeecg.gis.service; -import org.jeecg.gis.vo.DataProvisionEfficiency; +import org.jeecg.gis.vo.DataProvisionEfficiencyVO; import org.jeecg.gis.vo.GlobalSiteInfoVO; import org.jeecg.modules.base.entity.configuration.*; import java.util.List; @@ -49,5 +49,5 @@ public interface MapSituationDisplayService { * 查询IMS台站数据有效率信息 * @return */ - List getDataProvisionEfficiency(); + List getDataProvisionEfficiency(); } diff --git a/jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/impl/MapSituationDisplayServiceImpl.java b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/impl/MapSituationDisplayServiceImpl.java index db86ece..587e0fa 100644 --- a/jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/impl/MapSituationDisplayServiceImpl.java +++ b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/service/impl/MapSituationDisplayServiceImpl.java @@ -14,7 +14,7 @@ import org.jeecg.common.util.RedisUtil; import org.jeecg.gis.enums.GlobalSiteTypeEnum; import org.jeecg.gis.service.MapSituationDisplayService; import org.jeecg.gis.service.StationJsonData; -import org.jeecg.gis.vo.DataProvisionEfficiency; +import org.jeecg.gis.vo.DataProvisionEfficiencyVO; import org.jeecg.gis.vo.GlobalSiteInfoVO; import org.jeecg.modules.base.entity.configuration.*; import org.jeecg.modules.base.mapper.*; @@ -111,13 +111,13 @@ public class MapSituationDisplayServiceImpl implements MapSituationDisplayServic * @return */ @Override - public List getDataProvisionEfficiency() { + public List getDataProvisionEfficiency() { List stations = (List)redisUtil.get(CommonConstant.ALL_STATIONS); JSONObject jsonObject = JSON.parseObject(StationJsonData.getJson()); if (jsonObject.containsKey("result")) { Object obj = jsonObject.get("result"); if (obj instanceof JSONArray && Objects.nonNull(obj)) { - List dataProvisionEfficiency = ((JSONArray) obj).toJavaList(DataProvisionEfficiency.class); + List dataProvisionEfficiency = ((JSONArray) obj).toJavaList(DataProvisionEfficiencyVO.class); dataProvisionEfficiency.forEach(data -> { for (GardsStations station : stations) { if (station.getStationCode().equals(data.getStationCode())) { diff --git a/jeecg-module-large-screen/src/main/java/org/jeecg/ocean/entity/AlarmRecord.java b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/vo/AlarmRecordVO.java similarity index 61% rename from jeecg-module-large-screen/src/main/java/org/jeecg/ocean/entity/AlarmRecord.java rename to jeecg-module-large-screen/src/main/java/org/jeecg/gis/vo/AlarmRecordVO.java index a9f6562..172230a 100644 --- a/jeecg-module-large-screen/src/main/java/org/jeecg/ocean/entity/AlarmRecord.java +++ b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/vo/AlarmRecordVO.java @@ -1,4 +1,4 @@ -package org.jeecg.ocean.entity; +package org.jeecg.gis.vo; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; @@ -6,33 +6,68 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; +/** + * 海洋报警记录 + */ @Data -public class AlarmRecord { - public AlarmRecord() {} - /**id*/ +public class AlarmRecordVO { + + /** + * id + */ private String id; - /**任务名称*/ + + /** + * 任务名称 + */ private String taskName; - /**报警状态*/ + + /** + * 报警状态 + */ private Integer alarmStatus; - /**经度*/ + + /** + * 经度 + */ private Double longitude; - /**纬度*/ + + /** + * 纬度 + */ private Double latitude; - /**采样时间*/ + + /** + * 采样时间 + */ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date samplingTime; - /**报警时间*/ + + /** + * 报警时间 + */ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date alarmTime; - /**数据来源*/ + + /** + * 数据来源 + */ private Integer sourceType; - /**数据表外接*/ + + /** + * 数据表外接 + */ private String dataId; - /**报警值*/ + + /** + * 报警值 + */ private Double alarmValue; - /**阈值*/ + + /** + * 阈值 + */ private Double thresholdValue; } diff --git a/jeecg-module-large-screen/src/main/java/org/jeecg/gis/vo/DataProvisionEfficiency.java b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/vo/DataProvisionEfficiencyVO.java similarity index 94% rename from jeecg-module-large-screen/src/main/java/org/jeecg/gis/vo/DataProvisionEfficiency.java rename to jeecg-module-large-screen/src/main/java/org/jeecg/gis/vo/DataProvisionEfficiencyVO.java index 56126e8..3b792f1 100644 --- a/jeecg-module-large-screen/src/main/java/org/jeecg/gis/vo/DataProvisionEfficiency.java +++ b/jeecg-module-large-screen/src/main/java/org/jeecg/gis/vo/DataProvisionEfficiencyVO.java @@ -9,7 +9,7 @@ import java.util.Date; * 数据有效率 */ @Data -public class DataProvisionEfficiency { +public class DataProvisionEfficiencyVO { private Integer id; diff --git a/jeecg-module-large-screen/src/main/java/org/jeecg/ocean/controller/OceanFeignController.java b/jeecg-module-large-screen/src/main/java/org/jeecg/ocean/controller/OceanFeignController.java deleted file mode 100644 index 081c599..0000000 --- a/jeecg-module-large-screen/src/main/java/org/jeecg/ocean/controller/OceanFeignController.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.jeecg.ocean.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import io.swagger.v3.oas.annotations.Operation; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.properties.HttpClientHostProperties; -import org.jeecg.ocean.entity.AlarmRecord; -import org.jeecg.sync.feign.SyncFeignClient; -import org.jeecg.utils.HttpClientUtil; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * @Description: 海洋接口 - * @Author: jeecg-boot - * @Date: 2022-12-19 - * @Version: V1.0 - */ -@RestController -@RequestMapping("/oceanFeign") -@Slf4j -@RequiredArgsConstructor -public class OceanFeignController { - - private final HttpClientHostProperties hostProperties; - - @Operation(summary = "大屏-同步记录") - @GetMapping(value = "/getAlarmRecords") - public Result getAlarmRecords() throws IOException { - String getUrl = hostProperties.getOceanHost() + "bizAlarmRecords/list?pageNo=1&pageSize=10000"; - Map getHeaders = Map.of("Authorization", ""); - String getResult = HttpClientUtil.doGet(getUrl, getHeaders, true); // 启用 SSL - try { - // 创建 ObjectMapper 实例 - ObjectMapper objectMapper = new ObjectMapper(); - // 使用 TypeReference 来指定泛型类型 - Result> pageResult = objectMapper.readValue(getResult, new TypeReference<>() {}); - // 检查响应是否成功 - if (pageResult.getCode() == 200) { // 假设 200 表示成功,根据实际 API 文档调整 - return pageResult; - } else { - return Result.error("API 请求失败, 错误码: " + pageResult.getCode() + ", 消息: " + pageResult.getMessage()); - } - - } catch (Exception e) { - e.printStackTrace(); - return Result.error("JSON 解析失败: " + e.getMessage()); - } - } - -}