From af92ca1ba7426b2560b0841c95be0fe7b149559e Mon Sep 17 00:00:00 2001 From: dearlin <1261008090@qq.com> Date: Mon, 26 Feb 2024 09:39:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=AE=9A=E4=BD=8D=E4=B8=AD?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=AF=B9=E6=8E=A5=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eightwork/AppEightWorkController.java | 2 +- .../controller/mapApi/MapController.java | 2 +- .../positioning/MapSettingController.java | 6 +- .../positioning/PositAlarmController.java | 90 ++++++++++++++++++- .../positioning/UserCardController.java | 2 +- .../risk/IdentificationPartsController.java | 2 +- src/main/java/com/zcloud/util/PLSUtil.java | 4 +- 7 files changed, 97 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java b/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java index 0cb2006..8afc65b 100644 --- a/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java +++ b/src/main/java/com/zcloud/controller/eightwork/AppEightWorkController.java @@ -148,7 +148,7 @@ public class AppEightWorkController extends BaseController { ReturnMap returnMap = new ReturnMap(); PageData pd = new PageData(); pd = this.getPageData(); - JSONObject body = PLSUtil.getRyRegionList(pd.getString("CORPINFO_ID"),"",1,99999); + JSONObject body = PLSUtil.getRyRegionList(pd.getString("CORPINFO_ID"),"",1,99999,0); if (body != null) { List list = body.getJSONArray("rows").toJavaList(JSONObject.class); diff --git a/src/main/java/com/zcloud/controller/mapApi/MapController.java b/src/main/java/com/zcloud/controller/mapApi/MapController.java index 48ac4b6..3cf3e9c 100644 --- a/src/main/java/com/zcloud/controller/mapApi/MapController.java +++ b/src/main/java/com/zcloud/controller/mapApi/MapController.java @@ -129,7 +129,7 @@ public class MapController extends BaseController { @RequestMapping(value = "/getFenceList") @ResponseBody public ReturnMap getFenceList() throws Exception { - return ReturnMap.ok().put("data", PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(),"",1,999999)); + return ReturnMap.ok().put("data", PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(),"",1,999999,0)); } /** diff --git a/src/main/java/com/zcloud/controller/positioning/MapSettingController.java b/src/main/java/com/zcloud/controller/positioning/MapSettingController.java index 875cf28..7cdf619 100644 --- a/src/main/java/com/zcloud/controller/positioning/MapSettingController.java +++ b/src/main/java/com/zcloud/controller/positioning/MapSettingController.java @@ -35,7 +35,7 @@ public class MapSettingController extends BaseController { PageData pageData = this.getPageData(); ReturnMap returnMap = new ReturnMap(); JSONObject body = PLSUtil.getLayerList( - Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("KEYWORDS")); + Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("str")); if (body != null) { List list = body.getJSONArray("rows").toJavaList(JSONObject.class); returnMap.put("varList", list); @@ -130,7 +130,9 @@ public class MapSettingController extends BaseController { @ResponseBody public ReturnMap getFenceList() throws Exception { PageData pageData = this.getPageData(); - return ReturnMap.ok().put("data", PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("KEYWORDS"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")))); + return ReturnMap.ok().put("data", PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("str"), + Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), + Integer.parseInt(pageData.getString("type")))); } diff --git a/src/main/java/com/zcloud/controller/positioning/PositAlarmController.java b/src/main/java/com/zcloud/controller/positioning/PositAlarmController.java index ed4f4d3..3915bc4 100644 --- a/src/main/java/com/zcloud/controller/positioning/PositAlarmController.java +++ b/src/main/java/com/zcloud/controller/positioning/PositAlarmController.java @@ -97,12 +97,14 @@ public class PositAlarmController extends BaseController { */ @RequestMapping(value = "/otherRegion/list") @ResponseBody - public ReturnMap otherRegionList() throws Exception { + public ReturnMap otherRegionList(Page page) throws Exception { PageData pageData = this.getPageData(); ReturnMap returnMap = new ReturnMap(); - JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("KEYWORDS"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount"))); + JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("str"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")),Integer.parseInt(pageData.getString("type"))); if (body != null) { returnMap.putAll(body); + page.setTotalResult(body.getIntValue("total")); + returnMap.put("page", page); } return returnMap; } @@ -253,12 +255,14 @@ public class PositAlarmController extends BaseController { */ @RequestMapping(value = "/electronicFence/list") @ResponseBody - public ReturnMap electronicFenceList() throws Exception { + public ReturnMap electronicFenceList(Page page) throws Exception { PageData pageData = this.getPageData(); ReturnMap returnMap = new ReturnMap(); JSONObject body = PLSUtil.GeneralList("/region/electronicFence/list", pageData); if (body != null) { returnMap.putAll(body); + page.setTotalResult(body.getIntValue("total")); + returnMap.put("page", page); } return returnMap; } @@ -337,6 +341,7 @@ public class PositAlarmController extends BaseController { JSONArray regions = JSONObject.parseArray(pageData.getString("regions")); JSONArray regId1 = JSONObject.parseArray(pageData.getString("regId1")); JSONArray doubles = JSONObject.parseArray(pageData.getString("doubles")); + JSONArray regGatherId = JSONObject.parseArray(pageData.getString("regGatherId")); pageData.put("eleType", list); pageData.put("eleDept", eleDept); pageData.put("eleCrossed", eleCrossed); @@ -344,6 +349,7 @@ public class PositAlarmController extends BaseController { pageData.put("regId", regId); pageData.put("regId1", regId1); pageData.put("doubles", doubles); + pageData.put("regGatherId", regGatherId); ReturnMap returnMap = new ReturnMap(); JSONObject body = PLSUtil.GeneralPost("/region/electronicFence/", pageData, Jurisdiction.getCORPINFO_ID()); @@ -390,4 +396,82 @@ public class PositAlarmController extends BaseController { } return returnMap; } + + + /* + * 聚集告警记录 + * */ + + @RequestMapping(value = "/getAlarmRecordList") + @ResponseBody + public ReturnMap getAlarmRecordList(Page page) throws Exception { + PageData pageData = this.getPageData(); + ReturnMap returnMap = new ReturnMap(); + // /old/gatherAlarms/regAlarmGatherList?pageNum=1&pageSize=10&status=1 + JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/regAlarmGatherList", pageData); + if (body != null) { + returnMap.putAll(body); + page.setTotalResult(body.getIntValue("total")); + returnMap.put("page", page); + } + return returnMap; + } + + /* 聚集概览 */ + /** + * @Description: 聚集告警趋势统计 + * @Author: dearLin + * @Date: 2024/2/26/026 9:20 + * @Param: [com.zcloud.entity.Page] [page] + * @Return: com.zcloud.util.ReturnMap + */ + @RequestMapping(value = "/aggregateAlarmTrends") + @ResponseBody + public ReturnMap aggregateAlarmTrends() throws Exception { + PageData pageData = this.getPageData(); + ReturnMap returnMap = new ReturnMap(); + // /old/gatherAlarms/aggregateAlarmTrends?type=2&time=2023-12-18 + JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/aggregateAlarmTrends", pageData); + if (body != null) { + returnMap.putAll(body); + } + return returnMap; + } + /** + * @Description: 根据告警区域进行聚集数据统计 + * @Author: dearLin + * @Date: 2024/2/26/026 9:20 + * @Param: [com.zcloud.entity.Page] [page] + * @Return: com.zcloud.util.ReturnMap + */ + @RequestMapping(value = "/aggregateDataStatisticsByGroup") + @ResponseBody + public ReturnMap aggregateDataStatisticsByGroup() throws Exception { + PageData pageData = this.getPageData(); + ReturnMap returnMap = new ReturnMap(); + JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/aggregateDataStatisticsByGroup", pageData); + if (body != null) { + returnMap.putAll(body); + } + return returnMap; + } + + /** + * @Description: 根据告警等级进行聚集数据统计 + * @Author: dearLin + * @Date: 2024/2/26/026 9:20 + * @Param: [com.zcloud.entity.Page] [page] + * @Return: com.zcloud.util.ReturnMap + */ + @RequestMapping(value = "/aggregateDataStatistics") + @ResponseBody + public ReturnMap aggregateDataStatistics() throws Exception { + PageData pageData = this.getPageData(); + ReturnMap returnMap = new ReturnMap(); + JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/aggregateDataStatistics", pageData); + if (body != null) { + returnMap.putAll(body); + } + return returnMap; + } } diff --git a/src/main/java/com/zcloud/controller/positioning/UserCardController.java b/src/main/java/com/zcloud/controller/positioning/UserCardController.java index 79f1aa6..5784cf8 100644 --- a/src/main/java/com/zcloud/controller/positioning/UserCardController.java +++ b/src/main/java/com/zcloud/controller/positioning/UserCardController.java @@ -36,7 +36,7 @@ public class UserCardController extends BaseController { ReturnMap returnMap = new ReturnMap(); page.setPd(pageData); JSONObject body = PLSUtil.getUserCardDataList( - Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("KEYWORDS")); + Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("str")); if (body != null) { List list = body.getJSONArray("rows").toJavaList(JSONObject.class); returnMap.put("varList", list); diff --git a/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java b/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java index b4cfbd5..f21c815 100644 --- a/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java +++ b/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java @@ -237,7 +237,7 @@ public class IdentificationPartsController extends BaseController { PageData pageData = this.getPageData(); String KEYWORDS = (String) pageData.getOrDefault("KEYWORDS", ""); - JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(),KEYWORDS,Integer.parseInt(pageData.getString("currentPage")),Integer.parseInt(pageData.getString("showCount"))); + JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(),KEYWORDS,Integer.parseInt(pageData.getString("currentPage")),Integer.parseInt(pageData.getString("showCount")),0); if (body != null) { List list = body.getJSONArray("rows").toJavaList(JSONObject.class); diff --git a/src/main/java/com/zcloud/util/PLSUtil.java b/src/main/java/com/zcloud/util/PLSUtil.java index 2f4f43a..58d05e6 100644 --- a/src/main/java/com/zcloud/util/PLSUtil.java +++ b/src/main/java/com/zcloud/util/PLSUtil.java @@ -302,11 +302,11 @@ public class PLSUtil { * @Param: [java.lang.String, java.lang.Integer, java.lang.Integer] [keywords, currentPage, showCount] * @Return: com.alibaba.fastjson.JSONObject */ - public static JSONObject getRyRegionList(String CORPINFO_ID, String keywords, Integer currentPage, Integer showCount) throws Exception { + public static JSONObject getRyRegionList(String CORPINFO_ID, String keywords, Integer currentPage, Integer showCount,Integer type) throws Exception { HttpHeaders headers = new HttpHeaders(); String url = "/region/region/list?pageNum=" + currentPage + - "&pageSize=" + showCount + "&type=0" + + "&pageSize=" + showCount + "&type=" +type+ "&str="; if (Tools.notEmpty(keywords)) url += keywords; headers.set("Authorization", getToken(CORPINFO_ID));