From 97be33990c1a082e5e55b33b8b88bb7360537d54 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期四, 21 九月 2023 13:49:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-common/src/main/java/com/ruoyi/common/utils/ConfigUtils.java | 15 -------
ard-work/src/main/resources/mapper/app/ArdAppTaskMapper.xml | 4 +-
ard-work/src/main/java/com/ruoyi/utils/gis/GisUtil.java | 13 +++++-
ard-work/src/main/java/com/ruoyi/storage/minio/service/impl/StorageMinioEventServiceImpl.java | 4 ++
ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java | 73 ++++++++++++++++++------------------
ard-work/src/main/java/com/ruoyi/utils/forest/UavClient.java | 2
ard-work/src/main/java/com/ruoyi/device/uav/service/UavService.java | 4 +
7 files changed, 59 insertions(+), 56 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java b/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java
index 253e48c..87540fa 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java
@@ -115,10 +115,6 @@
@Resource
private ArdEquipRadarMapper ardEquipRadarMapper;
//endregion
- //姣忎釜鐐逛綅鏈紩瀵兼鏁�
- private Map<String, Integer> unGuideCountMapMove = new HashMap<>();
- private Map<String, Integer> unGuideCountMapFire = new HashMap<>();
- private Map<String, Integer> unGuideCountMapPump = new HashMap<>();
/**
* @鎻忚堪 鏌ヨ鎵�鏈夋姤璀︾殑褰撳墠鏁伴噺
@@ -1367,8 +1363,43 @@
log.debug("鏈幏鍙栧埌鎶ヨ鐐瑰叧鑱旂殑鍏夌數");
}
}
-
//闆疯揪绉诲姩寮曞
+ private void radarMoveGuide(ArdAlarmRadarMove ardAlarmRadarMove) {
+ if (StringUtils.isNull(ardAlarmRadarMove.getLongitude()) || StringUtils.isNull(ardAlarmRadarMove.getLatitude())) {
+ log.debug("鍧愭爣涓虹┖涓嶅紩瀵�");
+ return;
+ }
+ double[] coordinate = new double[]{ardAlarmRadarMove.getLongitude(), ardAlarmRadarMove.getLatitude()};//鎶ヨ鍧愭爣
+ //寮曞鍏ラ槦
+ radarGuideToQueue(ardAlarmRadarMove.getId(), ardAlarmRadarMove.getRadarId(), ardAlarmRadarMove.getName(), ardAlarmRadarMove.getAlarmType(), ardAlarmRadarMove.getCreateTime(), coordinate);//鏇存柊
+ }
+ //闆疯揪闃茬伀寮曞
+ private void radarFireGuide(ArdAlarmRadarFire ardAlarmRadarFire) {
+ if (StringUtils.isNull(ardAlarmRadarFire.getLongitude()) || StringUtils.isNull(ardAlarmRadarFire.getLatitude())) {
+ log.debug("鍧愭爣涓虹┖涓嶅紩瀵�");
+ return;
+ }
+ double[] coordinate = new double[]{ardAlarmRadarFire.getLongitude(), ardAlarmRadarFire.getLatitude()};//鎶ヨ鍧愭爣
+ //寮曞鍏ラ槦
+ radarGuideToQueue(ardAlarmRadarFire.getId(), ardAlarmRadarFire.getRadarId(), ardAlarmRadarFire.getName(), ardAlarmRadarFire.getAlarmType(), ardAlarmRadarFire.getCreateTime(), coordinate);//鏇存柊
+ }
+ //闆疯揪鎶芥补鏈哄仠鏈哄紩瀵�
+ private void radarPumpGuide(ArdAlarmRadarPump ardAlarmRadarPump) {
+ if (StringUtils.isNull(ardAlarmRadarPump.getLongitude()) || StringUtils.isNull(ardAlarmRadarPump.getLatitude())) {
+ //鍧愭爣涓虹┖涓嶅紩瀵�
+ log.debug("鍧愭爣涓虹┖涓嶅紩瀵�");
+ return;
+ }
+ double[] coordinate = new double[]{ardAlarmRadarPump.getLongitude(), ardAlarmRadarPump.getLatitude()};//鎶ヨ鍧愭爣
+ //寮曞鍏ラ槦
+ radarGuideToQueue(ardAlarmRadarPump.getId(), ardAlarmRadarPump.getRadarId(), ardAlarmRadarPump.getName(), ardAlarmRadarPump.getAlarmType(), ardAlarmRadarPump.getCreateTime(), coordinate);//鏇存柊
+ }
+
+
+ //姣忎釜鐐逛綅鏈紩瀵兼鏁�
+ private Map<String, Integer> unGuideCountMapMove = new HashMap<>();
+ private Map<String, Integer> unGuideCountMapFire = new HashMap<>();
+ private Map<String, Integer> unGuideCountMapPump = new HashMap<>();
private void radarMoveGuide(List<ArdAlarmRadarMove> ardAlarmRadarMoves, RadarAlarmData radarAlarmData) {
//鎸夊叴瓒g偣鍘婚噸,鐒跺悗鎸夊紩瀵奸�昏緫杩涜寮曞鍏ラ槦
ardAlarmRadarMoves = ardAlarmRadarMoves.stream()
@@ -1421,17 +1452,6 @@
}
//endregion
}
- private void radarMoveGuide(ArdAlarmRadarMove ardAlarmRadarMove) {
- if (StringUtils.isNull(ardAlarmRadarMove.getLongitude()) || StringUtils.isNull(ardAlarmRadarMove.getLatitude())) {
- log.debug("鍧愭爣涓虹┖涓嶅紩瀵�");
- return;
- }
- double[] coordinate = new double[]{ardAlarmRadarMove.getLongitude(), ardAlarmRadarMove.getLatitude()};//鎶ヨ鍧愭爣
- //寮曞鍏ラ槦
- radarGuideToQueue(ardAlarmRadarMove.getId(), ardAlarmRadarMove.getRadarId(), ardAlarmRadarMove.getName(), ardAlarmRadarMove.getAlarmType(), ardAlarmRadarMove.getCreateTime(), coordinate);//鏇存柊
- }
-
- //闆疯揪闃茬伀寮曞
private void radarFireGuide(List<ArdAlarmRadarFire> ardAlarmRadarFires, RadarAlarmData radarAlarmData) {
//鎸夊叴瓒g偣鍘婚噸,鐒跺悗鎸夊紩瀵奸�昏緫杩涜寮曞鍏ラ槦
ardAlarmRadarFires = ardAlarmRadarFires.stream()
@@ -1483,16 +1503,6 @@
}
//endregion
}
- private void radarFireGuide(ArdAlarmRadarFire ardAlarmRadarFire) {
- if (StringUtils.isNull(ardAlarmRadarFire.getLongitude()) || StringUtils.isNull(ardAlarmRadarFire.getLatitude())) {
- log.debug("鍧愭爣涓虹┖涓嶅紩瀵�");
- return;
- }
- double[] coordinate = new double[]{ardAlarmRadarFire.getLongitude(), ardAlarmRadarFire.getLatitude()};//鎶ヨ鍧愭爣
- //寮曞鍏ラ槦
- radarGuideToQueue(ardAlarmRadarFire.getId(), ardAlarmRadarFire.getRadarId(), ardAlarmRadarFire.getName(), ardAlarmRadarFire.getAlarmType(), ardAlarmRadarFire.getCreateTime(), coordinate);//鏇存柊
- }
- //闆疯揪鎶芥补鏈哄仠鏈哄紩瀵�
private void radarPumpGuide(List<ArdAlarmRadarPump> ardAlarmRadarPumps, RadarAlarmData radarAlarmData) {
//鎸夊叴瓒g偣鍘婚噸,鐒跺悗鎸夊紩瀵奸�昏緫杩涜寮曞鍏ラ槦
ardAlarmRadarPumps = ardAlarmRadarPumps.stream()
@@ -1544,14 +1554,5 @@
}
//endregion
}
- private void radarPumpGuide(ArdAlarmRadarPump ardAlarmRadarPump) {
- if (StringUtils.isNull(ardAlarmRadarPump.getLongitude()) || StringUtils.isNull(ardAlarmRadarPump.getLatitude())) {
- //鍧愭爣涓虹┖涓嶅紩瀵�
- log.debug("鍧愭爣涓虹┖涓嶅紩瀵�");
- return;
- }
- double[] coordinate = new double[]{ardAlarmRadarPump.getLongitude(), ardAlarmRadarPump.getLatitude()};//鎶ヨ鍧愭爣
- //寮曞鍏ラ槦
- radarGuideToQueue(ardAlarmRadarPump.getId(), ardAlarmRadarPump.getRadarId(), ardAlarmRadarPump.getName(), ardAlarmRadarPump.getAlarmType(), ardAlarmRadarPump.getCreateTime(), coordinate);//鏇存柊
- }
+
}
diff --git a/ard-work/src/main/java/com/ruoyi/device/uav/service/UavService.java b/ard-work/src/main/java/com/ruoyi/device/uav/service/UavService.java
index d09c55b..27136cf 100644
--- a/ard-work/src/main/java/com/ruoyi/device/uav/service/UavService.java
+++ b/ard-work/src/main/java/com/ruoyi/device/uav/service/UavService.java
@@ -54,7 +54,8 @@
//鎵цmethod
this.getToken();//鑾峰彇token楠岃瘉,楠岃瘉token鏈夋晥鎬�
try {
- res = (String) requestMethod.invoke(this.uavClient, url, this.getToken(), data);
+ String token = this.getToken();
+ res = (String) requestMethod.invoke(this.uavClient, url, token, data);
} catch (IllegalAccessException e) {
System.out.println("doUavRequest 璁块棶澶辫触" + e.getMessage());
} catch (InvocationTargetException e) {
@@ -102,6 +103,7 @@
}
} catch (ForestRuntimeException e) {
log.error("鏃犱汉鏈鸿繛鎺ヨ秴鏃�" + e.getMessage());
+ e.printStackTrace();
} catch (JsonMappingException e) {
e.printStackTrace();
} catch (JsonProcessingException e) {
diff --git a/ard-work/src/main/java/com/ruoyi/storage/minio/service/impl/StorageMinioEventServiceImpl.java b/ard-work/src/main/java/com/ruoyi/storage/minio/service/impl/StorageMinioEventServiceImpl.java
index 5e16aca..b21d2c6 100644
--- a/ard-work/src/main/java/com/ruoyi/storage/minio/service/impl/StorageMinioEventServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/storage/minio/service/impl/StorageMinioEventServiceImpl.java
@@ -32,9 +32,13 @@
@Service
@Slf4j(topic = "minio")
public class StorageMinioEventServiceImpl implements IStorageMinioEventService {
+
@Resource
private StorageMinioEventMapper storageMinioEventMapper;
+
+
+
/**
* 鏌ヨ瀛樺偍浜嬩欢
*
diff --git a/ard-work/src/main/java/com/ruoyi/utils/forest/UavClient.java b/ard-work/src/main/java/com/ruoyi/utils/forest/UavClient.java
index 6a2b4db..5605f51 100644
--- a/ard-work/src/main/java/com/ruoyi/utils/forest/UavClient.java
+++ b/ard-work/src/main/java/com/ruoyi/utils/forest/UavClient.java
@@ -9,7 +9,7 @@
@Get("http://www.baidu.com")
String test();
- public static String IP = "http://112.98.126.2:7030/";
+ public static String IP = "http://112.98.126.2:7100/";
@Get(IP + "${url}")
String GET(@Var("url") String url, @Header("x-auth-token") String token, @JSONBody String body);
diff --git a/ard-work/src/main/java/com/ruoyi/utils/gis/GisUtil.java b/ard-work/src/main/java/com/ruoyi/utils/gis/GisUtil.java
index 8c669d5..85979a9 100644
--- a/ard-work/src/main/java/com/ruoyi/utils/gis/GisUtil.java
+++ b/ard-work/src/main/java/com/ruoyi/utils/gis/GisUtil.java
@@ -182,7 +182,7 @@
public static void main(String[] args) {
// 125.097531,46.60029, 125.124731,46.584808
//鐩告満浣嶇疆
- double[] camera = {125.146964331147,46.5580925811216,102};//缁忓害,绾害,楂樺害
+ /* double[] camera = {125.146964331147,46.5580925811216,102};//缁忓害,绾害,楂樺害
//鐪嬪悜鐨勪綅缃�
double[] lookAt = {125.155449,46.555108,0};//缁忓害,绾害,楂樺害
@@ -190,7 +190,16 @@
double viewWidth = 150;//鐩告満瑙嗗煙瀹藉害
double[] ptz = GisUtil.getCameraPTZ(camera, lookAt, viewAngle, viewWidth);
- System.out.println("ptz:" + Arrays.toString(ptz));
+ System.out.println("ptz:" + Arrays.toString(ptz));*/
+ // double[] camera = {125.153903999999997,46.5600799999999992,258.430000000000007};
+ GlobalCoordinates camera = new GlobalCoordinates(46.5600799999999992,125.153903999999997);
+ double p = 212.70155;
+ double distance = 4048.886568114861;
+
+ GlobalCoordinates point = getGlobalCoordinates(camera, p, distance);
+ System.out.println("point:");
+ System.out.println("lon:"+point.getLongitude());
+ System.out.println("lat:"+point.getLatitude());
}
}
diff --git a/ard-work/src/main/resources/mapper/app/ArdAppTaskMapper.xml b/ard-work/src/main/resources/mapper/app/ArdAppTaskMapper.xml
index 9b481cb..def4551 100644
--- a/ard-work/src/main/resources/mapper/app/ArdAppTaskMapper.xml
+++ b/ard-work/src/main/resources/mapper/app/ArdAppTaskMapper.xml
@@ -353,9 +353,9 @@
order by create_time desc limit 1
</select>
<select id="selectUnreadArdAppTaskCount" resultType="Integer">
- SELECT COUNT(A.ID)
+ SELECT COUNT(DISTINCT A.ID)
FROM ard_app_task A
- LEFT JOIN ard_app_task_detail C ON C.task_id = A.ID
+ LEFT JOIN ard_app_task_detail C ON C.task_id = A.ID
WHERE C.view_time IS NULL
AND C.view_flag = '1'
AND C.user_id = #{userId}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ConfigUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ConfigUtils.java
index 27e4006..80a3f39 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ConfigUtils.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ConfigUtils.java
@@ -29,25 +29,12 @@
}
/**
- * 鑾峰彇鎵�鏈夐厤缃俊鎭�
- *
- * @return configMap 閰嶇疆淇℃伅map
- */
- public static Map<String, Object> getConfigMap() {
- Map<String, Object> configMap = SpringUtils.getBean(RedisCache.class).getMapKey(CacheConstants.SYS_CONFIG_KEY);
- if (StringUtils.isNotNull(configMap)) {
- return configMap;
- }
- return null;
- }
-
- /**
* 璁剧疆cache key
*
* @param configKey 鍙傛暟閿�
* @return 缂撳瓨閿甼ey
*/
- public static String getCacheKey(String configKey) {
+ private static String getCacheKey(String configKey) {
return CacheConstants.SYS_CONFIG_KEY + configKey;
}
--
Gitblit v1.9.3