Commit 27cc4dbd20c233e37e39d1696273c38a490da91a
1 parent
a16a4772
feature(*): 考评排名组保存修改
考评排名组保存修改
Showing
1 changed file
with
6 additions
and
6 deletions
fw-morax-service/src/main/java/cn/fw/morax/service/biz/kpi/KpiGroupRankBizService.java
... | ... | @@ -75,21 +75,21 @@ public class KpiGroupRankBizService { |
75 | 75 | } |
76 | 76 | |
77 | 77 | List<KpiGroupRankVO> kpiGroupRankVOS = kpiGroupRankService.queryPageRank(dto); |
78 | - List<String> kgcs = kpiGroupRankVOS.stream().map(KpiGroupRankVO::getKgcs).collect(ArrayList::new, List::addAll, List::addAll); | |
78 | + List<Long> kpiGroupIds = kpiGroupRankVOS.stream().map(KpiGroupRankVO::getKpiGroupIds).collect(ArrayList::new, List::addAll, List::addAll); | |
79 | 79 | List<KpiGroup> kpiGroups = kpiGroupService.list(Wrappers.<KpiGroup>lambdaQuery() |
80 | 80 | .eq(KpiGroup::getStatus, SettingStatusEnum.EFFECTIVE) |
81 | - .in(KpiGroup::getKgc, kgcs) | |
81 | + .in(KpiGroup::getId, kpiGroupIds) | |
82 | 82 | ); |
83 | - Map<String, KpiGroup> kgcKpiGroupMap = kpiGroups.stream().collect(Collectors.toMap(KpiGroup::getKgc, Function.identity(), (v1, v2) -> v1)); | |
83 | + Map<Long, KpiGroup> kgcKpiGroupMap = kpiGroups.stream().collect(Collectors.toMap(KpiGroup::getId, Function.identity(), (v1, v2) -> v1)); | |
84 | 84 | for (KpiGroupRankVO kpiGroupRankVO : kpiGroupRankVOS) { |
85 | 85 | kpiGroupRankVO.setPostIds(new ArrayList<>()); |
86 | 86 | kpiGroupRankVO.setPostNames(new HashSet<>()); |
87 | 87 | kpiGroupRankVO.setShopIds(new ArrayList<>()); |
88 | 88 | kpiGroupRankVO.setShopNames(new HashSet<>()); |
89 | 89 | kpiGroupRankVO.setKpiGroupNames(new ArrayList<>()); |
90 | - for (String kgc : kpiGroupRankVO.getKgcs()) { | |
91 | - if (kgcKpiGroupMap.containsKey(kgc)) { | |
92 | - KpiGroup kpiGroup = kgcKpiGroupMap.get(kgc); | |
90 | + for (Long kpiGroupId : kpiGroupRankVO.getKpiGroupIds()) { | |
91 | + if (kgcKpiGroupMap.containsKey(kpiGroupId)) { | |
92 | + KpiGroup kpiGroup = kgcKpiGroupMap.get(kpiGroupId); | |
93 | 93 | kpiGroupRankVO.getPostIds().add(kpiGroup.getPostId()); |
94 | 94 | kpiGroupRankVO.getPostNames().add(kpiGroup.getPostName()); |
95 | 95 | kpiGroupRankVO.getShopIds().addAll(kpiGroup.getShopIds()); | ... | ... |