2 Commits 13de0985e7 ... 29ed677432

Auteur SHA1 Bericht Datum
  平常心 29ed677432 Merge remote-tracking branch 'origin/master' 6 maanden geleden
  平常心 c8adf72414 学生提交申请信息V4.0 6 maanden geleden

+ 0 - 9
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/AidingStudentsPersonManageController.java

@@ -1,5 +1,4 @@
 package cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage;
-
 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
@@ -12,11 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
-
 import javax.validation.Valid;
-
 import java.util.List;
-
 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
 
 /**
@@ -119,9 +115,4 @@ public class AidingStudentsPersonManageController {
         return success(aidingStudentsPersonManageService.schoolgetAidingStudentsPersonManageData(manageId));
     }
 
-
-
-
-
-
 }

+ 2 - 0
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageDataPartRespVO.java

@@ -17,7 +17,9 @@ import java.util.Map;
 @ExcelIgnoreUnannotated
 public class AidingStudentPersonManageDataPartRespVO {
     private String major;
+
     private String grade;
+
     // 提交人数
     private Integer allsubmit;
     // 审批完成人数

+ 1 - 0
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageSortReqVO.java

@@ -20,6 +20,7 @@ public class AidingStudentPersonManageSortReqVO {
     private Integer sort;
     // 困难类型
     private Integer difficultType;
+
     private String major;
     private String grade;
 }

+ 9 - 7
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/aidingstudentspersonmanage/AidingStudentsPersonManageServiceImpl.java

@@ -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);