Browse Source

二级地图数据

main
不爱学习的石同学 11 months ago
parent
commit
5890adf6ec
  1. 17
      src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java
  2. 2
      src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java
  3. 2
      src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java
  4. 2
      src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java
  5. 26
      src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java
  6. 2
      src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java
  7. 19
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java
  8. 23
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java
  9. 14
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java
  10. 37
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java
  11. 29
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java
  12. 5
      src/main/java/com/biutag/supervision/mapper/DataPetition12337Mapper.java
  13. 10
      src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java
  14. 105
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  15. 12
      src/main/java/com/biutag/supervision/mapper/SupDepartMapper.java
  16. 4
      src/main/java/com/biutag/supervision/pojo/vo/MailMapIconVo.java
  17. 92
      src/main/java/com/biutag/supervision/service/DataMailService.java
  18. 9
      src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java
  19. 10
      src/test/java/com/biutag/supervision/service/DataMailServiceTest.java

17
src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java

@ -90,7 +90,7 @@ public class DataGlobalController {
* @return Result<JSONObject>
*/
@Operation(summary = "大屏中央数据")
@GetMapping
@GetMapping("/getAllGlobalCount")
public Result<JSONObject> getAllGlobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 获取数据大屏中央总数概览
@ -107,13 +107,12 @@ public class DataGlobalController {
* @return Result<JSONObject>
*/
@Operation(summary = "首页大屏地图数据")
@GetMapping("/getMap")
// todo: 缓存取时间会出现多级目录
@Cacheable(cacheNames = "globalMap", key = " #beginTime.toString().substring(0, 10) + '_' + #endTime.toString().substring(0, 10)")
public Result<JSONObject> getMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
@GetMapping("/getGlobalMap")
@Cacheable(cacheNames = "Supervision:Screen:GlobalMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getGlobalMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 地图数据
List<GlobalMapIconVo> GlobalTempMapVoList = negativeMapper.getMapIcon(beginTime, endTime);
List<GlobalMapIconVo> GlobalTempMapVoList = negativeMapper.getGlobalMap(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", GlobalTempMapVoList);
return Result.success(data);
}
@ -126,7 +125,7 @@ public class DataGlobalController {
* @return Result<JSONObject>
*/
@Operation(summary = "数据大屏问题趋势统计")
@GetMapping("/getGlobalRecentlyTrendByMonth")
@GetMapping("/getGlobalTrend")
public Result<JSONObject> getGlobalRecentlyTrendByMonth(@RequestParam Integer year) {
List<EchartsVo> GlobalRecentlyTrendList = negativeMapper.getGlobalRecentlyTrendByMonth(year.toString());
JSONObject jsonObject = new JSONObject().fluentPut("globalRecentlyTrendList", GlobalRecentlyTrendList);
@ -170,7 +169,7 @@ public class DataGlobalController {
public Result<JSONObject> getProblemBusinessRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 问题类型占比
List<EchartsVo> wtlxlist= negativeMapper.selectProblemRate(beginTime, endTime);
List<EchartsVo> wtlxlist = negativeMapper.selectProblemRate(beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("wtlxlist", wtlxlist);
return Result.success(res);
}

2
src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java

@ -115,7 +115,7 @@ public class DataMailViewController {
*/
@Operation(summary = "信访数据中央地图小图标数据")
@GetMapping("/getMailMapIcon")
@Cacheable(cacheNames = "MailMap", key = "'p_'+ #endTime")
@Cacheable(cacheNames = "Supervision:Screen:MailMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getMailMapIcon(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 信访数据总数概览

2
src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java

@ -100,7 +100,7 @@ public class DataVCaseVerifController {
* @return Result<JSONObject>
*/
@GetMapping("/getCaseVerificationMap")
@Cacheable(cacheNames = "CaseVerificationMap", key = "'p_'+ #endTime")
@Cacheable(cacheNames = "Supervision:Screen:CaseVerificationMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getCaseVerificationMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<CaseVerificationMapVo> caseVerificationMapList = negativeMapper.getCaseVerificationMap(beginTime, endTime);

2
src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java

@ -16,6 +16,7 @@ import com.biutag.supervision.service.RpcApplyService;
import com.biutag.supervision.service.RpcInfringerResultService;
import lombok.RequiredArgsConstructor;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -112,6 +113,7 @@ public class DatavRightsComfortController {
// 地图图标数据
@GetMapping("/getComfortMapIcon")
@Cacheable(cacheNames = "Supervision:Screen:ComfortMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getComfortMapIcon(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<RightsComfortMapVo> comfortMapVoList = dataRightsComfortService.getComfortMapIcon(beginTime, endTime);

26
src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java

@ -40,7 +40,7 @@ public class SupervisionNotifyController {
private final DataSupervisionNotifyServiceImpl dataSupervisionNotifyService;
private final NegativeMapper negativeMapper;
// region 左边
// region 左边
/**
* 获取日常督察情况
@ -50,11 +50,11 @@ public class SupervisionNotifyController {
* @return
*/
@Operation(summary = "获取日常督察数量概览和整改率排名")
@GetMapping("/rank")
@GetMapping("/getChangedRank")
public Result<JSONObject> getChangedRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
DayTimeSuperviseVo fxsjRankOverview = negativeMapper.getSuperversionRank(beginTime, endTime, 3);
DayTimeSuperviseVo jsdwRankOverview = negativeMapper.getSuperversionRank(beginTime, endTime, 4);
DayTimeSuperviseVo fxsjRankOverview = negativeMapper.getSupervisionRank(beginTime, endTime, 3);
DayTimeSuperviseVo jsdwRankOverview = negativeMapper.getSupervisionRank(beginTime, endTime, 4);
List<RankVo> fxsjChangedRankList = negativeMapper.getChangedRateRank(beginTime, endTime, 3);
List<RankVo> jsdwChangedRankList = negativeMapper.getChangedRateRank(beginTime, endTime, 4);
JSONObject data = new JSONObject()
@ -81,9 +81,9 @@ public class SupervisionNotifyController {
return Result.success(data);
}
// endregion
// endregion
// region 中间
// region 中间
/**
* 获取现场督察大屏中央总览
@ -93,8 +93,8 @@ public class SupervisionNotifyController {
* @return
*/
@Operation(summary = "获取现场督察大屏中央总览")
@GetMapping
public Result<JSONObject> getAllSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@GetMapping("/getSupervisionNotifyCount")
public Result<JSONObject> getSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
SupervisionNotifyOverView overview = negativeMapper.getAllSupervisionNotifyCount(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview);
@ -108,9 +108,9 @@ public class SupervisionNotifyController {
* @param endTime 结束时间
* @return List<SuperviseMapIconVo>
*/
@GetMapping("/getMap")
@Cacheable(cacheNames = "superviseMap", key = "'p_'+ #endTime")
public Result<JSONObject> getMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@GetMapping("/getSupervisionNotifyMap")
@Cacheable(cacheNames = "Supervision:Screen:SupervisionNotifyMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getSupervisionNotifyMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
//地图数据
List<SuperviseMapIconVo> superviseTempMapVoList = negativeMapper.getSupervisionMapIconInfo(beginTime, endTime);
@ -131,9 +131,9 @@ public class SupervisionNotifyController {
return Result.success(data);
}
// endregion
// endregion
// region 右边
// region 右边
/**
* 黄赌毒数据

2
src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java

@ -86,7 +86,7 @@ public class VideoSuperviseController {
*/
@Operation(summary = "视频督察大屏地图数据")
@GetMapping("/getVideoSuperviseMap")
@Cacheable(cacheNames = "videoSuperviseMap", key = "'p_'+ #endTime")
@Cacheable(cacheNames = "Supervision:Screen:VideoSuperviseMap", key = "#beginTime.getTime()+'_'+#endTime.getTime()")
public Result<JSONObject> getVideoSuperviseMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {

19
src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java

@ -106,15 +106,15 @@ public class SubOneCaseVerifController {
* @param endTime 结束时间
* @return Result<JSONObject>
*/
// @GetMapping("/getCaseVerificationMap")
// @Cacheable(cacheNames = "CaseVerificationMap", key = "'p_'+ #endTime")
// public Result<JSONObject> getCaseVerificationMap(@RequestParam Integer departId,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// List<CaseVerificationMapVo> caseVerificationMapList = negativeMapper.getCaseVerificationMap(beginTime, endTime);
// JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList);
// return Result.success(res);
// }
@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) {
List<CaseVerificationMapVo> caseVerificationMapList = negativeMapper.getSubOneCaseVerificationMap(beginTime, endTime, departId);
JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList);
return Result.success(res);
}
/**
* 查处问题趋势
@ -128,7 +128,6 @@ public class SubOneCaseVerifController {
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);
// return null;
}
// endregion

23
src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java

@ -129,18 +129,17 @@ public class SubOneGlobalController {
* @param endTime 结束时间
* @return Result<JSONObject>
*/
// @Operation(summary = "首页大屏地图数据")
// @GetMapping("/getSubOneMap")
// // todo: 缓存取时间会出现多级目录
// @Cacheable(cacheNames = "subOneGlobalMap", key = " #beginTime.toString().substring(0, 10) + '_' + #endTime.toString().substring(0, 10)")
// public Result<JSONObject> subOneGlobalMap(@RequestParam Integer departId,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// // 地图数据
// List<GlobalMapIconVo> GlobalTempMapVoList = negativeMapper.getMapIcon(beginTime, endTime);
// JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", GlobalTempMapVoList);
// return Result.success(data);
// }
@Operation(summary = "首页大屏地图数据")
@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) {
// 地图数据
List<GlobalMapIconVo> GlobalTempMapVoList = negativeMapper.getSubOneGlobalMap(beginTime, endTime,departId);
JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", GlobalTempMapVoList);
return Result.success(data);
}
/**

14
src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java

@ -109,12 +109,13 @@ public class SubOneMailViewController {
* @return Result<JSONObject>
*/
@Operation(summary = "信访数据中央地图小图标数据")
@GetMapping("/getMailMapIcon")
@Cacheable(cacheNames = "MailMap", key = "'p_'+ #endTime")
public Result<JSONObject> getMailMapIcon(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
@GetMapping("/getSubOneMailMapIcon")
@Cacheable(cacheNames = "Supervision:Screen:SubOneMailMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()")
public Result<JSONObject> getSubOneMailMapIcon(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 信访数据总数概览
List<MailMapIconVo> mailMapIconList = dataMailService.getMailMapIcon(beginTime, endTime);
List<MailMapIconVo> mailMapIconList = dataMailService.getSubOneMailMapIcon(beginTime, endTime, departId);
JSONObject data = new JSONObject().fluentPut("mailMapIconList", mailMapIconList);
return Result.success(data);
}
@ -128,7 +129,8 @@ public class SubOneMailViewController {
*/
@Operation(summary = "信访数据大屏信访趋势统计")
@GetMapping("/getSubOneMailTrend")
public Result<JSONObject> getSubOneMailTrend(@RequestParam Integer departId, @RequestParam Integer year) {
public Result<JSONObject> getSubOneMailTrend(@RequestParam Integer departId,
@RequestParam Integer year) {
List<EchartsVo> countryList = dataPetitionComplaintMapper.getSubOneMailTrend(year, 21, departId);
List<EchartsVo> policeList = dataPetitionComplaintMapper.getSubOneMailTrend(year, 22, departId);
List<EchartsVo> manageList = dataPetitionComplaintMapper.getSubOneMailTrend(year, 23, departId);

37
src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java

@ -9,6 +9,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -97,6 +98,24 @@ public class SubOneSupervisionNotifyController {
return Result.success(data);
}
/**
* 地图小卡片
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return List<SuperviseMapIconVo>
*/
@GetMapping("/getSubOneSupervisionMap")
@Cacheable(cacheNames = "Supervision:Screen:SubOneSupervisionMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()")
public Result<JSONObject> getSubOneSupervisionMap(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
//地图数据
List<SuperviseMapIconVo> superviseTempMapVoList = negativeMapper.getSubOneSupervisionMapIcon(beginTime, endTime, departId);
JSONObject data = new JSONObject().fluentPut("superviseTempMapVoList", superviseTempMapVoList);
return Result.success(data);
}
/**
* 获取现场督察问题趋势
@ -107,7 +126,7 @@ public class SubOneSupervisionNotifyController {
@GetMapping("/getSubOneSupervisionTrend")
public Result<JSONObject> getSubOneSupervisionTrend(@RequestParam Integer departId,
@RequestParam String year) {
List<EchartsVo> supervisionTrend = negativeMapper.getSubOneTrend(departId.toString(), year, "13", "15");
List<EchartsVo> supervisionTrend = negativeMapper.getSubOneTrend(departId.toString(), year, "13", "15");
JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend);
return Result.success(data);
}
@ -146,8 +165,8 @@ public class SubOneSupervisionNotifyController {
// 枪支管理数据
@GetMapping("/getSubOneGunController")
public Result<JSONObject> getSubOneGunController(@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) {
// 枪支管理总览
DayTimeSuperviseVo fxsjGunControllerOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 2);
DayTimeSuperviseVo jsdwGunControllerOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 2);
@ -166,8 +185,8 @@ public class SubOneSupervisionNotifyController {
// 涉企问题数据
@GetMapping("/getSubOneCompanyProblem")
public Result<JSONObject> getSubOneCompanyProblem(@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) {
// 涉企问题总览
DayTimeSuperviseVo fxsjCompanyProblemOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 3);
DayTimeSuperviseVo jsdwCompanyProblemOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 3);
@ -186,8 +205,8 @@ public class SubOneSupervisionNotifyController {
// 执法办案数据
@GetMapping("/getSubOneHandleCase")
public Result<JSONObject> getSubOneHandleCase(@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) {
// 执法办案总览
DayTimeSuperviseVo fxsjHandleCaseOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 4);
DayTimeSuperviseVo jsdwHandleCaseOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 4);
@ -207,8 +226,8 @@ public class SubOneSupervisionNotifyController {
// 工作日测酒数据
@GetMapping("/getSubOneCheckBeer")
public Result<JSONObject> getSubOneCheckBeer(@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) {
// 工作日测酒总览
DayTimeSuperviseVo fxsjCheckBeerOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 5);
DayTimeSuperviseVo jsdwCheckBeerOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 5);

29
src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java

@ -1,22 +1,27 @@
package com.biutag.supervision.controller.subdatav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import com.biutag.supervision.pojo.vo.VideoSuperviseCountVo;
import com.biutag.supervision.pojo.vo.VideoSuperviseMapIconVo;
import com.biutag.supervision.service.SubOneVideoSuperviseService;
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;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SPDC;
@ -32,7 +37,7 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SPDC;
public class SubOneVideoSuperviseController {
private final SubOneVideoSuperviseService subOneVideoSuperviseService;
private final NegativeMapper negativeMapper;
// region 左边
@Operation(summary = "视频督察二级大屏问题数排名")
@ -70,6 +75,28 @@ public class SubOneVideoSuperviseController {
}
/**
* 获取视频督察地图数据
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return
*/
@Operation(summary = "视频督察大屏地图数据")
@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) {
// 地图数据
List<VideoSuperviseMapIconVo> videoSuperviseMapIconVoList = Optional.ofNullable(negativeMapper.getSubOneVideoSuperviseMapIconInfo(beginTime, endTime, departId)).
orElseGet(ArrayList::new);
JSONObject data = new JSONObject().fluentPut("videoSuperviseMapIconVoList", videoSuperviseMapIconVoList);
return Result.success(data);
}
@Operation(summary = "视频督察二级数据大屏问题趋势统计")
@GetMapping("/getSubOneVideoSuperviseTrend")
public Result<JSONObject> getSubOneVideoSuperviseTrend(@RequestParam Integer departId, @RequestParam Integer year) {

5
src/main/java/com/biutag/supervision/mapper/DataPetition12337Mapper.java

@ -46,6 +46,11 @@ public interface DataPetition12337Mapper extends BaseMapper<DataPetition12337> {
"GROUP BY m.month_name " +
"ORDER BY m.month ASC;")
List<EchartsVo> getSubOneMailTrend12337(Integer year, Integer departId);
@Select("select count(*) from data_petition_12337 " +
"where discover_time between #{beginTime} and #{endTime} " +
"and third_depart_id=#{departId}")
Integer select12337PoliceMailBySourceCode(Date beginTime, Date endTime, Integer departId);
}

10
src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java

@ -84,8 +84,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"SUM( IF(dpc.problem_sources_code=21,1,0)) AS countryMail, " +
"SUM( IF(dpc.problem_sources_code=22,1,0)) AS policeMail " +
"FROM data_petition_complaint dpc " +
"WHERE dpc.third_depart_id IS NOT NULL " +
"AND dpc.discovery_time BETWEEN #{beginTime} AND #{endTime}" )
"WHERE dpc.discovery_time BETWEEN #{beginTime} AND #{endTime}" )
MailOverviewVo selectMailOverviewVo(Date beginTime, Date endTime);
@ -341,4 +340,11 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
List<OrganizeProblemRankVo> getTeamMassMailRank(Date beginTime, Date endTime, Integer departId);
@Select("select count(*) " +
"from data_petition_complaint dpc " +
"where problem_sources_code=#{problemSourcesCode} " +
"and dpc.third_depart_id=#{departId} " +
"and discovery_time BETWEEN #{beginTime} AND #{endTime} ")
Integer selectPoliceMailBySourceCode(Date beginTime, Date endTime, String problemSourcesCode, String departId);
}

105
src/main/java/com/biutag/supervision/mapper/NegativeMapper.java

@ -80,13 +80,14 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE sd.statistics_group_id=3 " +
"GROUP BY sd.short_name " +
"ORDER BY totalPro DESC;")
List<GlobalMapIconVo> getMapIcon(Date beginTime, Date endTime);
List<GlobalMapIconVo> getGlobalMap(Date beginTime, Date endTime);
List<EchartsVo> getGlobalRecentlyTrendByMonth(String year);
/**
* 首页大屏突出问题排名
*
* @param beginTime
* @param endTime
* @return
@ -118,7 +119,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE problemSourcesCode IN (13) " +
"AND sd.statistics_group_id=#{groupId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime};")
DayTimeSuperviseVo getSuperversionRank(Date beginTime, Date endTime, Integer groupId);
DayTimeSuperviseVo getSupervisionRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT " +
"sd.short_name AS label, " +
@ -133,7 +134,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND sd.statistics_group_id=#{groupId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY rate")
"ORDER BY rate desc")
List<RankVo> getChangedRateRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " +
@ -408,6 +409,24 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative ng WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} ")
GlobalOverViewVo getSuoOneAllGlobalCount(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"csd.`name` AS `name`, " +
"csd.dept_name AS policeName, " +
"csd.dept_pid, " +
"csd.dept_id AS departId, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " +
"SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisePro, " +
"SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerifyPro, " +
"SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS mailPro, " +
"SUM( IF(problemSourcesCode IN (2),1, 0) ) AS policePro, " +
"SUM( IF(problemSourcesCode IN (27,28,29,30),1, 0) ) AS reviewPro " +
"FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " +
"GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId} ")
List<GlobalMapIconVo> getSubOneGlobalMap(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
@ -487,7 +506,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (13,15,16)\n" +
"AND ng.problemSourcesCode IN (13,15,16)" +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10 " +
"GROUP BY ng.involveDepartName " +
@ -513,7 +532,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20)\n" +
"AND ng.problemSourcesCode IN (17,18,19,20)" +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id=10")
SubOneOverViewVo getGlobalPoliceCaseVerifyOverView(Integer departPId, Date beginTime, Date endTime);
@ -525,7 +544,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20)\n" +
"AND ng.problemSourcesCode IN (17,18,19,20)" +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10")
SubOneOverViewVo getGlobalTeamCaseVerifyOverView(Integer departPId, Date beginTime, Date endTime);
@ -824,7 +843,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)\n" +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)" +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"GROUP BY ng.involveDepartName " +
@ -837,7 +856,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)\n" +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)" +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"GROUP BY ng.involveDepartName " +
@ -870,6 +889,28 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND ng.problemSourcesCode in (17, 18, 19, 20); ")
CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"csd.`name` AS `name`, " +
"csd.dept_name AS policeName, " +
"csd.dept_pid, " +
"csd.dept_id AS departId, " +
"COUNT( DISTINCT ng.id ) AS total, " +
"COUNT( DISTINCT IF( ng.checkStatus<>3, ng.id, NULL ) ) AS confirmed, " +
"COUNT( DISTINCT IF( nb.handleResultCode!=14, nb.blameId, NULL ) ) AS dealCasePro, " +
"COUNT( DISTINCT nb.blameIdCode ) AS punishPre, " +
"COUNT( DISTINCT nb.blameDepartId ) AS punishOrg, " +
"IFNULL( ROUND( COUNT( DISTINCT IF( ng.isRectifyCode=1, ng.id, NULL ) )/COUNT( DISTINCT ng.id )*100, 1 ), 0) AS rate " +
"FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId} ")
List<CaseVerificationMapVo> getSubOneCaseVerificationMap(Date beginTime, Date endTime, Integer departId);
@Select("SELECT sdps.label AS `name` , " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
@ -903,6 +944,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
/**
* 首页大屏问题类型占比
*
* @param beginTime
* @param endTime
* @return
@ -910,7 +952,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT " +
"npr.oneLevelContent as name, " +
"count(*) `value` FROM negative_problem_relation npr " +
"LEFT JOIN negative ng ON ng.id=npr.negativeId\n" +
"LEFT JOIN negative ng ON ng.id=npr.negativeId " +
"WHERE checkStatus in (1, 2) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND npr.oneLevelContent is not NULL " +
@ -918,6 +960,51 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"ORDER BY `value` desc")
List<EchartsVo> selectProblemRate(Date beginTime, Date endTime);
@Select("SELECT " +
"csd.`name` AS `name`, " +
"csd.dept_name AS policeName, " +
"csd.dept_pid, " +
"csd.dept_id AS departId, " +
"COUNT( DISTINCT ng.id ) AS discoverProblem, " +
"COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) AS changedProblem, " +
"COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " +
"COUNT( DISTINCT nb.blameName ) AS relativePer, " +
"IFNULL( ROUND( ( COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT( DISTINCT ng.id ) ) * 100, 1 ), 0) AS changedRate " +
"FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.checkStatus IN (1,2) " +
"AND ng.problemSourcesCode=16 " +
"AND ng.second_involve_depart_id=#{departId} " +
"GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId} ")
List<VideoSuperviseMapIconVo> getSubOneVideoSuperviseMapIconInfo(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"csd.`name` AS `name`, " +
"csd.dept_name AS policeName, " +
"csd.dept_pid, " +
"csd.dept_id AS departId, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " +
"COUNT( DISTINCT IF(ng.problemSourcesCode=13, ng.id, NULL) ) AS xc, " +
"COUNT( DISTINCT IF(ng.problemSourcesCode=15, ng.id, NULL) ) AS zx, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed , " +
"COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " +
"COUNT( DISTINCT nb.blameIdCode ) AS personNum, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS changedRate " +
"FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"AND ng.problemSourcesCode IN (13, 15) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId} ")
List<SuperviseMapIconVo> getSubOneSupervisionMapIcon(Date beginTime, Date endTime, Integer departId);
// endregion

12
src/main/java/com/biutag/supervision/mapper/SupDepartMapper.java

@ -39,4 +39,16 @@ public interface SupDepartMapper extends BaseMapper<SupDepart> {
*/
@Select("select * from sup_depart where statistics_group_id = #{groupType} ")
List<SupDepart> selectDepartsByGroupType(Integer groupType);
/**
* 按pid查询派出所还有它的街道 在街道表里面找的
* @param departId 所属的单位 Pid
* @return
*/
@Select("SELECT " +
"dept_id AS id, " +
"name AS shortName " +
"FROM county_street_dept WHERE dept_pid=#{departId}")
List<SupDepart> selectPoliceDeparts(Integer departId);
}

4
src/main/java/com/biutag/supervision/pojo/vo/MailMapIconVo.java

@ -11,8 +11,8 @@ import java.io.Serializable;
*/
@Data
public class MailMapIconVo implements Serializable {
private String name; // 分县市局名字
private String departId; // 分县市局id
private String name; // 名字
private String departId; // id
private String total;
private String countryTotal;

92
src/main/java/com/biutag/supervision/service/DataMailService.java

@ -141,33 +141,36 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
//所有分类数据总数
public MailOverviewVo allMailCount(Date beginTime, Date endTime) {
MailOverviewVo temp = dataPetitionComplaintMapper.selectMailOverviewVo(beginTime, endTime);
// 国家信访
// QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>();
// countryQueryWrapper.eq("problem_sources_code", 21);
// countryQueryWrapper.between("discovery_time", beginTime, endTime);
// Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper);
// System.out.println("国家信访数量:" + countryMail);
// // 公安部信访
// QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>();
// policeQueryWrapper.eq("problem_sources_code", 22);
// policeQueryWrapper.between("discovery_time", beginTime, endTime);
// Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper);
// System.out.println("公安部信访数量:" + policeMail);
// 12337信访
// MailOverviewVo temp = dataPetitionComplaintMapper.selectMailOverviewVo(beginTime, endTime);
MailOverviewVo temp = new MailOverviewVo();
QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>();
countryQueryWrapper.eq("problem_sources_code", 21);
countryQueryWrapper.between("discovery_time", beginTime, endTime);
Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper); // 国家信访
System.out.println("国家信访数量:" + countryMail);
QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>();
policeQueryWrapper.eq("problem_sources_code", 22);
policeQueryWrapper.between("discovery_time", beginTime, endTime);
Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper); // 公安部信访
System.out.println("公安部信访数量:" + policeMail);
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.between("discover_time", beginTime, endTime);
Long numberMail = dataPetition12337Mapper.selectCount(queryWrapper12337);
temp.setNumberMail(numberMail);
System.out.println("12337信访数量:" + numberMail);
Long manageMail = 5812L;
Long manageMail = 5812L; // 12337信访
// 总数
temp.setTotalMail(temp.getCountryMail() + temp.getPoliceMail() + numberMail );
Long totalMail = countryMail + policeMail + numberMail;
temp.setCountryMail(countryMail);
temp.setPoliceMail(policeMail);
temp.setNumberMail(numberMail);
temp.setTotalMail(totalMail);
temp.setManageMail(manageMail);
return temp;
}
public List<MailMapIconVo> getMailMapIcon(Date beginTime, Date endTime) {
List<MailMapIconVo> res = new ArrayList<>();
// 查询所有区县局
@ -197,18 +200,65 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
}
public MailOverviewVo getSubOneAllMailCount(Date beginTime, Date endTime, Integer departId) {
MailOverviewVo temp = dataPetitionComplaintMapper.selectSubOneMailOverviewVo(beginTime, endTime, departId);
// 国家信访
// MailOverviewVo temp = dataPetitionComplaintMapper.selectSubOneMailOverviewVo(beginTime, endTime, departId);
MailOverviewVo temp = new MailOverviewVo();
QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>();
countryQueryWrapper.eq("problem_sources_code", 21);
countryQueryWrapper.eq("second_depart_id", departId);
countryQueryWrapper.between("discovery_time", beginTime, endTime);
Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper); // 国家信访
QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>();
policeQueryWrapper.eq("problem_sources_code", 22);
policeQueryWrapper.eq("second_depart_id", departId);
policeQueryWrapper.between("discovery_time", beginTime, endTime);
Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper); // 公安部信访
System.out.println("公安部信访数量:" + policeMail);
// 12337信访
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.eq("second_depart_id", departId);
queryWrapper12337.between("discover_time", beginTime, endTime);
Long numberMail = dataPetition12337Mapper.selectCount(queryWrapper12337);
temp.setNumberMail(numberMail);
System.out.println("12337信访数量:" + numberMail);
Long manageMail = 0L;
// 总数
temp.setTotalMail(temp.getCountryMail() + temp.getPoliceMail() + numberMail );
Long totalMail = countryMail + policeMail + numberMail;
temp.setCountryMail(countryMail);
temp.setPoliceMail(policeMail);
temp.setNumberMail(numberMail);
temp.setTotalMail(totalMail);
temp.setManageMail(manageMail);
return temp;
}
public List<MailMapIconVo> getSubOneMailMapIcon(Date beginTime, Date endTime, Integer departId) {
List<MailMapIconVo> res = new ArrayList<>();
// 查该区县局下属所有派出所
List<SupDepart> policeDeparts = supDepartMapper.selectPoliceDeparts(departId);
for (SupDepart supDepart : policeDeparts) {
MailMapIconVo mapIconVo = new MailMapIconVo();
mapIconVo.setName(supDepart.getShortName());
mapIconVo.setDepartId(supDepart.getId());
res.add(mapIconVo);
}
// 查询国家信访和公安部信访数据
for (MailMapIconVo re : res) {
String policeDepartId = re.getDepartId();
Integer countryTotal = dataPetitionComplaintMapper.selectPoliceMailBySourceCode(beginTime, endTime, GJXFPT.getValue(), policeDepartId);
Integer policeTotal = dataPetitionComplaintMapper.selectPoliceMailBySourceCode(beginTime, endTime, GABXF.getValue(), policeDepartId);
Integer commissionerTotal = 0; // 局长信箱
// 查询12337 数据
Integer numTotal = dataPetition12337Mapper.select12337PoliceMailBySourceCode(beginTime, endTime, departId);
Integer total = countryTotal + policeTotal + commissionerTotal + numTotal;
re.setCountryTotal(countryTotal.toString());
re.setPoliceTotal(policeTotal.toString());
re.setCommissionerTotal(commissionerTotal.toString());
re.setNumTotal(numTotal.toString());
re.setTotal(total.toString());
}
return res;
}
}

9
src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java

@ -42,14 +42,7 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisio
// region 左边
// 获取日常督察情况总览
public DayTimeSuperviseVo getSuperversionRank(Date beginTime, Date endTime, Integer groupId) {
DayTimeSuperviseVo res = negativeMapper.getSuperversionRank(beginTime, endTime, groupId);
if (res == null) {
return new DayTimeSuperviseVo(0, 0, 0, 0.0);
}
return res;
}
// 获取日常督察整改率排名
public List<RankVo> getChangedRateRank(Integer groupType, Date beginTime, Date endTime) {

10
src/test/java/com/biutag/supervision/service/DataMailServiceTest.java

@ -1,6 +1,7 @@
package com.biutag.supervision.service;
import com.biutag.supervision.pojo.vo.MailMapIconVo;
import com.biutag.supervision.pojo.vo.MailOverviewVo;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@ -28,6 +29,15 @@ class DataMailServiceTest {
for (MailMapIconVo mailMapIconVo : mailMapIcon) {
System.out.println(mailMapIconVo.toString());
}
}
@Test
void getMailCount() throws ParseException {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date begin = formatter.parse("2024-01-01");
Date end = formatter.parse("2024-12-29");
MailOverviewVo subOneAllMailCount = dataMailService.getSubOneAllMailCount(begin, end, 3337);
System.out.println(subOneAllMailCount.toString());
}
}
Loading…
Cancel
Save