From 66075a98e7ad6bd8a39f970b27fe2ce493306766 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期日, 08 十月 2023 16:00:22 +0800
Subject: [PATCH] 报警数量
---
ard-work/src/main/java/com/ruoyi/statistical/service/StatisticalService.java | 12 ++++
ard-work/src/main/java/com/ruoyi/statistical/controller/StatisticalController.java | 22 +++++++
ard-work/src/main/java/com/ruoyi/alarm/apponekey/mapper/ArdAlarmApponekeyMapper.java | 3
ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarMoveMapper.java | 3
ard-work/src/main/java/com/ruoyi/alarm/digitization3/mapper/ArdAlarmDigitization3Mapper.java | 4 +
ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarFireMapper.java | 3
ard-work/src/main/java/com/ruoyi/statistical/service/impl/StatisticalServiceImpl.java | 55 ++++++++++++++++++
ard-work/src/main/java/com/ruoyi/statistical/vo/NumVo.java | 19 ++++++
ard-work/src/main/java/com/ruoyi/alarm/camera/mapper/ArdAlarmCameraMapper.java | 4 +
ard-work/src/main/java/com/ruoyi/alarm/radar/mapper/ArdAlarmRadarPumpMapper.java | 3
ard-work/src/main/java/com/ruoyi/alarm/external/mapper/ArdAlarmExternalMapper.java | 4 +
ard-work/src/main/java/com/ruoyi/alarm/tube/mapper/ArdAlarmTubeMapper.java | 3
ard-work/src/main/java/com/ruoyi/alarm/access/mapper/ArdAlarmAccessMapper.java | 4 +
ard-work/src/main/java/com/ruoyi/alarm/steal/mapper/ArdAlarmStealelecMapper.java | 3
ard-work/src/main/java/com/ruoyi/alarm/wall/mapper/ArdAlarmWallMapper.java | 3
15 files changed, 134 insertions(+), 11 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/access/mapper/ArdAlarmAccessMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/access/mapper/ArdAlarmAccessMapper.java
index ded7625..d4b5007 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/access/mapper/ArdAlarmAccessMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/access/mapper/ArdAlarmAccessMapper.java
@@ -1,6 +1,8 @@
package com.ruoyi.alarm.access.mapper;
import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.alarm.access.domain.ArdAlarmAccess;
import com.ruoyi.statistical.param.ESParam;
import com.ruoyi.statistical.vo.CountVo;
@@ -13,7 +15,7 @@
* @author ard
* @date 2023-07-10
*/
-public interface ArdAlarmAccessMapper
+public interface ArdAlarmAccessMapper extends BaseMapper<ArdAlarmAccess>
{
/**
* 鏌ヨ闂ㄧ鎶ヨ
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/apponekey/mapper/ArdAlarmApponekeyMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/apponekey/mapper/ArdAlarmApponekeyMapper.java
index c6f512c..ccc26e0 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/apponekey/mapper/ArdAlarmApponekeyMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/apponekey/mapper/ArdAlarmApponekeyMapper.java
@@ -2,6 +2,7 @@
import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.alarm.access.domain.ArdAlarmAccess;
import com.ruoyi.alarm.apponekey.domain.ArdAlarmApponekey;
import com.ruoyi.statistical.param.ESParam;
@@ -14,7 +15,7 @@
* @author ard
* @date 2023-07-21
*/
-public interface ArdAlarmApponekeyMapper
+public interface ArdAlarmApponekeyMapper extends BaseMapper<ArdAlarmApponekey>
{
/**
* 鏌ヨapp涓�閿姤璀�
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/camera/mapper/ArdAlarmCameraMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/camera/mapper/ArdAlarmCameraMapper.java
index 93249a6..ab504b7 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/camera/mapper/ArdAlarmCameraMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/camera/mapper/ArdAlarmCameraMapper.java
@@ -1,6 +1,8 @@
package com.ruoyi.alarm.camera.mapper;
import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.alarm.camera.domain.ArdAlarmCamera;
import com.ruoyi.statistical.param.ESParam;
import com.ruoyi.statistical.vo.CountVo;
@@ -13,7 +15,7 @@
* @author ard
* @date 2023-06-21
*/
-public interface ArdAlarmCameraMapper
+public interface ArdAlarmCameraMapper extends BaseMapper<ArdAlarmCamera>
{
/**
* 鏌ヨ閫氱敤鍏夌數鎶ヨ
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/digitization3/mapper/ArdAlarmDigitization3Mapper.java b/ard-work/src/main/java/com/ruoyi/alarm/digitization3/mapper/ArdAlarmDigitization3Mapper.java
index 07131e8..564b46a 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/digitization3/mapper/ArdAlarmDigitization3Mapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/digitization3/mapper/ArdAlarmDigitization3Mapper.java
@@ -1,6 +1,8 @@
package com.ruoyi.alarm.digitization3.mapper;
import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.alarm.digitization3.domain.ArdAlarmDigitization3;
import com.ruoyi.alarm.tube.domain.ArdAlarmTube;
import com.ruoyi.statistical.param.ESParam;
@@ -13,7 +15,7 @@
* @author ard
* @date 2023-09-19
*/
-public interface ArdAlarmDigitization3Mapper
+public interface ArdAlarmDigitization3Mapper extends BaseMapper<ArdAlarmDigitization3>
{
/**
* 鏌ヨ涓夊満鏁板瓧鍖栨姤璀�
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/external/mapper/ArdAlarmExternalMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/external/mapper/ArdAlarmExternalMapper.java
index 45a5b03..246a0e3 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/external/mapper/ArdAlarmExternalMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/external/mapper/ArdAlarmExternalMapper.java
@@ -1,6 +1,8 @@
package com.ruoyi.alarm.external.mapper;
import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.alarm.external.domain.ArdAlarmExternal;
import com.ruoyi.statistical.param.ESParam;
import com.ruoyi.statistical.vo.CountVo;
@@ -12,7 +14,7 @@
* @author ard
* @date 2023-07-07
*/
-public interface ArdAlarmExternalMapper
+public interface ArdAlarmExternalMapper extends BaseMapper<ArdAlarmExternal>
{
/**
* 鏌ヨ澶栬仈鎶ヨ
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 91b9530..9a38af2 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,6 +2,7 @@
import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.alarm.radar.domain.ArdAlarmRadarFire;
import com.ruoyi.statistical.param.ESParam;
import com.ruoyi.statistical.vo.CountVo;
@@ -13,7 +14,7 @@
* @author ard
* @date 2023-09-02
*/
-public interface ArdAlarmRadarFireMapper
+public interface ArdAlarmRadarFireMapper extends BaseMapper<ArdAlarmRadarFire>
{
/**
* 鏌ヨ闆疯揪闃茬伀鎶ヨ
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 bbc54f0..d944507 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,6 +2,7 @@
import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.alarm.radar.domain.ArdAlarmRadarMove;
import com.ruoyi.statistical.param.ESParam;
import com.ruoyi.statistical.vo.CountVo;
@@ -13,7 +14,7 @@
* @author ard
* @date 2023-09-02
*/
-public interface ArdAlarmRadarMoveMapper
+public interface ArdAlarmRadarMoveMapper extends BaseMapper<ArdAlarmRadarMove>
{
/**
* 鏌ヨ闆疯揪绉诲姩鎶ヨ
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 df950c2..e17ee11 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,6 +2,7 @@
import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.alarm.radar.domain.ArdAlarmRadarPump;
import com.ruoyi.statistical.param.ESParam;
import com.ruoyi.statistical.vo.CountVo;
@@ -13,7 +14,7 @@
* @author ard
* @date 2023-09-02
*/
-public interface ArdAlarmRadarPumpMapper
+public interface ArdAlarmRadarPumpMapper extends BaseMapper<ArdAlarmRadarPump>
{
/**
* 鏌ヨ闆疯揪鎶芥补鏈哄仠鏈烘姤璀�
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/steal/mapper/ArdAlarmStealelecMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/steal/mapper/ArdAlarmStealelecMapper.java
index fa7b796..32eea24 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/steal/mapper/ArdAlarmStealelecMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/steal/mapper/ArdAlarmStealelecMapper.java
@@ -1,5 +1,6 @@
package com.ruoyi.alarm.steal.mapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.alarm.global.domain.GlobalAlarmCondition;
import com.ruoyi.alarm.steal.domain.ArdAlarmStealelec;
import com.ruoyi.statistical.param.ESParam;
@@ -8,7 +9,7 @@
import java.util.List;
-public interface ArdAlarmStealelecMapper{
+public interface ArdAlarmStealelecMapper extends BaseMapper<ArdAlarmStealelec> {
/**
* 鏌ヨ鐩楃數鎶ヨ鍒楄〃
*
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/tube/mapper/ArdAlarmTubeMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/tube/mapper/ArdAlarmTubeMapper.java
index 04ab2bf..9e572e5 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/tube/mapper/ArdAlarmTubeMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/tube/mapper/ArdAlarmTubeMapper.java
@@ -2,6 +2,7 @@
import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.alarm.tube.domain.ArdAlarmTube;
import com.ruoyi.statistical.param.ESParam;
import com.ruoyi.statistical.vo.CountVo;
@@ -14,7 +15,7 @@
* @author 鍒樿嫃涔�
* @date 2023-06-06
*/
-public interface ArdAlarmTubeMapper
+public interface ArdAlarmTubeMapper extends BaseMapper<ArdAlarmTube>
{
/**
* 鏌ヨ绠$嚎娉勯湶鎶ヨ
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/wall/mapper/ArdAlarmWallMapper.java b/ard-work/src/main/java/com/ruoyi/alarm/wall/mapper/ArdAlarmWallMapper.java
index 970b5c1..42f7f27 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/wall/mapper/ArdAlarmWallMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/wall/mapper/ArdAlarmWallMapper.java
@@ -2,6 +2,7 @@
import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.alarm.apponekey.domain.ArdAlarmApponekey;
import com.ruoyi.alarm.wall.domain.ArdAlarmWall;
import com.ruoyi.statistical.param.ESParam;
@@ -14,7 +15,7 @@
* @author ard
* @date 2023-08-31
*/
-public interface ArdAlarmWallMapper
+public interface ArdAlarmWallMapper extends BaseMapper<ArdAlarmWall>
{
/**
* 鏌ヨ鐢靛瓙鍥存爮鎶ヨ
diff --git a/ard-work/src/main/java/com/ruoyi/statistical/controller/StatisticalController.java b/ard-work/src/main/java/com/ruoyi/statistical/controller/StatisticalController.java
index 389646a..99d59ec 100644
--- a/ard-work/src/main/java/com/ruoyi/statistical/controller/StatisticalController.java
+++ b/ard-work/src/main/java/com/ruoyi/statistical/controller/StatisticalController.java
@@ -2,6 +2,7 @@
import com.ruoyi.statistical.param.ESParam;
import com.ruoyi.statistical.service.StatisticalService;
+import com.ruoyi.statistical.vo.NumVo;
import com.ruoyi.utils.result.Results;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -170,4 +171,25 @@
return Results.succeed(statisticalService.unit());
}
+ /**
+ * 鎶ヨ鏁伴噺
+ */
+ @ApiOperation("鎶ヨ鏁伴噺")
+ @GetMapping("alarm/num")
+ public Results num(){
+ NumVo numVo = new NumVo();
+ numVo.setStealelec(statisticalService.stealelecNum());
+ numVo.setCamera(statisticalService.cameraNum());
+ numVo.setMove(statisticalService.moveNum());
+ numVo.setFire(statisticalService.fireNum());
+ numVo.setExternal(statisticalService.externalNum());
+ numVo.setAccess(statisticalService.accessNum());
+ numVo.setApponekey(statisticalService.apponekeyNum());
+ numVo.setPump(statisticalService.pumpNum());
+ numVo.setWall(statisticalService.wallNum());
+ numVo.setDigitization(statisticalService.digitizationNum());
+ numVo.setTube(statisticalService.tubeNum());
+ return Results.succeed(numVo);
+ }
+
}
diff --git a/ard-work/src/main/java/com/ruoyi/statistical/service/StatisticalService.java b/ard-work/src/main/java/com/ruoyi/statistical/service/StatisticalService.java
index 03b884c..5d41e56 100644
--- a/ard-work/src/main/java/com/ruoyi/statistical/service/StatisticalService.java
+++ b/ard-work/src/main/java/com/ruoyi/statistical/service/StatisticalService.java
@@ -44,4 +44,16 @@
List<CountVo> tubeMonth(ESParam esParam);
UnitVo unit();
+
+ int stealelecNum();
+ int cameraNum();
+ int moveNum();
+ int fireNum();
+ int externalNum();
+ int accessNum();
+ int apponekeyNum();
+ int pumpNum();
+ int wallNum();
+ int digitizationNum();
+ int tubeNum();
}
diff --git a/ard-work/src/main/java/com/ruoyi/statistical/service/impl/StatisticalServiceImpl.java b/ard-work/src/main/java/com/ruoyi/statistical/service/impl/StatisticalServiceImpl.java
index 3410fd3..9c4d6a6 100644
--- a/ard-work/src/main/java/com/ruoyi/statistical/service/impl/StatisticalServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/statistical/service/impl/StatisticalServiceImpl.java
@@ -312,6 +312,61 @@
return unitVo;
}
+ @Override
+ public int stealelecNum() {
+ return stealelecMapper.selectCount(null);
+ }
+
+ @Override
+ public int cameraNum() {
+ return cameraMapper.selectCount(null);
+ }
+
+ @Override
+ public int moveNum() {
+ return moveMapper.selectCount(null);
+ }
+
+ @Override
+ public int fireNum() {
+ return fireMapper.selectCount(null);
+ }
+
+ @Override
+ public int externalNum() {
+ return externalMapper.selectCount(null);
+ }
+
+ @Override
+ public int accessNum() {
+ return accessMapper.selectCount(null);
+ }
+
+ @Override
+ public int apponekeyNum() {
+ return apponekeyMapper.selectCount(null);
+ }
+
+ @Override
+ public int pumpNum() {
+ return pumpMapper.selectCount(null);
+ }
+
+ @Override
+ public int wallNum() {
+ return wallMapper.selectCount(null);
+ }
+
+ @Override
+ public int digitizationNum() {
+ return digitization3Mapper.selectCount(null);
+ }
+
+ @Override
+ public int tubeNum() {
+ return tubeMapper.selectCount(null);
+ }
+
public List<CountVo> es(List<CountVo> list){
for (int i = 1; i <= 12 ; i++) {
String month;
diff --git a/ard-work/src/main/java/com/ruoyi/statistical/vo/NumVo.java b/ard-work/src/main/java/com/ruoyi/statistical/vo/NumVo.java
new file mode 100644
index 0000000..3bd3bd8
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/statistical/vo/NumVo.java
@@ -0,0 +1,19 @@
+package com.ruoyi.statistical.vo;
+
+import lombok.Data;
+
+@Data
+public class NumVo {
+ private int stealelec;
+ private int camera;
+ private int move;
+ private int fire;
+ private int external;
+ private int access;
+ private int apponekey;
+ private int pump;
+ private int wall;
+ private int digitization;
+ private int tube;
+
+}
--
Gitblit v1.9.3