|
@@ -402,9 +402,13 @@ public class AppletServiceImpl implements IAppletService {
|
|
|
List<FormalParentsStudentVo> formalParentsStudent = formalParentsStudentServicel.queryList(sbo);
|
|
|
Map<Long, List<FormalParentsStudentVo>> studentMap = formalParentsStudent.stream().collect(Collectors.groupingBy(FormalParentsStudentVo::getClassId));
|
|
|
for (SysDeptVo sysDeptVo : sysDeptVos) {
|
|
|
- if(sysDeptVo.getParentId()!=0L && studentMap.get(sysDeptVo.getParentId())!=null){
|
|
|
+ if(sysDeptVo.getParentId()!=0L ){
|
|
|
Map<String,Object> cMap = new HashMap<>();
|
|
|
- sysDeptVo.setStudentNum(studentMap.get(sysDeptVo.getParentId()).size());
|
|
|
+ int index = 0;
|
|
|
+ if( studentMap.get(sysDeptVo.getDeptId())!=null){
|
|
|
+ index = studentMap.get(sysDeptVo.getDeptId()).size();
|
|
|
+ }
|
|
|
+ sysDeptVo.setStudentNum(index);
|
|
|
cMap.put("className",sysDeptVo.getDeptName());
|
|
|
cMap.put("value",sysDeptVo);
|
|
|
mapList.add(cMap);
|
|
@@ -455,11 +459,11 @@ public class AppletServiceImpl implements IAppletService {
|
|
|
}
|
|
|
Collection<String> schoolKeys = RedisUtils.keys(DateUtils.getDate() + ":" + LoginHelper.getDeptId() + "*");
|
|
|
//获取今日延迟放学数量
|
|
|
- int todayYanChiNum = RedisUtils.getCacheObject(TODAY_YAN_CHI + LoginHelper.getDeptId() + ":" + DateUtils.getDate());
|
|
|
+ int todayYanChiNum = Integer.parseInt(RedisUtils.getCacheObject(TODAY_YAN_CHI + LoginHelper.getDeptId() + ":" + DateUtils.getDate()));
|
|
|
//今日准时放学
|
|
|
map.put("todayZhunShi", schoolKeys.size() - todayYanChiNum);
|
|
|
//获取昨日准时放学
|
|
|
- int lastDayZhunShiNum = RedisUtils.getCacheObject(LAST_DAY_ZHUN_SHI + LoginHelper.getDeptId() + ":" + DateUtils.getDateByDays(-1));
|
|
|
+ int lastDayZhunShiNum = Integer.parseInt(RedisUtils.getCacheObject(LAST_DAY_ZHUN_SHI + LoginHelper.getDeptId() + ":" + DateUtils.getDateByDays(-1)));
|
|
|
map.put("zhunShiType", 0);
|
|
|
map.put("lastDayZhunShi", 0);
|
|
|
//昨日准时放学
|