Merge remote-tracking branch 'origin/master'
| | |
| | | @TableField("error_type") |
| | | private String errorType; |
| | | |
| | | @ApiModelProperty("生效时间") |
| | | @TableField("begin_create_time") |
| | | private Date beginCreateTime; |
| | | |
| | | @ApiModelProperty("失效时间") |
| | | @TableField("end_create_time") |
| | | private Date endCreateTime; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("审核时间") |
| | | private Date auditingTime; |
| | | |
| | | @ApiModelProperty("生效时间") |
| | | private Date beginCreateTime; |
| | | |
| | | @ApiModelProperty("失效时间") |
| | | private Date endCreateTime; |
| | | |
| | | @ApiModelProperty("审核类型") |
| | | private String reportType; |
| | | |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import com.ycl.platform.base.AbsQuery; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import jakarta.validation.constraints.NotBlank; |
| | |
| | | |
| | | private String reportType; |
| | | |
| | | private Date beginCreateTime; |
| | | |
| | | private Date endCreateTime; |
| | | |
| | | } |
| | | |
| | |
| | | import enumeration.BusinessType; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | { |
| | | return toAjax(tMonitorService.deleteTMonitorByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 获取视频设备统计数 |
| | | */ |
| | | @GetMapping("/getVideoCount/{cameraFunType}") |
| | | public AjaxResult getVideoCount(@PathVariable String cameraFunType) |
| | | { |
| | | return success(tMonitorService.getVideoCount(cameraFunType)); |
| | | } |
| | | |
| | | /** |
| | | * 获取异常恢复视频设备统计数 |
| | | */ |
| | | @GetMapping("/recoveryException") |
| | | public AjaxResult recoveryException() |
| | | { |
| | | return success(tMonitorService.recoveryException()); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 设备资产Mapper接口 |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteTMonitorByIds(Long[] ids); |
| | | |
| | | /** |
| | | * 获取视频统计 |
| | | * @param cameraFunType 类型 |
| | | * @return 统计数 |
| | | */ |
| | | Map<String, String> getVideoCount(String cameraFunType); |
| | | |
| | | Map<String, String> recoveryException(); |
| | | } |
| | |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 设备资产Service接口 |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteTMonitorById(Long id); |
| | | |
| | | /** |
| | | * 获取指定摄像头功能类型下的视频数量。 |
| | | * |
| | | * @param cameraFunType 摄像头功能类型,用于筛选视频。 |
| | | * @return 返回一个包含视频数量的Map对象,其中key为统计指标,value为对应功能类型下的统计数量。 |
| | | */ |
| | | Map<String, String> getVideoCount(String cameraFunType); |
| | | |
| | | Map<String, String> recoveryException(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Result add(ReportForm form) { |
| | | form.setPeopleId(1); |
| | | form.setUnitId(2); |
| | | Report entity = ReportForm.getEntityByForm(form, null); |
| | | if(baseMapper.insert(entity) > 0) { |
| | | return Result.ok("添加成功"); |
| | |
| | | |
| | | IPage<Report> page = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(StringUtils.isNotBlank(query.getReportType()), Report::getReportType, query.getReportType()) |
| | | .le(Objects.nonNull(query.getBeginCreateTime()), Report::getBeginCreateTime, query.getBeginCreateTime()) |
| | | .ge(Objects.nonNull(query.getEndCreateTime()), Report::getEndCreateTime, query.getEndCreateTime()) |
| | | .orderByDesc(Report::getCreateTime) |
| | | .page(PageUtil.getPage(query, Report.class)); |
| | | |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 设备资产Service业务层处理 |
| | |
| | | { |
| | | return tMonitorMapper.deleteTMonitorById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> getVideoCount(String cameraFunType) { |
| | | return tMonitorMapper.getVideoCount(cameraFunType); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, String> recoveryException() { |
| | | return tMonitorMapper.recoveryException(); |
| | | } |
| | | } |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="getVideoCount" resultType="java.util.Map"> |
| | | SELECT count(*) AS totalPosts, |
| | | IFNULL(SUM(IF(on_state = 1, 1, 0)), 0) AS totalMembers, |
| | | IFNULL(SUM(IF(on_state = 2, 1, 0)), 0) AS postsPercentage, |
| | | IFNULL(SUM(IF(default_order = 1, 1, 0)), 0) AS totalViews, |
| | | -1 as noStore, |
| | | -1 as partStore, |
| | | IFNULL(ROUND(SUM(IF(on_state = 1, 1, 0)) / count(*) * 100, 2), 0) as viewsPercentage, |
| | | -1 as totalFace, |
| | | -1 as totalCar |
| | | FROM t_monitor |
| | | WHERE camera_fun_type like concat('%', #{cameraFunType}, '%') |
| | | </select> |
| | | |
| | | <select id="recoveryException" resultType="java.util.Map"> |
| | | SELECT count(*) AS totalPosts, |
| | | IFNULL(SUM(IF(on_state = 1, 1, 0)), 0) AS totalMembers, |
| | | IFNULL(SUM(IF(on_state = 2, 1, 0)), 0) AS postsPercentage, |
| | | IFNULL(SUM(IF(default_order = 1, 1, 0)), 0) AS totalViews, |
| | | IFNULL(ROUND(SUM(IF(on_state = 1, 1, 0)) / count(*) * 100, 2), 0) as viewsPercentage |
| | | FROM t_monitor |
| | | WHERE recovery = 1 |
| | | </select> |
| | | </mapper> |