diff --git a/pom.xml b/pom.xml index f933067..a691dd3 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,12 @@ + + com.google.code.gson + gson + 2.10.1 + + org.apache.httpcomponents diff --git a/src/main/java/com/biutag/supervision/constants/enums/RepeatEnum.java b/src/main/java/com/biutag/supervision/constants/enums/RepeatEnum.java index 0ad1243..138f893 100644 --- a/src/main/java/com/biutag/supervision/constants/enums/RepeatEnum.java +++ b/src/main/java/com/biutag/supervision/constants/enums/RepeatEnum.java @@ -11,6 +11,9 @@ public enum RepeatEnum { FIRST_MAIL(1, "初访信件"), REPEAT_MAIL(2, "重访信件"); + + + private Integer id; private String label; 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 77a73ee..cfac05d 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataMailViewController.java @@ -7,8 +7,7 @@ import com.biutag.supervision.constants.enums.RepeatEnum; import com.biutag.supervision.mapper.DataPetitionComplaintMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.dto.CaseVerifDepart; -import com.biutag.supervision.pojo.vo.RecentMailTrendByDayVo; -import com.biutag.supervision.pojo.vo.RecentMailTrendByMonthVo; +import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.service.DataMailService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -43,15 +42,99 @@ public class DataMailViewController { private final DataMailService dataMailService; private final DataPetitionComplaintMapper dataPetitionComplaintMapper; - /** - * 信访数据大屏统计 - * @param beginTime - * @param endTime - * @return - */ + // region 左边 + // 初访重访情况 + @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); + // 初访重访分类数据排行 + 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 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); + JSONObject data = new JSONObject() + .fluentPut("firstAndRepeatOverview", firstAndRepeatOverview) + .fluentPut("fxsjFirstRankList", fxsjFirstRankList) + .fluentPut("fxsjRepeatRankList", fxsjRepeatRankList) + .fluentPut("fxsjLeaderViewRankList", fxsjLeaderViewRankList) + .fluentPut("bwzdFirstRankList", bwzdFirstRankList) + .fluentPut("bwzdRepeatRankList", bwzdRepeatRankList) + .fluentPut("bwzdLeaderViewRankList", bwzdLeaderViewRankList); + return Result.success(data); + } + + // endregion + // region 中间 + // 信访数据中央总览统计 + @Operation(summary = "信访数据大屏中央数据统计") + @GetMapping("/getAllMailCount") + public Result getAllMailCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + // 信访数据总数概览 + MailOverviewVo overview = dataMailService.getAllMailCount(beginTime, endTime); + JSONObject data = new JSONObject().fluentPut("overview", overview); + return Result.success(data); + } + + + @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.getMailTrend(year, 24); // 12337信访 + JSONObject data = new JSONObject().fluentPut("countryList", countryList) + .fluentPut("policeList", policeList) + .fluentPut("manageList", manageList) + .fluentPut("numberList", numberList); + return Result.success(data); + } +// endregion + + // region 右边 + // 缠访集访情况 + @Operation(summary = "缠访集访情况") + @GetMapping("/getEntanglementAndMassMail") + public Result getEntanglementAndMassMail(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { + // 缠访集访情况 + 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 bwzdLeaderReviewList = dataMailService.getMailLeaderRank(beginTime, endTime, 4); + List bwzdEntanglementList = dataMailService.getEntanglementMailRank(beginTime, endTime, 4); + List bwzdMassList = dataMailService.getMassMailRank(beginTime, endTime, 4); + + JSONObject data = new JSONObject() + .fluentPut("mailEntanglementMassOverview", mailEntanglementMassOverview) + .fluentPut("fxsjLeaderReviewList", fxsjLeaderReviewList) + .fluentPut("fxsjEntanglementList", fxsjEntanglementList) + .fluentPut("fxsjMassList", fxsjMassList) + .fluentPut("bwzdLeaderReviewList", bwzdLeaderReviewList) + .fluentPut("bwzdEntanglementList", bwzdEntanglementList) + .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) { + 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); // 分县市局信初重访领导访排名 @@ -82,6 +165,7 @@ public class DataMailViewController { return Result.success(data); } + /** * 信访数据大屏信访趋势统计(按日) */ @@ -186,6 +270,6 @@ public class DataMailViewController { jsonObject.fluentPut("totalList", totalList); return Result.success(jsonObject); } - +// endregion } 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 8ae93f5..181bc8a 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DatavRightsComfortController.java @@ -36,7 +36,7 @@ public class DatavRightsComfortController { private final DataRightsComfortService dataRightsComfortService; private final RpcInfringerResultService rpcInfringerResultService; - private final CountyStreetDeptService countyStreetDeptService; + @GetMapping public Result rightsComfort(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @@ -103,6 +103,8 @@ public class DatavRightsComfortController { comfortOverview.setComfortTotal(comfortTotal); comfortOverview.setHitTotal(hitTotal); comfortOverview.setComfortMoney(comfortMoney); + comfortOverview.setComfortCaseTotal(0); + comfortOverview.setHurtTotal(0); JSONObject data = new JSONObject().fluentPut("comfortOverview", comfortOverview); return Result.success(data); } @@ -156,34 +158,6 @@ public class DatavRightsComfortController { } - @GetMapping("/test") - public Result test() { - Integer departId = 3490; - - List depts = countyStreetDeptService.getTest(departId); - Map geoJson = new HashMap<>(); - geoJson.put("type", "FeatureCollection"); - List> features = new ArrayList<>(); - for (CountyStreetDept dept : depts) { - Map feature = new HashMap<>(); - feature.put("type", "Feature"); - - Map properties = new HashMap<>(); - properties.put("name", dept.getName()); - feature.put("properties", properties); - - Map geometry = new HashMap<>(); - geometry.put("type", "MultiPolygon"); -// geometry.put("coordinates", new Gson().fromJson(dept.getGeometry(), Object.class)); - feature.put("geometry", geometry); - features.add(feature); - } - geoJson.put("features", features); - - JSONObject jsonObject = new JSONObject(); - jsonObject.put("geoJson", geoJson); - return Result.success(jsonObject); - } // endregion diff --git a/src/main/java/com/biutag/supervision/controller/datav/SubOneController.java b/src/main/java/com/biutag/supervision/controller/datav/SubOneController.java new file mode 100644 index 0000000..3d46e8c --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/datav/SubOneController.java @@ -0,0 +1,58 @@ +package com.biutag.supervision.controller.datav; + +import com.alibaba.fastjson.JSONObject; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.entity.CountyStreetDept; +import com.biutag.supervision.service.CountyStreetDeptService; +import com.google.gson.Gson; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.RequiredArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.*; + +/** + * @Auther: sh + * @Date: 2024/12/4 16:30 + * @Description: 一级子屏 + */ +@Tag(name = "一级子屏") +@RequestMapping("datav/sub1/") +@RequiredArgsConstructor +@RestController +public class SubOneController { + + private final CountyStreetDeptService countyStreetDeptService; + @GetMapping("/test") + public Result test(@RequestParam Integer departId) { + List depts = countyStreetDeptService.getTest(4062); + Map geoJson = new HashMap<>(); + geoJson.put("type", "FeatureCollection"); + List> features = new ArrayList<>(); + for (CountyStreetDept dept : depts) { + Map feature = new HashMap<>(); + feature.put("type", "Feature"); + + Map properties = new HashMap<>(); + properties.put("name", dept.getName()); + feature.put("properties", properties); + + Map geometry = new HashMap<>(); + geometry.put("type", "MultiPolygon"); + geometry.put("coordinates", new Gson().fromJson(dept.getGeometry(), Object.class)); + feature.put("geometry", geometry); + features.add(feature); + } + geoJson.put("features", features); + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("geoJson", geoJson); + return Result.success(jsonObject); + } + +} + diff --git a/src/main/java/com/biutag/supervision/mapper/CountyStreetDeptMapper.java b/src/main/java/com/biutag/supervision/mapper/CountyStreetDeptMapper.java index 345ca2a..9269582 100644 --- a/src/main/java/com/biutag/supervision/mapper/CountyStreetDeptMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/CountyStreetDeptMapper.java @@ -15,12 +15,12 @@ import java.util.List; */ public interface CountyStreetDeptMapper extends BaseMapper { - @Select("SELECT id, dept_pid_name, dept_pid, pid, \n" + - "CONVERT(coordinates, CHAR) AS coordinates, \n" + - "level, name, sort, \n" + - "CONVERT(geometry, CHAR) AS geometry, \n" + - "area_name, dept_id, dept_name\n" + - "FROM\tcounty_street_dept \twhere pid = 3490;") + @Select("SELECT id, dept_pid_name, dept_pid, pid, " + + "CONVERT(coordinates, CHAR) AS coordinates, " + + "level, name, sort, " + + "CONVERT(geometry, CHAR) AS geometry, " + + "area_name, dept_id, dept_name " + + "FROM county_street_dept where id = 3319;") List props(Integer id); } diff --git a/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java b/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java index 673d0b9..c9c24cd 100644 --- a/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java @@ -3,8 +3,7 @@ package com.biutag.supervision.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.biutag.supervision.pojo.dto.CaseVerifDepart; import com.biutag.supervision.pojo.entity.DataPetitionComplaint; -import com.biutag.supervision.pojo.vo.RecentMailTrendByDayVo; -import com.biutag.supervision.pojo.vo.RecentMailTrendByMonthVo; +import com.biutag.supervision.pojo.vo.*; import org.apache.ibatis.annotations.Select; import java.util.Date; @@ -94,6 +93,63 @@ public interface DataPetitionComplaintMapper extends BaseMapper selectRecentlyMailTrendByMonth(Integer sourcesCode, String year); - - + @Select("SELECT COUNT( IF(initial_petition=1, 1, NULL) ) AS firstMail, " + + "count( IF( initial_petition=2, 2, NULL) ) AS repeatMail, " + + "count( IF(receiving_leader_name is NOT NULL, 1, NULL) ) AS leaderMail " + + "FROM data_petition_complaint dpc " + + "WHERE discovery_time BETWEEN #{beginTime} AND #{endTime}; ") + MailFirstAndRepeatOverviewVo getFirstAndRepeatOverview(Date beginTime, Date endTime); + + @Select("SELECT sd.short_name AS label, count(*) AS `value` FROM data_petition_complaint dpc " + + "INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " + + "AND sd.statistics_group_id=#{groupId} " + + "AND dpc.second_depart_name is not NULL " + + "WHERE dpc.initial_petition=#{isRepeat} " + + "AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + + "GROUP BY sd.short_name " + + "HAVING label is not NULL " + + "ORDER BY `value` DESC ") + List getMailRank(Date beginTime, Date endTime, int groupId, Integer isRepeat); + + @Select("SELECT sd.short_name AS label, count(*) AS `value` FROM data_petition_complaint dpc " + + "INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " + + "AND sd.statistics_group_id=#{groupId} " + + "AND dpc.second_depart_name is not NULL " + + "WHERE dpc.receiving_leader_name is NOT NULL " + + "AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + + "GROUP BY sd.short_name " + + "HAVING label is not NULL " + + "ORDER BY `value` DESC") + List getMailLeaderRank(Date beginTime, Date endTime, int groupId); + + @Select("SELECT COUNT( IF(mass_visits=1, 1, NULL) ) AS entanglement, " + + "count( IF( entanglement_visits=1, 1, NULL) ) AS mass, " + + "count( IF(receiving_leader_name is NOT NULL, 1, NULL) ) AS leaderReview " + + "FROM data_petition_complaint dpc " + + "WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} ") + MailEntanglementMassOverviewVo getEntanglementAndMassOverview(Date beginTime, Date endTime); + + @Select("SELECT sd.short_name AS label, " + + "count(*) AS `value` FROM data_petition_complaint dpc " + + "INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " + + "AND sd.statistics_group_id=#{groupId} " + + "AND dpc.second_depart_name is not NULL " + + "WHERE dpc.entanglement_visits=1 " + + "AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + + "GROUP BY sd.short_name " + + "HAVING label is not NULL " + + "ORDER BY `value` DESC") + List getEntanglementMailRank(Date beginTime, Date endTime, int groupId); + + @Select("SELECT sd.short_name AS label, " + + "count(*) AS `value` FROM data_petition_complaint dpc " + + "INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " + + "AND sd.statistics_group_id=#{groupId} " + + "AND dpc.second_depart_name is not NULL " + + "WHERE dpc.entanglement_visits=1 " + + "AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + + "GROUP BY sd.short_name " + + "HAVING label is not NULL " + + "ORDER BY `value` DESC ") + List getMassMailRank(Date beginTime, Date endTime, int groupId); } diff --git a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java index b141ea1..c9f25aa 100644 --- a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java @@ -321,6 +321,18 @@ public interface NegativeMapper extends BaseMapper { "GROUP BY npr.threeLevelContent") List getConfinementAndPause(Date beginTime, Date endTime, Integer type); + @Select("SELECT count(DISTINCT ng.id) AS totalMail, " + + "COUNT(DISTINCT ng.problemSourcesCode=21 ) AS countryMail, " + + "COUNT(DISTINCT ng.problemSourcesCode=22 ) AS policeMail, " + + "COUNT(DISTINCT ng.problemSourcesCode=24 ) AS numberMail, " + + "COUNT(DISTINCT ng.problemSourcesCode=23 ) AS manageMail " + + "FROM negative ng WHERE ng.checkStatus <> 3 " + + "AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + + "AND ng.problemSourcesCode in(21, 22, 23, 24)") + MailOverviewVo getAllMailCount(Date beginTime, Date endTime); + + List getMailTrend(Integer year, Integer type); + // endregion } diff --git a/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java b/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java index f8ee40f..4788cda 100644 --- a/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java @@ -31,7 +31,7 @@ public interface RpcApplyMapper extends BaseMapper { @Select("SELECT c.job name, COUNT(c.job) value FROM sup_police c JOIN " + "(SELECT a.emp_no FROM rpc_apply_person a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " + - "WHERE c.del = 0 and b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2) d on c.emp_no = d.emp_no " + + "WHERE b.apply_date BETWEEN #{beginTime} AND #{endTime} AND b.type = 2) d on c.emp_no = d.emp_no " + "GROUP BY c.job") List selectComfortSituation(Date beginTime, Date endTime); diff --git a/src/main/java/com/biutag/supervision/pojo/vo/MailEntanglementMassOverviewVo.java b/src/main/java/com/biutag/supervision/pojo/vo/MailEntanglementMassOverviewVo.java new file mode 100644 index 0000000..8cd8e30 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/MailEntanglementMassOverviewVo.java @@ -0,0 +1,19 @@ +package com.biutag.supervision.pojo.vo; + +import lombok.Data; + +/** + * @Auther: sh + * @Date: 2024/12/4 14:37 + * @Description: 信访投诉缠访集访情况总览VO 也可以初访重访情况VO + */ +@Data +public class MailEntanglementMassOverviewVo { + + + private Integer entanglement; // 缠访闹访 + private Integer mass; // 群体集访 + private Integer leaderReview; // 领导督办 + +} + diff --git a/src/main/java/com/biutag/supervision/pojo/vo/MailFirstAndRepeatOverviewVo.java b/src/main/java/com/biutag/supervision/pojo/vo/MailFirstAndRepeatOverviewVo.java new file mode 100644 index 0000000..8dc2b62 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/MailFirstAndRepeatOverviewVo.java @@ -0,0 +1,16 @@ +package com.biutag.supervision.pojo.vo; + +import lombok.Data; + +/** + * @Auther: sh + * @Date: 2024/12/4 11:48 + * @Description: 信访投诉初访重访情况总览VO 也可以缠访集访情况VO + */ +@Data +public class MailFirstAndRepeatOverviewVo { + private Integer firstMail; + private Integer repeatMail; + private Integer leaderMail; +} + diff --git a/src/main/java/com/biutag/supervision/pojo/vo/MailOverviewVo.java b/src/main/java/com/biutag/supervision/pojo/vo/MailOverviewVo.java new file mode 100644 index 0000000..9901d9b --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/vo/MailOverviewVo.java @@ -0,0 +1,18 @@ +package com.biutag.supervision.pojo.vo; + +import lombok.Data; + +/** + * @Auther: sh + * @Date: 2024/12/4 09:30 + * @Description: 信访投诉大屏中央数据总览 + */ +@Data +public class MailOverviewVo { + private Integer totalMail; + private Integer countryMail; + private Integer policeMail; + private Integer numberMail; + private Integer manageMail; +} + diff --git a/src/main/java/com/biutag/supervision/service/DataMailService.java b/src/main/java/com/biutag/supervision/service/DataMailService.java index 3c882dc..1fadb58 100644 --- a/src/main/java/com/biutag/supervision/service/DataMailService.java +++ b/src/main/java/com/biutag/supervision/service/DataMailService.java @@ -11,12 +11,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.biutag.supervision.constants.enums.*; import com.biutag.supervision.mapper.DataPetition12337Mapper; import com.biutag.supervision.mapper.DataPetitionComplaintMapper; +import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.pojo.dto.*; import com.biutag.supervision.pojo.entity.DataPetition12337; import com.biutag.supervision.pojo.entity.DataPetitionComplaint; import com.biutag.supervision.pojo.param.DataPetitionComplaintQueryParam; -import com.biutag.supervision.pojo.vo.RecentMailTrendByDayVo; -import com.biutag.supervision.pojo.vo.RecentMailTrendByMonthVo; +import com.biutag.supervision.pojo.vo.*; import lombok.RequiredArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; @@ -37,6 +37,7 @@ public class DataMailService extends ServiceImpl page(DataPetitionComplaintQueryParam queryParam) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(DataPetitionComplaint::getProblemSourcesCode, queryParam.getProblemSourcesCode()) @@ -237,4 +238,48 @@ public class DataMailService extends ServiceImpl 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); + return res; + } + + public MailEntanglementMassOverviewVo getEntanglementAndMassOverview(Date beginTime, Date endTime) { + MailEntanglementMassOverviewVo res = dataPetitionComplaintMapper.getEntanglementAndMassOverview(beginTime, endTime); + return res; + } + + + + public List getEntanglementMailRank(Date beginTime, Date endTime, int groupId) { + List res = dataPetitionComplaintMapper.getEntanglementMailRank(beginTime, endTime, groupId); + return res; + } + + public List getMassMailRank(Date beginTime, Date endTime, int groupId) { + List res = dataPetitionComplaintMapper.getMassMailRank(beginTime, endTime, groupId); + return res; + } } diff --git a/src/main/resources/mapper/NegativeMapper.xml b/src/main/resources/mapper/NegativeMapper.xml index 40b3485..5862a41 100644 --- a/src/main/resources/mapper/NegativeMapper.xml +++ b/src/main/resources/mapper/NegativeMapper.xml @@ -108,6 +108,40 @@ ORDER BY m.month ASC; +