From 33aed56cfbaad870dbf4780688ba6b08d0ee806c Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期四, 28 九月 2023 11:02:13 +0800
Subject: [PATCH] 修改雷达引导持续报警每5分钟再次引导一次
---
ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml | 12
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java | 14
ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarMove.java | 167 ---------
ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarMoveMapper.java | 1
ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarPump.java | 169 ---------
ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarFireMapper.java | 2
/dev/null | 191 -----------
ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarFireMapper.xml | 12
ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/QueueTaskExecutor.java | 2
ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarPumpMapper.java | 2
ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarPumpMapper.xml | 12
ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java | 214 ++---------
ard-work/src/main/java/com/ruoyi/media/service/impl/MediaServiceImpl.java | 4
ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarFire.java | 167 ---------
14 files changed, 97 insertions(+), 872 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 87540fa..cbfef91 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
@@ -1002,32 +1002,44 @@
ardAlarmRadarMove.setId(uuid);
ardAlarmRadarMove.setTargetId(targetId);
ardAlarmRadarMove.setAlarmTime(radarAlarmData.getAlarmTime());
- ardAlarmRadarMove.setCreateTime(new Date());
+ ardAlarmRadarMove.setCreateTime(DateUtils.covertTime(new Date()));
ardAlarmRadarMove.setName(alarmpointName + "(" + radarAlarmData.getRadarName() + ")");
ardAlarmRadarMove.setAlarmType("杩愬姩鐩爣妫�娴�");
ardAlarmRadarMove.setLongitude(longitude);
ardAlarmRadarMove.setLatitude(latitude);
ardAlarmRadarMove.setUpdateTime(radarAlarmData.getAlarmTime());
ardAlarmRadarMove.setRadarId(radarId);
+ Date alarmTime = ardAlarmRadarMove.getAlarmTime();
//鑾峰彇褰撳墠鍏磋叮鐐瑰綋鍓嶉浄杈剧殑涓婁竴鏉℃暟鎹�
ArdAlarmRadarMove lastMoveData = ardAlarmRadarMoveMapper.selectArdAlarmRadarLastData(ardAlarmRadarMove.getName());
if (lastMoveData == null) {
//鍏ュ簱
+ ardAlarmRadarMove.setGuideTime(alarmTime);
ardAlarmRadarMoveMapper.insertArdAlarmRadarMove(ardAlarmRadarMove);
radarMoveGuide(ardAlarmRadarMove);//寮曞
} else {
//鍚﹀垯姣斿鏇存柊鏃堕棿
Date lastUpdateTime = lastMoveData.getUpdateTime();
- Date alarmTime = ardAlarmRadarMove.getAlarmTime();
+
+ Date lastGuideTime = lastMoveData.getGuideTime();
long secDatePoor = DateUtils.getSecDatePoor(alarmTime,lastUpdateTime);
if (secDatePoor <= radarMergeTime) {
//灏忎簬10绉掔殑鏂版暟鎹紝鏇存柊涓婁竴鏉�
ArdAlarmRadarMove updateData = new ArdAlarmRadarMove();
updateData.setId(lastMoveData.getId());
updateData.setUpdateTime(alarmTime);
+
+ //鍒ゆ柇寮曞鏃堕棿瓒呰繃5鍒嗛挓鍐嶆寮曞
+ long secDatePoorGuide = DateUtils.getSecDatePoor(alarmTime,lastGuideTime);
+ if(secDatePoorGuide>=300)
+ {
+ updateData.setGuideTime(alarmTime);
+ radarMoveGuide(ardAlarmRadarMove);//寮曞
+ }
ardAlarmRadarMoveMapper.updateArdAlarmRadarMove(updateData);
} else {
//瓒呰繃10绉掔殑鏁版嵁,鍏ュ簱
+ ardAlarmRadarMove.setGuideTime(alarmTime);
ardAlarmRadarMoveMapper.insertArdAlarmRadarMove(ardAlarmRadarMove);
radarMoveGuide(ardAlarmRadarMove);//寮曞
}
@@ -1046,7 +1058,7 @@
ardAlarmRadarFire.setId(uuid);
ardAlarmRadarFire.setTargetId(targetId);
ardAlarmRadarFire.setAlarmTime(radarAlarmData.getAlarmTime());
- ardAlarmRadarFire.setCreateTime(new Date());
+ ardAlarmRadarFire.setCreateTime(DateUtils.covertTime(new Date()));
ardAlarmRadarFire.setName(alarmpointName + "(" + radarAlarmData.getRadarName() + ")");
ardAlarmRadarFire.setAlarmType("鐑簮妫�娴�");
ardAlarmRadarFire.setLongitude(longitude);
@@ -1055,24 +1067,35 @@
ardAlarmRadarFire.setUpdateTime(radarAlarmData.getAlarmTime());
//
ArdAlarmRadarFire lastFireData = ardAlarmRadarFireMapper.selectArdAlarmRadarLastData(ardAlarmRadarFire.getName());
+ alarmTime = ardAlarmRadarFire.getAlarmTime();
if (lastFireData == null) {
//鍏ュ簱
-
+ ardAlarmRadarFire.setGuideTime(alarmTime);
ardAlarmRadarFireMapper.insertArdAlarmRadarFire(ardAlarmRadarFire);
radarFireGuide(ardAlarmRadarFire);//寮曞
} else {
//鍚﹀垯姣斿鏇存柊鏃堕棿
Date lastUpdateTime = lastFireData.getUpdateTime();
- Date alarmTime = ardAlarmRadarFire.getAlarmTime();
+
+ Date lastGuideTime = lastFireData.getGuideTime();
long secDatePoor = DateUtils.getSecDatePoor(alarmTime,lastUpdateTime);
if (secDatePoor <= radarMergeTime) {
//灏忎簬10绉掔殑鏂版暟鎹紝鏇存柊涓婁竴鏉�
ArdAlarmRadarFire updateData = new ArdAlarmRadarFire();
updateData.setId(lastFireData.getId());
updateData.setUpdateTime(alarmTime);
+
+ //鍒ゆ柇寮曞鏃堕棿瓒呰繃5鍒嗛挓鍐嶆寮曞
+ long secDatePoorGuide = DateUtils.getSecDatePoor(alarmTime,lastGuideTime);
+ if(secDatePoorGuide>=300)
+ {
+ updateData.setGuideTime(alarmTime);
+ radarFireGuide(ardAlarmRadarFire);//寮曞
+ }
ardAlarmRadarFireMapper.updateArdAlarmRadarFire(updateData);
} else {
//瓒呰繃10绉掔殑鏁版嵁,鍏ュ簱
+ ardAlarmRadarFire.setGuideTime(alarmTime);
ardAlarmRadarFireMapper.insertArdAlarmRadarFire(ardAlarmRadarFire);
radarFireGuide(ardAlarmRadarFire);//寮曞
}
@@ -1084,10 +1107,11 @@
ardAlarmRadarPump.setId(uuid);
ardAlarmRadarPump.setTargetId(targetId);
ardAlarmRadarPump.setAlarmTime(radarAlarmData.getAlarmTime());
- ardAlarmRadarPump.setCreateTime(new Date());
+ ardAlarmRadarPump.setCreateTime(DateUtils.covertTime(new Date()));
ardAlarmRadarPump.setName(ardAlarmRadar.getName() + "(" + radarAlarmData.getRadarName() + ")");
ardAlarmRadarPump.setAlarmType("闆疯揪鎶芥补鏈哄仠鏈�");
ardAlarmRadarPump.setUpdateTime(radarAlarmData.getAlarmTime());
+ alarmTime = ardAlarmRadarPump.getAlarmTime();
ArdAlarmpointsWell ardAlarmpointsWell = ardAlarmpointsWellMapper.selectArdAlarmpointsWellByWellId(alarmpointName);
if (StringUtils.isNotNull(ardAlarmpointsWell)) {
ardAlarmRadarPump.setLongitude(ardAlarmpointsWell.getLongitude());
@@ -1097,21 +1121,30 @@
ArdAlarmRadarPump lastPumpData = ardAlarmRadarPumpMapper.selectArdAlarmRadarLastData(ardAlarmRadarPump.getName());
if (lastPumpData == null) {
//鍏ュ簱
+ ardAlarmRadarPump.setGuideTime(alarmTime);
ardAlarmRadarPumpMapper.insertArdAlarmRadarPump(ardAlarmRadarPump);
radarPumpGuide(ardAlarmRadarPump);//寮曞
} else {
//鍚﹀垯姣斿鏇存柊鏃堕棿
Date lastUpdateTime = lastPumpData.getUpdateTime();
- Date alarmTime = ardAlarmRadarPump.getAlarmTime();
+ Date lastGuideTime = lastPumpData.getGuideTime();
long secDatePoor = DateUtils.getSecDatePoor(alarmTime,lastUpdateTime);
if (secDatePoor <= radarMergeTime) {
//灏忎簬10绉掔殑鏂版暟鎹紝鏇存柊涓婁竴鏉�
ArdAlarmRadarPump updateData = new ArdAlarmRadarPump();
updateData.setId(lastPumpData.getId());
updateData.setUpdateTime(alarmTime);
+ //鍒ゆ柇寮曞鏃堕棿瓒呰繃5鍒嗛挓鍐嶆寮曞
+ long secDatePoorGuide = DateUtils.getSecDatePoor(alarmTime,lastGuideTime);
+ if(secDatePoorGuide>=300)
+ {
+ radarPumpGuide(ardAlarmRadarPump);//寮曞
+ updateData.setGuideTime(alarmTime);
+ }
ardAlarmRadarPumpMapper.updateArdAlarmRadarPump(updateData);
} else {
//瓒呰繃10绉掔殑鏁版嵁,鍏ュ簱
+ ardAlarmRadarPump.setGuideTime(alarmTime);
ardAlarmRadarPumpMapper.insertArdAlarmRadarPump(ardAlarmRadarPump);
radarPumpGuide(ardAlarmRadarPump);//寮曞
}
@@ -1347,7 +1380,7 @@
//濡傛灉闆疯揪濉斾笂鏈夊厜鐢�
messagesEnqueued(cameraIdWithTower, alarmId, alarmType, createTime, 1, 1, coordinate);
} else {
- log.debug("鏈幏鍙栧埌闆疯揪濉斾笂鐨勫厜鐢�");
+ log.debug("鏈幏鍙栧埌闆疯揪濉斾笂鐨勫厜鐢�,鏃犳硶寮曞");
}
//鑾峰彇鎶ヨ鐐瑰叧鑱旂殑澶у厜鐢�
ArdAlarmpointsWell ardAlarmpointsWell = ardAlarmpointsWellMapper.selectArdAlarmpointsWellByWellId(alarmpointName);
@@ -1360,11 +1393,12 @@
//濡傛灉鎶ヨ鐐瑰叧鑱斾簡鍏夌數
messagesEnqueued(cameraId, alarmId, alarmType, createTime, 1, 2, coordinate);
} else {
- log.debug("鏈幏鍙栧埌鎶ヨ鐐瑰叧鑱旂殑鍏夌數");
+ log.debug("鏈幏鍙栧埌鎶ヨ鐐瑰叧鑱旂殑鍏夌數,鏃犳硶寮曞");
}
}
//闆疯揪绉诲姩寮曞
private void radarMoveGuide(ArdAlarmRadarMove ardAlarmRadarMove) {
+ log.debug("闆疯揪绉诲姩寮�濮嬪紩瀵�");
if (StringUtils.isNull(ardAlarmRadarMove.getLongitude()) || StringUtils.isNull(ardAlarmRadarMove.getLatitude())) {
log.debug("鍧愭爣涓虹┖涓嶅紩瀵�");
return;
@@ -1375,6 +1409,7 @@
}
//闆疯揪闃茬伀寮曞
private void radarFireGuide(ArdAlarmRadarFire ardAlarmRadarFire) {
+ log.debug("闆疯揪闃茬伀寮�濮嬪紩瀵�");
if (StringUtils.isNull(ardAlarmRadarFire.getLongitude()) || StringUtils.isNull(ardAlarmRadarFire.getLatitude())) {
log.debug("鍧愭爣涓虹┖涓嶅紩瀵�");
return;
@@ -1385,6 +1420,7 @@
}
//闆疯揪鎶芥补鏈哄仠鏈哄紩瀵�
private void radarPumpGuide(ArdAlarmRadarPump ardAlarmRadarPump) {
+ log.debug("闆疯揪鎶芥补鏈哄仠鏈哄紑濮嬪紩瀵�");
if (StringUtils.isNull(ardAlarmRadarPump.getLongitude()) || StringUtils.isNull(ardAlarmRadarPump.getLatitude())) {
//鍧愭爣涓虹┖涓嶅紩瀵�
log.debug("鍧愭爣涓虹┖涓嶅紩瀵�");
@@ -1393,166 +1429,6 @@
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()
- .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new java.util.TreeSet<>(java.util.Comparator.comparing(ArdAlarmRadarMove::getName))), ArrayList::new));
- if (ardAlarmRadarMoves.size() > 0) {
- for (ArdAlarmRadarMove ardAlarmRadarMove : ardAlarmRadarMoves) {
- //閬嶅巻鎶ヨ鏁版嵁杩涜寮曞
- if (StringUtils.isNull(ardAlarmRadarMove.getLongitude()) || StringUtils.isNull(ardAlarmRadarMove.getLatitude())) {
- //鍧愭爣涓虹┖涓嶅紩瀵�
- continue;
- }
- double[] coordinate = new double[]{ardAlarmRadarMove.getLongitude(), ardAlarmRadarMove.getLatitude()};//鎶ヨ鍧愭爣
- //浠巖edis涓彇鍑哄綋鍓嶆姤璀︾偣鐨�5鍒嗛挓鍐呮槸鍚︽湁寮曞
- ArdAlarmRadarMove alarmRadarMove = redisCache.getCacheObject("global_move_alarm:" + ardAlarmRadarMove.getName());//浠巖edis涓彇鍑烘渶鏂板紩瀵肩殑鎶ヨ鏁版嵁
- if (alarmRadarMove == null) {
- //5鍒嗛挓鍐卹edis涓病鏈夋暟鎹紝璇存槑5鍒嗛挓鍐呮病鏈夊紩瀵兼暟鎹�
- ardAlarmRadarMove.setGuideFlag(1);
- //灏嗗紩瀵兼暟鎹啓鍏edis 璁剧疆5鍒嗛挓杩囨湡
- redisCache.setCacheObject("global_move_alarm:" + ardAlarmRadarMove.getName(), ardAlarmRadarMove, 5, TimeUnit.MINUTES);//寮曞鏁版嵁鍐欏叆redis
- unGuideCountMapMove.put(ardAlarmRadarMove.getName(), 0);
- //寮曞鍏ラ槦
- radarGuideToQueue(ardAlarmRadarMove.getId(), radarAlarmData.getRadarId(), ardAlarmRadarMove.getName(), ardAlarmRadarMove.getAlarmType(), ardAlarmRadarMove.getCreateTime(), coordinate);//鏇存柊
-
- } else {
- //5鍒嗛挓鍐卹edis涓湁鏁版嵁锛岃鏄�5鍒嗛挓鍐呮湁寮曞鏁版嵁,鑾峰彇褰撳墠鎶ヨ鐐圭殑鏈紩瀵兼鏁�
- Integer count = unGuideCountMapMove.get(ardAlarmRadarMove.getName());
- if (count != null) {
- if (count > 2) {
- //鏈紩瀵兼鏁�3娆″悗杩涜寮曞
- ardAlarmRadarMove.setGuideFlag(1);
- //灏嗗紩瀵兼暟鎹啓鍏edis 璁剧疆5鍒嗛挓杩囨湡
- redisCache.setCacheObject("global_move_alarm:" + ardAlarmRadarMove.getName(), ardAlarmRadarMove, 5, TimeUnit.MINUTES);
- count = 0;
- //寮曞鍏ラ槦
-
- radarGuideToQueue(ardAlarmRadarMove.getId(), radarAlarmData.getRadarId(), ardAlarmRadarMove.getName(), ardAlarmRadarMove.getAlarmType(), ardAlarmRadarMove.getCreateTime(), coordinate);
- } else {
- ardAlarmRadarMove.setGuideFlag(0);
- count++;
- }
- } else {
- ardAlarmRadarMove.setGuideFlag(0);
- count = 0;
- }
- unGuideCountMapMove.put(ardAlarmRadarMove.getName(), count);
- }
- //鏇存柊
- ardAlarmRadarMoveMapper.updateArdAlarmRadarMove(ardAlarmRadarMove);
- }
- }
- //endregion
- }
- private void radarFireGuide(List<ArdAlarmRadarFire> ardAlarmRadarFires, RadarAlarmData radarAlarmData) {
- //鎸夊叴瓒g偣鍘婚噸,鐒跺悗鎸夊紩瀵奸�昏緫杩涜寮曞鍏ラ槦
- ardAlarmRadarFires = ardAlarmRadarFires.stream()
- .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new java.util.TreeSet<>(java.util.Comparator.comparing(ArdAlarmRadarFire::getName))), ArrayList::new));
- if (ardAlarmRadarFires.size() > 0) {
- for (ArdAlarmRadarFire ardAlarmRadarFire : ardAlarmRadarFires) {
- //閬嶅巻鎶ヨ鏁版嵁杩涜寮曞
- if (StringUtils.isNull(ardAlarmRadarFire.getLongitude()) || StringUtils.isNull(ardAlarmRadarFire.getLatitude())) {
- //鍧愭爣涓虹┖涓嶅紩瀵�
- continue;
- }
- double[] coordinate = new double[]{ardAlarmRadarFire.getLongitude(), ardAlarmRadarFire.getLatitude()};//鎶ヨ鍧愭爣
- //浠巖edis涓彇鍑哄綋鍓嶆姤璀︾偣鐨�5鍒嗛挓鍐呮槸鍚︽湁寮曞
- ArdAlarmRadarFire alarmRadarFire = redisCache.getCacheObject("global_fire_alarm:" + ardAlarmRadarFire.getName());//浠巖edis涓彇鍑烘渶鏂板紩瀵肩殑鎶ヨ鏁版嵁
- if (alarmRadarFire == null) {
- //5鍒嗛挓鍐卹edis涓病鏈夋暟鎹紝璇存槑5鍒嗛挓鍐呮病鏈夊紩瀵兼暟鎹�
- ardAlarmRadarFire.setGuideFlag(1);
- //灏嗗紩瀵兼暟鎹啓鍏edis 璁剧疆5鍒嗛挓杩囨湡
- redisCache.setCacheObject("global_fire_alarm:" + ardAlarmRadarFire.getName(), ardAlarmRadarFire, 5, TimeUnit.MINUTES);//寮曞鏁版嵁鍐欏叆redis
- unGuideCountMapFire.put(alarmRadarFire.getName(), 0);
- //寮曞鍏ラ槦
- radarGuideToQueue(ardAlarmRadarFire.getId(), radarAlarmData.getRadarId(), ardAlarmRadarFire.getName(), ardAlarmRadarFire.getAlarmType(), ardAlarmRadarFire.getCreateTime(), coordinate);
-
- } else {
- //5鍒嗛挓鍐卹edis涓湁鏁版嵁锛岃鏄�5鍒嗛挓鍐呮湁寮曞鏁版嵁,鑾峰彇褰撳墠鎶ヨ鐐圭殑鏈紩瀵兼鏁�
- Integer count = unGuideCountMapFire.get(alarmRadarFire.getName());
- if (count != null) {
- if (count > 2) {
- //鏈紩瀵兼鏁�3娆″悗杩涜寮曞
- ardAlarmRadarFire.setGuideFlag(1);
- //灏嗗紩瀵兼暟鎹啓鍏edis 璁剧疆5鍒嗛挓杩囨湡
- redisCache.setCacheObject("global_fire_alarm:" + ardAlarmRadarFire.getName(), ardAlarmRadarFire, 5, TimeUnit.MINUTES);
- count = 0;
- //寮曞鍏ラ槦
- radarGuideToQueue(ardAlarmRadarFire.getId(), radarAlarmData.getRadarId(), ardAlarmRadarFire.getName(), ardAlarmRadarFire.getAlarmType(), ardAlarmRadarFire.getCreateTime(), coordinate);
- } else {
- ardAlarmRadarFire.setGuideFlag(0);
- count++;
- }
- } else {
- ardAlarmRadarFire.setGuideFlag(0);
- count = 0;
- }
- unGuideCountMapFire.put(ardAlarmRadarFire.getName(), count);
- }
- //鏇存柊
- ardAlarmRadarFireMapper.updateArdAlarmRadarFire(ardAlarmRadarFire);
- }
- }
- //endregion
- }
- private void radarPumpGuide(List<ArdAlarmRadarPump> ardAlarmRadarPumps, RadarAlarmData radarAlarmData) {
- //鎸夊叴瓒g偣鍘婚噸,鐒跺悗鎸夊紩瀵奸�昏緫杩涜寮曞鍏ラ槦
- ardAlarmRadarPumps = ardAlarmRadarPumps.stream()
- .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new java.util.TreeSet<>(java.util.Comparator.comparing(ArdAlarmRadarPump::getName))), ArrayList::new));
- if (ardAlarmRadarPumps.size() > 0) {
- for (ArdAlarmRadarPump ardAlarmRadarPump : ardAlarmRadarPumps) {
- //閬嶅巻鎶ヨ鏁版嵁杩涜寮曞
- if (StringUtils.isNull(ardAlarmRadarPump.getLongitude()) || StringUtils.isNull(ardAlarmRadarPump.getLatitude())) {
- //鍧愭爣涓虹┖涓嶅紩瀵�
- continue;
- }
- double[] coordinate = new double[]{ardAlarmRadarPump.getLongitude(), ardAlarmRadarPump.getLatitude()};//鎶ヨ鍧愭爣
- //浠巖edis涓彇鍑哄綋鍓嶆姤璀︾偣鐨�5鍒嗛挓鍐呮槸鍚︽湁寮曞
- ArdAlarmRadarPump alarmRadarPump = redisCache.getCacheObject("global_pump_alarm:" + ardAlarmRadarPump.getName());//浠巖edis涓彇鍑烘渶鏂板紩瀵肩殑鎶ヨ鏁版嵁
- if (alarmRadarPump == null) {
- //5鍒嗛挓鍐卹edis涓病鏈夋暟鎹紝璇存槑5鍒嗛挓鍐呮病鏈夊紩瀵兼暟鎹�
- ardAlarmRadarPump.setGuideFlag(1);
- //灏嗗紩瀵兼暟鎹啓鍏edis 璁剧疆5鍒嗛挓杩囨湡
- redisCache.setCacheObject("global_pump_alarm:" + ardAlarmRadarPump.getName(), ardAlarmRadarPump, 5, TimeUnit.MINUTES);//寮曞鏁版嵁鍐欏叆redis
- unGuideCountMapPump.put(alarmRadarPump.getName(), 0);
- //寮曞鍏ラ槦
- radarGuideToQueue(ardAlarmRadarPump.getId(), radarAlarmData.getRadarId(), ardAlarmRadarPump.getName(), ardAlarmRadarPump.getAlarmType(), ardAlarmRadarPump.getCreateTime(), coordinate);
-
- } else {
- //5鍒嗛挓鍐卹edis涓湁鏁版嵁锛岃鏄�5鍒嗛挓鍐呮湁寮曞鏁版嵁,鑾峰彇褰撳墠鎶ヨ鐐圭殑鏈紩瀵兼鏁�
- Integer count = unGuideCountMapPump.get(ardAlarmRadarPump.getName());
- if (count != null) {
- if (count > 2) {
- //鏈紩瀵兼鏁�3娆″悗杩涜寮曞
- ardAlarmRadarPump.setGuideFlag(1);
- //灏嗗紩瀵兼暟鎹啓鍏edis 璁剧疆5鍒嗛挓杩囨湡
- redisCache.setCacheObject("global_pump_alarm:" + ardAlarmRadarPump.getName(), ardAlarmRadarPump, 5, TimeUnit.MINUTES);
- count = 0;
- //寮曞鍏ラ槦
- radarGuideToQueue(ardAlarmRadarPump.getId(), radarAlarmData.getRadarId(), ardAlarmRadarPump.getName(), ardAlarmRadarPump.getAlarmType(), ardAlarmRadarPump.getCreateTime(), coordinate);
- } else {
- ardAlarmRadarPump.setGuideFlag(0);
- count++;
- }
- } else {
- ardAlarmRadarPump.setGuideFlag(0);
- count = 0;
- }
- unGuideCountMapPump.put(ardAlarmRadarPump.getName(), count);
- }
- //鏇存柊
- ardAlarmRadarPumpMapper.updateArdAlarmRadarPump(ardAlarmRadarPump);
- }
- }
- //endregion
}
}
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/QueueTaskExecutor.java b/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/QueueTaskExecutor.java
index 8b0eb56..b4b12e0 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/QueueTaskExecutor.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/QueueTaskExecutor.java
@@ -5,14 +5,12 @@
import com.ruoyi.alarm.external.domain.ArdAlarmExternal;
import com.ruoyi.alarm.external.service.IArdAlarmExternalService;
import com.ruoyi.alarm.global.domain.GuideTask;
-import com.ruoyi.alarm.radar.domain.ArdAlarmRadar;
import com.ruoyi.alarm.radar.domain.ArdAlarmRadarFire;
import com.ruoyi.alarm.radar.domain.ArdAlarmRadarMove;
import com.ruoyi.alarm.radar.domain.ArdAlarmRadarPump;
import com.ruoyi.alarm.radar.service.IArdAlarmRadarFireService;
import com.ruoyi.alarm.radar.service.IArdAlarmRadarMoveService;
import com.ruoyi.alarm.radar.service.IArdAlarmRadarPumpService;
-import com.ruoyi.alarm.radar.service.IArdAlarmRadarService;
import com.ruoyi.alarm.tube.domain.ArdAlarmTube;
import com.ruoyi.alarm.tube.service.IArdAlarmTubeService;
import com.ruoyi.common.utils.StringUtils;
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/radar/controller/ArdAlarmRadarController.java b/ard-work/src/main/java/com/ruoyi/alarm/radar/controller/ArdAlarmRadarController.java
deleted file mode 100644
index edf8859..0000000
--- a/ard-work/src/main/java/com/ruoyi/alarm/radar/controller/ArdAlarmRadarController.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package com.ruoyi.alarm.radar.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-
-import com.ruoyi.alarm.radar.domain.ArdAlarmRadar;
-import com.ruoyi.alarm.radar.service.IArdAlarmRadarService;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 闆疯揪鎶ヨController
- *
- * @author ard
- * @date 2023-06-28
- */
-@RestController
-@RequestMapping("/alarm/radar")
-public class ArdAlarmRadarController extends BaseController
-{
- @Autowired
- private IArdAlarmRadarService ardAlarmRadarService;
-
- /**
- * 鏌ヨ闆疯揪鎶ヨ鍒楄〃
- */
- @PreAuthorize("@ss.hasPermi('alarm:radar:list')")
- @GetMapping("/list")
- public TableDataInfo list(ArdAlarmRadar ardAlarmRadar)
- {
- startPage();
- List<ArdAlarmRadar> list = ardAlarmRadarService.selectArdAlarmRadarList(ardAlarmRadar);
- return getDataTable(list);
- }
-
- /**
- * 瀵煎嚭闆疯揪鎶ヨ鍒楄〃
- */
- @PreAuthorize("@ss.hasPermi('alarm:radar:export')")
- @Log(title = "闆疯揪鎶ヨ", businessType = BusinessType.EXPORT)
- @PostMapping("/export")
- public void export(HttpServletResponse response, ArdAlarmRadar ardAlarmRadar)
- {
- List<ArdAlarmRadar> list = ardAlarmRadarService.selectArdAlarmRadarList(ardAlarmRadar);
- ExcelUtil<ArdAlarmRadar> util = new ExcelUtil<ArdAlarmRadar>(ArdAlarmRadar.class);
- util.exportExcel(response, list, "闆疯揪鎶ヨ鏁版嵁");
- }
-
- /**
- * 鑾峰彇闆疯揪鎶ヨ璇︾粏淇℃伅
- */
- @PreAuthorize("@ss.hasPermi('alarm:radar:query')")
- @GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") String id)
- {
- return success(ardAlarmRadarService.selectArdAlarmRadarById(id));
- }
-
- /**
- * 鏂板闆疯揪鎶ヨ
- */
- @PreAuthorize("@ss.hasPermi('alarm:radar:add')")
- @Log(title = "闆疯揪鎶ヨ", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody ArdAlarmRadar ardAlarmRadar)
- {
- return toAjax(ardAlarmRadarService.insertArdAlarmRadar(ardAlarmRadar));
- }
-
- /**
- * 淇敼闆疯揪鎶ヨ
- */
- @PreAuthorize("@ss.hasPermi('alarm:radar:edit')")
- @Log(title = "闆疯揪鎶ヨ", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody ArdAlarmRadar ardAlarmRadar)
- {
- return toAjax(ardAlarmRadarService.updateArdAlarmRadar(ardAlarmRadar));
- }
-
- /**
- * 鍒犻櫎闆疯揪鎶ヨ
- */
- @PreAuthorize("@ss.hasPermi('alarm:radar:remove')")
- @Log(title = "闆疯揪鎶ヨ", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable String[] ids)
- {
- return toAjax(ardAlarmRadarService.deleteArdAlarmRadarByIds(ids));
- }
-}
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarFire.java b/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarFire.java
index b362c6c..661231e 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarFire.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarFire.java
@@ -2,6 +2,7 @@
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -13,6 +14,7 @@
* @author ard
* @date 2023-09-02
*/
+@Data
public class ArdAlarmRadarFire extends BaseEntity
{
private static final long serialVersionUID = 1L;
@@ -64,9 +66,10 @@
@Excel(name = "閮ㄩ棬ID")
private Long deptId;
- /** 寮曞鏍囪 */
- @Excel(name = "寮曞鏍囪")
- private Integer guideFlag;
+ /** 寮曞鏃堕棿 */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "寮曞鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date guideTime;
/**
* 鎶ヨ鎬绘暟
@@ -82,164 +85,6 @@
*/
private String radarId;
- public String getRadarId() {
- return radarId;
- }
- public void setRadarId(String radarId) {
- this.radarId = radarId;
- }
- public Integer getTotal() {
- return total;
- }
-
- public void setTotal(Integer total) {
- this.total = total;
- }
-
- public Integer getCount() {
- return count;
- }
-
- public void setCount(Integer count) {
- this.count = count;
- }
-
- public void setId(String id)
- {
- this.id = id;
- }
-
- public String getId()
- {
- return id;
- }
- public void setName(String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
- public void setTargetId(String targetId)
- {
- this.targetId = targetId;
- }
-
- public String getTargetId()
- {
- return targetId;
- }
- public void setAlarmType(String alarmType)
- {
- this.alarmType = alarmType;
- }
-
- public String getAlarmType()
- {
- return alarmType;
- }
- public void setAlarmTime(Date alarmTime)
- {
- this.alarmTime = alarmTime;
- }
-
- public Date getAlarmTime()
- {
- return alarmTime;
- }
- public void setLongitude(Double longitude)
- {
- this.longitude = longitude;
- }
-
- public Double getLongitude()
- {
- return longitude;
- }
- public void setLatitude(Double latitude)
- {
- this.latitude = latitude;
- }
-
- public Double getLatitude()
- {
- return latitude;
- }
- public void setRecordUrl1(String recordUrl1)
- {
- this.recordUrl1 = recordUrl1;
- }
-
- public String getRecordUrl1()
- {
- return recordUrl1;
- }
- public void setViewTime(Date viewTime)
- {
- this.viewTime = viewTime;
- }
-
- public Date getViewTime()
- {
- return viewTime;
- }
- public void setUserId(String userId)
- {
- this.userId = userId;
- }
-
- public String getUserId()
- {
- return userId;
- }
- public void setDeptId(Long deptId)
- {
- this.deptId = deptId;
- }
-
- public Long getDeptId()
- {
- return deptId;
- }
- public void setGuideFlag(Integer guideFlag)
- {
- this.guideFlag = guideFlag;
- }
-
- public Integer getGuideFlag()
- {
- return guideFlag;
- }
-
- public String getRecordUrl2() {
- return recordUrl2;
- }
-
- public void setRecordUrl2(String recordUrl2) {
- this.recordUrl2 = recordUrl2;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("name", getName())
- .append("targetId", getTargetId())
- .append("alarmType", getAlarmType())
- .append("alarmTime", getAlarmTime())
- .append("longitude", getLongitude())
- .append("latitude", getLatitude())
- .append("recordUrl1", getRecordUrl1())
- .append("viewTime", getViewTime())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("userId", getUserId())
- .append("deptId", getDeptId())
- .append("guideFlag", getGuideFlag())
- .toString();
- }
}
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarMove.java b/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarMove.java
index 1efb263..c86db63 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarMove.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarMove.java
@@ -2,6 +2,7 @@
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -13,6 +14,7 @@
* @author ard
* @date 2023-09-02
*/
+@Data
public class ArdAlarmRadarMove extends BaseEntity
{
private static final long serialVersionUID = 1L;
@@ -64,9 +66,10 @@
@Excel(name = "閮ㄩ棬ID")
private Long deptId;
- /** 寮曞鏍囪 */
- @Excel(name = "寮曞鏍囪")
- private Integer guideFlag;
+ /** 寮曞鏃堕棿 */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "寮曞鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date guideTime;
/**
* 鎶ヨ鎬绘暟
@@ -82,163 +85,5 @@
private String RadarId;
- public String getRadarId() {
- return RadarId;
- }
- public void setRadarId(String radarId) {
- RadarId = radarId;
- }
-
- public Integer getTotal() {
- return total;
- }
-
- public void setTotal(Integer total) {
- this.total = total;
- }
-
- public Integer getCount() {
- return count;
- }
-
- public void setCount(Integer count) {
- this.count = count;
- }
- public void setId(String id)
- {
- this.id = id;
- }
-
- public String getId()
- {
- return id;
- }
- public void setName(String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
- public void setTargetId(String targetId)
- {
- this.targetId = targetId;
- }
-
- public String getTargetId()
- {
- return targetId;
- }
- public void setAlarmType(String alarmType)
- {
- this.alarmType = alarmType;
- }
-
- public String getAlarmType()
- {
- return alarmType;
- }
- public void setAlarmTime(Date alarmTime)
- {
- this.alarmTime = alarmTime;
- }
-
- public Date getAlarmTime()
- {
- return alarmTime;
- }
- public void setLongitude(Double longitude)
- {
- this.longitude = longitude;
- }
-
- public Double getLongitude()
- {
- return longitude;
- }
- public void setLatitude(Double latitude)
- {
- this.latitude = latitude;
- }
-
- public Double getLatitude()
- {
- return latitude;
- }
- public void setRecordUrl1(String recordUrl1)
- {
- this.recordUrl1 = recordUrl1;
- }
-
- public String getRecordUrl1()
- {
- return recordUrl1;
- }
- public void setViewTime(Date viewTime)
- {
- this.viewTime = viewTime;
- }
-
- public Date getViewTime()
- {
- return viewTime;
- }
- public void setUserId(String userId)
- {
- this.userId = userId;
- }
-
- public String getUserId()
- {
- return userId;
- }
- public void setDeptId(Long deptId)
- {
- this.deptId = deptId;
- }
-
- public Long getDeptId()
- {
- return deptId;
- }
- public void setGuideFlag(Integer guideFlag)
- {
- this.guideFlag = guideFlag;
- }
-
- public Integer getGuideFlag()
- {
- return guideFlag;
- }
-
- public String getRecordUrl2() {
- return recordUrl2;
- }
-
- public void setRecordUrl2(String recordUrl2) {
- this.recordUrl2 = recordUrl2;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("name", getName())
- .append("targetId", getTargetId())
- .append("alarmType", getAlarmType())
- .append("alarmTime", getAlarmTime())
- .append("longitude", getLongitude())
- .append("latitude", getLatitude())
- .append("recordUrl1", getRecordUrl1())
- .append("viewTime", getViewTime())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("userId", getUserId())
- .append("deptId", getDeptId())
- .append("guideFlag", getGuideFlag())
- .toString();
- }
}
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarPump.java b/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarPump.java
index 8c39be3..453adc6 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarPump.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/radar/domain/ArdAlarmRadarPump.java
@@ -2,6 +2,7 @@
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -13,6 +14,7 @@
* @author ard
* @date 2023-09-02
*/
+@Data
public class ArdAlarmRadarPump extends BaseEntity
{
private static final long serialVersionUID = 1L;
@@ -64,9 +66,10 @@
@Excel(name = "閮ㄩ棬ID")
private Long deptId;
- /** 寮曞鏍囪 */
- @Excel(name = "寮曞鏍囪")
- private Integer guideFlag;
+ /** 寮曞鏃堕棿 */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "寮曞鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date guideTime;
/**
@@ -81,164 +84,4 @@
* 闆疯揪ID
*/
private String radarId;
-
- public String getRadarId() {
- return radarId;
- }
-
- public void setRadarId(String radarId) {
- this.radarId = radarId;
- }
-
- public Integer getTotal() {
- return total;
- }
-
- public void setTotal(Integer total) {
- this.total = total;
- }
-
- public Integer getCount() {
- return count;
- }
-
- public void setCount(Integer count) {
- this.count = count;
- }
- public void setId(String id)
- {
- this.id = id;
- }
-
- public String getId()
- {
- return id;
- }
- public void setName(String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
- public void setTargetId(String targetId)
- {
- this.targetId = targetId;
- }
-
- public String getTargetId()
- {
- return targetId;
- }
- public void setAlarmType(String alarmType)
- {
- this.alarmType = alarmType;
- }
-
- public String getAlarmType()
- {
- return alarmType;
- }
- public void setAlarmTime(Date alarmTime)
- {
- this.alarmTime = alarmTime;
- }
-
- public Date getAlarmTime()
- {
- return alarmTime;
- }
- public void setLongitude(Double longitude)
- {
- this.longitude = longitude;
- }
-
- public Double getLongitude()
- {
- return longitude;
- }
- public void setLatitude(Double latitude)
- {
- this.latitude = latitude;
- }
-
- public Double getLatitude()
- {
- return latitude;
- }
- public void setRecordUrl1(String recordUrl1)
- {
- this.recordUrl1 = recordUrl1;
- }
-
- public String getRecordUrl1()
- {
- return recordUrl1;
- }
- public void setViewTime(Date viewTime)
- {
- this.viewTime = viewTime;
- }
-
- public Date getViewTime()
- {
- return viewTime;
- }
- public void setUserId(String userId)
- {
- this.userId = userId;
- }
-
- public String getUserId()
- {
- return userId;
- }
- public void setDeptId(Long deptId)
- {
- this.deptId = deptId;
- }
-
- public Long getDeptId()
- {
- return deptId;
- }
- public void setGuideFlag(Integer guideFlag)
- {
- this.guideFlag = guideFlag;
- }
-
- public Integer getGuideFlag()
- {
- return guideFlag;
- }
-
- public String getRecordUrl2() {
- return recordUrl2;
- }
-
- public void setRecordUrl2(String recordUrl2) {
- this.recordUrl2 = recordUrl2;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("name", getName())
- .append("targetId", getTargetId())
- .append("alarmType", getAlarmType())
- .append("alarmTime", getAlarmTime())
- .append("longitude", getLongitude())
- .append("latitude", getLatitude())
- .append("recordUrl1", getRecordUrl1())
- .append("viewTime", getViewTime())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("userId", getUserId())
- .append("deptId", getDeptId())
- .append("guideFlag", getGuideFlag())
- .toString();
- }
}
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarFireMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarFireMapper.java
index 0f6eac8..cf14ee8 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarFireMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarFireMapper.java
@@ -2,9 +2,7 @@
import java.util.List;
-import com.ruoyi.alarm.radar.domain.ArdAlarmRadar;
import com.ruoyi.alarm.radar.domain.ArdAlarmRadarFire;
-import com.ruoyi.alarm.radar.domain.ArdAlarmRadarMove;
import org.apache.ibatis.annotations.Param;
/**
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarMapper.java
deleted file mode 100644
index ba460ef..0000000
--- a/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarMapper.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package com.ruoyi.alarm.radar.mapper;
-
-import com.ruoyi.alarm.radar.domain.ArdAlarmRadar;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.Date;
-import java.util.List;
-
-
-/**
- * 闆疯揪鎶ヨMapper鎺ュ彛
- *
- * @author ard
- * @date 2023-06-28
- */
-public interface ArdAlarmRadarMapper {
- /**
- * 鏌ヨ闆疯揪鎶ヨ
- *
- * @param id 闆疯揪鎶ヨ涓婚敭
- * @return 闆疯揪鎶ヨ
- */
- public ArdAlarmRadar selectArdAlarmRadarById(String id);
-
- /**
- * 鏌ヨ闆疯揪鎶ヨ鍒楄〃
- *
- * @param ardAlarmRadar 闆疯揪鎶ヨ
- * @return 闆疯揪鎶ヨ闆嗗悎
- */
- public List<ArdAlarmRadar> selectArdAlarmRadarList(ArdAlarmRadar ardAlarmRadar);
-
- /**
- * 鏂板闆疯揪鎶ヨ
- *
- * @param ardAlarmRadar 闆疯揪鎶ヨ
- * @return 缁撴灉
- */
- public int insertArdAlarmRadar(ArdAlarmRadar ardAlarmRadar);
-
- /**
- * 淇敼闆疯揪鎶ヨ
- *
- * @param ardAlarmRadar 闆疯揪鎶ヨ
- * @return 缁撴灉
- */
- public int updateArdAlarmRadar(ArdAlarmRadar ardAlarmRadar);
-
- /**
- * 鍒犻櫎闆疯揪鎶ヨ
- *
- * @param id 闆疯揪鎶ヨ涓婚敭
- * @return 缁撴灉
- */
- public int deleteArdAlarmRadarById(String id);
-
- /**
- * 鎵归噺鍒犻櫎闆疯揪鎶ヨ
- *
- * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
- * @return 缁撴灉
- */
- public int deleteArdAlarmRadarByIds(String[] ids);
-
- public List<ArdAlarmRadar> selectListAllByCommand(@Param("refreshTime") String refreshTime, @Param("alarmType") String alarmType);
-
- int selectCountByAlarmTime(@Param("refreshTime") String refreshTime, @Param("alarmType") String alarmType);
-
- /**
- * 閫氳繃闆疯揪id鎵惧埌鍏宠仈濉斾笂鐨勫ぇ鍏夌數id
- */
- String getCameraByRadar(String radarId);
-
- /**
- * 鏌ユ壘5鍒嗛挓鍐呭紩瀵艰繃鐨勮褰�
- */
- public ArdAlarmRadar getArdAlarmRadarWithGuide(ArdAlarmRadar ardAlarmRadar);
- /**
- * 鑾峰彇鏈紩瀵肩殑璁板綍鏁伴噺
- */
- public int getArdAlarmRadarWithNotGuide(@Param("ardAlarmRadar") ArdAlarmRadar ardAlarmRadar, @Param("guideTime") Date guideTime);
-
- public int updateViewTimeByCondition(@Param("name")String name,@Param("alarmType")String alarmType,@Param("alarmTime") String alarmTime,@Param("viewTime") String viewTime);
-}
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarMoveMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarMoveMapper.java
index f51cb6f..5e4617e 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarMoveMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarMoveMapper.java
@@ -2,7 +2,6 @@
import java.util.List;
-import com.ruoyi.alarm.radar.domain.ArdAlarmRadar;
import com.ruoyi.alarm.radar.domain.ArdAlarmRadarMove;
import org.apache.ibatis.annotations.Param;
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarPumpMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarPumpMapper.java
index 0da3e8b..576a8c9 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarPumpMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarPumpMapper.java
@@ -2,8 +2,6 @@
import java.util.List;
-import com.ruoyi.alarm.radar.domain.ArdAlarmRadar;
-import com.ruoyi.alarm.radar.domain.ArdAlarmRadarFire;
import com.ruoyi.alarm.radar.domain.ArdAlarmRadarPump;
import org.apache.ibatis.annotations.Param;
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/radar/service/IArdAlarmRadarService.java b/ard-work/src/main/java/com/ruoyi/alarm/radar/service/IArdAlarmRadarService.java
deleted file mode 100644
index 1fac6f3..0000000
--- a/ard-work/src/main/java/com/ruoyi/alarm/radar/service/IArdAlarmRadarService.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.ruoyi.alarm.radar.service;
-
-import com.ruoyi.alarm.radar.domain.ArdAlarmRadar;
-
-import java.util.List;
-
-
-/**
- * 闆疯揪鎶ヨService鎺ュ彛
- *
- * @author ard
- * @date 2023-06-28
- */
-public interface IArdAlarmRadarService
-{
- /**
- * 鏌ヨ闆疯揪鎶ヨ
- *
- * @param id 闆疯揪鎶ヨ涓婚敭
- * @return 闆疯揪鎶ヨ
- */
- public ArdAlarmRadar selectArdAlarmRadarById(String id);
-
- /**
- * 鏌ヨ闆疯揪鎶ヨ鍒楄〃
- *
- * @param ardAlarmRadar 闆疯揪鎶ヨ
- * @return 闆疯揪鎶ヨ闆嗗悎
- */
- public List<ArdAlarmRadar> selectArdAlarmRadarList(ArdAlarmRadar ardAlarmRadar);
-
- /**
- * 鏂板闆疯揪鎶ヨ
- *
- * @param ardAlarmRadar 闆疯揪鎶ヨ
- * @return 缁撴灉
- */
- public int insertArdAlarmRadar(ArdAlarmRadar ardAlarmRadar);
-
- /**
- * 淇敼闆疯揪鎶ヨ
- *
- * @param ardAlarmRadar 闆疯揪鎶ヨ
- * @return 缁撴灉
- */
- public int updateArdAlarmRadar(ArdAlarmRadar ardAlarmRadar);
-
- /**
- * 鎵归噺鍒犻櫎闆疯揪鎶ヨ
- *
- * @param ids 闇�瑕佸垹闄ょ殑闆疯揪鎶ヨ涓婚敭闆嗗悎
- * @return 缁撴灉
- */
- public int deleteArdAlarmRadarByIds(String[] ids);
-
- /**
- * 鍒犻櫎闆疯揪鎶ヨ淇℃伅
- *
- * @param id 闆疯揪鎶ヨ涓婚敭
- * @return 缁撴灉
- */
- public int deleteArdAlarmRadarById(String id);
-}
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/radar/service/impl/ArdAlarmRadarServiceImpl.java b/ard-work/src/main/java/com/ruoyi/alarm/radar/service/impl/ArdAlarmRadarServiceImpl.java
deleted file mode 100644
index c7ef44d..0000000
--- a/ard-work/src/main/java/com/ruoyi/alarm/radar/service/impl/ArdAlarmRadarServiceImpl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.ruoyi.alarm.radar.service.impl;
-
-import java.util.List;
-
-import com.ruoyi.alarm.radar.domain.ArdAlarmRadar;
-import com.ruoyi.alarm.radar.mapper.ArdAlarmRadarMapper;
-import com.ruoyi.alarm.radar.service.IArdAlarmRadarService;
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.SecurityUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-
-/**
- * 闆疯揪鎶ヨService涓氬姟灞傚鐞�
- *
- * @author ard
- * @date 2023-06-28
- */
-@Service
-public class ArdAlarmRadarServiceImpl implements IArdAlarmRadarService {
- @Autowired
- private ArdAlarmRadarMapper ardAlarmRadarMapper;
-
- /**
- * 鏌ヨ闆疯揪鎶ヨ
- *
- * @param id 闆疯揪鎶ヨ涓婚敭
- * @return 闆疯揪鎶ヨ
- */
- @Override
- public ArdAlarmRadar selectArdAlarmRadarById(String id) {
- return ardAlarmRadarMapper.selectArdAlarmRadarById(id);
- }
-
- /**
- * 鏌ヨ闆疯揪鎶ヨ鍒楄〃
- *
- * @param ardAlarmRadar 闆疯揪鎶ヨ
- * @return 闆疯揪鎶ヨ
- */
- @Override
- public List<ArdAlarmRadar> selectArdAlarmRadarList(ArdAlarmRadar ardAlarmRadar) {
- return ardAlarmRadarMapper.selectArdAlarmRadarList(ardAlarmRadar);
- }
-
- /**
- * 鏂板闆疯揪鎶ヨ
- *
- * @param ardAlarmRadar 闆疯揪鎶ヨ
- * @return 缁撴灉
- */
- @Override
- public int insertArdAlarmRadar(ArdAlarmRadar ardAlarmRadar) {
- ardAlarmRadar.setCreateBy(SecurityUtils.getUsername());
- ardAlarmRadar.setCreateTime(DateUtils.getNowDate());
- ardAlarmRadar.setUserId(SecurityUtils.getUserId());
- return ardAlarmRadarMapper.insertArdAlarmRadar(ardAlarmRadar);
- }
-
- /**
- * 淇敼闆疯揪鎶ヨ
- *
- * @param ardAlarmRadar 闆疯揪鎶ヨ
- * @return 缁撴灉
- */
- @Override
- public int updateArdAlarmRadar(ArdAlarmRadar ardAlarmRadar) {
- return ardAlarmRadarMapper.updateArdAlarmRadar(ardAlarmRadar);
- }
-
- /**
- * 鎵归噺鍒犻櫎闆疯揪鎶ヨ
- *
- * @param ids 闇�瑕佸垹闄ょ殑闆疯揪鎶ヨ涓婚敭
- * @return 缁撴灉
- */
- @Override
- public int deleteArdAlarmRadarByIds(String[] ids) {
- return ardAlarmRadarMapper.deleteArdAlarmRadarByIds(ids);
- }
-
- /**
- * 鍒犻櫎闆疯揪鎶ヨ淇℃伅
- *
- * @param id 闆疯揪鎶ヨ涓婚敭
- * @return 缁撴灉
- */
- @Override
- public int deleteArdAlarmRadarById(String id) {
- return ardAlarmRadarMapper.deleteArdAlarmRadarById(id);
- }
-}
diff --git a/ard-work/src/main/java/com/ruoyi/media/service/impl/MediaServiceImpl.java b/ard-work/src/main/java/com/ruoyi/media/service/impl/MediaServiceImpl.java
index a66c1a8..af45f2b 100644
--- a/ard-work/src/main/java/com/ruoyi/media/service/impl/MediaServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/media/service/impl/MediaServiceImpl.java
@@ -95,7 +95,7 @@
//GPU纭В鐮佺紪鐮� -hwaccel cuvid -c:v h264_cuvid 浣跨敤cuda瑙g爜 -c:v h264_nvenc 浣跨敤cuda缂栫爜
//String cmd = rootPath + "/lib/mediamtx/" + "ffmpeg -hwaccel cuvid -c:v h264_cuvid -rtsp_transport udp -i " + rtspPath + " -c:v h264_nvenc -r 25 -threads 4 -b:v 2048k -bf 0 -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH";
if (isCode.equals("1")) {
- String cmd = "ffmpeg -rtsp_transport tcp -i " + sourceUrl + " -vcodec libx264 -preset:v ultrafast -r 25 -keyint_min 25 -g 25 -sc_threshold 0 -threads 6 -b:v 2048k -acodec pcm_alaw -strict -2 -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH";
+ String cmd = "ffmpeg -rtsp_transport tcp -i " + sourceUrl + " -vcodec libx264 -preset:v ultrafast -r 25 -keyint_min 25 -g 25 -sc_threshold 0 -threads 6 -b:v 2048k -acodec opus -strict -2 -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH";
if (!softwareDecoding) {
cmd = "ffmpeg -hwaccel cuvid -c:v h264_cuvid -rtsp_transport tcp -i " + sourceUrl + " -c:v h264_nvenc -r 25 -g 60 -threads 6 -b:v 2048k -bf 0 -acodec opus -strict -2 -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH";
}
@@ -296,7 +296,7 @@
String rtmpUrl = "rtmp://" + mediamtxHost + ":1935/" + name;
info.setRtmpUrl(rtmpUrl);
//RTSP鎾斁鍦板潃
- String rtspUrl = "rtsp://" + mediamtxHost + ":7554/" + name;
+ String rtspUrl = "rtsp://" + mediamtxHost + ":8554/" + name;
info.setRtspUrl(rtspUrl);
//WEBRTC鎾斁鍦板潃
String webrtcUrl = "http://" + mediamtxHost + ":8889/" + name;
diff --git a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarFireMapper.xml b/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarFireMapper.xml
index af96e1d..a6559a6 100644
--- a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarFireMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarFireMapper.xml
@@ -18,11 +18,11 @@
<result property="createTime" column="create_time" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
- <result property="guideFlag" column="guide_flag" />
+ <result property="guideTime" column="guide_time" />
</resultMap>
<sql id="selectArdAlarmRadarFireVo">
- select id, name, target_id, alarm_type, alarm_time, longitude, latitude, record_url1, view_time, create_by, create_time, user_id, dept_id, guide_flag from ard_alarm_radar_fire
+ select id, name, target_id, alarm_type, alarm_time, longitude, latitude, record_url1, view_time, create_by, create_time, user_id, dept_id, guide_time from ard_alarm_radar_fire
</sql>
<select id="selectArdAlarmRadarFireList" parameterType="ArdAlarmRadarFire" resultMap="ArdAlarmRadarFireResult">
@@ -38,7 +38,7 @@
<if test="viewTime != null "> and view_time = #{viewTime}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
- <if test="guideFlag != null "> and guide_flag = #{guideFlag}</if>
+ <if test="guideTime != null "> and guide_time = #{guideTime}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
AND alarm_time >= to_timestamp(#{params.beginTime},'yyyy-MM-DD HH24:MI:ss')
</if>
@@ -71,7 +71,7 @@
<if test="updateTime != null">update_time,</if>
<if test="userId != null">user_id,</if>
<if test="deptId != null">dept_id,</if>
- <if test="guideFlag != null">guide_flag,</if>
+ <if test="guideTime != null">guide_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -88,7 +88,7 @@
<if test="updateTime != null">#{updateTime},</if>
<if test="userId != null">#{userId},</if>
<if test="deptId != null">#{deptId},</if>
- <if test="guideFlag != null">#{guideFlag},</if>
+ <if test="guideTime != null">#{guideTime},</if>
</trim>
</insert>
@@ -108,7 +108,7 @@
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
- <if test="guideFlag != null">guide_flag = #{guideFlag},</if>
+ <if test="guideTime != null">guide_time = #{guideTime},</if>
</trim>
where id = #{id}
</update>
diff --git a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMapper.xml b/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMapper.xml
deleted file mode 100644
index b35e1dc..0000000
--- a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMapper.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.alarm.radar.mapper.ArdAlarmRadarMapper">
- <resultMap type="ArdAlarmRadar" id="ArdAlarmRadarResult">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="targetId" column="target_id"/>
- <result property="alarmType" column="alarm_type"/>
- <result property="alarmTime" column="alarm_time"/>
- <result property="longitude" column="longitude"/>
- <result property="latitude" column="latitude"/>
- <result property="viewTime" column="view_time"/>
- <result property="createBy" column="create_by"/>
- <result property="createTime" column="create_time"/>
- <result property="userId" column="user_id"/>
- <result property="deptId" column="dept_id"/>
- <result property="recordUrl1" column="record_url1"/>
- <result property="recordUrl2" column="record_url2"/>
- </resultMap>
-
- <sql id="selectArdAlarmRadarVo">
- select id,
- name,
- target_id,
- alarm_type,
- alarm_time,
- longitude,
- latitude,
- view_time,
- create_by,
- create_time,
- user_id,
- dept_id,
- record_url1,
- record_url2
- from ard_alarm_radar
- </sql>
-
- <select id="selectArdAlarmRadarList" parameterType="ArdAlarmRadar" resultMap="ArdAlarmRadarResult">
- <include refid="selectArdAlarmRadarVo"/>
- <where>
- <if test="name != null and name != ''">and name like '%'||#{name}||'%'</if>
- <if test="alarmType != null and alarmType != ''">and alarm_type = #{alarmType}</if>
- <if test="deptId != null ">and dept_id = #{deptId}</if>
- <if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
- AND alarm_time >= to_timestamp(#{params.beginTime},'yyyy-MM-DD HH24:MI:ss')
- </if>
- <if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
- AND alarm_time <= to_timestamp(#{params.endTime},'yyyy-MM-DD HH24:MI:ss')
- </if>
- </where>
- order by alarm_time desc
- </select>
-
- <select id="selectArdAlarmRadarById" parameterType="String" resultMap="ArdAlarmRadarResult">
- <include refid="selectArdAlarmRadarVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertArdAlarmRadar" parameterType="ArdAlarmRadar">
- insert into ard_alarm_radar
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="name != null">name,</if>
- <if test="targetId != null">target_id,</if>
- <if test="alarmType != null">alarm_type,</if>
- <if test="alarmTime != null">alarm_time,</if>
- <if test="longitude != null">longitude,</if>
- <if test="latitude != null">latitude,</if>
- <if test="viewTime != null">view_time,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="userId != null">user_id,</if>
- <if test="deptId != null">dept_id,</if>
- <if test="guideFlag != null">guide_flag,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="name != null">#{name},</if>
- <if test="targetId != null">#{targetId},</if>
- <if test="alarmType != null">#{alarmType},</if>
- <if test="alarmTime != null">#{alarmTime},</if>
- <if test="longitude != null">#{longitude},</if>
- <if test="latitude != null">#{latitude},</if>
- <if test="viewTime != null">#{viewTime},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="userId != null">#{userId},</if>
- <if test="deptId != null">#{deptId},</if>
- <if test="guideFlag != null">#{guideFlag},</if>
- </trim>
- </insert>
-
- <update id="updateArdAlarmRadar" parameterType="ArdAlarmRadar">
- update ard_alarm_radar
- <trim prefix="SET" suffixOverrides=",">
- <if test="name != null">name = #{name},</if>
- <if test="targetId != null">target_id = #{targetId},</if>
- <if test="alarmType != null">alarm_type = #{alarmType},</if>
- <if test="alarmTime != null">alarm_time = #{alarmTime},</if>
- <if test="longitude != null">longitude = #{longitude},</if>
- <if test="latitude != null">latitude = #{latitude},</if>
- <if test="viewTime != null">view_time = #{viewTime},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="userId != null">user_id = #{userId},</if>
- <if test="deptId != null">dept_id = #{deptId},</if>
- <if test="recordUrl1 != null">record_url1 = #{recordUrl1},</if>
- <if test="recordUrl2 != null">record_url2 = #{recordUrl2},</if>
- <if test="guideFlag != null">guide_flag = #{guideFlag},</if>
- </trim>
- where id = #{id}
- </update>
-
- <delete id="deleteArdAlarmRadarById" parameterType="String">
- delete
- from ard_alarm_radar
- where id = #{id}
- </delete>
-
- <delete id="deleteArdAlarmRadarByIds" parameterType="String">
- delete from ard_alarm_radar where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
-
- <select id="selectListAllByCommand" resultMap="ArdAlarmRadarResult">
- select aaar.ID,
- aaar.target_id,
- aaar.NAME,
- aaar.alarm_type,
- aaar.alarm_time,
- aaar.longitude,
- aaar.latitude,
- r.COUNT,
- r.total from
- (SELECT
- aar.NAME,
- max(aar.create_time) as create_time1,
- count(case when aar.view_time is null THEN 1 END) as count,
- count(aar.id) as total
- FROM
- ard_alarm_radar aar
- WHERE
- aar.create_time >= ( CURRENT_TIMESTAMP - INTERVAL '%${refreshTime}%' MINUTE )
- AND aar.alarm_type = #{alarmType}
- GROUP BY aar.NAME
- ) r
- INNER JOIN ard_alarm_radar aaar ON r.create_time1 = aaar.create_time
- </select>
- <select id="selectCountByAlarmTime" resultType="Integer">
- SELECT COUNT(DISTINCT aar.name)
- FROM ard_alarm_radar aar
- WHERE aar.alarm_time >= CURRENT_TIMESTAMP - INTERVAL '%${refreshTime}%' MINUTE
- and aar.alarm_type = #{alarmType}
- and aar.view_time is null
- </select>
- <select id="getCameraByRadar" resultType="String">
- select ac.id from ard_equip_radar aer
- INNER JOIN ard_towers at on aer.tower_id= at.id
- INNER JOIN ard_cameras ac on aer.tower_id=ac.tower_id
- </select>
- <select id="getArdAlarmRadarWithGuide" resultMap="ArdAlarmRadarResult">
- select *
- from ard_alarm_radar
- where create_time > current_timestamp - interval '5' minute
- and guide_flag = #{guideFlag}
- and alarm_type =#{alarmType}
- and name = #{name}
- ORDER BY create_time desc limit 1
- </select>
- <select id="getArdAlarmRadarWithNotGuide" resultType="Integer">
- select count(*)
- from ard_alarm_radar
- where create_time >= #{guideTime}
- and guide_flag = #{ardAlarmRadar.guideFlag}
- and alarm_type =#{ardAlarmRadar.alarmType}
- and name = #{ardAlarmRadar.name}
- </select>
- <update id="updateViewTimeByCondition" parameterType="String">
- update ard_alarm_radar
- set view_time=#{viewTime}
- where name = #{name}
- and alarm_type=#{alarmType}
- and alarm_time<=#{alarmTime}
- and view_time is null
- </update>
-</mapper>
\ No newline at end of file
diff --git a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml b/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml
index 37b0ceb..3793ffb 100644
--- a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml
@@ -19,11 +19,11 @@
<result property="createTime" column="create_time" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
- <result property="guideFlag" column="guide_flag" />
+ <result property="guideTime" column="guide_Time" />
</resultMap>
<sql id="selectArdAlarmRadarMoveVo">
- select id, name, target_id, alarm_type, alarm_time, longitude, latitude, record_url1,record_url2, view_time, create_by, create_time, user_id, dept_id, guide_flag from ard_alarm_radar_move
+ select id, name, target_id, alarm_type, alarm_time, longitude, latitude, record_url1,record_url2, view_time, create_by, create_time, user_id, dept_id, guide_time from ard_alarm_radar_move
</sql>
<select id="selectArdAlarmRadarMoveList" parameterType="ArdAlarmRadarMove" resultMap="ArdAlarmRadarMoveResult">
@@ -39,7 +39,7 @@
<if test="viewTime != null "> and view_time = #{viewTime}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
- <if test="guideFlag != null "> and guide_flag = #{guideFlag}</if>
+ <if test="guideTime != null "> and guide_time = #{guideTime}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
AND alarm_time >= to_timestamp(#{params.beginTime},'yyyy-MM-DD HH24:MI:ss')
</if>
@@ -73,7 +73,7 @@
<if test="updateTime != null">update_time,</if>
<if test="userId != null">user_id,</if>
<if test="deptId != null">dept_id,</if>
- <if test="guideFlag != null">guide_flag,</if>
+ <if test="guideTime != null">guide_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -91,7 +91,7 @@
<if test="updateTime != null">#{updateTime},</if>
<if test="userId != null">#{userId},</if>
<if test="deptId != null">#{deptId},</if>
- <if test="guideFlag != null">#{guideFlag},</if>
+ <if test="guideTime != null">#{guideTime},</if>
</trim>
</insert>
@@ -112,7 +112,7 @@
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
- <if test="guideFlag != null">guide_flag = #{guideFlag},</if>
+ <if test="guideTime != null">guide_time = #{guideTime},</if>
</trim>
where id = #{id}
</update>
diff --git a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarPumpMapper.xml b/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarPumpMapper.xml
index f2b7d47..11410d0 100644
--- a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarPumpMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarPumpMapper.xml
@@ -18,11 +18,11 @@
<result property="createTime" column="create_time" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
- <result property="guideFlag" column="guide_flag" />
+ <result property="guideTime" column="guide_time" />
</resultMap>
<sql id="selectArdAlarmRadarPumpVo">
- select id, name, target_id, alarm_type, alarm_time, longitude, latitude, record_url1, view_time, create_by, create_time, user_id, dept_id, guide_flag from ard_alarm_radar_pump
+ select id, name, target_id, alarm_type, alarm_time, longitude, latitude, record_url1, view_time, create_by, create_time, user_id, dept_id, guide_time from ard_alarm_radar_pump
</sql>
<select id="selectArdAlarmRadarPumpList" parameterType="ArdAlarmRadarPump" resultMap="ArdAlarmRadarPumpResult">
@@ -38,7 +38,7 @@
<if test="viewTime != null "> and view_time = #{viewTime}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
- <if test="guideFlag != null "> and guide_flag = #{guideFlag}</if>
+ <if test="guideTime != null "> and guide_time = #{guideTime}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
AND alarm_time >= to_timestamp(#{params.beginTime},'yyyy-MM-DD HH24:MI:ss')
</if>
@@ -71,7 +71,7 @@
<if test="updateTime != null">update_time,</if>
<if test="userId != null">user_id,</if>
<if test="deptId != null">dept_id,</if>
- <if test="guideFlag != null">guide_flag,</if>
+ <if test="guideTime != null">guide_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -88,7 +88,7 @@
<if test="updateTime != null">#{updateTime},</if>
<if test="userId != null">#{userId},</if>
<if test="deptId != null">#{deptId},</if>
- <if test="guideFlag != null">#{guideFlag},</if>
+ <if test="guideTime != null">#{guideTime},</if>
</trim>
</insert>
@@ -108,7 +108,7 @@
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
- <if test="guideFlag != null">guide_flag = #{guideFlag},</if>
+ <if test="guideTime != null">guide_time = #{guideTime},</if>
</trim>
where id = #{id}
</update>
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
index 3ff67fb..8ebc24c 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
@@ -1,6 +1,7 @@
package com.ruoyi.common.utils;
import java.lang.management.ManagementFactory;
+import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
@@ -84,6 +85,19 @@
}
}
+
+ public static final Date covertTime(Date date) {
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ Timestamp now = new Timestamp(date.getTime());
+ String str = df.format(now);
+ Date newDate = null;
+ try {
+ newDate = df.parse(str);
+ } catch (ParseException e) {
+ throw new RuntimeException("杞崲鏃ユ湡鍘绘帀姣寮傚父");
+ }
+ return newDate;
+ }
/**
* 鏃ユ湡璺緞 鍗冲勾/鏈�/鏃� 濡�2018/08/08
*/
--
Gitblit v1.9.3