Browse Source

Merge remote-tracking branch 'origin/master'

main
sjh 1 year ago
parent
commit
44490c6eb2
  1. 14
      src/main/java/com/biutag/supervision/controller/datav/DataPetitionComplaintViewController.java
  2. 9
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ModelClueTaskController.java
  3. 12
      src/main/java/com/biutag/supervision/controller/sensitivePerception/ProfileDepartController.java
  4. 42
      src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java
  5. 6
      src/main/java/com/biutag/supervision/mapper/ModelClueTaskMapper.java
  6. 5
      src/main/java/com/biutag/supervision/pojo/entity/SupDictProblemType.java
  7. 33
      src/main/java/com/biutag/supervision/pojo/model/ModelClueTaskDepartModel.java
  8. 18
      src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java
  9. 6
      src/main/java/com/biutag/supervision/service/ModelClueTaskService.java
  10. 19
      src/main/resources/mapper/ModelClueTaskMapper.xml

14
src/main/java/com/biutag/supervision/controller/datav/DataPetitionComplaintViewController.java

@ -55,15 +55,23 @@ public class DataPetitionComplaintViewController {
List<CaseVerifDepart> bwzdFirstMailList = dataPetitionComplaintService.mailRank(DepartGroupEnum.BUREAU_AFFILIATED.getId(), RepeatEnum.FIRST_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> bwzdRepeatMailList = dataPetitionComplaintService.mailRank(DepartGroupEnum.BUREAU_AFFILIATED.getId(), RepeatEnum.REPEAT_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> bwzdLeaderViewMailList = dataPetitionComplaintMapper.selectLeaderViewMail(DepartGroupEnum.BUREAU_AFFILIATED.getId(), beginTime, endTime);
//
// 分县市局领导督办、缠访、集访排名
List<CaseVerifDepart> fxsjEntanglementMailList = dataPetitionComplaintMapper.selectEntanglementMail(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), 1, beginTime, endTime);
List<CaseVerifDepart> fxsjMassMailList = dataPetitionComplaintMapper.selectMassMail(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), 1, beginTime, endTime);
// 部委支队缠访集访排名
List<CaseVerifDepart> bwzdEntanglementMailList = dataPetitionComplaintMapper.selectEntanglementMail(DepartGroupEnum.BUREAU_AFFILIATED.getId(), 1, beginTime, endTime);
List<CaseVerifDepart> 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);
}

9
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<List<ModelClueTaskDepartModel>> listDepart(@PathVariable Integer taskId) {
return Result.success(modelClueTaskService.listDepart(taskId));
}
}

12
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 {
}

42
src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java

@ -11,7 +11,14 @@ import java.util.List;
public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComplaint> {
/**
* 查询初访重访
* @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<DataPetitionComp
"GROUP BY temp.second_depart_id")
List<CaseVerifDepart> 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<DataPetitionComp
"WHERE sd.statistics_group_id=#{departId} and temp.receiving_leader_name is not null " +
"GROUP BY temp.second_depart_id")
List<CaseVerifDepart> 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<CaseVerifDepart> 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<CaseVerifDepart> selectMassMail(Integer id, int isMass, Date beginTime, Date endTime);
}

6
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<ModelClueTask> {
Page<ModelClueTaskModel> queryPage(@Param("page") Page<ModelClueTask> page, @Param(Constants.WRAPPER) QueryWrapper<ModelClueTask> queryWrapper);
List<ModelClueTaskDepartModel> selectGroupByDepart(@Param("taskId") Integer taskId);
}

5
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;
}

33
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;
}

18
src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java

@ -128,42 +128,42 @@ public class DataPetitionComplaintService extends ServiceImpl<DataPetitionCompla
// 国家信访
QueryWrapper<DataPetitionComplaint> 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<DataPetitionComplaint> 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<DataPetitionComplaint> 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<DataPetitionComplaint> 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<DataPetitionComplaint> 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<DataPetitionComplaint> 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<DataPetitionComplaint> 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<DataPetitionComplaint> 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<DataPetitionCompla
}
// 分类数据排行
// 初访重访分类数据排行
public List<CaseVerifDepart> mailRank(Integer departId, Integer Repeat, Date beginTime, Date endTime) {
List<CaseVerifDepart> list = dataPetitionComplaintMapper.
selectDepartStatistic(departId, Repeat, beginTime, endTime);

6
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<ModelClueTaskMapper, Model
return page;
}
public List<ModelClueTaskDepartModel> listDepart(Integer taskId) {
return baseMapper.selectGroupByDepart(taskId);
}
}

19
src/main/resources/mapper/ModelClueTaskMapper.xml

@ -25,5 +25,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${ew.getCustomSqlSegment}
</select>
<select id="selectGroupByDepart" resultType="com.biutag.supervision.pojo.model.ModelClueTaskDepartModel">
SELECT
n.involveDepartId,
n.involveDepartName depart_name,
count( n.id ) size,
sum( CASE WHEN n.processing_status = 'completed' THEN 1 ELSE 0 END ) completed_size,
sum( CASE WHEN n.processing_status = 'completed' THEN 1 ELSE 0 END ) / count( n.id ) * 100 completed_rate,
sum( CASE WHEN n.checkStatus IN ( '1', '2' ) THEN 1 ELSE 0 END ) verify_size,
count( DISTINCT nb.blameIdCode ) personal_size
FROM
model_clue mc
LEFT JOIN negative n ON mc.negative_id = n.id
LEFT JOIN negative_blame nb ON n.id = nb.negativeId
AND type = 'personal'
WHERE
mc.task_id = #{taskId}
GROUP BY
n.involveDepartId
</select>
</mapper>
Loading…
Cancel
Save