Compare commits

...

2 Commits

Author SHA1 Message Date
panbaolin
a1935a6284 Merge branch 'master' of http://git.hivekion.com:3000/panbaolin/SourceTermAnalysisSystem_java 2025-12-12 16:55:10 +08:00
panbaolin
177c9be16b 1.修改海洋报警功能 2025-12-12 16:54:13 +08:00
7 changed files with 553 additions and 82 deletions

View File

@ -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<String, String> getHeaders = Map.of("Authorization", "");
// String getResult = HttpClientUtil.doGet(getUrl, getHeaders, true); // 启用 SSL
// try {
// // 创建 ObjectMapper 实例
// ObjectMapper objectMapper = new ObjectMapper();
// // 使用 TypeReference 来指定泛型类型
// Result<Page<AlarmRecordVO>> 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<AlarmRecordVO> alarmRecords = JSON.parseArray(json, AlarmRecordVO.class);
return Result.OK(alarmRecords);
}
}

View File

@ -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" +
"]";
}
}

View File

@ -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<DataProvisionEfficiency> getDataProvisionEfficiency();
List<DataProvisionEfficiencyVO> getDataProvisionEfficiency();
}

View File

@ -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<DataProvisionEfficiency> getDataProvisionEfficiency() {
public List<DataProvisionEfficiencyVO> getDataProvisionEfficiency() {
List<GardsStations> stations = (List<GardsStations>)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> dataProvisionEfficiency = ((JSONArray) obj).toJavaList(DataProvisionEfficiency.class);
List<DataProvisionEfficiencyVO> dataProvisionEfficiency = ((JSONArray) obj).toJavaList(DataProvisionEfficiencyVO.class);
dataProvisionEfficiency.forEach(data -> {
for (GardsStations station : stations) {
if (station.getStationCode().equals(data.getStationCode())) {

View File

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

View File

@ -9,7 +9,7 @@ import java.util.Date;
* 数据有效率
*/
@Data
public class DataProvisionEfficiency {
public class DataProvisionEfficiencyVO {
private Integer id;

View File

@ -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<String, String> getHeaders = Map.of("Authorization", "");
String getResult = HttpClientUtil.doGet(getUrl, getHeaders, true); // 启用 SSL
try {
// 创建 ObjectMapper 实例
ObjectMapper objectMapper = new ObjectMapper();
// 使用 TypeReference 来指定泛型类型
Result<Page<AlarmRecord>> 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());
}
}
}