Browse Source

测试类

main
不爱学习的石同学 11 months ago
parent
commit
3e2c6908f5
  1. 8
      pom.xml
  2. 5
      src/main/java/com/biutag/supervision/controller/datav/DataVAuditController.java
  3. 10
      src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java
  4. 12
      src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java
  5. 15
      src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java
  6. 8
      src/main/java/com/biutag/supervision/controller/datav/DataVRightsComfortController.java
  7. 60
      src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java
  8. 42
      src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java
  9. 42
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java
  10. 24
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java
  11. 9
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java
  12. 2
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java
  13. 72
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java
  14. 42
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java
  15. 3
      src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java
  16. 91
      src/test/java/com/biutag/supervision/tools/HttpTest.java

8
pom.xml

@ -32,6 +32,14 @@
<dependencies>
<!-- jsoup -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.11.3</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>

5
src/main/java/com/biutag/supervision/controller/datav/AuditController.java → 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;

10
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<JSONObject>
*/
@Operation(summary = "分县市局排名")
@GetMapping("/getCaseVerificationRank")
public Result<JSONObject> 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<JSONObject>
*/
@Operation(summary = "案件问题性质")
@GetMapping("/getCaseProblemProperty")
public Result<JSONObject> 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<JSONObject>
*/
@Operation(summary = "中央数据总览")
@GetMapping("/getCaseVerificationCount")
public Result<JSONObject> 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<JSONObject>
*/
@Operation(summary = "地图Icon数据")
@GetMapping("/getCaseVerificationMap")
@Cacheable(cacheNames = "Supervision:Screen:CaseVerificationMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getCaseVerificationMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@ -114,6 +121,7 @@ public class DataVCaseVerifController {
* @param year 年份
* @return Result<JSONObject>
*/
@Operation(summary = "查处问题趋势")
@GetMapping("/getCaseVerificationTrend")
public Result<JSONObject> getCaseVerificationTrend(@RequestParam Integer year) {
List<EchartsVo> proTrendList = negativeMapper.getTrend(year, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
@ -132,6 +140,7 @@ public class DataVCaseVerifController {
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "案件来源占比 & 问责处理情况")
@GetMapping("/getCaseSourceRateAndDealSituation")
public Result<JSONObject> 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<JSONObject>
*/
@Operation(summary = "禁闭处理情况 & 停职处理情况")
@GetMapping("/getConfinementAndPause")
public Result<JSONObject> getConfinementAndPause(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {

12
src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java → 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<JSONObject>
*/
@Operation(summary = "首页大屏地图数据")
@Operation(summary = "首页大屏地图Icon数据")
@GetMapping("/getGlobalMap")
@Cacheable(cacheNames = "Supervision:Screen:GlobalMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getGlobalMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@ -174,4 +169,5 @@ public class DataGlobalController {
}
//endregion
}

15
src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java → 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<JSONObject>
*/
@Operation(summary = "信访数据大屏中央数据统计")
@Operation(summary = "中央数据统计")
@GetMapping("/getAllMailCount")
public Result<JSONObject> getAllMailCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {

8
src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java → 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;

60
src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java → 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<JSONObject> 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<JSONObject> 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<JSONObject> 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<SuperviseMapIconVo>
*/
@Operation(summary = "地图Icon数据")
@GetMapping("/getSupervisionNotifyMap")
@Cacheable(cacheNames = "Supervision:Screen:SupervisionNotifyMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getSupervisionNotifyMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@ -126,6 +124,7 @@ public class SupervisionNotifyController {
* @param year 年份
* @return List<EchartsVo>
*/
@Operation(summary = "问题趋势")
@GetMapping("/getSupervisionTrend")
public Result<JSONObject> getSupervisionTrend(@RequestParam Integer year) {
List<EchartsVo> 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<JSONObject> 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<JSONObject> 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<JSONObject> 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<JSONObject> 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<JSONObject> 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<JSONObject> getWorkDynamics(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {

42
src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java → 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<JSONObject> getVideoSuperviseProblemRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> fxsjVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> jsdwVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 4);
List<OrganizeProblemRankVo> fxsjVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> 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<JSONObject>
* 获取视频督察中央数据
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "视频督察大屏中央数据")
@Operation(summary = "中央数据")
@GetMapping("/getAllVideoSuperviseCount")
public Result<JSONObject> 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<JSONObject> getVideoSuperviseMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@ -98,7 +100,7 @@ public class VideoSuperviseController {
}
// 获取视频督察大屏中央问题趋势统计
@Operation(summary = "视频督察大屏问题趋势统计")
@Operation(summary = "问题趋势统计")
@GetMapping("/getVideoSuperviseTrend")
public Result<JSONObject> getVideoSuperviseTrend(@RequestParam Integer year) {
List<EchartsVo> videoSuperviseTrendList = negativeMapper.getTrend(year, SPDC.getValue());
@ -111,11 +113,11 @@ public class VideoSuperviseController {
// region 右边
// 问题类型占比
@Operation(summary = "视频督察大屏问题类型占比")
@Operation(summary = "问题类型占比")
@GetMapping("/getVideoSuperviseProblemTypeRate")
public Result<JSONObject> getVideoSuperviseProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> videoSuperviseProblemTypeRate = negativeMapper.getVideoSuperviseProblemTypeRate(beginTime, endTime);
List<EchartsVo> videoSuperviseProblemTypeRate = negativeMapper.getVideoSuperviseProblemTypeRate(beginTime, endTime);
JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseProblemTypeRate", videoSuperviseProblemTypeRate);
return Result.success(jsonObject);
}

42
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<JSONObject>
*/
@Operation(summary = "分县市局排名")
@GetMapping("/getSubOneCaseVerificationRank")
public Result<JSONObject> 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<JSONObject>
*/
@Operation(summary = "案件问题性质")
@GetMapping("/getSubOneCaseProblemProperty")
public Result<JSONObject> getCaseProblemProperty(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> zfbaPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId, 6); // 执法办案
List<EchartsVo> fwglPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId,11); // 服务管理
List<EchartsVo> fwglPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId, 11); // 服务管理
// List<EchartsVo> 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<JSONObject>
*/
@Operation(summary = "中央数据总览")
@GetMapping("/getSubOneAllCaseVerificationCount")
public Result<JSONObject> 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<JSONObject>
*/
@Operation(summary = "地图Icon数据")
@GetMapping("/getSubOneCaseVerificationMap")
@Cacheable(cacheNames = "Supervision:Screen:SubOneCaseVerificationMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()")
public Result<JSONObject> 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<CaseVerificationMapVo> 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<JSONObject>
*/
@Operation(summary = "查处问题趋势")
@GetMapping("/getSubOneCaseVerificationTrend")
public Result<JSONObject> getSubOneCaseVerificationTrend(@RequestParam String departId,
@RequestParam Integer year) {
List<EchartsVo> proTrendList = negativeMapper.getSubOneTrend(departId,String.valueOf(year) , A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<EchartsVo> 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<JSONObject>
*/
@Operation(summary = "案件来源占比 & 问责处理情况")
@GetMapping("/getSubOneCaseSourceRateAndDealSituation")
public Result<JSONObject> 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<EchartsVo> caseSourceRateList = negativeMapper.getSuboOneCaseSourceRate(beginTime, endTime, departId);
List<EchartsVo> 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<JSONObject>
*/
@Operation(summary = "禁闭处理情况 & 停职处理情况")
@GetMapping("/getSubOneConfinementAndPause")
public Result<JSONObject> 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<EchartsVo> jbclList = negativeMapper.getSubOneConfinementAndPause(beginTime, endTime,departId, 1); // 禁闭
// List<EchartsVo> 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);
}

24
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<JSONObject>
@ -74,7 +73,6 @@ public class SubOneGlobalController {
List<OrganizeProblemRankVo> 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<JSONObject>
@ -107,6 +106,7 @@ public class SubOneGlobalController {
/**
* 获取首页大屏中央数据
*
* @param departId 2级单位的id
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
@ -125,6 +125,7 @@ public class SubOneGlobalController {
/**
* 地图数据
*
* @param departId 2级单位的id
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
@ -133,10 +134,10 @@ public class SubOneGlobalController {
@GetMapping("/getSubOneGlobalMap")
@Cacheable(cacheNames = "Supervision:Screen:SubOneGlobalMap", key = "#departId+'_'+#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> 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<GlobalMapIconVo> GlobalTempMapVoList = negativeMapper.getSubOneGlobalMap(beginTime, endTime,departId);
List<GlobalMapIconVo> 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<JSONObject>
*/
@Operation(summary = "数据大屏问题趋势统计")
@GetMapping("/getSubOneGlobalTrend")
public Result<JSONObject> getSubOneGlobalTrend(@RequestParam Integer departId, @RequestParam Integer year) {
List<EchartsVo> 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<EchartsVo> 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<JSONObject>
@ -185,6 +188,7 @@ public class SubOneGlobalController {
/**
* 问题类型占比
*
* @param departId 2级单位的id
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>

9
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<JSONObject>
@ -83,6 +84,7 @@ public class SubOneMailViewController {
/**
* 信访数据中央总览统计
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
@ -104,6 +106,7 @@ public class SubOneMailViewController {
/**
* 信访数据中央地图小图标数据
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
@ -124,7 +127,8 @@ public class SubOneMailViewController {
/**
* 信访数据大屏信访趋势统计
*
* @param year 年份
* @param departId 部门id (分县市局ID)
* @param year 年份
* @return Result<JSONObject>
*/
@Operation(summary = "信访数据大屏信访趋势统计")
@ -149,6 +153,7 @@ public class SubOneMailViewController {
/**
* 缠访集访情况
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>

2
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

72
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<JSONObject> 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<JSONObject> 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<JSONObject> 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<SuperviseMapIconVo>
*/
@Operation(summary = "地图小卡片")
@GetMapping("/getSubOneSupervisionMap")
@Cacheable(cacheNames = "Supervision:Screen:SubOneSupervisionMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()")
public Result<JSONObject> getSubOneSupervisionMap(@RequestParam Integer departId,
@ -125,9 +130,11 @@ public class SubOneSupervisionNotifyController {
/**
* 获取现场督察问题趋势
*
* @param year 年份
* @param departId 部门id (分县市局ID)
* @param year 年份
* @return List<EchartsVo>
*/
@Operation(summary = "问题趋势")
@GetMapping("/getSubOneSupervisionTrend")
public Result<JSONObject> 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<JSONObject> 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<JSONObject> 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<JSONObject> 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<JSONObject> 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<JSONObject> 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<JSONObject> 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<NewsVo> newsVoList = newsService.getWorkDynamics(beginTime, endTime, DCGZDT, departId.toString());
JSONObject data = new JSONObject().fluentPut("newsVoList", newsVoList);
return Result.success(data);

42
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<JSONObject> 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<JSONObject>
@ -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<JSONObject> 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<VideoSuperviseMapIconVo> 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<JSONObject> getSubOneVideoSuperviseTrend(@RequestParam Integer departId, @RequestParam Integer year) {
List<EchartsVo> 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<JSONObject> getSubOneVideoSuperviseProblemTypeRate(@RequestParam Integer departId,

3
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);
}

91
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("------------------------------");
}
}
Loading…
Cancel
Save