forked from integrated_whb/integrated_whb
ai bajing
parent
5032c3e5c1
commit
99a4514737
|
@ -0,0 +1,64 @@
|
|||
package com.zcloud.controller.mapApi;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.PLSUtil;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/map")
|
||||
public class MapController extends BaseController {
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 人员类型统计 告警类型统计
|
||||
* @Author: dearLin
|
||||
* @Date: 2024/1/26/026 16:42
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
@RequestMapping(value = "/getPersonnelTypeCount")
|
||||
public ReturnMap getPersonnelTypeCount() throws Exception {
|
||||
PageData pageData = getPageData();
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
int userCount = usersService.getUserCount(pageData);
|
||||
return ReturnMap.ok().put("userCount", userCount);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 告警类型统计 来自人员定位系统
|
||||
* @Author: dearLin
|
||||
* @Date: 2024/1/26/026 16:43
|
||||
* @Param: [] []
|
||||
* @Return: com.zcloud.util.ReturnMap
|
||||
*/
|
||||
@RequestMapping(value = "/getAlarmTypeCount")
|
||||
public ReturnMap getAlarmTypeCount() throws Exception {
|
||||
return ReturnMap.ok().put("data", PLSUtil.getAlarmTypeCount(Jurisdiction.getCORPINFO_ID()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 人员定位情况 来自人员定位系统
|
||||
* @Author: dearLin
|
||||
* @Date: 2024/1/26/026 16:43
|
||||
* @Param: [] []
|
||||
* @Return: com.zcloud.util.ReturnMap
|
||||
*/
|
||||
@RequestMapping(value = "/getPersonnelPositioningCount")
|
||||
public ReturnMap getPersonnelPositioningCount() throws Exception {
|
||||
// return ReturnMap.ok().put("data", PLSUtil.getPersonnelPositioningCount(Jurisdiction.getCORPINFO_ID()));
|
||||
return ReturnMap.error();
|
||||
}
|
||||
}
|
|
@ -31,6 +31,19 @@ public class PLSUtil {
|
|||
public static HashMap<String, String> BAKEADDR = new HashMap<>();
|
||||
private static RestTemplate restTemplate;
|
||||
|
||||
public static Object getPersonnelPositioningCount(String CORPINFO_ID, Integer currentPage, Integer showCount) throws Exception {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("Authorization", getToken(CORPINFO_ID));
|
||||
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
|
||||
ResponseEntity<JSONObject> exchange = restTemplate.exchange(
|
||||
PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/deploy/card/list?sortThePowerLevel=1&pageNum=" +
|
||||
currentPage +
|
||||
"&pageSize=" + showCount,
|
||||
HttpMethod.GET, httpEntity,
|
||||
JSONObject.class);
|
||||
return exchange.getBody();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setCorpplsinfoService(CorpPlsInfoService corpplsinfoServicebean, UsersService usersServicebean, RestTemplate restTemplatebean) {
|
||||
corpplsinfoService = corpplsinfoServicebean;
|
||||
|
@ -38,6 +51,25 @@ public class PLSUtil {
|
|||
restTemplate = restTemplatebean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 告警类型统计
|
||||
* @Author: dearLin
|
||||
* @Date: 2024/1/25/025 14:37
|
||||
* @Param: [java.lang.String, java.lang.Integer, java.lang.Integer] [keywords, currentPage, showCount]
|
||||
* @Return: com.alibaba.fastjson.JSONObject
|
||||
*/
|
||||
public static JSONObject getAlarmTypeCount(String CORPINFO_ID) throws Exception {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("Authorization", getToken(CORPINFO_ID));
|
||||
HttpEntity<JSONObject> httpEntity = new HttpEntity<>(headers);
|
||||
ResponseEntity<JSONObject> exchange = restTemplate.exchange(
|
||||
PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/region/alarm/alarmStatistics?type=day",
|
||||
HttpMethod.GET, httpEntity,
|
||||
JSONObject.class);
|
||||
return exchange.getBody();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 添加摄像头
|
||||
* @Author: dearLin
|
||||
|
@ -72,6 +104,7 @@ public class PLSUtil {
|
|||
JSONObject.class);
|
||||
return exchange.getBody();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 修改摄像头
|
||||
* @Author: dearLin
|
||||
|
@ -93,6 +126,7 @@ public class PLSUtil {
|
|||
JSONObject.class, uriVariables);
|
||||
return exchange.getBody();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 删除摄像头
|
||||
* @Author: dearLin
|
||||
|
|
|
@ -135,8 +135,11 @@
|
|||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and c.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.ISTRUE != null and pd.ISTRUE !=''" >
|
||||
and f.ISTRUE = #{pd.ISTRUE}
|
||||
</if>
|
||||
<if test="pd.STATUS != null and pd.STATUS !=''" >
|
||||
and f.STATUS = #{STATUS}
|
||||
and f.STATUS = #{pd.STATUS}
|
||||
</if>
|
||||
<if test="pd.START_TIME != null and pd.START_TIME !=''" >
|
||||
and DATE_FORMAT(f.CREATTIME,'%Y-%m-%d %H:%i')
|
||||
|
|
Loading…
Reference in New Issue