|
|
@ -613,10 +613,12 @@ public class UserHomePageServiceImpl implements UserHomePageService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Map<String, Object> report4Depart(String orgCode) { |
|
|
|
public Object report4Depart(String orgCode, boolean recreateFlag) { |
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(orgCode, "部门编号不能为空"); |
|
|
|
Assert.notNull(orgCode, "部门编号不能为空"); |
|
|
|
|
|
|
|
final String REPORT4DEPART = "report4Depart"; |
|
|
|
Map<String, Object> resultMap = new LinkedHashMap<>(); |
|
|
|
Map<String, Object> resultMap = new LinkedHashMap<>(); |
|
|
|
|
|
|
|
if (recreateFlag) { |
|
|
|
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode, orgCode)); |
|
|
|
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode, orgCode)); |
|
|
|
if (ObjectUtil.isNull(sysDepart)) { |
|
|
|
if (ObjectUtil.isNull(sysDepart)) { |
|
|
|
throw new JeecgBootException("部门不存在"); |
|
|
|
throw new JeecgBootException("部门不存在"); |
|
|
@ -804,26 +806,16 @@ public class UserHomePageServiceImpl implements UserHomePageService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
canSaiList.add(departMap); |
|
|
|
canSaiList.add(departMap); |
|
|
|
resultMap.put("部门参赛情况列表", canSaiList); |
|
|
|
redisUtil.set(REPORT4DEPART, resultMap); |
|
|
|
|
|
|
|
|
|
|
|
/* List<AwardPersion> awardPersionList4Depart = iAwardPersionService.list(new LambdaQueryWrapper<AwardPersion>().eq(AwardPersion::getAnnualCompP, pointIds4Depart)); |
|
|
|
|
|
|
|
Map<String, Object> departHuoJiangMap = new LinkedHashMap<>(); |
|
|
|
|
|
|
|
departHuoJiangMap.put("部门名称", sysDepart.getDepartName()); |
|
|
|
|
|
|
|
departHuoJiangMap.put("获取人数", awardPersionList4Depart.size()); |
|
|
|
|
|
|
|
Map<String, List<AwardPersion>> awardNameMap = Optional.ofNullable(awardPersionList4Depart).orElse(new LinkedList<>()).stream() |
|
|
|
|
|
|
|
.collect(Collectors.groupingBy(AwardPersion::getAwardname)); |
|
|
|
|
|
|
|
//遍历分组后的结果
|
|
|
|
|
|
|
|
Map<String, Object> awardTypeMap2 = new HashMap<>(); |
|
|
|
|
|
|
|
// AtomicInteger huoJiangCount = new AtomicInteger();
|
|
|
|
|
|
|
|
Optional.ofNullable(awardNameMap).orElse(new LinkedHashMap<>()).forEach((key, value) -> { |
|
|
|
|
|
|
|
departHuoJiangMap.put(key, value.size()); |
|
|
|
|
|
|
|
// huoJiangCount.addAndGet(value.size());
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// awardTypeMap2.put("获奖人数", huoJiangCount.get());
|
|
|
|
|
|
|
|
// huoJiangList.add(awardTypeMap2);
|
|
|
|
|
|
|
|
resultMap.put("部门获奖情况列表", departHuoJiangMap);*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return resultMap; |
|
|
|
return resultMap; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
boolean hasKey = redisUtil.hasKey(REPORT4DEPART); |
|
|
|
|
|
|
|
if (hasKey) { |
|
|
|
|
|
|
|
return redisUtil.get(REPORT4DEPART); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return this.report4Depart(orgCode, true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> convertProjectLevel(List<AnnualCompPoint> annualCompPointList) { |
|
|
|
Map<String, Object> convertProjectLevel(List<AnnualCompPoint> annualCompPointList) { |
|
|
|