|
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import com.zjugis.framework.common.pojo.CommonResult;
|
|
|
import com.zjugis.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
import com.zjugis.module.adm.controller.admin.staff.vo.records.*;
|
|
|
+import com.zjugis.module.adm.dal.dataobject.staff.CollegeDO;
|
|
|
import com.zjugis.module.adm.dal.dataobject.staff.StaffRecordSDO;
|
|
|
import com.zjugis.module.adm.dal.mysql.staff.RecordsMapper;
|
|
|
import com.zjugis.module.system.api.user.AdminUserApi;
|
|
@@ -32,6 +33,9 @@ public class StaffStatisticServiceImpl implements StaffStatisticService {
|
|
|
@Resource
|
|
|
private RecordsMapper recordsMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private CollegeService collegeService;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 获取用户统计信息
|
|
@@ -91,6 +95,22 @@ public class StaffStatisticServiceImpl implements StaffStatisticService {
|
|
|
degreeStatisticVO.setUndergraduateStaffNum(degreeGroupCounts.getOrDefault("undergraduateStaff", 0L).intValue());
|
|
|
degreeStatisticVO.setJuniorCollegeStaffNum(degreeGroupCounts.getOrDefault("juniorCollegeStaff", 0L).intValue());
|
|
|
degreeStatisticVO.setBelowJuniorCollegeStaffNum(degreeGroupCounts.getOrDefault("belowJuniorCollegeStaff", 0L).intValue());
|
|
|
+
|
|
|
+ Map<String, CollegeDO> collegeMap = collegeService.getGoodCollege();
|
|
|
+ Map<String, Long> collegeCount = staffList.stream().filter(employee -> employee.getByxx() != null)
|
|
|
+ .collect(Collectors.groupingBy(
|
|
|
+ employee -> {
|
|
|
+ if (collegeMap.get(employee.getByxx()) != null) {
|
|
|
+ return "rsr";
|
|
|
+ } else {
|
|
|
+ return "rxr";
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ Collectors.counting()
|
|
|
+ ));
|
|
|
+ degreeStatisticVO.setFirstClassCollegeStaffNum(collegeCount.getOrDefault("rsr", 0L).intValue());
|
|
|
+ degreeStatisticVO.setOrdinaryCollegeStaffNum(collegeCount.getOrDefault("rxr", 0L).intValue());
|
|
|
return degreeStatisticVO;
|
|
|
}
|
|
|
|