dongdingding 1 year ago
commit b06f38a85f

@ -111,4 +111,15 @@ public class ScreenController extends BaseController {
public AjaxResult screeDept() { public AjaxResult screeDept() {
return AjaxResult.success(screenService.getScreenDept()); return AjaxResult.success(screenService.getScreenDept());
} }
/**
*
*/
@ApiOperation(value = "举报地图", response = ScreenReportMapResponse.class)
@GetMapping("/screenreportmap")
public AjaxResult screenReportMap() {
return AjaxResult.success(screenService.getScreenReportMap());
}
} }

@ -0,0 +1,27 @@
package com.ruoyi.tcZz.domain.reponse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
*/
@Data
@ApiModel("举报地图")
public class ScreenReportMapResponse {
/**
*
*/
@ApiModelProperty("举报总数")
private Integer count;
/**
*
*/
@ApiModelProperty("处置率")
private double rate;
}

@ -12,6 +12,8 @@ public interface ScreenMapper {
/** /**
* *
*
* @return
*/ */
ScreenSupervisionResponse getScreenSupervision(); ScreenSupervisionResponse getScreenSupervision();
@ -19,6 +21,8 @@ public interface ScreenMapper {
/** /**
* *
*
* @return
*/ */
ScreenSourceResponse getScreenSource(); ScreenSourceResponse getScreenSource();
@ -31,7 +35,6 @@ public interface ScreenMapper {
ScreenOpinionReportResponse getScreenOpinionReport(); ScreenOpinionReportResponse getScreenOpinionReport();
/** /**
* *
* *
@ -40,7 +43,6 @@ public interface ScreenMapper {
ScreenArticlesResponse getScreenArticles(); ScreenArticlesResponse getScreenArticles();
/** /**
* *
* *
@ -51,6 +53,7 @@ public interface ScreenMapper {
/** /**
* *
*
* @return * @return
*/ */
List<ScreenQinglangWeiguiResponse> getScreenQinglangWeigui(); List<ScreenQinglangWeiguiResponse> getScreenQinglangWeigui();
@ -58,16 +61,25 @@ public interface ScreenMapper {
/** /**
* *
*
* @return
*/ */
List<ScreenTerritorialResponse> getScreenTerritorial(); List<ScreenTerritorialResponse> getScreenTerritorial();
/** /**
* *
* *
* @return * @return
*/ */
List<ScreenDeptResponse> getScreenDept(); List<ScreenDeptResponse> getScreenDept();
/**
*
*
* @return
*/
ScreenReportMapResponse getScreenReportMap();
} }

@ -72,4 +72,12 @@ public interface ScreenService {
* @return * @return
*/ */
List<ScreenDeptResponse> getScreenDept(); List<ScreenDeptResponse> getScreenDept();
/**
*
*
* @return
*/
ScreenReportMapResponse getScreenReportMap();
} }

@ -59,4 +59,9 @@ public class ScreenServiceImpl implements ScreenService {
public List<ScreenDeptResponse> getScreenDept() { public List<ScreenDeptResponse> getScreenDept() {
return screenMapper.getScreenDept(); return screenMapper.getScreenDept();
} }
@Override
public ScreenReportMapResponse getScreenReportMap() {
return screenMapper.getScreenReportMap();
}
} }

@ -54,4 +54,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getScreenDept" resultType="com.ruoyi.tcZz.domain.reponse.ScreenDeptResponse"> <select id="getScreenDept" resultType="com.ruoyi.tcZz.domain.reponse.ScreenDeptResponse">
select COUNT(*) AS count,dep_name as depName from tc_bmtb where isStatus =1 GROUP BY dep_name select COUNT(*) AS count,dep_name as depName from tc_bmtb where isStatus =1 GROUP BY dep_name
</select> </select>
<select id="getScreenReportMap" resultType="com.ruoyi.tcZz.domain.reponse.ScreenReportMapResponse">
SELECT COUNT(*) AS count,
SUM(CASE WHEN state = 2 THEN 1 ELSE 0 END) * 100.0 / COUNT(*) AS rate
FROM
tc_jbmap;
</select>
</mapper> </mapper>
Loading…
Cancel
Save