|
@@ -102,22 +102,29 @@ public class AidingStudentsCollegeManageServiceImpl implements AidingStudentsCol
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
-
|
|
|
- public Map<String, Long> getAidingStudentsCollegeManageCount() {
|
|
|
+ public Map<String, Long> getAidingStudentsCollegeManageCount(Long manageId) {
|
|
|
Map<String, Long> map = new LinkedHashMap<>();
|
|
|
- //总人数
|
|
|
- map.put("sum", aidingStudentsCollegeManageMapper.selectCount());
|
|
|
+ //学院数
|
|
|
+ Long collegeNum = deptApi.getCollegeNum();
|
|
|
+ //各个状态学院数
|
|
|
+ Long ongoing = aidingStudentsCollegeManageMapper.selectCount(Wrappers.lambdaQuery(AidingStudentsCollegeManageDO.class)
|
|
|
+ .eq(AidingStudentsCollegeManageDO::getManageId, manageId)
|
|
|
+ .eq(AidingStudentsCollegeManageDO::getComStatus, 1))
|
|
|
+ +aidingStudentsCollegeManageMapper.selectCount(Wrappers.lambdaQuery(AidingStudentsCollegeManageDO.class)
|
|
|
+ .eq(AidingStudentsCollegeManageDO::getManageId, manageId)
|
|
|
+ .eq(AidingStudentsCollegeManageDO::getComStatus, 2));
|
|
|
+ Long completed = aidingStudentsCollegeManageMapper.selectCount(Wrappers.lambdaQuery(AidingStudentsCollegeManageDO.class)
|
|
|
+ .eq(AidingStudentsCollegeManageDO::getManageId, manageId)
|
|
|
+ .eq(AidingStudentsCollegeManageDO::getComStatus, 3));
|
|
|
+ Long unpublished=collegeNum-ongoing-completed;
|
|
|
+ //总学院数
|
|
|
+ map.put("sum", collegeNum);
|
|
|
//未发布
|
|
|
- map.put("unpublished", aidingStudentsCollegeManageMapper.selectCount(AidingStudentsCollegeManageDO::getComStatus, 0));
|
|
|
- //审核中
|
|
|
- //map.put("review", aidingStudentsCollegeManageMapper.selectCount(AidingStudentsCollegeManageDO::getComStatus, 1));
|
|
|
- //公示中
|
|
|
- //map.put("publicity", aidingStudentsCollegeManageMapper.selectCount(AidingStudentsCollegeManageDO::getComStatus, 2));
|
|
|
+ map.put("unpublished", unpublished);
|
|
|
//进行中
|
|
|
- map.put("ongoing", aidingStudentsCollegeManageMapper.selectCount(AidingStudentsCollegeManageDO::getComStatus, 1)
|
|
|
- + aidingStudentsCollegeManageMapper.selectCount(AidingStudentsCollegeManageDO::getComStatus, 2));
|
|
|
+ map.put("ongoing", ongoing);
|
|
|
//已完成
|
|
|
- map.put("completed", aidingStudentsCollegeManageMapper.selectCount(AidingStudentsCollegeManageDO::getComStatus, 3));
|
|
|
+ map.put("completed", completed);
|
|
|
return map;
|
|
|
}
|
|
|
|