|
|
|
@ -2,14 +2,11 @@ package com.biutag.supervision.service.datav; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.biutag.supervision.constants.enums.*; |
|
|
|
import com.biutag.supervision.constants.enums.*; |
|
|
|
import com.biutag.supervision.constants.enums.invest.DeleteStatusEnum; |
|
|
|
|
|
|
|
import com.biutag.supervision.constants.enums.invest.ReportProjectNodeEnum; |
|
|
|
|
|
|
|
import com.biutag.supervision.mapper.*; |
|
|
|
import com.biutag.supervision.mapper.*; |
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
import com.biutag.supervision.pojo.dto.DepartAndSubDepartDto; |
|
|
|
import com.biutag.supervision.pojo.dto.DepartAndSubDepartDto; |
|
|
|
@ -22,22 +19,19 @@ import com.biutag.supervision.pojo.param.*; |
|
|
|
import com.biutag.supervision.pojo.param.dataAudit.DataAuditQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.dataAudit.DataAuditQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.negativeBlame.NegativeBlameQueryParam; |
|
|
|
import com.biutag.supervision.pojo.param.negativeBlame.NegativeBlameQueryParam; |
|
|
|
import com.biutag.supervision.pojo.request.datav.DataVRequest; |
|
|
|
import com.biutag.supervision.pojo.request.datav.DataVRequest; |
|
|
|
import com.biutag.supervision.pojo.request.subdatav.SubDataVRequest; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.vo.*; |
|
|
|
import com.biutag.supervision.pojo.vo.*; |
|
|
|
import com.biutag.supervision.repository.dataAudit.DataAuditResourceService; |
|
|
|
import com.biutag.supervision.repository.dataAudit.DataAuditResourceService; |
|
|
|
import com.biutag.supervision.repository.dataCaseVerif.DataCaseVerifResourceService; |
|
|
|
import com.biutag.supervision.repository.dataCaseVerif.DataCaseVerifResourceService; |
|
|
|
import com.biutag.supervision.repository.dataPetitionComplaint.DataPetitionComplaintResourceService; |
|
|
|
import com.biutag.supervision.repository.dataPetitionComplaint.DataPetitionComplaintResourceService; |
|
|
|
import com.biutag.supervision.repository.mail.MailResourceService; |
|
|
|
|
|
|
|
import com.biutag.supervision.repository.negative.NegativeResourceService; |
|
|
|
import com.biutag.supervision.repository.negative.NegativeResourceService; |
|
|
|
import com.biutag.supervision.repository.negativeBlame.NegativeBlameResourceService; |
|
|
|
import com.biutag.supervision.repository.negativeBlame.NegativeBlameResourceService; |
|
|
|
import com.biutag.supervision.repository.reportproject.ReportProjectResourceService; |
|
|
|
import com.biutag.supervision.repository.reportproject.ReportProjectResourceService; |
|
|
|
import com.biutag.supervision.repository.supExternalDepart.SupExternalDepartResourceService; |
|
|
|
import com.biutag.supervision.repository.supExternalDepart.SupExternalDepartResourceService; |
|
|
|
import com.biutag.supervision.repository.supdepart.SupDepartResourceService; |
|
|
|
import com.biutag.supervision.repository.supdepart.SupDepartResourceService; |
|
|
|
import com.biutag.supervision.service.*; |
|
|
|
import com.biutag.supervision.service.DataPetition12337Service; |
|
|
|
|
|
|
|
import com.biutag.supervision.service.SuperviseReportService; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import net.logstash.logback.encoder.org.apache.commons.lang.StringUtils; |
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigDecimal; |
|
|
|
@ -70,30 +64,18 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private SupDepartResourceService supDepartResourceService; |
|
|
|
private SupDepartResourceService supDepartResourceService; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private NegativeBlameService negativeBlameService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private DataPetitionComplaintResourceService dataPetitionComplaintResourceService; |
|
|
|
private DataPetitionComplaintResourceService dataPetitionComplaintResourceService; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private MailResourceService mailResourceService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private SupExternalDepartResourceService supExternalDepartResourceService; |
|
|
|
private SupExternalDepartResourceService supExternalDepartResourceService; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private DataCaseVerifResourceService dataCaseVerifResourceService; |
|
|
|
private DataCaseVerifResourceService dataCaseVerifResourceService; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private SupPoliceService supPoliceService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private DataAuditResourceService dataAuditResourceService; |
|
|
|
private DataAuditResourceService dataAuditResourceService; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private NegativeService negativeService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private RpcApplyMapper rpcApplyMapper; |
|
|
|
private RpcApplyMapper rpcApplyMapper; |
|
|
|
|
|
|
|
|
|
|
|
@ -103,9 +85,6 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private DataPetitionComplaintMapper dataPetitionComplaintMapper; |
|
|
|
private DataPetitionComplaintMapper dataPetitionComplaintMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private DataMailService dataMailService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private MailMapper mailMapper; |
|
|
|
private MailMapper mailMapper; |
|
|
|
|
|
|
|
|
|
|
|
@ -117,9 +96,6 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private DataPetition12337Service dataPetition12337Service; |
|
|
|
private DataPetition12337Service dataPetition12337Service; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private SupDepartMapper supDepartMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private NegativeMapper negativeMapper; |
|
|
|
private NegativeMapper negativeMapper; |
|
|
|
|
|
|
|
|
|
|
|
@ -132,9 +108,6 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private DataCaseVerifMapper dataCaseVerifMapper; |
|
|
|
private DataCaseVerifMapper dataCaseVerifMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private SupDepartService supDepartService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final String NO_BLAME = "不予追责"; |
|
|
|
private static final String NO_BLAME = "不予追责"; |
|
|
|
|
|
|
|
|
|
|
|
private static final BigDecimal WAN = new BigDecimal("10000"); |
|
|
|
private static final BigDecimal WAN = new BigDecimal("10000"); |
|
|
|
@ -596,8 +569,7 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
List<Negative> negatives = negativeMapper.selectList(negativeLambdaQueryWrapper); |
|
|
|
List<Negative> negatives = negativeMapper.selectList(negativeLambdaQueryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
List<Negative> completedList = negatives.stream().filter(item -> ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())).toList(); |
|
|
|
List<Negative> completedList = negatives.stream().filter(item -> ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())).toList(); |
|
|
|
List<Negative> processingList = negatives.stream().filter(item -> ProcessingStatusEnum.processing.name().equals(item.getProcessingStatus())).toList(); |
|
|
|
List<Negative> processingList = negatives.stream().filter(item -> ProcessingStatusEnum.processingDatav.contains(item.getProcessingStatus())).toList(); |
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<SuperviseReport> superviseReportLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
LambdaQueryWrapper<SuperviseReport> superviseReportLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
// UserAuth user = UserContextHolder.getCurrentUser();
|
|
|
|
// UserAuth user = UserContextHolder.getCurrentUser();
|
|
|
|
// // 权限
|
|
|
|
// // 权限
|
|
|
|
@ -649,7 +621,7 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
|
|
|
|
|
|
|
|
List<Negative> negatives = negativeMapper.getNegativeListData(fxsj.getId(), request.getBeginTime(), request.getEndTime(), proCode); |
|
|
|
List<Negative> negatives = negativeMapper.getNegativeListData(fxsj.getId(), request.getBeginTime(), request.getEndTime(), proCode); |
|
|
|
List<Negative> completedList = negatives.stream().filter(item -> ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())).toList(); |
|
|
|
List<Negative> completedList = negatives.stream().filter(item -> ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())).toList(); |
|
|
|
List<Negative> processingList = negatives.stream().filter(item -> ProcessingStatusEnum.processing.name().equals(item.getProcessingStatus())).toList(); |
|
|
|
List<Negative> processingList = negatives.stream().filter(item -> ProcessingStatusEnum.processingDatav.contains(item.getProcessingStatus())).toList(); |
|
|
|
// 通报期数
|
|
|
|
// 通报期数
|
|
|
|
LambdaQueryWrapper<SuperviseReport> superviseReportLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
LambdaQueryWrapper<SuperviseReport> superviseReportLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
superviseReportLambdaQueryWrapper.between(SuperviseReport::getCrtTime, request.getBeginTime(), request.getEndTime()); |
|
|
|
superviseReportLambdaQueryWrapper.between(SuperviseReport::getCrtTime, request.getBeginTime(), request.getEndTime()); |
|
|
|
@ -725,7 +697,7 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
// List<Negative> completedList = totalNegativeList.stream().filter(item -> ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())).toList();
|
|
|
|
// List<Negative> completedList = totalNegativeList.stream().filter(item -> ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())).toList();
|
|
|
|
|
|
|
|
|
|
|
|
long processingCount = totalNegativeList.stream() |
|
|
|
long processingCount = totalNegativeList.stream() |
|
|
|
.filter(item -> ProcessingStatusEnum.processing.name().equals(item.getProcessingStatus())) |
|
|
|
.filter(item -> ProcessingStatusEnum.processingDatav.contains(item.getProcessingStatus())) |
|
|
|
.count(); |
|
|
|
.count(); |
|
|
|
|
|
|
|
|
|
|
|
long completedCount = totalNegativeList.stream() |
|
|
|
long completedCount = totalNegativeList.stream() |
|
|
|
@ -921,18 +893,12 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 问责处理情况
|
|
|
|
// 问责处理情况
|
|
|
|
List<Negative> ssNegative = negatives.stream().filter(one -> CheckStatusEnum.TRUE_SET.contains(one.getCheckStatusCode()) || CheckStatusEnum.PART_TRUE_SET.contains(one.getCheckStatusCode())).toList(); |
|
|
|
AccountabilityCountResult accountabilityCountResult = this.buildAccountabilityCountResult(negatives); |
|
|
|
NegativeBlameQueryParam negativeBlameQueryParam = new NegativeBlameQueryParam(); |
|
|
|
Map<String, Long> dealResultDistribution = accountabilityCountResult.dealResultDistribution(); |
|
|
|
negativeBlameQueryParam.setNegativeIds(ssNegative.stream().map(Negative::getId).toList()); |
|
|
|
for (Map.Entry<String, Long> entry : dealResultDistribution.entrySet()) { |
|
|
|
List<NegativeBlame> negativeBlames = negativeBlameResourceService.query(negativeBlameQueryParam); |
|
|
|
|
|
|
|
Map<String, List<NegativeBlame>> blames = negativeBlames.stream() |
|
|
|
|
|
|
|
.filter(one -> StrUtil.isNotBlank(one.getHandleResultName())) |
|
|
|
|
|
|
|
.filter(one -> !"不予追责".equals(one.getHandleResultName())) |
|
|
|
|
|
|
|
.collect(Collectors.groupingBy(NegativeBlame::getHandleResultName)); |
|
|
|
|
|
|
|
for (Map.Entry<String, List<NegativeBlame>> entry : blames.entrySet()) { |
|
|
|
|
|
|
|
EchartsVo echartsVo = new EchartsVo(); |
|
|
|
EchartsVo echartsVo = new EchartsVo(); |
|
|
|
echartsVo.setName(entry.getKey()); |
|
|
|
echartsVo.setName(entry.getKey()); |
|
|
|
echartsVo.setValue(entry.getValue().size()); |
|
|
|
echartsVo.setValue(entry.getValue().intValue()); |
|
|
|
dealSituationPieList.add(echartsVo); |
|
|
|
dealSituationPieList.add(echartsVo); |
|
|
|
} |
|
|
|
} |
|
|
|
// 过滤0
|
|
|
|
// 过滤0
|
|
|
|
@ -1432,12 +1398,19 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
long personalCount, |
|
|
|
long personalCount, |
|
|
|
long leaderCount, |
|
|
|
long leaderCount, |
|
|
|
long personTotalCount, |
|
|
|
long personTotalCount, |
|
|
|
long unitCount |
|
|
|
long unitCount, |
|
|
|
|
|
|
|
Map<String, Long> dealResultDistribution, |
|
|
|
|
|
|
|
// 新增:问责人数(blameName非空 + 处理结果非"不予追责")
|
|
|
|
|
|
|
|
long newPersonalCount, |
|
|
|
|
|
|
|
// 新增:问责领导人数(blameName非空 + leadName非空 + 处理结果非"不予追责")
|
|
|
|
|
|
|
|
long newLeaderCount, |
|
|
|
|
|
|
|
// 新增:新问责总人数
|
|
|
|
|
|
|
|
long newPersonTotalCount |
|
|
|
) {} |
|
|
|
) {} |
|
|
|
|
|
|
|
|
|
|
|
private AccountabilityCountResult buildAccountabilityCountResult(List<Negative> negatives) { |
|
|
|
private AccountabilityCountResult buildAccountabilityCountResult(List<Negative> negatives) { |
|
|
|
if (CollectionUtil.isEmpty(negatives)) { |
|
|
|
if (CollectionUtil.isEmpty(negatives)) { |
|
|
|
return new AccountabilityCountResult(0L, 0L, 0L, 0L); |
|
|
|
return new AccountabilityCountResult(0L, 0L, 0L, 0L, Map.of(), 0L, 0L, 0L); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<String> effectiveNegativeIds = negatives.stream() |
|
|
|
List<String> effectiveNegativeIds = negatives.stream() |
|
|
|
@ -1449,7 +1422,7 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
.toList(); |
|
|
|
.toList(); |
|
|
|
|
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(effectiveNegativeIds)) { |
|
|
|
if (CollectionUtil.isEmpty(effectiveNegativeIds)) { |
|
|
|
return new AccountabilityCountResult(0L, 0L, 0L, 0L); |
|
|
|
return new AccountabilityCountResult(0L, 0L, 0L, 0L, Map.of(), 0L, 0L, 0L); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
NegativeBlameQueryParam param = new NegativeBlameQueryParam(); |
|
|
|
NegativeBlameQueryParam param = new NegativeBlameQueryParam(); |
|
|
|
@ -1457,7 +1430,7 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
List<NegativeBlame> negativeBlames = negativeBlameResourceService.query(param); |
|
|
|
List<NegativeBlame> negativeBlames = negativeBlameResourceService.query(param); |
|
|
|
|
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(negativeBlames)) { |
|
|
|
if (CollectionUtil.isEmpty(negativeBlames)) { |
|
|
|
return new AccountabilityCountResult(0L, 0L, 0L, 0L); |
|
|
|
return new AccountabilityCountResult(0L, 0L, 0L, 0L, Map.of(), 0L, 0L, 0L); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
long personalCount = negativeBlames.stream() |
|
|
|
long personalCount = negativeBlames.stream() |
|
|
|
@ -1485,14 +1458,69 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
.distinct() |
|
|
|
.distinct() |
|
|
|
.count(); |
|
|
|
.count(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 统计处理结果分布(普通人员 + 领导)
|
|
|
|
|
|
|
|
Map<String, Long> dealResultDistribution = buildDealResultDistribution(negativeBlames); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 新增:问责人数(blameName非空 + 处理结果非"不予追责")
|
|
|
|
|
|
|
|
long newPersonalCount = negativeBlames.stream() |
|
|
|
|
|
|
|
.filter(one -> BlameType.personal.name().equals(one.getType())) |
|
|
|
|
|
|
|
.filter(one -> StrUtil.isNotBlank(one.getBlameName())) |
|
|
|
|
|
|
|
.filter(one -> !isNoAccountability(one.getHandleResultName())) |
|
|
|
|
|
|
|
.count(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 新增:问责领导人数(blameName非空 + leadName非空 + 处理结果非"不予追责")
|
|
|
|
|
|
|
|
long newLeaderCount = negativeBlames.stream() |
|
|
|
|
|
|
|
.filter(one -> BlameType.personal.name().equals(one.getType())) |
|
|
|
|
|
|
|
.filter(one -> StrUtil.isNotBlank(one.getBlameName())) |
|
|
|
|
|
|
|
.filter(one -> StrUtil.isNotBlank(one.getLeadName())) |
|
|
|
|
|
|
|
.filter(one -> !isNoAccountability(one.getLeadHandleResultName())) |
|
|
|
|
|
|
|
.count(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 新增:新问责总人数
|
|
|
|
|
|
|
|
long newPersonTotalCount = newPersonalCount + newLeaderCount; |
|
|
|
|
|
|
|
|
|
|
|
return new AccountabilityCountResult( |
|
|
|
return new AccountabilityCountResult( |
|
|
|
personalCount, |
|
|
|
personalCount, |
|
|
|
leaderCount, |
|
|
|
leaderCount, |
|
|
|
personalCount + leaderCount, |
|
|
|
personalCount + leaderCount, |
|
|
|
unitCount |
|
|
|
unitCount, |
|
|
|
|
|
|
|
dealResultDistribution, |
|
|
|
|
|
|
|
newPersonalCount, |
|
|
|
|
|
|
|
newLeaderCount, |
|
|
|
|
|
|
|
newPersonTotalCount |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 构建处理结果分布统计(普通人员 + 领导) |
|
|
|
|
|
|
|
* 与 buildAccountabilityCountResult 中的 personalCount + leaderCount 保持口径一致 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private Map<String, Long> buildDealResultDistribution(List<NegativeBlame> negativeBlames) { |
|
|
|
|
|
|
|
// 统计普通人员处理结果(type=personal + blameName非空)
|
|
|
|
|
|
|
|
Map<String, Long> personalResults = negativeBlames.stream() |
|
|
|
|
|
|
|
.filter(one -> BlameType.personal.name().equals(one.getType())) |
|
|
|
|
|
|
|
.filter(one -> StrUtil.isNotBlank(one.getBlameName())) |
|
|
|
|
|
|
|
.flatMap(one -> splitValidAccountabilityResults(one.getHandleResultName()).stream() |
|
|
|
|
|
|
|
.map(result -> one.getNegativeId() + "_" + one.getBlameName() + "_" + result)) |
|
|
|
|
|
|
|
.distinct() |
|
|
|
|
|
|
|
.collect(Collectors.groupingBy(result -> result.substring(result.lastIndexOf("_") + 1), Collectors.counting())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 统计领导处理结果(type=personal + blameName非空 + leadName非空)
|
|
|
|
|
|
|
|
Map<String, Long> leaderResults = negativeBlames.stream() |
|
|
|
|
|
|
|
.filter(one -> BlameType.personal.name().equals(one.getType())) |
|
|
|
|
|
|
|
.filter(one -> StrUtil.isNotBlank(one.getBlameName())) |
|
|
|
|
|
|
|
.filter(one -> StrUtil.isNotBlank(one.getLeadName())) |
|
|
|
|
|
|
|
.flatMap(one -> splitValidAccountabilityResults(one.getLeadHandleResultName()).stream() |
|
|
|
|
|
|
|
.map(result -> one.getNegativeId() + "_" + one.getLeadName() + "_" + result)) |
|
|
|
|
|
|
|
.distinct() |
|
|
|
|
|
|
|
.collect(Collectors.groupingBy(result -> result.substring(result.lastIndexOf("_") + 1), Collectors.counting())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 合并
|
|
|
|
|
|
|
|
Map<String, Long> merged = new HashMap<>(personalResults); |
|
|
|
|
|
|
|
leaderResults.forEach((key, value) -> merged.merge(key, value, Long::sum)); |
|
|
|
|
|
|
|
return merged; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private List<String> splitValidAccountabilityResults(String raw) { |
|
|
|
private List<String> splitValidAccountabilityResults(String raw) { |
|
|
|
if (StrUtil.isBlank(raw)) { |
|
|
|
if (StrUtil.isBlank(raw)) { |
|
|
|
return List.of(); |
|
|
|
return List.of(); |
|
|
|
@ -1506,6 +1534,26 @@ public class DatavServiceImpl implements DatavService { |
|
|
|
.toList(); |
|
|
|
.toList(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 判断问责情况是否全为"不予追责"(即没有有效的问责处理结果) |
|
|
|
|
|
|
|
* @param raw 原始问责情况字符串 |
|
|
|
|
|
|
|
* @return true表示全部为"不予追责",false表示有有效问责处理结果 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private boolean isNoAccountability(String raw) { |
|
|
|
|
|
|
|
if (StrUtil.isBlank(raw)) { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
List<String> results = Arrays.stream(raw.split("[、,,]")) |
|
|
|
|
|
|
|
.map(String::trim) |
|
|
|
|
|
|
|
.filter(StrUtil::isNotBlank) |
|
|
|
|
|
|
|
.toList(); |
|
|
|
|
|
|
|
// 如果拆分后为空,或者所有结果都是"不予追责",则返回true
|
|
|
|
|
|
|
|
if (results.isEmpty()) { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return results.stream().allMatch(item -> NO_ACCOUNTABILITY_SET.contains(item)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public record BlameResult( |
|
|
|
public record BlameResult( |
|
|
|
|