From 81decd363a1cd1e6af770380745d644f6931d13e Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Mon, 02 Aug 2021 09:34:59 +0800
Subject: [PATCH] screen-api                  修复获取五分钟数据空指针BUG

---
 screen-api/src/main/java/com/moral/api/service/impl/MonitorPointServiceImpl.java |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/screen-api/src/main/java/com/moral/api/service/impl/MonitorPointServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/MonitorPointServiceImpl.java
index 1b54467..9c85cc5 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/MonitorPointServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/MonitorPointServiceImpl.java
@@ -37,7 +37,7 @@
     DeviceService deviceService;
 
     @Override
-    public List<MonitorPoint> query(MonitorPointQueryForm form) {
+    public List<MonitorPoint> queryByOrgIdAndRegionCode(MonitorPointQueryForm form) {
         //������
         Integer organizationId = form.getOrganizationId();
         Integer regionCode = form.getRegionCode();
@@ -62,6 +62,18 @@
         }
         return monitorPoints;
     }
+
+    @Override
+    public List<MonitorPoint> queryStateControlStationByRegionCode(Integer regionCode) {
+        //���������������������
+        Organization stateControlStationOrganization = organizationService.getStateControlStation();
+        //���������������������������������������
+        QueryWrapper<MonitorPoint> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_delete",Constants.NOT_DELETE);
+        queryWrapper.eq("organization_id",stateControlStationOrganization.getId());
+        queryWrapper.eq(RegionCodeUtils.regionCodeConvertToName(regionCode),regionCode);
+        return monitorPointMapper.selectList(queryWrapper);
+    }
 }
 
 

--
Gitblit v1.8.0