diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/ScreenController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/ScreenController.java index ce23f9bf..bbea50b1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/ScreenController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/ScreenController.java @@ -2,10 +2,7 @@ package com.ruoyi.tcZz.controller; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.tcZz.domain.reponse.ScreenArticlesResponse; -import com.ruoyi.tcZz.domain.reponse.ScreenOpinionReportResponse; -import com.ruoyi.tcZz.domain.reponse.ScreenSourceResponse; -import com.ruoyi.tcZz.domain.reponse.ScreenSupervisionResponse; +import com.ruoyi.tcZz.domain.reponse.*; import com.ruoyi.tcZz.service.ScreenService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -14,6 +11,9 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.ArrayList; +import java.util.List; + /** * 大屏接口 */ @@ -69,6 +69,21 @@ public class ScreenController extends BaseController { @ApiOperation(value = "网评文章", response = ScreenArticlesResponse.class) @GetMapping("/screenarticles") public AjaxResult screenArticles() { - return AjaxResult.success(screenService.getScreenOpinionReport()); + return AjaxResult.success(screenService.getScreenArticles()); + } + + /** + * 清郎专项行动数据统计 + */ + + @ApiOperation(value = "清郎专项行动数据统计", response = ScreenQinglangResponse.class) + @GetMapping("/screenqinglang") + public AjaxResult screenQinglang() { + ScreenQinglangResponse screenQinglangResponse=new ScreenQinglangResponse(); + List list= screenService.getScreenQinglang(); + List list1= screenService.getScreenQinglangWeigui(); + screenQinglangResponse.setScreenQinglangWeifanResponse(list); + screenQinglangResponse.setScreenQinglangWeiguiResponse(list1); + return AjaxResult.success(screenQinglangResponse); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java index 118e1417..8f26ba3d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java @@ -3,8 +3,8 @@ package com.ruoyi.tcZz.controller; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.exception.base.BaseException; import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.tcZz.domain.TcYqyj; import com.ruoyi.tcZz.domain.TcYqzs; import com.ruoyi.tcZz.service.ITcYqzsService; import io.swagger.annotations.Api; @@ -56,6 +56,17 @@ public class TcYqzsController extends BaseController { @ApiOperation("新增舆情走势图") @PostMapping public AjaxResult add(@RequestBody TcYqzs tcYqzs) { + /** + * 新增校验 + */ + TcYqzs tcYqzs1 = new TcYqzs(); + tcYqzs1.setAreaId(tcYqzs.getAreaId()); + tcYqzs1.setDateTime(tcYqzs.getDateTime()); + List list = tcYqzsService.selectTcYqzsList(tcYqzs1); + if (!list.isEmpty()) { + throw new BaseException("同一天内不得新增多条太仓数据"); + } + return toAjax(tcYqzsService.insertTcYqzs(tcYqzs)); } @@ -100,6 +111,7 @@ public class TcYqzsController extends BaseController { tcYqzsService.importUser(tcYqzsList); return AjaxResult.success(); } + /** * 批量启用禁用 * @@ -109,15 +121,14 @@ public class TcYqzsController extends BaseController { @ApiOperation("批量启用禁用") @GetMapping("/isStatus") - public AjaxResult isStatus(@RequestParam("isStatus") Integer isStatus,@RequestParam("ids") List ids) { - tcYqzsService.updateByisStatus(isStatus,ids); + public AjaxResult isStatus(@RequestParam("isStatus") Integer isStatus, @RequestParam("ids") List ids) { + tcYqzsService.updateByisStatus(isStatus, ids); return AjaxResult.success(); } @ApiOperation("通用下载excel模板") @PostMapping("/importTemplate") - public void importTemplate(HttpServletResponse response) - { + public void importTemplate(HttpServletResponse response) { ExcelUtil util = new ExcelUtil(TcYqzs.class); util.importTemplateExcel(response, " 舆情走势图列表"); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcYqzs.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcYqzs.java index c0dc7792..0a834d64 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcYqzs.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcYqzs.java @@ -34,9 +34,9 @@ public class TcYqzs extends BaseEntity private Long areaId; /** 日期 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd") @ApiModelProperty(value = "日期") - @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd") private Date dateTime; /** 非敏感数量 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenArticlesResponse.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenArticlesResponse.java index abb3e2de..6f2eb3e9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenArticlesResponse.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenArticlesResponse.java @@ -1,7 +1,29 @@ package com.ruoyi.tcZz.domain.reponse; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + /** * 网评文章 */ +@Data +@ApiModel("网评文章") public class ScreenArticlesResponse { + /** + * 本级录用 + */ + @ApiModelProperty("本级录用") + private Integer count; + + /** + * 苏州级录用 + */ + @ApiModelProperty("苏州级录用") + private Integer count1; + /** + * 省级及以上录用 + */ + @ApiModelProperty("省级及以上录用") + private Integer count2; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenQinglangResponse.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenQinglangResponse.java new file mode 100644 index 00000000..03f22456 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenQinglangResponse.java @@ -0,0 +1,27 @@ +package com.ruoyi.tcZz.domain.reponse; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 清郎专项行动 + */ +@Data +@ApiModel("清郎专项行动") +public class ScreenQinglangResponse { + /** + * 清郎专项行动处理有害信息数据统计 + */ + @ApiModelProperty("清郎专项行动处理有害信息数据统计") + List screenQinglangWeifanResponse; + + + /** + * 关闭直播平台违规账号 + */ + @ApiModelProperty("关闭直播平台违规账号") + List screenQinglangWeiguiResponse; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenQinglangWeifanResponse.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenQinglangWeifanResponse.java new file mode 100644 index 00000000..0284287f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenQinglangWeifanResponse.java @@ -0,0 +1,33 @@ +package com.ruoyi.tcZz.domain.reponse; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 清郎专项行动处理有害信息数据统计 + */ +@Data +@ApiModel("清郎专项行动处理有害信息数据统计") +public class ScreenQinglangWeifanResponse { + + + /** + * 处理有害信息数量 + */ + @ApiModelProperty("处理有害信息数量") + private Integer count1; + + /** + * 日期 + */ + @ApiModelProperty("日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date dateTime; + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenQinglangWeiguiResponse.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenQinglangWeiguiResponse.java new file mode 100644 index 00000000..6ae28b56 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/reponse/ScreenQinglangWeiguiResponse.java @@ -0,0 +1,30 @@ +package com.ruoyi.tcZz.domain.reponse; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 关闭直播平台违规账号 + */ +@Data +@ApiModel("关闭直播平台违规账号") +public class ScreenQinglangWeiguiResponse { + /** + * 关闭直播平台违规账号 + */ + @ApiModelProperty("关闭直播平台违规账号") + private Integer count2; + + /** + * 日期 + */ + @ApiModelProperty("日期") + @DateTimeFormat(pattern = "yyyy-MM-dd ") + @JsonFormat(pattern = "yyyy-MM-dd ") + private Date dateTime; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/ScreenMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/ScreenMapper.java index 63f86659..4cbe274f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/ScreenMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/ScreenMapper.java @@ -1,8 +1,8 @@ package com.ruoyi.tcZz.mapper; -import com.ruoyi.tcZz.domain.reponse.ScreenOpinionReportResponse; -import com.ruoyi.tcZz.domain.reponse.ScreenSourceResponse; -import com.ruoyi.tcZz.domain.reponse.ScreenSupervisionResponse; +import com.ruoyi.tcZz.domain.reponse.*; + +import java.util.List; /** * 大屏接口数据层 @@ -28,6 +28,30 @@ public interface ScreenMapper { * * @return */ - ScreenOpinionReportResponse getScreenOpinionReport(); + + + + /** + * 网评文章 + * + * @return + */ + ScreenArticlesResponse getScreenArticles(); + + + + /** + * 清郎专项行动数据统计 + * + * @return + */ + List getScreenQinglang(); + + + /** + * 清郎专项行动违规 + * @return + */ + List getScreenQinglangWeigui(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ScreenService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ScreenService.java index 991c6c02..27a88bf9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ScreenService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ScreenService.java @@ -1,8 +1,8 @@ package com.ruoyi.tcZz.service; -import com.ruoyi.tcZz.domain.reponse.ScreenOpinionReportResponse; -import com.ruoyi.tcZz.domain.reponse.ScreenSourceResponse; -import com.ruoyi.tcZz.domain.reponse.ScreenSupervisionResponse; +import com.ruoyi.tcZz.domain.reponse.*; + +import java.util.List; /** * 大屏接口服务层 @@ -34,4 +34,25 @@ public interface ScreenService { */ ScreenOpinionReportResponse getScreenOpinionReport(); + + + /** + * 网评文章 + * + * @return + */ + ScreenArticlesResponse getScreenArticles(); + + /** + * 清郎专项行动处理有害数据统计 + * + * @return + */ + List getScreenQinglang(); + + /** + * 清郎专项行动违规 + * @return + */ + List getScreenQinglangWeigui(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/ScreenServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/ScreenServiceImpl.java index 5f6d590d..17145192 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/ScreenServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/ScreenServiceImpl.java @@ -1,13 +1,13 @@ package com.ruoyi.tcZz.service.impl; -import com.ruoyi.tcZz.domain.reponse.ScreenOpinionReportResponse; -import com.ruoyi.tcZz.domain.reponse.ScreenSourceResponse; -import com.ruoyi.tcZz.domain.reponse.ScreenSupervisionResponse; +import com.ruoyi.tcZz.domain.reponse.*; import com.ruoyi.tcZz.mapper.ScreenMapper; import com.ruoyi.tcZz.service.ScreenService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * 大屏接口实现层 */ @@ -34,4 +34,19 @@ public class ScreenServiceImpl implements ScreenService { public ScreenOpinionReportResponse getScreenOpinionReport() { return screenMapper.getScreenOpinionReport(); } + + @Override + public ScreenArticlesResponse getScreenArticles() { + return screenMapper.getScreenArticles(); + } + + @Override + public List getScreenQinglang() { + return screenMapper.getScreenQinglang(); + } + + @Override + public List getScreenQinglangWeigui() { + return screenMapper.getScreenQinglangWeigui(); + } } diff --git a/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/ScreenMapper.xml b/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/ScreenMapper.xml index 8e63c0b8..09ac5468 100644 --- a/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/ScreenMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/ScreenMapper.xml @@ -26,4 +26,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" (SELECT COUNT(*) AS count3 FROM tc_yqbg where type=4 and isStatus=1 ) count3, (SELECT COUNT(*) AS count4 FROM tc_yqbg where type=5 and isStatus=1 ) count4; + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/tcZz/netWorkYq/TcYqzsMapper.xml b/ruoyi-admin/src/main/resources/mapper/tcZz/netWorkYq/TcYqzsMapper.xml index ed1bdc52..8a71e17c 100644 --- a/ruoyi-admin/src/main/resources/mapper/tcZz/netWorkYq/TcYqzsMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/tcZz/netWorkYq/TcYqzsMapper.xml @@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and remark = #{remark} and count1 = #{count1} and count2 = #{count2} + and dateTime like concat('%', #{dateTime}, '%') order by date_time asc