|
|
|
|
@ -3,18 +3,17 @@ package com.biutag.supervision.service;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.biutag.supervision.constants.enums.InspectCaseEnum; |
|
|
|
|
import com.biutag.supervision.mapper.DataCaseVerifMapper; |
|
|
|
|
import com.biutag.supervision.mapper.DataSupervisionNotifyMapper; |
|
|
|
|
import com.biutag.supervision.mapper.NegativeMapper; |
|
|
|
|
import com.biutag.supervision.mapper.NegativeProblemRelationMapper; |
|
|
|
|
import com.biutag.supervision.mapper.*; |
|
|
|
|
import com.biutag.supervision.pojo.dto.CaseVerifDepart; |
|
|
|
|
import com.biutag.supervision.pojo.entity.DataCaseVerif; |
|
|
|
|
import com.biutag.supervision.pojo.entity.DataSupervisionNotify; |
|
|
|
|
import com.biutag.supervision.pojo.entity.Negative; |
|
|
|
|
import com.biutag.supervision.pojo.entity.SupDepart; |
|
|
|
|
import com.biutag.supervision.pojo.vo.*; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
@ -31,6 +30,7 @@ public class DataGobalService {
|
|
|
|
|
|
|
|
|
|
private final NegativeMapper negativeMapper; |
|
|
|
|
private final NegativeProblemRelationMapper negativeProblemRelationMapper; |
|
|
|
|
private final SupDepartMapper supDepartMapper; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取所有大屏统计数据 |
|
|
|
|
@ -43,27 +43,27 @@ public class DataGobalService {
|
|
|
|
|
|
|
|
|
|
// 督察问题数量(查实版本)
|
|
|
|
|
Long supervisionPro = getCountByConditions( |
|
|
|
|
Integer.parseInt(InspectCaseEnum.TRUE.getValue()), |
|
|
|
|
Integer.parseInt(InspectCaseEnum.FALSE.getValue()), |
|
|
|
|
beginTime, endTime, |
|
|
|
|
13, 15, 16); |
|
|
|
|
// 获取案件核查问题数量(查实版本)
|
|
|
|
|
Long caseVerificationPro = getCountByConditions( |
|
|
|
|
Integer.parseInt(InspectCaseEnum.TRUE.getValue()), |
|
|
|
|
Integer.parseInt(InspectCaseEnum.FALSE.getValue()), |
|
|
|
|
beginTime, endTime, |
|
|
|
|
17, 18, 19, 20); |
|
|
|
|
// 信访投诉问题数量(查实版本)
|
|
|
|
|
Long complaintPro = getCountByConditions( |
|
|
|
|
Integer.parseInt(InspectCaseEnum.TRUE.getValue()), |
|
|
|
|
Integer.parseInt(InspectCaseEnum.FALSE.getValue()), |
|
|
|
|
beginTime, endTime, |
|
|
|
|
21, 22, 23, 24, 25); |
|
|
|
|
// 警务评议问题数量(查实版本)
|
|
|
|
|
Long reviewPro = getCountByConditions( |
|
|
|
|
Integer.parseInt(InspectCaseEnum.TRUE.getValue()), |
|
|
|
|
Integer.parseInt(InspectCaseEnum.FALSE.getValue()), |
|
|
|
|
beginTime, endTime, |
|
|
|
|
2); |
|
|
|
|
// 审计监督问题数量(查实版本)
|
|
|
|
|
Long auditPro = getCountByConditions( |
|
|
|
|
Integer.parseInt(InspectCaseEnum.TRUE.getValue()), |
|
|
|
|
Integer.parseInt(InspectCaseEnum.FALSE.getValue()), |
|
|
|
|
beginTime, endTime, |
|
|
|
|
26); |
|
|
|
|
Long totalPro = caseVerificationPro + supervisionPro + complaintPro + reviewPro + auditPro; |
|
|
|
|
@ -80,6 +80,7 @@ public class DataGobalService {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询核查属实的公共方法 |
|
|
|
|
* |
|
|
|
|
* @param checkStatus 检查状态 |
|
|
|
|
* @param startTime 开始时间 |
|
|
|
|
* @param endTime 结束时间 |
|
|
|
|
@ -88,7 +89,7 @@ public class DataGobalService {
|
|
|
|
|
*/ |
|
|
|
|
public Long getCountByConditions(Integer checkStatus, Date startTime, Date endTime, Integer... problemSourcesCodes) { |
|
|
|
|
QueryWrapper<Negative> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("checkStatus", checkStatus) |
|
|
|
|
queryWrapper.ne("checkStatus", checkStatus) |
|
|
|
|
.between("discoveryTime", startTime, endTime) |
|
|
|
|
.and(wrapper -> { |
|
|
|
|
for (int i = 0; i < problemSourcesCodes.length; i++) { |
|
|
|
|
@ -119,6 +120,7 @@ public class DataGobalService {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取问题类型占比 |
|
|
|
|
* |
|
|
|
|
* @param beginTime |
|
|
|
|
* @param endTime |
|
|
|
|
* @return |
|
|
|
|
@ -130,6 +132,7 @@ public class DataGobalService {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取突出问题排名 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public List<StrongProblemRank> getStrongProblemRank(Date beginTime, Date endTime) { |
|
|
|
|
@ -166,4 +169,31 @@ public class DataGobalService {
|
|
|
|
|
List<CommonVo> res = negativeProblemRelationMapper.selectReviewProTotal(beginTime, endTime); |
|
|
|
|
return res; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public List<GobalMapIconVo> getMapIconInfo(Date beginTime, Date endTime) { |
|
|
|
|
List<GobalMapIconVo> res = new ArrayList<>(); |
|
|
|
|
List<SupDepart> supDeparts = supDepartMapper.selectDepartsByGroupType(3); |
|
|
|
|
for (SupDepart supDepart : supDeparts) { |
|
|
|
|
GobalMapIconVo mapIconVo = new GobalMapIconVo(); |
|
|
|
|
mapIconVo.setName(supDepart.getShortName()); |
|
|
|
|
mapIconVo.setDepartId(Integer.parseInt(supDepart.getId())); |
|
|
|
|
res.add(mapIconVo); |
|
|
|
|
} |
|
|
|
|
for (GobalMapIconVo re : res) { |
|
|
|
|
Integer departId = re.getDepartId(); |
|
|
|
|
Integer supervisePro = negativeMapper.seleGobalMapIconInfoDc(beginTime, endTime, departId); |
|
|
|
|
Integer caseVerifyPro = negativeMapper.seleGobalMapIconInfoAjhc(beginTime, endTime, departId); |
|
|
|
|
Integer mailPro = negativeMapper.seleGobalMapIconInfoXf(beginTime, endTime, departId); |
|
|
|
|
Integer policePro = negativeMapper.seleGobalMapIconInfoJwpy(beginTime, endTime, departId); |
|
|
|
|
Integer reviewPro = negativeMapper.seleGobalMapIconInfoSjdc(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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|