From 922046354dd427419c16421ffb38432daea7aa60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E7=88=B1=E5=AD=A6=E4=B9=A0=E7=9A=84=E7=9F=B3?= =?UTF-8?q?=E5=90=8C=E5=AD=A6?= <2936013465@qq.com> Date: Wed, 18 Dec 2024 20:42:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=88=E4=BB=B6=E6=A0=B8=E6=9F=A5=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E5=A4=A7=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav/DataGlobalController.java | 19 +- .../subdatav/SubOneCaseVerifController.java | 181 +++++++++++++++ ...oller.java => SubOneGlobalController.java} | 43 +--- .../SubOneSupervisionNotifyController.java | 213 +++++++++--------- .../SubOneVideoSuperviseController.java | 21 +- .../supervision/mapper/NegativeMapper.java | 209 +++++++++++++++-- .../supervision/pojo/vo/GlobalOverViewVo.java | 19 ++ .../service/CountyStreetDeptService.java | 31 ++- .../SubOneSupervisionNotifyService.java | 4 +- src/main/resources/mapper/NegativeMapper.xml | 25 +- 10 files changed, 575 insertions(+), 190 deletions(-) create mode 100644 src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java rename src/main/java/com/biutag/supervision/controller/subdatav/{SubOneController.java => SubOneGlobalController.java} (82%) create mode 100644 src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java b/src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java index 666b46a..2c84a00 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java @@ -1,12 +1,11 @@ package com.biutag.supervision.controller.datav; +import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSONObject; +import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.pojo.Result; -import com.biutag.supervision.pojo.vo.EchartsVo; -import com.biutag.supervision.pojo.vo.GlobalMapIconVo; -import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; -import com.biutag.supervision.pojo.vo.StrongProblemRank; +import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.service.DataGlobalService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -38,7 +37,7 @@ public class DataGlobalController { private final DataGlobalService dataGlobalService; - + private final NegativeMapper negativeMapper; //region 左边 /** @@ -51,7 +50,6 @@ public class DataGlobalController { @GetMapping("/getOrganizationRank") public Result getOrganizationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - // 机构问题排名 fxsjlist中必有所有机构,不会为空 List fxsjlist = dataGlobalService.getOrganizeProblemRank(3, beginTime, endTime); List jsdwlist = dataGlobalService.getOrganizeProblemRank(4, beginTime, endTime); JSONObject res = new JSONObject() @@ -92,7 +90,8 @@ public class DataGlobalController { public Result getAllGlobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 获取数据大屏中央总数概览 - JSONObject overview = dataGlobalService.getAllGlobalCount(beginTime, endTime); + GlobalOverViewVo overview= negativeMapper.getAllGlobalCount(beginTime, endTime); +// JSONObject overview = dataGlobalService.getAllGlobalCount(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("overview", overview); return Result.success(data); } @@ -108,10 +107,10 @@ public class DataGlobalController { @Cacheable(cacheNames = "globalMap", key = "'p_'+ #endTime") public Result getMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { -// System.out.println("Cache key: p_" + endTime); // 地图数据 - List GlobalTempMapVoList = Optional.ofNullable(dataGlobalService.getMapIconInfo(beginTime, endTime)). - orElseGet(ArrayList::new); + List GlobalTempMapVoList = negativeMapper.getMapIcon(beginTime, endTime); +// List GlobalTempMapVoList = Optional.ofNullable(dataGlobalService.getMapIconInfo(beginTime, endTime)). +// orElseGet(ArrayList::new); JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", GlobalTempMapVoList); return Result.success(data); } diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java new file mode 100644 index 0000000..513868c --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java @@ -0,0 +1,181 @@ +package com.biutag.supervision.controller.subdatav; + +import com.alibaba.fastjson.JSONObject; +import com.biutag.supervision.mapper.DataCaseVerifMapper; +import com.biutag.supervision.mapper.NegativeMapper; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.vo.CaseVerificationCountVo; +import com.biutag.supervision.pojo.vo.CaseVerificationMapVo; +import com.biutag.supervision.pojo.vo.EchartsVo; +import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; +import io.swagger.v3.oas.annotations.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; + +import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*; +import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SJJB; + +/** + * @Auther: sh + * @Date: 2024/12/17 20:28 + * @Description: 二级大屏案件核查 + */ +@Tag(name = "二级大屏案件核查") +@RequestMapping("datav/sub1/caseVerif") +@RequiredArgsConstructor +@RestController +@Slf4j +public class SubOneCaseVerifController { + private final NegativeMapper negativeMapper; + private final DataCaseVerifMapper dataCaseVerifMapper; + + + /** + * 案件核查大屏分县市局排名 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result + */ + @GetMapping("/getSubOneCaseVerificationRank") + public Result getSubOneCaseVerificationRank(@RequestParam Integer departId, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + List fxsjRankList = negativeMapper.getPoliceCaseVerificationRank(beginTime, endTime, departId); + List jsdwRankList = negativeMapper.getTeamCaseVerificationRank(beginTime, endTime, departId); + JSONObject data = new JSONObject() + .fluentPut("fxsjRankList", fxsjRankList) + .fluentPut("jsdwRankList", jsdwRankList); + return Result.success(data); + } + + /** + * 案件问题类型 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result + */ + @GetMapping("/getSubOneCaseProblemProperty") + public Result getCaseProblemProperty(@RequestParam Integer departId, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + List zfbaPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId, 6); // 执法办案 + List fwglPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId,11); // 服务管理 +// List jgjjPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 6); // 警规 + JSONObject data = new JSONObject() + .fluentPut("zfbaPieList", zfbaPieList) + .fluentPut("fwglPieList", fwglPieList); + return Result.success(data); + } + // endregion + + + // region 中间 + + /** + * 案件核查大屏中央数据总览 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result + */ + @GetMapping("/getSubOneAllCaseVerificationCount") + public Result getSubOneAllCaseVerificationCount(@RequestParam Integer departId, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + CaseVerificationCountVo overview = negativeMapper.getSuboOneAllCaseVerificationCount(beginTime, endTime, departId); + JSONObject res = new JSONObject().fluentPut("overview", overview); + return Result.success(res); + } + + + /** + * 案件核查大屏地图 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result + */ +// @GetMapping("/getCaseVerificationMap") +// @Cacheable(cacheNames = "CaseVerificationMap", key = "'p_'+ #endTime") +// public Result getCaseVerificationMap(@RequestParam Integer departId, +// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, +// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { +// List caseVerificationMapList = negativeMapper.getCaseVerificationMap(beginTime, endTime); +// JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList); +// return Result.success(res); +// } + + /** + * 查处问题趋势 + * + * @param year 年份 + * @return Result + */ + @GetMapping("/getSubOneCaseVerificationTrend") + public Result getSubOneCaseVerificationTrend(@RequestParam String departId, + @RequestParam Integer year) { + List proTrendList = negativeMapper.getSubOneCaseVerificationTrend(String.valueOf(year), departId, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); + JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList); + return Result.success(data); +// return null; + } +// endregion + + + // region 右边 + + /** + * 案件来源占比 和 问责处理情况 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result + */ + @GetMapping("/getSubOneCaseSourceRateAndDealSituation") + public Result getSubOneCaseSourceRateAndDealSituation(@RequestParam Integer departId, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + List caseSourceRateList = negativeMapper.getSuboOneCaseSourceRate(beginTime, endTime, departId); + List dealSituationPieList = negativeMapper.getSubOneDealSituation(beginTime, endTime, departId); + JSONObject data = new JSONObject() + .fluentPut("caseSourceRateList", caseSourceRateList) + .fluentPut("dealSituationPieList", dealSituationPieList); + return Result.success(data); +// return null; + } + + + /** + * 禁闭处理情况 和 停职处理情况 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result + */ + @GetMapping("/getSubOneConfinementAndPause") + public Result getSubOneConfinement(@RequestParam Integer departId, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { +// List jbclList = negativeMapper.getSubOneConfinementAndPause(beginTime, endTime,departId, 1); // 禁闭 +// List tzclList = negativeMapper.getSubOneConfinementAndPause(beginTime, endTime, departId,2); // 停职 +// JSONObject data = new JSONObject() +// .fluentPut("jbclList", jbclList) +// .fluentPut("tzclList", tzclList); +// return Result.success(data); + return Result.success(null); + } + + +} + diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java similarity index 82% rename from src/main/java/com/biutag/supervision/controller/subdatav/SubOneController.java rename to src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java index 974de38..a21d680 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java @@ -2,19 +2,16 @@ package com.biutag.supervision.controller.subdatav; import com.alibaba.fastjson.JSONObject; import com.biutag.supervision.pojo.Result; -import com.biutag.supervision.pojo.entity.CountyStreetDept; import com.biutag.supervision.pojo.vo.EchartsVo; -import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; import com.biutag.supervision.pojo.vo.RankVo; import com.biutag.supervision.pojo.vo.SubOneOverViewVo; import com.biutag.supervision.service.CountyStreetDeptService; -import com.biutag.supervision.service.NegativeService; import com.biutag.supervision.service.SubOneService; -import com.google.gson.Gson; 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; @@ -35,13 +32,13 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*; @RequiredArgsConstructor @RestController @Slf4j -public class SubOneController { +public class SubOneGlobalController { private final CountyStreetDeptService countyStreetDeptService; private final SubOneService subOneService; - // region右边 + // region左边 @Operation(summary = "获取首页二级大屏督察问题排名") @GetMapping("/getSubOneSupervisionRank") public Result getSubOneSupervisionRank(@RequestParam Integer departPId, @@ -63,14 +60,15 @@ public class SubOneController { // endregion -// region 中间 + // region 中间 /** * 获取首页二级大屏总览 + * * @param departPId 2级单位的id * @param beginTime 开始时间 - * @param endTime 结束时间 + * @param endTime 结束时间 * @return */ @Operation(summary = "获取首页二级大屏总览") @@ -80,7 +78,7 @@ public class SubOneController { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { SubOneOverViewVo subOneOverViewVo = subOneService.getSubOneOverView(departPId, beginTime, endTime); JSONObject jsonObject = new JSONObject(); - jsonObject.fluentPut("subOneOverViewVo",subOneOverViewVo); + jsonObject.fluentPut("subOneOverViewVo", subOneOverViewVo); return Result.success(jsonObject); } @@ -116,31 +114,10 @@ public class SubOneController { */ @Operation(summary = "获取二级大屏地图JSON") @GetMapping("/getSubOneStreetMap") + @Cacheable(cacheNames = "subOneStreetMap", key = "'p_'+ #departPId") public Result getSubOneStreetMap(@RequestParam Integer departPId) { - List depts = countyStreetDeptService.getSubOneStreetMap(departPId); - Map geoJson = new HashMap<>(); - geoJson.put("type", "FeatureCollection"); - geoJson.put("name", "临时名字"); - - List> features = new ArrayList<>(); - for (CountyStreetDept dept : depts) { - Map feature = new HashMap<>(); - feature.put("type", "Feature"); // 第一个键值 - - Map properties = new HashMap<>(); - properties.put("name", dept.getName()); - properties.put("id", dept.getId()); - feature.put("properties", properties); // 第二个键值 -// log.info("===========现在的id是=============="); -// log.info(dept.getId().toString()); - - feature.put("geometry", new Gson().fromJson(dept.getGeometry(), Object.class)); // 第三个键值 - features.add(feature); - } - geoJson.put("features", features); - JSONObject jsonObject = new JSONObject(); - jsonObject.put("geoJson", geoJson); - return Result.success(jsonObject); + JSONObject res = countyStreetDeptService.getSubOneStreetMap(departPId); + return Result.success(res); } // endregion diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java index c68c528..1e67d93 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java @@ -1,6 +1,7 @@ package com.biutag.supervision.controller.subdatav; import com.alibaba.fastjson.JSONObject; +import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.service.DataSupervisionNotifyServiceImpl; @@ -26,7 +27,7 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.ZXDC; /** * @Auther: sh * @Date: 2024/12/17 10:58 - * @Description: 二级现场督察大屏相关 + * @Description: 二级大屏现场督察 */ @Slf4j @RestController @@ -38,6 +39,7 @@ public class SubOneSupervisionNotifyController { private final SubOneSupervisionNotifyService subOneSupervisionNotifyService; + private final NegativeMapper negativeMapper; // region 左边 /** @@ -85,13 +87,13 @@ public class SubOneSupervisionNotifyController { // region 中间 /** - * 大屏中央数据 + * 大屏中央总览数据 * * @param beginTime 开始时间 * @param endTime 结束时间 * @return */ - @Operation(summary = "大屏中央数据") + @Operation(summary = "大屏中央总览数据") @GetMapping("/getAllSubOneSupervisionNotifyCount") public Result getAllSubOneSupervisionNotifyCount(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @@ -100,22 +102,7 @@ public class SubOneSupervisionNotifyController { JSONObject data = new JSONObject().fluentPut("overview", overview); return Result.success(data); } -// /** -// * 地图数据 -// * -// * @param beginTime 开始时间 -// * @param endTime 结束时间 -// * @return List -// */ -// @GetMapping("/getMap") -// @Cacheable(cacheNames = "superviseMap", key = "'p_'+ #endTime") -// public Result getMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, -// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { -// //地图数据 -// List superviseTempMapVoList = dataSupervisionNotifyService.getSupervisionMapIconInfo(beginTime, endTime); -// JSONObject data = new JSONObject().fluentPut("superviseTempMapVoList", superviseTempMapVoList); -// return Result.success(data); -// } + /** * 获取现场督察问题趋势 @@ -142,102 +129,106 @@ public class SubOneSupervisionNotifyController { * @param endTime 结束时间 * @return JSONObject */ - @GetMapping("/getYellowBetDrug") + @GetMapping("/getSubOneYellowBetDrug") public Result getYellowBetDrug(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { -// // 黄赌毒总览 -// DayTimeSuperviseVo fxsjYellowBetOverview = subOneSupervisionNotifyService.getSubOneYellowBetOverview(beginTime, endTime, departId, 1); -// DayTimeSuperviseVo jsdwYellowBetOverview = subOneSupervisionNotifyService.getSubOneYellowBetOverview(beginTime, endTime, departId, 1); -// // 黄毒赌列表 -// List fxsjYellowBetRankList = subOneSupervisionNotifyService.getSubOneYellowBetRankList(beginTime, endTime, departId, 1); -// List jsdwYellowBetRankList = subOneSupervisionNotifyService.getSubOneYellowBetRankList(beginTime, endTime, departId, 1); -// -// JSONObject data = new JSONObject() -// .fluentPut("fxsjYellowBetOverview", fxsjYellowBetOverview) -// .fluentPut("jsdwYellowBetOverview", jsdwYellowBetOverview) -// .fluentPut("fxsjYellowBetRankList", fxsjYellowBetRankList) -// .fluentPut("jsdwYellowBetRankList", jsdwYellowBetRankList); - return Result.success(null); + // 黄赌毒总览 + DayTimeSuperviseVo fxsjYellowBetOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 1); + DayTimeSuperviseVo jsdwYellowBetOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 1); + // 黄毒赌列表 + List fxsjYellowBetRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, 1); + List jsdwYellowBetRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, 1); + + JSONObject data = new JSONObject() + .fluentPut("fxsjYellowBetOverview", fxsjYellowBetOverview) + .fluentPut("jsdwYellowBetOverview", jsdwYellowBetOverview) + .fluentPut("fxsjYellowBetRankList", fxsjYellowBetRankList) + .fluentPut("jsdwYellowBetRankList", jsdwYellowBetRankList); + return Result.success(data); + } + + + // 枪支管理数据 + @GetMapping("/getSubOneGunController") + public Result getSubOneGunController(@RequestParam Integer departId, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + // 枪支管理总览 + DayTimeSuperviseVo fxsjGunControllerOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 2); + DayTimeSuperviseVo jsdwGunControllerOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 2); + // 枪支管理列表 + List fxsjGunControllerRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, 2); + List jsdwGunControllerRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, 2); + + JSONObject data = new JSONObject() + .fluentPut("fxsjGunControllerOverview", fxsjGunControllerOverview) + .fluentPut("jsdwGunControllerOverview", jsdwGunControllerOverview) + .fluentPut("fxsjGunControllerRankList", fxsjGunControllerRankList) + .fluentPut("jsdwGunControllerRankList", jsdwGunControllerRankList); + return Result.success(data); + } + + // 涉企问题数据 + @GetMapping("/getSubOneCompanyProblem") + public Result getSubOneCompanyProblem(@RequestParam Integer departId, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + // 涉企问题总览 + DayTimeSuperviseVo fxsjCompanyProblemOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 3); + DayTimeSuperviseVo jsdwCompanyProblemOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 3); + // 涉企问题列表 + List fxsjCompanyProblemRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, 3); + List jsdwCompanyProblemRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, 3); + + JSONObject data = new JSONObject() + .fluentPut("fxsjCompanyProblemOverview", fxsjCompanyProblemOverview) + .fluentPut("jsdwCompanyProblemOverview", jsdwCompanyProblemOverview) + .fluentPut("fxsjCompanyProblemRankList", fxsjCompanyProblemRankList) + .fluentPut("jsdwCompanyProblemRankList", jsdwCompanyProblemRankList); + return Result.success(data); + } + + // 执法办案数据 + @GetMapping("/getSubOneHandleCase") + public Result getSubOneHandleCase(@RequestParam Integer departId, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + // 执法办案总览 + DayTimeSuperviseVo fxsjHandleCaseOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 4); + DayTimeSuperviseVo jsdwHandleCaseOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 4); + // 执法办案列表 + List fxsjHandleCaseRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, 4); + List jsdwHandleCaseRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, 4); + + JSONObject data = new JSONObject() + .fluentPut("fxsjHandleCaseOverview", fxsjHandleCaseOverview) + .fluentPut("jsdwHandleCaseOverview", jsdwHandleCaseOverview) + .fluentPut("fxsjHandleCaseRankList", fxsjHandleCaseRankList) + .fluentPut("jsdwHandleCaseRankList", jsdwHandleCaseRankList); + return Result.success(data); + } + + + // 工作日测酒数据 + @GetMapping("/getSubOneCheckBeer") + public Result getSubOneCheckBeer(@RequestParam Integer departId, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + // 工作日测酒总览 + DayTimeSuperviseVo fxsjCheckBeerOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 5); + DayTimeSuperviseVo jsdwCheckBeerOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 5); + // 工作日测酒列表 + List fxsjCheckBeerRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, 5); + List jsdwCheckBeerRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, 5); + + JSONObject data = new JSONObject() + .fluentPut("fxsjCheckBeerOverview", fxsjCheckBeerOverview) + .fluentPut("jsdwCheckBeerOverview", jsdwCheckBeerOverview) + .fluentPut("fxsjCheckBeerRankList", fxsjCheckBeerRankList) + .fluentPut("jsdwCheckBeerRankList", jsdwCheckBeerRankList); + return Result.success(data); } -// -// -// // 枪支管理数据 -// @GetMapping("/getGunController") -// public Result getGunController(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, -// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { -// // 枪支管理总览 -// DayTimeSuperviseVo fxsjGunControllerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 2); -// DayTimeSuperviseVo jsdwGunControllerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 2); -// // 枪支管理列表 -// List fxsjGunControllerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 2); -// List jsdwGunControllerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 2); -// -// JSONObject data = new JSONObject() -// .fluentPut("fxsjGunControllerOverview", fxsjGunControllerOverview) -// .fluentPut("jsdwGunControllerOverview", jsdwGunControllerOverview) -// .fluentPut("fxsjGunControllerRankList", fxsjGunControllerRankList) -// .fluentPut("jsdwGunControllerRankList", jsdwGunControllerRankList); -// return Result.success(data); -// } -// -// // 涉企问题数据 -// @GetMapping("/getCompanyProblem") -// public Result getCompanyProblem(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, -// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { -// // 涉企问题总览 -// DayTimeSuperviseVo fxsjCompanyProblemOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 3); -// DayTimeSuperviseVo jsdwCompanyProblemOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 3); -// // 涉企问题列表 -// List fxsjCompanyProblemRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 3); -// List jsdwCompanyProblemRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 3); -// -// JSONObject data = new JSONObject() -// .fluentPut("fxsjCompanyProblemOverview", fxsjCompanyProblemOverview) -// .fluentPut("jsdwCompanyProblemOverview", jsdwCompanyProblemOverview) -// .fluentPut("fxsjCompanyProblemRankList", fxsjCompanyProblemRankList) -// .fluentPut("jsdwCompanyProblemRankList", jsdwCompanyProblemRankList); -// return Result.success(data); -// } -// -// // 执法办案数据 -// @GetMapping("/getHandleCase") -// public Result getHandleCase(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, -// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { -// // 执法办案总览 -// DayTimeSuperviseVo fxsjHandleCaseOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 4); -// DayTimeSuperviseVo jsdwHandleCaseOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 4); -// // 执法办案列表 -// List fxsjHandleCaseRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 4); -// List jsdwHandleCaseRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 4); -// -// JSONObject data = new JSONObject() -// .fluentPut("fxsjHandleCaseOverview", fxsjHandleCaseOverview) -// .fluentPut("jsdwHandleCaseOverview", jsdwHandleCaseOverview) -// .fluentPut("fxsjHandleCaseRankList", fxsjHandleCaseRankList) -// .fluentPut("jsdwHandleCaseRankList", jsdwHandleCaseRankList); -// return Result.success(data); -// } -// -// -// // 工作日测酒数据 -// @GetMapping("/getCheckBeer") -// public Result getCheckBeer(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, -// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { -// // 工作日测酒总览 -// DayTimeSuperviseVo fxsjCheckBeerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 5); -// DayTimeSuperviseVo jsdwCheckBeerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 5); -// // 工作日测酒列表 -// List fxsjCheckBeerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 5); -// List jsdwCheckBeerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 5); -// -// JSONObject data = new JSONObject() -// .fluentPut("fxsjCheckBeerOverview", fxsjCheckBeerOverview) -// .fluentPut("jsdwCheckBeerOverview", jsdwCheckBeerOverview) -// .fluentPut("fxsjCheckBeerRankList", fxsjCheckBeerRankList) -// .fluentPut("jsdwCheckBeerRankList", jsdwCheckBeerRankList); -// return Result.success(data); -// } // endregion diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java index 8ec3354..bf55626 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java @@ -23,9 +23,9 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SPDC; /** * @Auther: sh * @Date: 2024/12/16 17:12 - * @Description: + * @Description: 二级大屏视频督察 */ -@Tag(name = "视频督察子屏", description = "视频督察子屏") +@Tag(name = "二级大屏视频督察", description = "二级大屏视频督察") @RestController @RequiredArgsConstructor @RequestMapping("datav/sub1/videoSupervise") @@ -33,13 +33,13 @@ public class SubOneVideoSuperviseController { private final SubOneVideoSuperviseService subOneVideoSuperviseService; - + // region 左边 @Operation(summary = "视频督察二级大屏问题数排名") @GetMapping("/getSubOneVideoSuperviseProblemRank") public Result getSubOneVideoSuperviseProblemRank(@RequestParam Integer departId, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { List policeVideoSuperviseProblemRankList = subOneVideoSuperviseService.getSuboOneVideoSuperviseProblemRank(beginTime, endTime, 10, departId); List teamVideoSuperviseProblemRankList = subOneVideoSuperviseService.getSuboOneVideoSuperviseProblemRank(beginTime, endTime, -1, departId); JSONObject data = new JSONObject(); @@ -47,7 +47,10 @@ public class SubOneVideoSuperviseController { data.fluentPut("teamVideoSuperviseProblemRankList", teamVideoSuperviseProblemRankList); return Result.success(data); } + // endregion + + // region 中间 /** * 视频督察二级大屏中央总览数据 @@ -75,17 +78,19 @@ public class SubOneVideoSuperviseController { return Result.success(jsonObject); } + // endregion + // region 右边 @Operation(summary = "视频督察二级数据大屏问题类型占比") @GetMapping("/getSubOneVideoSuperviseProblemTypeRate") public Result getSubOneVideoSuperviseProblemTypeRate(@RequestParam Integer departId, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { List subOneVideoSuperviseProblemTypeRate = subOneVideoSuperviseService.getSubOneVideoSuperviseProblemTypeRate(departId, beginTime, endTime); JSONObject jsonObject = new JSONObject().fluentPut("subOneVideoSuperviseProblemTypeRate", subOneVideoSuperviseProblemTypeRate); return Result.success(jsonObject); } - + // endregion } diff --git a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java index 4885a64..ac26289 100644 --- a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java @@ -25,8 +25,7 @@ public interface NegativeMapper extends BaseMapper { "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " + "LEFT JOIN sup_depart sd1 ON sd.pid= sd1.id " + - "WHERE ng.checkStatus<>3 " + - "AND ng.problemSourcesCode IN (2, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25) " + + "WHERE ng.problemSourcesCode IN (2, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30) " + "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND sd1.statistics_group_id = #{groupType} " + "GROUP BY sd1.short_name " + @@ -41,6 +40,38 @@ public interface NegativeMapper extends BaseMapper { List selectBusinessRate(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 (26),1, 0) ) AS auditPro " + + "FROM negative ng WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} ") + GlobalOverViewVo getAllGlobalCount(Date beginTime, Date endTime); + + + // 地图卡片 + @Select("SELECT " + + "sd1.short_name AS `name`, " + + "sd1.id AS departId, " + + "COUNT( DISTINCT ng.id ) AS totalPro, " + + "SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisePro, " + + "SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerifyPro, " + + "SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS mailPro, " + + "SUM( IF(problemSourcesCode IN (2),1, 0) ) AS policePro, " + + "SUM( IF(problemSourcesCode IN (26),1, 0) ) AS reviewPro " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND sd1.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 sd1.short_name " + + "ORDER BY totalPro DESC;") + List 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 " + @@ -199,7 +230,6 @@ public interface NegativeMapper extends BaseMapper { // endregion - // region 视频督察大屏 @Select("SELECT " + "COUNT(DISTINCT ng.id) AS discoverProblem, " + @@ -283,7 +313,7 @@ public interface NegativeMapper extends BaseMapper { "COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " + "FROM negative ng " + - "INNER JOIN negative_blame nb ON ng.id=nb.negativeId " + + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + "AND problemSourcesCode in (17, 18, 19, 20) ") CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime); @@ -342,7 +372,7 @@ public interface NegativeMapper extends BaseMapper { // endregion - // region 首页大屏的子屏 + // region 二级大屏首页大屏 List getCaseVerifyRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String[] args); SubOneOverViewVo getCaseVerifyOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String[] args); @@ -367,18 +397,7 @@ public interface NegativeMapper extends BaseMapper { SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime); // endregion - @Select("SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " + - "COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) AS changedProblem, " + - "COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " + - "COUNT(DISTINCT nb.blameName) AS relativePer, " + - "IFNULL( ROUND((COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS changedRate " + - "FROM sup_depart sd " + - "INNER JOIN negative ng ON sd.id = ng.involveDepartId AND sd.pid=#{departId} " + - "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + - "WHERE ng.checkStatus IN ('1','2') " + - "AND problemSourcesCode = 16 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") - VideoSuperviseCountVo getSubOneAllVideoSuperviseCount(Date beginTime, Date endTime, Integer departId); + // region 二级大屏视频督察 @Select("SELECT sd.short_name AS label, " + "count(*) as `value` " + @@ -404,9 +423,21 @@ public interface NegativeMapper extends BaseMapper { "ORDER BY `value` DESC ") List getSuboOneVideoSuperviseTeamProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId); - List getSubOneVideoSuperviseTrend(String year, String problemCode, String departId); + @Select("SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " + + "COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) AS changedProblem, " + + "COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " + + "COUNT(DISTINCT nb.blameName) AS relativePer, " + + "IFNULL( ROUND((COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS changedRate " + + "FROM sup_depart sd " + + "INNER JOIN negative ng ON sd.id = ng.involveDepartId AND sd.pid=#{departId} " + + "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + + "WHERE ng.checkStatus IN ('1','2') " + + "AND problemSourcesCode = 16 " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") + VideoSuperviseCountVo getSubOneAllVideoSuperviseCount(Date beginTime, Date endTime, Integer departId); + @Select("SELECT npr.threeLevelContent AS `name`, " + "COUNT(*) AS `value` " + "FROM negative ng " + @@ -419,6 +450,10 @@ public interface NegativeMapper extends BaseMapper { "GROUP BY npr.threeLevelContent ") List getSubOneVideoSuperviseProblemTypeRate(Integer departId, Date beginTime, Date endTime); + + // endregion + + // region 二级大屏现场督察 @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, " + @@ -494,6 +529,7 @@ public interface NegativeMapper extends BaseMapper { "AND problemSourcesCode IN (13, 15)") SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount(Integer departId, Date beginTime, Date endTime); + @Select("SELECT m.month_name AS `name`, IFNULL(COUNT(temp.id), 0) AS `value` FROM sup_month_monthname m " + "LEFT JOIN " + "( " + @@ -503,4 +539,141 @@ public interface NegativeMapper extends BaseMapper { "GROUP by m.month_name " + "ORDER BY m.month ASC;") List getSubOneSupervisionTrend(Integer departId, String year); + + + @Select("SELECT count(DISTINCT(ng.id)) as proTotal, " + + "count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " + + "count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " + + "ROUND( count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) )/ count(DISTINCT(ng.id)) *100 , 1 ) AS rate " + + "FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE sd.pid=#{departId} " + + "AND sd.statistics_group_id =10 " + + "AND ng.checkStatus != 3 " + + "AND ng.problemSourcesCode =15 " + + "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND special_supervision=#{specialType} ") + DayTimeSuperviseVo getSubOnePoliceYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType); + + @Select("SELECT count(DISTINCT(ng.id)) as proTotal, " + + "count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " + + "count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " + + "ROUND( count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) )/ count(DISTINCT(ng.id)) *100 , 1 ) AS rate " + + "FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE sd.pid=#{departId} " + + "AND sd.statistics_group_id !=10 " + + "AND ng.checkStatus != 3 " + + "AND ng.problemSourcesCode =15 " + + "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND special_supervision=#{specialType} ") + DayTimeSuperviseVo getSubOneTeamYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType); + + @Select("SELECT sd.short_name AS label, " + + "COUNT(DISTINCT ng.id ) AS `value` " + + "FROM negative ng " + + "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "AND sd.pid = #{departId} AND sd.statistics_group_id=10 " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.checkStatus<>3 " + + "AND ng.problemSourcesCode = 15 " + + "AND special_supervision = #{specialType} " + + "GROUP BY label " + + "ORDER BY `value` DESC; ") + List getSubOnePoliceYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType); + + @Select("SELECT sd.short_name AS label, " + + "COUNT(DISTINCT ng.id ) AS `value` " + + "FROM negative ng " + + "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "AND sd.pid = #{departId} AND sd.statistics_group_id!=10 " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.checkStatus<>3 " + + "AND ng.problemSourcesCode = 15 " + + "AND special_supervision = #{specialType} " + + "GROUP BY label " + + "ORDER BY `value` DESC; ") + List getSubOneTeamYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType); + + + // endregion + + // region 二级大屏案件核查 + @Select("SELECT sd.short_name AS label, " + + "COUNT(DISTINCT ng.id ) AS `value` " + + "FROM negative ng " + + "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " + + "WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND sd.statistics_group_id=10 " + + "AND problemSourcesCode IN (17,18,19,20) " + + "AND ng.checkStatus <>3 " + + "GROUP BY sd.short_name " + + "ORDER BY `value` DESC") + List getPoliceCaseVerificationRank(Date beginTime, Date endTime, Integer departId); + + @Select("SELECT sd.short_name AS label, " + + "COUNT(DISTINCT ng.id ) AS `value` " + + "FROM negative ng " + + "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " + + "WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND sd.statistics_group_id!=10 " + + "AND problemSourcesCode IN (17,18,19,20) " + + "AND ng.checkStatus <>3 " + + "GROUP BY sd.short_name " + + "ORDER BY `value` DESC") + List getTeamCaseVerificationRank(Date beginTime, Date endTime, Integer departId); + + @Select("SELECT npr.threeLevelContent AS label, " + + "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.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.businessTypeCode = #{businessType} " + + "GROUP BY npr.threeLevelContent " + + "ORDER BY `value` DESC ") + List getCaseProblemProperty(Date beginTime, Date endTime, Integer departId, Integer businessType); + + @Select("SELECT COUNT(DISTINCT ng.id ) AS total, " + + "COUNT( DISTINCT IF(ng.checkStatus<>3, ng.id, NULL ) ) AS confirmed, " + + "COUNT( DISTINCT IF(nb.handleResultCode!=14, nb.blameId, NULL) ) AS dealCasePro, " + + "COUNT( DISTINCT nb.blameName ) AS punishPre, " + + "COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " + + "IFNULL(( COUNT( DISTINCT IF(ng.checkStatus<>3, ng.id, NULL ) )/COUNT(DISTINCT ng.id*100 , 1) ) ,0 ) as rate " + + "FROM negative ng " + + "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + + "WHERE ng.problemSourcesCode IN (17,18,19,20) " + + "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND sd.pid=#{departId} ") + CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId); + + @Select("SELECT sdps.label AS `name` , " + + "COUNT( DISTINCT ng.id ) AS `value` " + + "FROM negative ng " + + "LEFT JOIN sup_dict_problem_source sdps ON ng.problemSourcesCode= sdps.id " + + "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " + + "WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (17,18,19,20) " + + "GROUP BY sdps.label") + List getSuboOneCaseSourceRate(Date beginTime, Date endTime, Integer departId); + + @Select("SELECT nb.handleResultName AS `name`, " + + "COUNT( DISTINCT nb.blameId ) AS `value` " + + "FROM negative ng " + + "inner JOIN sup_depart sd on ng.involveDepartId=sd.id AND sd.pid=#{departId} " + + "INNER JOIN negative_blame nb ON ng.id=nb.negativeId " + + "WHERE nb.handleResultName IS NOT NULL " + + "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (17,18,19,20) " + + "AND ng.checkStatus <>3 " + + "GROUP BY nb.handleResultName") + List getSubOneDealSituation(Date beginTime, Date endTime, Integer departId); + + List getSubOneCaseVerificationTrend(String year, String departId, String... args); + + + + + // endregion } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java b/src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java new file mode 100644 index 0000000..a0737b8 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java @@ -0,0 +1,19 @@ +package com.biutag.supervision.pojo.vo; + +import lombok.Data; + +/** + * @Auther: sh + * @Date: 2024/12/18 18:20 + * @Description: 首页大屏总览 + */ +@Data +public class GlobalOverViewVo { + Long supervisionPro; + Long caseVerificationPro; + Long complaintPro; + Long talkPro; // 民意感知 + Long auditPro; + Long totalPro; +} + diff --git a/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java b/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java index c757e23..b8a24b4 100644 --- a/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java +++ b/src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java @@ -1,13 +1,18 @@ package com.biutag.supervision.service; +import com.alibaba.fastjson.JSONObject; import com.biutag.supervision.mapper.CountyStreetDeptMapper; import com.biutag.supervision.pojo.entity.CountyStreetDept; import com.biutag.supervision.pojo.vo.RankVo; +import com.google.gson.Gson; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * @author 舒云 @@ -25,9 +30,31 @@ public class CountyStreetDeptService { return res; } - public List getSubOneStreetMap(Integer departPId) { + public JSONObject getSubOneStreetMap(Integer departPId) { List res = countyStreetDeptMapper.getSubOneStreetMap(departPId); - return res; + Map geoJson = new HashMap<>(); + geoJson.put("type", "FeatureCollection"); + geoJson.put("name", "临时名字"); + + List> features = new ArrayList<>(); + for (CountyStreetDept dept : res) { + Map feature = new HashMap<>(); + feature.put("type", "Feature"); // 第一个键值 + + Map properties = new HashMap<>(); + properties.put("name", dept.getName()); + properties.put("id", dept.getId()); + feature.put("properties", properties); // 第二个键值 +// log.info("===========现在的id是=============="); +// log.info(dept.getId().toString()); + + feature.put("geometry", new Gson().fromJson(dept.getGeometry(), Object.class)); // 第三个键值 + features.add(feature); + } + geoJson.put("features", features); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("geoJson", geoJson); + return jsonObject; } diff --git a/src/main/java/com/biutag/supervision/service/SubOneSupervisionNotifyService.java b/src/main/java/com/biutag/supervision/service/SubOneSupervisionNotifyService.java index 785ea1e..5530886 100644 --- a/src/main/java/com/biutag/supervision/service/SubOneSupervisionNotifyService.java +++ b/src/main/java/com/biutag/supervision/service/SubOneSupervisionNotifyService.java @@ -57,8 +57,6 @@ public class SubOneSupervisionNotifyService { return res; } - public DayTimeSuperviseVo getSubOneYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer groupId) { - return null; - } + } diff --git a/src/main/resources/mapper/NegativeMapper.xml b/src/main/resources/mapper/NegativeMapper.xml index 4acc30c..4a76cc2 100644 --- a/src/main/resources/mapper/NegativeMapper.xml +++ b/src/main/resources/mapper/NegativeMapper.xml @@ -5,13 +5,14 @@ - + + +