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/controller/sensitivePerception/ModelClueTaskController.java b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java index 7e2ea23..4baa0a1 100644 --- a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java +++ b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java @@ -2,14 +2,18 @@ package com.biutag.supervision.controller.sensitivePerception; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.model.ModelClueTaskDepartModel; import com.biutag.supervision.pojo.model.ModelClueTaskModel; import com.biutag.supervision.pojo.param.ModelClueTaskQueryParam; import com.biutag.supervision.service.ModelClueTaskService; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * @author wxc * @date 2024/10/16 @@ -26,4 +30,9 @@ public class ModelClueTaskController { return Result.success(modelClueTaskService.page(param)); } + @GetMapping("{taskId}/byDepart") + public Result> listDepart(@PathVariable Integer taskId) { + return Result.success(modelClueTaskService.listDepart(taskId)); + } + } diff --git a/src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java new file mode 100644 index 0000000..93b078d --- /dev/null +++ b/src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java @@ -0,0 +1,12 @@ +package com.biutag.supervision.controller.sensitivePerception; + +import org.springframework.web.bind.annotation.RestController; + +/** + * 单位/个人画像 + * @author wxc + * @date 2024/10/31 + */ +@RestController("profile/depart") +public class ProfileDepartController { +} 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/mapper/ModelClueTaskMapper.java b/src/main/java/com/biutag/supervision/mapper/ModelClueTaskMapper.java index 5574098..09f908e 100644 --- a/src/main/java/com/biutag/supervision/mapper/ModelClueTaskMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/ModelClueTaskMapper.java @@ -5,12 +5,18 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.biutag.supervision.pojo.entity.ModelClueTask; +import com.biutag.supervision.pojo.model.ModelClueTaskDepartModel; import com.biutag.supervision.pojo.model.ModelClueTaskModel; import com.biutag.supervision.pojo.model.NegativeWorkModel; import org.apache.ibatis.annotations.Param; +import java.util.List; + public interface ModelClueTaskMapper extends BaseMapper { Page queryPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + + List selectGroupByDepart(@Param("taskId") Integer taskId); + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/entity/SupDictProblemType.java b/src/main/java/com/biutag/supervision/pojo/entity/SupDictProblemType.java index 71afc1c..a5e7048 100644 --- a/src/main/java/com/biutag/supervision/pojo/entity/SupDictProblemType.java +++ b/src/main/java/com/biutag/supervision/pojo/entity/SupDictProblemType.java @@ -82,4 +82,9 @@ public class SupDictProblemType { @TableField("upd_host") private String updHost; + private Double score; + + // 是否开启严重等级 + private Boolean isActiveLevel; + } \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/model/ModelClueTaskDepartModel.java b/src/main/java/com/biutag/supervision/pojo/model/ModelClueTaskDepartModel.java new file mode 100644 index 0000000..fc42caf --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/model/ModelClueTaskDepartModel.java @@ -0,0 +1,33 @@ +package com.biutag.supervision.pojo.model; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +/** + * @author wxc + * @date 2024/10/17 + */ +@Setter +@Getter +public class ModelClueTaskDepartModel { + + private String departId; + + // 模型名称 + private String departName; + + // 条数 + private Integer size; + + private Integer completedSize; + + private Double completedRate; + + private Integer verifySize; + + private Integer personalSize; + +} 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); diff --git a/src/main/java/com/biutag/supervision/service/ModelClueTaskService.java b/src/main/java/com/biutag/supervision/service/ModelClueTaskService.java index ed8f6cd..bdeee9a 100644 --- a/src/main/java/com/biutag/supervision/service/ModelClueTaskService.java +++ b/src/main/java/com/biutag/supervision/service/ModelClueTaskService.java @@ -6,12 +6,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.biutag.supervision.mapper.ModelClueTaskMapper; import com.biutag.supervision.pojo.entity.ModelClueTask; +import com.biutag.supervision.pojo.model.ModelClueTaskDepartModel; import com.biutag.supervision.pojo.model.ModelClueTaskModel; import com.biutag.supervision.pojo.param.ModelClueTaskQueryParam; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import java.util.ArrayList; +import java.util.List; import java.util.Objects; @RequiredArgsConstructor @@ -32,4 +34,8 @@ public class ModelClueTaskService extends ServiceImpl listDepart(Integer taskId) { + return baseMapper.selectGroupByDepart(taskId); + } + } diff --git a/src/main/resources/mapper/ModelClueTaskMapper.xml b/src/main/resources/mapper/ModelClueTaskMapper.xml index a073799..a6a4817 100644 --- a/src/main/resources/mapper/ModelClueTaskMapper.xml +++ b/src/main/resources/mapper/ModelClueTaskMapper.xml @@ -25,5 +25,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ${ew.getCustomSqlSegment} + \ No newline at end of file