Browse Source

信访和维权二级屏幕

main
不爱学习的石同学 11 months ago
parent
commit
722f4eeae9
  1. 11
      src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java
  2. 40
      src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java
  3. 44
      src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java
  4. 2
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java
  5. 210
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java
  6. 152
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java
  7. 94
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java
  8. 2
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java
  9. 4
      src/main/java/com/biutag/supervision/mapper/CountyStreetDeptMapper.java
  10. 15
      src/main/java/com/biutag/supervision/mapper/DataPetition12337Mapper.java
  11. 370
      src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java
  12. 146
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  13. 39
      src/main/java/com/biutag/supervision/mapper/NegativeProblemRelationMapper.java
  14. 136
      src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java
  15. 14
      src/main/java/com/biutag/supervision/pojo/vo/MailOverviewVo.java
  16. 22
      src/main/java/com/biutag/supervision/pojo/vo/RightsComfortMapVo.java
  17. 4
      src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java
  18. 24
      src/main/java/com/biutag/supervision/service/DataGlobalService.java
  19. 99
      src/main/java/com/biutag/supervision/service/DataMailService.java
  20. 68
      src/main/java/com/biutag/supervision/service/DataRightsComfortService.java
  21. 8
      src/main/java/com/biutag/supervision/service/SubOneService.java
  22. 30
      src/main/resources/mapper/NegativeMapper.xml

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

@ -10,6 +10,7 @@ import com.biutag.supervision.service.DataGlobalService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.annotations.Select;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
@ -37,6 +38,7 @@ public class DataGlobalController {
private final DataGlobalService dataGlobalService;
private final NegativeMapper negativeMapper;
private final NegativeProblemRelationMapper negativeProblemRelationMapper;
//region 左边
/**
@ -51,7 +53,7 @@ public class DataGlobalController {
public Result<JSONObject> getOrganizationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> fxsjlist = negativeMapper.selectOrganizeProblemRank(3, beginTime, endTime);
List<OrganizeProblemRankVo> jsdwlist = negativeMapper.selectOrganizeProblemRank(3, beginTime, endTime);
List<OrganizeProblemRankVo> jsdwlist = negativeMapper.selectOrganizeProblemRank(4, beginTime, endTime);
JSONObject res = new JSONObject()
.fluentPut("fxsjlist", fxsjlist)
.fluentPut("jsdwlist", jsdwlist);
@ -147,7 +149,10 @@ public class DataGlobalController {
public Result<JSONObject> getStrongProblemRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 突出问题排名
List<StrongProblemRank> tcwtlist = dataGlobalService.getStrongProblemRank(beginTime, endTime);
List<StrongProblemRank> tcwtlist = negativeMapper.selectStrongProblemRank(beginTime, endTime);
for (int i = 1; i <= tcwtlist.size(); i++) {
tcwtlist.get(i - 1).setSort(i);
}
JSONObject res = new JSONObject().fluentPut("tcwtlist", tcwtlist);
return Result.success(res);
}
@ -165,7 +170,7 @@ public class DataGlobalController {
public Result<JSONObject> getProblemBusinessRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 问题类型占比
List<EchartsVo> wtlxlist = negativeProblemRelationMapper.selectProblemRate(beginTime, endTime);
List<EchartsVo> wtlxlist= negativeMapper.selectProblemRate(beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("wtlxlist", wtlxlist);
return Result.success(res);
}

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

@ -59,17 +59,19 @@ public class DataMailViewController {
public Result<JSONObject> getFirstAndRepeatMail(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 初访重访情况总览
MailFirstAndRepeatOverviewVo firstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime);
MailFirstAndRepeatOverviewVo fxjsFirstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime, 3);
MailFirstAndRepeatOverviewVo bwzdFirstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime, 4);
// 初访重访分类数据排行
List<OrganizeProblemRankVo> fxsjFirstRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 3, RepeatEnum.FIRST_MAIL.getId());
List<OrganizeProblemRankVo> fxsjRepeatRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 3, RepeatEnum.REPEAT_MAIL.getId());
List<OrganizeProblemRankVo> fxsjFirstRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 3, RepeatEnum.FIRST_MAIL.getId()); // 1
List<OrganizeProblemRankVo> fxsjRepeatRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 3, RepeatEnum.REPEAT_MAIL.getId()); // 2
List<OrganizeProblemRankVo> fxsjLeaderViewRankList = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> bwzdFirstRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 4, RepeatEnum.FIRST_MAIL.getId());
List<OrganizeProblemRankVo> bwzdRepeatRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 4, RepeatEnum.REPEAT_MAIL.getId());
List<OrganizeProblemRankVo> bwzdLeaderViewRankList = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 4);
JSONObject data = new JSONObject()
.fluentPut("firstAndRepeatOverview", firstAndRepeatOverview)
.fluentPut("fxjsFirstAndRepeatOverview", fxjsFirstAndRepeatOverview)
.fluentPut("bwzdFirstAndRepeatOverview", bwzdFirstAndRepeatOverview)
.fluentPut("fxsjFirstRankList", fxsjFirstRankList)
.fluentPut("fxsjRepeatRankList", fxsjRepeatRankList)
.fluentPut("fxsjLeaderViewRankList", fxsjLeaderViewRankList)
@ -95,7 +97,7 @@ public class DataMailViewController {
public Result<JSONObject> getAllMailCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 信访数据总数概览
JSONObject overview = dataMailService.allMailCount(beginTime, endTime);
MailOverviewVo overview = dataMailService.allMailCount(beginTime, endTime);
System.out.println("信访总览================================");
System.out.println(overview);
// MailOverviewVo overview = dataMailService.getAllMailCount(beginTime, endTime);
@ -132,10 +134,10 @@ public class DataMailViewController {
@Operation(summary = "信访数据大屏信访趋势统计")
@GetMapping("/getMailTrend")
public Result<JSONObject> getMailTrend(@RequestParam Integer year) {
List<EchartsVo> countryList = negativeMapper.getMailTrend(year, 21);
List<EchartsVo> policeList = negativeMapper.getMailTrend(year, 22);
List<EchartsVo> manageList = negativeMapper.getMailTrend(year, 23);
List<EchartsVo> numberList = dataPetition12337Mapper.getMailTrend12337(year);
List<EchartsVo> countryList = negativeMapper.getMailTrend(year, 21);
List<EchartsVo> policeList = negativeMapper.getMailTrend(year, 22);
List<EchartsVo> manageList = negativeMapper.getMailTrend(year, 23);
List<EchartsVo> numberList = dataPetition12337Mapper.getMailTrend12337(year);
JSONObject data = new JSONObject().fluentPut("countryList", countryList)
.fluentPut("policeList", policeList)
.fluentPut("manageList", manageList)
@ -157,19 +159,21 @@ public class DataMailViewController {
@GetMapping("/getEntanglementAndMassMail")
public Result<JSONObject> getEntanglementAndMassMail(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 缠访集访情况
MailEntanglementMassOverviewVo mailEntanglementMassOverview = dataMailService.getEntanglementAndMassOverview(beginTime, endTime);
// 缠访集访情况总览
MailEntanglementMassOverviewVo fxsjMailEntanglementMassOverview = dataPetitionComplaintMapper.getEntanglementAndMassOverview(beginTime, endTime, 3);
MailEntanglementMassOverviewVo bwzdMailEntanglementMassOverview = dataPetitionComplaintMapper.getEntanglementAndMassOverview(beginTime, endTime, 4);
List<OrganizeProblemRankVo> fxsjLeaderReviewList=dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> fxsjEntanglementList=dataPetitionComplaintMapper.getEntanglementMailRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> fxsjMassList=dataPetitionComplaintMapper.getMassMailRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> fxsjLeaderReviewList = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> fxsjEntanglementList = dataPetitionComplaintMapper.getEntanglementMailRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> fxsjMassList = dataPetitionComplaintMapper.getMassMailRank(beginTime, endTime, 3);
List<OrganizeProblemRankVo> bwzdLeaderReviewList = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 4);
List<OrganizeProblemRankVo> bwzdEntanglementList =dataPetitionComplaintMapper.getEntanglementMailRank(beginTime, endTime, 4);
List<OrganizeProblemRankVo> bwzdMassList =dataPetitionComplaintMapper.getMassMailRank(beginTime, endTime, 4);
List<OrganizeProblemRankVo> bwzdEntanglementList = dataPetitionComplaintMapper.getEntanglementMailRank(beginTime, endTime, 4);
List<OrganizeProblemRankVo> bwzdMassList = dataPetitionComplaintMapper.getMassMailRank(beginTime, endTime, 4);
JSONObject data = new JSONObject()
.fluentPut("mailEntanglementMassOverview", mailEntanglementMassOverview)
.fluentPut("fxsjMailEntanglementMassOverview", fxsjMailEntanglementMassOverview)
.fluentPut("bwzdMailEntanglementMassOverview", bwzdMailEntanglementMassOverview)
.fluentPut("fxsjLeaderReviewList", fxsjLeaderReviewList)
.fluentPut("fxsjEntanglementList", fxsjEntanglementList)
.fluentPut("fxsjMassList", fxsjMassList)
@ -178,6 +182,6 @@ public class DataMailViewController {
.fluentPut("bwzdMassList", bwzdMassList);
return Result.success(data);
}
// endregion
}

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

@ -1,6 +1,7 @@
package com.biutag.supervision.controller.datav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.RpcApplyMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.CountyStreetDept;
@ -8,6 +9,7 @@ import com.biutag.supervision.pojo.model.DataRightsComfortModel;
import com.biutag.supervision.pojo.vo.ComfortCountVO;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import com.biutag.supervision.pojo.vo.RightsComfortMapVo;
import com.biutag.supervision.service.CountyStreetDeptService;
import com.biutag.supervision.service.DataRightsComfortService;
import com.biutag.supervision.service.RpcApplyService;
@ -32,11 +34,9 @@ import java.util.*;
@RestController
public class DatavRightsComfortController {
private final RpcApplyService rpcApplyService;
private final DataRightsComfortService dataRightsComfortService;
private final RpcInfringerResultService rpcInfringerResultService;
private final RpcApplyMapper rpcApplyMapper;
@GetMapping
public Result<DataRightsComfortModel> rightsComfort(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
@ -73,8 +73,8 @@ public class DatavRightsComfortController {
@GetMapping("/getRightsAndComfortRank")
public Result<JSONObject> getRightsAndComfortRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> fxsjRightsRankList = dataRightsComfortService.getRightsRank(beginTime, endTime, 3); // 分县市局维权排名
List<OrganizeProblemRankVo> jsdwRightsRankList = dataRightsComfortService.getRightsRank(beginTime, endTime, 4); // 分县市局维权排名
List<OrganizeProblemRankVo> fxsjRightsRankList = rpcApplyMapper.getRightsRank(beginTime, endTime, 3);; // 分县市局维权排名
List<OrganizeProblemRankVo> jsdwRightsRankList = rpcApplyMapper.getRightsRank(beginTime, endTime, 4);; // 分县市局维权排名
JSONObject data = new JSONObject()
.fluentPut("fxsjRightsRankList", fxsjRightsRankList)
.fluentPut("jsdwRightsRankList", jsdwRightsRankList);
@ -109,6 +109,17 @@ public class DatavRightsComfortController {
return Result.success(data);
}
// 地图图标数据
@GetMapping("/getComfortMapIcon")
public Result<JSONObject> getComfortMapIcon(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<RightsComfortMapVo> comfortMapVoList = dataRightsComfortService.getComfortMapIcon(beginTime, endTime);
JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("comfortMapVoList", comfortMapVoList);
return Result.success(jsonObject);
}
// 打处情况
@GetMapping("/getPunishmentSituation")
public Result<JSONObject> getPunishmentSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@ -122,20 +133,23 @@ public class DatavRightsComfortController {
@GetMapping("/getComfortSituation")
public Result<JSONObject> getComfortSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<PieItem> comfortSituationList = dataRightsComfortService.selectComfortSituation(beginTime, endTime);
List<PieItem> comfortSituationList = rpcApplyMapper.selectComfortSituation(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("comfortSituationList", comfortSituationList);
return Result.success(data);
}
// endregion
// endregion
// region 右边
// 民辅警受伤人数情况和受伤类别
// 民辅警受伤人数情况和受伤类别
@GetMapping("/getPoliceHurtSituationAndHurtType")
public Result<JSONObject> getPoliceHurtSituationAndHurtType(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> policeHurtSituationList = dataRightsComfortService.getPoliceHurtSituation(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("policeHurtSituationList", policeHurtSituationList);
List<EchartsVo> policeHurtSituationList = rpcApplyMapper.getPoliceHurtSituation(beginTime, endTime); // 人数情况
List<EchartsVo> policeHurtTypeList = rpcApplyMapper.getPoliceHurtType(beginTime, endTime); // 受伤类别
JSONObject data = new JSONObject()
.fluentPut("policeHurtSituationList", policeHurtSituationList)
.fluentPut("policeHurtTypeList", policeHurtTypeList);
return Result.success(data);
}
@ -144,11 +158,11 @@ public class DatavRightsComfortController {
public Result<JSONObject> getCaseAriseSituationRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 发案环节
List<EchartsVo> incidentLinkList = dataRightsComfortService.getIncidentLink(beginTime, endTime);
List<EchartsVo> incidentLinkList =rpcApplyMapper.getIncidentLink(beginTime, endTime);
// 发案警种
List<EchartsVo> incidentPoliceTypeList = new ArrayList<>();
// 发案单位
List<EchartsVo> incidentOrgList = dataRightsComfortService.getIncidentOrg(beginTime, endTime);
List<EchartsVo> incidentOrgList = rpcApplyMapper.getIncidentOrg(beginTime, endTime);
JSONObject data = new JSONObject()
.fluentPut("incidentLinkList", incidentLinkList)
@ -156,10 +170,6 @@ public class DatavRightsComfortController {
.fluentPut("incidentOrgList", incidentOrgList);
return Result.success(data);
}
// endregion
// endregion
}

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

@ -125,7 +125,7 @@ public class SubOneCaseVerifController {
@GetMapping("/getSubOneCaseVerificationTrend")
public Result<JSONObject> getSubOneCaseVerificationTrend(@RequestParam String departId,
@RequestParam Integer year) {
List<EchartsVo> proTrendList = negativeMapper.getSubOneCaseVerificationTrend(String.valueOf(year), departId, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<EchartsVo> proTrendList = negativeMapper.getSubOneTrend(departId,String.valueOf(year) , A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList);
return Result.success(data);
// return null;

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

@ -2,11 +2,11 @@ package com.biutag.supervision.controller.subdatav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.mapper.NegativeProblemRelationMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.RankVo;
import com.biutag.supervision.pojo.vo.SubOneOverViewVo;
import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.CountyStreetDeptService;
import com.biutag.supervision.service.DataGlobalService;
import com.biutag.supervision.service.SubOneService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -35,122 +35,172 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*;
@Slf4j
public class SubOneGlobalController {
private final CountyStreetDeptService countyStreetDeptService;
private final SubOneService subOneService;
private final NegativeMapper negativeMapper;
private final DataGlobalService dataGlobalService;
private final NegativeProblemRelationMapper negativeProblemRelationMapper;
private final CountyStreetDeptService countyStreetDeptService;
// region左边
@Operation(summary = "获取首页二级大屏督察问题排名")
@GetMapping("/getSubOneSupervisionRank")
public Result<JSONObject> getSubOneSupervisionRank(@RequestParam Integer departPId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
SubOneOverViewVo supervisionPrecinctOverView = negativeMapper.getSubOneGlobalPoliceSupervisionRankOverView(departPId, beginTime, endTime);
SubOneOverViewVo supervisionTeamOverView = negativeMapper.getSubOneGlobalTeamSupervisionRankOverView(departPId, beginTime, endTime);
List<RankVo> supervisionPrecinctList = negativeMapper.getSubOneGlobalPrecinctSupervisionRank(departPId, beginTime, endTime);
List<RankVo> supervisionTeamList = negativeMapper.getSubOneGlobalTeamSupervisionRank(departPId, beginTime, endTime);
JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("supervisionPrecinctOverView", supervisionPrecinctOverView)
.fluentPut("supervisionTeamOverView", supervisionTeamOverView)
.fluentPut("supervisionPrecinctList", supervisionPrecinctList)
.fluentPut("supervisionTeamList", supervisionTeamList);
return Result.success(jsonObject);
/**
* 获取地图数据
*
* @param departId 2级单位的id
* @return json格式的地图数据
*/
@Operation(summary = "获取二级大屏地图JSON")
@GetMapping("/getSubOneStreetMap")
@Cacheable(cacheNames = "subOneStreetMap", key = "'p_'+ #departId")
public Result<JSONObject> getSubOneStreetMap(@RequestParam Integer departId) {
JSONObject res = countyStreetDeptService.getSubOneStreetMap(departId);
return Result.success(res);
}
// endregion
//region 左边
/**
* 机构问题排名
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "机构问题排名")
@GetMapping("/getSubOneOrganizationRank")
public Result<JSONObject> getSubOneOrganizationRank(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> fxsjlist = negativeMapper.selectPoliceOrganizeProblemRank(departId, beginTime, endTime);
List<OrganizeProblemRankVo> jsdwlist = negativeMapper.selectTeamOrganizeProblemRank(departId, beginTime, endTime);
// region 中间
JSONObject res = new JSONObject()
.fluentPut("fxsjlist", fxsjlist)
.fluentPut("jsdwlist", jsdwlist);
return Result.success(res);
}
/**
* 获取首页二级大屏总览
* 业务类型占比
*
* @param departPId 2级单位的id
* @param beginTime 开始时间
* @param endTime 结束时间
* @return
* @return Result<JSONObject>
*/
@Operation(summary = "获取首页二级大屏总览")
@GetMapping("/getSubOneOverView")
public Result<JSONObject> getSubOneOverView(@RequestParam Integer departPId,
@Operation(summary = "业务类型占比")
@GetMapping("/getSubOneBusinessRate")
public Result<JSONObject> getSubOneBusinessRate(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 业务类型占比
List<EchartsVo> ywzblist = negativeMapper.selectSubOneBusinessRate(departId, beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("ywzblist", ywzblist);
return Result.success(res);
}
//endregion
//region 中间
/**
* 获取首页大屏中央数据
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "大屏中央数据")
@GetMapping("/getSubOneAllCount")
public Result<JSONObject> getSubOneAllCount(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// todo 更新
SubOneOverViewVo subOneOverViewVo = negativeMapper.getSubOneOverView(departPId, beginTime, endTime);
// SubOneOverViewVo subOneOverViewVo = subOneService.getSubOneOverView(departPId, beginTime, endTime);
JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("subOneOverViewVo", subOneOverViewVo);
return Result.success(jsonObject);
// 获取数据大屏中央总数概览
GlobalOverViewVo overview = negativeMapper.getSuoOneAllGlobalCount(departId, beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data);
}
/**
* 地图数据
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
// @Operation(summary = "首页大屏地图数据")
// @GetMapping("/getSubOneMap")
// // todo: 缓存取时间会出现多级目录
// @Cacheable(cacheNames = "subOneGlobalMap", key = " #beginTime.toString().substring(0, 10) + '_' + #endTime.toString().substring(0, 10)")
// public Result<JSONObject> subOneGlobalMap(@RequestParam Integer departId,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// // 地图数据
// List<GlobalMapIconVo> GlobalTempMapVoList = negativeMapper.getMapIcon(beginTime, endTime);
// JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", GlobalTempMapVoList);
// return Result.success(data);
// }
/**
* 获取问题趋势
* 数据大屏问题趋势统计
*
* @param departPId 2级单位的id
* @param year 年份
* @return EchartsVo的list
* @param year 年份
* @return Result<JSONObject>
*/
@Operation(summary = "获取首页二级大屏问题趋势")
@GetMapping("/getSubOneTrend")
public Result<JSONObject> getSubOneTrend(@RequestParam Integer departPId, @RequestParam Integer year) {
List<EchartsVo> superviseProTrend = negativeMapper.getSubOneTrend(departPId, year.toString(), XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); // 督察问题趋势
List<EchartsVo> caseVerifyTrend = negativeMapper.getSubOneTrend(departPId, year.toString(), A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<EchartsVo> policeCommentTrend = new ArrayList<>();
List<EchartsVo> mailTrend = negativeMapper.getSubOneTrend(departPId, year.toString(), GJXFPT.getValue(), GABXF.getValue(), JZXX.getValue(), XF12337.getValue(), XF_QT.getValue());
JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("superviseProTrend", superviseProTrend)
.fluentPut("caseVerifyTrend", caseVerifyTrend)
.fluentPut("policeCommentTrend", policeCommentTrend)
.fluentPut("mailTrend", mailTrend);
@Operation(summary = "数据大屏问题趋势统计")
@GetMapping("/getSubOneGlobalTrend")
public Result<JSONObject> getSubOneGlobalTrend(@RequestParam Integer departId, @RequestParam Integer year) {
List<EchartsVo> GlobalRecentlyTrendList= negativeMapper.getSubOneTrend(departId.toString(), year.toString(), "2", "13", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "27", "28", "29", "30");
JSONObject jsonObject = new JSONObject().fluentPut("globalRecentlyTrendList", GlobalRecentlyTrendList);
return Result.success(jsonObject);
}
//endregion
//region 右边
/**
* 获取地图数据
* 突出问题排名
*
* @param departPId 2级单位的id
* @return json格式的地图数据
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "获取二级大屏地图JSON")
@GetMapping("/getSubOneStreetMap")
@Cacheable(cacheNames = "subOneStreetMap", key = "'p_'+ #departPId")
public Result<JSONObject> getSubOneStreetMap(@RequestParam Integer departPId) {
JSONObject res = countyStreetDeptService.getSubOneStreetMap(departPId);
@Operation(summary = "突出问题排名")
@GetMapping("/getSubOneStrongProblemRate")
public Result<JSONObject> getSubOneStrongProblemRate(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 突出问题排名
List<StrongProblemRank> tcwtlist = negativeMapper.selectSubOneStrongProblemRank(departId, beginTime, endTime);
for (int i = 1; i <= tcwtlist.size(); i++) {
tcwtlist.get(i - 1).setSort(i);
}
JSONObject res = new JSONObject().fluentPut("tcwtlist", tcwtlist);
return Result.success(res);
}
// endregion
// region右边
/**
* 获取首页二级大屏案件核查排名
* 问题类型占比
*
* @param departPId 2级单位的id
* @param beginTime 开始时间
* @param endTime 结束时间
* @return 总览和排名
* @return Result<JSONObject>
*/
@Operation(summary = "获取首页二级大屏案件核查排名")
@GetMapping("/getSubOneCaseVerifyRank")
public Result<JSONObject> getSubOneCaseVerifyRank(@RequestParam Integer departPId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
SubOneOverViewVo caseVerifyPrecinctOverView = negativeMapper.getGlobalPoliceCaseVerifyOverView(departPId, beginTime, endTime);
SubOneOverViewVo caseVerifyTeamOverView = negativeMapper.getGlobalTeamCaseVerifyOverView(departPId, beginTime, endTime);
List<RankVo> caseVerifyPrecinctList = negativeMapper.getGlobalPoliceCaseVerifyRank(departPId, beginTime, endTime); // 案件核查派出所排名
List<RankVo> caseVerifyTeamList = negativeMapper.getGlobalTeamCaseVerifyRank(departPId, beginTime, endTime); // 案件核查大队排名
JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("caseVerifyPrecinctOverView", caseVerifyPrecinctOverView)
.fluentPut("caseVerifyTeamOverView", caseVerifyTeamOverView)
.fluentPut("caseVerifyPrecinctList", caseVerifyPrecinctList)
.fluentPut("caseVerifyTeamList", caseVerifyTeamList);
return Result.success(jsonObject);
@Operation(summary = "问题类型占比")
@GetMapping("/getSubOneProblemBusinessRate")
public Result<JSONObject> getSubOneProblemBusinessRate(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 问题类型占比
List<EchartsVo> wtlxlist = negativeMapper.selectSubOneProblemRate(departId, beginTime, endTime);
JSONObject res = new JSONObject().fluentPut("wtlxlist", wtlxlist);
return Result.success(res);
}
// endregion
//endregion
}

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

@ -1,13 +1,27 @@
package com.biutag.supervision.controller.subdatav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.constants.enums.RepeatEnum;
import com.biutag.supervision.mapper.DataPetition12337Mapper;
import com.biutag.supervision.mapper.DataPetitionComplaintMapper;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.DataMailService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;
/**
* @Auther: sh
* @Date: 2024/12/20 11:45
@ -20,14 +34,152 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j
public class SubOneMailViewController {
private final DataMailService dataMailService;
private final DataPetitionComplaintMapper dataPetitionComplaintMapper;
private final DataPetition12337Mapper dataPetition12337Mapper;
private final NegativeMapper negativeMapper;
// region 左边
/**
* 初访重访情况
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "初访重访情况")
@GetMapping("/getSubOneFirstAndRepeatMail")
public Result<JSONObject> getFirstAndRepeatMail(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 初访重访情况总览
MailFirstAndRepeatOverviewVo fxjsFirstAndRepeatOverview = dataPetitionComplaintMapper.getSubOnePoliceFirstAndRepeatOverview(beginTime, endTime, departId);
MailFirstAndRepeatOverviewVo bwzdFirstAndRepeatOverview = dataPetitionComplaintMapper.getTeamFirstAndRepeatOverview(beginTime, endTime, departId);
// 初访重访分类数据排行
List<OrganizeProblemRankVo> fxsjFirstRankList = dataPetitionComplaintMapper.getPoliceMailRank(beginTime, endTime, departId, 1); // 1
List<OrganizeProblemRankVo> fxsjRepeatRankList = dataPetitionComplaintMapper.getPoliceMailRank(beginTime, endTime, departId, RepeatEnum.REPEAT_MAIL.getId()); // 2
List<OrganizeProblemRankVo> fxsjLeaderViewRankList = dataPetitionComplaintMapper.getPoliceMailLeaderRank(beginTime, endTime, departId);
List<OrganizeProblemRankVo> bwzdFirstRankList = dataPetitionComplaintMapper.getTeamMailRank(beginTime, endTime, departId, RepeatEnum.FIRST_MAIL.getId());
List<OrganizeProblemRankVo> bwzdRepeatRankList = dataPetitionComplaintMapper.getTeamMailRank(beginTime, endTime, departId, RepeatEnum.REPEAT_MAIL.getId());
List<OrganizeProblemRankVo> bwzdLeaderViewRankList = dataPetitionComplaintMapper.getTeamMailLeaderRank(beginTime, endTime, 4);
JSONObject data = new JSONObject()
.fluentPut("fxjsFirstAndRepeatOverview", fxjsFirstAndRepeatOverview)
.fluentPut("bwzdFirstAndRepeatOverview", bwzdFirstAndRepeatOverview)
.fluentPut("fxsjFirstRankList", fxsjFirstRankList)
.fluentPut("fxsjRepeatRankList", fxsjRepeatRankList)
.fluentPut("fxsjLeaderViewRankList", fxsjLeaderViewRankList)
.fluentPut("bwzdFirstRankList", bwzdFirstRankList)
.fluentPut("bwzdRepeatRankList", bwzdRepeatRankList)
.fluentPut("bwzdLeaderViewRankList", bwzdLeaderViewRankList);
return Result.success(data);
}
// endregion
// region 中间
/**
* 信访数据中央总览统计
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "信访数据大屏中央数据统计")
@GetMapping("/getSubOneAllMailCount")
public Result<JSONObject> getSubOneAllMailCount(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 信访数据总数概览
MailOverviewVo overview = dataMailService.getSubOneAllMailCount(beginTime, endTime, departId);
System.out.println("信访总览================================");
System.out.println(overview);
JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data);
}
/**
* 信访数据中央地图小图标数据
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "信访数据中央地图小图标数据")
@GetMapping("/getMailMapIcon")
@Cacheable(cacheNames = "MailMap", key = "'p_'+ #endTime")
public Result<JSONObject> getMailMapIcon(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 信访数据总数概览
List<MailMapIconVo> mailMapIconList = dataMailService.getMailMapIcon(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("mailMapIconList", mailMapIconList);
return Result.success(data);
}
/**
* 信访数据大屏信访趋势统计
*
* @param year 年份
* @return Result<JSONObject>
*/
@Operation(summary = "信访数据大屏信访趋势统计")
@GetMapping("/getSubOneMailTrend")
public Result<JSONObject> getSubOneMailTrend(@RequestParam Integer departId, @RequestParam Integer year) {
List<EchartsVo> countryList = dataPetitionComplaintMapper.getSubOneMailTrend(year, 21, departId);
List<EchartsVo> policeList = dataPetitionComplaintMapper.getSubOneMailTrend(year, 22, departId);
List<EchartsVo> manageList = dataPetitionComplaintMapper.getSubOneMailTrend(year, 23, departId);
List<EchartsVo> numberList = dataPetition12337Mapper.getSubOneMailTrend12337(year, departId);
JSONObject data = new JSONObject()
.fluentPut("countryList", countryList)
.fluentPut("policeList", policeList)
.fluentPut("manageList", manageList)
.fluentPut("numberList", numberList);
return Result.success(data);
}
// endregion
// region 右边
/**
* 缠访集访情况
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "缠访集访情况")
@GetMapping("/getSubOneEntanglementAndMassMail")
public Result<JSONObject> getSubOneEntanglementAndMassMail(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 缠访集访情况总览
MailEntanglementMassOverviewVo fxsjMailEntanglementMassOverview = dataPetitionComplaintMapper.getPoliceEntanglementAndMassOverview(beginTime, endTime, departId);
MailEntanglementMassOverviewVo bwzdMailEntanglementMassOverview = dataPetitionComplaintMapper.getTeamEntanglementAndMassOverview(beginTime, endTime, departId);
List<OrganizeProblemRankVo> fxsjLeaderReviewList = dataPetitionComplaintMapper.getPoliceMailLeaderRank(beginTime, endTime, departId);
List<OrganizeProblemRankVo> fxsjEntanglementList = dataPetitionComplaintMapper.getPoliceEntanglementMailRank(beginTime, endTime, departId);
List<OrganizeProblemRankVo> fxsjMassList = dataPetitionComplaintMapper.getPoliceMassMailRank(beginTime, endTime, departId);
List<OrganizeProblemRankVo> bwzdLeaderReviewList = dataPetitionComplaintMapper.getTeamMailLeaderRank(beginTime, endTime, departId);
List<OrganizeProblemRankVo> bwzdEntanglementList = dataPetitionComplaintMapper.getTeamEntanglementMailRank(beginTime, endTime, departId);
List<OrganizeProblemRankVo> bwzdMassList = dataPetitionComplaintMapper.getTeamMassMailRank(beginTime, endTime, departId);
JSONObject data = new JSONObject()
.fluentPut("fxsjMailEntanglementMassOverview", fxsjMailEntanglementMassOverview)
.fluentPut("bwzdMailEntanglementMassOverview", bwzdMailEntanglementMassOverview)
.fluentPut("fxsjLeaderReviewList", fxsjLeaderReviewList)
.fluentPut("fxsjEntanglementList", fxsjEntanglementList)
.fluentPut("fxsjMassList", fxsjMassList)
.fluentPut("bwzdLeaderReviewList", bwzdLeaderReviewList)
.fluentPut("bwzdEntanglementList", bwzdEntanglementList)
.fluentPut("bwzdMassList", bwzdMassList);
return Result.success(data);
}
// endregion
}

94
src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java

@ -0,0 +1,94 @@
package com.biutag.supervision.controller.subdatav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.RpcApplyMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.ComfortCountVO;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.service.DataRightsComfortService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @Auther: sh
* @Date: 2024/12/24 17:50
* @Description: 二级维权抚慰
*/
@Tag(name = "二级大屏维权抚慰")
@RequestMapping("datav/sub1/rightsComfort")
@RequiredArgsConstructor
@RestController
@Slf4j
public class SubOneRightsController {
private final DataRightsComfortService dataRightsComfortService;
private final RpcApplyMapper rpcApplyMapper;
// 大屏中央总览数据
@GetMapping("/getSubOneALlComfortCount")
public Result<JSONObject> getALlComfortCount(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
Integer comfortTotal = rpcApplyMapper.countSubOneComfortPersonNumber(beginTime, endTime, departId);
// Integer comfortTotal = dataRightsComfortService.countComfortPersonNumber(beginTime, endTime); // 抚慰人数
Integer hitTotal = dataRightsComfortService.countSubOneHitPersonNumber(beginTime, endTime, departId); // 打击处理人数
Double comfortMoney = rpcApplyMapper.countSubOneComfortMoney(beginTime, endTime, departId);
// Double comfortMoney = dataRightsComfortService.countComfortMoney(beginTime, endTime); // 抚慰金额
ComfortCountVO comfortOverview = new ComfortCountVO();
comfortOverview.setComfortTotal(comfortTotal);
comfortOverview.setHitTotal(hitTotal);
comfortOverview.setComfortMoney(comfortMoney);
comfortOverview.setComfortCaseTotal(0);
comfortOverview.setHurtTotal(0);
JSONObject data = new JSONObject().fluentPut("comfortOverview", comfortOverview);
return Result.success(data);
}
// region 右边
// 民辅警受伤人数情况和受伤类别
@GetMapping("/getSubOnePoliceHurtSituationAndHurtType")
public Result<JSONObject> getSubOnePoliceHurtSituationAndHurtType(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> policeHurtSituationList = rpcApplyMapper.getSubOnePoliceHurtSituation(beginTime, endTime,departId); // 人数情况
List<EchartsVo> policeHurtTypeList = rpcApplyMapper.getSubOnePoliceHurtType(beginTime, endTime,departId); // 受伤类别
JSONObject data = new JSONObject()
.fluentPut("policeHurtSituationList", policeHurtSituationList)
.fluentPut("policeHurtTypeList", policeHurtTypeList);
return Result.success(data);
}
// 发案情况占比
@GetMapping("/getSubOneCaseAriseSituationRate")
public Result<JSONObject> getSubOneCaseAriseSituationRate(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 发案环节
List<EchartsVo> incidentLinkList = rpcApplyMapper.getSubOneIncidentLink(beginTime, endTime,departId);
// 发案警种
List<EchartsVo> incidentPoliceTypeList = new ArrayList<>();
// 发案单位
List<EchartsVo> incidentOrgList = rpcApplyMapper.getSubOneIncidentOrg(beginTime, endTime,departId);
JSONObject data = new JSONObject()
.fluentPut("incidentLinkList", incidentLinkList)
.fluentPut("incidentPoliceTypeList", incidentPoliceTypeList)
.fluentPut("incidentOrgList", incidentOrgList);
return Result.success(data);
}
// endregion
}

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

@ -107,7 +107,7 @@ public class SubOneSupervisionNotifyController {
@GetMapping("/getSubOneSupervisionTrend")
public Result<JSONObject> getSubOneSupervisionTrend(@RequestParam Integer departId,
@RequestParam String year) {
List<EchartsVo> supervisionTrend = negativeMapper.getSubOneTrend(departId, year, "13", "15");
List<EchartsVo> supervisionTrend = negativeMapper.getSubOneTrend(departId.toString(), year, "13", "15");
JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend);
return Result.success(data);
}

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

@ -24,8 +24,8 @@ public interface CountyStreetDeptMapper extends BaseMapper<CountyStreetDept> {
List<CountyStreetDept> props(Integer id);
@Select("select * from county_street_dept where dept_pid = #{departPId}")
List<CountyStreetDept> getSubOneStreetMap(Integer departPId);
@Select("select * from county_street_dept where dept_pid = #{departId}")
List<CountyStreetDept> getSubOneStreetMap(Integer departId);
}

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

@ -31,6 +31,21 @@ public interface DataPetition12337Mapper extends BaseMapper<DataPetition12337> {
"where discover_time between #{beginTime} and #{endTime} " +
"and second_depart_id=#{departId}")
Integer select12337MailBySourceCode(Date beginTime, Date endTime, String departId);
@Select("SELECT " +
"m.month_name AS `name`, " +
"IFNULL(COUNT(sd.pid=#{departId}), 0) AS `value` " +
"FROM sup_month_monthname m " +
"LEFT JOIN data_petition_12337 dpc " +
"ON DATE_FORMAT(dpc.discover_time, '%m') = m.month " +
"AND YEAR(dpc.discover_time) = #{year} " +
"LEFT JOIN sup_depart sd " +
"ON dpc.third_depart_id = sd.id " +
"AND sd.pid = #{departId} " +
"GROUP BY m.month_name " +
"ORDER BY m.month ASC;")
List<EchartsVo> getSubOneMailTrend12337(Integer year, Integer departId);
}

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

@ -36,51 +36,6 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"ORDER BY value DESC")
List<CaseVerifDepart> selectDepartStatistic(Integer departId, Integer Repeat, Date beginTime, Date endTime);
/**
* 查询领导阅信接访
*
* @param departId
* @param beginTime
* @param endTime
* @return
*/
@Select("SELECT sd.id, sd.short_name label,count(*) value " +
"FROM (SELECT * FROM data_petition_complaint dpc " +
"WHERE dpc.discovery_time BETWEEN #{beginTime} AND #{endTime}) as temp " +
"INNER JOIN sup_depart sd on sd.id=temp.second_depart_id " +
"WHERE sd.statistics_group_id=#{departId} and temp.receiving_leader_name is not null " +
"GROUP BY temp.second_depart_id " +
"ORDER BY value DESC")
List<CaseVerifDepart> selectLeaderViewMail(Integer departId, Date beginTime, Date endTime);
/**
* 缠访闹访分县市局排行
*
* @param id
* @param isEntanglement
* @param beginTime
* @param endTime
* @return
*/
@Select("SELECT sd.id, sd.short_name label,count(*) value " +
"FROM (SELECT * FROM data_petition_complaint dpc " +
"WHERE dpc.discovery_time BETWEEN #{beginTime} AND #{endTime}) as temp " +
"INNER JOIN sup_depart sd on sd.id=temp.second_depart_id " +
"WHERE sd.statistics_group_id=#{id} AND entanglement_visits =#{isEntanglement} " +
"GROUP BY temp.second_depart_id " +
"ORDER BY value DESC")
List<CaseVerifDepart> selectEntanglementMail(Integer id, int isEntanglement, Date beginTime, Date endTime);
@Select("SELECT sd.id, sd.short_name label,count(*) value " +
"FROM (SELECT * FROM data_petition_complaint dpc " +
"WHERE dpc.discovery_time BETWEEN #{beginTime} AND #{endTime}) as temp " +
"INNER JOIN sup_depart sd on sd.id=temp.second_depart_id " +
"WHERE sd.statistics_group_id=#{id} AND mass_visits =#{isMass} " +
"GROUP BY temp.second_depart_id " +
"ORDER BY value DESC")
List<CaseVerifDepart> selectMassMail(Integer id, int isMass, Date beginTime, Date endTime);
@Select("SELECT DATE_FORMAT(dpc.discovery_time, '%Y/%m/%d') AS dayTime, COUNT(*) total " +
"FROM data_petition_complaint dpc " +
@ -100,73 +55,290 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
List<RecentMailTrendByMonthVo> selectRecentlyMailTrendByMonth(Integer sourcesCode, String year);
@Select("SELECT COUNT( IF(initial_petition=1, 1, NULL) ) AS firstMail, " +
"count( IF( initial_petition=2, 2, NULL) ) AS repeatMail, " +
"count( IF(receiving_leader_name is NOT NULL, 1, NULL) ) AS leaderMail " +
@Select("SELECT " +
"SUM( IF(initial_petition=1, 1, 0) ) AS firstMail, " +
"SUM( IF( initial_petition=2, 1, 0) ) AS repeatMail, " +
"SUM( IF(receiving_leader_name is NOT NULL, 1, 0) ) AS leaderMail " +
"FROM data_petition_complaint dpc " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime}; ")
MailFirstAndRepeatOverviewVo getFirstAndRepeatOverview(Date beginTime, Date endTime);
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd1.statistics_group_id=#{groupId}; ")
MailFirstAndRepeatOverviewVo getFirstAndRepeatOverview(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT sd.short_name AS label, count(*) AS `value` FROM data_petition_complaint dpc " +
"INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " +
"AND sd.statistics_group_id=#{groupId} " +
"AND dpc.second_depart_name is not NULL " +
@Select("SELECT " +
"sd1.short_name AS label, " +
"count(*) AS `value` FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE dpc.initial_petition=#{isRepeat} " +
"AND sd1.statistics_group_id=#{groupId} " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC ")
List<OrganizeProblemRankVo> getMailRank(Date beginTime, Date endTime, int groupId, Integer isRepeat);
@Select("SELECT sd.short_name AS label, count(*) AS `value` FROM data_petition_complaint dpc " +
"INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " +
"AND sd.statistics_group_id=#{groupId} " +
"AND dpc.second_depart_name is not NULL " +
"GROUP BY sd1.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getMailRank(Date beginTime, Date endTime, Integer groupId, Integer isRepeat);
@Select("SELECT " +
"SUM( IF(dpc.problem_sources_code=21,1,0)) AS countryMail, " +
"SUM( IF(dpc.problem_sources_code=22,1,0)) AS policeMail " +
"FROM data_petition_complaint dpc " +
"WHERE dpc.third_depart_id IS NOT NULL " +
"AND dpc.discovery_time BETWEEN #{beginTime} AND #{endTime}" )
MailOverviewVo selectMailOverviewVo(Date beginTime, Date endTime);
@Select("SELECT " +
"sd1.short_name AS label, " +
"count(*) AS `value` FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE dpc.receiving_leader_name is NOT NULL " +
"AND sd1.statistics_group_id=#{groupId} " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC")
List<OrganizeProblemRankVo> getMailLeaderRank(Date beginTime, Date endTime, int groupId);
"GROUP BY sd1.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getMailLeaderRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT COUNT( IF(mass_visits=1, 1, NULL) ) AS entanglement, " +
"count( IF( entanglement_visits=1, 1, NULL) ) AS mass, " +
"count( IF(receiving_leader_name is NOT NULL, 1, NULL) ) AS leaderReview " +
"FROM data_petition_complaint dpc " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} ")
MailEntanglementMassOverviewVo getEntanglementAndMassOverview(Date beginTime, Date endTime);
@Select("SELECT sd.short_name AS label, " +
"count(*) AS `value` FROM data_petition_complaint dpc " +
"INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " +
"AND sd.statistics_group_id=#{groupId} " +
"AND dpc.second_depart_name is not NULL " +
"WHERE dpc.entanglement_visits=1 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC")
List<OrganizeProblemRankVo> getEntanglementMailRank(Date beginTime, Date endTime, int groupId);
@Select("SELECT sd.short_name AS label, " +
"count(*) AS `value` FROM data_petition_complaint dpc " +
"INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " +
"AND sd.statistics_group_id=#{groupId} " +
"AND dpc.second_depart_name is not NULL " +
"WHERE dpc.entanglement_visits=1 " +
@Select("SELECT " +
"sum( IF(receiving_leader_name is NOT NULL, 1, 0) ) AS leaderReview , " +
"sum( IF(entanglement_visits=1, 1, 0) ) AS entanglement , " +
"sum( IF( mass_visits=1, 1, 0) ) AS mass " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 on sd.pid=sd1.id " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd1.statistics_group_id=#{groupId}; ")
MailEntanglementMassOverviewVo getEntanglementAndMassOverview(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT " +
"sd1.short_name AS label, " +
"count(DISTINCT dpc.origin_id ) AS `value` " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE sd1.statistics_group_id=#{groupId} " +
"AND dpc.entanglement_visits =1 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC ")
List<OrganizeProblemRankVo> getMassMailRank(Date beginTime, Date endTime, int groupId);
"GROUP BY sd1.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> getEntanglementMailRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT " +
"sd1.short_name AS label, " +
"count(DISTINCT dpc.origin_id ) AS `value` " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE sd1.statistics_group_id=#{groupId} " +
"AND dpc.mass_visits =1 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> getMassMailRank(Date beginTime, Date endTime, Integer groupId);
@Select("select count(*) from data_petition_complaint dpc " +
@Select("select count(*) " +
"from data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd ON dpc.third_depart_id=sd.id " +
"where problem_sources_code=#{problemSourcesCode} " +
"and second_depart_id=#{departId} " +
"and discovery_time between #{beginTime} and #{endTime}")
"and sd.pid=#{departId} " +
"and discovery_time BETWEEN #{beginTime} AND #{endTime} ")
Integer selectMailBySourceCode(Date beginTime, Date endTime, String problemSourcesCode, String departId);
// 二级大屏
@Select("SELECT " +
"COALESCE(SUM(IF(initial_petition=1, 1, 0)), 0) AS firstMail, " +
"COALESCE(SUM(IF(initial_petition=2, 1, 0)), 0) AS repeatMail, " +
"COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderMail " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " +
"AND sd.statistics_group_id = 10;")
MailFirstAndRepeatOverviewVo getSubOnePoliceFirstAndRepeatOverview(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"COALESCE(SUM(IF(initial_petition=1, 1, 0)), 0) AS firstMail, " +
"COALESCE(SUM(IF(initial_petition=2, 1, 0)), 0) AS repeatMail, " +
"COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderMail " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " +
"AND sd.statistics_group_id != 10;")
MailFirstAndRepeatOverviewVo getTeamFirstAndRepeatOverview(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"sd.short_name AS label, " +
"count(*) AS `value` " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE dpc.initial_petition=#{typeId} " +
"AND sd.pid = #{departId} " +
"AND sd.statistics_group_id=10 " +
"AND dpc.second_depart_name is not NULL " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC")
List<OrganizeProblemRankVo> getPoliceMailRank(Date beginTime, Date endTime, Integer departId, Integer typeId);
@Select("SELECT " +
"sd.short_name AS label, " +
"count(*) AS `value` " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE dpc.initial_petition=#{typeId} " +
"AND sd.pid = #{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND dpc.second_depart_name is not NULL " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC")
List<OrganizeProblemRankVo> getTeamMailRank(Date beginTime, Date endTime, Integer departId, Integer typeId);
@Select("SELECT " +
"sd.short_name AS label, " +
"count(*) AS `value` FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE dpc.receiving_leader_name is NOT NULL " +
"AND sd.pid=#{departId} " +
"AND sd.statistics_group_id = 10 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getPoliceMailLeaderRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"sd.short_name AS label, " +
"count(*) AS `value` FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE dpc.receiving_leader_name is NOT NULL " +
"AND sd.pid=#{departId} " +
"AND sd.statistics_group_id != 10 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getTeamMailLeaderRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"SUM( IF(dpc.problem_sources_code=21,1,0)) AS countryMail, " +
"SUM( IF(dpc.problem_sources_code=22,1,0)) AS policeMail " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd ON dpc.third_depart_id=sd.id " +
"WHERE sd.pid=#{departId} " +
"AND dpc.discovery_time BETWEEN #{beginTime} AND #{endTime} ")
MailOverviewVo selectSubOneMailOverviewVo(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"m.month_name AS `name`, " +
"IFNULL(COUNT(sd.pid=#{departId}), 0) AS `value` " +
"FROM sup_month_monthname m " +
"LEFT JOIN data_petition_complaint dpc " +
"ON DATE_FORMAT(dpc.discovery_time, '%m') = m.month " +
"AND YEAR(dpc.discovery_time) = #{year} " +
"AND dpc.problem_sources_code = #{problemSourceCode} " +
"LEFT JOIN sup_depart sd " +
"ON dpc.third_depart_id = sd.id " +
"AND sd.pid = #{departId} " +
"GROUP BY m.month_name " +
"ORDER BY m.month ASC;")
List<EchartsVo> getSubOneMailTrend(Integer year, Integer problemSourceCode, Integer departId);
@Select("SELECT " +
"COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderReview, " +
"COALESCE(SUM(IF(entanglement_visits=1, 1, 0)), 0) AS entanglement, " +
"COALESCE(SUM(IF(mass_visits=1, 1, 0)), 0) AS mass " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " +
"AND sd.statistics_group_id=10;")
MailEntanglementMassOverviewVo getPoliceEntanglementAndMassOverview(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderReview, " +
"COALESCE(SUM(IF(entanglement_visits=1, 1, 0)), 0) AS entanglement, " +
"COALESCE(SUM(IF(mass_visits=1, 1, 0)), 0) AS mass " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " +
"AND sd.statistics_group_id!=10;")
MailEntanglementMassOverviewVo getTeamEntanglementAndMassOverview(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"sd.short_name AS label, " +
"count(DISTINCT dpc.origin_id ) AS `value` " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE sd.statistics_group_id=10 " +
"AND sd.pid=#{departId} " +
"AND dpc.entanglement_visits =1 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> getPoliceEntanglementMailRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"sd.short_name AS label, " +
"count(DISTINCT dpc.origin_id ) AS `value` " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE sd.statistics_group_id!=10 " +
"AND sd.pid=#{departId} " +
"AND dpc.entanglement_visits =1 " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> getTeamEntanglementMailRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"sd.short_name AS label, " +
"count(DISTINCT dpc.origin_id ) AS `value` " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE sd.statistics_group_id=10 " +
"AND dpc.mass_visits =1 " +
"AND sd.pid=#{departId} " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> getPoliceMassMailRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"sd.short_name AS label, " +
"count(DISTINCT dpc.origin_id ) AS `value` " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"WHERE sd.statistics_group_id!=10 " +
"AND dpc.mass_visits =1 " +
"AND sd.pid=#{departId} " +
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"HAVING label is not NULL " +
"ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> getTeamMassMailRank(Date beginTime, Date endTime, Integer departId);
}

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

@ -14,11 +14,12 @@ public interface NegativeMapper extends BaseMapper<Negative> {
/**
* 查询问题趋势
* @param year 年份
* @param args 问题来源变参数组
*
* @param year 年份
* @param args 问题来源变参数组
* @return
*/
List<EchartsVo> getTrend(Integer year, String ...args);
List<EchartsVo> getTrend(Integer year, String... args);
// region 首页大屏
@ -35,15 +36,17 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=#{groupType} " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30)\n" +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC; " )
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> selectOrganizeProblemRank(Integer groupType, Date beginTime, Date endTime);
// 业务类型占比
@Select("SELECT businessTypeName as name, count(*) value FROM negative " +
"WHERE " +
"discoveryTime BETWEEN #{beginTime} and #{endTime} and checkStatus=1 " +
@Select("SELECT " +
"businessTypeName as name, " +
"count(*) value FROM negative " +
"WHERE discoveryTime BETWEEN #{beginTime} and #{endTime} " +
"and checkStatus in (1, 2) " +
"GROUP BY businessTypeName")
List<EchartsVo> selectBusinessRate(Date beginTime, Date endTime);
@ -81,6 +84,26 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> getGlobalRecentlyTrendByMonth(String year);
/**
* 首页大屏突出问题排名
* @param beginTime
* @param endTime
* @return
*/
@Select("SELECT " +
"npr.threeLevelContent as label, " +
"count(*) `value` " +
"FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " +
"WHERE npr.threeLevelContent is not NULL " +
"AND checkStatus IN (1, 2) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent " +
"ORDER BY `value` desc " +
" LIMIT 10 OFFSET 1 ")
List<StrongProblemRank> selectStrongProblemRank(Date beginTime, Date endTime);
// endregion
// region 现场督察大屏
@ -132,6 +155,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
" 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)")
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, " +
@ -146,7 +170,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime);
@Select("SELECT " +
"sd.short_name AS `name`, " +
"sd.id AS departId, " +
@ -254,8 +277,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<VideoSuperviseMapIconVo> getVideoSuperviseMapIconInfo(Date beginTime, Date endTime);
// endregion
// region 案件核查大屏
@ -334,13 +355,87 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> getMailTrend(Integer year, Integer type);
List<EchartsVo> getSubOneTrend(Integer departId, String year, String... args);
List<EchartsVo> getSubOneTrend(String departId, String year, String... args);
// endregion
// region 二级大屏首页大屏
@Select("SELECT " +
"sd.short_name AS label, " +
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=10 " +
"AND sd.pid=#{departId} " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> selectPoliceOrganizeProblemRank(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"sd.short_name AS label, " +
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id!=10 " +
"AND sd.pid=#{departId} " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> selectTeamOrganizeProblemRank(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"businessTypeName as name, " +
"count(*) value " +
"FROM negative " +
"WHERE checkStatus in (1, 2) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND negative.second_involve_depart_id=#{departId} " +
"GROUP BY businessTypeName")
List<EchartsVo> selectSubOneBusinessRate(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"SUM( IF(problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30), 1, 0) ) AS totalPro, " +
"SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisionPro, " +
"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 (2),1, 0) ) AS talkPro, " +
"SUM( IF(problemSourcesCode IN (27,28,29,30),1, 0) ) AS auditPro " +
"FROM negative ng WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} ")
GlobalOverViewVo getSuoOneAllGlobalCount(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"npr.threeLevelContent as label, " +
"count(*) `value` " +
"FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " +
"WHERE npr.threeLevelContent is not NULL " +
"AND checkStatus IN (1, 2) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}" +
"AND ng.second_involve_depart_id=#{departId} " +
"GROUP BY npr.threeLevelContent " +
"ORDER BY `value` desc " +
" LIMIT 10 OFFSET 1")
List<StrongProblemRank> selectSubOneStrongProblemRank(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " +
"npr.oneLevelContent as name, " +
"count(*) `value` " +
"FROM negative_problem_relation npr " +
"LEFT JOIN negative ng ON ng.id=npr.negativeId " +
"WHERE checkStatus in (1,2) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND npr.oneLevelContent is not NULL " +
"AND ng.second_involve_depart_id=#{departId} " +
"GROUP BY npr.oneLevelContent " +
"ORDER BY `value` desc")
List<EchartsVo> selectSubOneProblemRate(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, " +
@ -447,7 +542,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY value DESC " )
"ORDER BY value DESC ")
List<RankVo> getGlobalPoliceCaseVerifyRank(Integer departPId, Date beginTime, Date endTime);
@Select("SELECT " +
@ -462,7 +557,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY value DESC " )
"ORDER BY value DESC ")
List<RankVo> getGlobalTeamCaseVerifyRank(Integer departPId, Date beginTime, Date endTime);
// endregion
@ -749,13 +844,13 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getTeamCaseVerificationRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT npr.threeLevelContent AS label, " +
@Select("SELECT npr.threeLevelContent AS name, " +
"COUNT(*) AS `value` FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " +
"WHERE ng.checkStatus!=3 " +
"AND sd.pid = #{departId} " +
"AND ng.problemSourcesCode IN (17,18,19,20)\n" +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.businessTypeCode = #{businessType} " +
"GROUP BY npr.threeLevelContent " +
@ -800,13 +895,30 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> getSubOneCaseVerificationTrend(String year, String departId, String... args);
@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);
/**
* 首页大屏问题类型占比
* @param beginTime
* @param endTime
* @return
*/
@Select("SELECT " +
"npr.oneLevelContent as name, " +
"count(*) `value` FROM negative_problem_relation npr " +
"LEFT JOIN negative ng ON ng.id=npr.negativeId\n" +
"WHERE checkStatus in (1, 2) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND npr.oneLevelContent is not NULL " +
"GROUP BY npr.oneLevelContent " +
"ORDER BY `value` desc")
List<EchartsVo> selectProblemRate(Date beginTime, Date endTime);
// endregion
}

39
src/main/java/com/biutag/supervision/mapper/NegativeProblemRelationMapper.java

@ -13,42 +13,9 @@ import java.util.List;
public interface NegativeProblemRelationMapper extends BaseMapper<NegativeProblemRelation> {
/**
* 首页大屏问题类型占比
* @param beginTime
* @param endTime
* @return
*/
@Select("SELECT npr.oneLevelContent as name, count(*) `value` FROM negative_problem_relation npr INNER JOIN " +
" ( " +
" SELECT id FROM negative ng " +
" WHERE checkStatus <>3 " +
" AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
" ) as temp " +
"on npr.negativeId=temp.id " +
"AND npr.oneLevelContent is not NULL " +
"GROUP BY npr.oneLevelContent " +
"ORDER BY `value` desc")
List<EchartsVo> selectProblemRate(Date beginTime, Date endTime);
/**
* 首页大屏突出问题排名
* @param beginTime
* @param endTime
* @return
*/
@Select("SELECT npr.threeLevelContent as label, count(*) `value` FROM negative_problem_relation npr INNER JOIN " +
" ( " +
" SELECT id FROM negative ng " +
" WHERE checkStatus <>3 " +
" AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
" ) as temp " +
"on npr.negativeId=temp.id " +
"AND npr.threeLevelContent is not NULL " +
"GROUP BY npr.threeLevelContent " +
"ORDER BY `value` desc" +
" LIMIT 10 OFFSET 1")
List<StrongProblemRank> selectStrongProblemRank(Date beginTime, Date endTime);
}

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

@ -46,25 +46,129 @@ public interface RpcApplyMapper extends BaseMapper<RpcApply> {
"ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> getRightsRank(Date beginTime, Date endTime, Integer groupId);
@Select("SELECT sdd.dict_label AS `name`, count(DISTINCT rap.emp_no) AS `value` FROM rpc_apply_person rap " +
"INNER JOIN sup_police sp ON rap.emp_no = sp.emp_no " +
"INNER JOIN sup_dict_data sdd on sdd.dict_value = sp.person_type AND sdd.dict_type='personType' " +
"WHERE person_type is not NULL " +
"AND rap.creat_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY person_type ")
@Select("SELECT " +
"sdd.dict_label AS `name`, " +
"count(*) AS `value` " +
"FROM rpc_apply_person rap " +
"LEFT JOIN sup_police sp ON rap.emp_no=sp.emp_no " +
"LEFT JOIN sup_dict_data sdd on sdd.dict_value = sp.person_type AND sdd.dict_type='personType' " +
"WHERE rap.creat_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sdd.dict_label " +
"HAVING `name` IS NOT NULL ")
List<EchartsVo> getPoliceHurtSituation(Date beginTime, Date endTime);
@Select("SELECT Incident_link_name AS `name`, count(*) AS `value` FROM rpc_apply " +
"WHERE Incident_link_name is NOT NULL " +
"AND happen_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY Incident_link_name;")
@Select("SELECT " +
"injury_severity_name AS `name`, " +
"count(*) AS `value` " +
"FROM rpc_apply_person rap " +
"LEFT JOIN sup_police sp ON rap.emp_no=sp.emp_no " +
"WHERE rap.creat_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sp.person_type IN (1,3,4) " +
"AND injury_severity_name is NOT NULL " +
"GROUP BY injury_severity_name ")
List<EchartsVo> getPoliceHurtType(Date beginTime, Date endTime);
@Select("SELECT " +
"Incident_link_name AS `name`, " +
"count(*) AS `value` " +
"FROM rpc_apply ra " +
"WHERE ra.happen_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY Incident_link_name ")
List<EchartsVo> getIncidentLink(Date beginTime, Date endTime);
@Select("SELECT sd.short_name AS `name`, count(*) as `value` FROM sup_depart sd " +
"INNER JOIN sup_depart sd1 on sd.id = sd1.pid AND sd.level=2 " +
"INNER JOIN rpc_apply ra on sd1.id=ra.depart_id " +
"WHERE ra.happen_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC;")
@Select("SELECT " +
"sd1.short_name AS `name`, " +
"count(*) AS `value` " +
"FROM rpc_apply ra " +
"LEFT JOIN sup_depart sd ON ra.depart_id=sd.id " +
"AND sd.`level`=3 " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"AND sd1.`level`=2 " +
"WHERE ra.happen_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.short_name " +
"HAVING `name` is NOT NULL")
List<EchartsVo> getIncidentOrg(Date beginTime, Date endTime);
// 二级大屏
@Select("SELECT " +
"count(*) " +
"FROM rpc_apply_person rap " +
"LEFT JOIN rpc_apply ra ON rap.rpc_id=ra.rpc_id " +
"LEFT JOIN sup_depart sd ON sd.id=ra.depart_id " +
"WHERE ra.apply_date BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " +
"AND ra.type=2;")
Integer countSubOneComfortPersonNumber(Date beginTime, Date endTime, Integer departId);
@Select("SELECT count(*) " +
"FROM rpc_infringer_result rir " +
"LEFT JOIN rpc_apply ra ON rir.rpc_id=ra.rpc_id " +
"LEFT JOIN sup_depart sd ON sd.id=ra.depart_id " +
"WHERE ra.apply_date BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " +
"AND ra.type=2;")
List<String> getSubOneHitPeople(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"COALESCE(SUM(rap.provide_relief),0) /10000 " +
"FROM rpc_apply_person rap " +
"LEFT JOIN rpc_apply ra ON rap.rpc_id=ra.rpc_id " +
"LEFT JOIN sup_depart sd ON sd.id=ra.depart_id " +
"WHERE ra.apply_date BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " +
"AND ra.type=2; ")
Double countSubOneComfortMoney(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"sdd.dict_label AS `name`, " +
"count(*) AS `value` " +
"FROM rpc_apply_person rap " +
"LEFT JOIN sup_police sp ON rap.emp_no=sp.emp_no " +
"LEFT JOIN sup_dict_data sdd on sdd.dict_value = sp.person_type AND sdd.dict_type='personType' " +
"LEFT JOIN sup_depart sd ON sp.org_id=sd.id " +
"WHERE rap.creat_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid = #{departId} " +
"GROUP BY sdd.dict_label " +
"HAVING `name` IS NOT NULL")
List<EchartsVo> getSubOnePoliceHurtSituation(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"injury_severity_name AS `name`, " +
"count(*) AS `value` " +
"FROM rpc_apply_person rap " +
"LEFT JOIN sup_police sp ON rap.emp_no=sp.emp_no " +
"LEFT JOIN sup_depart sd ON sp.org_id=sd.id " +
"WHERE rap.creat_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sp.person_type IN (1,3,4) " +
"AND injury_severity_name is NOT NULL " +
"AND sd.pid = #{departId} " +
"GROUP BY injury_severity_name ")
List<EchartsVo> getSubOnePoliceHurtType(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"Incident_link_name AS `name`, " +
"count(*) AS `value` " +
"FROM rpc_apply ra " +
"LEFT JOIN sup_depart sd ON ra.depart_id=sd.id " +
"WHERE ra.happen_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} " +
"GROUP BY Incident_link_name")
List<EchartsVo> getSubOneIncidentLink(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"sd.short_name AS `name`, " +
"count(*) AS `value` " +
"FROM rpc_apply ra " +
"LEFT JOIN sup_depart sd ON ra.depart_id=sd.id " +
"AND sd.`level`=3 " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"AND sd1.`level`=2 " +
"WHERE ra.happen_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd1.id=#{departId} " +
"GROUP BY sd.short_name " +
"HAVING `name` is NOT NULL ")
List<EchartsVo> getSubOneIncidentOrg(Date beginTime, Date endTime, Integer departId);
}

14
src/main/java/com/biutag/supervision/pojo/vo/MailOverviewVo.java

@ -2,17 +2,19 @@ package com.biutag.supervision.pojo.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Auther: sh
* @Date: 2024/12/4 09:30
* @Description: 信访投诉大屏中央数据总览
*/
@Data
public class MailOverviewVo {
private Integer totalMail;
private Integer countryMail;
private Integer policeMail;
private Integer numberMail;
private Integer manageMail;
public class MailOverviewVo implements Serializable {
private Long totalMail;
private Long countryMail;
private Long policeMail;
private Long numberMail;
private Long manageMail;
}

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

@ -0,0 +1,22 @@
package com.biutag.supervision.pojo.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Auther: sh
* @Date: 2024/12/24 16:43
* @Description:
*/
@Data
public class RightsComfortMapVo implements Serializable {
private String name;
private String departId;
private Integer totalCase; // 维权案件总数
private Integer victimPer; // 受侵害人数
private Integer comfortPer; // 抚慰人数
private Integer hitPro; // 打击处理人数
private Double comfortMon; // 抚慰金额
}

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

@ -30,8 +30,8 @@ public class CountyStreetDeptService {
return res;
}
public JSONObject getSubOneStreetMap(Integer departPId) {
List<CountyStreetDept> res = countyStreetDeptMapper.getSubOneStreetMap(departPId);
public JSONObject getSubOneStreetMap(Integer departId) {
List<CountyStreetDept> res = countyStreetDeptMapper.getSubOneStreetMap(departId);
Map<String, Object> geoJson = new HashMap<>();
geoJson.put("type", "FeatureCollection");
geoJson.put("name", "临时名字");

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

@ -131,20 +131,20 @@ public class DataGlobalService {
//region 右边
// 获取突出问题排名
public List<StrongProblemRank> getStrongProblemRank(Date beginTime, Date endTime) {
// 1.获取这段时间的negative id
List<StrongProblemRank> res = negativeProblemRelationMapper.selectStrongProblemRank(beginTime, endTime);
for (int i = 1; i <= res.size(); i++) {
res.get(i - 1).setSort(i);
}
return res;
}
// public List<StrongProblemRank> getStrongProblemRank(Date beginTime, Date endTime) {
// // 1.获取这段时间的negative id
// List<StrongProblemRank> res = negativeProblemRelationMapper.selectStrongProblemRank(beginTime, endTime);
// for (int i = 1; i <= res.size(); i++) {
// res.get(i - 1).setSort(i);
// }
// return res;
// }
// 获取问题类型占比
public List<EchartsVo> getProblemRate(Date beginTime, Date endTime) {
List<EchartsVo> res = negativeProblemRelationMapper.selectProblemRate(beginTime, endTime);
return res;
}
// public List<EchartsVo> getProblemRate(Date beginTime, Date endTime) {
// List<EchartsVo> res = negativeProblemRelationMapper.selectProblemRate(beginTime, endTime);
// return res;
// }
//endregion

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

@ -46,7 +46,6 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
private final DataPetition12337Mapper dataPetition12337Mapper;
private final SupDepartMapper supDepartMapper;
private final NegativeMapper negativeMapper;
public Page<DataPetitionComplaint> page(DataPetitionComplaintQueryParam queryParam) {
LambdaQueryWrapper<DataPetitionComplaint> queryWrapper = new LambdaQueryWrapper<>();
@ -141,79 +140,37 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
}
//所有分类数据总数
public JSONObject allMailCount(Date beginTime, Date endTime) {
public MailOverviewVo allMailCount(Date beginTime, Date endTime) {
MailOverviewVo temp = dataPetitionComplaintMapper.selectMailOverviewVo(beginTime, endTime);
// 国家信访
QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>();
countryQueryWrapper.eq("problem_sources_code", 21);
countryQueryWrapper.between("discovery_time", beginTime, endTime);
Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper);
System.out.println("国家信访数量:" + countryMail);
// 公安部信访
QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>();
policeQueryWrapper.eq("problem_sources_code", 22);
policeQueryWrapper.between("discovery_time", beginTime, endTime);
Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper);
System.out.println("公安部信访数量:" + policeMail);
// QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>();
// countryQueryWrapper.eq("problem_sources_code", 21);
// countryQueryWrapper.between("discovery_time", beginTime, endTime);
// Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper);
// System.out.println("国家信访数量:" + countryMail);
// // 公安部信访
// QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>();
// policeQueryWrapper.eq("problem_sources_code", 22);
// policeQueryWrapper.between("discovery_time", beginTime, endTime);
// Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper);
// System.out.println("公安部信访数量:" + policeMail);
// 12337信访
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
Long numberMail = dataPetition12337Mapper.selectCount(queryWrapper12337);
temp.setNumberMail(numberMail);
System.out.println("12337信访数量:" + numberMail);
Long manageMail = 5812L;
// 总数
long totalMail = countryMail + policeMail + numberMail;
JSONObject overview = new JSONObject()
// 信访总数(起)
.fluentPut("totalMail", totalMail)
// 国家信访
.fluentPut("countryMail", countryMail)
// 公安部信访
.fluentPut("policeMail", policeMail)
// 局长信箱
.fluentPut("manageMail", 5812)
// 12337信访
.fluentPut("numberMail", numberMail);
return overview;
temp.setTotalMail(temp.getCountryMail() + temp.getPoliceMail() + numberMail );
temp.setManageMail(manageMail);
return temp;
}
public List<EchartsVo> getMailTrend(Integer year, Integer type) {
List<EchartsVo> res = negativeMapper.getMailTrend(year, type);
return res;
}
public List<OrganizeProblemRankVo> getMailLeaderRank(Date beginTime, Date endTime, int groupId) {
List<OrganizeProblemRankVo> res = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, groupId);
return res;
}
public MailEntanglementMassOverviewVo getEntanglementAndMassOverview(Date beginTime, Date endTime) {
MailEntanglementMassOverviewVo res = dataPetitionComplaintMapper.getEntanglementAndMassOverview(beginTime, endTime);
return res;
}
public List<OrganizeProblemRankVo> getEntanglementMailRank(Date beginTime, Date endTime, int groupId) {
List<OrganizeProblemRankVo> res = dataPetitionComplaintMapper.getEntanglementMailRank(beginTime, endTime, groupId);
return res;
}
public List<OrganizeProblemRankVo> getMassMailRank(Date beginTime, Date endTime, int groupId) {
List<OrganizeProblemRankVo> res = dataPetitionComplaintMapper.getMassMailRank(beginTime, endTime, groupId);
return res;
}
public List<EchartsVo> getMailTrend12337(Integer year) {
List<EchartsVo> res = dataPetition12337Mapper.getMailTrend12337(year);
return res;
}
public List<MailMapIconVo> getMailMapIcon(Date beginTime, Date endTime) {
List<MailMapIconVo> res = new ArrayList<>();
// 查询所有区县局
List<SupDepart> supDeparts = supDepartMapper.selectDepartsByGroupType(COUNTY_CITY_BUREAUS.getId());
for (SupDepart supDepart : supDeparts) {
MailMapIconVo mapIconVo = new MailMapIconVo();
@ -227,7 +184,7 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
Integer policeTotal = dataPetitionComplaintMapper.selectMailBySourceCode(beginTime, endTime, GABXF.getValue(), departId);
// String commissionerTotal = dataPetitionComplaintMapper.selectMailBySourceCode(beginTime, endTime, JZXX.getValue(), departId);
Integer commissionerTotal = 0;
Integer numTotal = dataPetition12337Mapper.select12337MailBySourceCode(beginTime, endTime, departId);
Integer numTotal = dataPetition12337Mapper.select12337MailBySourceCode(beginTime, endTime, departId);
Integer total = countryTotal + policeTotal + commissionerTotal + numTotal;
// if (StringUtils.isAnyBlank(departId, total.toString() ))
re.setCountryTotal(countryTotal.toString());
@ -238,4 +195,20 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
}
return res;
}
public MailOverviewVo getSubOneAllMailCount(Date beginTime, Date endTime, Integer departId) {
MailOverviewVo temp = dataPetitionComplaintMapper.selectSubOneMailOverviewVo(beginTime, endTime, departId);
// 国家信访
// 12337信访
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.eq("second_depart_id", departId);
Long numberMail = dataPetition12337Mapper.selectCount(queryWrapper12337);
temp.setNumberMail(numberMail);
System.out.println("12337信访数量:" + numberMail);
Long manageMail = 0L;
// 总数
temp.setTotalMail(temp.getCountryMail() + temp.getPoliceMail() + numberMail );
temp.setManageMail(manageMail);
return temp;
}
}

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

@ -1,28 +1,31 @@
package com.biutag.supervision.service;
import com.biutag.supervision.mapper.RpcApplyMapper;
import com.biutag.supervision.mapper.SupDepartMapper;
import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.RpcInfringerResult;
import com.biutag.supervision.pojo.vo.ComfortCountVO;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.MailMapIconVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import com.biutag.supervision.pojo.vo.RightsComfortMapVo;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
import static com.biutag.supervision.constants.enums.DepartGroupEnum.COUNTY_CITY_BUREAUS;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.GABXF;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.GJXFPT;
@RequiredArgsConstructor
@Service
public class DataRightsComfortService {
private final RpcApplyService rpcApplyService;
private final RpcApplyPersonService rpcApplyPersonService;
private final RpcInfringerResultService rpcInfringerResultService;
private final RpcApplyMapper rpcApplyMapper;
private final SupDepartMapper supDepartMapper;
// 抚慰人数
public Integer countComfortPersonNumber(Date beginTime, Date endTime) {
@ -75,23 +78,50 @@ public class DataRightsComfortService {
}
public List<OrganizeProblemRankVo> getRightsRank(Date beginTime, Date endTime, Integer groupId) {
List<OrganizeProblemRankVo> res = rpcApplyMapper.getRightsRank(beginTime, endTime, groupId);
return res;
}
public List<EchartsVo> getPoliceHurtSituation(Date beginTime, Date endTime) {
List<EchartsVo> res = rpcApplyMapper.getPoliceHurtSituation(beginTime, endTime);
return res;
}
public List<EchartsVo> getIncidentLink(Date beginTime, Date endTime) {
List<EchartsVo> res =rpcApplyMapper.getIncidentLink(beginTime, endTime);
// 维权抚慰地图图标数据
public List<RightsComfortMapVo> getComfortMapIcon(Date beginTime, Date endTime) {
List<RightsComfortMapVo> res = new ArrayList<>();
// 查询所有区县局
List<SupDepart> supDeparts = supDepartMapper.selectDepartsByGroupType(COUNTY_CITY_BUREAUS.getId());
for (SupDepart supDepart : supDeparts) {
RightsComfortMapVo mapIconVo = new RightsComfortMapVo();
mapIconVo.setName(supDepart.getShortName());
mapIconVo.setDepartId(supDepart.getId());
res.add(mapIconVo);
}
for (RightsComfortMapVo re : res) {
String departId = re.getDepartId();
re.setTotalCase(0);
re.setHitPro(0);
re.setComfortPer(0);
re.setVictimPer(0);
re.setComfortMon(0.0);
}
return res;
}
public List<EchartsVo> getIncidentOrg(Date beginTime, Date endTime) {
List<EchartsVo> res =rpcApplyMapper.getIncidentOrg(beginTime, endTime);
return res;
// 打击处理人数
public Integer countSubOneHitPersonNumber(Date beginTime, Date endTime, Integer departId) {
List<String> hitPeople = rpcApplyMapper.getSubOneHitPeople(beginTime, endTime, departId);
int totalPeople = 0;
if (hitPeople == null || hitPeople.isEmpty()) {
return 0;
}
for (String hitPerson : hitPeople) {
if (hitPerson.isEmpty()) {
continue;
}
if (hitPerson.contains(",")) {
String[] people = hitPerson.split(",");
totalPeople += people.length;
} else {
totalPeople += 1;
}
}
return totalPeople;
}
}

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

@ -50,10 +50,10 @@ public class SubOneService {
// return res;
// }
public SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime) {
SubOneOverViewVo res = negativeMapper.getSubOneOverView(departPId, beginTime, endTime);
return res;
}
// public SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime) {
// SubOneOverViewVo res = negativeMapper.getSubOneOverView(departPId, beginTime, endTime);
// return res;
// }
}

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

@ -23,42 +23,19 @@
LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime, '%m') = m.`month`
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="getMailTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.monthName AS `name`,
SELECT m.month_name AS `name`,
IFNULL(COUNT(dpc.discovery_time), 0) AS `value`
FROM (SELECT '01' AS month, '1月' AS monthName
UNION ALL
SELECT '02', '2月'
UNION ALL
SELECT '03', '3月'
UNION ALL
SELECT '04', '4月'
UNION ALL
SELECT '05', '5月'
UNION ALL
SELECT '06', '6月'
UNION ALL
SELECT '07', '7月'
UNION ALL
SELECT '08', '8月'
UNION ALL
SELECT '09', '9月'
UNION ALL
SELECT '10', '10月'
UNION ALL
SELECT '11', '11月'
UNION ALL
SELECT '12', '12月') m
FROM sup_month_monthname m
LEFT JOIN
data_petition_complaint dpc on DATE_FORMAT(dpc.discovery_time, '%m') = m.month
AND YEAR(dpc.discovery_time) = #{year}
AND dpc.problem_sources_code = #{type}
GROUP BY m.monthName
GROUP BY m.month_name
ORDER BY m.month ASC;
</select>
<!-- 二级大屏的问题趋势(首页、现场、案件) -->
@ -89,6 +66,7 @@
GROUP BY m.month_name
ORDER BY m.month ASC;
</select>
<!-- 案件核查二级大屏的问题趋势-->
<select id="getSubOneCaseVerificationTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS `name`,

Loading…
Cancel
Save