大屏接口修改

dongdingding
董丁丁 2 years ago
parent c05d6c1dba
commit 409bca6e7a

@ -63,16 +63,6 @@ public class ZongzhiScreenOpinionController {
} }
/**
*
*/
@ApiOperation(value = "动态筛选", response = ZongzhiSentimenFilteringResponse.class)
@GetMapping("/sentimenfiltering")
private AjaxResult getSentimenFiltering() {
return null;
// return AjaxResult.success(zongzhiScreenOpinionService.getSentimenFiltering());
}
/** /**
* *
@ -109,4 +99,16 @@ public class ZongzhiScreenOpinionController {
} }
/**
*
*/
@ApiOperation(value = "动态筛选", response = ZongzhiSentimentfilterResponse.class)
@GetMapping("/sentimentfilter")
private AjaxResult getSentimentFiltering() {
;
return AjaxResult.success(zongzhiScreenOpinionService.getSentimentFiltering());
}
} }

@ -0,0 +1,43 @@
package com.ruoyi.screen.domain.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
*/
@Data
@ApiModel("大屏数据清朗专项行动动态响应类")
public class ZongzhiSentimentfilterResponse {
/**
*
*/
@ApiModelProperty(value = "监测信息总量")
private Integer count1;
/**
*
*/
@ApiModelProperty(value = "排除信息量")
private Integer count2;
/**
*
*/
@ApiModelProperty(value = "舆情预警")
private Integer count3;
/**
*
*/
@ApiModelProperty(value = "舆情预警百分比")
private double pt;
}

@ -25,6 +25,12 @@ public class ZongzhiTbAreaResponse {
private String locationName; private String locationName;
/**
*
*/
@ApiModelProperty(value = "统计数量")
private Integer count;

@ -64,4 +64,11 @@ public interface ZongzhiScreenOpinionMapper {
* *
*/ */
public List<ZongzhiSentimentDeptResponse> getSentimentDept(); public List<ZongzhiSentimentDeptResponse> getSentimentDept();
/**
*
*/
public List<ZongzhiSentimentfilterResponse> getSentimentFiltering();
} }

@ -64,4 +64,10 @@ public interface ZongzhiScreenOpinionService {
/**
*
*/
public List<ZongzhiSentimentfilterResponse> getSentimentFiltering();
} }

@ -55,4 +55,9 @@ public class ZongzhiScreenOpinionServiceImpl implements ZongzhiScreenOpinionServ
public List<ZongzhiSentimentDeptResponse> getSentimentDept() { public List<ZongzhiSentimentDeptResponse> getSentimentDept() {
return zongzhiScreenOpinionMapper.getSentimentDept(); return zongzhiScreenOpinionMapper.getSentimentDept();
} }
@Override
public List<ZongzhiSentimentfilterResponse> getSentimentFiltering() {
return zongzhiScreenOpinionMapper.getSentimentFiltering();
}
} }

@ -84,10 +84,10 @@ public class TcNetworkSentiment extends BaseEntity {
/** /**
* 1. 2. 3. * 1. 2. 3.
* 4. 5. * 4. 5. 6. 7. 8.
*/ */
@Excel(name = "舆情类型") @Excel(name = "舆情类型")
@ApiModelProperty(value = "舆情类型1.敏感 2.非敏感 3.本地相关信息 4.推送预警信息 5.聚焦本地媒体信息 ") @ApiModelProperty(value = "舆情类型1.敏感 2.非敏感 3.本地相关信息 4.推送预警信息 5.聚焦本地媒体信息 6.监测信息总量 7.排除信息量 8.舆情预警 ")
private Long sentimentType; private Long sentimentType;
/** /**

@ -54,4 +54,13 @@
where isturn ='1' where isturn ='1'
GROUP BY dep_name GROUP BY dep_name
</select> </select>
<select id="getSentimentFiltering"
resultType="com.ruoyi.screen.domain.response.ZongzhiSentimentfilterResponse">
select a.count1,b.count2,c.count3,d.pt from
(select count(*) as count1 from tc_network_sentiment where sentiment_type=6)a,
(select count(*) as count2 from tc_network_sentiment where sentiment_type=7)b,
(select count(*) as count3 from tc_network_sentiment where sentiment_type=8)c,
(select ROUND(COUNT(case when sentiment_type=8 then sentiment_type else null end) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt from tc_network_sentiment)d
</select>
</mapper> </mapper>

@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from tc_idc_unit from tc_idc_unit
</select> </select>
<select id="getTbArea" resultType="com.ruoyi.screen.domain.response.ZongzhiTbAreaResponse"> <select id="getTbArea" resultType="com.ruoyi.screen.domain.response.ZongzhiTbAreaResponse">
SELECT ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt, location_name as locationName SELECT ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt, count(*) as count,location_name as locationName
from tc_tb where tb_type='1' from tc_tb where tb_type='1'
group by location_name group by location_name
</select> </select>

Loading…
Cancel
Save