From 51a2bc06b35bcfb61e28b4e9b215c2a95e02551b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E7=88=B1=E5=AD=A6=E4=B9=A0=E7=9A=84=E7=9F=B3?= =?UTF-8?q?=E5=90=8C=E5=AD=A6?= <2936013465@qq.com> Date: Thu, 31 Oct 2024 15:09:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E8=AE=BF=E5=A4=A7=E5=B1=8F=E5=90=8E?= =?UTF-8?q?=E7=AB=AF1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DataPetitionComplaintViewController.java | 14 +++++-- .../mapper/DataPetitionComplaintMapper.java | 42 ++++++++++++++++++- .../service/DataPetitionComplaintService.java | 18 ++++---- 3 files changed, 61 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataPetitionComplaintViewController.java b/src/main/java/com/biutag/supervision/controller/datav/DataPetitionComplaintViewController.java index 7d99035..ff0bbdf 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataPetitionComplaintViewController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataPetitionComplaintViewController.java @@ -55,15 +55,23 @@ public class DataPetitionComplaintViewController { List bwzdFirstMailList = dataPetitionComplaintService.mailRank(DepartGroupEnum.BUREAU_AFFILIATED.getId(), RepeatEnum.FIRST_MAIL.getId(), beginTime, endTime); List bwzdRepeatMailList = dataPetitionComplaintService.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("bwzdLeaderViewMailList", bwzdLeaderViewMailList) + .fluentPut("fxsjEntanglementMailList", fxsjEntanglementMailList) + .fluentPut("fxsjMassMailList", fxsjMassMailList) + .fluentPut("bwzdEntanglementMailList", bwzdEntanglementMailList) + .fluentPut("bwzdMassMailList", bwzdMassMailList); return Result.success(data); } diff --git a/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java b/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java index 18e5373..f8c16d0 100644 --- a/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java @@ -11,7 +11,14 @@ import java.util.List; public interface DataPetitionComplaintMapper extends BaseMapper { - + /** + * 查询初访重访 + * @param departId + * @param Repeat + * @param beginTime + * @param endTime + * @return + */ @Select("SELECT sd.id, sd.short_name label,count(*) value " + "FROM (SELECT * FROM data_petition_complaint dpc " + "WHERE dpc.create_time BETWEEN #{beginTime} AND #{endTime}) as temp " + @@ -20,6 +27,13 @@ public interface DataPetitionComplaintMapper extends BaseMapper selectDepartStatistic(Integer departId, Integer Repeat, Date beginTime, Date endTime); + /** + * 查询领导阅信接访 + * @param departId + * @param beginTime + * @param endTime + * @return + */ @Select("SELECT sd.id, sd.short_name label,count(*) value " + "FROM (SELECT * FROM data_petition_complaint dpc " + "WHERE dpc.create_time BETWEEN #{beginTime} AND #{endTime}) as temp " + @@ -27,4 +41,30 @@ public interface DataPetitionComplaintMapper extends BaseMapper selectLeaderViewMail(Integer departId, Date beginTime, Date endTime); + + + /** + * 缠访闹访县局排行 + * @param id + * @param isEntanglement + * @param beginTime + * @param endTime + * @return + */ + @Select("SELECT sd.id, sd.short_name label,count(*) value " + + "FROM (SELECT * FROM data_petition_complaint dpc " + + "WHERE dpc.create_time BETWEEN #{beginTime} AND #{endTime}) as temp " + + "INNER JOIN sup_depart sd on sd.id=temp.second_depart_id " + + "WHERE sd.statistics_group_id=#{id} AND entanglement_visits =#{isEntanglement} " + + "GROUP BY temp.second_depart_id") + List selectEntanglementMail(Integer id, int isEntanglement, Date beginTime, Date endTime); + + + @Select("SELECT sd.id, sd.short_name label,count(*) value " + + "FROM (SELECT * FROM data_petition_complaint dpc " + + "WHERE dpc.create_time BETWEEN #{beginTime} AND #{endTime}) as temp " + + "INNER JOIN sup_depart sd on sd.id=temp.second_depart_id " + + "WHERE sd.statistics_group_id=#{id} AND mass_visits =#{isMass} " + + "GROUP BY temp.second_depart_id") + List selectMassMail(Integer id, int isMass, Date beginTime, Date endTime); } diff --git a/src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java b/src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java index 166145f..0e7ff69 100644 --- a/src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java +++ b/src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java @@ -128,42 +128,42 @@ public class DataPetitionComplaintService extends ServiceImpl countryQueryWrapper = new QueryWrapper<>(); countryQueryWrapper.eq("problem_sources_code", 21); - countryQueryWrapper.between("create_time", beginTime, endTime); + countryQueryWrapper.between("discovery_time", beginTime, endTime); Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper); // 公安部信访 QueryWrapper policeQueryWrapper = new QueryWrapper<>(); policeQueryWrapper.eq("problem_sources_code", 22); - policeQueryWrapper.between("create_time", beginTime, endTime); + policeQueryWrapper.between("discovery_time", beginTime, endTime); Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper); // 初访 QueryWrapper firstQueryWrapper = new QueryWrapper<>(); firstQueryWrapper.eq("initial_petition", 1); - firstQueryWrapper.between("create_time", beginTime, endTime); + firstQueryWrapper.between("discovery_time", beginTime, endTime); Long firstMail = dataPetitionComplaintMapper.selectCount(firstQueryWrapper); // 重访 QueryWrapper secondQueryWrapper = new QueryWrapper<>(); secondQueryWrapper.eq("initial_petition", 2); - secondQueryWrapper.between("create_time", beginTime, endTime); + secondQueryWrapper.between("discovery_time", beginTime, endTime); Long secondMail = dataPetitionComplaintMapper.selectCount(secondQueryWrapper); // 领导接访 QueryWrapper leaderQueryWrapper = new QueryWrapper<>(); leaderQueryWrapper.isNotNull("receiving_leader_name"); - leaderQueryWrapper.between("create_time", beginTime, endTime); + leaderQueryWrapper.between("discovery_time", beginTime, endTime); Long leaderReceiveMail = dataPetitionComplaintMapper.selectCount(leaderQueryWrapper); // 领导督办 QueryWrapper leaderViewQueryWrapper = new QueryWrapper<>(); leaderViewQueryWrapper.isNotNull("receiving_leader_name"); - leaderViewQueryWrapper.between("create_time", beginTime, endTime); + leaderViewQueryWrapper.between("discovery_time", beginTime, endTime); Long leaderViewMail = dataPetitionComplaintMapper.selectCount(leaderViewQueryWrapper); // 闹访 QueryWrapper tangleQueryWrapper = new QueryWrapper<>(); tangleQueryWrapper.eq("entanglement_visits", 1); - tangleQueryWrapper.between("create_time", beginTime, endTime); + tangleQueryWrapper.between("discovery_time", beginTime, endTime); Long tangleMail = dataPetitionComplaintMapper.selectCount(tangleQueryWrapper); // 集访 QueryWrapper massQueryWrapper = new QueryWrapper<>(); massQueryWrapper.eq("mass_visits", 1); - massQueryWrapper.between("create_time", beginTime, endTime); + massQueryWrapper.between("discovery_time", beginTime, endTime); Long massMail = dataPetitionComplaintMapper.selectCount(massQueryWrapper); JSONObject overview = new JSONObject() // 信访总数(起) @@ -192,7 +192,7 @@ public class DataPetitionComplaintService extends ServiceImpl mailRank(Integer departId, Integer Repeat, Date beginTime, Date endTime) { List list = dataPetitionComplaintMapper. selectDepartStatistic(departId, Repeat, beginTime, endTime);