parent
fe9f4a94c1
commit
253bd3c655
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.screen.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiAppraiserCompleteResponse;
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiAppraiserResponse;
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiArticlesResponse;
|
||||||
|
import com.ruoyi.screen.service.ZongzhiScreenNetworkEcologyService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 太仓综治网络生态大屏接口
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zongzhi/network")
|
||||||
|
@Api(tags = " 太仓综治网络生态大屏接口")
|
||||||
|
public class ZongzhiScreenNetworkEcologyController {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ZongzhiScreenNetworkEcologyService zongzhiScreenNetworkEcologyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网评文章录用情况
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "网评文章录用情况", response = ZongzhiArticlesResponse.class)
|
||||||
|
@GetMapping("/articles")
|
||||||
|
private AjaxResult getArticles() {
|
||||||
|
|
||||||
|
return AjaxResult.success(zongzhiScreenNetworkEcologyService.getArticles());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本级上级评指令比们(月)
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "本级上级评指令比们(月)", response = ZongzhiAppraiserResponse.class)
|
||||||
|
@GetMapping("/appraiser")
|
||||||
|
private AjaxResult getAppraiser() {
|
||||||
|
|
||||||
|
return AjaxResult.success(zongzhiScreenNetworkEcologyService.getAppraiser());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网评员任务完成率
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "网评员任务完成率(月)", response = ZongzhiAppraiserCompleteResponse.class)
|
||||||
|
@GetMapping("/appraisercomplete")
|
||||||
|
private AjaxResult getAppraiserComplete() {
|
||||||
|
|
||||||
|
return AjaxResult.success(zongzhiScreenNetworkEcologyService.getAppraiserComplete());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.ruoyi.screen.domain.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网评员任务完成率响应类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("网评员任务完成率响应类")
|
||||||
|
public class ZongzhiAppraiserCompleteResponse {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "城乡名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百分比
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "百分比")
|
||||||
|
private double pt;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.ruoyi.screen.domain.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本级上级评指令比们响应类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("本级上级评指令比们响应类")
|
||||||
|
public class ZongzhiAppraiserResponse {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网评类型 1:本级网评 2:上级网评
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "网评类型 1:本级网评 2:上级网评")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 百分比
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "百分比")
|
||||||
|
private double pt;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.ruoyi.screen.domain.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网评文章录用情况响应类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("网评文章录用情况响应类")
|
||||||
|
public class ZongzhiArticlesResponse {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数量")
|
||||||
|
private Integer count ;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文章类型 1. 本地录用
|
||||||
|
* 2. 苏州级录用
|
||||||
|
* 3. 省级级以上录用
|
||||||
|
* 4. 上级媒体
|
||||||
|
* 5. 本地发布
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文章类型 1.本地录用 2.苏州级录用 3.省级级以上录用 4.上级媒体 5.本地发布")
|
||||||
|
private Integer type ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.ruoyi.screen.domain.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 大屏数据工作动态数量响应类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("大屏数据工作动态数量响应类")
|
||||||
|
public class ZongzhiWorkDynamicsCountResponse {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数量")
|
||||||
|
private Integer count;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "大屏数据工作动态响应类")
|
||||||
|
List<ZongzhiWorkDynamicsResponse> list;
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.ruoyi.screen.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiAppraiserCompleteResponse;
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiAppraiserResponse;
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiArticlesResponse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 太仓综治网络生态数据层
|
||||||
|
*/
|
||||||
|
public interface ZongzhiScreenNetworkEcologyMapper {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网评文章录用情况
|
||||||
|
*/
|
||||||
|
public List<ZongzhiArticlesResponse> getArticles();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本级上级评指令比们
|
||||||
|
*/
|
||||||
|
public List<ZongzhiAppraiserResponse> getAppraiser();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网评员任务完成率
|
||||||
|
*/
|
||||||
|
public List<ZongzhiAppraiserCompleteResponse> getAppraiserComplete();
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.ruoyi.screen.service;
|
||||||
|
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiAppraiserCompleteResponse;
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiAppraiserResponse;
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiArticlesResponse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 太仓综治网络生态业务层
|
||||||
|
*/
|
||||||
|
public interface ZongzhiScreenNetworkEcologyService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网评文章录用情况
|
||||||
|
*/
|
||||||
|
public List<ZongzhiArticlesResponse> getArticles();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本级上级评指令比们
|
||||||
|
*/
|
||||||
|
public List<ZongzhiAppraiserResponse> getAppraiser();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网评员任务完成率
|
||||||
|
*/
|
||||||
|
public List<ZongzhiAppraiserCompleteResponse> getAppraiserComplete();
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.ruoyi.screen.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiAppraiserCompleteResponse;
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiAppraiserResponse;
|
||||||
|
import com.ruoyi.screen.domain.response.ZongzhiArticlesResponse;
|
||||||
|
import com.ruoyi.screen.mapper.ZongzhiScreenNetworkEcologyMapper;
|
||||||
|
import com.ruoyi.screen.service.ZongzhiScreenNetworkEcologyService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 太仓综治网络生态实现层
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ZongzhiScreenNetworkEcologyServiceImpl implements ZongzhiScreenNetworkEcologyService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ZongzhiScreenNetworkEcologyMapper zongzhiScreenNetworkEcologyMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ZongzhiArticlesResponse> getArticles() {
|
||||||
|
return zongzhiScreenNetworkEcologyMapper.getArticles();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ZongzhiAppraiserResponse> getAppraiser() {
|
||||||
|
return zongzhiScreenNetworkEcologyMapper.getAppraiser();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ZongzhiAppraiserCompleteResponse> getAppraiserComplete() {
|
||||||
|
return zongzhiScreenNetworkEcologyMapper.getAppraiserComplete();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.screen.mapper.ZongzhiScreenNetworkEcologyMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getArticles" resultType="com.ruoyi.screen.domain.response.ZongzhiArticlesResponse">
|
||||||
|
select type, count(*) as count
|
||||||
|
from tc_network_article
|
||||||
|
</select>
|
||||||
|
<select id="getAppraiser" resultType="com.ruoyi.screen.domain.response.ZongzhiAppraiserResponse">
|
||||||
|
select appraiser_type as type, ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt
|
||||||
|
from tc_network_evaluate
|
||||||
|
WHERE MONTH (create_time) = MONTH (CURDATE())
|
||||||
|
GROUP BY type
|
||||||
|
</select>
|
||||||
|
<select id="getAppraiserComplete"
|
||||||
|
resultType="com.ruoyi.screen.domain.response.ZongzhiAppraiserCompleteResponse">
|
||||||
|
SELECT ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 1) AS pt, b.name
|
||||||
|
FROM `tc_network_evaluate` a
|
||||||
|
left join tc_town b on a.area_id = b.id
|
||||||
|
GROUP BY a.area_id
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in new issue