forked from integrated_whb/integrated_whb
80 lines
2.7 KiB
Java
80 lines
2.7 KiB
Java
|
package com.zcloud.controller.positioning;
|
|||
|
|
|||
|
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();
|
|||
|
ReturnMap returnMap = new ReturnMap();
|
|||
|
JSONObject body = PLSUtil.GeneralPost("/region/alarm/alarmHandling",pageData, Jurisdiction.getCORPINFO_ID());
|
|||
|
if (body != null) {
|
|||
|
returnMap.putAll(body);
|
|||
|
}
|
|||
|
return 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;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|