forked from integrated_whb/integrated_whb
394 lines
14 KiB
Java
394 lines
14 KiB
Java
package com.zcloud.controller.positioning;
|
||
|
||
import com.alibaba.fastjson.JSONArray;
|
||
import com.alibaba.fastjson.JSONObject;
|
||
import com.zcloud.controller.base.BaseController;
|
||
import com.zcloud.entity.Page;
|
||
import com.zcloud.entity.PageData;
|
||
import com.zcloud.util.Jurisdiction;
|
||
import com.zcloud.util.PLSUtil;
|
||
import com.zcloud.util.ReturnMap;
|
||
import org.springframework.stereotype.Controller;
|
||
import org.springframework.web.bind.annotation.RequestMapping;
|
||
import org.springframework.web.bind.annotation.ResponseBody;
|
||
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
|
||
/**
|
||
* 说明:定位管理-告警管理
|
||
* 作者:wangxuan
|
||
* 官网:www.zcloudchina.com
|
||
*/
|
||
@Controller
|
||
@RequestMapping("/positAlarm")
|
||
public class PositAlarmController extends BaseController {
|
||
|
||
/**
|
||
* @Description: 告警数据 来自人员定位系统
|
||
* @Author: dearLin
|
||
* @Date: 2024/1/26/026 16:43
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/getAlArmDataList")
|
||
@ResponseBody
|
||
public ReturnMap getAlArmDataList(Page page) throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.getAlArmDataList(
|
||
Jurisdiction.getCORPINFO_ID(), page.getCurrentPage() + 1, page.getShowCount(), "", Integer.parseInt(pageData.getString("status")), Integer.parseInt(pageData.getString("eleType"))
|
||
);
|
||
if (body != null) {
|
||
List<JSONObject> list = body.getJSONArray("rows").toJavaList(JSONObject.class);
|
||
returnMap.put("varList", list);
|
||
page.setTotalResult(body.getIntValue("total"));
|
||
returnMap.put("page", page);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 处理告警
|
||
* @Author: dearLin
|
||
* @Date: 2024/1/26/026 16:43
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/alarmHandling")
|
||
@ResponseBody
|
||
public ReturnMap alarmHandling() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
JSONArray list = JSONObject.parseArray(pageData.getString("ids"));
|
||
pageData.put("ids", list);
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralPost("/region/alarm/alarmHandling", pageData, Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 一键处理
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/alarmHandlingAll")
|
||
@ResponseBody
|
||
public ReturnMap alarmHandlingAll() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralPost("/region/alarm/alarmHandlingAll", pageData, Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警区域列表
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/otherRegion/list")
|
||
@ResponseBody
|
||
public ReturnMap otherRegionList() 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")));
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警区域禁、起用
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/otherRegion/editStatus")
|
||
@ResponseBody
|
||
public ReturnMap editStatus() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralPut("/region/region", pageData, Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警区域删除
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/otherRegion/regionDelete")
|
||
@ResponseBody
|
||
public ReturnMap regionDelete() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralDelete("/region/region/", pageData.getString("DATA_IDS"), Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警区域单个详情
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/otherRegion/regionGoEdit")
|
||
@ResponseBody
|
||
public ReturnMap regionGoEdit() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralGetById("/region/region/", pageData.getString("id"), Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
/**
|
||
* @Description: 确认选点 /region/region/redrawTheArea
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 15:06
|
||
* @Param:
|
||
* @Return:
|
||
*/
|
||
@RequestMapping(value = "/otherRegion/save")
|
||
@ResponseBody
|
||
public ReturnMap otherRegionSave() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
JSONArray list = JSONObject.parseArray(pageData.getString("list"));
|
||
pageData.put("list", list);
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralPost("/region/region", pageData, Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
/**
|
||
* @Description: 确认选点 /region/region/redrawTheArea
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 15:06
|
||
* @Param:
|
||
* @Return:
|
||
*/
|
||
@RequestMapping(value = "/otherRegion/redrawTheArea")
|
||
@ResponseBody
|
||
public ReturnMap redrawTheArea() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
JSONArray list = JSONObject.parseArray(pageData.getString("list"));
|
||
pageData.put("list", list);
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralPost("/region/region/redrawTheArea", pageData, Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警区域所属图层
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/otherRegion/selectRegionTreeVo")
|
||
@ResponseBody
|
||
public ReturnMap selectRegionTreeVo() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GetGeneral("/region/region/selectRegionTreeVo", Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警区域修改
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/otherRegion/regionEdit")
|
||
@ResponseBody
|
||
public ReturnMap regionEdit() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
JSONArray list = JSONObject.parseArray(pageData.getString("list"));
|
||
pageData.put("list", list);
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralPut("/region/region", pageData, Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警区域配置列表
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/electronicFence/list")
|
||
@ResponseBody
|
||
public ReturnMap electronicFenceList() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralList("/region/electronicFence/list", pageData);
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警区域配置单个详情
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/electronicFenceGoEdit")
|
||
@ResponseBody
|
||
public ReturnMap electronicFenceGoEdit() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralGetById("/region/electronicFence/", pageData.getString("id"), Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警区域配置修改
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/electronicFenceEdit")
|
||
@ResponseBody
|
||
public ReturnMap electronicFenceEdit() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
JSONArray regGatherId = JSONObject.parseArray(pageData.getString("regGatherId"));
|
||
JSONArray gatherRegions = JSONObject.parseArray(pageData.getString("gatherRegions"));
|
||
JSONArray list = JSONObject.parseArray(pageData.getString("eleType"));
|
||
JSONArray eleDept = JSONObject.parseArray(pageData.getString("eleDept"));
|
||
JSONArray eleCrossed = JSONObject.parseArray(pageData.getString("eleCrossed"));
|
||
JSONArray regId = JSONObject.parseArray(pageData.getString("regId"));
|
||
JSONArray regions = JSONObject.parseArray(pageData.getString("regions"));
|
||
JSONArray regId1 = JSONObject.parseArray(pageData.getString("regId1"));
|
||
JSONArray doubles = JSONObject.parseArray(pageData.getString("doubles"));
|
||
pageData.put("regGatherId", regGatherId);
|
||
pageData.put("gatherRegions", gatherRegions);
|
||
pageData.put("eleType", list);
|
||
pageData.put("eleDept", eleDept);
|
||
pageData.put("eleCrossed", eleCrossed);
|
||
pageData.put("regions", regions);
|
||
pageData.put("regId", regId);
|
||
pageData.put("regId1", regId1);
|
||
pageData.put("doubles", doubles);
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralPut("/region/electronicFence/", pageData, Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警区域配置修改
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/electronicFenceSave")
|
||
@ResponseBody
|
||
public ReturnMap electronicFenceSave() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
JSONArray list = JSONObject.parseArray(pageData.getString("eleType"));
|
||
JSONArray eleDept = JSONObject.parseArray(pageData.getString("eleDept"));
|
||
JSONArray eleCrossed = JSONObject.parseArray(pageData.getString("eleCrossed"));
|
||
JSONArray regId = JSONObject.parseArray(pageData.getString("regId"));
|
||
JSONArray regions = JSONObject.parseArray(pageData.getString("regions"));
|
||
JSONArray regId1 = JSONObject.parseArray(pageData.getString("regId1"));
|
||
JSONArray doubles = JSONObject.parseArray(pageData.getString("doubles"));
|
||
pageData.put("eleType", list);
|
||
pageData.put("eleDept", eleDept);
|
||
pageData.put("eleCrossed", eleCrossed);
|
||
pageData.put("regions", regions);
|
||
pageData.put("regId", regId);
|
||
pageData.put("regId1", regId1);
|
||
pageData.put("doubles", doubles);
|
||
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralPost("/region/electronicFence/", pageData, Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警区域配置停用启用
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/electronicFenceStatus")
|
||
@ResponseBody
|
||
public ReturnMap electronicFenceStatus() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralPut("/region/electronicFence/", pageData, Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
|
||
/**
|
||
* @Description: 其他告警配置删除
|
||
* @Author: dearLin
|
||
* @Date: 2024/2/22/022 9:29
|
||
* @Param: [] []
|
||
* @Return: com.zcloud.util.ReturnMap
|
||
*/
|
||
@RequestMapping(value = "/electronicFenceDelete")
|
||
@ResponseBody
|
||
public ReturnMap electronicFenceDelete() throws Exception {
|
||
PageData pageData = this.getPageData();
|
||
ReturnMap returnMap = new ReturnMap();
|
||
JSONObject body = PLSUtil.GeneralDelete("/region/electronicFence/", pageData.getString("DATA_IDS"), Jurisdiction.getCORPINFO_ID());
|
||
if (body != null) {
|
||
returnMap.putAll(body);
|
||
}
|
||
return returnMap;
|
||
}
|
||
}
|