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 2c84a00..0b7b417 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java @@ -1,9 +1,9 @@ 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.mapper.NegativeProblemRelationMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.service.DataGlobalService; @@ -17,10 +17,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import java.util.ArrayList; import java.util.Date; import java.util.List; -import java.util.Optional; /** @@ -38,20 +36,22 @@ public class DataGlobalController { private final DataGlobalService dataGlobalService; private final NegativeMapper negativeMapper; + private final NegativeProblemRelationMapper negativeProblemRelationMapper; //region 左边 /** * 机构问题排名 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @Operation(summary = "机构问题排名") @GetMapping("/getOrganizationRank") public Result getOrganizationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List fxsjlist = dataGlobalService.getOrganizeProblemRank(3, beginTime, endTime); - List jsdwlist = dataGlobalService.getOrganizeProblemRank(4, beginTime, endTime); + List fxsjlist = negativeMapper.selectOrganizeProblemRank(3, beginTime, endTime); + List jsdwlist = negativeMapper.selectOrganizeProblemRank(3, beginTime, endTime); JSONObject res = new JSONObject() .fluentPut("fxsjlist", fxsjlist) .fluentPut("jsdwlist", jsdwlist); @@ -61,16 +61,17 @@ public class DataGlobalController { /** * 业务类型占比 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @Operation(summary = "业务类型占比") @GetMapping("/getBusinessRate") public Result getBusinessRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 业务类型占比 - List ywzblist = dataGlobalService.getBusinessRate(beginTime, endTime); + List ywzblist = negativeMapper.selectBusinessRate(beginTime, endTime); JSONObject res = new JSONObject().fluentPut("ywzblist", ywzblist); return Result.success(res); } @@ -81,36 +82,36 @@ public class DataGlobalController { /** * 获取首页大屏中央数据 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @Operation(summary = "大屏中央数据") @GetMapping public Result getAllGlobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 获取数据大屏中央总数概览 - GlobalOverViewVo overview= negativeMapper.getAllGlobalCount(beginTime, endTime); -// JSONObject overview = dataGlobalService.getAllGlobalCount(beginTime, endTime); + GlobalOverViewVo overview = negativeMapper.getAllGlobalCount(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("overview", overview); return Result.success(data); } /** * 地图数据 + * * @param beginTime 开始时间 - * @param endTime 结束时间 + * @param endTime 结束时间 * @return Result */ @Operation(summary = "首页大屏地图数据") @GetMapping("/getMap") - @Cacheable(cacheNames = "globalMap", key = "'p_'+ #endTime") + // todo: 缓存取时间会出现多级目录 + @Cacheable(cacheNames = "globalMap", key = " #beginTime.toString().substring(0, 10) + '_' + #endTime.toString().substring(0, 10)") public Result getMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 地图数据 - List GlobalTempMapVoList = negativeMapper.getMapIcon(beginTime, endTime); -// List GlobalTempMapVoList = Optional.ofNullable(dataGlobalService.getMapIconInfo(beginTime, endTime)). -// orElseGet(ArrayList::new); + List GlobalTempMapVoList = negativeMapper.getMapIcon(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", GlobalTempMapVoList); return Result.success(data); } @@ -118,13 +119,14 @@ public class DataGlobalController { /** * 数据大屏问题趋势统计 - * @param year 年份 - * @return Result + * + * @param year 年份 + * @return Result */ @Operation(summary = "数据大屏问题趋势统计") @GetMapping("/getGlobalRecentlyTrendByMonth") public Result getGlobalRecentlyTrendByMonth(@RequestParam Integer year) { - List GlobalRecentlyTrendList = dataGlobalService.getGlobalRecentlyTrendByMonth(String.valueOf(year)); + List GlobalRecentlyTrendList = negativeMapper.getGlobalRecentlyTrendByMonth(year.toString()); JSONObject jsonObject = new JSONObject().fluentPut("globalRecentlyTrendList", GlobalRecentlyTrendList); return Result.success(jsonObject); } @@ -135,9 +137,10 @@ public class DataGlobalController { /** * 突出问题排名 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @Operation(summary = "突出问题排名") @GetMapping("/getStrongProblemRate") @@ -152,16 +155,17 @@ public class DataGlobalController { /** * 问题类型占比 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @Operation(summary = "问题类型占比") @GetMapping("/getProblemBusinessRate") public Result getProblemBusinessRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 问题类型占比 - List wtlxlist = dataGlobalService.getProblemRate(beginTime, endTime); + List wtlxlist = negativeProblemRelationMapper.selectProblemRate(beginTime, endTime); JSONObject res = new JSONObject().fluentPut("wtlxlist", wtlxlist); return Result.success(res); } diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java b/src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java index c035d90..f406826 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java @@ -3,7 +3,9 @@ package com.biutag.supervision.controller.datav; import com.alibaba.fastjson.JSONObject; import com.biutag.supervision.constants.enums.DepartGroupEnum; 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.dto.CaseVerifDepart; import com.biutag.supervision.pojo.vo.*; @@ -41,29 +43,31 @@ public class DataMailViewController { private final DataMailService dataMailService; private final DataPetitionComplaintMapper dataPetitionComplaintMapper; - + private final DataPetition12337Mapper dataPetition12337Mapper; + private final NegativeMapper negativeMapper; // region 左边 /** * 初访重访情况 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @Operation(summary = "初访重访情况") @GetMapping("/getFirstAndRepeatMail") public Result getFirstAndRepeatMail(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 初访重访情况总览 - MailFirstAndRepeatOverviewVo firstAndRepeatOverview = dataMailService.getFirstAndRepeatOverview(beginTime, endTime); + MailFirstAndRepeatOverviewVo firstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime); // 初访重访分类数据排行 - List fxsjFirstRankList = dataMailService.getMailRank(beginTime, endTime, 3, RepeatEnum.FIRST_MAIL.getId()); - List fxsjRepeatRankList = dataMailService.getMailRank(beginTime, endTime, 3, RepeatEnum.REPEAT_MAIL.getId()); - List fxsjLeaderViewRankList = dataMailService.getMailLeaderRank(beginTime, endTime, 3); + List fxsjFirstRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 3, RepeatEnum.FIRST_MAIL.getId()); + List fxsjRepeatRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 3, RepeatEnum.REPEAT_MAIL.getId()); + List fxsjLeaderViewRankList = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 3); - List bwzdFirstRankList = dataMailService.getMailRank(beginTime, endTime, 4, RepeatEnum.FIRST_MAIL.getId()); - List bwzdRepeatRankList = dataMailService.getMailRank(beginTime, endTime, 4, RepeatEnum.REPEAT_MAIL.getId()); - List bwzdLeaderViewRankList = dataMailService.getMailLeaderRank(beginTime, endTime, 4); + List bwzdFirstRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 4, RepeatEnum.FIRST_MAIL.getId()); + List bwzdRepeatRankList = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, 4, RepeatEnum.REPEAT_MAIL.getId()); + List bwzdLeaderViewRankList = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 4); JSONObject data = new JSONObject() .fluentPut("firstAndRepeatOverview", firstAndRepeatOverview) .fluentPut("fxsjFirstRankList", fxsjFirstRankList) @@ -81,9 +85,10 @@ public class DataMailViewController { /** * 信访数据中央总览统计 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @Operation(summary = "信访数据大屏中央数据统计") @GetMapping("/getAllMailCount") @@ -101,15 +106,16 @@ public class DataMailViewController { /** * 信访数据中央地图小图标数据 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @Operation(summary = "信访数据中央地图小图标数据") @GetMapping("/getMailMapIcon") @Cacheable(cacheNames = "MailMap", key = "'p_'+ #endTime") public Result getMailMapIcon(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 信访数据总数概览 List mailMapIconList = dataMailService.getMailMapIcon(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("mailMapIconList", mailMapIconList); @@ -117,19 +123,19 @@ public class DataMailViewController { } - /** * 信访数据大屏信访趋势统计 + * * @param year 年份 * @return Result */ @Operation(summary = "信访数据大屏信访趋势统计") @GetMapping("/getMailTrend") public Result getMailTrend(@RequestParam Integer year) { - List countryList = dataMailService.getMailTrend(year, 21); // 国家 - List policeList = dataMailService.getMailTrend(year, 22); // 公安部信访 - List manageList = dataMailService.getMailTrend(year, 23); // 局长信箱 - List numberList = dataMailService.getMailTrend12337(year); // 12337信访 + List countryList = negativeMapper.getMailTrend(year, 21); + List policeList = negativeMapper.getMailTrend(year, 22); + List manageList = negativeMapper.getMailTrend(year, 23); + List numberList = dataPetition12337Mapper.getMailTrend12337(year); JSONObject data = new JSONObject().fluentPut("countryList", countryList) .fluentPut("policeList", policeList) .fluentPut("manageList", manageList) @@ -141,10 +147,11 @@ public class DataMailViewController { // region 右边 /** - * 缠访集访情况 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * 缠访集访情况 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @Operation(summary = "缠访集访情况") @GetMapping("/getEntanglementAndMassMail") @@ -153,13 +160,13 @@ public class DataMailViewController { // 缠访集访情况 MailEntanglementMassOverviewVo mailEntanglementMassOverview = dataMailService.getEntanglementAndMassOverview(beginTime, endTime); - List fxsjLeaderReviewList = dataMailService.getMailLeaderRank(beginTime, endTime, 3); - List fxsjEntanglementList = dataMailService.getEntanglementMailRank(beginTime, endTime, 3); - List fxsjMassList = dataMailService.getMassMailRank(beginTime, endTime, 3); + List fxsjLeaderReviewList=dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 3); + List fxsjEntanglementList=dataPetitionComplaintMapper.getEntanglementMailRank(beginTime, endTime, 3); + List fxsjMassList=dataPetitionComplaintMapper.getMassMailRank(beginTime, endTime, 3); - List bwzdLeaderReviewList = dataMailService.getMailLeaderRank(beginTime, endTime, 4); - List bwzdEntanglementList = dataMailService.getEntanglementMailRank(beginTime, endTime, 4); - List bwzdMassList = dataMailService.getMassMailRank(beginTime, endTime, 4); + List bwzdLeaderReviewList = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, 4); + List bwzdEntanglementList =dataPetitionComplaintMapper.getEntanglementMailRank(beginTime, endTime, 4); + List bwzdMassList =dataPetitionComplaintMapper.getMassMailRank(beginTime, endTime, 4); JSONObject data = new JSONObject() .fluentPut("mailEntanglementMassOverview", mailEntanglementMassOverview) @@ -171,151 +178,6 @@ public class DataMailViewController { .fluentPut("bwzdMassList", bwzdMassList); return Result.success(data); } -// endregion 右边 - - // region 旧接口 - // 信访数据大屏统计 - - @Operation(summary = "信访数据大屏中央数据统计") - @GetMapping - public Result mailVisits(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - // 信访数据总数概览 - JSONObject overview = dataMailService.allMailCount(beginTime, endTime); - // 分县市局信初重访领导访排名 - List fxsjFirstMailList = dataMailService.mailRank(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), RepeatEnum.FIRST_MAIL.getId(), beginTime, endTime); - List fxsjRepeatMailList = dataMailService.mailRank(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), RepeatEnum.REPEAT_MAIL.getId(), beginTime, endTime); - List fxsjLeaderViewMailList = dataPetitionComplaintMapper.selectLeaderViewMail(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), beginTime, endTime); - // 部委支队初重领导访排名 - List bwzdFirstMailList = dataMailService.mailRank(DepartGroupEnum.BUREAU_AFFILIATED.getId(), RepeatEnum.FIRST_MAIL.getId(), beginTime, endTime); - List bwzdRepeatMailList = dataMailService.mailRank(DepartGroupEnum.BUREAU_AFFILIATED.getId(), RepeatEnum.REPEAT_MAIL.getId(), beginTime, endTime); - List bwzdLeaderViewMailList = dataPetitionComplaintMapper.selectLeaderViewMail(DepartGroupEnum.BUREAU_AFFILIATED.getId(), beginTime, endTime); - // 分县市局领导督办、缠访、集访排名 - List fxsjEntanglementMailList = dataPetitionComplaintMapper.selectEntanglementMail(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), 1, beginTime, endTime); - List fxsjMassMailList = dataPetitionComplaintMapper.selectMassMail(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), 1, beginTime, endTime); - // 部委支队缠访集访排名 - List bwzdEntanglementMailList = dataPetitionComplaintMapper.selectEntanglementMail(DepartGroupEnum.BUREAU_AFFILIATED.getId(), 1, beginTime, endTime); - List bwzdMassMailList = dataPetitionComplaintMapper.selectMassMail(DepartGroupEnum.BUREAU_AFFILIATED.getId(), 1, beginTime, endTime); - JSONObject data = new JSONObject().fluentPut("overview", overview) - .fluentPut("fxsjFirstMailList", fxsjFirstMailList) - .fluentPut("fxsjRepeatMailList", fxsjRepeatMailList) - .fluentPut("fxsjLeaderViewMailList", fxsjLeaderViewMailList) - .fluentPut("bwzdFirstMailList", bwzdFirstMailList) - .fluentPut("bwzdRepeatMailList", bwzdRepeatMailList) - .fluentPut("bwzdLeaderViewMailList", bwzdLeaderViewMailList) - .fluentPut("fxsjEntanglementMailList", fxsjEntanglementMailList) - .fluentPut("fxsjMassMailList", fxsjMassMailList) - .fluentPut("bwzdEntanglementMailList", bwzdEntanglementMailList) - .fluentPut("bwzdMassMailList", bwzdMassMailList); - return Result.success(data); - } - - - /** - * 信访数据大屏信访趋势统计(按日) - */ - @Operation(summary = "信访数据大屏信访趋势统计(按日)") - @GetMapping("/getRecentlyMailTrendByDay") - public Result getRecentlyMailTrendByDay(@RequestParam Integer sourcesCode, @RequestParam Integer days, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date startTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - JSONObject jsonObject = new JSONObject(); - // 库中的数据 2024/10/24 22 - List recentMailTrendVoList = dataMailService.getRecentlyMailTrendByDay(sourcesCode, days, endTime); - ArrayList dayList = new ArrayList<>(); - ArrayList totalList = new ArrayList<>(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd"); - LocalDate previousDate = null; - for (RecentMailTrendByDayVo recentMailTrendVo : recentMailTrendVoList) { - // 获取当前日期 - LocalDate currentDate = LocalDate.parse(recentMailTrendVo.getDayTime(), formatter); - if (previousDate != null) { - while (ChronoUnit.DAYS.between(previousDate, currentDate) > 1) { - previousDate = previousDate.plusDays(1); // 日期加1 - String res = previousDate.format(formatter); // 格式化日期 - dayList.add(res.substring(res.indexOf('/') + 1)); // 添加到dayList - totalList.add("0"); // 插入没有数据的日期,总数为0 - } - } - String res = currentDate.format(formatter); - dayList.add(res.substring(res.indexOf('/') + 1)); - totalList.add(recentMailTrendVo.getTotal()); - previousDate = currentDate; - } - jsonObject.fluentPut("dayList", dayList); - jsonObject.fluentPut("totalList", totalList); - return Result.success(jsonObject); - } - - - /** - * 信访数据大屏信访趋势统计(按月) - * - * @param sourcesCode - * @param year - * @return - */ - @Operation(summary = "信访数据大屏信访趋势统计(按月)") - @GetMapping("/getRecentlyMailTrendMonth") - public Result getRecentlyMailTrendByMonth(@RequestParam Integer sourcesCode, @RequestParam Integer year) { - JSONObject jsonObject = new JSONObject(); - List recentMailTrendVoList = dataMailService.getRecentlyMailTrendByMonth(sourcesCode, String.valueOf(year)); - ArrayList monthList = new ArrayList<>(); - ArrayList totalList = new ArrayList<>(); - for (RecentMailTrendByMonthVo recentMailTrendByMonthVo : recentMailTrendVoList) { - monthList.add(recentMailTrendByMonthVo.getMonthTime().substring(recentMailTrendByMonthVo.getMonthTime().indexOf("-") + 1)); - totalList.add(recentMailTrendByMonthVo.getTotal()); - } - jsonObject.fluentPut("monthList", monthList); - jsonObject.fluentPut("totalList", totalList); - return Result.success(jsonObject); - } - - - /** - * 信访数据大屏12337信访趋势统计(按月) - * - * @param year - * @return - */ - @Operation(summary = "信访数据大屏12337信访趋势统计(按月)") - @GetMapping("/getRecentlyMailTrendByMonth12337") - public Result getRecentlyMailTrendByMonth12337(@RequestParam Integer year) { - JSONObject jsonObject = new JSONObject(); - List recentMailTrendVoList = dataMailService.getRecentlyMailTrendByMonth12337(String.valueOf(year)); - ArrayList monthList = new ArrayList<>(); - ArrayList totalList = new ArrayList<>(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); - // 要展示到的月份 从那个月开始 - YearMonth endMonth = YearMonth.of(year, 12); - YearMonth startMonth = YearMonth.of(year, 1); - for (RecentMailTrendByMonthVo recentMailTrendByMonthVo : recentMailTrendVoList) { - YearMonth trendMonth = YearMonth.parse(recentMailTrendByMonthVo.getMonthTime(), formatter); - while (startMonth.isBefore(trendMonth)) { - String res = startMonth.format(formatter); - monthList.add(res); // 添加到monthList - totalList.add("0"); // 插入没有数据的月份,总数为0 - startMonth = startMonth.plusMonths(1); - } - String res = trendMonth.format(formatter); - monthList.add(res); - totalList.add(recentMailTrendByMonthVo.getTotal()); - startMonth = trendMonth.plusMonths(1); - } - // 添加从最后一个有数据的月份到当前月份的缺失月份 - while (!startMonth.isAfter(endMonth)) { - String res = startMonth.format(formatter); - monthList.add(res); // 添加到monthList - totalList.add("0"); // 插入没有数据的月份,总数为0 - startMonth = startMonth.plusMonths(1); - } - // 截取月份 - List monthOnlyList = monthList.stream() - .map(date -> date.substring(date.indexOf('-') + 1)) - .collect(Collectors.toList()); - jsonObject.fluentPut("monthList", monthOnlyList); - jsonObject.fluentPut("totalList", totalList); - return Result.success(jsonObject); - } -// endregion } diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java index 08866ba..7b39b84 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java @@ -2,6 +2,7 @@ package com.biutag.supervision.controller.datav; import com.alibaba.fastjson.JSONObject; import com.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; @@ -31,21 +32,22 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*; public class DataVCaseVerifController { private final DataCaseVerifMapper dataCaseVerifMapper; - private final CaseVerificationService caseVerificationService; + private final NegativeMapper negativeMapper; // region 左边 /** * 案件核查大屏分县市局排名 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @GetMapping("/getCaseVerificationRank") public Result getCaseVerificationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List fxsjRankList = caseVerificationService.getCaseVerificationRank(beginTime, endTime, 3); - List jsdwRankList = caseVerificationService.getCaseVerificationRank(beginTime, endTime, 4); + List fxsjRankList = negativeMapper.getCaseVerificationRank(beginTime, endTime, 3); + List jsdwRankList = negativeMapper.getCaseVerificationRank(beginTime, endTime, 4); JSONObject data = new JSONObject() .fluentPut("fxsjRankList", fxsjRankList) .fluentPut("jsdwRankList", jsdwRankList); @@ -54,17 +56,18 @@ public class DataVCaseVerifController { /** * 案件问题性质 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @GetMapping("/getCaseProblemProperty") public Result getCaseProblemProperty(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { List zfbaPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 6); // 执法办案 List fwglPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 11); // 服务管理 -// List jgjjPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 6); // 执法 - JSONObject data = new JSONObject().fluentPut("zfbaPieList", zfbaPieList) + JSONObject data = new JSONObject() + .fluentPut("zfbaPieList", zfbaPieList) .fluentPut("fwglPieList", fwglPieList); return Result.success(data); } @@ -75,14 +78,15 @@ public class DataVCaseVerifController { /** * 案件核查大屏中央数据总览 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @GetMapping("/getAllCaseVerificationCount") public Result getAllCaseVerificationCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - CaseVerificationCountVo overview = caseVerificationService.getAllCaseVerificationCount(beginTime, endTime); + CaseVerificationCountVo overview = negativeMapper.getAllCaseVerificationCount(beginTime, endTime); JSONObject res = new JSONObject().fluentPut("overview", overview); return Result.success(res); } @@ -90,27 +94,29 @@ public class DataVCaseVerifController { /** * 案件核查大屏地图 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @GetMapping("/getCaseVerificationMap") @Cacheable(cacheNames = "CaseVerificationMap", key = "'p_'+ #endTime") public Result getCaseVerificationMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List caseVerificationMapList = caseVerificationService.getCaseVerificationMap(beginTime, endTime); + List caseVerificationMapList = negativeMapper.getCaseVerificationMap(beginTime, endTime); JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList); return Result.success(res); } /** * 查处问题趋势 - * @param year 年份 - * @return Result + * + * @param year 年份 + * @return Result */ @GetMapping("/getCaseVerificationTrend") public Result getCaseVerificationTrend(@RequestParam Integer year) { - List proTrendList = caseVerificationService.getCaseVerificationTrend(String.valueOf(year), A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); + List proTrendList = negativeMapper.getTrend(year, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList); return Result.success(data); } @@ -121,15 +127,16 @@ public class DataVCaseVerifController { /** * 案件来源占比 和 问责处理情况 - * @param beginTime 开始时间 + * + * @param beginTime 开始时间 * @param endTime 结束时间 - * @return Result + * @return Result */ @GetMapping("/getCaseSourceRateAndDealSituation") public Result getCaseSourceRateAndDealSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List caseSourceRateList = caseVerificationService.getCaseSourceRate(beginTime, endTime); - List dealSituationPieList = caseVerificationService.getDealSituation(beginTime, endTime); + List caseSourceRateList = negativeMapper.getCaseSourceRate(beginTime, endTime); + List dealSituationPieList = negativeMapper.getDealSituation(beginTime, endTime); JSONObject data = new JSONObject() .fluentPut("caseSourceRateList", caseSourceRateList) .fluentPut("dealSituationPieList", dealSituationPieList); @@ -139,15 +146,16 @@ public class DataVCaseVerifController { /** * 禁闭处理情况 和 停职处理情况 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return Result */ @GetMapping("/getConfinementAndPause") public Result getConfinement(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List jbclList = caseVerificationService.getConfinementAndPause(beginTime, endTime, 1); // 禁闭 - List tzclList = caseVerificationService.getConfinementAndPause(beginTime, endTime, 2); // 停职 + List jbclList = negativeMapper.getConfinementAndPause(beginTime,endTime, 1); + List tzclList = negativeMapper.getConfinementAndPause(beginTime, endTime, 2); // 停职 JSONObject data = new JSONObject() .fluentPut("jbclList", jbclList) .fluentPut("tzclList", tzclList); diff --git a/src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java b/src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java index 181bc8a..3474d2f 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java @@ -90,7 +90,7 @@ public class DatavRightsComfortController { // endregion -// region 中间 + // region 中间 // 抚慰大屏中央总览数据 @GetMapping("/getALlComfortCount") diff --git a/src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java b/src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java index ed99041..76a066a 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java @@ -1,6 +1,7 @@ package com.biutag.supervision.controller.datav; 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; @@ -38,23 +39,24 @@ public class SupervisionNotifyController { private final DataSupervisionNotifyServiceImpl dataSupervisionNotifyService; - + private final NegativeMapper negativeMapper; // region 左边 /** * 获取日常督察情况 - * @param beginTime 开始时间 - * @param endTime 结束时间 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 * @return */ @Operation(summary = "获取日常督察数量概览和整改率排名") @GetMapping("/rank") public Result getChangedRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - DayTimeSuperviseVo fxsjRankOverview = dataSupervisionNotifyService.getSuperversionRank(beginTime, endTime, 3); - DayTimeSuperviseVo jsdwRankOverview = dataSupervisionNotifyService.getSuperversionRank(beginTime, endTime, 4); - List fxsjChangedRankList = dataSupervisionNotifyService.getChangedRateRank(3, beginTime, endTime); - List jsdwChangedRankList = dataSupervisionNotifyService.getChangedRateRank(4, beginTime, endTime); + DayTimeSuperviseVo fxsjRankOverview = negativeMapper.getSuperversionRank(beginTime, endTime, 3); + DayTimeSuperviseVo jsdwRankOverview = negativeMapper.getSuperversionRank(beginTime, endTime, 4); + List fxsjChangedRankList = negativeMapper.getChangedRateRank(beginTime, endTime, 3); + List jsdwChangedRankList = negativeMapper.getChangedRateRank(beginTime, endTime, 4); JSONObject data = new JSONObject() .fluentPut("fxsjRankOverview", fxsjRankOverview) .fluentPut("jsdwRankOverview", jsdwRankOverview) @@ -65,14 +67,16 @@ public class SupervisionNotifyController { /** * 问题类型占比 - * @param beginTime 开始时间 - * @param endTime 结束时间 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 * @return */ @GetMapping("/getProblemTypeRate") public Result getProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List wtlxList = dataSupervisionNotifyService.getProblemTypeRatio(beginTime, endTime); + List wtlxList = negativeMapper.getProblemTypeRatio(beginTime, endTime); +// List wtlxList = dataSupervisionNotifyService.getProblemTypeRatio(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("wtlxList", wtlxList); return Result.success(data); } @@ -82,44 +86,47 @@ public class SupervisionNotifyController { // region 中间 /** - * 获取现场督察大屏中央数据 - * @param beginTime 开始时间 - * @param endTime 结束时间 + * 获取现场督察大屏中央总览 + * + * @param beginTime 开始时间 + * @param endTime 结束时间 * @return */ - @Operation(summary = "获取所有督察通知相关数量") + @Operation(summary = "获取现场督察大屏中央总览") @GetMapping public Result getAllSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - JSONObject overview = dataSupervisionNotifyService.getAllSupervisionNotifyCount(beginTime, endTime); + SupervisionNotifyOverView overview = negativeMapper.getAllSupervisionNotifyCount(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("overview", overview); return Result.success(data); } /** - * 地图数据 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return List + * 地图小卡片 + * + * @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); + List superviseTempMapVoList = negativeMapper.getSupervisionMapIconInfo(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("superviseTempMapVoList", superviseTempMapVoList); return Result.success(data); } /** * 获取现场督察问题趋势 - * @param year 年份 - * @return List + * + * @param year 年份 + * @return List */ @GetMapping("/getSupervisionTrend") - public Result getSupervisionTrend(@RequestParam String year) { - List supervisionTrend = dataSupervisionNotifyService.getSupervisionTrend(year,XCDC.getValue(), ZXDC.getValue()); + public Result getSupervisionTrend(@RequestParam Integer year) { + List supervisionTrend = negativeMapper.getTrend(year, XCDC.getValue(), ZXDC.getValue()); JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend); return Result.success(data); } @@ -130,19 +137,19 @@ public class SupervisionNotifyController { /** * 黄赌毒数据 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return JSONObject + * + * @param beginTime 开始时间 + * @param endTime 结束时间 + * @return JSONObject */ @GetMapping("/getYellowBetDrug") public Result getYellowBetDrug(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 黄赌毒总览 - DayTimeSuperviseVo fxsjYellowBetOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 1); - DayTimeSuperviseVo jsdwYellowBetOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 1); - // 黄毒赌列表 - List fxsjYellowBetRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 1); - List jsdwYellowBetRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 1); + DayTimeSuperviseVo fxsjYellowBetOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 3, 1); + DayTimeSuperviseVo jsdwYellowBetOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 4, 1); + List fxsjYellowBetRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 3, 1); + List jsdwYellowBetRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 4, 1); JSONObject data = new JSONObject() .fluentPut("fxsjYellowBetOverview", fxsjYellowBetOverview) @@ -153,17 +160,16 @@ public class SupervisionNotifyController { } - // 枪支管理数据 @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); + DayTimeSuperviseVo fxsjGunControllerOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 3, 2); + DayTimeSuperviseVo jsdwGunControllerOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 4, 2); // 枪支管理列表 - List fxsjGunControllerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 2); - List jsdwGunControllerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 2); + List fxsjGunControllerRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 3, 2); + List jsdwGunControllerRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 4, 2); JSONObject data = new JSONObject() .fluentPut("fxsjGunControllerOverview", fxsjGunControllerOverview) @@ -178,11 +184,11 @@ public class SupervisionNotifyController { 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); + DayTimeSuperviseVo fxsjCompanyProblemOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 3, 3); + DayTimeSuperviseVo jsdwCompanyProblemOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 4, 3); // 涉企问题列表 - List fxsjCompanyProblemRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 3); - List jsdwCompanyProblemRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 3); + List fxsjCompanyProblemRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 3, 3); + List jsdwCompanyProblemRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 4, 3); JSONObject data = new JSONObject() .fluentPut("fxsjCompanyProblemOverview", fxsjCompanyProblemOverview) @@ -195,13 +201,13 @@ public class SupervisionNotifyController { // 执法办案数据 @GetMapping("/getHandleCase") public Result getHandleCase(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 执法办案总览 - DayTimeSuperviseVo fxsjHandleCaseOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 4); - DayTimeSuperviseVo jsdwHandleCaseOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 4); + DayTimeSuperviseVo fxsjHandleCaseOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 3, 4); + DayTimeSuperviseVo jsdwHandleCaseOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 4, 4); // 执法办案列表 - List fxsjHandleCaseRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 4); - List jsdwHandleCaseRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 4); + List fxsjHandleCaseRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 3, 4); + List jsdwHandleCaseRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 4, 4); JSONObject data = new JSONObject() .fluentPut("fxsjHandleCaseOverview", fxsjHandleCaseOverview) @@ -215,13 +221,13 @@ public class SupervisionNotifyController { // 工作日测酒数据 @GetMapping("/getCheckBeer") public Result getCheckBeer(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 工作日测酒总览 - DayTimeSuperviseVo fxsjCheckBeerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 5); - DayTimeSuperviseVo jsdwCheckBeerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 5); + DayTimeSuperviseVo fxsjCheckBeerOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 3, 5); + DayTimeSuperviseVo jsdwCheckBeerOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 4, 5); // 工作日测酒列表 - List fxsjCheckBeerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 5); - List jsdwCheckBeerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 5); + List fxsjCheckBeerRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 3, 5); + List jsdwCheckBeerRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 4, 5); JSONObject data = new JSONObject() .fluentPut("fxsjCheckBeerOverview", fxsjCheckBeerOverview) diff --git a/src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java b/src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java index d2d0f4c..5f9048f 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/VideoSuperviseController.java @@ -1,6 +1,7 @@ package com.biutag.supervision.controller.datav; 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.VideoSuperviseService; @@ -34,6 +35,7 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SPDC; public class VideoSuperviseController { private final VideoSuperviseService videoSuperviseService; + private final NegativeMapper negativeMapper; //region 左边 @@ -48,8 +50,8 @@ public class VideoSuperviseController { @GetMapping("/getVideoSuperviseProblemRank") public Result getVideoSuperviseProblemRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List fxsjVideoSuperviseProblemRankList = videoSuperviseService.getVideoSuperviseProblemRank(beginTime, endTime, 3); - List jsdwVideoSuperviseProblemRankList = videoSuperviseService.getVideoSuperviseProblemRank(beginTime, endTime, 4); + List fxsjVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 3); + List jsdwVideoSuperviseProblemRankList = negativeMapper.getVideoSuperviseProblemRank(beginTime, endTime, 4); JSONObject data = new JSONObject(); data.fluentPut("fxsjVideoSuperviseProblemRankList", fxsjVideoSuperviseProblemRankList); data.fluentPut("jsdwVideoSuperviseProblemRankList", jsdwVideoSuperviseProblemRankList); @@ -70,7 +72,8 @@ public class VideoSuperviseController { public Result getAllVideoSuperviseCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 获取视频督察中央数据 - VideoSuperviseCountVo overview = videoSuperviseService.getAllVideoSuperviseCount(beginTime, endTime); + VideoSuperviseCountVo overview = negativeMapper.getAllVideoSuperviseCount(beginTime, endTime); +// VideoSuperviseCountVo overview = videoSuperviseService.getAllVideoSuperviseCount(beginTime, endTime); JSONObject data = new JSONObject().fluentPut("overview", overview); return Result.success(data); } @@ -88,7 +91,7 @@ public class VideoSuperviseController { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { // 地图数据 - List videoSuperviseMapIconVoList = Optional.ofNullable(videoSuperviseService.getVideoSuperviseMapIconInfo(beginTime, endTime)). + List videoSuperviseMapIconVoList = Optional.ofNullable(negativeMapper.getVideoSuperviseMapIconInfo(beginTime, endTime)). orElseGet(ArrayList::new); JSONObject data = new JSONObject().fluentPut("videoSuperviseMapIconVoList", videoSuperviseMapIconVoList); return Result.success(data); @@ -98,7 +101,7 @@ public class VideoSuperviseController { @Operation(summary = "数据大屏问题趋势统计") @GetMapping("/getVideoSuperviseTrend") public Result getVideoSuperviseTrend(@RequestParam Integer year) { - List videoSuperviseTrendList = videoSuperviseService.getVideoSuperviseTrend(String.valueOf(year), SPDC.getValue()); + List videoSuperviseTrendList = negativeMapper.getTrend(year, SPDC.getValue()); JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseTrendList", videoSuperviseTrendList); return Result.success(jsonObject); } @@ -112,7 +115,7 @@ public class VideoSuperviseController { @GetMapping("/getVideoSuperviseProblemTypeRate") public Result getVideoSuperviseProblemTypeRate(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List videoSuperviseProblemTypeRate = videoSuperviseService.getVideoSuperviseProblemTypeRate(beginTime, endTime); + List videoSuperviseProblemTypeRate = negativeMapper.getVideoSuperviseProblemTypeRate(beginTime, endTime); JSONObject jsonObject = new JSONObject().fluentPut("videoSuperviseProblemTypeRate", videoSuperviseProblemTypeRate); return Result.success(jsonObject); } diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClassController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClassController.java similarity index 91% rename from src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClassController.java rename to src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClassController.java index 9bae06d..8982576 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClassController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClassController.java @@ -1,4 +1,4 @@ -package com.biutag.supervision.controller.sensitivePerception; +package com.biutag.supervision.controller.sensitiveperception; import com.biutag.supervision.mapper.ModelClassMapper; import com.biutag.supervision.pojo.Result; diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueController.java similarity index 97% rename from src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueController.java rename to src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueController.java index 5c223d8..52f9363 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueController.java @@ -1,4 +1,4 @@ -package com.biutag.supervision.controller.sensitivePerception; +package com.biutag.supervision.controller.sensitiveperception; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueRecordController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueRecordController.java similarity index 97% rename from src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueRecordController.java rename to src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueRecordController.java index 34381ec..1734449 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueRecordController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueRecordController.java @@ -1,4 +1,4 @@ -package com.biutag.supervision.controller.sensitivePerception; +package com.biutag.supervision.controller.sensitiveperception; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueTaskController.java similarity index 96% rename from src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java rename to src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueTaskController.java index c39e8c6..392a616 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelClueTaskController.java @@ -1,4 +1,4 @@ -package com.biutag.supervision.controller.sensitivePerception; +package com.biutag.supervision.controller.sensitiveperception; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelController.java similarity index 98% rename from src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelController.java rename to src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelController.java index 0ca05d1..8075700 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ModelController.java @@ -1,4 +1,4 @@ -package com.biutag.supervision.controller.sensitivePerception; +package com.biutag.supervision.controller.sensitiveperception; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.StrUtil; diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java similarity index 98% rename from src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java rename to src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java index f204759..96f8c1e 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfileDepartController.java @@ -1,4 +1,4 @@ -package com.biutag.supervision.controller.sensitivePerception; +package com.biutag.supervision.controller.sensitiveperception; import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSONObject; @@ -15,7 +15,6 @@ import com.biutag.supervision.pojo.dto.common.BarItem; import com.biutag.supervision.pojo.dto.common.PieItem; import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.model.DepartNegativeModel; -import com.biutag.supervision.pojo.model.PoliceNegativeModel; import com.biutag.supervision.pojo.param.DepartNegativeQueryParam; import com.biutag.supervision.service.*; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfilePoliceController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfilePoliceController.java similarity index 98% rename from src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfilePoliceController.java rename to src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfilePoliceController.java index b31bdda..a1181b1 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfilePoliceController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ProfilePoliceController.java @@ -1,4 +1,4 @@ -package com.biutag.supervision.controller.sensitivePerception; +package com.biutag.supervision.controller.sensitiveperception; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.NumberUtil; @@ -12,7 +12,6 @@ import com.biutag.supervision.mapper.ProfilePoliceMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.domain.ProfileDepart; import com.biutag.supervision.pojo.domain.ProfilePolice; -import com.biutag.supervision.pojo.dto.common.BarItem; import com.biutag.supervision.pojo.dto.common.PieItem; import com.biutag.supervision.pojo.entity.*; import com.biutag.supervision.pojo.model.PoliceNegativeModel; diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskClueController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskClueController.java similarity index 98% rename from src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskClueController.java rename to src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskClueController.java index 70f4763..7754ff5 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskClueController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskClueController.java @@ -1,4 +1,4 @@ -package com.biutag.supervision.controller.sensitivePerception; +package com.biutag.supervision.controller.sensitiveperception; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.StrUtil; diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskPersonalController.java similarity index 99% rename from src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java rename to src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskPersonalController.java index c4e1b63..4d5aa58 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskPersonalController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskPersonalController.java @@ -1,4 +1,4 @@ -package com.biutag.supervision.controller.sensitivePerception; +package com.biutag.supervision.controller.sensitiveperception; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskScoreRuleController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskScoreRuleController.java similarity index 96% rename from src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskScoreRuleController.java rename to src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskScoreRuleController.java index ee3a5fd..497c8cf 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/RiskScoreRuleController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/RiskScoreRuleController.java @@ -1,4 +1,4 @@ -package com.biutag.supervision.controller.sensitivePerception; +package com.biutag.supervision.controller.sensitiveperception; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.entity.RiskScoreRule; diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ScoreController.java similarity index 98% rename from src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java rename to src/main/java/com/biutag/supervision/controller/sensitiveperception/ScoreController.java index 5eb4d28..ce846e2 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ScoreController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitiveperception/ScoreController.java @@ -1,4 +1,4 @@ -package com.biutag.supervision.controller.sensitivePerception; +package com.biutag.supervision.controller.sensitiveperception; import cn.hutool.core.util.NumberUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -21,7 +21,6 @@ import java.time.ZoneId; import java.util.Date; import java.util.List; import java.util.Objects; -import java.util.stream.Collectors; /** * @author wxc diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java index a21d680..e9a9e85 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.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.EchartsVo; import com.biutag.supervision.pojo.vo.RankVo; @@ -36,7 +37,7 @@ public class SubOneGlobalController { private final CountyStreetDeptService countyStreetDeptService; private final SubOneService subOneService; - + private final NegativeMapper negativeMapper; // region左边 @Operation(summary = "获取首页二级大屏督察问题排名") @@ -44,10 +45,10 @@ public class SubOneGlobalController { public Result getSubOneSupervisionRank(@RequestParam Integer departPId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - SubOneOverViewVo supervisionPrecinctOverView = subOneService.getSubOneSupervisionRankOverView(departPId, 10, beginTime, endTime, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); - SubOneOverViewVo supervisionTeamOverView = subOneService.getSubOneSupervisionRankOverView(departPId, -1, beginTime, endTime, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); - List supervisionPrecinctList = subOneService.getSubOneSupervisionRank(departPId, 10, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); // 案件核查派出所排名 - List supervisionTeamList = subOneService.getSubOneSupervisionRank(departPId, -1, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); // 案件核查派出所排名 + SubOneOverViewVo supervisionPrecinctOverView = negativeMapper.getSubOneGlobalPoliceSupervisionRankOverView(departPId, beginTime, endTime); + SubOneOverViewVo supervisionTeamOverView = negativeMapper.getSubOneGlobalTeamSupervisionRankOverView(departPId, beginTime, endTime); + List supervisionPrecinctList = negativeMapper.getSubOneGlobalPrecinctSupervisionRank(departPId, beginTime, endTime); + List supervisionTeamList = negativeMapper.getSubOneGlobalTeamSupervisionRank(departPId, beginTime, endTime); JSONObject jsonObject = new JSONObject(); jsonObject.fluentPut("supervisionPrecinctOverView", supervisionPrecinctOverView) .fluentPut("supervisionTeamOverView", supervisionTeamOverView) @@ -76,7 +77,9 @@ public class SubOneGlobalController { public Result getSubOneOverView(@RequestParam Integer departPId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - SubOneOverViewVo subOneOverViewVo = subOneService.getSubOneOverView(departPId, beginTime, endTime); + // todo 更新 + SubOneOverViewVo subOneOverViewVo = negativeMapper.getSubOneOverView(departPId, beginTime, endTime); +// SubOneOverViewVo subOneOverViewVo = subOneService.getSubOneOverView(departPId, beginTime, endTime); JSONObject jsonObject = new JSONObject(); jsonObject.fluentPut("subOneOverViewVo", subOneOverViewVo); return Result.success(jsonObject); @@ -93,10 +96,10 @@ public class SubOneGlobalController { @Operation(summary = "获取首页二级大屏问题趋势") @GetMapping("/getSubOneTrend") public Result getSubOneTrend(@RequestParam Integer departPId, @RequestParam Integer year) { - List superviseProTrend = subOneService.getSubOneTrend(departPId, year, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); // 督察问题趋势 - List caseVerifyTrend = subOneService.getSubOneTrend(departPId, year, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); + List superviseProTrend = negativeMapper.getSubOneTrend(departPId, year.toString(), XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); // 督察问题趋势 + List caseVerifyTrend = negativeMapper.getSubOneTrend(departPId, year.toString(), A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); List policeCommentTrend = new ArrayList<>(); - List mailTrend = subOneService.getSubOneTrend(departPId, year, GJXFPT.getValue(), GABXF.getValue(), JZXX.getValue(), XF12337.getValue(), XF_QT.getValue()); + List 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) @@ -136,10 +139,10 @@ public class SubOneGlobalController { public Result getSubOneCaseVerifyRank(@RequestParam Integer departPId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - SubOneOverViewVo caseVerifyPrecinctOverView = subOneService.getCaseVerifyOverView(departPId, 10, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); - SubOneOverViewVo caseVerifyTeamOverView = subOneService.getCaseVerifyOverView(departPId, -1, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); - List caseVerifyPrecinctList = subOneService.getCaseVerifyRank(departPId, 10, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); // 案件核查派出所排名 - List caseVerifyTeamList = subOneService.getCaseVerifyRank(departPId, -1, beginTime, endTime, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()); // 案件核查大队排名 + SubOneOverViewVo caseVerifyPrecinctOverView = negativeMapper.getGlobalPoliceCaseVerifyOverView(departPId, beginTime, endTime); + SubOneOverViewVo caseVerifyTeamOverView = negativeMapper.getGlobalTeamCaseVerifyOverView(departPId, beginTime, endTime); + List caseVerifyPrecinctList = negativeMapper.getGlobalPoliceCaseVerifyRank(departPId, beginTime, endTime); // 案件核查派出所排名 + List caseVerifyTeamList = negativeMapper.getGlobalTeamCaseVerifyRank(departPId, beginTime, endTime); // 案件核查大队排名 JSONObject jsonObject = new JSONObject(); jsonObject.fluentPut("caseVerifyPrecinctOverView", caseVerifyPrecinctOverView) .fluentPut("caseVerifyTeamOverView", caseVerifyTeamOverView) diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java new file mode 100644 index 0000000..0b64daf --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java @@ -0,0 +1,33 @@ +package com.biutag.supervision.controller.subdatav; + +import com.biutag.supervision.mapper.DataPetitionComplaintMapper; +import com.biutag.supervision.service.DataMailService; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @Auther: sh + * @Date: 2024/12/20 11:45 + * @Description: 二级大屏信访投诉 + */ +@Tag(name = "二级大屏信访投诉") +@RequestMapping("datav/sub1/mailVisits") +@RequiredArgsConstructor +@RestController +@Slf4j +public class SubOneMailViewController { + + private final DataMailService dataMailService; + private final DataPetitionComplaintMapper dataPetitionComplaintMapper; + // region 左边 + + + + // endregion + + +} + 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 1e67d93..ecba568 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java @@ -4,14 +4,11 @@ import com.alibaba.fastjson.JSONObject; import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.vo.*; -import com.biutag.supervision.service.DataSupervisionNotifyServiceImpl; import com.biutag.supervision.service.SubOneSupervisionNotifyService; -import com.biutag.supervision.service.SubOneVideoSuperviseService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.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; @@ -21,9 +18,6 @@ import org.springframework.web.bind.annotation.RestController; import java.util.Date; import java.util.List; -import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.XCDC; -import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.ZXDC; - /** * @Auther: sh * @Date: 2024/12/17 10:58 @@ -54,10 +48,10 @@ public class SubOneSupervisionNotifyController { public Result getSubOneChangedRank(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - DayTimeSuperviseVo policeRankOverview = subOneSupervisionNotifyService.getChangedRankOverView(10, departId, beginTime, endTime); - DayTimeSuperviseVo teamRankOverview = subOneSupervisionNotifyService.getChangedRankOverView(-1, departId, beginTime, endTime); - List policeChangedRankList = subOneSupervisionNotifyService.getSubOneChangedRateRank(10, departId, beginTime, endTime); - List teamChangedRankList = subOneSupervisionNotifyService.getSubOneChangedRateRank(-1, departId, beginTime, endTime); + DayTimeSuperviseVo policeRankOverview = negativeMapper.getPoliceRankOverview(departId, beginTime, endTime); + DayTimeSuperviseVo teamRankOverview = negativeMapper.getTeamRankOverview(departId, beginTime, endTime); + List policeChangedRankList = negativeMapper.getPoliceChangedRankList(departId, beginTime, endTime); + List teamChangedRankList = negativeMapper.getTeamChangedRankList(departId, beginTime, endTime); JSONObject data = new JSONObject() .fluentPut("fxsjRankOverview", policeRankOverview) .fluentPut("jsdwRankOverview", teamRankOverview) @@ -98,7 +92,7 @@ public class SubOneSupervisionNotifyController { public Result getAllSubOneSupervisionNotifyCount(@RequestParam Integer departId, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - SupervisionNotifyOverView overview = subOneSupervisionNotifyService.getAllSubOneSupervisionNotifyCount(departId, beginTime, endTime); + SupervisionNotifyOverView overview = negativeMapper.getAllSubOneSupervisionNotifyCount(departId, beginTime, endTime); JSONObject data = new JSONObject().fluentPut("overview", overview); return Result.success(data); } @@ -113,7 +107,7 @@ public class SubOneSupervisionNotifyController { @GetMapping("/getSubOneSupervisionTrend") public Result getSubOneSupervisionTrend(@RequestParam Integer departId, @RequestParam String year) { - List supervisionTrend = subOneSupervisionNotifyService.getSubOneSupervisionTrend(departId, year); + List supervisionTrend = negativeMapper.getSubOneTrend(departId, year, "13", "15"); JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend); return Result.success(data); } diff --git a/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java b/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java index 186a6c6..8b997ff 100644 --- a/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java @@ -19,10 +19,10 @@ public interface DataCaseVerifMapper extends BaseMapper { @Select("select involve_problem name, count(originId) value from data_case_verif where business_type_name = #{businessTypeName} and discovery_time between #{beginTime} and #{endTime} group by involve_problem") List selectInvolveProblemGroupByBusinessTypeName(String businessTypeName, Date beginTime, Date endTime); - @Select("select problem_sources name, " + - "count(originId) value from data_case_verif " + - "where discovery_time between #{beginTime} and #{endTime} " + - "group by problem_sources") + @Select("SELECT problemSources AS name, count(ng.id) AS value " + + "FROM negative ng " + + "WHERE problemSourcesCode IN (17, 18, 19, 20) " + + "GROUP BY problemSources") List getCaseSourceRate(Date beginTime, Date endTime); diff --git a/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java b/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java index e104b28..efe3584 100644 --- a/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java @@ -160,4 +160,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper { + /** + * 查询问题趋势 + * @param year 年份 + * @param args 问题来源变参数组 + * @return + */ + List getTrend(Integer year, String ...args); + // region 首页大屏 /** @@ -20,16 +28,16 @@ public interface NegativeMapper extends BaseMapper { * @param beginTime * @param endTime */ - @Select("SELECT sd1.short_name AS label, " + - "count(DISTINCT ng.id ) AS `value` " + + @Select("SELECT " + + "sd.short_name AS label, " + + "COUNT(DISTINCT ng.id ) AS `value` " + "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.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 " + - "ORDER BY `value` DESC " ) + "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" + + "GROUP BY sd.short_name " + + "ORDER BY `value` DESC; " ) List selectOrganizeProblemRank(Integer groupType, Date beginTime, Date endTime); // 业务类型占比 @@ -47,118 +55,62 @@ public interface NegativeMapper extends BaseMapper { "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 " + + "SUM( IF(problemSourcesCode IN (27,28,29,30),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, " + + @Select("SELECT " + + "sd.short_name AS `name`, " + + "sd.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 " + + "SUM( IF(problemSourcesCode IN (27,28,29,30),1, 0) ) AS reviewPro " + + "FROM sup_depart sd " + + "LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + + "AND 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} " + + "WHERE sd.statistics_group_id=3 " + + "GROUP BY sd.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 " + - " INNER join sup_depart sd1 on sd.pid=sd1.id " + - " and sd1.LEVEL=2 AND sd1.statistics_group_id=3" + - " ) " + - "as temp on ng.involveDepartId=temp.id " + - "WHERE ng.checkStatus<>3 AND problemSourcesCode in (13, 15, 16) " + - "AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") - Integer seleGlobalMapIconInfoDc(Date beginTime, Date endTime, Integer departId); - - @Select("SELECT count(*) FROM negative ng INNER JOIN " + - " (" + - " SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " + - " INNER join sup_depart sd1 on sd.pid=sd1.id " + - " and sd1.LEVEL=2 AND sd1.statistics_group_id=3" + - " ) " + - "as temp on ng.involveDepartId=temp.id " + - "WHERE ng.checkStatus<>3 AND problemSourcesCode in (17, 18, 19, 20) " + - "AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") - Integer seleGlobalMapIconInfoAjhc(Date beginTime, Date endTime, Integer departId); - - @Select("SELECT count(*) FROM negative ng INNER JOIN " + - " (" + - " SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " + - " INNER join sup_depart sd1 on sd.pid=sd1.id " + - " and sd1.LEVEL=2 AND sd1.statistics_group_id =3 " + - " ) " + - "as temp on ng.involveDepartId=temp.id " + - "WHERE ng.checkStatus<>3 AND problemSourcesCode in (21, 22, 23, 24, 25) " + - "AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") - Integer seleGlobalMapIconInfoXf(Date beginTime, Date endTime, Integer departId); - - @Select("SELECT count(*) FROM negative ng INNER JOIN " + - " (" + - " SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " + - " INNER join sup_depart sd1 on sd.pid=sd1.id " + - " and sd1.LEVEL=2 AND sd1.statistics_group_id =3 " + - " ) " + - "as temp on ng.involveDepartId=temp.id " + - "WHERE ng.checkStatus<>3 AND problemSourcesCode=2 " + - "AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") - Integer seleGlobalMapIconInfoJwpy(Date beginTime, Date endTime, Integer departId); - - @Select("SELECT count(*) FROM negative ng INNER JOIN " + - " (" + - " SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " + - " INNER join sup_depart sd1 on sd.pid=sd1.id " + - " and sd1.LEVEL=2 AND sd1.statistics_group_id =3 " + - " ) " + - "as temp on ng.involveDepartId=temp.id " + - "WHERE ng.checkStatus<>3 AND problemSourcesCode=26 " + - "AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") - Integer seleGlobalMapIconInfoSjdc(Date beginTime, Date endTime, Integer departId); - List getGlobalRecentlyTrendByMonth(String year); // 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, " + - "ROUND((COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null))) / COUNT(DISTINCT ng.id) * 100, 1) AS correctionRate " + - "FROM sup_depart sd " + - "INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + - "INNER JOIN negative ng ON sd.id=ng.involveDepartId " + - "WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") + @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 correctionRate " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + + "WHERE problemSourcesCode IN (13) " + + "AND sd.statistics_group_id=#{groupId} " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime};") DayTimeSuperviseVo getSuperversionRank(Date beginTime, Date endTime, Integer groupId); - @Select("SELECT sd1.short_name as label, " + - "sd1.id AS departId, " + - "count( DISTINCT ng.id) AS denominator, " + - "count( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " + - "ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS rate, " + - "ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS value " + - "FROM sup_depart sd " + - "INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + - "INNER JOIN negative ng on ng.involveDepartId=sd.id " + - "LEFT JOIN negative_blame nb on ng.id=nb.negativeId " + - "WHERE ng.problemSourcesCode=13 " + - "AND ng.checkStatus<>3 " + + @Select("SELECT " + + "sd.short_name AS label, " + + "sd.id AS departId, " + + "COUNT(DISTINCT ng.id) AS denominator, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " + + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rate, " + + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS `value` " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + + "WHERE problemSourcesCode IN (13) " + + "AND sd.statistics_group_id=#{groupId} " + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "GROUP BY label " + - "order by rate desc") + "GROUP BY sd.short_name " + + "ORDER BY rate") List getChangedRateRank(Date beginTime, Date endTime, Integer groupId); @Select("SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " + @@ -180,51 +132,67 @@ public interface NegativeMapper extends BaseMapper { " 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, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS rectifedNumber, " + + "COUNT( DISTINCT ng.involveDepartId ) AS departNumber, " + + "COUNT( DISTINCT nb.blameIdCode ) AS personNumber, " + + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rectifyRate " + + "FROM negative ng " + + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + + "WHERE ng.problemSourcesCode IN (13, 15) " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") + SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime); - @Select("SELECT sd1.short_name AS `name`, " + - "sd1.id as departId, " + - "COUNT(DISTINCT ng.id ) AS totalPro, " + - "COUNT( DISTINCT if(ng.isRectifyCode=0, ng.id, NULL)) AS changing, " + - "COUNT( DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) AS changed, " + - "COUNT(DISTINCT nb.blameName ) AS personNum," + - "COUNT(DISTINCT ng.involveDepartId) AS relationOrg, " + - "IFNULL( ROUND( ( COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT( DISTINCT ng.id ) ) * 100, 1 ), 0) AS changedRate " + + + + @Select("SELECT " + + "sd.short_name AS `name`, " + + "sd.id AS departId, " + + "COUNT( DISTINCT ng.id ) AS totalPro, " + + "COUNT( DISTINCT IF(ng.problemSourcesCode=13, ng.id, NULL) ) AS xc, " + + "COUNT( DISTINCT IF(ng.problemSourcesCode=15, ng.id, NULL) ) AS zx, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed , " + + "COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " + + "COUNT( DISTINCT nb.blameIdCode ) AS personNum, " + + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS changedRate " + "FROM sup_depart sd " + - "INNER JOIN sup_depart sd1 ON sd.pid = sd1.id AND sd1.statistics_group_id = 3 " + - "LEFT JOIN negative ng ON sd.id = ng.involveDepartId " + - "AND ng.checkStatus <> 3 " + - "AND ng.problemSourcesCode IN (13, 15) " + - "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + - "GROUP BY `name`;") + "LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + + "AND ng.problemSourcesCode IN (13, 15)" + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + + "WHERE sd.statistics_group_id=3 " + + "GROUP BY sd.short_name " + + "ORDER BY totalPro DESC;") List getSupervisionMapIconInfo(Date beginTime, Date endTime); - List getSupervisionTrend(String year, String[] args); - @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," + - "ROUND(COALESCE(COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0), 0) * 100, 1) AS correctionRate " + - "FROM sup_depart sd " + - "INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + - "INNER JOIN negative ng on sd.id=ng.involveDepartId " + - "WHERE ng.checkStatus<>3 " + - "AND ng.problemSourcesCode=15 " + - "AND special_supervision = #{queryType} " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") + @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 correctionRate " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + + "WHERE problemSourcesCode IN (15) " + + "AND ng.special_supervision=#{queryType} " + + "AND sd.statistics_group_id=#{groupId} " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") DayTimeSuperviseVo getYellowBetOverview(Date beginTime, Date endTime, Integer groupId, Integer queryType); - @Select("SELECT sd1.short_name as label, " + - "count( DISTINCT ng.id) AS value " + - "FROM sup_depart sd " + - "INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + - "INNER JOIN negative ng on sd.id= ng.involveDepartId " + - "WHERE ng.checkStatus<>3 " + - "AND ng.problemSourcesCode=15 " + + @Select("SELECT " + + "sd.short_name AS label, " + + "COUNT( DISTINCT ng.id ) AS `value` " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + + "WHERE problemSourcesCode IN (15) " + + "AND ng.special_supervision=#{queryType} " + + "AND sd.statistics_group_id=#{groupId} " + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "AND special_supervision = #{queryType} " + - "GROUP BY label " + - "order by value desc") + "GROUP BY sd.short_name " + + "ORDER BY `value` DESC;") List getYellowBetRankList(Date beginTime, Date endTime, Integer groupId, Integer queryType); @@ -286,25 +254,23 @@ public interface NegativeMapper extends BaseMapper { List getVideoSuperviseMapIconInfo(Date beginTime, Date endTime); - List getVideoSuperviseTrend(String year, String[] args); // endregion // region 案件核查大屏 - @Select("SELECT sd1.short_name AS label, " + - "count(DISTINCT ng.id) AS `value` " + + @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 " + - "INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + - "WHERE checkStatus <> 3 " + - "AND problemSourcesCode in (17, 18, 19, 20) " + - "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "GROUP BY sd1.short_name " + - "ORDER BY `value` DESC") + "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=#{groupId} " + + "AND ng.problemSourcesCode IN (17,18,19,20) " + + "GROUP BY sd.short_name " + + "ORDER BY `value` DESC;") List getCaseVerificationRank(Date beginTime, Date endTime, int groupId); - List getCaseVerificationTrend(String year, String[] args); @Select("SELECT count(DISTINCT ng.id) AS total, " + "COUNT( DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL) ) AS confirmed, " + @@ -319,20 +285,21 @@ public interface NegativeMapper extends BaseMapper { CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime); - @Select("SELECT sd.short_name AS `name`, " + + @Select("SELECT " + + "sd.short_name AS `name`, " + "sd.id AS departId, " + - "COUNT(DISTINCT ng.id) AS total, " + - "COUNT(DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL)) AS confirmed, " + - "COUNT(DISTINCT IF(nb.handleResultCode != 14, nb.blameId, NULL)) AS dealCasePro, " + - "COUNT(DISTINCT nb.blameName) AS punishPre, " + - "COUNT(DISTINCT ng.involveDepartId) AS punishOrg, " + - "IFNULL(ROUND(COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1), 0) AS rate " + - "FROM sup_depart sd " + - "INNER JOIN sup_depart sd1 ON sd.id = sd1.pid AND sd.statistics_group_id = 3 " + - "LEFT JOIN negative ng ON sd1.id = ng.involveDepartId " + - "AND ng.problemSourcesCode IN (17, 18, 19, 20) " + + "COUNT( DISTINCT ng.id ) AS total, " + + "COUNT( DISTINCT IF( ng.checkStatus<>3, ng.id, NULL ) ) AS confirmed, " + + "COUNT( DISTINCT IF( nb.handleResultCode!=14, nb.blameId, NULL ) ) AS dealCasePro, " + + "COUNT( DISTINCT nb.blameIdCode ) AS punishPre, " + + "COUNT( DISTINCT nb.blameDepartId ) AS punishOrg, " + + "IFNULL( ROUND( COUNT( DISTINCT IF( ng.isRectifyCode=1, ng.id, NULL ) )/COUNT( DISTINCT ng.id )*100, 1 ), 0) AS rate " + + "FROM sup_depart sd " + + "LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + + "AND ng.problemSourcesCode IN (17,18,19,20) " + "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " + + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + + "WHERE sd.statistics_group_id=3 " + "GROUP BY sd.short_name;") List getCaseVerificationMap(Date beginTime, Date endTime); @@ -367,34 +334,137 @@ public interface NegativeMapper extends BaseMapper { List getMailTrend(Integer year, Integer type); - List getSubOneTrend(@Param("departPId") Integer departPId, @Param("year") Integer year, @Param("args") String[] args); + List getSubOneTrend(Integer departId, String year, String... args); // endregion // 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); - - SubOneOverViewVo getSubOneSupervisionRankOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String[] args); + @Select("SELECT " + + "COUNT( DISTINCT ng.id ) AS one, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL ) ) AS two, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) AS three, " + + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 )*100, 0) AS four " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (13,15,16) " + + "AND ng.second_involve_depart_id = #{departId} " + + "AND sd.statistics_group_id=10 ") + SubOneOverViewVo getSubOneGlobalPoliceSupervisionRankOverView(Integer departId, Date beginTime, Date endTime); + @Select("SELECT " + + "COUNT( DISTINCT ng.id ) AS one, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL ) ) AS two, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) AS three, " + + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 )*100, 0) AS four " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (13,15,16) " + + "AND ng.second_involve_depart_id = #{departId} " + + "AND sd.statistics_group_id!=10") + SubOneOverViewVo getSubOneGlobalTeamSupervisionRankOverView(Integer departId, Date beginTime, Date endTime); + @Select("SELECT " + + "ng.involveDepartName AS label, " + + "COUNT(DISTINCT ng.id) AS denominator, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " + + "IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS rate, " + + "IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS `value` " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (13,15,16) " + + "AND ng.second_involve_depart_id = #{departPId} " + + "AND sd.statistics_group_id=10 " + + "GROUP BY ng.involveDepartName " + + "ORDER BY rate DESC, denominator DESC") + List getSubOneGlobalPrecinctSupervisionRank(Integer departPId, Date beginTime, Date endTime); - List getSubOneSupervisionRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String[] args); + @Select("SELECT " + + "ng.involveDepartName AS label, " + + "COUNT(DISTINCT ng.id) AS denominator, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " + + "IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS rate, " + + "IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS `value` " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (13,15,16)\n" + + "AND ng.second_involve_depart_id = #{departPId} " + + "AND sd.statistics_group_id!=10 " + + "GROUP BY ng.involveDepartName " + + "ORDER BY rate DESC, denominator DESC") + List getSubOneGlobalTeamSupervisionRank(Integer departPId, Date beginTime, Date endTime); @Select("SELECT count(DISTINCT ng.id) AS one, " + "COUNT( DISTINCT( if(processing_status='processing', ng.id, NULL) ) ) AS two, " + "count(DISTINCT involveDepartId) AS three, " + "count(DISTINCT nb.blameIdCode) AS four, " + - "ROUND( COUNT( DISTINCT( if(processing_status='completed', ng.id, NULL) ) ) / count(DISTINCT ng.id)*100, 1) AS five " + + "ifnull(ROUND( COUNT( DISTINCT( if(processing_status='completed', ng.id, NULL) ) ) / count(DISTINCT ng.id)*100, 1),0) AS five " + "FROM negative ng " + "INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "WHERE sd.pid= #{departPId} " + - "AND ng.discoveryTime BETWEEN #{beginTime} and #{endTime} " + - "AND ng.checkStatus <>3 ") + "AND ng.discoveryTime BETWEEN #{beginTime} and #{endTime} ") SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime); + + @Select("SELECT " + + "COUNT( DISTINCT ng.id ) AS one," + + "COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS two," + + "ifnull(ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 ) ,0) AS three " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (17,18,19,20)\n" + + "AND ng.second_involve_depart_id = #{departPId} " + + "AND sd.statistics_group_id=10") + SubOneOverViewVo getGlobalPoliceCaseVerifyOverView(Integer departPId, Date beginTime, Date endTime); + + @Select("SELECT " + + "COUNT( DISTINCT ng.id ) AS one," + + "COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS two," + + "ifnull(ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 ) ,0) AS three " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (17,18,19,20)\n" + + "AND ng.second_involve_depart_id = #{departPId} " + + "AND sd.statistics_group_id!=10") + SubOneOverViewVo getGlobalTeamCaseVerifyOverView(Integer departPId, Date beginTime, Date endTime); + + @Select("SELECT " + + "ng.involveDepartName AS label, " + + "COUNT( DISTINCT ng.id ) AS value," + + "COUNT( DISTINCT ng.id ) AS numerator, " + + "COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS denominator " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (17,18,19,20) " + + "AND ng.second_involve_depart_id = #{departPId} " + + "AND sd.statistics_group_id=10 " + + "GROUP BY ng.involveDepartName " + + "ORDER BY value DESC " ) + List getGlobalPoliceCaseVerifyRank(Integer departPId, Date beginTime, Date endTime); + + @Select("SELECT " + + "ng.involveDepartName AS label, " + + "COUNT( DISTINCT ng.id ) AS value," + + "COUNT( DISTINCT ng.id ) AS numerator, " + + "COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS denominator " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (17,18,19,20) " + + "AND ng.second_involve_depart_id = #{departPId} " + + "AND sd.statistics_group_id!=10 " + + "GROUP BY ng.involveDepartName " + + "ORDER BY value DESC " ) + List getGlobalTeamCaseVerifyRank(Integer departPId, Date beginTime, Date endTime); + // endregion // region 二级大屏视频督察 @@ -454,23 +524,74 @@ public interface NegativeMapper extends BaseMapper { // 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, " + - "COALESCE( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0 ) AS correctionRate FROM sup_depart sd " + - "INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id=10 AND sd.pid=#{departId} " + - "WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " + + + @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, " + + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.problemSourcesCode IN (13) " + + "AND ng.second_involve_depart_id=#{departId} " + + "AND sd.statistics_group_id=10 " + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") - DayTimeSuperviseVo getPoliceChangedRankOverView(Integer departId, Date beginTime, Date endTime); - - @Select("SELECT count(DISTINCT(ng.id)) as proTotal, " + - "count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " + - "count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " + - "COALESCE( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0 ) AS correctionRate FROM sup_depart sd " + - "INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id!=10 AND sd.pid=#{departId} " + - "WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " + + DayTimeSuperviseVo getPoliceRankOverview(Integer departId, Date beginTime, Date endTime); + + @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, " + + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.problemSourcesCode IN (13) " + + "AND ng.second_involve_depart_id=#{departId} " + + "AND sd.statistics_group_id!=10 " + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") - DayTimeSuperviseVo getTeamChangedRankOverView(Integer departId, Date beginTime, Date endTime); + DayTimeSuperviseVo getTeamRankOverview(Integer departId, Date beginTime, Date endTime); + + @Select("SELECT " + + "sd.short_name AS label, " + + "COUNT(DISTINCT ng.id) AS denominator, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " + + "ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " + + "ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.problemSourcesCode IN (13) " + + "AND ng.second_involve_depart_id=#{departId} " + + "AND sd.statistics_group_id=10 " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "GROUP BY sd.short_name " + + "ORDER BY value DESC;") + List getPoliceChangedRankList(Integer departId, Date beginTime, Date endTime); + + @Select("SELECT " + + "sd.short_name AS label, " + + "COUNT(DISTINCT ng.id) AS denominator, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " + + "ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " + + "ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE ng.problemSourcesCode IN (13) " + + "AND ng.second_involve_depart_id=#{departId} " + + "AND sd.statistics_group_id!=10 " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "GROUP BY sd.short_name " + + "ORDER BY value DESC;") + List getTeamChangedRankList(Integer departId, Date beginTime, Date endTime); + + +// @Select("SELECT count(DISTINCT(ng.id)) as proTotal, " + +// "count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " + +// "count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " + +// "COALESCE( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0 ) AS correctionRate FROM sup_depart sd " + +// "INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id!=10 AND sd.pid=#{departId} " + +// "WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " + +// "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") +// DayTimeSuperviseVo getTeamChangedRankOverView(Integer departId, Date beginTime, Date endTime); @Select("SELECT sd.short_name as label, " + "sd.id AS departId, " + @@ -516,17 +637,18 @@ public interface NegativeMapper extends BaseMapper { "GROUP BY oneLevelContent ") List getSubOneProblemTypeRatio(Integer departId, Date beginTime, Date endTime); - @Select("SELECT COUNT(DISTINCT c.id) AS problemNumber, " + - "COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, null)) AS rectifingNumber, " + - "COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, null)) AS rectifedNumber, " + - "COUNT(DISTINCT c.involveDepartId) AS departNumber, " + - "COUNT(DISTINCT d.blameIdCode) AS personNumber, " + - "ROUND( COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, NULL)) / COUNT(DISTINCT c.id) * 100, 1) AS rectifyRate " + - "FROM sup_depart b INNER JOIN negative c ON b.id = c.involveDepartId AND b.pid=#{departId} " + - "LEFT JOIN negative_blame d ON c.id = d.negativeId " + - "WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " + - "AND checkStatus <>3 " + - "AND problemSourcesCode IN (13, 15)") + @Select("SELECT " + + "COUNT( DISTINCT ng.id ) AS problemNumber, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS rectifingNumber, " + + "COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS rectifedNumber, " + + "COUNT( DISTINCT ng.involveDepartId ) AS departNumber, " + + "COUNT( DISTINCT nb.blameIdCode ) AS personNumber, " + + "ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rectifyRate " + + "FROM negative ng " + + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + + "WHERE ng.problemSourcesCode IN (13, 15) " + + "AND ng.second_involve_depart_id=#{departId} " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ") SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount(Integer departId, Date beginTime, Date endTime); @@ -541,55 +663,59 @@ public interface NegativeMapper extends BaseMapper { 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} ") + @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 correctionRate " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE problemSourcesCode IN (15) " + + "AND ng.special_supervision=#{specialType} " + + "AND ng.second_involve_depart_id=#{departId} " + + "AND sd.statistics_group_id=10 " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") 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} ") + @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 correctionRate " + + "FROM negative ng " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE problemSourcesCode IN (15) " + + "AND ng.special_supervision=#{specialType} " + + "AND ng.second_involve_depart_id=#{departId} " + + "AND sd.statistics_group_id!=10 " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ") DayTimeSuperviseVo getSubOneTeamYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType); - @Select("SELECT sd.short_name AS label, " + - "COUNT(DISTINCT ng.id ) AS `value` " + + @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 " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE problemSourcesCode IN (15) " + + "AND ng.special_supervision=#{specialType} " + + "AND ng.second_involve_depart_id=#{departId} " + + "AND sd.statistics_group_id=10 " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "GROUP BY sd.short_name " + "ORDER BY `value` DESC; ") List getSubOnePoliceYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType); - @Select("SELECT sd.short_name AS label, " + - "COUNT(DISTINCT ng.id ) AS `value` " + + @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 " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + + "WHERE problemSourcesCode IN (15) " + + "AND ng.special_supervision=#{specialType} " + + "AND ng.second_involve_depart_id=#{departId} " + + "AND sd.statistics_group_id!=10 " + + "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "GROUP BY sd.short_name " + "ORDER BY `value` DESC; ") List getSubOneTeamYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType); @@ -597,28 +723,30 @@ public interface NegativeMapper extends BaseMapper { // endregion // region 二级大屏案件核查 - @Select("SELECT sd.short_name AS label, " + - "COUNT(DISTINCT ng.id ) AS `value` " + + @Select("SELECT " + + "ng.involveDepartName 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} " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (17, 18, 19, 20)\n" + + "AND ng.second_involve_depart_id=#{departId} " + "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") + "GROUP BY ng.involveDepartName " + + "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` " + + @Select("SELECT " + + "ng.involveDepartName 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} " + + "LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " + + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode IN (17, 18, 19, 20)\n" + + "AND ng.second_involve_depart_id=#{departId} " + "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") + "GROUP BY ng.involveDepartName " + + "ORDER BY `value` DESC; ") List getTeamCaseVerificationRank(Date beginTime, Date endTime, Integer departId); @Select("SELECT npr.threeLevelContent AS label, " + @@ -634,18 +762,17 @@ public interface NegativeMapper extends BaseMapper { "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, " + + @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 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 " + + "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 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} ") + "WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.second_involve_depart_id=#{departId} " + + "AND ng.problemSourcesCode in (17, 18, 19, 20); ") CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId); @Select("SELECT sdps.label AS `name` , " + @@ -674,6 +801,12 @@ public interface NegativeMapper extends BaseMapper { + @Select("SELECT problemSources AS name, count(ng.id) AS value " + + "FROM negative ng " + + "WHERE problemSourcesCode IN (17, 18, 19, 20) " + + "GROUP BY problemSources") + List getCaseSourceRate(Date beginTime, Date endTime); + // endregion } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java b/src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java index 87b7f81..1ae3605 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java @@ -14,8 +14,8 @@ import lombok.NoArgsConstructor; @NoArgsConstructor public class DayTimeSuperviseVo { private Integer proTotal; - private Integer changed; private Integer changing; + private Integer changed; private Double correctionRate; } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/SubOneOverViewVo.java b/src/main/java/com/biutag/supervision/pojo/vo/SubOneOverViewVo.java index 8a3cdbf..9b3f8ac 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/SubOneOverViewVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/SubOneOverViewVo.java @@ -16,11 +16,11 @@ import java.io.Serializable; @NoArgsConstructor public class SubOneOverViewVo implements Serializable { // 首页二级大屏总览的各种总览,从左到右对应 - private Integer one; - private Integer two; - private Integer three; - private Integer four; - private Integer five; - private Integer six; + private Double one; + private Double two; + private Double three; + private Double four; + private Double five; + private Double six; } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java b/src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java index 1c47d95..e974fcd 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java @@ -12,12 +12,12 @@ import java.io.Serializable; @Data public class SuperviseMapIconVo implements Serializable { private String name; // 分县市局名 + private String departId; private String totalPro; private String changing; private String changed; private String relationOrg; private String personNum; private String changedRate; - private String departId; } diff --git a/src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java b/src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java index a995f50..caf8364 100644 --- a/src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java +++ b/src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java @@ -9,11 +9,11 @@ import lombok.Data; */ @Data public class SupervisionNotifyOverView { - private String problemNumber; - private String rectifingNumber; - private String rectifedNumber; - private String departNumber; - private String personNumber; - private String rectifyRate; + private Integer problemNumber; + private Integer rectifingNumber; + private Integer rectifedNumber; + private Integer departNumber; + private Integer personNumber; + private Integer rectifyRate; } diff --git a/src/main/java/com/biutag/supervision/service/CaseVerificationService.java b/src/main/java/com/biutag/supervision/service/CaseVerificationService.java index e890ff1..e0697d1 100644 --- a/src/main/java/com/biutag/supervision/service/CaseVerificationService.java +++ b/src/main/java/com/biutag/supervision/service/CaseVerificationService.java @@ -28,41 +28,41 @@ public class CaseVerificationService { - public List getCaseVerificationRank(Date beginTime, Date endTime, int groupId) { - List res = negativeMapper.getCaseVerificationRank(beginTime, endTime, groupId); - return res; - } - - - - public List getCaseVerificationTrend(String year, String...args) { - List res = negativeMapper.getCaseVerificationTrend(year, args); - return res; - } - - public List getCaseSourceRate(Date beginTime, Date endTime) { - List res = dataCaseVerifMapper.getCaseSourceRate(beginTime, endTime); - return res; - } - - public CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime) { - CaseVerificationCountVo res = negativeMapper.getAllCaseVerificationCount(beginTime, endTime); - return res; - } - - public List getCaseVerificationMap(Date beginTime, Date endTime) { - List res = negativeMapper.getCaseVerificationMap(beginTime, endTime); - return res; - } - - public List getDealSituation(Date beginTime, Date endTime) { - List res = negativeMapper.getDealSituation(beginTime, endTime); - return res; - } - - public List getConfinementAndPause(Date beginTime, Date endTime, Integer type) { - List res = negativeMapper.getConfinementAndPause(beginTime,endTime, type); - return res; - } +// public List getCaseVerificationRank(Date beginTime, Date endTime, int groupId) { +// List res = negativeMapper.getCaseVerificationRank(beginTime, endTime, groupId); +// return res; +// } +// +// +// +// public List getCaseVerificationTrend(String year, String...args) { +// List res = negativeMapper.getCaseVerificationTrend(year, args); +// return res; +// } +// +// public List getCaseSourceRate(Date beginTime, Date endTime) { +// List res = dataCaseVerifMapper.getCaseSourceRate(beginTime, endTime); +// return res; +// } +// +// public CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime) { +// CaseVerificationCountVo res = negativeMapper.getAllCaseVerificationCount(beginTime, endTime); +// return res; +// } +// +// public List getCaseVerificationMap(Date beginTime, Date endTime) { +// List res = negativeMapper.getCaseVerificationMap(beginTime, endTime); +// return res; +// } +// +// public List getDealSituation(Date beginTime, Date endTime) { +// List res = negativeMapper.getDealSituation(beginTime, endTime); +// return res; +// } +// +// public List getConfinementAndPause(Date beginTime, Date endTime, Integer type) { +// List res = negativeMapper.getConfinementAndPause(beginTime,endTime, type); +// return res; +// } } diff --git a/src/main/java/com/biutag/supervision/service/DataGlobalService.java b/src/main/java/com/biutag/supervision/service/DataGlobalService.java index ff0c7cb..18af87c 100644 --- a/src/main/java/com/biutag/supervision/service/DataGlobalService.java +++ b/src/main/java/com/biutag/supervision/service/DataGlobalService.java @@ -98,30 +98,31 @@ public class DataGlobalService { // 地图数据 public List getMapIconInfo(Date beginTime, Date endTime) { - List res = new ArrayList<>(); - List supDeparts = supDepartMapper.selectDepartsByGroupType(COUNTY_CITY_BUREAUS.getId()); - for (SupDepart supDepart : supDeparts) { - GlobalMapIconVo mapIconVo = new GlobalMapIconVo(); - mapIconVo.setName(supDepart.getShortName()); - mapIconVo.setDepartId(Integer.parseInt(supDepart.getId())); - res.add(mapIconVo); - } - for (GlobalMapIconVo re : res) { - Integer departId = re.getDepartId(); - Integer supervisePro = negativeMapper.seleGlobalMapIconInfoDc(beginTime, endTime, departId); - Integer caseVerifyPro = negativeMapper.seleGlobalMapIconInfoAjhc(beginTime, endTime, departId); - Integer mailPro = negativeMapper.seleGlobalMapIconInfoXf(beginTime, endTime, departId); - Integer policePro = negativeMapper.seleGlobalMapIconInfoJwpy(beginTime, endTime, departId); - Integer reviewPro = negativeMapper.seleGlobalMapIconInfoSjdc(beginTime, endTime, departId); - Integer totalPro = supervisePro + caseVerifyPro + mailPro + policePro + reviewPro; - re.setTotalPro(totalPro != null ? totalPro : 0); - re.setSupervisePro(supervisePro != null ? supervisePro : 0); - re.setCaseVerifyPro(caseVerifyPro != null ? caseVerifyPro : 0); - re.setMailPro(mailPro != null ? mailPro : 0); - re.setPolicePro(policePro != null ? policePro : 0); - re.setReviewPro(reviewPro != null ? reviewPro : 0); - } - return res; +// List res = new ArrayList<>(); +// List supDeparts = supDepartMapper.selectDepartsByGroupType(COUNTY_CITY_BUREAUS.getId()); +// for (SupDepart supDepart : supDeparts) { +// GlobalMapIconVo mapIconVo = new GlobalMapIconVo(); +// mapIconVo.setName(supDepart.getShortName()); +// mapIconVo.setDepartId(Integer.parseInt(supDepart.getId())); +// res.add(mapIconVo); +// } +// for (GlobalMapIconVo re : res) { +// Integer departId = re.getDepartId(); +// Integer supervisePro = negativeMapper.seleGlobalMapIconInfoDc(beginTime, endTime, departId); +// Integer caseVerifyPro = negativeMapper.seleGlobalMapIconInfoAjhc(beginTime, endTime, departId); +// Integer mailPro = negativeMapper.seleGlobalMapIconInfoXf(beginTime, endTime, departId); +// Integer policePro = negativeMapper.seleGlobalMapIconInfoJwpy(beginTime, endTime, departId); +// Integer reviewPro = negativeMapper.seleGlobalMapIconInfoSjdc(beginTime, endTime, departId); +// Integer totalPro = supervisePro + caseVerifyPro + mailPro + policePro + reviewPro; +// re.setTotalPro(totalPro != null ? totalPro : 0); +// re.setSupervisePro(supervisePro != null ? supervisePro : 0); +// re.setCaseVerifyPro(caseVerifyPro != null ? caseVerifyPro : 0); +// re.setMailPro(mailPro != null ? mailPro : 0); +// re.setPolicePro(policePro != null ? policePro : 0); +// re.setReviewPro(reviewPro != null ? reviewPro : 0); +// } +// return res; + return null; } //endregion diff --git a/src/main/java/com/biutag/supervision/service/DataMailService.java b/src/main/java/com/biutag/supervision/service/DataMailService.java index 4ef1291..f7ff703 100644 --- a/src/main/java/com/biutag/supervision/service/DataMailService.java +++ b/src/main/java/com/biutag/supervision/service/DataMailService.java @@ -176,60 +176,15 @@ public class DataMailService extends ServiceImpl mailRank(Integer departId, Integer Repeat, Date beginTime, Date endTime) { - List list = dataPetitionComplaintMapper. - selectDepartStatistic(departId, Repeat, beginTime, endTime); - return list; - } - - - public List getRecentlyMailTrendByDay(Integer sourcesCode, Integer days, Date endTime) { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd"); - // 将 endTime 转换为 LocalDate - LocalDate endLocalDate = endTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - String currentDay = endLocalDate.format(formatter); // 前端页面的最后查询日期 - LocalDate frontDateDay = endLocalDate.minusDays(days); // days天前 - String frontDay = frontDateDay.format(formatter); - List recentMailTrendVos = - dataPetitionComplaintMapper.selectRecentlyMailTrendByDay(MailTrendSourcesEnum.getMappedCodeByCode(sourcesCode), frontDay, currentDay); - return recentMailTrendVos; - } - - // 按月统计信访趋势 - public List getRecentlyMailTrendByMonth(Integer sourcesCode, String year) { - List recentMailTrendVos = - dataPetitionComplaintMapper.selectRecentlyMailTrendByMonth(MailTrendSourcesEnum.getMappedCodeByCode(sourcesCode), year); - return recentMailTrendVos; - } - - - public List getRecentlyMailTrendByMonth12337(String year) { - List recentMailTrendVos = - dataPetition12337Mapper.selectRecentlyMailTrendByMonth12337(year); - return recentMailTrendVos; - } - - public MailOverviewVo getAllMailCount(Date beginTime, Date endTime) { - MailOverviewVo res = negativeMapper.getAllMailCount(beginTime, endTime); - return res; - } - public List getMailTrend(Integer year, Integer type) { List res = negativeMapper.getMailTrend(year, type); return res; } - public MailFirstAndRepeatOverviewVo getFirstAndRepeatOverview(Date beginTime, Date endTime) { - MailFirstAndRepeatOverviewVo res = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime); - return res; - } - public List getMailRank(Date beginTime, Date endTime, int groupId, Integer isRepeat) { - List res = dataPetitionComplaintMapper.getMailRank(beginTime, endTime, groupId, isRepeat); - return res; - } + + public List getMailLeaderRank(Date beginTime, Date endTime, int groupId) { List res = dataPetitionComplaintMapper.getMailLeaderRank(beginTime, endTime, groupId); diff --git a/src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java b/src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java index dd6bf80..c14c8ac 100644 --- a/src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java +++ b/src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java @@ -108,10 +108,10 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl getSupervisionTrend(String year, String ...args) { - List echartsVos = negativeMapper.getSupervisionTrend(year, args); - return echartsVos; - } +// public List getSupervisionTrend(String year, String ...args) { +// List echartsVos = negativeMapper.getSupervisionTrend(year, args); +// return echartsVos; +// } // 地图数据 diff --git a/src/main/java/com/biutag/supervision/service/SubOneService.java b/src/main/java/com/biutag/supervision/service/SubOneService.java index 6cea00d..1d7dd82 100644 --- a/src/main/java/com/biutag/supervision/service/SubOneService.java +++ b/src/main/java/com/biutag/supervision/service/SubOneService.java @@ -24,35 +24,37 @@ public class SubOneService { private NegativeMapper negativeMapper; - public List getSubOneTrend(Integer departPId, Integer year, String... args) { - List res = negativeMapper.getSubOneTrend(departPId, year, args); - return res; - } +// public List getSubOneTrend(Integer departPId, Integer year, String... args) { +// List res = negativeMapper.getSubOneTrend(departPId, year, args); +// return res; +// } - public List getCaseVerifyRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { - List res = negativeMapper.getCaseVerifyRank(departPId, statisticsGroupId, beginTime, endTime, args); - return res; - } +// public List getCaseVerifyRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { +// List res = negativeMapper.getCaseVerifyRank(departPId, statisticsGroupId, beginTime, endTime, args); +// return res; +// } - public SubOneOverViewVo getCaseVerifyOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { - SubOneOverViewVo res = negativeMapper.getCaseVerifyOverView(departPId, statisticsGroupId, beginTime, endTime, args); - return res; - } +// public SubOneOverViewVo getCaseVerifyOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { +// SubOneOverViewVo res = negativeMapper.getCaseVerifyOverView(departPId, statisticsGroupId, beginTime, endTime, args); +// return res; +// } - public SubOneOverViewVo getSubOneSupervisionRankOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { - SubOneOverViewVo res = negativeMapper.getSubOneSupervisionRankOverView(departPId, statisticsGroupId, beginTime, endTime, args); - return res; - } +// public SubOneOverViewVo getSubOneSupervisionRankOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { +// SubOneOverViewVo res = negativeMapper.getSubOneSupervisionRankOverView(departPId, statisticsGroupId, beginTime, endTime, args); +// return res; +// } - public List getSubOneSupervisionRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { - List res = negativeMapper.getSubOneSupervisionRank(departPId, statisticsGroupId, beginTime, endTime, args); - return res; - } +// public List getSubOneSupervisionRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String... args) { +// List res = negativeMapper.getSubOneSupervisionRank(departPId, statisticsGroupId, beginTime, endTime, args); +// return res; +// } public SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime) { SubOneOverViewVo res = negativeMapper.getSubOneOverView(departPId, beginTime, endTime); return res; } + + } diff --git a/src/main/java/com/biutag/supervision/service/SubOneSupervisionNotifyService.java b/src/main/java/com/biutag/supervision/service/SubOneSupervisionNotifyService.java index 5530886..eb48831 100644 --- a/src/main/java/com/biutag/supervision/service/SubOneSupervisionNotifyService.java +++ b/src/main/java/com/biutag/supervision/service/SubOneSupervisionNotifyService.java @@ -22,15 +22,15 @@ public class SubOneSupervisionNotifyService { private final NegativeMapper negativeMapper; - public DayTimeSuperviseVo getChangedRankOverView(Integer groupId, Integer departId, Date beginTime, Date endTime) { - DayTimeSuperviseVo res; - if (groupId != null && groupId == 10) { - res = negativeMapper.getPoliceChangedRankOverView(departId, beginTime, endTime); - } else { - res = negativeMapper.getTeamChangedRankOverView(departId, beginTime, endTime); - } - return res; - } +// public DayTimeSuperviseVo getChangedRankOverView(Integer groupId, Integer departId, Date beginTime, Date endTime) { +// DayTimeSuperviseVo res; +// if (groupId != null && groupId == 10) { +// res = negativeMapper.getPoliceChangedRankOverView(departId, beginTime, endTime); +// } else { +// res = negativeMapper.getTeamChangedRankOverView(departId, beginTime, endTime); +// } +// return res; +// } public List getSubOneChangedRateRank(Integer groupId, Integer departId, Date beginTime, Date endTime) { List res; diff --git a/src/main/java/com/biutag/supervision/service/VideoSuperviseService.java b/src/main/java/com/biutag/supervision/service/VideoSuperviseService.java index 0a1d638..9bd6ad6 100644 --- a/src/main/java/com/biutag/supervision/service/VideoSuperviseService.java +++ b/src/main/java/com/biutag/supervision/service/VideoSuperviseService.java @@ -50,10 +50,10 @@ public class VideoSuperviseService { return res; } - public List getVideoSuperviseTrend(String year, String... args) { - List res = negativeMapper.getVideoSuperviseTrend(year, args); - return res; - } +// public List getVideoSuperviseTrend(String year, String... args) { +// List res = negativeMapper.getVideoSuperviseTrend(year, args); +// return res; +// } //endregion diff --git a/src/main/resources/mapper/NegativeMapper.xml b/src/main/resources/mapper/NegativeMapper.xml index 4a76cc2..efec218 100644 --- a/src/main/resources/mapper/NegativeMapper.xml +++ b/src/main/resources/mapper/NegativeMapper.xml @@ -3,54 +3,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - + SELECT + m.month_name AS `name`, + COUNT( ng.id ) AS `value` FROM sup_month_monthname m - LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime, '%m') = m.month + LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime,'%m') = m.`month` AND YEAR(ng.discoveryTime) = #{year} - AND ng.checkStatus != 3 AND ng.problemSourcesCode IN #{item} GROUP BY m.month_name - ORDER BY m.month ASC; - + ORDER BY m.`month` ASC; - - + SELECT m.month_name AS name, COUNT(DISTINCT ng.id) AS `value` FROM sup_month_monthname m - LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime, '%m') = m.month - AND YEAR(ng.discoveryTime) = #{year} - AND ng.checkStatus != 3 - AND ng.problemSourcesCode IN - #{item} + 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; + ORDER BY m.`month` ASC - + - - - - - - - - - - - + + diff --git a/src/test/java/com/biutag/supervision/controller/datav/SubOneControllerTest.java b/src/test/java/com/biutag/supervision/controller/datav/SubOneControllerTest.java index 6ea4e4e..b5a1587 100644 --- a/src/test/java/com/biutag/supervision/controller/datav/SubOneControllerTest.java +++ b/src/test/java/com/biutag/supervision/controller/datav/SubOneControllerTest.java @@ -52,8 +52,8 @@ public class SubOneControllerTest { @Test void getSubOneTrend() { - List superviseProTrend = subOneService.getSubOneTrend(22, 2024, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); // 督察问题趋势 - System.out.println(superviseProTrend); +// List superviseProTrend = subOneService.getSubOneTrend(22, 2024, XCDC.getValue(), ZXDC.getValue(), SPDC.getValue()); // 督察问题趋势 +// System.out.println(superviseProTrend); } @Test