监控覆盖
This commit is contained in:
parent
b81e376eda
commit
99f3990912
|
|
@ -8,10 +8,12 @@ import com.sercurityControl.proteam.supplement.service.MonitoringCoverageService
|
|||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @className:MonitoringCoverageController
|
||||
|
|
@ -77,4 +79,11 @@ public class MonitoringCoverageController {
|
|||
AjaxResult res = service.getSpeedNum(dto);
|
||||
return res;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "监控活跃度分析-列表")
|
||||
@PostMapping(value = "getMonitoringHydList")
|
||||
@SysLog(title = "监控活跃度分析详情", model = "监控覆盖->监控活跃度分析", operaType = OperaType.QUERY, details = "监控活跃度分析详情",logType = 1)
|
||||
public Map<String, Object> getMonitoringHydList(ParamsDto dto) {
|
||||
return service.getMonitoringHydList(dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,24 @@ public class ParamsDto {
|
|||
private String startDay;
|
||||
/**结束日期*/
|
||||
private String endDay;
|
||||
/**班组长*/
|
||||
private String workManager;
|
||||
/**班组名称*/
|
||||
private String teamName;
|
||||
/**建管单位*/
|
||||
private String org;
|
||||
/**名称*/
|
||||
private String name;
|
||||
|
||||
/**1.监控活跃度分析 2.监控覆盖度分析 3.下行观看分析*/
|
||||
private int type;
|
||||
|
||||
/**1.速率正常 2.速率异常*/
|
||||
private int operType;
|
||||
|
||||
/**1.球机正常 2.异常掉线 3.画面不清晰 4.不流畅 5.信号弱 6.人为遮挡*/
|
||||
private String errorType;
|
||||
|
||||
|
||||
private int page;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
package com.sercurityControl.proteam.supplement.domain.vo;
|
||||
|
||||
import com.securityControl.common.core.annotation.Sensitive;
|
||||
import com.securityControl.common.core.enums.SensitizedType;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @className:MonitoringDetailVo
|
||||
* @author:cwchen
|
||||
* @date:2024-12-11-16:42
|
||||
* @version:1.0
|
||||
* @description:监控覆盖详情-vo
|
||||
*/
|
||||
@Data
|
||||
public class MonitoringDetailVo {
|
||||
private int num;
|
||||
/**id*/
|
||||
private String id;
|
||||
/**球机编号*/
|
||||
private String name;
|
||||
/**工程名称*/
|
||||
private String proName;
|
||||
/**班组长*/
|
||||
private String workManager;
|
||||
/**班组长手机号*/
|
||||
@Sensitive(SensitizedType.MOBILE_PHONE)
|
||||
private String workManagerPhone;
|
||||
/**风险等级*/
|
||||
private String riskLevel;
|
||||
/**建管单位*/
|
||||
private String org;
|
||||
/**班组名称*/
|
||||
private String teamName;
|
||||
/**经度*/
|
||||
private String lon;
|
||||
/**纬度*/
|
||||
private String lat;
|
||||
/**初次运行日期*/
|
||||
private String time;
|
||||
/**运行时长 时分秒*/
|
||||
private String timeValue;
|
||||
/**运行时长 秒*/
|
||||
private long timeValue2;
|
||||
/**观看次数*/
|
||||
private int watchTime;
|
||||
/**异常类型*/
|
||||
private String errorName;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.sercurityControl.proteam.supplement.mapper;
|
|||
|
||||
import com.sercurityControl.proteam.supplement.domain.dto.ParamsDto;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.MonitoringCoverageVo;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.MonitoringDetailVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -77,4 +78,13 @@ public interface MonitoringCoverageMapper {
|
|||
* @date 2024/12/11 14:53
|
||||
*/
|
||||
List<MonitoringCoverageVo> getSpeedNum(ParamsDto dto);
|
||||
|
||||
/**
|
||||
* 监控活跃度分析详情
|
||||
* @param dto
|
||||
* @return List<MonitoringDetailVo>
|
||||
* @author cwchen
|
||||
* @date 2024/12/11 16:45
|
||||
*/
|
||||
List<MonitoringDetailVo> getMonitoringHydList(ParamsDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.sercurityControl.proteam.supplement.service;
|
|||
import com.securityControl.common.core.web.domain.AjaxResult;
|
||||
import com.sercurityControl.proteam.supplement.domain.dto.ParamsDto;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @className:MonitoringCoverageService
|
||||
* @author:cwchen
|
||||
|
|
@ -73,4 +75,13 @@ public interface MonitoringCoverageService {
|
|||
* @date 2024/12/11 14:53
|
||||
*/
|
||||
AjaxResult getSpeedNum(ParamsDto dto);
|
||||
|
||||
/**
|
||||
* 监控活跃度分析详情
|
||||
* @param dto
|
||||
* @return Map<String,Object>
|
||||
* @author cwchen
|
||||
* @date 2024/12/11 16:41
|
||||
*/
|
||||
Map<String, Object> getMonitoringHydList(ParamsDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
package com.sercurityControl.proteam.supplement.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.securityControl.common.core.constant.HttpStatus;
|
||||
import com.securityControl.common.core.web.domain.AjaxResult;
|
||||
import com.sercurityControl.proteam.supplement.domain.dto.ParamsDto;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.MonitoringCoverageVo;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.MonitoringDetailVo;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.ProVioVo;
|
||||
import com.sercurityControl.proteam.supplement.mapper.MonitoringCoverageMapper;
|
||||
import com.sercurityControl.proteam.supplement.service.MonitoringCoverageService;
|
||||
import com.sercurityControl.proteam.util.DateTimeHelper;
|
||||
|
|
@ -11,7 +16,9 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @className:MonitoringCoverageServiceImpl
|
||||
|
|
@ -133,4 +140,35 @@ public class MonitoringCoverageServiceImpl implements MonitoringCoverageService
|
|||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getMonitoringHydList(ParamsDto dto) {
|
||||
PageHelper.startPage(dto.getPage(), dto.getLimit());
|
||||
Map<String, Object> map = new HashMap<>(16);
|
||||
List<MonitoringDetailVo> list = null;
|
||||
try {
|
||||
list = mapper.getMonitoringHydList(dto);
|
||||
int num = 0;
|
||||
Date endDate = new Date();
|
||||
for (MonitoringDetailVo vo : list) {
|
||||
num ++;
|
||||
vo.setNum(num);
|
||||
Date runTime = DateTimeHelper.parse(vo.getTime(), "yyyy-MM-dd HH:mm:ss");
|
||||
String gapTime = DateTimeHelper.getGapTime(endDate, runTime);
|
||||
long timeValue = DateTimeHelper.getGapTime2(endDate, runTime);
|
||||
vo.setTimeValue(gapTime);
|
||||
vo.setTimeValue2(timeValue);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
PageInfo<MonitoringDetailVo> pageInfo = new PageInfo<>(list);
|
||||
map.put("code", HttpStatus.SUCCESS);
|
||||
map.put("msg", "获取数据成功");
|
||||
map.put("count", pageInfo.getTotal());
|
||||
map.put("curr", dto.getPage());
|
||||
map.put("limit", dto.getLimit());
|
||||
map.put("data", pageInfo.getList());
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
<!--监控覆盖-活跃度分析-->
|
||||
<select id="getHyd" resultType="com.sercurityControl.proteam.supplement.domain.vo.MonitoringCoverageVo">
|
||||
SELECT td.mac_id AS name,
|
||||
SELECT jjmc.class_id AS id,
|
||||
td.mac_id AS name,
|
||||
DATE_FORMAT(jjmc.run_time,'%Y-%m-%d %H:%i:%s') AS runTime
|
||||
FROM jj_monitoring_coverage jjmc
|
||||
LEFT JOIN t_device td ON jjmc.camera_no = td.t_code
|
||||
|
|
@ -13,7 +14,8 @@
|
|||
<!--监控覆盖-覆盖度分析-->
|
||||
<select id="getFgd" resultType="com.sercurityControl.proteam.supplement.domain.vo.MonitoringCoverageVo">
|
||||
SELECT so.city_name AS name,
|
||||
a.num
|
||||
a.num,
|
||||
so.org_id AS id
|
||||
FROM sys_org so
|
||||
LEFT JOIN (
|
||||
SELECT jjcm.build_unit_code AS org,
|
||||
|
|
@ -47,7 +49,8 @@
|
|||
<select id="getWatchNum"
|
||||
resultType="com.sercurityControl.proteam.supplement.domain.vo.MonitoringCoverageVo">
|
||||
SELECT td.mac_id AS name,
|
||||
jjmc.watch_time AS watchTime
|
||||
jjmc.watch_time AS watchTime,
|
||||
jjmc.class_id AS id
|
||||
FROM jj_monitoring_coverage jjmc
|
||||
LEFT JOIN t_device td ON jjmc.camera_no = td.t_code
|
||||
ORDER BY jjmc.watch_time DESC
|
||||
|
|
@ -70,4 +73,71 @@
|
|||
COUNT(IF(jjmc.error_type != '7',1,null)) AS normalNum
|
||||
FROM jj_monitoring_coverage jjmc
|
||||
</select>
|
||||
<!--监控活跃度分析、监控覆盖度分析、下行观看分析详情-->
|
||||
<select id="getMonitoringHydList"
|
||||
resultType="com.sercurityControl.proteam.supplement.domain.vo.MonitoringDetailVo">
|
||||
SELECT jjcm.id AS id,
|
||||
jjcm.bidding_section_name AS proName,
|
||||
jjcm.re_assessment_risk_level AS riskLevel,
|
||||
jjcmi.work_manage AS workManager,
|
||||
jjcmi.work_manage_phone AS workManagerPhone,
|
||||
jjcm.tool_box_talk_longitude AS lon,
|
||||
jjcm.tool_box_talk_Latitude AS lat,
|
||||
so.city_name AS org,
|
||||
jjcmi.team_name AS teamName,
|
||||
td.mac_id AS name,
|
||||
DATE_FORMAT(jjmc.run_time,'%Y-%m-%d %H:%i:%s') AS time,
|
||||
jjmc.watch_time AS watchTime,
|
||||
CASE jjmc.error_type
|
||||
WHEN '1' THEN '球机正常'
|
||||
WHEN '2' THEN '异常掉线'
|
||||
WHEN '3' THEN '画面不清晰'
|
||||
WHEN '4' THEN '不流畅'
|
||||
WHEN '5' THEN '信号弱'
|
||||
WHEN '6' THEN '人为遮挡'
|
||||
END AS errorName
|
||||
FROM jj_monitoring_coverage jjmc
|
||||
LEFT JOIN t_device td ON jjmc.camera_no = td.t_code
|
||||
LEFT JOIN jj_class_meetting jjcm ON jjmc.class_id = jjcm.id
|
||||
LEFT JOIN jj_class_metting_info jjcmi ON jjcm.id = jjcmi.class_id
|
||||
LEFT JOIN sys_org so ON jjcm.build_unit_code = so.org_id
|
||||
<where>
|
||||
<if test="id!=null and id!=''">
|
||||
AND jjmc.class_id = #{id}
|
||||
</if>
|
||||
<if test="proName!=null and proName!=''">
|
||||
AND INSTR(jjcm.bidding_section_name,#{proName}) > 0
|
||||
</if>
|
||||
<if test="org!=null and org!=''">
|
||||
AND jjcm.build_unit_code = #{org}
|
||||
</if>
|
||||
<if test="riskLevel!=null and riskLevel!=''">
|
||||
AND jjcm.re_assessment_risk_level = #{riskLevel}
|
||||
</if>
|
||||
<if test="teamName!=null and teamName!=''">
|
||||
AND INSTR(jjcmi.team_name,#{teamName}) > 0
|
||||
</if>
|
||||
<if test="workManager!=null and workManager!=''">
|
||||
AND INSTR(jjcmi.work_manage,#{workManager}) > 0
|
||||
</if>
|
||||
<if test="operType == 1">
|
||||
AND jjmc.error_type NOT IN ('7')
|
||||
</if>
|
||||
<if test="operType == 2">
|
||||
AND jjmc.error_type = '7'
|
||||
</if>
|
||||
<if test="errorType!='' and errorType!=null">
|
||||
AND jjmc.error_type = #{errorType}
|
||||
</if>
|
||||
<if test="errorType==null or errorType == ''">
|
||||
AND jjmc.error_type NOT IN ('7')
|
||||
</if>
|
||||
</where>
|
||||
<if test="type == 1">
|
||||
ORDER BY jjmc.run_time
|
||||
</if>
|
||||
<if test="type == 3">
|
||||
ORDER BY jjmc.watch_time DESC
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue