|
@@ -18,11 +18,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
import javax.annotation.Resource;
|
|
|
-
|
|
|
import java.util.*;
|
|
|
-
|
|
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
|
|
|
|
|
|
/**
|
|
@@ -299,6 +296,7 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
List<AidingStudentsPersonManageDO> manageList = aidingStudentsPersonManageMapper
|
|
|
.selectList(new LambdaQueryWrapper<AidingStudentsPersonManageDO>()
|
|
|
.eq(AidingStudentsPersonManageDO::getCollegeManageId, manageId));
|
|
|
+ log.info("获取所有学院信息如下{}", manageList);
|
|
|
int pass = 0;
|
|
|
for (AidingStudentsPersonManageDO aDo : manageList) {
|
|
|
if(aDo.getStatus() == 1){
|
|
@@ -309,18 +307,22 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
|
|
|
resultvo.setAllsubmit(manageList.size());
|
|
|
// 2.获得各个学院的信息
|
|
|
QueryWrapper<AidingStudentsPersonManageDO> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.select("college_manage_id", "COUNT(*) as collgeNumber")
|
|
|
- .groupBy("college_manage_id");
|
|
|
+ queryWrapper.select("college_id", "COUNT(*) as collegeNumber")
|
|
|
+ .groupBy("college_id");
|
|
|
List<Map<String, Object>> maps = aidingStudentsPersonManageMapper.selectMaps(queryWrapper);
|
|
|
log.info("学院人数如下:maps {}", maps);
|
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
|
for (Map<String, Object> map : maps) {
|
|
|
Map<String, Object> temp = new HashMap<>();
|
|
|
- temp.put("collegeManageId", map.get("college_manage_id"));
|
|
|
+ Long collegeId = (Long) map.get("college_id");
|
|
|
+ DeptRespDTO dept = deptApi.getDept(collegeId);
|
|
|
+ log.info("collegeId = {}, dept {}", collegeId, dept);
|
|
|
+ // dept DeptRespDTO(id=18429, name=计算机科学与工程学院, parentId=0, leaderUserId=null, status=0)
|
|
|
+ temp.put("collegeName", dept.getName());
|
|
|
temp.put("all", map.get("collegeNumber"));
|
|
|
List<AidingStudentsPersonManageDO> passList = aidingStudentsPersonManageMapper
|
|
|
.selectList(new LambdaQueryWrapper<AidingStudentsPersonManageDO>()
|
|
|
- .eq(AidingStudentsPersonManageDO::getCollegeId, map.get("collge_manage_id"))
|
|
|
+ .eq(AidingStudentsPersonManageDO::getCollegeId, collegeId)
|
|
|
.eq(AidingStudentsPersonManageDO::getStatus, 1));
|
|
|
temp.put("pass", passList.size());
|
|
|
list.add(temp);
|