Browse Source

二级大屏核查

main
parent
commit
b8d5a12a46
  1. 30
      src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java
  2. 190
      src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java
  3. 32
      src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java
  4. 2
      src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java
  5. 76
      src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java
  6. 15
      src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java
  7. 2
      src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClassController.java
  8. 2
      src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueController.java
  9. 2
      src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueRecordController.java
  10. 2
      src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueTaskController.java
  11. 2
      src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelController.java
  12. 3
      src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java
  13. 3
      src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfilePoliceController.java
  14. 2
      src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskClueController.java
  15. 2
      src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskPersonalController.java
  16. 2
      src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskScoreRuleController.java
  17. 3
      src/main/java/com/biutag/supervision/controller/sensitiveperception/ScoreController.java
  18. 29
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java
  19. 33
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java
  20. 18
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java
  21. 8
      src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java
  22. 3
      src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java
  23. 641
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  24. 2
      src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java
  25. 12
      src/main/java/com/biutag/supervision/pojo/vo/SubOneOverViewVo.java
  26. 2
      src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java
  27. 12
      src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java
  28. 72
      src/main/java/com/biutag/supervision/service/CaseVerificationService.java
  29. 49
      src/main/java/com/biutag/supervision/service/DataGlobalService.java
  30. 49
      src/main/java/com/biutag/supervision/service/DataMailService.java
  31. 8
      src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java
  32. 42
      src/main/java/com/biutag/supervision/service/SubOneService.java
  33. 18
      src/main/java/com/biutag/supervision/service/SubOneSupervisionNotifyService.java
  34. 8
      src/main/java/com/biutag/supervision/service/VideoSuperviseService.java
  35. 172
      src/main/resources/mapper/NegativeMapper.xml
  36. 4
      src/test/java/com/biutag/supervision/controller/datav/SubOneControllerTest.java

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

@ -1,9 +1,9 @@
package com.biutag.supervision.controller.datav; package com.biutag.supervision.controller.datav;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.mapper.NegativeProblemRelationMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.DataGlobalService; import com.biutag.supervision.service.DataGlobalService;
@ -17,10 +17,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Optional;
/** /**
@ -38,10 +36,12 @@ public class DataGlobalController {
private final DataGlobalService dataGlobalService; private final DataGlobalService dataGlobalService;
private final NegativeMapper negativeMapper; private final NegativeMapper negativeMapper;
private final NegativeProblemRelationMapper negativeProblemRelationMapper;
//region 左边 //region 左边
/** /**
* 机构问题排名 * 机构问题排名
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -50,8 +50,8 @@ public class DataGlobalController {
@GetMapping("/getOrganizationRank") @GetMapping("/getOrganizationRank")
public Result<JSONObject> getOrganizationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getOrganizationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> fxsjlist = dataGlobalService.getOrganizeProblemRank(3, beginTime, endTime); List<OrganizeProblemRankVo> fxsjlist = negativeMapper.selectOrganizeProblemRank(3, beginTime, endTime);
List<OrganizeProblemRankVo> jsdwlist = dataGlobalService.getOrganizeProblemRank(4, beginTime, endTime); List<OrganizeProblemRankVo> jsdwlist = negativeMapper.selectOrganizeProblemRank(3, beginTime, endTime);
JSONObject res = new JSONObject() JSONObject res = new JSONObject()
.fluentPut("fxsjlist", fxsjlist) .fluentPut("fxsjlist", fxsjlist)
.fluentPut("jsdwlist", jsdwlist); .fluentPut("jsdwlist", jsdwlist);
@ -61,6 +61,7 @@ public class DataGlobalController {
/** /**
* 业务类型占比 * 业务类型占比
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -70,7 +71,7 @@ public class DataGlobalController {
public Result<JSONObject> getBusinessRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getBusinessRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 业务类型占比 // 业务类型占比
List<EchartsVo> ywzblist = dataGlobalService.getBusinessRate(beginTime, endTime); List<EchartsVo> ywzblist = negativeMapper.selectBusinessRate(beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("ywzblist", ywzblist); JSONObject res = new JSONObject().fluentPut("ywzblist", ywzblist);
return Result.success(res); return Result.success(res);
} }
@ -81,6 +82,7 @@ public class DataGlobalController {
/** /**
* 获取首页大屏中央数据 * 获取首页大屏中央数据
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -90,27 +92,26 @@ public class DataGlobalController {
public Result<JSONObject> getAllGlobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getAllGlobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 获取数据大屏中央总数概览 // 获取数据大屏中央总数概览
GlobalOverViewVo overview= negativeMapper.getAllGlobalCount(beginTime, endTime); GlobalOverViewVo overview = negativeMapper.getAllGlobalCount(beginTime, endTime);
// JSONObject overview = dataGlobalService.getAllGlobalCount(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview); JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data); return Result.success(data);
} }
/** /**
* 地图数据 * 地图数据
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
*/ */
@Operation(summary = "首页大屏地图数据") @Operation(summary = "首页大屏地图数据")
@GetMapping("/getMap") @GetMapping("/getMap")
@Cacheable(cacheNames = "globalMap", key = "'p_'+ #endTime") // 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, public Result<JSONObject> getMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 地图数据 // 地图数据
List<GlobalMapIconVo> GlobalTempMapVoList = negativeMapper.getMapIcon(beginTime, endTime); List<GlobalMapIconVo> GlobalTempMapVoList = negativeMapper.getMapIcon(beginTime, endTime);
// List<GlobalMapIconVo> GlobalTempMapVoList = Optional.ofNullable(dataGlobalService.getMapIconInfo(beginTime, endTime)).
// orElseGet(ArrayList::new);
JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", GlobalTempMapVoList); JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", GlobalTempMapVoList);
return Result.success(data); return Result.success(data);
} }
@ -118,13 +119,14 @@ public class DataGlobalController {
/** /**
* 数据大屏问题趋势统计 * 数据大屏问题趋势统计
*
* @param year 年份 * @param year 年份
* @return Result<JSONObject> * @return Result<JSONObject>
*/ */
@Operation(summary = "数据大屏问题趋势统计") @Operation(summary = "数据大屏问题趋势统计")
@GetMapping("/getGlobalRecentlyTrendByMonth") @GetMapping("/getGlobalRecentlyTrendByMonth")
public Result<JSONObject> getGlobalRecentlyTrendByMonth(@RequestParam Integer year) { public Result<JSONObject> getGlobalRecentlyTrendByMonth(@RequestParam Integer year) {
List<EchartsVo> GlobalRecentlyTrendList = dataGlobalService.getGlobalRecentlyTrendByMonth(String.valueOf(year)); List<EchartsVo> GlobalRecentlyTrendList = negativeMapper.getGlobalRecentlyTrendByMonth(year.toString());
JSONObject jsonObject = new JSONObject().fluentPut("globalRecentlyTrendList", GlobalRecentlyTrendList); JSONObject jsonObject = new JSONObject().fluentPut("globalRecentlyTrendList", GlobalRecentlyTrendList);
return Result.success(jsonObject); return Result.success(jsonObject);
} }
@ -135,6 +137,7 @@ public class DataGlobalController {
/** /**
* 突出问题排名 * 突出问题排名
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -152,6 +155,7 @@ public class DataGlobalController {
/** /**
* 问题类型占比 * 问题类型占比
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -161,7 +165,7 @@ public class DataGlobalController {
public Result<JSONObject> getProblemBusinessRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getProblemBusinessRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 问题类型占比 // 问题类型占比
List<EchartsVo> wtlxlist = dataGlobalService.getProblemRate(beginTime, endTime); List<EchartsVo> wtlxlist = negativeProblemRelationMapper.selectProblemRate(beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("wtlxlist", wtlxlist); JSONObject res = new JSONObject().fluentPut("wtlxlist", wtlxlist);
return Result.success(res); return Result.success(res);
} }

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

@ -3,7 +3,9 @@ package com.biutag.supervision.controller.datav;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.constants.enums.DepartGroupEnum; import com.biutag.supervision.constants.enums.DepartGroupEnum;
import com.biutag.supervision.constants.enums.RepeatEnum; import com.biutag.supervision.constants.enums.RepeatEnum;
import com.biutag.supervision.mapper.DataPetition12337Mapper;
import com.biutag.supervision.mapper.DataPetitionComplaintMapper; import com.biutag.supervision.mapper.DataPetitionComplaintMapper;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.CaseVerifDepart; import com.biutag.supervision.pojo.dto.CaseVerifDepart;
import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.pojo.vo.*;
@ -41,11 +43,13 @@ public class DataMailViewController {
private final DataMailService dataMailService; private final DataMailService dataMailService;
private final DataPetitionComplaintMapper dataPetitionComplaintMapper; private final DataPetitionComplaintMapper dataPetitionComplaintMapper;
private final DataPetition12337Mapper dataPetition12337Mapper;
private final NegativeMapper negativeMapper;
// region 左边 // region 左边
/** /**
* 初访重访情况 * 初访重访情况
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -55,15 +59,15 @@ public class DataMailViewController {
public Result<JSONObject> getFirstAndRepeatMail(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getFirstAndRepeatMail(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 初访重访情况总览 // 初访重访情况总览
MailFirstAndRepeatOverviewVo firstAndRepeatOverview = dataMailService.getFirstAndRepeatOverview(beginTime, endTime); MailFirstAndRepeatOverviewVo firstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime);
// 初访重访分类数据排行 // 初访重访分类数据排行
List<OrganizeProblemRankVo> fxsjFirstRankList = dataMailService.getMailRank(beginTime, endTime, 3, RepeatEnum.FIRST_MAIL.getId()); List<OrganizeProblemRankVo> fxsjFirstRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 3, RepeatEnum.FIRST_MAIL.getId());
List<OrganizeProblemRankVo> fxsjRepeatRankList = dataMailService.getMailRank(beginTime, endTime, 3, RepeatEnum.REPEAT_MAIL.getId()); List<OrganizeProblemRankVo> fxsjRepeatRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 3, RepeatEnum.REPEAT_MAIL.getId());
List<OrganizeProblemRankVo> fxsjLeaderViewRankList = dataMailService.getMailLeaderRank(beginTime, endTime, 3); List<OrganizeProblemRankVo> fxsjLeaderViewRankList = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> bwzdFirstRankList = dataMailService.getMailRank(beginTime, endTime, 4, RepeatEnum.FIRST_MAIL.getId()); List<OrganizeProblemRankVo> bwzdFirstRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 4, RepeatEnum.FIRST_MAIL.getId());
List<OrganizeProblemRankVo> bwzdRepeatRankList = dataMailService.getMailRank(beginTime, endTime, 4, RepeatEnum.REPEAT_MAIL.getId()); List<OrganizeProblemRankVo> bwzdRepeatRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 4, RepeatEnum.REPEAT_MAIL.getId());
List<OrganizeProblemRankVo> bwzdLeaderViewRankList = dataMailService.getMailLeaderRank(beginTime, endTime, 4); List<OrganizeProblemRankVo> bwzdLeaderViewRankList = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 4);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("firstAndRepeatOverview", firstAndRepeatOverview) .fluentPut("firstAndRepeatOverview", firstAndRepeatOverview)
.fluentPut("fxsjFirstRankList", fxsjFirstRankList) .fluentPut("fxsjFirstRankList", fxsjFirstRankList)
@ -81,6 +85,7 @@ public class DataMailViewController {
/** /**
* 信访数据中央总览统计 * 信访数据中央总览统计
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -101,6 +106,7 @@ public class DataMailViewController {
/** /**
* 信访数据中央地图小图标数据 * 信访数据中央地图小图标数据
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -117,19 +123,19 @@ public class DataMailViewController {
} }
/** /**
* 信访数据大屏信访趋势统计 * 信访数据大屏信访趋势统计
*
* @param year 年份 * @param year 年份
* @return Result<JSONObject> * @return Result<JSONObject>
*/ */
@Operation(summary = "信访数据大屏信访趋势统计") @Operation(summary = "信访数据大屏信访趋势统计")
@GetMapping("/getMailTrend") @GetMapping("/getMailTrend")
public Result<JSONObject> getMailTrend(@RequestParam Integer year) { public Result<JSONObject> getMailTrend(@RequestParam Integer year) {
List<EchartsVo> countryList = dataMailService.getMailTrend(year, 21); // 国家 List<EchartsVo> countryList = negativeMapper.getMailTrend(year, 21);
List<EchartsVo> policeList = dataMailService.getMailTrend(year, 22); // 公安部信访 List<EchartsVo> policeList = negativeMapper.getMailTrend(year, 22);
List<EchartsVo> manageList = dataMailService.getMailTrend(year, 23); // 局长信箱 List<EchartsVo> manageList = negativeMapper.getMailTrend(year, 23);
List<EchartsVo> numberList = dataMailService.getMailTrend12337(year); // 12337信访 List<EchartsVo> numberList = dataPetition12337Mapper.getMailTrend12337(year);
JSONObject data = new JSONObject().fluentPut("countryList", countryList) JSONObject data = new JSONObject().fluentPut("countryList", countryList)
.fluentPut("policeList", policeList) .fluentPut("policeList", policeList)
.fluentPut("manageList", manageList) .fluentPut("manageList", manageList)
@ -142,6 +148,7 @@ public class DataMailViewController {
/** /**
* 缠访集访情况 * 缠访集访情况
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -153,13 +160,13 @@ public class DataMailViewController {
// 缠访集访情况 // 缠访集访情况
MailEntanglementMassOverviewVo mailEntanglementMassOverview = dataMailService.getEntanglementAndMassOverview(beginTime, endTime); MailEntanglementMassOverviewVo mailEntanglementMassOverview = dataMailService.getEntanglementAndMassOverview(beginTime, endTime);
List<OrganizeProblemRankVo> fxsjLeaderReviewList = dataMailService.getMailLeaderRank(beginTime, endTime, 3); List<OrganizeProblemRankVo> fxsjLeaderReviewList=dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> fxsjEntanglementList = dataMailService.getEntanglementMailRank(beginTime, endTime, 3); List<OrganizeProblemRankVo> fxsjEntanglementList=dataPetitionComplaintMapper.getEntanglementMailRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> fxsjMassList = dataMailService.getMassMailRank(beginTime, endTime, 3); List<OrganizeProblemRankVo> fxsjMassList=dataPetitionComplaintMapper.getMassMailRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> bwzdLeaderReviewList = dataMailService.getMailLeaderRank(beginTime, endTime, 4); List<OrganizeProblemRankVo> bwzdLeaderReviewList = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 4);
List<OrganizeProblemRankVo> bwzdEntanglementList = dataMailService.getEntanglementMailRank(beginTime, endTime, 4); List<OrganizeProblemRankVo> bwzdEntanglementList =dataPetitionComplaintMapper.getEntanglementMailRank(beginTime, endTime, 4);
List<OrganizeProblemRankVo> bwzdMassList = dataMailService.getMassMailRank(beginTime, endTime, 4); List<OrganizeProblemRankVo> bwzdMassList =dataPetitionComplaintMapper.getMassMailRank(beginTime, endTime, 4);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("mailEntanglementMassOverview", mailEntanglementMassOverview) .fluentPut("mailEntanglementMassOverview", mailEntanglementMassOverview)
@ -171,151 +178,6 @@ public class DataMailViewController {
.fluentPut("bwzdMassList", bwzdMassList); .fluentPut("bwzdMassList", bwzdMassList);
return Result.success(data); return Result.success(data);
} }
// endregion 右边
// region 旧接口
// 信访数据大屏统计
@Operation(summary = "信访数据大屏中央数据统计")
@GetMapping
public Result<JSONObject> mailVisits(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 信访数据总数概览
JSONObject overview = dataMailService.allMailCount(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 = 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);
List<CaseVerifDepart> fxsjMassMailList = dataPetitionComplaintMapper.selectMassMail(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), 1, beginTime, endTime);
// 部委支队缠访集访排名
List<CaseVerifDepart> bwzdEntanglementMailList = dataPetitionComplaintMapper.selectEntanglementMail(DepartGroupEnum.BUREAU_AFFILIATED.getId(), 1, beginTime, endTime);
List<CaseVerifDepart> bwzdMassMailList = dataPetitionComplaintMapper.selectMassMail(DepartGroupEnum.BUREAU_AFFILIATED.getId(), 1, beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview)
.fluentPut("fxsjFirstMailList", fxsjFirstMailList)
.fluentPut("fxsjRepeatMailList", fxsjRepeatMailList)
.fluentPut("fxsjLeaderViewMailList", fxsjLeaderViewMailList)
.fluentPut("bwzdFirstMailList", bwzdFirstMailList)
.fluentPut("bwzdRepeatMailList", bwzdRepeatMailList)
.fluentPut("bwzdLeaderViewMailList", bwzdLeaderViewMailList)
.fluentPut("fxsjEntanglementMailList", fxsjEntanglementMailList)
.fluentPut("fxsjMassMailList", fxsjMassMailList)
.fluentPut("bwzdEntanglementMailList", bwzdEntanglementMailList)
.fluentPut("bwzdMassMailList", bwzdMassMailList);
return Result.success(data);
}
/**
* 信访数据大屏信访趋势统计按日
*/
@Operation(summary = "信访数据大屏信访趋势统计(按日)")
@GetMapping("/getRecentlyMailTrendByDay")
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 = dataMailService.getRecentlyMailTrendByDay(sourcesCode, days, endTime);
ArrayList<String> dayList = new ArrayList<>();
ArrayList<String> totalList = new ArrayList<>();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
LocalDate previousDate = null;
for (RecentMailTrendByDayVo recentMailTrendVo : recentMailTrendVoList) {
// 获取当前日期
LocalDate currentDate = LocalDate.parse(recentMailTrendVo.getDayTime(), formatter);
if (previousDate != null) {
while (ChronoUnit.DAYS.between(previousDate, currentDate) > 1) {
previousDate = previousDate.plusDays(1); // 日期加1
String res = previousDate.format(formatter); // 格式化日期
dayList.add(res.substring(res.indexOf('/') + 1)); // 添加到dayList
totalList.add("0"); // 插入没有数据的日期,总数为0
}
}
String res = currentDate.format(formatter);
dayList.add(res.substring(res.indexOf('/') + 1));
totalList.add(recentMailTrendVo.getTotal());
previousDate = currentDate;
}
jsonObject.fluentPut("dayList", dayList);
jsonObject.fluentPut("totalList", totalList);
return Result.success(jsonObject);
}
/**
* 信访数据大屏信访趋势统计按月
*
* @param sourcesCode
* @param year
* @return
*/
@Operation(summary = "信访数据大屏信访趋势统计(按月)")
@GetMapping("/getRecentlyMailTrendMonth")
public Result<JSONObject> getRecentlyMailTrendByMonth(@RequestParam Integer sourcesCode, @RequestParam Integer year) {
JSONObject jsonObject = new JSONObject();
List<RecentMailTrendByMonthVo> recentMailTrendVoList = dataMailService.getRecentlyMailTrendByMonth(sourcesCode, String.valueOf(year));
ArrayList<String> monthList = new ArrayList<>();
ArrayList<String> totalList = new ArrayList<>();
for (RecentMailTrendByMonthVo recentMailTrendByMonthVo : recentMailTrendVoList) {
monthList.add(recentMailTrendByMonthVo.getMonthTime().substring(recentMailTrendByMonthVo.getMonthTime().indexOf("-") + 1));
totalList.add(recentMailTrendByMonthVo.getTotal());
}
jsonObject.fluentPut("monthList", monthList);
jsonObject.fluentPut("totalList", totalList);
return Result.success(jsonObject);
}
/**
* 信访数据大屏12337信访趋势统计按月
*
* @param year
* @return
*/
@Operation(summary = "信访数据大屏12337信访趋势统计(按月)")
@GetMapping("/getRecentlyMailTrendByMonth12337")
public Result<JSONObject> getRecentlyMailTrendByMonth12337(@RequestParam Integer year) {
JSONObject jsonObject = new JSONObject();
List<RecentMailTrendByMonthVo> recentMailTrendVoList = dataMailService.getRecentlyMailTrendByMonth12337(String.valueOf(year));
ArrayList<String> monthList = new ArrayList<>();
ArrayList<String> totalList = new ArrayList<>();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
// 要展示到的月份 从那个月开始
YearMonth endMonth = YearMonth.of(year, 12);
YearMonth startMonth = YearMonth.of(year, 1);
for (RecentMailTrendByMonthVo recentMailTrendByMonthVo : recentMailTrendVoList) {
YearMonth trendMonth = YearMonth.parse(recentMailTrendByMonthVo.getMonthTime(), formatter);
while (startMonth.isBefore(trendMonth)) {
String res = startMonth.format(formatter);
monthList.add(res); // 添加到monthList
totalList.add("0"); // 插入没有数据的月份,总数为0
startMonth = startMonth.plusMonths(1);
}
String res = trendMonth.format(formatter);
monthList.add(res);
totalList.add(recentMailTrendByMonthVo.getTotal());
startMonth = trendMonth.plusMonths(1);
}
// 添加从最后一个有数据的月份到当前月份的缺失月份
while (!startMonth.isAfter(endMonth)) {
String res = startMonth.format(formatter);
monthList.add(res); // 添加到monthList
totalList.add("0"); // 插入没有数据的月份,总数为0
startMonth = startMonth.plusMonths(1);
}
// 截取月份
List<String> monthOnlyList = monthList.stream()
.map(date -> date.substring(date.indexOf('-') + 1))
.collect(Collectors.toList());
jsonObject.fluentPut("monthList", monthOnlyList);
jsonObject.fluentPut("totalList", totalList);
return Result.success(jsonObject);
}
// endregion
} }

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

@ -2,6 +2,7 @@ package com.biutag.supervision.controller.datav;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.DataCaseVerifMapper; import com.biutag.supervision.mapper.DataCaseVerifMapper;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.CaseVerificationCountVo; import com.biutag.supervision.pojo.vo.CaseVerificationCountVo;
import com.biutag.supervision.pojo.vo.CaseVerificationMapVo; import com.biutag.supervision.pojo.vo.CaseVerificationMapVo;
@ -31,12 +32,13 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*;
public class DataVCaseVerifController { public class DataVCaseVerifController {
private final DataCaseVerifMapper dataCaseVerifMapper; private final DataCaseVerifMapper dataCaseVerifMapper;
private final CaseVerificationService caseVerificationService; private final NegativeMapper negativeMapper;
// region 左边 // region 左边
/** /**
* 案件核查大屏分县市局排名 * 案件核查大屏分县市局排名
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -44,8 +46,8 @@ public class DataVCaseVerifController {
@GetMapping("/getCaseVerificationRank") @GetMapping("/getCaseVerificationRank")
public Result<JSONObject> getCaseVerificationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getCaseVerificationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> fxsjRankList = caseVerificationService.getCaseVerificationRank(beginTime, endTime, 3); List<OrganizeProblemRankVo> fxsjRankList = negativeMapper.getCaseVerificationRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> jsdwRankList = caseVerificationService.getCaseVerificationRank(beginTime, endTime, 4); List<OrganizeProblemRankVo> jsdwRankList = negativeMapper.getCaseVerificationRank(beginTime, endTime, 4);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("fxsjRankList", fxsjRankList) .fluentPut("fxsjRankList", fxsjRankList)
.fluentPut("jsdwRankList", jsdwRankList); .fluentPut("jsdwRankList", jsdwRankList);
@ -54,6 +56,7 @@ public class DataVCaseVerifController {
/** /**
* 案件问题性质 * 案件问题性质
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -63,8 +66,8 @@ public class DataVCaseVerifController {
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> zfbaPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 6); // 执法办案 List<EchartsVo> zfbaPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 6); // 执法办案
List<EchartsVo> fwglPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 11); // 服务管理 List<EchartsVo> fwglPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 11); // 服务管理
// List<EchartsVo> jgjjPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 6); // 执法 JSONObject data = new JSONObject()
JSONObject data = new JSONObject().fluentPut("zfbaPieList", zfbaPieList) .fluentPut("zfbaPieList", zfbaPieList)
.fluentPut("fwglPieList", fwglPieList); .fluentPut("fwglPieList", fwglPieList);
return Result.success(data); return Result.success(data);
} }
@ -75,6 +78,7 @@ public class DataVCaseVerifController {
/** /**
* 案件核查大屏中央数据总览 * 案件核查大屏中央数据总览
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -82,7 +86,7 @@ public class DataVCaseVerifController {
@GetMapping("/getAllCaseVerificationCount") @GetMapping("/getAllCaseVerificationCount")
public Result<JSONObject> getAllCaseVerificationCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getAllCaseVerificationCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
CaseVerificationCountVo overview = caseVerificationService.getAllCaseVerificationCount(beginTime, endTime); CaseVerificationCountVo overview = negativeMapper.getAllCaseVerificationCount(beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("overview", overview); JSONObject res = new JSONObject().fluentPut("overview", overview);
return Result.success(res); return Result.success(res);
} }
@ -90,6 +94,7 @@ public class DataVCaseVerifController {
/** /**
* 案件核查大屏地图 * 案件核查大屏地图
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -98,19 +103,20 @@ public class DataVCaseVerifController {
@Cacheable(cacheNames = "CaseVerificationMap", key = "'p_'+ #endTime") @Cacheable(cacheNames = "CaseVerificationMap", key = "'p_'+ #endTime")
public Result<JSONObject> getCaseVerificationMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getCaseVerificationMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<CaseVerificationMapVo> caseVerificationMapList = caseVerificationService.getCaseVerificationMap(beginTime, endTime); List<CaseVerificationMapVo> caseVerificationMapList = negativeMapper.getCaseVerificationMap(beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList); JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList);
return Result.success(res); return Result.success(res);
} }
/** /**
* 查处问题趋势 * 查处问题趋势
*
* @param year 年份 * @param year 年份
* @return Result<JSONObject> * @return Result<JSONObject>
*/ */
@GetMapping("/getCaseVerificationTrend") @GetMapping("/getCaseVerificationTrend")
public Result<JSONObject> getCaseVerificationTrend(@RequestParam Integer year) { public Result<JSONObject> getCaseVerificationTrend(@RequestParam Integer year) {
List<EchartsVo> proTrendList = caseVerificationService.getCaseVerificationTrend(String.valueOf(year), A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); List<EchartsVo> proTrendList = negativeMapper.getTrend(year, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList); JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList);
return Result.success(data); return Result.success(data);
} }
@ -121,6 +127,7 @@ public class DataVCaseVerifController {
/** /**
* 案件来源占比 问责处理情况 * 案件来源占比 问责处理情况
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -128,8 +135,8 @@ public class DataVCaseVerifController {
@GetMapping("/getCaseSourceRateAndDealSituation") @GetMapping("/getCaseSourceRateAndDealSituation")
public Result<JSONObject> getCaseSourceRateAndDealSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getCaseSourceRateAndDealSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> caseSourceRateList = caseVerificationService.getCaseSourceRate(beginTime, endTime); List<EchartsVo> caseSourceRateList = negativeMapper.getCaseSourceRate(beginTime, endTime);
List<EchartsVo> dealSituationPieList = caseVerificationService.getDealSituation(beginTime, endTime); List<EchartsVo> dealSituationPieList = negativeMapper.getDealSituation(beginTime, endTime);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("caseSourceRateList", caseSourceRateList) .fluentPut("caseSourceRateList", caseSourceRateList)
.fluentPut("dealSituationPieList", dealSituationPieList); .fluentPut("dealSituationPieList", dealSituationPieList);
@ -139,6 +146,7 @@ public class DataVCaseVerifController {
/** /**
* 禁闭处理情况 停职处理情况 * 禁闭处理情况 停职处理情况
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return Result<JSONObject> * @return Result<JSONObject>
@ -146,8 +154,8 @@ public class DataVCaseVerifController {
@GetMapping("/getConfinementAndPause") @GetMapping("/getConfinementAndPause")
public Result<JSONObject> getConfinement(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getConfinement(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> jbclList = caseVerificationService.getConfinementAndPause(beginTime, endTime, 1); // 禁闭 List<EchartsVo> jbclList = negativeMapper.getConfinementAndPause(beginTime,endTime, 1);
List<EchartsVo> tzclList = caseVerificationService.getConfinementAndPause(beginTime, endTime, 2); // 停职 List<EchartsVo> tzclList = negativeMapper.getConfinementAndPause(beginTime, endTime, 2); // 停职
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("jbclList", jbclList) .fluentPut("jbclList", jbclList)
.fluentPut("tzclList", tzclList); .fluentPut("tzclList", tzclList);

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

@ -90,7 +90,7 @@ public class DatavRightsComfortController {
// endregion // endregion
// region 中间 // region 中间
// 抚慰大屏中央总览数据 // 抚慰大屏中央总览数据
@GetMapping("/getALlComfortCount") @GetMapping("/getALlComfortCount")

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

@ -1,6 +1,7 @@
package com.biutag.supervision.controller.datav; package com.biutag.supervision.controller.datav;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.DataSupervisionNotifyServiceImpl; import com.biutag.supervision.service.DataSupervisionNotifyServiceImpl;
@ -38,11 +39,12 @@ public class SupervisionNotifyController {
private final DataSupervisionNotifyServiceImpl dataSupervisionNotifyService; private final DataSupervisionNotifyServiceImpl dataSupervisionNotifyService;
private final NegativeMapper negativeMapper;
// region 左边 // region 左边
/** /**
* 获取日常督察情况 * 获取日常督察情况
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return * @return
@ -51,10 +53,10 @@ public class SupervisionNotifyController {
@GetMapping("/rank") @GetMapping("/rank")
public Result<JSONObject> getChangedRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getChangedRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
DayTimeSuperviseVo fxsjRankOverview = dataSupervisionNotifyService.getSuperversionRank(beginTime, endTime, 3); DayTimeSuperviseVo fxsjRankOverview = negativeMapper.getSuperversionRank(beginTime, endTime, 3);
DayTimeSuperviseVo jsdwRankOverview = dataSupervisionNotifyService.getSuperversionRank(beginTime, endTime, 4); DayTimeSuperviseVo jsdwRankOverview = negativeMapper.getSuperversionRank(beginTime, endTime, 4);
List<RankVo> fxsjChangedRankList = dataSupervisionNotifyService.getChangedRateRank(3, beginTime, endTime); List<RankVo> fxsjChangedRankList = negativeMapper.getChangedRateRank(beginTime, endTime, 3);
List<RankVo> jsdwChangedRankList = dataSupervisionNotifyService.getChangedRateRank(4, beginTime, endTime); List<RankVo> jsdwChangedRankList = negativeMapper.getChangedRateRank(beginTime, endTime, 4);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("fxsjRankOverview", fxsjRankOverview) .fluentPut("fxsjRankOverview", fxsjRankOverview)
.fluentPut("jsdwRankOverview", jsdwRankOverview) .fluentPut("jsdwRankOverview", jsdwRankOverview)
@ -65,6 +67,7 @@ public class SupervisionNotifyController {
/** /**
* 问题类型占比 * 问题类型占比
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return * @return
@ -72,7 +75,8 @@ public class SupervisionNotifyController {
@GetMapping("/getProblemTypeRate") @GetMapping("/getProblemTypeRate")
public Result<JSONObject> getProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> wtlxList = dataSupervisionNotifyService.getProblemTypeRatio(beginTime, endTime); List<EchartsVo> wtlxList = negativeMapper.getProblemTypeRatio(beginTime, endTime);
// List<EchartsVo> wtlxList = dataSupervisionNotifyService.getProblemTypeRatio(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("wtlxList", wtlxList); JSONObject data = new JSONObject().fluentPut("wtlxList", wtlxList);
return Result.success(data); return Result.success(data);
} }
@ -82,22 +86,24 @@ public class SupervisionNotifyController {
// region 中间 // region 中间
/** /**
* 获取现场督察大屏中央数据 * 获取现场督察大屏中央总览
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return * @return
*/ */
@Operation(summary = "获取所有督察通知相关数量") @Operation(summary = "获取现场督察大屏中央总览")
@GetMapping @GetMapping
public Result<JSONObject> getAllSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getAllSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
JSONObject overview = dataSupervisionNotifyService.getAllSupervisionNotifyCount(beginTime, endTime); SupervisionNotifyOverView overview = negativeMapper.getAllSupervisionNotifyCount(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview); JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data); return Result.success(data);
} }
/** /**
* 地图数据 * 地图小卡片
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return List<SuperviseMapIconVo> * @return List<SuperviseMapIconVo>
@ -107,19 +113,20 @@ public class SupervisionNotifyController {
public Result<JSONObject> getMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
//地图数据 //地图数据
List<SuperviseMapIconVo> superviseTempMapVoList = dataSupervisionNotifyService.getSupervisionMapIconInfo(beginTime, endTime); List<SuperviseMapIconVo> superviseTempMapVoList = negativeMapper.getSupervisionMapIconInfo(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("superviseTempMapVoList", superviseTempMapVoList); JSONObject data = new JSONObject().fluentPut("superviseTempMapVoList", superviseTempMapVoList);
return Result.success(data); return Result.success(data);
} }
/** /**
* 获取现场督察问题趋势 * 获取现场督察问题趋势
*
* @param year 年份 * @param year 年份
* @return List<EchartsVo> * @return List<EchartsVo>
*/ */
@GetMapping("/getSupervisionTrend") @GetMapping("/getSupervisionTrend")
public Result<JSONObject> getSupervisionTrend(@RequestParam String year) { public Result<JSONObject> getSupervisionTrend(@RequestParam Integer year) {
List<EchartsVo> supervisionTrend = dataSupervisionNotifyService.getSupervisionTrend(year,XCDC.getValue(), ZXDC.getValue()); List<EchartsVo> supervisionTrend = negativeMapper.getTrend(year, XCDC.getValue(), ZXDC.getValue());
JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend); JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend);
return Result.success(data); return Result.success(data);
} }
@ -130,6 +137,7 @@ public class SupervisionNotifyController {
/** /**
* 黄赌毒数据 * 黄赌毒数据
*
* @param beginTime 开始时间 * @param beginTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @return JSONObject * @return JSONObject
@ -138,11 +146,10 @@ public class SupervisionNotifyController {
public Result<JSONObject> getYellowBetDrug(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getYellowBetDrug(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 黄赌毒总览 // 黄赌毒总览
DayTimeSuperviseVo fxsjYellowBetOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 1); DayTimeSuperviseVo fxsjYellowBetOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 3, 1);
DayTimeSuperviseVo jsdwYellowBetOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 1); DayTimeSuperviseVo jsdwYellowBetOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 4, 1);
// 黄毒赌列表 List<OrganizeProblemRankVo> fxsjYellowBetRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 3, 1);
List<OrganizeProblemRankVo> fxsjYellowBetRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 1); List<OrganizeProblemRankVo> jsdwYellowBetRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 4, 1);
List<OrganizeProblemRankVo> jsdwYellowBetRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 1);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("fxsjYellowBetOverview", fxsjYellowBetOverview) .fluentPut("fxsjYellowBetOverview", fxsjYellowBetOverview)
@ -153,17 +160,16 @@ public class SupervisionNotifyController {
} }
// 枪支管理数据 // 枪支管理数据
@GetMapping("/getGunController") @GetMapping("/getGunController")
public Result<JSONObject> getGunController(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getGunController(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 枪支管理总览 // 枪支管理总览
DayTimeSuperviseVo fxsjGunControllerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 2); DayTimeSuperviseVo fxsjGunControllerOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 3, 2);
DayTimeSuperviseVo jsdwGunControllerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 2); DayTimeSuperviseVo jsdwGunControllerOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 4, 2);
// 枪支管理列表 // 枪支管理列表
List<OrganizeProblemRankVo> fxsjGunControllerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 2); List<OrganizeProblemRankVo> fxsjGunControllerRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 3, 2);
List<OrganizeProblemRankVo> jsdwGunControllerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 2); List<OrganizeProblemRankVo> jsdwGunControllerRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 4, 2);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("fxsjGunControllerOverview", fxsjGunControllerOverview) .fluentPut("fxsjGunControllerOverview", fxsjGunControllerOverview)
@ -178,11 +184,11 @@ public class SupervisionNotifyController {
public Result<JSONObject> getCompanyProblem(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getCompanyProblem(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 涉企问题总览 // 涉企问题总览
DayTimeSuperviseVo fxsjCompanyProblemOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 3); DayTimeSuperviseVo fxsjCompanyProblemOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 3, 3);
DayTimeSuperviseVo jsdwCompanyProblemOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 3); DayTimeSuperviseVo jsdwCompanyProblemOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 4, 3);
// 涉企问题列表 // 涉企问题列表
List<OrganizeProblemRankVo> fxsjCompanyProblemRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 3); List<OrganizeProblemRankVo> fxsjCompanyProblemRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 3, 3);
List<OrganizeProblemRankVo> jsdwCompanyProblemRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 3); List<OrganizeProblemRankVo> jsdwCompanyProblemRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 4, 3);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("fxsjCompanyProblemOverview", fxsjCompanyProblemOverview) .fluentPut("fxsjCompanyProblemOverview", fxsjCompanyProblemOverview)
@ -197,11 +203,11 @@ public class SupervisionNotifyController {
public Result<JSONObject> getHandleCase(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getHandleCase(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 执法办案总览 // 执法办案总览
DayTimeSuperviseVo fxsjHandleCaseOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 4); DayTimeSuperviseVo fxsjHandleCaseOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 3, 4);
DayTimeSuperviseVo jsdwHandleCaseOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 4); DayTimeSuperviseVo jsdwHandleCaseOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 4, 4);
// 执法办案列表 // 执法办案列表
List<OrganizeProblemRankVo> fxsjHandleCaseRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 4); List<OrganizeProblemRankVo> fxsjHandleCaseRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 3, 4);
List<OrganizeProblemRankVo> jsdwHandleCaseRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 4); List<OrganizeProblemRankVo> jsdwHandleCaseRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 4, 4);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("fxsjHandleCaseOverview", fxsjHandleCaseOverview) .fluentPut("fxsjHandleCaseOverview", fxsjHandleCaseOverview)
@ -217,11 +223,11 @@ public class SupervisionNotifyController {
public Result<JSONObject> getCheckBeer(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getCheckBeer(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 工作日测酒总览 // 工作日测酒总览
DayTimeSuperviseVo fxsjCheckBeerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 5); DayTimeSuperviseVo fxsjCheckBeerOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 3, 5);
DayTimeSuperviseVo jsdwCheckBeerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 5); DayTimeSuperviseVo jsdwCheckBeerOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 4, 5);
// 工作日测酒列表 // 工作日测酒列表
List<OrganizeProblemRankVo> fxsjCheckBeerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 5); List<OrganizeProblemRankVo> fxsjCheckBeerRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 3, 5);
List<OrganizeProblemRankVo> jsdwCheckBeerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 5); List<OrganizeProblemRankVo> jsdwCheckBeerRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 4, 5);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("fxsjCheckBeerOverview", fxsjCheckBeerOverview) .fluentPut("fxsjCheckBeerOverview", fxsjCheckBeerOverview)

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

@ -1,6 +1,7 @@
package com.biutag.supervision.controller.datav; package com.biutag.supervision.controller.datav;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.VideoSuperviseService; import com.biutag.supervision.service.VideoSuperviseService;
@ -34,6 +35,7 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SPDC;
public class VideoSuperviseController { public class VideoSuperviseController {
private final VideoSuperviseService videoSuperviseService; private final VideoSuperviseService videoSuperviseService;
private final NegativeMapper negativeMapper;
//region 左边 //region 左边
@ -48,8 +50,8 @@ public class VideoSuperviseController {
@GetMapping("/getVideoSuperviseProblemRank") @GetMapping("/getVideoSuperviseProblemRank")
public Result<JSONObject> getVideoSuperviseProblemRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getVideoSuperviseProblemRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> fxsjVideoSuperviseProblemRankList = videoSuperviseService.getVideoSuperviseProblemRank(beginTime, endTime, 3); List<OrganizeProblemRankVo> fxsjVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> jsdwVideoSuperviseProblemRankList = videoSuperviseService.getVideoSuperviseProblemRank(beginTime, endTime, 4); List<OrganizeProblemRankVo> jsdwVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 4);
JSONObject data = new JSONObject(); JSONObject data = new JSONObject();
data.fluentPut("fxsjVideoSuperviseProblemRankList", fxsjVideoSuperviseProblemRankList); data.fluentPut("fxsjVideoSuperviseProblemRankList", fxsjVideoSuperviseProblemRankList);
data.fluentPut("jsdwVideoSuperviseProblemRankList", jsdwVideoSuperviseProblemRankList); data.fluentPut("jsdwVideoSuperviseProblemRankList", jsdwVideoSuperviseProblemRankList);
@ -70,7 +72,8 @@ public class VideoSuperviseController {
public Result<JSONObject> getAllVideoSuperviseCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getAllVideoSuperviseCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 获取视频督察中央数据 // 获取视频督察中央数据
VideoSuperviseCountVo overview = videoSuperviseService.getAllVideoSuperviseCount(beginTime, endTime); VideoSuperviseCountVo overview = negativeMapper.getAllVideoSuperviseCount(beginTime, endTime);
// VideoSuperviseCountVo overview = videoSuperviseService.getAllVideoSuperviseCount(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview); JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data); return Result.success(data);
} }
@ -88,7 +91,7 @@ public class VideoSuperviseController {
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 地图数据 // 地图数据
List<VideoSuperviseMapIconVo> videoSuperviseMapIconVoList = Optional.ofNullable(videoSuperviseService.getVideoSuperviseMapIconInfo(beginTime, endTime)). List<VideoSuperviseMapIconVo> videoSuperviseMapIconVoList = Optional.ofNullable(negativeMapper.getVideoSuperviseMapIconInfo(beginTime, endTime)).
orElseGet(ArrayList::new); orElseGet(ArrayList::new);
JSONObject data = new JSONObject().fluentPut("videoSuperviseMapIconVoList", videoSuperviseMapIconVoList); JSONObject data = new JSONObject().fluentPut("videoSuperviseMapIconVoList", videoSuperviseMapIconVoList);
return Result.success(data); return Result.success(data);
@ -98,7 +101,7 @@ public class VideoSuperviseController {
@Operation(summary = "数据大屏问题趋势统计") @Operation(summary = "数据大屏问题趋势统计")
@GetMapping("/getVideoSuperviseTrend") @GetMapping("/getVideoSuperviseTrend")
public Result<JSONObject> getVideoSuperviseTrend(@RequestParam Integer year) { public Result<JSONObject> getVideoSuperviseTrend(@RequestParam Integer year) {
List<EchartsVo> videoSuperviseTrendList = videoSuperviseService.getVideoSuperviseTrend(String.valueOf(year), SPDC.getValue()); List<EchartsVo> videoSuperviseTrendList = negativeMapper.getTrend(year, SPDC.getValue());
JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseTrendList", videoSuperviseTrendList); JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseTrendList", videoSuperviseTrendList);
return Result.success(jsonObject); return Result.success(jsonObject);
} }
@ -112,7 +115,7 @@ public class VideoSuperviseController {
@GetMapping("/getVideoSuperviseProblemTypeRate") @GetMapping("/getVideoSuperviseProblemTypeRate")
public Result<JSONObject> getVideoSuperviseProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getVideoSuperviseProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> videoSuperviseProblemTypeRate = videoSuperviseService.getVideoSuperviseProblemTypeRate(beginTime, endTime); List<EchartsVo> videoSuperviseProblemTypeRate = negativeMapper.getVideoSuperviseProblemTypeRate(beginTime, endTime);
JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseProblemTypeRate", videoSuperviseProblemTypeRate); JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseProblemTypeRate", videoSuperviseProblemTypeRate);
return Result.success(jsonObject); return Result.success(jsonObject);
} }

2
src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClassController.java → src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClassController.java

@ -1,4 +1,4 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitiveperception;
import com.biutag.supervision.mapper.ModelClassMapper; import com.biutag.supervision.mapper.ModelClassMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;

2
src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueController.java → src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueController.java

@ -1,4 +1,4 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitiveperception;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

2
src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueRecordController.java → src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueRecordController.java

@ -1,4 +1,4 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitiveperception;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

2
src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java → src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueTaskController.java

@ -1,4 +1,4 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitiveperception;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

2
src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelController.java → src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelController.java

@ -1,4 +1,4 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitiveperception;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;

3
src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java → src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java

@ -1,4 +1,4 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitiveperception;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@ -15,7 +15,6 @@ import com.biutag.supervision.pojo.dto.common.BarItem;
import com.biutag.supervision.pojo.dto.common.PieItem; import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.pojo.model.DepartNegativeModel; import com.biutag.supervision.pojo.model.DepartNegativeModel;
import com.biutag.supervision.pojo.model.PoliceNegativeModel;
import com.biutag.supervision.pojo.param.DepartNegativeQueryParam; import com.biutag.supervision.pojo.param.DepartNegativeQueryParam;
import com.biutag.supervision.service.*; import com.biutag.supervision.service.*;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;

3
src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfilePoliceController.java → src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfilePoliceController.java

@ -1,4 +1,4 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitiveperception;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.NumberUtil;
@ -12,7 +12,6 @@ import com.biutag.supervision.mapper.ProfilePoliceMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.domain.ProfileDepart; import com.biutag.supervision.pojo.domain.ProfileDepart;
import com.biutag.supervision.pojo.domain.ProfilePolice; import com.biutag.supervision.pojo.domain.ProfilePolice;
import com.biutag.supervision.pojo.dto.common.BarItem;
import com.biutag.supervision.pojo.dto.common.PieItem; import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.pojo.model.PoliceNegativeModel; import com.biutag.supervision.pojo.model.PoliceNegativeModel;

2
src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskClueController.java → src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskClueController.java

@ -1,4 +1,4 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitiveperception;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;

2
src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java → src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskPersonalController.java

@ -1,4 +1,4 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitiveperception;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;

2
src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskScoreRuleController.java → src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskScoreRuleController.java

@ -1,4 +1,4 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitiveperception;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.RiskScoreRule; import com.biutag.supervision.pojo.entity.RiskScoreRule;

3
src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java → src/main/java/com/biutag/supervision/controller/sensitiveperception/ScoreController.java

@ -1,4 +1,4 @@
package com.biutag.supervision.controller.sensitivePerception; package com.biutag.supervision.controller.sensitiveperception;
import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.NumberUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -21,7 +21,6 @@ import java.time.ZoneId;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors;
/** /**
* @author wxc * @author wxc

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

@ -1,6 +1,7 @@
package com.biutag.supervision.controller.subdatav; package com.biutag.supervision.controller.subdatav;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.RankVo; import com.biutag.supervision.pojo.vo.RankVo;
@ -36,7 +37,7 @@ public class SubOneGlobalController {
private final CountyStreetDeptService countyStreetDeptService; private final CountyStreetDeptService countyStreetDeptService;
private final SubOneService subOneService; private final SubOneService subOneService;
private final NegativeMapper negativeMapper;
// region左边 // region左边
@Operation(summary = "获取首页二级大屏督察问题排名") @Operation(summary = "获取首页二级大屏督察问题排名")
@ -44,10 +45,10 @@ public class SubOneGlobalController {
public Result<JSONObject> getSubOneSupervisionRank(@RequestParam Integer departPId, public Result<JSONObject> getSubOneSupervisionRank(@RequestParam Integer departPId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
SubOneOverViewVo supervisionPrecinctOverView = subOneService.getSubOneSupervisionRankOverView(departPId, 10, beginTime, endTime, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); SubOneOverViewVo supervisionPrecinctOverView = negativeMapper.getSubOneGlobalPoliceSupervisionRankOverView(departPId, beginTime, endTime);
SubOneOverViewVo supervisionTeamOverView = subOneService.getSubOneSupervisionRankOverView(departPId, -1, beginTime, endTime, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); SubOneOverViewVo supervisionTeamOverView = negativeMapper.getSubOneGlobalTeamSupervisionRankOverView(departPId, beginTime, endTime);
List<RankVo> supervisionPrecinctList = subOneService.getSubOneSupervisionRank(departPId, 10, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); // 案件核查派出所排名 List<RankVo> supervisionPrecinctList = negativeMapper.getSubOneGlobalPrecinctSupervisionRank(departPId, beginTime, endTime);
List<RankVo> supervisionTeamList = subOneService.getSubOneSupervisionRank(departPId, -1, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); // 案件核查派出所排名 List<RankVo> supervisionTeamList = negativeMapper.getSubOneGlobalTeamSupervisionRank(departPId, beginTime, endTime);
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("supervisionPrecinctOverView", supervisionPrecinctOverView) jsonObject.fluentPut("supervisionPrecinctOverView", supervisionPrecinctOverView)
.fluentPut("supervisionTeamOverView", supervisionTeamOverView) .fluentPut("supervisionTeamOverView", supervisionTeamOverView)
@ -76,7 +77,9 @@ public class SubOneGlobalController {
public Result<JSONObject> getSubOneOverView(@RequestParam Integer departPId, public Result<JSONObject> getSubOneOverView(@RequestParam Integer departPId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
SubOneOverViewVo subOneOverViewVo = subOneService.getSubOneOverView(departPId, beginTime, endTime); // todo 更新
SubOneOverViewVo subOneOverViewVo = negativeMapper.getSubOneOverView(departPId, beginTime, endTime);
// SubOneOverViewVo subOneOverViewVo = subOneService.getSubOneOverView(departPId, beginTime, endTime);
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("subOneOverViewVo", subOneOverViewVo); jsonObject.fluentPut("subOneOverViewVo", subOneOverViewVo);
return Result.success(jsonObject); return Result.success(jsonObject);
@ -93,10 +96,10 @@ public class SubOneGlobalController {
@Operation(summary = "获取首页二级大屏问题趋势") @Operation(summary = "获取首页二级大屏问题趋势")
@GetMapping("/getSubOneTrend") @GetMapping("/getSubOneTrend")
public Result<JSONObject> getSubOneTrend(@RequestParam Integer departPId, @RequestParam Integer year) { public Result<JSONObject> getSubOneTrend(@RequestParam Integer departPId, @RequestParam Integer year) {
List<EchartsVo> superviseProTrend = subOneService.getSubOneTrend(departPId, year, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); // 督察问题趋势 List<EchartsVo> superviseProTrend = negativeMapper.getSubOneTrend(departPId, year.toString(), XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); // 督察问题趋势
List<EchartsVo> caseVerifyTrend = subOneService.getSubOneTrend(departPId, year, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); List<EchartsVo> caseVerifyTrend = negativeMapper.getSubOneTrend(departPId, year.toString(), A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<EchartsVo> policeCommentTrend = new ArrayList<>(); List<EchartsVo> policeCommentTrend = new ArrayList<>();
List<EchartsVo> mailTrend = subOneService.getSubOneTrend(departPId, year, GJXFPT.getValue(), GABXF.getValue(), JZXX.getValue(), XF12337.getValue(), XF_QT.getValue()); List<EchartsVo> mailTrend = negativeMapper.getSubOneTrend(departPId, year.toString(), GJXFPT.getValue(), GABXF.getValue(), JZXX.getValue(), XF12337.getValue(), XF_QT.getValue());
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("superviseProTrend", superviseProTrend) jsonObject.fluentPut("superviseProTrend", superviseProTrend)
.fluentPut("caseVerifyTrend", caseVerifyTrend) .fluentPut("caseVerifyTrend", caseVerifyTrend)
@ -136,10 +139,10 @@ public class SubOneGlobalController {
public Result<JSONObject> getSubOneCaseVerifyRank(@RequestParam Integer departPId, public Result<JSONObject> getSubOneCaseVerifyRank(@RequestParam Integer departPId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
SubOneOverViewVo caseVerifyPrecinctOverView = subOneService.getCaseVerifyOverView(departPId, 10, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); SubOneOverViewVo caseVerifyPrecinctOverView = negativeMapper.getGlobalPoliceCaseVerifyOverView(departPId, beginTime, endTime);
SubOneOverViewVo caseVerifyTeamOverView = subOneService.getCaseVerifyOverView(departPId, -1, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); SubOneOverViewVo caseVerifyTeamOverView = negativeMapper.getGlobalTeamCaseVerifyOverView(departPId, beginTime, endTime);
List<RankVo> caseVerifyPrecinctList = subOneService.getCaseVerifyRank(departPId, 10, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); // 案件核查派出所排名 List<RankVo> caseVerifyPrecinctList = negativeMapper.getGlobalPoliceCaseVerifyRank(departPId, beginTime, endTime); // 案件核查派出所排名
List<RankVo> caseVerifyTeamList = subOneService.getCaseVerifyRank(departPId, -1, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); // 案件核查大队排名 List<RankVo> caseVerifyTeamList = negativeMapper.getGlobalTeamCaseVerifyRank(departPId, beginTime, endTime); // 案件核查大队排名
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("caseVerifyPrecinctOverView", caseVerifyPrecinctOverView) jsonObject.fluentPut("caseVerifyPrecinctOverView", caseVerifyPrecinctOverView)
.fluentPut("caseVerifyTeamOverView", caseVerifyTeamOverView) .fluentPut("caseVerifyTeamOverView", caseVerifyTeamOverView)

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

@ -0,0 +1,33 @@
package com.biutag.supervision.controller.subdatav;
import com.biutag.supervision.mapper.DataPetitionComplaintMapper;
import com.biutag.supervision.service.DataMailService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Auther: sh
* @Date: 2024/12/20 11:45
* @Description: 二级大屏信访投诉
*/
@Tag(name = "二级大屏信访投诉")
@RequestMapping("datav/sub1/mailVisits")
@RequiredArgsConstructor
@RestController
@Slf4j
public class SubOneMailViewController {
private final DataMailService dataMailService;
private final DataPetitionComplaintMapper dataPetitionComplaintMapper;
// region 左边
// endregion
}

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

@ -4,14 +4,11 @@ import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.DataSupervisionNotifyServiceImpl;
import com.biutag.supervision.service.SubOneSupervisionNotifyService; import com.biutag.supervision.service.SubOneSupervisionNotifyService;
import com.biutag.supervision.service.SubOneVideoSuperviseService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -21,9 +18,6 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.XCDC;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.ZXDC;
/** /**
* @Auther: sh * @Auther: sh
* @Date: 2024/12/17 10:58 * @Date: 2024/12/17 10:58
@ -54,10 +48,10 @@ public class SubOneSupervisionNotifyController {
public Result<JSONObject> getSubOneChangedRank(@RequestParam Integer departId, public Result<JSONObject> getSubOneChangedRank(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
DayTimeSuperviseVo policeRankOverview = subOneSupervisionNotifyService.getChangedRankOverView(10, departId, beginTime, endTime); DayTimeSuperviseVo policeRankOverview = negativeMapper.getPoliceRankOverview(departId, beginTime, endTime);
DayTimeSuperviseVo teamRankOverview = subOneSupervisionNotifyService.getChangedRankOverView(-1, departId, beginTime, endTime); DayTimeSuperviseVo teamRankOverview = negativeMapper.getTeamRankOverview(departId, beginTime, endTime);
List<RankVo> policeChangedRankList = subOneSupervisionNotifyService.getSubOneChangedRateRank(10, departId, beginTime, endTime); List<RankVo> policeChangedRankList = negativeMapper.getPoliceChangedRankList(departId, beginTime, endTime);
List<RankVo> teamChangedRankList = subOneSupervisionNotifyService.getSubOneChangedRateRank(-1, departId, beginTime, endTime); List<RankVo> teamChangedRankList = negativeMapper.getTeamChangedRankList(departId, beginTime, endTime);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("fxsjRankOverview", policeRankOverview) .fluentPut("fxsjRankOverview", policeRankOverview)
.fluentPut("jsdwRankOverview", teamRankOverview) .fluentPut("jsdwRankOverview", teamRankOverview)
@ -98,7 +92,7 @@ public class SubOneSupervisionNotifyController {
public Result<JSONObject> getAllSubOneSupervisionNotifyCount(@RequestParam Integer departId, public Result<JSONObject> getAllSubOneSupervisionNotifyCount(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
SupervisionNotifyOverView overview = subOneSupervisionNotifyService.getAllSubOneSupervisionNotifyCount(departId, beginTime, endTime); SupervisionNotifyOverView overview = negativeMapper.getAllSubOneSupervisionNotifyCount(departId, beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview); JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data); return Result.success(data);
} }
@ -113,7 +107,7 @@ public class SubOneSupervisionNotifyController {
@GetMapping("/getSubOneSupervisionTrend") @GetMapping("/getSubOneSupervisionTrend")
public Result<JSONObject> getSubOneSupervisionTrend(@RequestParam Integer departId, public Result<JSONObject> getSubOneSupervisionTrend(@RequestParam Integer departId,
@RequestParam String year) { @RequestParam String year) {
List<EchartsVo> supervisionTrend = subOneSupervisionNotifyService.getSubOneSupervisionTrend(departId, year); List<EchartsVo> supervisionTrend = negativeMapper.getSubOneTrend(departId, year, "13", "15");
JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend); JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend);
return Result.success(data); return Result.success(data);
} }

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

@ -19,10 +19,10 @@ 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") @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); List<PieItem> selectInvolveProblemGroupByBusinessTypeName(String businessTypeName, Date beginTime, Date endTime);
@Select("select problem_sources name, " + @Select("SELECT problemSources AS name, count(ng.id) AS value " +
"count(originId) value from data_case_verif " + "FROM negative ng " +
"where discovery_time between #{beginTime} and #{endTime} " + "WHERE problemSourcesCode IN (17, 18, 19, 20) " +
"group by problem_sources") "GROUP BY problemSources")
List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime); List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime);

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

@ -160,4 +160,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"and second_depart_id=#{departId} " + "and second_depart_id=#{departId} " +
"and discovery_time between #{beginTime} and #{endTime}") "and discovery_time between #{beginTime} and #{endTime}")
Integer selectMailBySourceCode(Date beginTime, Date endTime, String problemSourcesCode, String departId); Integer selectMailBySourceCode(Date beginTime, Date endTime, String problemSourcesCode, String departId);
} }

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

@ -12,6 +12,14 @@ import java.util.List;
public interface NegativeMapper extends BaseMapper<Negative> { public interface NegativeMapper extends BaseMapper<Negative> {
/**
* 查询问题趋势
* @param year 年份
* @param args 问题来源变参数组
* @return
*/
List<EchartsVo> getTrend(Integer year, String ...args);
// region 首页大屏 // region 首页大屏
/** /**
@ -20,16 +28,16 @@ public interface NegativeMapper extends BaseMapper<Negative> {
* @param beginTime * @param beginTime
* @param endTime * @param endTime
*/ */
@Select("SELECT sd1.short_name AS label, " + @Select("SELECT " +
"count(DISTINCT ng.id ) AS `value` " + "sd.short_name AS label, " +
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid= sd1.id " + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.problemSourcesCode IN (2, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30) " + "AND sd.statistics_group_id=#{groupType} " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30)\n" +
"AND sd1.statistics_group_id = #{groupType} " + "GROUP BY sd.short_name " +
"GROUP BY sd1.short_name " + "ORDER BY `value` DESC; " )
"ORDER BY `value` DESC " )
List<OrganizeProblemRankVo> selectOrganizeProblemRank(Integer groupType, Date beginTime, Date endTime); List<OrganizeProblemRankVo> selectOrganizeProblemRank(Integer groupType, Date beginTime, Date endTime);
// 业务类型占比 // 业务类型占比
@ -47,118 +55,62 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerificationPro, " + "SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerificationPro, " +
"SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS complaintPro, " + "SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS complaintPro, " +
"SUM( IF(problemSourcesCode IN (2),1, 0) ) AS talkPro, " + "SUM( IF(problemSourcesCode IN (2),1, 0) ) AS talkPro, " +
"SUM( IF(problemSourcesCode IN (26),1, 0) ) AS auditPro " + "SUM( IF(problemSourcesCode IN (27,28,29,30),1, 0) ) AS auditPro " +
"FROM negative ng WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} ") "FROM negative ng WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} ")
GlobalOverViewVo getAllGlobalCount(Date beginTime, Date endTime); GlobalOverViewVo getAllGlobalCount(Date beginTime, Date endTime);
// 地图卡片 // 地图卡片
@Select("SELECT " + @Select("SELECT " +
"sd1.short_name AS `name`, " + "sd.short_name AS `name`, " +
"sd1.id AS departId, " + "sd.id AS departId, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " + "COUNT( DISTINCT ng.id ) AS totalPro, " +
"SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisePro, " + "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 (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 (21,22,23,24,25),1, 0) ) AS mailPro, " +
"SUM( IF(problemSourcesCode IN (2),1, 0) ) AS policePro, " + "SUM( IF(problemSourcesCode IN (2),1, 0) ) AS policePro, " +
"SUM( IF(problemSourcesCode IN (26),1, 0) ) AS reviewPro " + "SUM( IF(problemSourcesCode IN (27,28,29,30),1, 0) ) AS reviewPro " +
"FROM negative ng " + "FROM sup_depart sd " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + "LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " + "AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd1.statistics_group_id=3 " + "WHERE sd.statistics_group_id=3 " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30)\n" + "GROUP BY sd.short_name " +
"GROUP BY sd1.short_name " +
"ORDER BY totalPro DESC;") "ORDER BY totalPro DESC;")
List<GlobalMapIconVo> getMapIcon(Date beginTime, Date endTime); List<GlobalMapIconVo> getMapIcon(Date beginTime, Date endTime);
@Select("SELECT count(*) FROM negative ng INNER JOIN " +
" (" +
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " +
" INNER join sup_depart sd1 on sd.pid=sd1.id " +
" and sd1.LEVEL=2 AND sd1.statistics_group_id=3" +
" ) " +
"as temp on ng.involveDepartId=temp.id " +
"WHERE ng.checkStatus<>3 AND problemSourcesCode in (13, 15, 16) " +
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Integer seleGlobalMapIconInfoDc(Date beginTime, Date endTime, Integer departId);
@Select("SELECT count(*) FROM negative ng INNER JOIN " +
" (" +
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " +
" INNER join sup_depart sd1 on sd.pid=sd1.id " +
" and sd1.LEVEL=2 AND sd1.statistics_group_id=3" +
" ) " +
"as temp on ng.involveDepartId=temp.id " +
"WHERE ng.checkStatus<>3 AND problemSourcesCode in (17, 18, 19, 20) " +
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Integer seleGlobalMapIconInfoAjhc(Date beginTime, Date endTime, Integer departId);
@Select("SELECT count(*) FROM negative ng INNER JOIN " +
" (" +
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " +
" INNER join sup_depart sd1 on sd.pid=sd1.id " +
" and sd1.LEVEL=2 AND sd1.statistics_group_id =3 " +
" ) " +
"as temp on ng.involveDepartId=temp.id " +
"WHERE ng.checkStatus<>3 AND problemSourcesCode in (21, 22, 23, 24, 25) " +
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Integer seleGlobalMapIconInfoXf(Date beginTime, Date endTime, Integer departId);
@Select("SELECT count(*) FROM negative ng INNER JOIN " +
" (" +
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " +
" INNER join sup_depart sd1 on sd.pid=sd1.id " +
" and sd1.LEVEL=2 AND sd1.statistics_group_id =3 " +
" ) " +
"as temp on ng.involveDepartId=temp.id " +
"WHERE ng.checkStatus<>3 AND problemSourcesCode=2 " +
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Integer seleGlobalMapIconInfoJwpy(Date beginTime, Date endTime, Integer departId);
@Select("SELECT count(*) FROM negative ng INNER JOIN " +
" (" +
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " +
" INNER join sup_depart sd1 on sd.pid=sd1.id " +
" and sd1.LEVEL=2 AND sd1.statistics_group_id =3 " +
" ) " +
"as temp on ng.involveDepartId=temp.id " +
"WHERE ng.checkStatus<>3 AND problemSourcesCode=26 " +
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Integer seleGlobalMapIconInfoSjdc(Date beginTime, Date endTime, Integer departId);
List<EchartsVo> getGlobalRecentlyTrendByMonth(String year); List<EchartsVo> getGlobalRecentlyTrendByMonth(String year);
// endregion // endregion
// region 现场督察大屏 // region 现场督察大屏
@Select("SELECT count(DISTINCT(ng.id)) as proTotal, " + @Select("SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " + "COUNT(DISTINCT ng.id) AS proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " + "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"ROUND((COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null))) / COUNT(DISTINCT ng.id) * 100, 1) AS correctionRate " + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"FROM sup_depart sd " + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " +
"INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + "FROM negative ng " +
"INNER JOIN negative ng ON sd.id=ng.involveDepartId " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " + "WHERE problemSourcesCode IN (13) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") "AND sd.statistics_group_id=#{groupId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime};")
DayTimeSuperviseVo getSuperversionRank(Date beginTime, Date endTime, Integer groupId); DayTimeSuperviseVo getSuperversionRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT sd1.short_name as label, " + @Select("SELECT " +
"sd1.id AS departId, " + "sd.short_name AS label, " +
"count( DISTINCT ng.id) AS denominator, " + "sd.id AS departId, " +
"count( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " + "COUNT(DISTINCT ng.id) AS denominator, " +
"ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS rate, " + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " +
"ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS value " + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rate, " +
"FROM sup_depart sd " + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS `value` " +
"INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + "FROM negative ng " +
"INNER JOIN negative ng on ng.involveDepartId=sd.id " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " + "WHERE problemSourcesCode IN (13) " +
"WHERE ng.problemSourcesCode=13 " + "AND sd.statistics_group_id=#{groupId} " +
"AND ng.checkStatus<>3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY label " + "GROUP BY sd.short_name " +
"order by rate desc") "ORDER BY rate")
List<RankVo> getChangedRateRank(Date beginTime, Date endTime, Integer groupId); List<RankVo> getChangedRateRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " + @Select("SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " +
@ -180,51 +132,67 @@ public interface NegativeMapper extends BaseMapper<Negative> {
" LEFT JOIN negative_blame d ON c.id = d.negativeId " + " LEFT JOIN negative_blame d ON c.id = d.negativeId " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15)") "WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15)")
RankVoSupTwo getTemp(Date beginTime, Date endTime); RankVoSupTwo getTemp(Date beginTime, Date endTime);
@Select("SELECT " +
"COUNT( DISTINCT ng.id ) AS problemNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS rectifingNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS rectifedNumber, " +
"COUNT( DISTINCT ng.involveDepartId ) AS departNumber, " +
"COUNT( DISTINCT nb.blameIdCode ) AS personNumber, " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rectifyRate " +
"FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode IN (13, 15) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ")
SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime);
@Select("SELECT sd1.short_name AS `name`, " +
"sd1.id as departId, " +
"COUNT(DISTINCT ng.id ) AS totalPro, " + @Select("SELECT " +
"COUNT( DISTINCT if(ng.isRectifyCode=0, ng.id, NULL)) AS changing, " + "sd.short_name AS `name`, " +
"COUNT( DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) AS changed, " + "sd.id AS departId, " +
"COUNT(DISTINCT nb.blameName ) AS personNum," + "COUNT( DISTINCT ng.id ) AS totalPro, " +
"COUNT(DISTINCT ng.involveDepartId) AS relationOrg, " + "COUNT( DISTINCT IF(ng.problemSourcesCode=13, ng.id, NULL) ) AS xc, " +
"IFNULL( ROUND( ( COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT( DISTINCT ng.id ) ) * 100, 1 ), 0) AS changedRate " + "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 sup_depart sd " + "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 ng.second_involve_depart_id=sd.id " +
"LEFT JOIN negative ng ON sd.id = ng.involveDepartId " + "AND ng.problemSourcesCode IN (13, 15)" +
"AND ng.checkStatus <> 3 " + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (13, 15) " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE sd.statistics_group_id=3 " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + "GROUP BY sd.short_name " +
"GROUP BY `name`;") "ORDER BY totalPro DESC;")
List<SuperviseMapIconVo> getSupervisionMapIconInfo(Date beginTime, Date endTime); List<SuperviseMapIconVo> getSupervisionMapIconInfo(Date beginTime, Date endTime);
List<EchartsVo> getSupervisionTrend(String year, String[] args);
@Select("SELECT count(DISTINCT(ng.id)) as proTotal, " + @Select("SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed," + "COUNT(DISTINCT ng.id) AS proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing," + "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"ROUND(COALESCE(COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0), 0) * 100, 1) AS correctionRate " + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"FROM sup_depart sd " + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " +
"INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + "FROM negative ng " +
"INNER JOIN negative ng on sd.id=ng.involveDepartId " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE ng.checkStatus<>3 " + "WHERE problemSourcesCode IN (15) " +
"AND ng.problemSourcesCode=15 " + "AND ng.special_supervision=#{queryType} " +
"AND special_supervision = #{queryType} " + "AND sd.statistics_group_id=#{groupId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ")
DayTimeSuperviseVo getYellowBetOverview(Date beginTime, Date endTime, Integer groupId, Integer queryType); DayTimeSuperviseVo getYellowBetOverview(Date beginTime, Date endTime, Integer groupId, Integer queryType);
@Select("SELECT sd1.short_name as label, " + @Select("SELECT " +
"count( DISTINCT ng.id) AS value " + "sd.short_name AS label, " +
"FROM sup_depart sd " + "COUNT( DISTINCT ng.id ) AS `value` " +
"INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + "FROM negative ng " +
"INNER JOIN negative ng on sd.id= ng.involveDepartId " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE ng.checkStatus<>3 " + "WHERE problemSourcesCode IN (15) " +
"AND ng.problemSourcesCode=15 " + "AND ng.special_supervision=#{queryType} " +
"AND sd.statistics_group_id=#{groupId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND special_supervision = #{queryType} " + "GROUP BY sd.short_name " +
"GROUP BY label " + "ORDER BY `value` DESC;")
"order by value desc")
List<OrganizeProblemRankVo> getYellowBetRankList(Date beginTime, Date endTime, Integer groupId, Integer queryType); List<OrganizeProblemRankVo> getYellowBetRankList(Date beginTime, Date endTime, Integer groupId, Integer queryType);
@ -286,25 +254,23 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<VideoSuperviseMapIconVo> getVideoSuperviseMapIconInfo(Date beginTime, Date endTime); List<VideoSuperviseMapIconVo> getVideoSuperviseMapIconInfo(Date beginTime, Date endTime);
List<EchartsVo> getVideoSuperviseTrend(String year, String[] args);
// endregion // endregion
// region 案件核查大屏 // region 案件核查大屏
@Select("SELECT sd1.short_name AS label, " + @Select("SELECT " +
"count(DISTINCT ng.id) AS `value` " + "sd.short_name AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id = sd.id " +
"INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"WHERE checkStatus <> 3 " + "AND sd.statistics_group_id=#{groupId} " +
"AND problemSourcesCode in (17, 18, 19, 20) " + "AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY sd.short_name " +
"GROUP BY sd1.short_name " + "ORDER BY `value` DESC;")
"ORDER BY `value` DESC")
List<OrganizeProblemRankVo> getCaseVerificationRank(Date beginTime, Date endTime, int groupId); List<OrganizeProblemRankVo> getCaseVerificationRank(Date beginTime, Date endTime, int groupId);
List<EchartsVo> getCaseVerificationTrend(String year, String[] args);
@Select("SELECT count(DISTINCT ng.id) AS total, " + @Select("SELECT count(DISTINCT ng.id) AS total, " +
"COUNT( DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL) ) AS confirmed, " + "COUNT( DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL) ) AS confirmed, " +
@ -319,20 +285,21 @@ public interface NegativeMapper extends BaseMapper<Negative> {
CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime); CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime);
@Select("SELECT sd.short_name AS `name`, " + @Select("SELECT " +
"sd.short_name AS `name`, " +
"sd.id AS departId, " + "sd.id AS departId, " +
"COUNT(DISTINCT ng.id) AS total, " + "COUNT( DISTINCT ng.id ) AS total, " +
"COUNT(DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL)) AS confirmed, " + "COUNT( DISTINCT IF( ng.checkStatus<>3, ng.id, NULL ) ) AS confirmed, " +
"COUNT(DISTINCT IF(nb.handleResultCode != 14, nb.blameId, NULL)) AS dealCasePro, " + "COUNT( DISTINCT IF( nb.handleResultCode!=14, nb.blameId, NULL ) ) AS dealCasePro, " +
"COUNT(DISTINCT nb.blameName) AS punishPre, " + "COUNT( DISTINCT nb.blameIdCode ) AS punishPre, " +
"COUNT(DISTINCT ng.involveDepartId) AS punishOrg, " + "COUNT( DISTINCT nb.blameDepartId ) AS punishOrg, " +
"IFNULL(ROUND(COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1), 0) AS rate " + "IFNULL( ROUND( COUNT( DISTINCT IF( ng.isRectifyCode=1, ng.id, NULL ) )/COUNT( DISTINCT ng.id )*100, 1 ), 0) AS rate " +
"FROM sup_depart sd " + "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 ng.second_involve_depart_id=sd.id " +
"LEFT JOIN negative ng ON sd1.id = ng.involveDepartId " + "AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE sd.statistics_group_id=3 " +
"GROUP BY sd.short_name;") "GROUP BY sd.short_name;")
List<CaseVerificationMapVo> getCaseVerificationMap(Date beginTime, Date endTime); List<CaseVerificationMapVo> getCaseVerificationMap(Date beginTime, Date endTime);
@ -367,34 +334,137 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> getMailTrend(Integer year, Integer type); List<EchartsVo> getMailTrend(Integer year, Integer type);
List<EchartsVo> getSubOneTrend(@Param("departPId") Integer departPId, @Param("year") Integer year, @Param("args") String[] args); List<EchartsVo> getSubOneTrend(Integer departId, String year, String... args);
// endregion // endregion
// region 二级大屏首页大屏 // region 二级大屏首页大屏
List<RankVo> getCaseVerifyRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String[] args);
SubOneOverViewVo getCaseVerifyOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String[] args); @Select("SELECT " +
"COUNT( DISTINCT ng.id ) AS one, " +
SubOneOverViewVo getSubOneSupervisionRankOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String[] args); "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL ) ) AS two, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) AS three, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 )*100, 0) AS four " +
"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) " +
"AND ng.second_involve_depart_id = #{departId} " +
"AND sd.statistics_group_id=10 ")
SubOneOverViewVo getSubOneGlobalPoliceSupervisionRankOverView(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"COUNT( DISTINCT ng.id ) AS one, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL ) ) AS two, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) AS three, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 )*100, 0) AS four " +
"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) " +
"AND ng.second_involve_depart_id = #{departId} " +
"AND sd.statistics_group_id!=10")
SubOneOverViewVo getSubOneGlobalTeamSupervisionRankOverView(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"ng.involveDepartName AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS rate, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS `value` " +
"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) " +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY rate DESC, denominator DESC")
List<RankVo> getSubOneGlobalPrecinctSupervisionRank(Integer departPId, Date beginTime, Date endTime);
List<RankVo> getSubOneSupervisionRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String[] args); @Select("SELECT " +
"ng.involveDepartName AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS rate, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS `value` " +
"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.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY rate DESC, denominator DESC")
List<RankVo> getSubOneGlobalTeamSupervisionRank(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT count(DISTINCT ng.id) AS one, " + @Select("SELECT count(DISTINCT ng.id) AS one, " +
"COUNT( DISTINCT( if(processing_status='processing', ng.id, NULL) ) ) AS two, " + "COUNT( DISTINCT( if(processing_status='processing', ng.id, NULL) ) ) AS two, " +
"count(DISTINCT involveDepartId) AS three, " + "count(DISTINCT involveDepartId) AS three, " +
"count(DISTINCT nb.blameIdCode) AS four, " + "count(DISTINCT nb.blameIdCode) AS four, " +
"ROUND( COUNT( DISTINCT( if(processing_status='completed', ng.id, NULL) ) ) / count(DISTINCT ng.id)*100, 1) AS five " + "ifnull(ROUND( COUNT( DISTINCT( if(processing_status='completed', ng.id, NULL) ) ) / count(DISTINCT ng.id)*100, 1),0) AS five " +
"FROM negative ng " + "FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id " + "INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE sd.pid= #{departPId} " + "WHERE sd.pid= #{departPId} " +
"AND ng.discoveryTime BETWEEN #{beginTime} and #{endTime} " + "AND ng.discoveryTime BETWEEN #{beginTime} and #{endTime} ")
"AND ng.checkStatus <>3 ")
SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime); SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT " +
"COUNT( DISTINCT ng.id ) AS one," +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS two," +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 ) ,0) AS three " +
"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.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id=10")
SubOneOverViewVo getGlobalPoliceCaseVerifyOverView(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT " +
"COUNT( DISTINCT ng.id ) AS one," +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS two," +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 ) ,0) AS three " +
"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.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10")
SubOneOverViewVo getGlobalTeamCaseVerifyOverView(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT " +
"ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS value," +
"COUNT( DISTINCT ng.id ) AS numerator, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS denominator " +
"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) " +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY value DESC " )
List<RankVo> getGlobalPoliceCaseVerifyRank(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT " +
"ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS value," +
"COUNT( DISTINCT ng.id ) AS numerator, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS denominator " +
"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) " +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY value DESC " )
List<RankVo> getGlobalTeamCaseVerifyRank(Integer departPId, Date beginTime, Date endTime);
// endregion // endregion
// region 二级大屏视频督察 // region 二级大屏视频督察
@ -454,23 +524,74 @@ public interface NegativeMapper extends BaseMapper<Negative> {
// endregion // endregion
// region 二级大屏现场督察 // region 二级大屏现场督察
@Select("SELECT count(DISTINCT(ng.id)) as proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " + @Select("SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " + "COUNT(DISTINCT ng.id) AS proTotal, " +
"COALESCE( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0 ) AS correctionRate FROM sup_depart sd " + "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id=10 AND sd.pid=#{departId} " + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ")
DayTimeSuperviseVo getPoliceChangedRankOverView(Integer departId, Date beginTime, Date endTime); DayTimeSuperviseVo getPoliceRankOverview(Integer departId, Date beginTime, Date endTime);
@Select("SELECT count(DISTINCT(ng.id)) as proTotal, " + @Select("SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " + "COUNT(DISTINCT ng.id) AS proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " + "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"COALESCE( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0 ) AS correctionRate FROM sup_depart sd " + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id!=10 AND sd.pid=#{departId} " + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " +
"WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ")
DayTimeSuperviseVo getTeamChangedRankOverView(Integer departId, Date beginTime, Date endTime); DayTimeSuperviseVo getTeamRankOverview(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"sd.short_name AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY value DESC;")
List<RankVo> getPoliceChangedRankList(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"sd.short_name AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY value DESC;")
List<RankVo> getTeamChangedRankList(Integer departId, Date beginTime, Date endTime);
// @Select("SELECT count(DISTINCT(ng.id)) as proTotal, " +
// "count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
// "count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
// "COALESCE( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0 ) AS correctionRate FROM sup_depart sd " +
// "INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id!=10 AND sd.pid=#{departId} " +
// "WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " +
// "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ")
// DayTimeSuperviseVo getTeamChangedRankOverView(Integer departId, Date beginTime, Date endTime);
@Select("SELECT sd.short_name as label, " + @Select("SELECT sd.short_name as label, " +
"sd.id AS departId, " + "sd.id AS departId, " +
@ -516,17 +637,18 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"GROUP BY oneLevelContent ") "GROUP BY oneLevelContent ")
List<EchartsVo> getSubOneProblemTypeRatio(Integer departId, Date beginTime, Date endTime); List<EchartsVo> getSubOneProblemTypeRatio(Integer departId, Date beginTime, Date endTime);
@Select("SELECT COUNT(DISTINCT c.id) AS problemNumber, " + @Select("SELECT " +
"COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, null)) AS rectifingNumber, " + "COUNT( DISTINCT ng.id ) AS problemNumber, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, null)) AS rectifedNumber, " + "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS rectifingNumber, " +
"COUNT(DISTINCT c.involveDepartId) AS departNumber, " + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS rectifedNumber, " +
"COUNT(DISTINCT d.blameIdCode) AS personNumber, " + "COUNT( DISTINCT ng.involveDepartId ) AS departNumber, " +
"ROUND( COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, NULL)) / COUNT(DISTINCT c.id) * 100, 1) AS rectifyRate " + "COUNT( DISTINCT nb.blameIdCode ) AS personNumber, " +
"FROM sup_depart b INNER JOIN negative c ON b.id = c.involveDepartId AND b.pid=#{departId} " + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rectifyRate " +
"LEFT JOIN negative_blame d ON c.id = d.negativeId " + "FROM negative ng " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"AND checkStatus <>3 " + "WHERE ng.problemSourcesCode IN (13, 15) " +
"AND problemSourcesCode IN (13, 15)") "AND ng.second_involve_depart_id=#{departId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ")
SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount(Integer departId, Date beginTime, Date endTime); SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount(Integer departId, Date beginTime, Date endTime);
@ -541,55 +663,59 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> getSubOneSupervisionTrend(Integer departId, String year); List<EchartsVo> getSubOneSupervisionTrend(Integer departId, String year);
@Select("SELECT count(DISTINCT(ng.id)) as proTotal, " + @Select("SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " + "COUNT(DISTINCT ng.id) AS proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " + "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"ROUND( count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) )/ count(DISTINCT(ng.id)) *100 , 1 ) AS rate " + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " +
"WHERE sd.pid=#{departId} " + "FROM negative ng " +
"AND sd.statistics_group_id =10 " + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"AND ng.checkStatus != 3 " + "WHERE problemSourcesCode IN (15) " +
"AND ng.problemSourcesCode =15 " + "AND ng.special_supervision=#{specialType} " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND special_supervision=#{specialType} ") "AND sd.statistics_group_id=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ")
DayTimeSuperviseVo getSubOnePoliceYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType); DayTimeSuperviseVo getSubOnePoliceYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType);
@Select("SELECT count(DISTINCT(ng.id)) as proTotal, " + @Select("SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " + "COUNT(DISTINCT ng.id) AS proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " + "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"ROUND( count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) )/ count(DISTINCT(ng.id)) *100 , 1 ) AS rate " + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " +
"WHERE sd.pid=#{departId} " + "FROM negative ng " +
"AND sd.statistics_group_id !=10 " + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"AND ng.checkStatus != 3 " + "WHERE problemSourcesCode IN (15) " +
"AND ng.problemSourcesCode =15 " + "AND ng.special_supervision=#{specialType} " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND special_supervision=#{specialType} ") "AND sd.statistics_group_id!=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ")
DayTimeSuperviseVo getSubOneTeamYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType); DayTimeSuperviseVo getSubOneTeamYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType);
@Select("SELECT sd.short_name AS label, " + @Select("SELECT " +
"COUNT(DISTINCT ng.id ) AS `value` " + "sd.short_name AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"AND sd.pid = #{departId} AND sd.statistics_group_id=10 " + "WHERE problemSourcesCode IN (15) " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.special_supervision=#{specialType} " +
"AND ng.checkStatus<>3 " + "AND ng.second_involve_depart_id=#{departId} " +
"AND ng.problemSourcesCode = 15 " + "AND sd.statistics_group_id=10 " +
"AND special_supervision = #{specialType} " + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY label " + "GROUP BY sd.short_name " +
"ORDER BY `value` DESC; ") "ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getSubOnePoliceYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType); List<OrganizeProblemRankVo> getSubOnePoliceYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType);
@Select("SELECT sd.short_name AS label, " + @Select("SELECT " +
"COUNT(DISTINCT ng.id ) AS `value` " + "sd.short_name AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"AND sd.pid = #{departId} AND sd.statistics_group_id!=10 " + "WHERE problemSourcesCode IN (15) " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.special_supervision=#{specialType} " +
"AND ng.checkStatus<>3 " + "AND ng.second_involve_depart_id=#{departId} " +
"AND ng.problemSourcesCode = 15 " + "AND sd.statistics_group_id!=10 " +
"AND special_supervision = #{specialType} " + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY label " + "GROUP BY sd.short_name " +
"ORDER BY `value` DESC; ") "ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getSubOneTeamYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType); List<OrganizeProblemRankVo> getSubOneTeamYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType);
@ -597,28 +723,30 @@ public interface NegativeMapper extends BaseMapper<Negative> {
// endregion // endregion
// region 二级大屏案件核查 // region 二级大屏案件核查
@Select("SELECT sd.short_name AS label, " + @Select("SELECT " +
"COUNT(DISTINCT ng.id ) AS `value` " + "ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " + "LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)\n" +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " + "AND sd.statistics_group_id=10 " +
"AND problemSourcesCode IN (17,18,19,20) " + "GROUP BY ng.involveDepartName " +
"AND ng.checkStatus <>3 " + "ORDER BY `value` DESC; ")
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC")
List<OrganizeProblemRankVo> getPoliceCaseVerificationRank(Date beginTime, Date endTime, Integer departId); List<OrganizeProblemRankVo> getPoliceCaseVerificationRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT sd.short_name AS label, " + @Select("SELECT " +
"COUNT(DISTINCT ng.id ) AS `value` " + "ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " + "FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " + "LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)\n" +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " + "AND sd.statistics_group_id!=10 " +
"AND problemSourcesCode IN (17,18,19,20) " + "GROUP BY ng.involveDepartName " +
"AND ng.checkStatus <>3 " + "ORDER BY `value` DESC; ")
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC")
List<OrganizeProblemRankVo> getTeamCaseVerificationRank(Date beginTime, Date endTime, Integer departId); List<OrganizeProblemRankVo> getTeamCaseVerificationRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT npr.threeLevelContent AS label, " + @Select("SELECT npr.threeLevelContent AS label, " +
@ -634,18 +762,17 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"ORDER BY `value` DESC ") "ORDER BY `value` DESC ")
List<EchartsVo> getCaseProblemProperty(Date beginTime, Date endTime, Integer departId, Integer businessType); List<EchartsVo> getCaseProblemProperty(Date beginTime, Date endTime, Integer departId, Integer businessType);
@Select("SELECT COUNT(DISTINCT ng.id ) AS total, " + @Select("SELECT count(DISTINCT ng.id) AS total, " +
"COUNT( DISTINCT IF(ng.checkStatus<>3, ng.id, NULL ) ) AS confirmed, " + "COUNT( DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL) ) AS confirmed, " +
"COUNT( DISTINCT IF(nb.handleResultCode!=14, nb.blameId, NULL) ) AS dealCasePro, " + "COUNT( DISTINCT IF(nb.handleResultCode!=14, nb.blameId, NULL) ) AS dealCasePro, " +
"COUNT( DISTINCT nb.blameName ) AS punishPre, " + "COUNT( DISTINCT nb.blameName ) AS punishPre, " +
"COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " + "COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " +
"IFNULL(( COUNT( DISTINCT IF(ng.checkStatus<>3, ng.id, NULL ) )/COUNT(DISTINCT ng.id*100 , 1) ) ,0 ) as rate " + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " +
"FROM negative ng " + "FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode IN (17,18,19,20) " + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND sd.pid=#{departId} ") "AND ng.problemSourcesCode in (17, 18, 19, 20); ")
CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId); CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId);
@Select("SELECT sdps.label AS `name` , " + @Select("SELECT sdps.label AS `name` , " +
@ -674,6 +801,12 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT problemSources AS name, count(ng.id) AS value " +
"FROM negative ng " +
"WHERE problemSourcesCode IN (17, 18, 19, 20) " +
"GROUP BY problemSources")
List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime);
// endregion // endregion
} }

2
src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java

@ -14,8 +14,8 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
public class DayTimeSuperviseVo { public class DayTimeSuperviseVo {
private Integer proTotal; private Integer proTotal;
private Integer changed;
private Integer changing; private Integer changing;
private Integer changed;
private Double correctionRate; private Double correctionRate;
} }

12
src/main/java/com/biutag/supervision/pojo/vo/SubOneOverViewVo.java

@ -16,11 +16,11 @@ import java.io.Serializable;
@NoArgsConstructor @NoArgsConstructor
public class SubOneOverViewVo implements Serializable { public class SubOneOverViewVo implements Serializable {
// 首页二级大屏总览的各种总览,从左到右对应 // 首页二级大屏总览的各种总览,从左到右对应
private Integer one; private Double one;
private Integer two; private Double two;
private Integer three; private Double three;
private Integer four; private Double four;
private Integer five; private Double five;
private Integer six; private Double six;
} }

2
src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java

@ -12,12 +12,12 @@ import java.io.Serializable;
@Data @Data
public class SuperviseMapIconVo implements Serializable { public class SuperviseMapIconVo implements Serializable {
private String name; // 分县市局名 private String name; // 分县市局名
private String departId;
private String totalPro; private String totalPro;
private String changing; private String changing;
private String changed; private String changed;
private String relationOrg; private String relationOrg;
private String personNum; private String personNum;
private String changedRate; private String changedRate;
private String departId;
} }

12
src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java

@ -9,11 +9,11 @@ import lombok.Data;
*/ */
@Data @Data
public class SupervisionNotifyOverView { public class SupervisionNotifyOverView {
private String problemNumber; private Integer problemNumber;
private String rectifingNumber; private Integer rectifingNumber;
private String rectifedNumber; private Integer rectifedNumber;
private String departNumber; private Integer departNumber;
private String personNumber; private Integer personNumber;
private String rectifyRate; private Integer rectifyRate;
} }

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

@ -28,41 +28,41 @@ public class CaseVerificationService {
public List<OrganizeProblemRankVo> getCaseVerificationRank(Date beginTime, Date endTime, int groupId) { // public List<OrganizeProblemRankVo> getCaseVerificationRank(Date beginTime, Date endTime, int groupId) {
List<OrganizeProblemRankVo> res = negativeMapper.getCaseVerificationRank(beginTime, endTime, groupId); // List<OrganizeProblemRankVo> res = negativeMapper.getCaseVerificationRank(beginTime, endTime, groupId);
return res; // return res;
} // }
//
//
//
public List<EchartsVo> getCaseVerificationTrend(String year, String...args) { // public List<EchartsVo> getCaseVerificationTrend(String year, String...args) {
List<EchartsVo> res = negativeMapper.getCaseVerificationTrend(year, args); // List<EchartsVo> res = negativeMapper.getCaseVerificationTrend(year, args);
return res; // return res;
} // }
//
public List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime) { // public List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime) {
List<EchartsVo> res = dataCaseVerifMapper.getCaseSourceRate(beginTime, endTime); // List<EchartsVo> res = dataCaseVerifMapper.getCaseSourceRate(beginTime, endTime);
return res; // return res;
} // }
//
public CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime) { // public CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime) {
CaseVerificationCountVo res = negativeMapper.getAllCaseVerificationCount(beginTime, endTime); // CaseVerificationCountVo res = negativeMapper.getAllCaseVerificationCount(beginTime, endTime);
return res; // return res;
} // }
//
public List<CaseVerificationMapVo> getCaseVerificationMap(Date beginTime, Date endTime) { // public List<CaseVerificationMapVo> getCaseVerificationMap(Date beginTime, Date endTime) {
List<CaseVerificationMapVo> res = negativeMapper.getCaseVerificationMap(beginTime, endTime); // List<CaseVerificationMapVo> res = negativeMapper.getCaseVerificationMap(beginTime, endTime);
return res; // return res;
} // }
//
public List<EchartsVo> getDealSituation(Date beginTime, Date endTime) { // public List<EchartsVo> getDealSituation(Date beginTime, Date endTime) {
List<EchartsVo> res = negativeMapper.getDealSituation(beginTime, endTime); // List<EchartsVo> res = negativeMapper.getDealSituation(beginTime, endTime);
return res; // return res;
} // }
//
public List<EchartsVo> getConfinementAndPause(Date beginTime, Date endTime, Integer type) { // public List<EchartsVo> getConfinementAndPause(Date beginTime, Date endTime, Integer type) {
List<EchartsVo> res = negativeMapper.getConfinementAndPause(beginTime,endTime, type); // List<EchartsVo> res = negativeMapper.getConfinementAndPause(beginTime,endTime, type);
return res; // return res;
} // }
} }

49
src/main/java/com/biutag/supervision/service/DataGlobalService.java

@ -98,30 +98,31 @@ public class DataGlobalService {
// 地图数据 // 地图数据
public List<GlobalMapIconVo> getMapIconInfo(Date beginTime, Date endTime) { public List<GlobalMapIconVo> getMapIconInfo(Date beginTime, Date endTime) {
List<GlobalMapIconVo> res = new ArrayList<>(); // List<GlobalMapIconVo> res = new ArrayList<>();
List<SupDepart> supDeparts = supDepartMapper.selectDepartsByGroupType(COUNTY_CITY_BUREAUS.getId()); // List<SupDepart> supDeparts = supDepartMapper.selectDepartsByGroupType(COUNTY_CITY_BUREAUS.getId());
for (SupDepart supDepart : supDeparts) { // for (SupDepart supDepart : supDeparts) {
GlobalMapIconVo mapIconVo = new GlobalMapIconVo(); // GlobalMapIconVo mapIconVo = new GlobalMapIconVo();
mapIconVo.setName(supDepart.getShortName()); // mapIconVo.setName(supDepart.getShortName());
mapIconVo.setDepartId(Integer.parseInt(supDepart.getId())); // mapIconVo.setDepartId(Integer.parseInt(supDepart.getId()));
res.add(mapIconVo); // res.add(mapIconVo);
} // }
for (GlobalMapIconVo re : res) { // for (GlobalMapIconVo re : res) {
Integer departId = re.getDepartId(); // Integer departId = re.getDepartId();
Integer supervisePro = negativeMapper.seleGlobalMapIconInfoDc(beginTime, endTime, departId); // Integer supervisePro = negativeMapper.seleGlobalMapIconInfoDc(beginTime, endTime, departId);
Integer caseVerifyPro = negativeMapper.seleGlobalMapIconInfoAjhc(beginTime, endTime, departId); // Integer caseVerifyPro = negativeMapper.seleGlobalMapIconInfoAjhc(beginTime, endTime, departId);
Integer mailPro = negativeMapper.seleGlobalMapIconInfoXf(beginTime, endTime, departId); // Integer mailPro = negativeMapper.seleGlobalMapIconInfoXf(beginTime, endTime, departId);
Integer policePro = negativeMapper.seleGlobalMapIconInfoJwpy(beginTime, endTime, departId); // Integer policePro = negativeMapper.seleGlobalMapIconInfoJwpy(beginTime, endTime, departId);
Integer reviewPro = negativeMapper.seleGlobalMapIconInfoSjdc(beginTime, endTime, departId); // Integer reviewPro = negativeMapper.seleGlobalMapIconInfoSjdc(beginTime, endTime, departId);
Integer totalPro = supervisePro + caseVerifyPro + mailPro + policePro + reviewPro; // Integer totalPro = supervisePro + caseVerifyPro + mailPro + policePro + reviewPro;
re.setTotalPro(totalPro != null ? totalPro : 0); // re.setTotalPro(totalPro != null ? totalPro : 0);
re.setSupervisePro(supervisePro != null ? supervisePro : 0); // re.setSupervisePro(supervisePro != null ? supervisePro : 0);
re.setCaseVerifyPro(caseVerifyPro != null ? caseVerifyPro : 0); // re.setCaseVerifyPro(caseVerifyPro != null ? caseVerifyPro : 0);
re.setMailPro(mailPro != null ? mailPro : 0); // re.setMailPro(mailPro != null ? mailPro : 0);
re.setPolicePro(policePro != null ? policePro : 0); // re.setPolicePro(policePro != null ? policePro : 0);
re.setReviewPro(reviewPro != null ? reviewPro : 0); // re.setReviewPro(reviewPro != null ? reviewPro : 0);
} // }
return res; // return res;
return null;
} }
//endregion //endregion

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

@ -176,60 +176,15 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
} }
// 初访重访分类数据排行
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;
}
public MailOverviewVo getAllMailCount(Date beginTime, Date endTime) {
MailOverviewVo res = negativeMapper.getAllMailCount(beginTime, endTime);
return res;
}
public List<EchartsVo> getMailTrend(Integer year, Integer type) { public List<EchartsVo> getMailTrend(Integer year, Integer type) {
List<EchartsVo> res = negativeMapper.getMailTrend(year, type); List<EchartsVo> res = negativeMapper.getMailTrend(year, type);
return res; return res;
} }
public MailFirstAndRepeatOverviewVo getFirstAndRepeatOverview(Date beginTime, Date endTime) {
MailFirstAndRepeatOverviewVo res = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime);
return res;
}
public List<OrganizeProblemRankVo> getMailRank(Date beginTime, Date endTime, int groupId, Integer isRepeat) {
List<OrganizeProblemRankVo> res = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, groupId, isRepeat);
return res;
}
public List<OrganizeProblemRankVo> getMailLeaderRank(Date beginTime, Date endTime, int groupId) { public List<OrganizeProblemRankVo> getMailLeaderRank(Date beginTime, Date endTime, int groupId) {
List<OrganizeProblemRankVo> res = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, groupId); List<OrganizeProblemRankVo> res = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, groupId);

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

@ -108,10 +108,10 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisio
// 获取现场督察问题趋势 // 获取现场督察问题趋势
public List<EchartsVo> getSupervisionTrend(String year, String ...args) { // public List<EchartsVo> getSupervisionTrend(String year, String ...args) {
List<EchartsVo> echartsVos = negativeMapper.getSupervisionTrend(year, args); // List<EchartsVo> echartsVos = negativeMapper.getSupervisionTrend(year, args);
return echartsVos; // return echartsVos;
} // }
// 地图数据 // 地图数据

42
src/main/java/com/biutag/supervision/service/SubOneService.java

@ -24,35 +24,37 @@ public class SubOneService {
private NegativeMapper negativeMapper; private NegativeMapper negativeMapper;
public List<EchartsVo> getSubOneTrend(Integer departPId, Integer year, String... args) { // public List<EchartsVo> getSubOneTrend(Integer departPId, Integer year, String... args) {
List<EchartsVo> res = negativeMapper.getSubOneTrend(departPId, year, args); // List<EchartsVo> res = negativeMapper.getSubOneTrend(departPId, year, args);
return res; // return res;
} // }
public List<RankVo> getCaseVerifyRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { // public List<RankVo> getCaseVerifyRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) {
List<RankVo> res = negativeMapper.getCaseVerifyRank(departPId, statisticsGroupId, beginTime, endTime, args); // List<RankVo> res = negativeMapper.getCaseVerifyRank(departPId, statisticsGroupId, beginTime, endTime, args);
return res; // return res;
} // }
public SubOneOverViewVo getCaseVerifyOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { // public SubOneOverViewVo getCaseVerifyOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) {
SubOneOverViewVo res = negativeMapper.getCaseVerifyOverView(departPId, statisticsGroupId, beginTime, endTime, args); // SubOneOverViewVo res = negativeMapper.getCaseVerifyOverView(departPId, statisticsGroupId, beginTime, endTime, args);
return res; // return res;
} // }
public SubOneOverViewVo getSubOneSupervisionRankOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { // public SubOneOverViewVo getSubOneSupervisionRankOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) {
SubOneOverViewVo res = negativeMapper.getSubOneSupervisionRankOverView(departPId, statisticsGroupId, beginTime, endTime, args); // SubOneOverViewVo res = negativeMapper.getSubOneSupervisionRankOverView(departPId, statisticsGroupId, beginTime, endTime, args);
return res; // return res;
} // }
public List<RankVo> getSubOneSupervisionRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { // public List<RankVo> getSubOneSupervisionRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) {
List<RankVo> res = negativeMapper.getSubOneSupervisionRank(departPId, statisticsGroupId, beginTime, endTime, args); // List<RankVo> res = negativeMapper.getSubOneSupervisionRank(departPId, statisticsGroupId, beginTime, endTime, args);
return res; // return res;
} // }
public SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime) { public SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime) {
SubOneOverViewVo res = negativeMapper.getSubOneOverView(departPId, beginTime, endTime); SubOneOverViewVo res = negativeMapper.getSubOneOverView(departPId, beginTime, endTime);
return res; return res;
} }
} }

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

@ -22,15 +22,15 @@ public class SubOneSupervisionNotifyService {
private final NegativeMapper negativeMapper; private final NegativeMapper negativeMapper;
public DayTimeSuperviseVo getChangedRankOverView(Integer groupId, Integer departId, Date beginTime, Date endTime) { // public DayTimeSuperviseVo getChangedRankOverView(Integer groupId, Integer departId, Date beginTime, Date endTime) {
DayTimeSuperviseVo res; // DayTimeSuperviseVo res;
if (groupId != null && groupId == 10) { // if (groupId != null && groupId == 10) {
res = negativeMapper.getPoliceChangedRankOverView(departId, beginTime, endTime); // res = negativeMapper.getPoliceChangedRankOverView(departId, beginTime, endTime);
} else { // } else {
res = negativeMapper.getTeamChangedRankOverView(departId, beginTime, endTime); // res = negativeMapper.getTeamChangedRankOverView(departId, beginTime, endTime);
} // }
return res; // return res;
} // }
public List<RankVo> getSubOneChangedRateRank(Integer groupId, Integer departId, Date beginTime, Date endTime) { public List<RankVo> getSubOneChangedRateRank(Integer groupId, Integer departId, Date beginTime, Date endTime) {
List<RankVo> res; List<RankVo> res;

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

@ -50,10 +50,10 @@ public class VideoSuperviseService {
return res; return res;
} }
public List<EchartsVo> getVideoSuperviseTrend(String year, String... args) { // public List<EchartsVo> getVideoSuperviseTrend(String year, String... args) {
List<EchartsVo> res = negativeMapper.getVideoSuperviseTrend(year, args); // List<EchartsVo> res = negativeMapper.getVideoSuperviseTrend(year, args);
return res; // return res;
} // }
//endregion //endregion

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

@ -3,54 +3,29 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.biutag.supervision.mapper.NegativeMapper"> <mapper namespace="com.biutag.supervision.mapper.NegativeMapper">
<!-- 首页大屏 --> <!-- 趋势公用(视频、现场、案件) -->
<select id="getGlobalRecentlyTrendByMonth" resultType="com.biutag.supervision.pojo.vo.EchartsVo"> <select id="getTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS name, COUNT(DISTINCT ng.id) AS `value` SELECT
m.month_name AS `name`,
COUNT( ng.id ) AS `value`
FROM sup_month_monthname m FROM sup_month_monthname m
LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime,'%m') = m.`month` LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime,'%m') = m.`month`
AND YEAR(ng.discoveryTime) = #{year} AND YEAR(ng.discoveryTime) = #{year}
AND ng.problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30)
LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id
GROUP BY m.month_name
ORDER BY m.`month` ASC
</select>
<!-- 视频督察大屏问题趋势 -->
<select id="getVideoSuperviseTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS `name`, IFNULL(COUNT(ng.id), 0) AS `value`
FROM sup_month_monthname m
LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime, '%m') = m.month
AND YEAR(ng.discoveryTime) = #{year}
AND ng.checkStatus != 3
AND ng.problemSourcesCode =
<foreach item="item" index="index" collection="args" open="(" separator="," close=")">#{item}</foreach>
GROUP BY m.month_name
ORDER BY m.month ASC;
</select>
<!-- 现场督察大屏问题趋势 -->
<select id="getSupervisionTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS `name`, IFNULL(COUNT(ng.id), 0) AS `value`
FROM sup_month_monthname m
LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime, '%m') = m.month
AND YEAR(ng.discoveryTime) = #{year}
AND ng.checkStatus != 3
AND ng.problemSourcesCode IN AND ng.problemSourcesCode IN
<foreach item="item" index="index" collection="args" open="(" separator="," close=")">#{item}</foreach> <foreach item="item" index="index" collection="args" open="(" separator="," close=")">#{item}</foreach>
GROUP BY m.month_name GROUP BY m.month_name
ORDER BY m.month ASC; ORDER BY m.`month` ASC;
</select> </select>
<!-- 案件核查问题趋势 --> <!-- 首页大屏问题趋势 -->
<select id="getCaseVerificationTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo"> <select id="getGlobalRecentlyTrendByMonth" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS `name`, IFNULL(COUNT(ng.id), 0) AS `value` SELECT m.month_name AS name, COUNT(DISTINCT ng.id) AS `value`
FROM sup_month_monthname m FROM sup_month_monthname m
LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime, '%m') = m.month LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime, '%m') = m.`month`
AND YEAR(ng.discoveryTime) = #{year} AND YEAR(ng.discoveryTime) = #{year}
AND ng.checkStatus != 3 AND ng.problemSourcesCode IN (2, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30)
AND ng.problemSourcesCode IN LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id
<foreach item="item" index="index" collection="args" open="(" separator="," close=")">#{item}</foreach>
GROUP BY m.month_name GROUP BY m.month_name
ORDER BY m.month ASC; ORDER BY m.`month` ASC
</select> </select>
<!-- 信访投诉大屏问题趋势 --> <!-- 信访投诉大屏问题趋势 -->
<select id="getMailTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo"> <select id="getMailTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
@ -86,105 +61,21 @@
GROUP BY m.monthName GROUP BY m.monthName
ORDER BY m.month ASC; ORDER BY m.month ASC;
</select> </select>
<!-- 首页二级子屏的问题趋势 --> <!-- 二级大屏的问题趋势(首页、现场、案件) -->
<select id="getSubOneTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo"> <select id="getSubOneTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS `name`, IFNULL(temp.`value`, 0) AS `value` SELECT
m.month_name AS `name`,
COUNT( ng.id ) AS `value`
FROM sup_month_monthname m FROM sup_month_monthname m
LEFT JOIN LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime,'%m') = m.`month`
( AND YEAR(ng.discoveryTime) = #{year}
SELECT DATE_FORMAT(ng.discoveryTime, '%m') as `month`, COUNT(ng.id) AS `value`
FROM negative ng LEFT JOIN sup_depart sd on ng.involveDepartId = sd.id
WHERE YEAR(ng.discoveryTime) = #{year} AND checkStatus != 3
AND ng.problemSourcesCode IN AND ng.problemSourcesCode IN
<foreach item="item" index="index" collection="args" open="(" separator="," close=")">#{item}</foreach> <foreach item="item" index="index" collection="args" open="(" separator="," close=")">#{item}</foreach>
AND sd.pid = #{departPId} AND ng.second_involve_depart_id=#{departId}
GROUP BY DATE_FORMAT(ng.discoveryTime, '%m') GROUP BY m.month_name
) as temp ORDER BY m.`month` ASC;
ON temp.`month` = m.`month`
ORDER BY m.month ASC;
</select>
<!-- 首页二级子屏的案件核查排行 -->
<select id="getCaseVerifyRank" resultType="com.biutag.supervision.pojo.vo.RankVo">
SELECT temp.short_name AS label,
temp.id AS departId,
COUNT(IF(checkIdCode != 3, checkIdCode, NULL)) AS numerator,
COUNT(DISTINCT ng.id) AS denominator,
COUNT(DISTINCT ng.id) AS `value`
FROM negative ng
INNER JOIN
(SELECT id, short_name FROM sup_depart sd
WHERE sd.pid = #{departPId}
<if test="statisticsGroupId != 0">AND statistics_group_id = #{statisticsGroupId}</if>
<if test="statisticsGroupId == 0">AND statistics_group_id != 10</if>
) AS temp
ON ng.involveDepartId = temp.id
WHERE ng.problemSourcesCode IN
<foreach collection="args" item="arg" open="(" separator="," close=")">#{arg}</foreach>
AND discoveryTime BETWEEN #{beginTime} AND #{endTime}
GROUP BY temp.short_name
ORDER BY denominator DESC;
</select>
<!-- 首页二级大屏的案件核查总览 -->
<select id="getCaseVerifyOverView" resultType="com.biutag.supervision.pojo.vo.SubOneOverViewVo">
SELECT COUNT(DISTINCT ng.id) as one,
COUNT( IF(checkIdCode!=3,checkIdCode,NULL)) AS two,
COALESCE(ROUND(COUNT(IF(checkIdCode != 3, checkIdCode, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1), 0)
AS three
FROM negative ng INNER JOIN
(SELECT id, short_name FROM sup_depart sd
WHERE sd.pid = #{departPId}
<if test="statisticsGroupId != 0">AND statistics_group_id = #{statisticsGroupId}</if>
<if test="statisticsGroupId == 0">AND statistics_group_id != 10</if>
) AS temp
ON ng.involveDepartId = temp.id
WHERE ng.problemSourcesCode IN
<foreach collection="args" item="arg" open="(" separator="," close=")">#{arg}</foreach>
AND discoveryTime BETWEEN #{beginTime} AND #{endTime};
</select>
<!-- 首页二级大屏督察问题总览 -->
<select id="getSubOneSupervisionRankOverView" resultType="com.biutag.supervision.pojo.vo.SubOneOverViewVo">
SELECT COUNT(DISTINCT ng.id) as one,
count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as two,
count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as three,
ROUND(COALESCE(COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0), 0) *
100, 1) AS four
FROM negative ng INNER JOIN
(SELECT id, short_name FROM sup_depart sd
WHERE sd.pid = #{departPId}
<if test="statisticsGroupId != 0">AND statistics_group_id = #{statisticsGroupId}</if>
<if test="statisticsGroupId == 0">AND statistics_group_id != 10</if>
) AS temp
ON ng.involveDepartId = temp.id
WHERE ng.problemSourcesCode IN
<foreach collection="args" item="arg" open="(" separator="," close=")">#{arg}</foreach>
AND discoveryTime BETWEEN #{beginTime} AND #{endTime};
</select>
<!-- 首页二级大屏督察问题排行 -->
<select id="getSubOneSupervisionRank" resultType="com.biutag.supervision.pojo.vo.RankVo">
SELECT
sd.short_name AS label,
sd.id AS departId,
COUNT(DISTINCT ng.id) AS denominator,
count( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator,
ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS rate,
ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS `value`
FROM negative ng
INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id
WHERE ng.problemSourcesCode IN
<foreach collection="args" item="arg" open="(" separator="," close=")">#{arg}</foreach>
AND ng.checkStatus!=3
AND sd.pid = #{departPId}
<if test="statisticsGroupId != 0">AND statistics_group_id = #{statisticsGroupId}</if>
<if test="statisticsGroupId == 0">AND statistics_group_id != 10</if>
AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime}
GROUP BY label
ORDER BY rate DESC;
</select> </select>
<!-- 视频督察二级大屏的问题趋势(查实)-->
<!-- 视频督察二级大屏的问题趋势-->
<select id="getSubOneVideoSuperviseTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo"> <select id="getSubOneVideoSuperviseTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS `name`, IFNULL(COUNT(temp.id), 0) AS `value` SELECT m.month_name AS `name`, IFNULL(COUNT(temp.id), 0) AS `value`
FROM sup_month_monthname m FROM sup_month_monthname m
@ -200,18 +91,17 @@
</select> </select>
<!-- 案件核查二级大屏的问题趋势--> <!-- 案件核查二级大屏的问题趋势-->
<select id="getSubOneCaseVerificationTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo"> <select id="getSubOneCaseVerificationTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name as name, COUNT(DISTINCT temp.id) AS `value` SELECT m.month_name AS `name`,
COUNT(ng.id) AS `value`
FROM sup_month_monthname m FROM sup_month_monthname m
LEFT JOIN (SELECT ng.* LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime, '%m') = m.`month`
FROM negative ng AND YEAR(ng.discoveryTime) = #{year}
INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id AND sd.pid = #{departId} AND ng.problemSourcesCode IN (17, 18, 19, 20)
WHERE YEAR(ng.discoveryTime) = #{year} AND ng.second_involve_depart_id = #{departId}
AND ng.checkStatus != 3
AND ng.problemSourcesCode IN (17, 18, 19, 20)) AS temp
ON DATE_FORMAT(temp.discoveryTime, '%m') = m.`month`
GROUP BY m.month_name GROUP BY m.month_name
ORDER BY m.`month` asc ORDER BY m.`month` ASC;
</select> </select>
</mapper> </mapper>

4
src/test/java/com/biutag/supervision/controller/datav/SubOneControllerTest.java

@ -52,8 +52,8 @@ public class SubOneControllerTest {
@Test @Test
void getSubOneTrend() { void getSubOneTrend() {
List<EchartsVo> superviseProTrend = subOneService.getSubOneTrend(22, 2024, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); // 督察问题趋势 // List<EchartsVo> superviseProTrend = subOneService.getSubOneTrend(22, 2024, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); // 督察问题趋势
System.out.println(superviseProTrend); // System.out.println(superviseProTrend);
} }
@Test @Test

Loading…
Cancel
Save