|
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.date.DateUnit; |
|
|
|
import cn.hutool.core.date.DateUnit; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
|
|
|
|
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.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
@ -53,7 +54,6 @@ public class ProfilePoliceController { |
|
|
|
|
|
|
|
|
|
|
|
private final NegativeBlameService negativeBlameService; |
|
|
|
private final NegativeBlameService negativeBlameService; |
|
|
|
private final NegativeService negativeService; |
|
|
|
private final NegativeService negativeService; |
|
|
|
private final NegativeScoreService negativeScoreService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final NegativeScorePoliceService negativeScorePoliceService; |
|
|
|
private final NegativeScorePoliceService negativeScorePoliceService; |
|
|
|
private final NegativeProblemRelationService negativeProblemRelationService; |
|
|
|
private final NegativeProblemRelationService negativeProblemRelationService; |
|
|
|
@ -130,10 +130,6 @@ public class ProfilePoliceController { |
|
|
|
problemSourcesGroup.get(key).size())).toList(); |
|
|
|
problemSourcesGroup.get(key).size())).toList(); |
|
|
|
profilePolice.setProblemSourcesList(problemSourcesList); |
|
|
|
profilePolice.setProblemSourcesList(problemSourcesList); |
|
|
|
// 问题类型占比
|
|
|
|
// 问题类型占比
|
|
|
|
List<String> blameIds = negativeBlameService.list(new LambdaQueryWrapper<NegativeBlame>() |
|
|
|
|
|
|
|
.in(NegativeBlame::getNegativeId, negativeIds) |
|
|
|
|
|
|
|
.eq(NegativeBlame::getBlameIdCode, idCode)) |
|
|
|
|
|
|
|
.stream().map(NegativeBlame::getBlameId).toList(); |
|
|
|
|
|
|
|
List<NegativeProblemRelation> problemRelations = negativeProblemRelationService.list(new LambdaQueryWrapper<NegativeProblemRelation>() |
|
|
|
List<NegativeProblemRelation> problemRelations = negativeProblemRelationService.list(new LambdaQueryWrapper<NegativeProblemRelation>() |
|
|
|
.in(NegativeProblemRelation::getNegativeId, negativeIds)); |
|
|
|
.in(NegativeProblemRelation::getNegativeId, negativeIds)); |
|
|
|
Map<String, List<NegativeProblemRelation>> groups = problemRelations.stream().collect(Collectors.groupingBy(NegativeProblemRelation::getOneLevelContent)); |
|
|
|
Map<String, List<NegativeProblemRelation>> groups = problemRelations.stream().collect(Collectors.groupingBy(NegativeProblemRelation::getOneLevelContent)); |
|
|
|
@ -154,7 +150,7 @@ public class ProfilePoliceController { |
|
|
|
List<NegativeProfile> negativeProfiles = negatives.stream().map(item -> { |
|
|
|
List<NegativeProfile> negativeProfiles = negatives.stream().map(item -> { |
|
|
|
NegativeProfile negativeProfile = new NegativeProfile(); |
|
|
|
NegativeProfile negativeProfile = new NegativeProfile(); |
|
|
|
BeanUtil.copyProperties(item, negativeProfile); |
|
|
|
BeanUtil.copyProperties(item, negativeProfile); |
|
|
|
String problemType = problemRelations.stream().filter(p -> item.getId().equals(p.getNegativeId())).findFirst().map(p -> p.getOneLevelContent() + " / " + p.getTwoLevelContent() + " / " + p.getThreeLevelContent()).orElse(""); |
|
|
|
String problemType = problemRelations.stream().filter(p -> item.getId().equals(p.getNegativeId())).findFirst().map(negativeProblemRelationService::getProblemType).orElse(""); |
|
|
|
negativeProfile.setProblemType(problemType); |
|
|
|
negativeProfile.setProblemType(problemType); |
|
|
|
negativeProfile.setScore(negativeScorePolices.stream().filter(s -> item.getId().equals(s.getNegativeId())).findFirst().map(NegativeScorePolice::getScore).orElse(null)); |
|
|
|
negativeProfile.setScore(negativeScorePolices.stream().filter(s -> item.getId().equals(s.getNegativeId())).findFirst().map(NegativeScorePolice::getScore).orElse(null)); |
|
|
|
return negativeProfile; |
|
|
|
return negativeProfile; |
|
|
|
|