From 3e2c6908f5be1251c11cf17c3ee1b04360d3a4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E7=88=B1=E5=AD=A6=E4=B9=A0=E7=9A=84=E7=9F=B3?= =?UTF-8?q?=E5=90=8C=E5=AD=A6?= <2936013465@qq.com> Date: Thu, 16 Jan 2025 18:45:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 ++ ...troller.java => DataVAuditController.java} | 5 +- .../datav/DataVCaseVerifController.java | 10 ++ ...roller.java => DataVGlobalController.java} | 12 +-- ...ller.java => DataVMailViewController.java} | 15 +-- ...java => DataVRightsComfortController.java} | 8 +- ... => DataVSupervisionNotifyController.java} | 60 +++++++++--- ...ava => DataVVideoSuperviseController.java} | 42 +++++---- .../subdatav/SubOneCaseVerifController.java | 42 ++++++--- .../subdatav/SubOneGlobalController.java | 24 +++-- .../subdatav/SubOneMailViewController.java | 9 +- .../subdatav/SubOneRightsController.java | 2 +- .../SubOneSupervisionNotifyController.java | 72 ++++++++++++--- .../SubOneVideoSuperviseController.java | 42 +++++++-- .../service/CountyStreetDeptService.java | 3 - .../biutag/supervision/tools/HttpTest.java | 91 +++++++++++++++++++ 16 files changed, 336 insertions(+), 109 deletions(-) rename src/main/java/com/biutag/supervision/controller/datav/{AuditController.java => DataVAuditController.java} (92%) rename src/main/java/com/biutag/supervision/controller/datav/{DataGlobalController.java => DataVGlobalController.java} (93%) rename src/main/java/com/biutag/supervision/controller/datav/{DataMailViewController.java => DataVMailViewController.java} (95%) rename src/main/java/com/biutag/supervision/controller/datav/{DatavRightsComfortController.java => DataVRightsComfortController.java} (96%) rename src/main/java/com/biutag/supervision/controller/datav/{SupervisionNotifyController.java => DataVSupervisionNotifyController.java} (89%) rename src/main/java/com/biutag/supervision/controller/datav/{VideoSuperviseController.java => DataVVideoSuperviseController.java} (79%) create mode 100644 src/test/java/com/biutag/supervision/tools/HttpTest.java diff --git a/pom.xml b/pom.xml index 96a5acb..1125a3b 100644 --- a/pom.xml +++ b/pom.xml @@ -32,6 +32,14 @@ + + + org.jsoup + jsoup + 1.11.3 + + + com.google.code.gson gson diff --git a/src/main/java/com/biutag/supervision/controller/datav/AuditController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVAuditController.java similarity index 92% rename from src/main/java/com/biutag/supervision/controller/datav/AuditController.java rename to src/main/java/com/biutag/supervision/controller/datav/DataVAuditController.java index 6045492..708cf50 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/AuditController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVAuditController.java @@ -23,11 +23,12 @@ import static com.biutag.supervision.constants.WorkDynamicConstants.SJGZDT; * @Date: 2025/1/14 09:11 * @Description: */ -@Tag(name = "审计督察大屏相关") + +@Tag(name = "审计督察一级大屏", description = "审计督察一级大屏") @RequestMapping("datav/audit") @RequiredArgsConstructor @RestController -public class AuditController { +public class DataVAuditController { private final NewsService newsService; diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java index bbd87f1..8c55f9f 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java @@ -9,6 +9,8 @@ import com.biutag.supervision.pojo.vo.CaseVerificationMapVo; import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; import com.biutag.supervision.service.CaseVerificationService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.cache.annotation.Cacheable; import org.springframework.format.annotation.DateTimeFormat; @@ -29,6 +31,7 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*; @RequestMapping("datav/caseVerif") @RequiredArgsConstructor @RestController +@Tag(name = "案件核查一级大屏", description = "案件核查一级大屏") public class DataVCaseVerifController { private final DataCaseVerifMapper dataCaseVerifMapper; @@ -43,6 +46,7 @@ public class DataVCaseVerifController { * @param endTime 结束时间 * @return Result */ + @Operation(summary = "分县市局排名") @GetMapping("/getCaseVerificationRank") public Result getCaseVerificationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -61,6 +65,7 @@ public class DataVCaseVerifController { * @param endTime 结束时间 * @return Result */ + @Operation(summary = "案件问题性质") @GetMapping("/getCaseProblemProperty") public Result getCaseProblemProperty(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -83,6 +88,7 @@ public class DataVCaseVerifController { * @param endTime 结束时间 * @return Result */ + @Operation(summary = "中央数据总览") @GetMapping("/getCaseVerificationCount") public Result getAllCaseVerificationCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -99,6 +105,7 @@ public class DataVCaseVerifController { * @param endTime 结束时间 * @return Result */ + @Operation(summary = "地图Icon数据") @GetMapping("/getCaseVerificationMap") @Cacheable(cacheNames = "Supervision:Screen:CaseVerificationMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()") public Result getCaseVerificationMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -114,6 +121,7 @@ public class DataVCaseVerifController { * @param year 年份 * @return Result */ + @Operation(summary = "查处问题趋势") @GetMapping("/getCaseVerificationTrend") public Result getCaseVerificationTrend(@RequestParam Integer year) { List proTrendList = negativeMapper.getTrend(year, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); @@ -132,6 +140,7 @@ public class DataVCaseVerifController { * @param endTime 结束时间 * @return Result */ + @Operation(summary = "案件来源占比 & 问责处理情况") @GetMapping("/getCaseSourceRateAndDealSituation") public Result getCaseSourceRateAndDealSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -151,6 +160,7 @@ public class DataVCaseVerifController { * @param endTime 结束时间 * @return Result */ + @Operation(summary = "禁闭处理情况 & 停职处理情况") @GetMapping("/getConfinementAndPause") public Result getConfinementAndPause(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java similarity index 93% rename from src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java rename to src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java index 919b074..7a3022b 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java @@ -3,10 +3,8 @@ package com.biutag.supervision.controller.datav; import com.alibaba.fastjson.JSONObject; import com.biutag.supervision.mapper.NegativeMapper; -import com.biutag.supervision.mapper.NegativeProblemRelationMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.vo.*; -import com.biutag.supervision.service.DataGlobalService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; @@ -27,16 +25,13 @@ import java.util.List; * @author: sh * @date: 2024/11/7 */ -@Tag(name = "数据大屏首页", description = "数据大屏首页") +@Tag(name = "数据大屏一级首页", description = "数据大屏一级首页") @RestController @RequiredArgsConstructor @RequestMapping("datav/dataGlobalScreen") -public class DataGlobalController { +public class DataVGlobalController { - - private final DataGlobalService dataGlobalService; private final NegativeMapper negativeMapper; - private final NegativeProblemRelationMapper negativeProblemRelationMapper; //region 左边 @@ -105,7 +100,7 @@ public class DataGlobalController { * @param endTime 结束时间 * @return Result */ - @Operation(summary = "首页大屏地图数据") + @Operation(summary = "首页大屏地图Icon数据") @GetMapping("/getGlobalMap") @Cacheable(cacheNames = "Supervision:Screen:GlobalMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()") public Result getGlobalMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -174,4 +169,5 @@ public class DataGlobalController { } //endregion + } diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java similarity index 95% rename from src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java rename to src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java index a0bb40e..bc146ca 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java @@ -1,13 +1,11 @@ package com.biutag.supervision.controller.datav; import com.alibaba.fastjson.JSONObject; -import com.biutag.supervision.constants.enums.DepartGroupEnum; import com.biutag.supervision.constants.enums.RepeatEnum; import com.biutag.supervision.mapper.DataPetition12337Mapper; import com.biutag.supervision.mapper.DataPetitionComplaintMapper; import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.pojo.Result; -import com.biutag.supervision.pojo.dto.CaseVerifDepart; import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.service.DataMailService; import io.swagger.v3.oas.annotations.Operation; @@ -20,14 +18,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import java.time.LocalDate; -import java.time.YearMonth; -import java.time.format.DateTimeFormatter; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; import java.util.Date; import java.util.List; -import java.util.stream.Collectors; /** @@ -35,11 +27,11 @@ import java.util.stream.Collectors; * @date: 2024/10/31 * @description: 信访投诉大屏相关 */ -@Tag(name = "信访数据大屏选相关") +@Tag(name = "信访投诉一级大屏", description = "信访投诉一级大屏") @RequestMapping("datav/mailVisits") @RequiredArgsConstructor @RestController -public class DataMailViewController { +public class DataVMailViewController { private final DataMailService dataMailService; private final DataPetitionComplaintMapper dataPetitionComplaintMapper; @@ -80,7 +72,6 @@ public class DataMailViewController { .fluentPut("bwzdLeaderViewRankList", bwzdLeaderViewRankList); return Result.success(data); } - // endregion // region 中间 @@ -92,7 +83,7 @@ public class DataMailViewController { * @param endTime 结束时间 * @return Result */ - @Operation(summary = "信访数据大屏中央数据统计") + @Operation(summary = "中央数据统计") @GetMapping("/getAllMailCount") public Result getAllMailCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { diff --git a/src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java similarity index 96% rename from src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java rename to src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java index 27dd36e..9e73002 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java @@ -4,17 +4,14 @@ import com.alibaba.fastjson.JSONObject; import com.biutag.supervision.mapper.RpcApplyMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.dto.common.PieItem; -import com.biutag.supervision.pojo.entity.CountyStreetDept; import com.biutag.supervision.pojo.model.DataRightsComfortModel; import com.biutag.supervision.pojo.vo.ComfortCountVO; import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; import com.biutag.supervision.pojo.vo.RightsComfortMapVo; -import com.biutag.supervision.service.CountyStreetDeptService; import com.biutag.supervision.service.DataRightsComfortService; -import com.biutag.supervision.service.RpcApplyService; -import com.biutag.supervision.service.RpcInfringerResultService; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.cache.annotation.Cacheable; import org.springframework.format.annotation.DateTimeFormat; @@ -33,7 +30,8 @@ import java.util.*; @RequestMapping("datav/rightsComfort") @RequiredArgsConstructor @RestController -public class DatavRightsComfortController { +@Tag(name = "维权抚慰一级大屏", description = "维权抚慰一级大屏") +public class DataVRightsComfortController { private final DataRightsComfortService dataRightsComfortService; diff --git a/src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java similarity index 89% rename from src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java rename to src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java index 62a12ab..2ba1f91 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java @@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject; import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.vo.*; -import com.biutag.supervision.service.DataSupervisionNotifyServiceImpl; import com.biutag.supervision.service.NewsService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -17,11 +16,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import java.time.LocalDateTime; -import java.util.ArrayList; import java.util.Date; import java.util.List; -import java.util.Map; import static com.biutag.supervision.constants.WorkDynamicConstants.DCGZDT; import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.XCDC; @@ -36,8 +32,8 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.ZXDC; @RestController @RequiredArgsConstructor @RequestMapping("datav/supervisonNotify") -@Tag(name = "现场督察相关") -public class SupervisionNotifyController { +@Tag(name = "现场督察一级大屏", description = "现场督察一级大屏") +public class DataVSupervisionNotifyController { private final NegativeMapper negativeMapper; private final NewsService newsService; @@ -51,7 +47,7 @@ public class SupervisionNotifyController { * @param endTime 结束时间 * @return */ - @Operation(summary = "获取日常督察数量概览和整改率排名") + @Operation(summary = "日常督察情况") @GetMapping("/getChangedRank") public Result getChangedRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -74,6 +70,7 @@ public class SupervisionNotifyController { * @param endTime 结束时间 * @return */ + @Operation(summary = "问题类型占比") @GetMapping("/getProblemTypeRate") public Result getProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -94,7 +91,7 @@ public class SupervisionNotifyController { * @param endTime 结束时间 * @return */ - @Operation(summary = "获取现场督察大屏中央总览") + @Operation(summary = "中央总览数据") @GetMapping("/getSupervisionNotifyCount") public Result getSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -110,6 +107,7 @@ public class SupervisionNotifyController { * @param endTime 结束时间 * @return List */ + @Operation(summary = "地图Icon数据") @GetMapping("/getSupervisionNotifyMap") @Cacheable(cacheNames = "Supervision:Screen:SupervisionNotifyMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()") public Result getSupervisionNotifyMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -126,6 +124,7 @@ public class SupervisionNotifyController { * @param year 年份 * @return List */ + @Operation(summary = "问题趋势") @GetMapping("/getSupervisionTrend") public Result getSupervisionTrend(@RequestParam Integer year) { List supervisionTrend = negativeMapper.getTrend(year, XCDC.getValue(), ZXDC.getValue()); @@ -144,6 +143,7 @@ public class SupervisionNotifyController { * @param endTime 结束时间 * @return JSONObject */ + @Operation(summary = "黄赌毒数据") @GetMapping("/getYellowBetDrug") public Result getYellowBetDrug(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -162,7 +162,14 @@ public class SupervisionNotifyController { } - // 枪支管理数据 + /** + * 枪支管理数据 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return JSONObject + */ + @Operation(summary = "枪支管理数据") @GetMapping("/getGunController") public Result getGunController(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -181,7 +188,14 @@ public class SupervisionNotifyController { return Result.success(data); } - // 涉企问题数据 + /** + * 涉企问题数据 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return JSONObject + */ + @Operation(summary = "涉企问题数据") @GetMapping("/getCompanyProblem") public Result getCompanyProblem(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -200,7 +214,14 @@ public class SupervisionNotifyController { return Result.success(data); } - // 执法办案数据 + /** + * 执法办案数据 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return JSONObject + */ + @Operation(summary = "执法办案数据") @GetMapping("/getHandleCase") public Result getHandleCase(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -220,7 +241,14 @@ public class SupervisionNotifyController { } - // 工作日测酒数据 + /** + * 工作日测酒数据 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return JSONObject + */ + @Operation(summary = "工作日测酒数据") @GetMapping("/getCheckBeer") public Result getCheckBeer(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -239,6 +267,14 @@ public class SupervisionNotifyController { return Result.success(data); } + /** + * 督察工作动态 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return JSONObject + */ + @Operation(summary = "督察工作动态") @GetMapping("/getWorkDynamics") public Result getWorkDynamics(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { diff --git a/src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java similarity index 79% rename from src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java rename to src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java index 3f29ef4..9d1ad27 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java @@ -10,7 +10,6 @@ import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.cache.annotation.Cacheable; import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -28,11 +27,11 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SPDC; * @Date: 2024/11/29 09:32 * @Description: 视频督察大屏 */ -@Tag(name = "视频督察大屏", description = "视频督察大屏") +@Tag(name = "视频督察一级大屏", description = "视频督察一级大屏") @RestController @RequiredArgsConstructor @RequestMapping("datav/videoSupervise") -public class VideoSuperviseController { +public class DataVVideoSuperviseController { private final VideoSuperviseService videoSuperviseService; private final NegativeMapper negativeMapper; @@ -42,16 +41,17 @@ public class VideoSuperviseController { /** * 获取视频督察大屏问题数排名 - * @param beginTime 开始时间 - * @param endTime 结束时间 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 * @return */ - @Operation(summary = "视频督察大屏问题数排名") + @Operation(summary = "问题数排名") @GetMapping("/getVideoSuperviseProblemRank") public Result getVideoSuperviseProblemRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List fxsjVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 3); - List jsdwVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 4); + List fxsjVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 3); + List jsdwVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 4); JSONObject data = new JSONObject(); data.fluentPut("fxsjVideoSuperviseProblemRankList", fxsjVideoSuperviseProblemRankList); data.fluentPut("jsdwVideoSuperviseProblemRankList", jsdwVideoSuperviseProblemRankList); @@ -62,17 +62,18 @@ public class VideoSuperviseController { //region 中间 /** - * 获取视频督察中央数据 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * 获取视频督察中央数据 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ - @Operation(summary = "视频督察大屏中央数据") + @Operation(summary = "中央数据") @GetMapping("/getAllVideoSuperviseCount") public Result getAllVideoSuperviseCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 获取视频督察中央数据 - VideoSuperviseCountVo overview = negativeMapper.getAllVideoSuperviseCount(beginTime, endTime); + VideoSuperviseCountVo overview = negativeMapper.getAllVideoSuperviseCount(beginTime, endTime); // VideoSuperviseCountVo overview = videoSuperviseService.getAllVideoSuperviseCount(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("overview", overview); return Result.success(data); @@ -80,11 +81,12 @@ public class VideoSuperviseController { /** * 获取视频督察地图数据 - * @param beginTime 开始时间 - * @param endTime 结束时间 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 * @return */ - @Operation(summary = "视频督察大屏地图数据") + @Operation(summary = "地图Icon数据") @GetMapping("/getVideoSuperviseMap") @Cacheable(cacheNames = "Supervision:Screen:VideoSuperviseMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()") public Result getVideoSuperviseMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -98,7 +100,7 @@ public class VideoSuperviseController { } // 获取视频督察大屏中央问题趋势统计 - @Operation(summary = "视频督察大屏问题趋势统计") + @Operation(summary = "问题趋势统计") @GetMapping("/getVideoSuperviseTrend") public Result getVideoSuperviseTrend(@RequestParam Integer year) { List videoSuperviseTrendList = negativeMapper.getTrend(year, SPDC.getValue()); @@ -111,11 +113,11 @@ public class VideoSuperviseController { // region 右边 // 问题类型占比 - @Operation(summary = "视频督察大屏问题类型占比") + @Operation(summary = "问题类型占比") @GetMapping("/getVideoSuperviseProblemTypeRate") public Result getVideoSuperviseProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List videoSuperviseProblemTypeRate = negativeMapper.getVideoSuperviseProblemTypeRate(beginTime, endTime); + List videoSuperviseProblemTypeRate = negativeMapper.getVideoSuperviseProblemTypeRate(beginTime, endTime); JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseProblemTypeRate", videoSuperviseProblemTypeRate); return Result.success(jsonObject); } diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java index 5f65c42..a9e78e4 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java @@ -8,6 +8,7 @@ import com.biutag.supervision.pojo.vo.CaseVerificationCountVo; import com.biutag.supervision.pojo.vo.CaseVerificationMapVo; import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -29,23 +30,24 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SJJB; * @Date: 2024/12/17 20:28 * @Description: 二级大屏案件核查 */ -@Tag(name = "二级大屏案件核查") @RequestMapping("datav/sub1/caseVerif") @RequiredArgsConstructor @RestController @Slf4j +@Tag(name = "案件核查二级大屏", description = "案件核查二级大屏") public class SubOneCaseVerifController { private final NegativeMapper negativeMapper; - private final DataCaseVerifMapper dataCaseVerifMapper; /** * 案件核查大屏分县市局排名 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result */ + @Operation(summary = "分县市局排名") @GetMapping("/getSubOneCaseVerificationRank") public Result getSubOneCaseVerificationRank(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -61,16 +63,18 @@ public class SubOneCaseVerifController { /** * 案件问题类型 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result */ + @Operation(summary = "案件问题性质") @GetMapping("/getSubOneCaseProblemProperty") public Result getCaseProblemProperty(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { List zfbaPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId, 6); // 执法办案 - List fwglPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId,11); // 服务管理 + List fwglPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId, 11); // 服务管理 // List jgjjPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 6); // 警规 JSONObject data = new JSONObject() .fluentPut("zfbaPieList", zfbaPieList) @@ -85,14 +89,16 @@ public class SubOneCaseVerifController { /** * 案件核查大屏中央数据总览 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result */ + @Operation(summary = "中央数据总览") @GetMapping("/getSubOneAllCaseVerificationCount") public Result getSubOneAllCaseVerificationCount(@RequestParam Integer departId, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { CaseVerificationCountVo overview = negativeMapper.getSuboOneAllCaseVerificationCount(beginTime, endTime, departId); JSONObject res = new JSONObject().fluentPut("overview", overview); return Result.success(res); @@ -102,15 +108,17 @@ public class SubOneCaseVerifController { /** * 案件核查大屏地图 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result */ + @Operation(summary = "地图Icon数据") @GetMapping("/getSubOneCaseVerificationMap") @Cacheable(cacheNames = "Supervision:Screen:SubOneCaseVerificationMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()") public Result getSubOneCaseVerificationMap(@RequestParam Integer departId, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { List caseVerificationMapList = negativeMapper.getSubOneCaseVerificationMap(beginTime, endTime, departId); JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList); return Result.success(res); @@ -119,13 +127,15 @@ public class SubOneCaseVerifController { /** * 查处问题趋势 * - * @param year 年份 + * @param departId 部门id (分县市局ID) + * @param year 年份 * @return Result */ + @Operation(summary = "查处问题趋势") @GetMapping("/getSubOneCaseVerificationTrend") public Result getSubOneCaseVerificationTrend(@RequestParam String departId, @RequestParam Integer year) { - List proTrendList = negativeMapper.getSubOneTrend(departId,String.valueOf(year) , A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); + List proTrendList = negativeMapper.getSubOneTrend(departId, String.valueOf(year), A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList); return Result.success(data); } @@ -137,14 +147,16 @@ public class SubOneCaseVerifController { /** * 案件来源占比 和 问责处理情况 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result */ + @Operation(summary = "案件来源占比 & 问责处理情况") @GetMapping("/getSubOneCaseSourceRateAndDealSituation") public Result getSubOneCaseSourceRateAndDealSituation(@RequestParam Integer departId, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { List caseSourceRateList = negativeMapper.getSuboOneCaseSourceRate(beginTime, endTime, departId); List dealSituationPieList = negativeMapper.getSubOneDealSituation(beginTime, endTime, departId); JSONObject data = new JSONObject() @@ -158,21 +170,23 @@ public class SubOneCaseVerifController { /** * 禁闭处理情况 和 停职处理情况 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result */ + @Operation(summary = "禁闭处理情况 & 停职处理情况") @GetMapping("/getSubOneConfinementAndPause") public Result getSubOneConfinement(@RequestParam Integer departId, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // List jbclList = negativeMapper.getSubOneConfinementAndPause(beginTime, endTime,departId, 1); // 禁闭 // List tzclList = negativeMapper.getSubOneConfinementAndPause(beginTime, endTime, departId,2); // 停职 // JSONObject data = new JSONObject() // .fluentPut("jbclList", jbclList) // .fluentPut("tzclList", tzclList); // return Result.success(data); - return Result.success(null); + return Result.success(null); } diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java index f9045a1..7b43fe2 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java @@ -28,7 +28,7 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*; * @Date: 2024/12/4 16:30 * @Description: 首页二级大屏 */ -@Tag(name = "首页二级大屏") +@Tag(name = "数据大屏二级首页", description = "数据大屏二级首页") @RequestMapping("datav/sub1/") @RequiredArgsConstructor @RestController @@ -36,13 +36,11 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*; public class SubOneGlobalController { private final NegativeMapper negativeMapper; - private final DataGlobalService dataGlobalService; - private final NegativeProblemRelationMapper negativeProblemRelationMapper; private final CountyStreetDeptService countyStreetDeptService; /** - * 获取地图数据 + * 获取地图数据, 所有二级地图的json数据 * * @param departId 2级单位的id * @return json格式的地图数据 @@ -61,6 +59,7 @@ public class SubOneGlobalController { /** * 机构问题排名 * + * @param departId 2级单位的id * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result @@ -74,7 +73,6 @@ public class SubOneGlobalController { List jsdwlist = negativeMapper.selectTeamOrganizeProblemRank(departId, beginTime, endTime); - JSONObject res = new JSONObject() .fluentPut("fxsjlist", fxsjlist) .fluentPut("jsdwlist", jsdwlist); @@ -85,6 +83,7 @@ public class SubOneGlobalController { /** * 业务类型占比 * + * @param departId 2级单位的id * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result @@ -107,6 +106,7 @@ public class SubOneGlobalController { /** * 获取首页大屏中央数据 * + * @param departId 2级单位的id * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result @@ -125,6 +125,7 @@ public class SubOneGlobalController { /** * 地图数据 * + * @param departId 2级单位的id * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result @@ -133,10 +134,10 @@ public class SubOneGlobalController { @GetMapping("/getSubOneGlobalMap") @Cacheable(cacheNames = "Supervision:Screen:SubOneGlobalMap", key = "#departId+'_'+#beginTime.getTime()+'_'+#endTime.getTime()") public Result getSubOneMap(@RequestParam Integer departId, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 地图数据 - List GlobalTempMapVoList = negativeMapper.getSubOneGlobalMap(beginTime, endTime,departId); + List GlobalTempMapVoList = negativeMapper.getSubOneGlobalMap(beginTime, endTime, departId); JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", GlobalTempMapVoList); return Result.success(data); } @@ -145,13 +146,14 @@ public class SubOneGlobalController { /** * 数据大屏问题趋势统计 * - * @param year 年份 + * @param departId 2级单位的id + * @param year 年份 * @return Result */ @Operation(summary = "数据大屏问题趋势统计") @GetMapping("/getSubOneGlobalTrend") public Result getSubOneGlobalTrend(@RequestParam Integer departId, @RequestParam Integer year) { - List GlobalRecentlyTrendList= negativeMapper.getSubOneTrend(departId.toString(), year.toString(), "2", "13", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "27", "28", "29", "30"); + List GlobalRecentlyTrendList = negativeMapper.getSubOneTrend(departId.toString(), year.toString(), "2", "13", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "27", "28", "29", "30"); JSONObject jsonObject = new JSONObject().fluentPut("globalRecentlyTrendList", GlobalRecentlyTrendList); return Result.success(jsonObject); } @@ -163,6 +165,7 @@ public class SubOneGlobalController { /** * 突出问题排名 * + * @param departId 2级单位的id * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result @@ -185,6 +188,7 @@ public class SubOneGlobalController { /** * 问题类型占比 * + * @param departId 2级单位的id * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java index 06c0cc8..cbc138a 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java @@ -27,7 +27,7 @@ import java.util.List; * @Date: 2024/12/20 11:45 * @Description: 二级大屏信访投诉 */ -@Tag(name = "二级大屏信访投诉") +@Tag(name = "信访投诉二级大屏", description = "信访投诉二级大屏") @RequestMapping("datav/sub1/mailVisits") @RequiredArgsConstructor @RestController @@ -44,6 +44,7 @@ public class SubOneMailViewController { /** * 初访重访情况 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result @@ -83,6 +84,7 @@ public class SubOneMailViewController { /** * 信访数据中央总览统计 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result @@ -104,6 +106,7 @@ public class SubOneMailViewController { /** * 信访数据中央地图小图标数据 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result @@ -124,7 +127,8 @@ public class SubOneMailViewController { /** * 信访数据大屏信访趋势统计 * - * @param year 年份 + * @param departId 部门id (分县市局ID) + * @param year 年份 * @return Result */ @Operation(summary = "信访数据大屏信访趋势统计") @@ -149,6 +153,7 @@ public class SubOneMailViewController { /** * 缠访集访情况 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java index 9ef0a30..b54cd49 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java @@ -24,7 +24,7 @@ import java.util.List; * @Date: 2024/12/24 17:50 * @Description: 二级维权抚慰 */ -@Tag(name = "二级大屏维权抚慰") +@Tag(name = "维权抚慰二级大屏", description = "维权抚慰二级大屏") @RequestMapping("datav/sub1/rightsComfort") @RequiredArgsConstructor @RestController diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java index 92969ea..7ff5107 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java @@ -32,12 +32,11 @@ import static com.biutag.supervision.constants.WorkDynamicConstants.DCGZDT; @RestController @RequiredArgsConstructor @RequestMapping("datav/sub1/supervisonNotify") -@Tag(name = "二级现场督察相关") +@Tag(name = "现场督察二级大屏", description = "现场督察二级大屏") public class SubOneSupervisionNotifyController { private final SubOneSupervisionNotifyService subOneSupervisionNotifyService; - private final NegativeMapper negativeMapper; private final NewsService newsService; // region 左边 @@ -45,11 +44,12 @@ public class SubOneSupervisionNotifyController { /** * 获取日常督察情况 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return */ - @Operation(summary = "获取日常督察数量概览和整改率排名") + @Operation(summary = "日常督察情况") @GetMapping("/getSubOneChangedRank") public Result getSubOneChangedRank(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -69,10 +69,12 @@ public class SubOneSupervisionNotifyController { /** * 问题类型占比 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return */ + @Operation(summary = "问题类型占比") @GetMapping("/getSubOneProblemTypeRate") public Result getSubOneProblemTypeRate(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -89,11 +91,12 @@ public class SubOneSupervisionNotifyController { /** * 大屏中央总览数据 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return */ - @Operation(summary = "大屏中央总览数据") + @Operation(summary = "中央总览数据") @GetMapping("/getSubOneSupervisionNotifyCount") public Result getAllSubOneSupervisionNotifyCount(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -106,10 +109,12 @@ public class SubOneSupervisionNotifyController { /** * 地图小卡片 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return List */ + @Operation(summary = "地图小卡片") @GetMapping("/getSubOneSupervisionMap") @Cacheable(cacheNames = "Supervision:Screen:SubOneSupervisionMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()") public Result getSubOneSupervisionMap(@RequestParam Integer departId, @@ -125,9 +130,11 @@ public class SubOneSupervisionNotifyController { /** * 获取现场督察问题趋势 * - * @param year 年份 + * @param departId 部门id (分县市局ID) + * @param year 年份 * @return List */ + @Operation(summary = "问题趋势") @GetMapping("/getSubOneSupervisionTrend") public Result getSubOneSupervisionTrend(@RequestParam Integer departId, @RequestParam String year) { @@ -143,10 +150,12 @@ public class SubOneSupervisionNotifyController { /** * 黄赌毒数据 * + * @param departId 部门id (分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return JSONObject */ + @Operation(summary = "黄赌毒数据") @GetMapping("/getSubOneYellowBetDrug") public Result getYellowBetDrug(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -167,7 +176,15 @@ public class SubOneSupervisionNotifyController { } - // 枪支管理数据 + /** + * 枪支管理数据 + * + * @param departId 部门id (分县市局ID) + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return JSONObject + */ + @Operation(summary = "枪支管理数据") @GetMapping("/getSubOneGunController") public Result getSubOneGunController(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -187,7 +204,15 @@ public class SubOneSupervisionNotifyController { return Result.success(data); } - // 涉企问题数据 + /** + * 涉企问题数据 + * + * @param departId 部门id (分县市局ID) + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return JSONObject + */ + @Operation(summary = "涉企问题数据") @GetMapping("/getSubOneCompanyProblem") public Result getSubOneCompanyProblem(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -207,7 +232,15 @@ public class SubOneSupervisionNotifyController { return Result.success(data); } - // 执法办案数据 + /** + * 执法办案数据 + * + * @param departId 部门id (分县市局ID) + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return JSONObject + */ + @Operation(summary = "执法办案数据") @GetMapping("/getSubOneHandleCase") public Result getSubOneHandleCase(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -228,7 +261,15 @@ public class SubOneSupervisionNotifyController { } - // 工作日测酒数据 + /** + * 工作日测酒数据 + * + * @param departId 部门id (分县市局ID) + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return JSONObject + */ + @Operation(summary = "工作日测酒数据") @GetMapping("/getSubOneCheckBeer") public Result getSubOneCheckBeer(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -248,10 +289,19 @@ public class SubOneSupervisionNotifyController { return Result.success(data); } + /** + * 督察工作动态 + * + * @param departId 部门id (分县市局ID) + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return JSONObject + */ + @Operation(summary = "督察工作动态") @GetMapping("/getSubOneWorkDynamics") public Result getSubOneWorkDynamics(@RequestParam Integer departId, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { List newsVoList = newsService.getWorkDynamics(beginTime, endTime, DCGZDT, departId.toString()); JSONObject data = new JSONObject().fluentPut("newsVoList", newsVoList); return Result.success(data); diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java index 52fcbcd..0ee7a5a 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java @@ -28,9 +28,9 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SPDC; /** * @Auther: sh * @Date: 2024/12/16 17:12 - * @Description: 二级大屏视频督察 + * @Description: 二级视频督察 */ -@Tag(name = "二级大屏视频督察", description = "二级大屏视频督察") +@Tag(name = "视频督察二级大屏", description = "视频督察二级大屏") @RestController @RequiredArgsConstructor @RequestMapping("datav/sub1/videoSupervise") @@ -40,7 +40,15 @@ public class SubOneVideoSuperviseController { private final NegativeMapper negativeMapper; // region 左边 - @Operation(summary = "视频督察二级大屏问题数排名") + /** + * 问题数排名 + * + * @param departId 部门id(分县市局ID) + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return + */ + @Operation(summary = "问题数排名") @GetMapping("/getSubOneVideoSuperviseProblemRank") public Result getSubOneVideoSuperviseProblemRank(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -58,8 +66,9 @@ public class SubOneVideoSuperviseController { // region 中间 /** - * 视频督察二级大屏中央总览数据 + * 中央总览数据 * + * @param departId 部门id(分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return Result @@ -76,18 +85,19 @@ public class SubOneVideoSuperviseController { /** - * 获取视频督察地图数据 + * 地图Icon数据 * + * @param departId 部门id(分县市局ID) * @param beginTime 开始时间 * @param endTime 结束时间 * @return */ - @Operation(summary = "视频督察大屏地图数据") + @Operation(summary = "地图Icon数据") @GetMapping("/getSubOneVideoSuperviseMap") @Cacheable(cacheNames = "Supervision:Screen:SubOneVideoSuperviseMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()") public Result getSubOneVideoSuperviseMap(@RequestParam Integer departId, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 地图数据 List videoSuperviseMapIconVoList = Optional.ofNullable(negativeMapper.getSubOneVideoSuperviseMapIconInfo(beginTime, endTime, departId)). @@ -97,7 +107,13 @@ public class SubOneVideoSuperviseController { } - @Operation(summary = "视频督察二级数据大屏问题趋势统计") + /** + * 视频督察二级数据大屏问题趋势统计 + * @param departId 部门id(分县市局ID) + * @param year 年份 + * @return + */ + @Operation(summary = "问题趋势统计") @GetMapping("/getSubOneVideoSuperviseTrend") public Result getSubOneVideoSuperviseTrend(@RequestParam Integer departId, @RequestParam Integer year) { List videoSuperviseTrendList = subOneVideoSuperviseService.getSubOneVideoSuperviseTrend(String.valueOf(year), SPDC.getValue(), departId.toString()); @@ -109,6 +125,14 @@ public class SubOneVideoSuperviseController { // region 右边 + + /** + * 视频督察二级数据大屏问题类型占比 + * @param departId 部门id(分县市局ID) + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return + */ @Operation(summary = "视频督察二级数据大屏问题类型占比") @GetMapping("/getSubOneVideoSuperviseProblemTypeRate") public Result getSubOneVideoSuperviseProblemTypeRate(@RequestParam Integer departId, diff --git a/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java b/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java index 7cd4587..b3133a6 100644 --- a/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java +++ b/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java @@ -45,9 +45,6 @@ public class CountyStreetDeptService { properties.put("name", dept.getName()); properties.put("id", dept.getId()); feature.put("properties", properties); // 第二个键值 -// log.info("===========现在的id是=============="); -// log.info(dept.getId().toString()); - feature.put("geometry", new Gson().fromJson(dept.getGeometry(), Object.class)); // 第三个键值 features.add(feature); } diff --git a/src/test/java/com/biutag/supervision/tools/HttpTest.java b/src/test/java/com/biutag/supervision/tools/HttpTest.java new file mode 100644 index 0000000..9c6181f --- /dev/null +++ b/src/test/java/com/biutag/supervision/tools/HttpTest.java @@ -0,0 +1,91 @@ +package com.biutag.supervision.tools; + +import cn.hutool.http.HttpRequest; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.junit.jupiter.api.Test; + +/** + * @Auther: sh + * @Date: 2025/1/7 23:09 + * @Description: + */ +//@SpringBootTest +public class HttpTest { + + +// +// String result2 = "{\n" + +// " \"data\": [\n" + +// "\t{\n" + +// " \"id\": \"FE0F0C0D6B6E48D5AAC06767822E9E53\",\n" + +// " \"upGovId\": \"0658014A81F140D2AC765806833A76C9\",\n" + +// " \"areaCode\": \"430197\",\n" + +// " \"code\": \"430197470000\",\n" + +// " \"name\": \"部门1\"\n" + +// " }\n" + +// "\t],\n" + +// " \"resCode\": 0,\n" + +// " \"resMsg\": \"\"\n" + +// "}\n"; + @Test + public void HttpTest() throws JSONException { + String url = "http://11.33.3.4/api/v5/exporttable?id=BABA806481B64DF3BB0D04BE14A6DBD5"; + String cookie = "tokenId=f91363e6f267361d2249eafeb2b517f8; JSESSIONID=322f2409-6f92-47ef-9cee-f8388b2c1f4c; SERVERID=5c39a0ebea6918a7ed3d1cd439f2f1e8|1737013998|1737013654"; + try { + // 获取初始数据 + String result1 = HttpRequest.get(url).cookie(cookie).execute().body(); + JSONObject jsonResponse = new JSONObject(result1); + if (jsonResponse.getInt("resCode") == 0) { + JSONArray dataArray = jsonResponse.getJSONArray("data"); + + // 遍历并处理每条数据 + for (int i = 0; i < dataArray.length(); i++) { + JSONObject data = dataArray.getJSONObject(i); + String id = data.getString("id"); + String upGovId = data.getString("upGovId"); + String areaCode = data.getString("areaCode"); + String code = data.getString("code"); + String name = data.getString("name"); + + // 打印当前数据 + printData(id, upGovId, areaCode, code, name); + + // 请求并处理内层数据 + String innerUrl = "http://11.33.3.4/api/v5/exporttable?id=" + id; + String result2 = HttpRequest.get(innerUrl).cookie(cookie).execute().body(); + JSONObject jsonResponse2 = new JSONObject(result2); + if (jsonResponse2.getInt("resCode") == 0) { + JSONArray innerArray = jsonResponse2.getJSONArray("data"); + + // 遍历并打印内层数据 + for (int j = 0; j < innerArray.length(); j++) { + JSONObject innerData = innerArray.getJSONObject(j); + String innerId = innerData.getString("id"); + String innerUpGovId = innerData.getString("upGovId"); + String innerAreaCode = innerData.getString("areaCode"); + String innerCode = innerData.getString("code"); + String innerName = innerData.getString("name"); + + // 打印内层数据 + printData(innerId, innerUpGovId, innerAreaCode, innerCode, innerName); + System.out.println("<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>"); + } + } + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + private static void printData(String id, String upGovId, String areaCode, String code, String name) { + System.out.println("ID: " + id); + System.out.println("UpGovId: " + upGovId); + System.out.println("AreaCode: " + areaCode); + System.out.println("Code: " + code); + System.out.println("Name: " + name); + System.out.println("------------------------------"); + } +}