Browse Source

二级屏幕开始

main
parent
commit
d75c5913f4
  1. 22
      src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java
  2. 149
      src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java
  3. 153
      src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java
  4. 86
      src/main/java/com/biutag/supervision/controller/datav/PoliceComment.java
  5. 2
      src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java
  6. 105
      src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java
  7. 25
      src/main/java/com/biutag/supervision/mapper/CountyStreetDeptMapper.java
  8. 52
      src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java
  9. 152
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  10. 33
      src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java
  11. 92
      src/main/java/com/biutag/supervision/pojo/entity/CountyStreetDept.java
  12. 22
      src/main/java/com/biutag/supervision/pojo/vo/CaseVerificationCountVo.java
  13. 21
      src/main/java/com/biutag/supervision/pojo/vo/CaseVerificationMapVo.java
  14. 18
      src/main/java/com/biutag/supervision/pojo/vo/ComfortCountVO.java
  15. 21
      src/main/java/com/biutag/supervision/pojo/vo/MapAreaVo.java
  16. 21
      src/main/java/com/biutag/supervision/pojo/vo/RankVoSup.java
  17. 23
      src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseCountVo.java
  18. 27
      src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseMapIconVo.java
  19. 68
      src/main/java/com/biutag/supervision/service/CaseVerificationService.java
  20. 30
      src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java
  21. 18
      src/main/java/com/biutag/supervision/service/DataCaseVerifService.java
  22. 240
      src/main/java/com/biutag/supervision/service/DataMailService.java
  23. 24
      src/main/java/com/biutag/supervision/service/DataRightsComfortService.java
  24. 4
      src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java
  25. 69
      src/main/java/com/biutag/supervision/service/VideoSuperviseService.java
  26. 60
      src/main/resources/mapper/NegativeMapper.xml

22
src/main/java/com/biutag/supervision/controller/datav/DataPetitionComplaintViewController.java → src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java

@ -9,7 +9,7 @@ import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.CaseVerifDepart;
import com.biutag.supervision.pojo.vo.RecentMailTrendByDayVo;
import com.biutag.supervision.pojo.vo.RecentMailTrendByMonthVo;
import com.biutag.supervision.service.DataPetitionComplaintService;
import com.biutag.supervision.service.DataMailService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
@ -38,9 +38,9 @@ import java.util.stream.Collectors;
@RequestMapping("datav/mailVisits")
@RequiredArgsConstructor
@RestController
public class DataPetitionComplaintViewController {
public class DataMailViewController {
private final DataPetitionComplaintService dataPetitionComplaintService;
private final DataMailService dataMailService;
private final DataPetitionComplaintMapper dataPetitionComplaintMapper;
/**
@ -53,14 +53,14 @@ public class DataPetitionComplaintViewController {
@GetMapping
public Result<JSONObject> mailVisits(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 信访数据总数概览
JSONObject overview = dataPetitionComplaintService.allMailCount(beginTime, endTime);
JSONObject overview = dataMailService.allMailCount(beginTime, endTime);
// 分县市局信初重访领导访排名
List<CaseVerifDepart> fxsjFirstMailList = dataPetitionComplaintService.mailRank(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), RepeatEnum.FIRST_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> fxsjRepeatMailList = dataPetitionComplaintService.mailRank(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), RepeatEnum.REPEAT_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> fxsjFirstMailList = dataMailService.mailRank(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), RepeatEnum.FIRST_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> fxsjRepeatMailList = dataMailService.mailRank(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), RepeatEnum.REPEAT_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> fxsjLeaderViewMailList = dataPetitionComplaintMapper.selectLeaderViewMail(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), beginTime, endTime);
// 部委支队初重领导访排名
List<CaseVerifDepart> bwzdFirstMailList = dataPetitionComplaintService.mailRank(DepartGroupEnum.BUREAU_AFFILIATED.getId(), RepeatEnum.FIRST_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> bwzdRepeatMailList = dataPetitionComplaintService.mailRank(DepartGroupEnum.BUREAU_AFFILIATED.getId(), RepeatEnum.REPEAT_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> bwzdFirstMailList = dataMailService.mailRank(DepartGroupEnum.BUREAU_AFFILIATED.getId(), RepeatEnum.FIRST_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> bwzdRepeatMailList = dataMailService.mailRank(DepartGroupEnum.BUREAU_AFFILIATED.getId(), RepeatEnum.REPEAT_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> bwzdLeaderViewMailList = dataPetitionComplaintMapper.selectLeaderViewMail(DepartGroupEnum.BUREAU_AFFILIATED.getId(), beginTime, endTime);
// 分县市局领导督办、缠访、集访排名
List<CaseVerifDepart> fxsjEntanglementMailList = dataPetitionComplaintMapper.selectEntanglementMail(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), 1, beginTime, endTime);
@ -90,7 +90,7 @@ public class DataPetitionComplaintViewController {
public Result<JSONObject> getRecentlyMailTrendByDay(@RequestParam Integer sourcesCode, @RequestParam Integer days, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date startTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
JSONObject jsonObject = new JSONObject();
// 库中的数据 2024/10/24 22
List<RecentMailTrendByDayVo> recentMailTrendVoList = dataPetitionComplaintService.getRecentlyMailTrendByDay(sourcesCode, days, endTime);
List<RecentMailTrendByDayVo> recentMailTrendVoList = dataMailService.getRecentlyMailTrendByDay(sourcesCode, days, endTime);
ArrayList<String> dayList = new ArrayList<>();
ArrayList<String> totalList = new ArrayList<>();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
@ -128,7 +128,7 @@ public class DataPetitionComplaintViewController {
@GetMapping("/getRecentlyMailTrendMonth")
public Result<JSONObject> getRecentlyMailTrendByMonth(@RequestParam Integer sourcesCode, @RequestParam Integer year) {
JSONObject jsonObject = new JSONObject();
List<RecentMailTrendByMonthVo> recentMailTrendVoList = dataPetitionComplaintService.getRecentlyMailTrendByMonth(sourcesCode, String.valueOf(year));
List<RecentMailTrendByMonthVo> recentMailTrendVoList = dataMailService.getRecentlyMailTrendByMonth(sourcesCode, String.valueOf(year));
ArrayList<String> monthList = new ArrayList<>();
ArrayList<String> totalList = new ArrayList<>();
for (RecentMailTrendByMonthVo recentMailTrendByMonthVo : recentMailTrendVoList) {
@ -151,7 +151,7 @@ public class DataPetitionComplaintViewController {
@GetMapping("/getRecentlyMailTrendByMonth12337")
public Result<JSONObject> getRecentlyMailTrendByMonth12337(@RequestParam Integer year) {
JSONObject jsonObject = new JSONObject();
List<RecentMailTrendByMonthVo> recentMailTrendVoList = dataPetitionComplaintService.getRecentlyMailTrendByMonth12337(String.valueOf(year));
List<RecentMailTrendByMonthVo> recentMailTrendVoList = dataMailService.getRecentlyMailTrendByMonth12337(String.valueOf(year));
ArrayList<String> monthList = new ArrayList<>();
ArrayList<String> totalList = new ArrayList<>();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");

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

@ -1,17 +1,13 @@
package com.biutag.supervision.controller.datav;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.supervision.constants.enums.CaseVerifProblemNatureEnum;
import com.biutag.supervision.constants.enums.DepartGroupEnum;
import com.biutag.supervision.mapper.DataCaseVerifMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.CaseVerifDepart;
import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.DataCaseVerif;
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.service.DataCaseVerifService;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import com.biutag.supervision.service.CaseVerificationService;
import lombok.RequiredArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
@ -19,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@ -32,84 +27,96 @@ import java.util.List;
@RestController
public class DataVCaseVerifController {
private final DataCaseVerifService dataCaseVerifService;
private final DataCaseVerifMapper dataCaseVerifMapper;
private final CaseVerificationService caseVerificationService;
// region 左边
// 案件核查大屏分县市局排名
@GetMapping("/getCaseVerificationRank")
public Result<JSONObject> getCaseVerificationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> fxsjRankList = caseVerificationService.getCaseVerificationRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> jsdwRankList = caseVerificationService.getCaseVerificationRank(beginTime, endTime, 4);
JSONObject data = new JSONObject()
.fluentPut("fxsjRankList", fxsjRankList)
.fluentPut("jsdwRankList", jsdwRankList);
return Result.success(data);
}
@GetMapping
public Result<JSONObject> caseVerif(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
long total = dataCaseVerifService.count(new LambdaQueryWrapper<DataCaseVerif>().between(DataCaseVerif::getDiscoveryTime, beginTime, endTime));
long confirmed = 0;
JSONObject overview = new JSONObject()
// 案件总数(起)
.fluentPut("total", total)
// 查实案件数
.fluentPut("confirmed", 0)
// 查处问题(个)
.fluentPut("investigateAndPunish", 0)
// 问责人次
.fluentPut("accountablePeopleNumber", 0)
// 问责单位数
.fluentPut("accountableDepartNumber", 0)
// 查实率
.fluentPut("confirmedRate", total == 0 ? 0 : BigDecimal.valueOf(NumberUtil.div(confirmed, total) * 100).intValue());
// 分县市局排名
List<CaseVerifDepart> fxsjBarList = dataCaseVerifMapper.selectDepartStatistic(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), beginTime, endTime);
// 局属单位排名
List<CaseVerifDepart> jsdwBarList = dataCaseVerifMapper.selectDepartStatistic(DepartGroupEnum.BUREAU_AFFILIATED.getId(), beginTime, endTime);
// 执法办案
List<PieItem> zfbaPieList = dataCaseVerifMapper.selectInvolveProblemGroupByBusinessTypeName(CaseVerifProblemNatureEnum.ZFBA.getLaebl(), beginTime, endTime);
// 服务管理
List<PieItem> fwglPieList = dataCaseVerifMapper.selectInvolveProblemGroupByBusinessTypeName(CaseVerifProblemNatureEnum.FWGL.getLaebl(), beginTime, endTime);
// 警察纪警规
List<PieItem> jjjgPieList = dataCaseVerifMapper.selectInvolveProblemGroupByBusinessTypeName(CaseVerifProblemNatureEnum.JJJG.getLaebl(), beginTime, endTime);
// 案件来源占比
List<PieItem> ajlyPieList = dataCaseVerifMapper.selectGroupByProblemSources(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview)
.fluentPut("fxsjBarList", fxsjBarList)
.fluentPut("jsdwBarList", jsdwBarList)
.fluentPut("zfbaPieList", zfbaPieList)
.fluentPut("fwglPieList", fwglPieList)
.fluentPut("jjjgPieList", jjjgPieList)
.fluentPut("ajlyPieList", ajlyPieList);
// 案件问题性质
@GetMapping("/getCaseProblemProperty")
public Result<JSONObject> getCaseProblemProperty(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> zfbaPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 6); // 执法办案
List<EchartsVo> fwglPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 11); // 服务管理
// List<EchartsVo> jgjjPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 6); // 执法
JSONObject data = new JSONObject().fluentPut("zfbaPieList", zfbaPieList)
.fluentPut("fwglPieList", fwglPieList);
return Result.success(data);
}
// endregion
@GetMapping("/getAllCaseVerifCount")
public Result<JSONObject> getAllCaseVerifCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
// region 中间
// 案件核查大屏中央数据总览
@GetMapping("/getAllCaseVerificationCount")
public Result<JSONObject> getAllCaseVerificationCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 案件总数(起)
long total = dataCaseVerifService.count(new LambdaQueryWrapper<DataCaseVerif>().between(DataCaseVerif::getDiscoveryTime, beginTime, endTime));
Integer confirmed = dataCaseVerifService.getConfirmed(beginTime, endTime); // 查实案件数
Integer investigateAndPunish = dataCaseVerifService.getInvestigateAndPunish(beginTime, endTime); // 查处问题(个)
Integer accountablePeopleNumber = dataCaseVerifService.getAccountablePeopleNumber(beginTime, endTime); // 问责人次
Integer accountableDepartNumber = dataCaseVerifService.getAccountableDepartNumber(beginTime, endTime); // 问责单位数、
Double confirmedRate = confirmed.doubleValue() / total * 100; // 查实率
JSONObject overview = new JSONObject().fluentPut("confirmed", confirmed)
.fluentPut("investigateAndPunish", investigateAndPunish)
.fluentPut("accountablePeopleNumber", accountablePeopleNumber)
.fluentPut("accountableDepartNumber", accountableDepartNumber)
.fluentPut("confirmedRate", confirmedRate)
.fluentPut("total", total);
CaseVerificationCountVo overview = caseVerificationService.getAllCaseVerificationCount(beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("overview", overview);
return Result.success(res);
}
// 案件核查大屏地图
@GetMapping("/getCaseVerificationMap")
public Result<JSONObject> getCaseVerificationMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<CaseVerificationMapVo> caseVerificationMapList = caseVerificationService.getCaseVerificationMap(beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList);
return Result.success(res);
}
@GetMapping("/trend")
public Result<JSONObject> caseVerifTrend(
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime,
@RequestParam Integer month) {
List<EchartsVo> ajhcqsList = dataCaseVerifMapper.selectTrend(beginTime, endTime, 12);
JSONObject data = new JSONObject().fluentPut("ajhcqsList", ajhcqsList);
// 查处问题趋势
@GetMapping("/getCaseVerificationTrend")
public Result<JSONObject> getCaseVerificationTrend(@RequestParam Integer year) {
List<EchartsVo> proTrendList = caseVerificationService.getCaseVerificationTrend(String.valueOf(year));
JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList);
return Result.success(data);
}
// endregion
// region 右边
// 案件来源占比 和 问责处理情况
@GetMapping("/getCaseSourceRateAndDealSituation")
public Result<JSONObject> getCaseSourceRateAndDealSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> caseSourceRateList = caseVerificationService.getCaseSourceRate(beginTime, endTime);
List<EchartsVo> dealSituationPieList = caseVerificationService.getDealSituation(beginTime, endTime);
JSONObject data = new JSONObject()
.fluentPut("caseSourceRateList", caseSourceRateList)
.fluentPut("dealSituationPieList", dealSituationPieList);
return Result.success(data);
}
// 禁闭处理情况 和 停职处理情况
@GetMapping("/getConfinementAndPause")
public Result<JSONObject> getConfinement(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> jbclList = caseVerificationService.getConfinementAndPause(beginTime, endTime, 1); // 禁闭
List<EchartsVo> tzclList = caseVerificationService.getConfinementAndPause(beginTime, endTime, 2); // 停职
JSONObject data = new JSONObject()
.fluentPut("jbclList", jbclList)
.fluentPut("tzclList", tzclList);
return Result.success(data);
}
// endregion
}

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

@ -1,10 +1,18 @@
package com.biutag.supervision.controller.datav;
import com.alibaba.fastjson.JSONObject;
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.service.CountyStreetDeptService;
import com.biutag.supervision.service.DataRightsComfortService;
import com.biutag.supervision.service.RpcApplyService;
import com.biutag.supervision.service.RpcInfringerResultService;
import lombok.RequiredArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
@ -12,8 +20,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.*;
/**
* 维权抚慰大屏相关
*
* @author: sh
*/
@RequestMapping("datav/rightsComfort")
@RequiredArgsConstructor
@RestController
@ -23,32 +36,156 @@ public class DatavRightsComfortController {
private final DataRightsComfortService dataRightsComfortService;
private final RpcInfringerResultService rpcInfringerResultService;
private final CountyStreetDeptService countyStreetDeptService;
@GetMapping
public Result<DataRightsComfortModel> rightsComfort(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
DataRightsComfortModel result = new DataRightsComfortModel();
// DataRightsComfortModel result = new DataRightsComfortModel();
// 维权案件总数
// 受侵害人数
// 抚慰人数
result.setComfortPersonNumber(dataRightsComfortService.countComfortPersonNumber(beginTime, endTime));
// result.setComfortPersonNumber(dataRightsComfortService.countComfortPersonNumber(beginTime, endTime));
// 打击处理人数
result.setHitPersonNumber(dataRightsComfortService.countHitPersonNumber(beginTime, endTime));
// result.setHitPersonNumber(dataRightsComfortService.countHitPersonNumber(beginTime, endTime));
// 抚慰金额(万元)
result.setComfortMoney(dataRightsComfortService.countComfortMoney(beginTime, endTime));
// result.setComfortMoney(dataRightsComfortService.countComfortMoney(beginTime, endTime));
// 维权案件情况
// 案件类别占比
// 打处情况
result.setPunishmentSituation(dataRightsComfortService.selectPunishmentSituation(beginTime, endTime));
// result.setPunishmentSituation(dataRightsComfortService.selectPunishmentSituation(beginTime, endTime));
// 抚慰情况
result.setComfortSituation(dataRightsComfortService.selectComfortSituation(beginTime, endTime));
// result.setComfortSituation(dataRightsComfortService.selectComfortSituation(beginTime, endTime));
// 民辅警受伤情况
// 发案情况占比
return Result.success(result);
// return Result.success(result);
return null;
}
// region 左边
// 维权案件和抚慰金情况
@GetMapping("/getRightsAndComfortRank")
public Result<JSONObject> getRightsAndComfortRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> fxsjRightsRankList = dataRightsComfortService.getRightsRank(beginTime, endTime, 3); // 分县市局维权排名
List<OrganizeProblemRankVo> jsdwRightsRankList = dataRightsComfortService.getRightsRank(beginTime, endTime, 4); // 分县市局维权排名
JSONObject data = new JSONObject()
.fluentPut("fxsjRightsRankList", fxsjRightsRankList)
.fluentPut("jsdwRightsRankList", jsdwRightsRankList);
return Result.success(data);
}
// 案件类别占比
@GetMapping("/getCaseTypeRate")
public Result<JSONObject> getCaseTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
return null;
}
// endregion
// region 中间
// 抚慰大屏中央总览数据
@GetMapping("/getALlComfortCount")
public Result<JSONObject> getALlComfortCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
Integer comfortTotal = dataRightsComfortService.countComfortPersonNumber(beginTime, endTime); // 抚慰人数
Integer hitTotal = dataRightsComfortService.countHitPersonNumber(beginTime, endTime); // 打击处理人数
Double comfortMoney = dataRightsComfortService.countComfortMoney(beginTime, endTime); // 抚慰金额
ComfortCountVO comfortOverview = new ComfortCountVO();
comfortOverview.setComfortTotal(comfortTotal);
comfortOverview.setHitTotal(hitTotal);
comfortOverview.setComfortMoney(comfortMoney);
JSONObject data = new JSONObject().fluentPut("comfortOverview", comfortOverview);
return Result.success(data);
}
// 打处情况
@GetMapping("/getPunishmentSituation")
public Result<JSONObject> getPunishmentSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<PieItem> punishmentSituationList = dataRightsComfortService.selectPunishmentSituation(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("punishmentSituationList", punishmentSituationList);
return Result.success(data);
}
// 抚慰情况
@GetMapping("/getComfortSituation")
public Result<JSONObject> getComfortSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<PieItem> comfortSituationList = dataRightsComfortService.selectComfortSituation(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("comfortSituationList", comfortSituationList);
return Result.success(data);
}
// endregion
// region 右边
// 民辅警受伤人数情况和受伤类别
@GetMapping("/getPoliceHurtSituationAndHurtType")
public Result<JSONObject> getPoliceHurtSituationAndHurtType(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> policeHurtSituationList = dataRightsComfortService.getPoliceHurtSituation(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("policeHurtSituationList", policeHurtSituationList);
return Result.success(data);
}
// 发案情况占比
@GetMapping("/getCaseAriseSituationRate")
public Result<JSONObject> getCaseAriseSituationRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 发案环节
List<EchartsVo> incidentLinkList = dataRightsComfortService.getIncidentLink(beginTime, endTime);
// 发案警种
List<EchartsVo> incidentPoliceTypeList = new ArrayList<>();
// 发案单位
List<EchartsVo> incidentOrgList = dataRightsComfortService.getIncidentOrg(beginTime, endTime);
JSONObject data = new JSONObject()
.fluentPut("incidentLinkList", incidentLinkList)
.fluentPut("incidentPoliceTypeList", incidentPoliceTypeList)
.fluentPut("incidentOrgList", incidentOrgList);
return Result.success(data);
}
@GetMapping("/test")
public Result<JSONObject> test() {
Integer departId = 3490;
List<CountyStreetDept> depts = countyStreetDeptService.getTest(departId);
Map<String, Object> geoJson = new HashMap<>();
geoJson.put("type", "FeatureCollection");
List<Map<String, Object>> features = new ArrayList<>();
for (CountyStreetDept dept : depts) {
Map<String, Object> feature = new HashMap<>();
feature.put("type", "Feature");
Map<String, Object> properties = new HashMap<>();
properties.put("name", dept.getName());
feature.put("properties", properties);
Map<String, Object> geometry = new HashMap<>();
geometry.put("type", "MultiPolygon");
// geometry.put("coordinates", new Gson().fromJson(dept.getGeometry(), Object.class));
feature.put("geometry", geometry);
features.add(feature);
}
geoJson.put("features", features);
JSONObject jsonObject = new JSONObject();
jsonObject.put("geoJson", geoJson);
return Result.success(jsonObject);
}
// endregion
}

86
src/main/java/com/biutag/supervision/controller/datav/PoliceComment.java

@ -1,86 +0,0 @@
package com.biutag.supervision.controller.datav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.util.HttpClientUtil;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
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.Date;
import java.util.HashMap;
import java.util.Map;
/**
* @Auther: sh
* @Date: 2024/11/17 11:04
* @Description:
*/
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("datav/DSJ")
public class PoliceComment {
private final String BASE_URL = "";
@GetMapping("/GetDCQK")
public Result<JSONObject> getDCQK() {
Map<String, String> params = new HashMap<>();
params.put("PeriodId", "6");
params.put("PeriodSonID", "-1");
params.put("OrgNo", "4304");
Map<String, String> header = new HashMap<>();
header.put("Content-Type", "application/json");
String s = HttpClientUtil.doPost(BASE_URL, params, header);
JSONObject jsonObject = JSONObject.parseObject(s);
log.info("返回数据字符串=============" + s);
log.info("返回数据JSON对象=============" + jsonObject.toJSONString());
System.out.println(jsonObject.get("data").toString());
return Result.success(jsonObject);
}
@GetMapping("/GetBMYYBQS")
public Result<JSONObject> getBMYYBQS(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
Map<String, String> params = new HashMap<>();
params.put("PeriodId", "6");
params.put("OrgNo", "4304");
String res = HttpClientUtil.doPost(BASE_URL, params, null);
log.info("返回GetBMYYBQS数据字符串=============" + res);
return Result.success();
}
@GetMapping("/GetZHMYLPM")
public Result<JSONObject> getGetZHMYLPM(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
Map<String, String> params = new HashMap<>();
params.put("PeriodId", "6");
String res = HttpClientUtil.doPost(BASE_URL, params, null);
log.info("返回GetZHMYLPM数据字符串=============" + res);
return Result.success();
}
@GetMapping("/GetRCSQQK")
public Result<JSONObject> getRCSQQK(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime){
Map<String, String> params = new HashMap<>();
params.put("PeriodId", "6");
params.put("PeriodSonID", "-1");
params.put("OrgNo", "4304");
String res = HttpClientUtil.doPost(BASE_URL, params, null);
log.info("返回GetRCSQQK数据字符串=============" + res);
return Result.success();
}
}

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

@ -82,7 +82,7 @@ public class SupervisionNotifyController {
public Result<JSONObject> getMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
//地图数据
List<SuperviseMapIconVo> superviseTempMapVoList = dataSupervisionNotifyService.getsupervisionMapIconInfo(beginTime, endTime);
List<SuperviseMapIconVo> superviseTempMapVoList = dataSupervisionNotifyService.getSupervisionMapIconInfo(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("superviseTempMapVoList", superviseTempMapVoList);
return Result.success(data);
}

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

@ -0,0 +1,105 @@
package com.biutag.supervision.controller.datav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.VideoSuperviseService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
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;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;
/**
* @Auther: sh
* @Date: 2024/11/29 09:32
* @Description: 视频督察大屏
*/
@Tag(name = "视频督察大屏", description = "视频督察大屏")
@RestController
@RequiredArgsConstructor
@RequestMapping("datav/videoSupervise")
public class VideoSuperviseController {
private final VideoSuperviseService videoSuperviseService;
//region 左边
// 获取视频督察大屏问题数排名
@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 = videoSuperviseService.getVideoSuperviseProblemRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> jsdwVideoSuperviseProblemRankList = videoSuperviseService.getVideoSuperviseProblemRank(beginTime, endTime, 4);
JSONObject data = new JSONObject();
data.fluentPut("fxsjVideoSuperviseProblemRankList", fxsjVideoSuperviseProblemRankList);
data.fluentPut("jsdwVideoSuperviseProblemRankList", jsdwVideoSuperviseProblemRankList);
return Result.success(data);
}
//endregion
//region 中间
// 获取视频督察中央数据
@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 = videoSuperviseService.getAllVideoSuperviseCount(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data);
}
// 获取视频督察地图数据
@Operation(summary = "视频督察大屏地图数据")
@GetMapping("/getVideoSuperviseMap")
public Result<JSONObject> getVideoSuperviseMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 地图数据
List<VideoSuperviseMapIconVo> videoSuperviseMapIconVoList = Optional.ofNullable(videoSuperviseService.getVideoSuperviseMapIconInfo(beginTime, endTime)).
orElseGet(ArrayList::new);
JSONObject data = new JSONObject().fluentPut("videoSuperviseMapIconVoList", videoSuperviseMapIconVoList);
return Result.success(data);
}
// 获取视频督察大屏中央问题趋势统计
@Operation(summary = "数据大屏问题趋势统计")
@GetMapping("/getVideoSuperviseTrend")
public Result<JSONObject> getVideoSuperviseTrend(@RequestParam Integer year) {
List<EchartsVo> videoSuperviseTrendList = videoSuperviseService.getVideoSuperviseTrend(String.valueOf(year));
JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseTrendList", videoSuperviseTrendList);
return Result.success(jsonObject);
}
//endregion
// region 右边
// 问题类型占比
@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 = videoSuperviseService.getVideoSuperviseProblemTypeRate(beginTime, endTime);
JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseProblemTypeRate", videoSuperviseProblemTypeRate);
return Result.success(jsonObject);
}
// endregion
}

25
src/main/java/com/biutag/supervision/mapper/CountyStreetDeptMapper.java

@ -0,0 +1,25 @@
package com.biutag.supervision.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.supervision.pojo.entity.CountyStreetDept;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author 舒云
* @description 针对表county_street_dept(区县管理机构表)的数据库操作Mapper
* @createDate 2024-12-03 17:20:39
*/
public interface CountyStreetDeptMapper extends BaseMapper<CountyStreetDept> {
@Select("select * from county_street_dept where pid = #{id}")
List<CountyStreetDept> props(Integer id);
}

52
src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java

@ -19,46 +19,22 @@ public interface DataCaseVerifMapper extends BaseMapper<DataCaseVerif> {
@Select("select involve_problem name, count(originId) value from data_case_verif where business_type_name = #{businessTypeName} and discovery_time between #{beginTime} and #{endTime} group by involve_problem")
List<PieItem> selectInvolveProblemGroupByBusinessTypeName(String businessTypeName, Date beginTime, Date endTime);
@Select("select problem_sources name, count(originId) value from data_case_verif where discovery_time between #{beginTime} and #{endTime} group by problem_sources")
List<PieItem> selectGroupByProblemSources(Date beginTime, Date endTime);
@Select("select problem_sources name, " +
"count(originId) value from data_case_verif " +
"where discovery_time between #{beginTime} and #{endTime} " +
"group by problem_sources")
List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime);
@Select("SELECT DATE_FORMAT(discoveryTime, '%m') AS name, COUNT(*) AS value FROM negative " +
"WHERE discoveryTime " +
"BETWEEN IF(DATE_SUB(#{endTime}, INTERVAL #{months} MONTH) < DATE_FORMAT(#{endTime}, '%Y-01-01'), " +
" DATE_FORMAT(#{endTime}, '%Y-01-01'), DATE_SUB(#{endTime}, " +
" INTERVAL #{months} MONTH)) " +
" AND #{endTime} " +
" AND checkStatus IN (1, 2) " +
"GROUP BY name " +
"ORDER BY value asc;")
List<EchartsVo> selectTrend(Date beginTime, Date endTime, Integer months);
/**
* 查实案件数
* @param beginTime
* @param endTime
* @return
*/
@Select("SELECT count(*) total FROM negative ng " +
"WHERE ng.checkStatus<>3 " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Integer getConfirmed(Date beginTime, Date endTime);
@Select("")
Integer getInvestigateAndPunish(Date beginTime, Date endTime);
@Select("SELECT count(DISTINCT( nb.blameName)) as total FROM negative ng " +
"LEFT JOIN negative_blame nb on ng.id = nb.negativeId " +
"WHERE ng.problemSourcesCode in(17, 18, 19, 20)" +
"and ng.checkStatus<>3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Integer getAccountablePeopleNumber(Date beginTime, Date endTime);
@Select("SELECT count(DISTINCT(involveDepartName)) as total FROM negative ng " +
"WHERE problemSourcesCode in(17, 18, 19, 20) " +
"and ng.checkStatus<>3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Integer getAccountableDepartNumber(Date beginTime, Date endTime);
@Select("SELECT npr.threeLevelContent AS `name`, count(*) AS `value` " +
"FROM negative ng " +
"INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " +
"WHERE ng.checkStatus <>3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20) " +
"AND businessTypeCode = #{businessId} " +
"GROUP BY threeLevelContent ")
List<EchartsVo> getCaseProblemProperty(Date beginTime, Date endTime, Integer businessId);
}

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

@ -97,7 +97,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
// endregion
// region 现场督察大屏
@Select("SELECT count(DISTINCT(ng.id)) as proTotal, " +
@ -147,13 +146,23 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15)")
RankVoSupTwo getTemp(Date beginTime, Date endTime);
@Select("SELECT a.departId, a.name, COUNT(DISTINCT c.id) AS totalPro, COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, 0)) - 1 AS changing, COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1 AS changed, COUNT(DISTINCT c.involveDepartId) AS relationOrg, COUNT(DISTINCT d.blameIdCode) AS personNum, ROUND((COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1) / COUNT(DISTINCT c.id) * 100, 1) AS changedRate\n" +
"FROM statistics_depart a INNER JOIN sup_depart b ON a.departId = b.pid " +
" INNER JOIN negative c ON b.id = c.involveDepartId " +
" LEFT JOIN negative_blame d ON c.id = d.negativeId " +
"WHERE a.groupId = 3 AND discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15) " +
"GROUP BY a.name, a.departId")
List<SuperviseMapIconVo> getMap(Date beginTime, Date endTime);
@Select("SELECT sd1.short_name AS `name`, " +
"sd1.id as departId, " +
"COUNT(DISTINCT ng.id ) AS totalPro, " +
"COUNT( DISTINCT if(ng.isRectifyCode=0, ng.id, NULL)) AS changing, " +
"COUNT( DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) AS changed, " +
"COUNT(DISTINCT nb.blameName ) AS personNum," +
"COUNT(DISTINCT ng.involveDepartId) AS relationOrg, " +
"IFNULL( ROUND( ( COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT( DISTINCT ng.id ) ) * 100, 1 ), 0) AS changedRate " +
"FROM sup_depart sd " +
"INNER JOIN sup_depart sd1 ON sd.pid = sd1.id AND sd1.statistics_group_id = 3 " +
"LEFT JOIN negative ng ON sd.id = ng.involveDepartId " +
"AND ng.checkStatus <> 3 " +
"AND ng.problemSourcesCode IN (13, 15) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"GROUP BY `name`;")
List<SuperviseMapIconVo> getSupervisionMapIconInfo(Date beginTime, Date endTime);
List<EchartsVo> getSupervisionTrend(String time);
@ -183,6 +192,133 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"order by value desc")
List<OrganizeProblemRankVo> getYellowBetRankList(Date beginTime, Date endTime, Integer groupId, Integer queryType);
// endregion
// region 视频督察大屏
@Select("SELECT " +
"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 sup_depart sd " +
"INNER JOIN negative ng ON sd.id = ng.involveDepartId " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"WHERE ng.checkStatus IN ('1','2') " +
"AND problemSourcesCode = 16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime};")
VideoSuperviseCountVo getAllVideoSuperviseCount(Date beginTime, Date endTime);
@Select("SELECT npr.threeLevelContent AS `name`, " +
"COUNT(*) AS `value` " +
"FROM negative ng " +
"INNER JOIN negative_problem_relation npr " +
"on ng.id=npr.negativeId " +
"WHERE ng.problemSourcesCode=16 " +
"AND checkStatus <> 3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent")
List<EchartsVo> getVideoSuperviseProblemTypeRate(Date beginTime, Date endTime);
@Select("SELECT sd1.short_name AS label, " +
"count(*) as `value`" +
" FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " +
"WHERE checkStatus <> 3 " +
"AND problemSourcesCode=16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.short_name ")
List<OrganizeProblemRankVo> getVideoSuperviseProblemRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT sd1.short_name AS `name`, " +
"sd1.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 sup_depart sd " +
"INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=3 " +
"LEFT JOIN negative ng on sd.id=ng.involveDepartId " +
"AND checkStatus <> 3 " +
"AND problemSourcesCode=16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"GROUP BY `name`;")
List<VideoSuperviseMapIconVo> getVideoSuperviseMapIconInfo(Date beginTime, Date endTime);
List<EchartsVo> getVideoSuperviseTrend(String year);
// endregion
// region 案件核查大屏
@Select("SELECT sd1.short_name AS label, " +
"count(DISTINCT ng.id) AS `value` " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " +
"WHERE checkStatus <> 3 " +
"AND problemSourcesCode in (17, 18, 19, 20) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.short_name")
List<OrganizeProblemRankVo> getCaseVerificationRank(Date beginTime, Date endTime, int groupId);
List<EchartsVo> getCaseVerificationTrend(String year);
@Select("SELECT 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.blameName ) AS punishPre, " +
"COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " +
"FROM negative ng " +
"INNER JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND problemSourcesCode in (17, 18, 19, 20) ")
CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime);
@Select("SELECT sd.short_name AS `name`, " +
"sd.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.blameName) AS punishPre, " +
"COUNT(DISTINCT ng.involveDepartId) AS punishOrg, " +
"IFNULL(ROUND(COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1), 0) AS rate " +
"FROM sup_depart sd " +
"INNER JOIN sup_depart sd1 ON sd.id = sd1.pid AND sd.statistics_group_id = 3 " +
"LEFT JOIN negative ng ON sd1.id = ng.involveDepartId " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"GROUP BY sd.short_name;")
List<CaseVerificationMapVo> getCaseVerificationMap(Date beginTime, Date endTime);
@Select("SELECT nb.handleResultName as `name`, count(*) as `value` " +
"FROM negative ng " +
"INNER JOIN negative_blame nb ON nb.negativeId=ng.id " +
"WHERE handleResultName is NOT NULL " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode in (17, 18, 19, 20) " +
"AND ng.checkStatus <>3 " +
"GROUP BY nb.handleResultName")
List<EchartsVo> getDealSituation(Date beginTime, Date endTime);
@Select("SELECT npr.threeLevelContent AS `name`, " +
"count(DISTINCT(ng.id)) as `value` FROM negative ng " +
"INNER JOIN negative_blame nb ON nb.negativeId=ng.id AND nb.superviseMeasuresCode=#{type} " +
"INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " +
"WHERE ng.checkStatus<>3 " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent")
List<EchartsVo> getConfinementAndPause(Date beginTime, Date endTime, Integer type);
// endregion
}

33
src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java

@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.RpcApply;
import com.biutag.supervision.pojo.entity.RpcInfringerResult;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import org.apache.ibatis.annotations.Select;
import java.util.Date;
@ -33,5 +35,36 @@ public interface RpcApplyMapper extends BaseMapper<RpcApply> {
"GROUP BY c.job")
List<PieItem> selectComfortSituation(Date beginTime, Date endTime);
@Select("SELECT sd1.short_name AS label, " +
"count(*) AS VALUE " +
"FROM sup_depart sd1 inner JOIN " +
"(SELECT ra.depart_name, sd.short_name, sd.pid, ra.apply_date, ra.type FROM rpc_apply ra INNER JOIN sup_depart sd on ra.depart_id=sd.id) temp " +
"on sd1.id = temp.pid AND sd1.statistics_group_id=#{groupId} " +
"WHERE temp.apply_date BETWEEN #{beginTime} AND #{endTime} " +
"AND temp.type=1 " +
"GROUP BY sd1.short_name " +
"ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> getRightsRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT sdd.dict_label AS `name`, count(DISTINCT rap.emp_no) AS `value` FROM rpc_apply_person rap " +
"INNER JOIN sup_police sp ON rap.emp_no = sp.emp_no " +
"INNER JOIN sup_dict_data sdd on sdd.dict_value = sp.person_type AND sdd.dict_type='personType' " +
"WHERE person_type is not NULL " +
"AND rap.creat_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY person_type ")
List<EchartsVo> getPoliceHurtSituation(Date beginTime, Date endTime);
@Select("SELECT Incident_link_name AS `name`, count(*) AS `value` FROM rpc_apply " +
"WHERE Incident_link_name is NOT NULL " +
"AND happen_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY Incident_link_name;")
List<EchartsVo> getIncidentLink(Date beginTime, Date endTime);
@Select("SELECT sd.short_name AS `name`, count(*) as `value` FROM sup_depart sd " +
"INNER JOIN sup_depart sd1 on sd.id = sd1.pid AND sd.level=2 " +
"INNER JOIN rpc_apply ra on sd1.id=ra.depart_id " +
"WHERE ra.happen_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC;")
List<EchartsVo> getIncidentOrg(Date beginTime, Date endTime);
}

92
src/main/java/com/biutag/supervision/pojo/entity/CountyStreetDept.java

@ -0,0 +1,92 @@
package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
/**
* 区县管理机构表
* @TableName county_street_dept
*/
@TableName(value ="county_street_dept")
@Data
public class CountyStreetDept implements Serializable {
/**
*
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 父级部门名称
*/
@TableField(value = "dept_pid_name")
private String deptPidName;
/**
* 父级部门id
*/
@TableField(value = "dept_pid")
private String deptPid;
/**
*
*/
@TableField(value = "pid")
private String pid;
/**
*
*/
@TableField(value = "coordinates")
private String coordinates;
/**
*
*/
@TableField(value = "level")
private String level;
/**
*
*/
@TableField(value = "name")
private String name;
/**
*
*/
@TableField(value = "sort")
private Integer sort;
/**
*
*/
@TableField(value = "geometry")
private String geometry;
/**
* 所属区域
*/
@TableField(value = "area_name")
private String areaName;
/**
* 部门id
*/
@TableField(value = "dept_id")
private String deptId;
/**
*
*/
@TableField(value = "dept_name")
private String deptName;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

22
src/main/java/com/biutag/supervision/pojo/vo/CaseVerificationCountVo.java

@ -0,0 +1,22 @@
package com.biutag.supervision.pojo.vo;
import lombok.Data;
/**
* @Auther: sh
* @Date: 2024/11/29 18:19
* @Description: 案件核查总览统计
*/
@Data
public class CaseVerificationCountVo {
private Integer total; // 总案件数
private Integer confirmed; // 已查实案件数
private Integer dealCasePro; // 查处理案件数
private Integer punishPre; // 问责人数
private Integer punishOrg; // 问责单位数
private Double rate; // 查实率
}

21
src/main/java/com/biutag/supervision/pojo/vo/CaseVerificationMapVo.java

@ -0,0 +1,21 @@
package com.biutag.supervision.pojo.vo;
import lombok.Data;
/**
* @Auther: sh
* @Date: 2024/11/29 19:29
* @Description:
*/
@Data
public class CaseVerificationMapVo {
private String name;
private String departId;
private Integer total; // 总案件数
private Integer confirmed; // 已查实案件数
private Integer dealCasePro; // 查处理案件数
private Integer punishPre; // 问责人数
private Integer punishOrg; // 问责单位数
private Double rate; // 查实率
}

18
src/main/java/com/biutag/supervision/pojo/vo/ComfortCountVO.java

@ -0,0 +1,18 @@
package com.biutag.supervision.pojo.vo;
import lombok.Data;
/**
* @Auther: sh
* @Date: 2024/12/2 15:21
* @Description: 维权抚慰大屏中央的数据
*/
@Data
public class ComfortCountVO {
private Integer comfortCaseTotal; // 维权案件总数
private Integer hurtTotal; // 受侵害人数
private Integer comfortTotal; // 抚慰人数
private Integer hitTotal; // 打击处理人数
private Double comfortMoney; // 抚慰金额
}

21
src/main/java/com/biutag/supervision/pojo/vo/MapAreaVo.java

@ -0,0 +1,21 @@
package com.biutag.supervision.pojo.vo;
import lombok.Data;
import java.util.Map;
/**
* @Auther: sh
* @Date: 2024/12/3 17:11
* @Description: 地图区域json
*/
@Data
public class MapAreaVo {
private String type = "FeatureCollection";
private String name;
private Map<String, Object> features;
}

21
src/main/java/com/biutag/supervision/pojo/vo/RankVoSup.java

@ -1,21 +0,0 @@
package com.biutag.supervision.pojo.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* @Auther: sh
* @Date: 2024/11/17 01:35
* @Description:
*/
@Data
@AllArgsConstructor
public class RankVoSup {
private String problemNumber; // 问题数
private String rectifingNumber; // 整改中
private String rectifedNumber; // 已整改
private String departNumber; // 部门数
private String personNumber; // 人员数
private String rectifyRate; // 整改率
}

23
src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseCountVo.java

@ -0,0 +1,23 @@
package com.biutag.supervision.pojo.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Auther: sh
* @Date: 2024/11/29 10:15
* @Description: 视频督察中央总览vo
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class VideoSuperviseCountVo {
private Integer discoverProblem;
private Integer changedProblem;
private Integer relativeOrg;
private Integer relativePer;
private Double changedRate;
}

27
src/main/java/com/biutag/supervision/pojo/vo/VideoSuperviseMapIconVo.java

@ -0,0 +1,27 @@
package com.biutag.supervision.pojo.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Auther: sh
* @Date: 2024/11/29 09:50
* @Description:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class VideoSuperviseMapIconVo {
private String name;
private String departId;
private Integer discoverProblem;
private Integer changedProblem;
private Integer relativeOrg;
private Integer relativePer;
private Integer changedRate;
}

68
src/main/java/com/biutag/supervision/service/CaseVerificationService.java

@ -0,0 +1,68 @@
package com.biutag.supervision.service;
import com.biutag.supervision.mapper.DataCaseVerifMapper;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.dto.common.PieItem;
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 lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* @Auther: sh
* @Date: 2024/11/29 15:55
* @Description:
*/
@RequiredArgsConstructor
@Service
public class CaseVerificationService {
private final NegativeMapper negativeMapper;
private final DataCaseVerifMapper dataCaseVerifMapper;
public List<OrganizeProblemRankVo> getCaseVerificationRank(Date beginTime, Date endTime, int groupId) {
List<OrganizeProblemRankVo> res = negativeMapper.getCaseVerificationRank(beginTime, endTime, groupId);
return res;
}
public List<EchartsVo> getCaseVerificationTrend(String year) {
List<EchartsVo> res = negativeMapper.getCaseVerificationTrend(year);
return res;
}
public List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime) {
List<EchartsVo> res = dataCaseVerifMapper.getCaseSourceRate(beginTime, endTime);
return res;
}
public CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime) {
CaseVerificationCountVo res = negativeMapper.getAllCaseVerificationCount(beginTime, endTime);
return res;
}
public List<CaseVerificationMapVo> getCaseVerificationMap(Date beginTime, Date endTime) {
List<CaseVerificationMapVo> res = negativeMapper.getCaseVerificationMap(beginTime, endTime);
return res;
}
public List<EchartsVo> getDealSituation(Date beginTime, Date endTime) {
List<EchartsVo> res = negativeMapper.getDealSituation(beginTime, endTime);
return res;
}
public List<EchartsVo> getConfinementAndPause(Date beginTime, Date endTime, Integer type) {
List<EchartsVo> res = negativeMapper.getConfinementAndPause(beginTime,endTime, type);
return res;
}
}

30
src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java

@ -0,0 +1,30 @@
package com.biutag.supervision.service;
import com.biutag.supervision.mapper.CountyStreetDeptMapper;
import com.biutag.supervision.pojo.entity.CountyStreetDept;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author 舒云
* @description 针对表county_street_dept(区县管理机构表)的数据库操作Service实现
* @createDate 2024-12-03 17:20:39
*/
@Service
@RequiredArgsConstructor
public class CountyStreetDeptService {
private final CountyStreetDeptMapper countyStreetDeptMapper;
public List<CountyStreetDept> getTest(Integer id) {
List<CountyStreetDept> res = countyStreetDeptMapper.props(id);
return res;
}
}

18
src/main/java/com/biutag/supervision/service/DataCaseVerifService.java

@ -104,25 +104,11 @@ public class DataCaseVerifService extends ServiceImpl<DataCaseVerifMapper, DataC
}
public Integer getConfirmed(Date beginTime, Date endTime) {
Integer res = dataCaseVerifMapper.getConfirmed(beginTime, endTime);
return res;
}
public Integer getInvestigateAndPunish(Date beginTime, Date endTime) {
// Integer res = dataCaseVerifMapper.getInvestigateAndPunish(beginTime, endTime);
return 0;
}
public Integer getAccountablePeopleNumber(Date beginTime, Date endTime) {
Integer res = dataCaseVerifMapper.getAccountablePeopleNumber(beginTime, endTime);
return res;
}
public Integer getAccountableDepartNumber(Date beginTime, Date endTime) {
Integer res = dataCaseVerifMapper.getAccountableDepartNumber(beginTime, endTime);
return res;
}

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

@ -0,0 +1,240 @@
package com.biutag.supervision.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.constants.enums.*;
import com.biutag.supervision.mapper.DataPetition12337Mapper;
import com.biutag.supervision.mapper.DataPetitionComplaintMapper;
import com.biutag.supervision.pojo.dto.*;
import com.biutag.supervision.pojo.entity.DataPetition12337;
import com.biutag.supervision.pojo.entity.DataPetitionComplaint;
import com.biutag.supervision.pojo.param.DataPetitionComplaintQueryParam;
import com.biutag.supervision.pojo.vo.RecentMailTrendByDayVo;
import com.biutag.supervision.pojo.vo.RecentMailTrendByMonthVo;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.List;
@RequiredArgsConstructor
@Service
public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, DataPetitionComplaint> {
private final NegativeService negativeService;
private final DataPetitionComplaintMapper dataPetitionComplaintMapper;
private final DataPetition12337Mapper dataPetition12337Mapper;
public Page<DataPetitionComplaint> page(DataPetitionComplaintQueryParam queryParam) {
LambdaQueryWrapper<DataPetitionComplaint> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(DataPetitionComplaint::getProblemSourcesCode, queryParam.getProblemSourcesCode())
.like(StrUtil.isNotBlank(queryParam.getOriginId()), DataPetitionComplaint::getOriginId, queryParam.getOriginId())
.like(StrUtil.isNotBlank(queryParam.getThingDesc()), DataPetitionComplaint::getThingDesc, queryParam.getThingDesc())
.orderByDesc(DataPetitionComplaint::getCreateTime);
if (queryParam.getDiscoveryTime().size() == 2) {
queryWrapper.between(DataPetitionComplaint::getDiscoveryTime, queryParam.getDiscoveryTime().get(0), queryParam.getDiscoveryTime().get(1));
}
if (StrUtil.isNotBlank(queryParam.getResponderKey()) && StrUtil.isNotBlank(queryParam.getResponderValue())) {
switch (queryParam.getResponderKey()) {
case "name":
queryWrapper.like(DataPetitionComplaint::getResponderName, queryParam.getResponderValue());
break;
case "phone":
queryWrapper.like(DataPetitionComplaint::getResponderPhone, queryParam.getResponderValue());
break;
}
}
return page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper);
}
public boolean save(DataPetitionComplaintDto dto) {
DataPetitionComplaint dataPetitionComplaint = new DataPetitionComplaint();
BeanUtil.copyProperties(dto, dataPetitionComplaint);
dataPetitionComplaint.setCreateTime(LocalDateTime.now());
dataPetitionComplaint.setUpdateTime(LocalDateTime.now());
return save(dataPetitionComplaint);
}
public boolean save(DataPetitionComplaintAddDto body) {
LocalDateTime now = LocalDateTime.now();
int index = 0;
for (DataPetitionComplaintImportDto dto : body.getData()) {
index++;
boolean exists = exists(new LambdaQueryWrapper<DataPetitionComplaint>().eq(DataPetitionComplaint::getOriginId, dto.getOriginId()));
// 增量更新
if (DataUpdateMethodEnum.incremental.name().equals(body.getDataUpdateMethod()) && exists) {
throw new RuntimeException(String.format("第%s条数据的信件编号已存在,请核实", index));
}
DataPetitionComplaint data = new DataPetitionComplaint();
BeanUtils.copyProperties(dto, data);
data.setCreateTime(now);
data.setUpdateTime(now);
data.setProblemSourcesCode(body.getProblemSourcesCode());
data.setDistributionState(DistributionStateEnum.UNDISTRIBUTED.getValue());
saveOrUpdate(data);
}
return true;
}
public boolean distribution(DataDataPetitionComplainDistribute dataDistribute) {
dataDistribute.getData().forEach(item -> {
NegativeDto negativeDto = new NegativeDto();
negativeDto.setOriginId(item.getOriginId());
negativeDto.setDiscoveryTime(item.getDiscoveryTime());
negativeDto.setProblemSourcesCode(item.getProblemSourcesCode());
negativeDto.setProblemSources(ProblemSourcesEnum.get(item.getProblemSourcesCode()).getLabel());
// negativeDto.setBusinessTypeCode(BusinessTypeEnum.ABWW);
// negativeDto.setBusinessTypeName();
negativeDto.setResponderName(item.getResponderName());
negativeDto.setContactPhone(item.getResponderPhone());
negativeDto.setThingDesc(item.getThingDesc());
String departId;
String departName;
if (StrUtil.isBlank(item.getThirdDepartId())) {
departId = item.getSecondDepartId();
departName = item.getSecondDepartName();
} else {
departId = item.getThirdDepartId();
departName = item.getThirdDepartName();
}
negativeDto.setInvolveDepartId(departId);
negativeDto.setInvolveDepartName(departName);
negativeDto.setHostLevel(HostLevelEnums.SECOND.getValue());
negativeDto.setApprovalFlow(dataDistribute.getApprovalFlow());
negativeDto.setDepartId(departId);
negativeDto.setDepartName(departName);
negativeDto.setTimeLimit(dataDistribute.getTimeLimit());
negativeDto.setMaxSignDuration(dataDistribute.getMaxSignDuration());
negativeDto.setMaxHandleDuration(dataDistribute.getMaxHandleDuration());
negativeDto.setMaxExtensionDuration(dataDistribute.getMaxExtensionDuration());
negativeDto.setCaseNumber(item.getOriginId());
negativeService.save(negativeDto);
update(new LambdaUpdateWrapper<DataPetitionComplaint>().eq(DataPetitionComplaint::getOriginId, item.getOriginId())
.set(DataPetitionComplaint::getDistributionState, DistributionStateEnum.DISTRIBUTED.getValue()));
});
return true;
}
//所有分类数据总数
public JSONObject allMailCount(Date beginTime, Date endTime) {
// 国家信访
QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>();
countryQueryWrapper.eq("problem_sources_code", 21);
countryQueryWrapper.between("discovery_time", beginTime, endTime);
Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper);
// 公安部信访
QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>();
policeQueryWrapper.eq("problem_sources_code", 22);
policeQueryWrapper.between("discovery_time", beginTime, endTime);
Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper);
// 12337信访
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
Long total12337 = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 初访
QueryWrapper<DataPetitionComplaint> firstQueryWrapper = new QueryWrapper<>();
firstQueryWrapper.eq("initial_petition", 1);
firstQueryWrapper.between("discovery_time", beginTime, endTime);
Long firstMail = dataPetitionComplaintMapper.selectCount(firstQueryWrapper);
// 重访
QueryWrapper<DataPetitionComplaint> secondQueryWrapper = new QueryWrapper<>();
secondQueryWrapper.eq("initial_petition", 2);
secondQueryWrapper.between("discovery_time", beginTime, endTime);
Long secondMail = dataPetitionComplaintMapper.selectCount(secondQueryWrapper);
// 领导接访
QueryWrapper<DataPetitionComplaint> leaderQueryWrapper = new QueryWrapper<>();
leaderQueryWrapper.isNotNull("receiving_leader_name");
leaderQueryWrapper.between("discovery_time", beginTime, endTime);
Long leaderReceiveMail = dataPetitionComplaintMapper.selectCount(leaderQueryWrapper);
// 领导督办
QueryWrapper<DataPetitionComplaint> leaderViewQueryWrapper = new QueryWrapper<>();
leaderViewQueryWrapper.isNotNull("receiving_leader_name");
leaderViewQueryWrapper.between("discovery_time", beginTime, endTime);
Long leaderViewMail = dataPetitionComplaintMapper.selectCount(leaderViewQueryWrapper);
// 闹访 1:闹 0:不闹
QueryWrapper<DataPetitionComplaint> tangleQueryWrapper = new QueryWrapper<>();
tangleQueryWrapper.eq("entanglement_visits", 1);
tangleQueryWrapper.between("discovery_time", beginTime, endTime);
Long tangleMail = dataPetitionComplaintMapper.selectCount(tangleQueryWrapper);
// 集访 1:集 0:不集
QueryWrapper<DataPetitionComplaint> massQueryWrapper = new QueryWrapper<>();
massQueryWrapper.eq("mass_visits", 1);
massQueryWrapper.between("discovery_time", beginTime, endTime);
Long massMail = dataPetitionComplaintMapper.selectCount(massQueryWrapper);
// 总数
long totalMail = countryMail+policeMail+total12337;
JSONObject overview = new JSONObject()
// 信访总数(起)
.fluentPut("total", totalMail)
// 国家信访
.fluentPut("countryMail", countryMail)
// 公安部信访
.fluentPut("policeMail", policeMail)
// 局长信箱
.fluentPut("commissionerMail", 5534)
// 12337信访
.fluentPut("numMail", total12337)
// 初访;
.fluentPut("firstMail", firstMail)
// 重访
.fluentPut("secondMail", secondMail)
// 领导接访
.fluentPut("leaderReceiveMail", leaderReceiveMail)
// 领导督办
.fluentPut("leaderViewMail", leaderViewMail)
// 闹访问
.fluentPut("tangleMail", tangleMail)
// 集访
.fluentPut("massMail", massMail);
return overview;
}
// 初访重访分类数据排行
public List<CaseVerifDepart> mailRank(Integer departId, Integer Repeat, Date beginTime, Date endTime) {
List<CaseVerifDepart> list = dataPetitionComplaintMapper.
selectDepartStatistic(departId, Repeat, beginTime, endTime);
return list;
}
public List<RecentMailTrendByDayVo> getRecentlyMailTrendByDay(Integer sourcesCode, Integer days, Date endTime) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
// 将 endTime 转换为 LocalDate
LocalDate endLocalDate = endTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
String currentDay = endLocalDate.format(formatter); // 前端页面的最后查询日期
LocalDate frontDateDay = endLocalDate.minusDays(days); // days天前
String frontDay = frontDateDay.format(formatter);
List<RecentMailTrendByDayVo> recentMailTrendVos =
dataPetitionComplaintMapper.selectRecentlyMailTrendByDay(MailTrendSourcesEnum.getMappedCodeByCode(sourcesCode), frontDay, currentDay);
return recentMailTrendVos;
}
// 按月统计信访趋势
public List<RecentMailTrendByMonthVo> getRecentlyMailTrendByMonth(Integer sourcesCode, String year) {
List<RecentMailTrendByMonthVo> recentMailTrendVos =
dataPetitionComplaintMapper.selectRecentlyMailTrendByMonth(MailTrendSourcesEnum.getMappedCodeByCode(sourcesCode), year);
return recentMailTrendVos;
}
public List<RecentMailTrendByMonthVo> getRecentlyMailTrendByMonth12337(String year) {
List<RecentMailTrendByMonthVo> recentMailTrendVos =
dataPetition12337Mapper.selectRecentlyMailTrendByMonth12337(year);
return recentMailTrendVos;
}
}

24
src/main/java/com/biutag/supervision/service/DataRightsComfortService.java

@ -3,6 +3,9 @@ package com.biutag.supervision.service;
import com.biutag.supervision.mapper.RpcApplyMapper;
import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.RpcInfringerResult;
import com.biutag.supervision.pojo.vo.ComfortCountVO;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@ -70,4 +73,25 @@ public class DataRightsComfortService {
public List<PieItem> selectComfortSituation(Date beginTime, Date endTime) {
return rpcApplyMapper.selectComfortSituation(beginTime, endTime);
}
public List<OrganizeProblemRankVo> getRightsRank(Date beginTime, Date endTime, Integer groupId) {
List<OrganizeProblemRankVo> res = rpcApplyMapper.getRightsRank(beginTime, endTime, groupId);
return res;
}
public List<EchartsVo> getPoliceHurtSituation(Date beginTime, Date endTime) {
List<EchartsVo> res = rpcApplyMapper.getPoliceHurtSituation(beginTime, endTime);
return res;
}
public List<EchartsVo> getIncidentLink(Date beginTime, Date endTime) {
List<EchartsVo> res =rpcApplyMapper.getIncidentLink(beginTime, endTime);
return res;
}
public List<EchartsVo> getIncidentOrg(Date beginTime, Date endTime) {
List<EchartsVo> res =rpcApplyMapper.getIncidentOrg(beginTime, endTime);
return res;
}
}

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

@ -113,8 +113,8 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisio
// 地图数据
public List<SuperviseMapIconVo> getsupervisionMapIconInfo(Date beginTime, Date endTime) {
List<SuperviseMapIconVo> res = negativeMapper.getMap(beginTime, endTime);
public List<SuperviseMapIconVo> getSupervisionMapIconInfo(Date beginTime, Date endTime) {
List<SuperviseMapIconVo> res = negativeMapper.getSupervisionMapIconInfo(beginTime, endTime);
return res;
}

69
src/main/java/com/biutag/supervision/service/VideoSuperviseService.java

@ -0,0 +1,69 @@
package com.biutag.supervision.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.biutag.supervision.constants.enums.InspectCaseEnum;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.mapper.NegativeProblemRelationMapper;
import com.biutag.supervision.mapper.SupDepartMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.vo.*;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;
/**
* 视频督察服务层
*/
@RequiredArgsConstructor
@Service
public class VideoSuperviseService {
private final NegativeMapper negativeMapper;
//region 左边
public List<OrganizeProblemRankVo> getVideoSuperviseProblemRank(Date beginTime, Date endTime, Integer groupId) {
List<OrganizeProblemRankVo> res = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, groupId);
return res;
}
//endregion
//region 中间
public VideoSuperviseCountVo getAllVideoSuperviseCount(Date beginTime, Date endTime) {
VideoSuperviseCountVo res = negativeMapper.getAllVideoSuperviseCount(beginTime, endTime);
return res;
}
public List<VideoSuperviseMapIconVo> getVideoSuperviseMapIconInfo(Date beginTime, Date endTime) {
List<VideoSuperviseMapIconVo> res = negativeMapper.getVideoSuperviseMapIconInfo(beginTime, endTime);
return res;
}
public List<EchartsVo> getVideoSuperviseTrend(String year) {
List<EchartsVo> res = negativeMapper.getVideoSuperviseTrend(year);
return res;
}
//endregion
//region
public List<EchartsVo> getVideoSuperviseProblemTypeRate(Date beginTime, Date endTime) {
List<EchartsVo> res = negativeMapper.getVideoSuperviseProblemTypeRate(beginTime, endTime);
return res;
}
//endregion
}

60
src/main/resources/mapper/NegativeMapper.xml

@ -4,7 +4,6 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.biutag.supervision.mapper.NegativeMapper">
<select id="getSupervisionTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.monthName AS `name`, IFNULL(COUNT(ng.discoveryTime), 0) AS `value`
FROM (
SELECT '01' AS month, '1月' AS monthName UNION ALL
@ -26,9 +25,35 @@
GROUP BY m.monthName
ORDER BY m.month ASC;
</select>
<select id="getVideoSuperviseTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT
m.monthName AS `name`,
IFNULL(COUNT(ng.discoveryTime), 0) AS `value`
FROM (
SELECT '01' AS month, '1月' AS monthName UNION ALL
SELECT '02', '2月' UNION ALL
SELECT '03', '3月' UNION ALL
SELECT '04', '4月' UNION ALL
SELECT '05', '5月' UNION ALL
SELECT '06', '6月' UNION ALL
SELECT '07', '7月' UNION ALL
SELECT '08', '8月' UNION ALL
SELECT '09', '9月' UNION ALL
SELECT '10', '10月' UNION ALL
SELECT '11', '11月' UNION ALL
SELECT '12', '12月'
) m
LEFT JOIN
negative ng on DATE_FORMAT(ng.discoveryTime, '%m')=m.month
AND YEAR(ng.discoveryTime)= #{year}
AND checkStatus!=3
AND ng.problemSourcesCode =16
GROUP BY
m.monthName
ORDER BY
m.month ASC;
</select>
<select id="getGobalRecentlyTrendByMonth" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT
m.monthName AS `name`,
IFNULL(COUNT(ng.discoveryTime), 0) AS `value`
@ -55,5 +80,34 @@
ORDER BY
m.month ASC;
</select>
<select id="getCaseVerificationTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT
m.monthName AS `name`,
IFNULL(COUNT(ng.discoveryTime), 0) AS `value`
FROM (
SELECT '01' AS month, '1月' AS monthName UNION ALL
SELECT '02', '2月' UNION ALL
SELECT '03', '3月' UNION ALL
SELECT '04', '4月' UNION ALL
SELECT '05', '5月' UNION ALL
SELECT '06', '6月' UNION ALL
SELECT '07', '7月' UNION ALL
SELECT '08', '8月' UNION ALL
SELECT '09', '9月' UNION ALL
SELECT '10', '10月' UNION ALL
SELECT '11', '11月' UNION ALL
SELECT '12', '12月'
) m
LEFT JOIN
negative ng on DATE_FORMAT(ng.discoveryTime, '%m')=m.month
AND YEAR(ng.discoveryTime)= #{year}
AND checkStatus!=3
AND ng.problemSourcesCode IN (17, 18, 19, 20)
GROUP BY
m.monthName
ORDER BY
m.month ASC;
</select>
</mapper>

Loading…
Cancel
Save