通报list修改以及大屏管理数据统计新增

dongdingding
董丁丁 2 years ago
parent 70b2f7ec80
commit 89d152df69

@ -3,6 +3,7 @@ package com.ruoyi.screen.controller;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.screen.domain.response.ZongzhiActionResponse;
import com.ruoyi.screen.domain.response.ZongzhiNetworkReportResponse;
import com.ruoyi.screen.domain.response.ZongzhiReportByYearResponse;
import com.ruoyi.screen.domain.response.ZongzhiWorkDynamicsResponse;
import com.ruoyi.screen.service.ZongzhiScreenManageService;
import io.swagger.annotations.Api;
@ -59,4 +60,16 @@ public class ZongzhiScreenManageController {
return AjaxResult.success(zongzhiScreenManageService.getaction());
}
/**
*
*/
@ApiOperation(value = "举报时间年度分类统计", response = ZongzhiReportByYearResponse.class)
@GetMapping("/reportbyyear")
private AjaxResult getReportByYear() {
return AjaxResult.success(zongzhiScreenManageService.getReportByYear());
}
}

@ -1,9 +1,12 @@
package com.ruoyi.screen.domain.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
*
*/
@ -16,8 +19,15 @@ public class ZongzhiActionResponse {
private Integer count;
@ApiModelProperty(value = "攻击源IP地址区域")
private String attackIpRegion;
@ApiModelProperty(value = "发布时间")
@JsonFormat(pattern = "MM")
private Date zhuanxiangTime;
@ApiModelProperty(value = "百分比")
private double pt;
}

@ -0,0 +1,33 @@
package com.ruoyi.screen.domain.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
*
*/
@Data
@ApiModel("大屏数据请朗专项行动数据统计响应类")
public class ZongzhiReportByYearResponse {
@ApiModelProperty(value = "数量")
private Integer count;
@ApiModelProperty(value = "发布时间")
@JsonFormat(pattern = "MM")
private Date zhuanxiangTime;
@ApiModelProperty(value = "百分比")
private double pt;
}

@ -2,6 +2,7 @@ package com.ruoyi.screen.mapper;
import com.ruoyi.screen.domain.response.ZongzhiActionResponse;
import com.ruoyi.screen.domain.response.ZongzhiNetworkReportResponse;
import com.ruoyi.screen.domain.response.ZongzhiReportByYearResponse;
import com.ruoyi.screen.domain.response.ZongzhiWorkDynamicsResponse;
import java.util.List;
@ -31,4 +32,10 @@ public interface ZongzhiScreenManageMapper {
*/
public List<ZongzhiActionResponse> getaction();
/**
*
*/
public List<ZongzhiReportByYearResponse> getReportByYear();
}

@ -2,6 +2,7 @@ package com.ruoyi.screen.service;
import com.ruoyi.screen.domain.response.ZongzhiActionResponse;
import com.ruoyi.screen.domain.response.ZongzhiNetworkReportResponse;
import com.ruoyi.screen.domain.response.ZongzhiReportByYearResponse;
import com.ruoyi.screen.domain.response.ZongzhiWorkDynamicsResponse;
import java.util.List;
@ -31,4 +32,13 @@ public interface ZongzhiScreenManageService {
*
*/
public List<ZongzhiActionResponse> getaction();
/**
*
*/
public List<ZongzhiReportByYearResponse> getReportByYear();
}

@ -2,6 +2,7 @@ package com.ruoyi.screen.service.impl;
import com.ruoyi.screen.domain.response.ZongzhiActionResponse;
import com.ruoyi.screen.domain.response.ZongzhiNetworkReportResponse;
import com.ruoyi.screen.domain.response.ZongzhiReportByYearResponse;
import com.ruoyi.screen.domain.response.ZongzhiWorkDynamicsResponse;
import com.ruoyi.screen.mapper.ZongzhiScreenManageMapper;
import com.ruoyi.screen.service.ZongzhiScreenManageService;
@ -34,5 +35,10 @@ public class ZongzhiScreenManageServiceImpl implements ZongzhiScreenManageServi
return zongzhiScreenManageMapper.getaction();
}
@Override
public List<ZongzhiReportByYearResponse> getReportByYear() {
return zongzhiScreenManageMapper.getReportByYear();
}
}

@ -53,7 +53,7 @@ public class TcTb extends BaseEntity {
*/
@Excel(name = "处置状态 1:已处置 2:为处置")
@ApiModelProperty(value = "处置状态 1:已处置 2:为处置")
private int state;
private Integer state;
@ -83,7 +83,7 @@ public class TcTb extends BaseEntity {
*/
@Excel(name = "通报类型:1.属地通报 2.部门通报")
@ApiModelProperty(value = "通报类型:1.属地通报 2.部门通报")
private int tbType;
private Integer tbType;
/**
*

@ -16,7 +16,11 @@
</select>
<select id="getaction" resultType="com.ruoyi.screen.domain.response.ZongzhiActionResponse">
select count(*) as count, zhuanxiang_time as zhuanxiangTime ,ROUND(count(*) * 100.0/ sum(count(*)) OVER (), 1 ) as pt
from tc_qinglang_zhuanxiang
GROUP BY zhuanxiang_type, zhuanxiang_time
</select>
<select id="getReportByYear" resultType="com.ruoyi.screen.domain.response.ZongzhiReportByYearResponse"></select>
</mapper>

@ -25,23 +25,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTcTbVo">
select id, area_id, dep_name, location_name,ip,state,file_url,tb_type,file_name,tb_time, create_id, create_by, create_time, update_id, update_by, update_time, remark from tc_tb
select id, area_id, dep_name, location_name,tb_type,tb_time, create_id, create_by, create_time, update_id, update_by, update_time, remark,ip,state,file_url,file_name from tc_tb
</sql>
<select id="selectTcTbList" parameterType="TcTb" resultMap="TcTbResult">
<include refid="selectTcTbVo"/>
<where>
<where>
<if test="areaId != null "> and area_id = #{areaId}</if>
<if test="ip != null "> and ip = #{ip}</if>
<if test="state != null "> and state = #{state}</if>
<if test="fileUrl != null "> and file_url = #{fileUrl}</if>
<if test="fileName != null "> and file_name = #{fileName}</if>
<if test="depName != null and depName != ''"> and dep_name like concat('%', #{depName}, '%')</if>
<if test="locationName != null and locationName != ''"> and location_name like concat('%', #{locationName}, '%')</if>
<if test="tbType != null "> and tb_type = #{tbType}</if>
<if test="tbTime != null "> and tb_time = #{tbTime}</if>
<if test="createId != null "> and create_id = #{createId}</if>
<if test="updateId != null "> and update_id = #{updateId}</if>
<if test="ip != null "> and ip = #{ip}</if>
<if test="state != null "> and state = #{state}</if>
<if test="fileUrl != null "> and file_url = #{fileUrl}</if>
<if test="fileName != null "> and file_name = #{fileName}</if>
</where>
</select>
@ -55,11 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="areaId != null">area_id,</if>
<if test="depName != null">dep_name,</if>
<if test="ip != null">ip,</if>
<if test="state != null">state,</if>
<if test="fileUrl != null">file_url,</if>
<if test="tbType != null">tb_type,</if>
<if test="fileName != null">file_name,</if>
<if test="locationName != null">location_name,</if>
<if test="tbTime != null">tb_time,</if>
<if test="createId != null">create_id,</if>
@ -69,6 +65,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="ip != null">ip,</if>
<if test="state != null">state,</if>
<if test="fileUrl != null">file_url,</if>
<if test="fileName != null">file_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="areaId != null">#{areaId},</if>
@ -76,10 +76,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="locationName != null">#{locationName},</if>
<if test="tbType != null">#{tbType},</if>
<if test="tbTime != null">#{tbTime},</if>
<if test="ip != null">#{ip},</if>
<if test="state != null">#{state},</if>
<if test="fileUrl != null">#{fileUrl},</if>
<if test="fileName != null">#{fileName},</if>
<if test="createId != null">#{createId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
@ -87,6 +83,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="ip != null">#{ip},</if>
<if test="state != null">#{state},</if>
<if test="fileUrl != null">#{fileUrl},</if>
<if test="fileName != null">#{fileName},</if>
</trim>
</insert>

Loading…
Cancel
Save