Преглед на файлове

Merge remote-tracking branch 'origin/master'

houlai преди 6 месеца
родител
ревизия
701ac5e67d
променени са 8 файла, в които са добавени 41 реда и са изтрити 40 реда
  1. 0 9
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/AidingStudentsPersonManageController.java
  2. 2 0
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageClassResultReqVO.java
  3. 2 0
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageDataPartRespVO.java
  4. 3 3
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageSchoolPageReqVO.java
  5. 7 6
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageSchoolRespVO.java
  6. 1 0
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageSortReqVO.java
  7. 3 3
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/dal/mysql/aidingstudentspersonmanage/AidingStudentsPersonManageMapper.java
  8. 23 19
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/aidingstudentspersonmanage/AidingStudentsPersonManageServiceImpl.java

+ 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/AidingStudentPersonManageClassResultReqVO.java

@@ -13,7 +13,9 @@ import lombok.Data;
 @Data
 @ExcelIgnoreUnannotated
 public class AidingStudentPersonManageClassResultReqVO {
+
     private String major;
+
     private String grade;
     // 班级
     private String className;

+ 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;
     // 审批完成人数

+ 3 - 3
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageSchoolPageReqVO.java

@@ -17,7 +17,7 @@ import lombok.ToString;
 @ToString(callSuper = true)
 public class AidingStudentPersonManageSchoolPageReqVO extends PageParam {
     // 学院
-    private Integer collegeManageId;
+    private String collegeName;
     // 项目ID
     private Integer manageId;
     // 年级
@@ -27,10 +27,10 @@ public class AidingStudentPersonManageSchoolPageReqVO extends PageParam {
     // 学号
     private String studentSno;
     // 姓名
-    private String name;
+    private String nickname;
     // 申请类型
     private Integer difficultType;
     // 专业
-    private String major;;
+    private String major;
 
 }

+ 7 - 6
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentspersonmanage/vo/AidingStudentPersonManageSchoolRespVO.java

@@ -22,23 +22,24 @@ public class AidingStudentPersonManageSchoolRespVO {
      */
     // id
     private Integer id;
-    // 学院 项目管理ID
-    private Integer collegeManageId;
-    //计算机类2023-1班
+    // 学院
+    private String collegeName;
     // 年级
     private String grade;
     // 专业
     private String major;
     // 班级
-    private String clName;
+    private String className;
+    // 学院 项目管理ID
+    private Integer collegeManageId;
     // 学号
     private String studentSno;
     // 姓名
-    private String name;
+    private String nickname;
     // 申请类型
     private Integer difficultType;
     // 申请时间
-    private LocalDateTime time;
+    private LocalDateTime createTime;
     // 状态(待审核,待民主平移,通过,公示中,待学校审核,学校公示中,规定整理中,已经完结)
     private Integer status;
 }

+ 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;
 }

+ 3 - 3
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/dal/mysql/aidingstudentspersonmanage/AidingStudentsPersonManageMapper.java

@@ -23,9 +23,9 @@ public interface AidingStudentsPersonManageMapper extends BaseMapperX<AidingStud
 
     default PageResult<AidingStudentsPersonManageDO> selectPage(AidingStudentsPersonManageClassPageReqVO reqVO) {
         return selectPage(reqVO, new LambdaQueryWrapper<AidingStudentsPersonManageDO>()
-                .eq(StringUtils.isNotBlank(reqVO.getClassName()),AidingStudentsPersonManageDO::getDifficultType, reqVO.getClassName())
+                .eq(StringUtils.isNotBlank(reqVO.getClassName()),AidingStudentsPersonManageDO::getClassName, reqVO.getClassName())
                 .eq(reqVO.getCollegeManageId() != null,AidingStudentsPersonManageDO::getDifficultType, reqVO.getCollegeManageId())
-                .eq(reqVO.getManageId() != null,AidingStudentsPersonManageDO::getDifficultType, reqVO.getManageId())
+                .eq(reqVO.getManageId() != null,AidingStudentsPersonManageDO::getManageId, reqVO.getManageId())
                 .like(StringUtils.isNotBlank(reqVO.getNickname()),AidingStudentsPersonManageDO::getNickname, reqVO.getNickname())
                 .like(StringUtils.isNotBlank(reqVO.getStudentSno()),AidingStudentsPersonManageDO::getStudentSno, reqVO.getStudentSno())
                 .eq(reqVO.getDifficultType() != null,AidingStudentsPersonManageDO::getDifficultType, reqVO.getDifficultType())
@@ -52,6 +52,6 @@ public interface AidingStudentsPersonManageMapper extends BaseMapperX<AidingStud
      * @param szzym
      */
 
-    @Select("select ZYMC from data_professional_info where ZYM = #{szzym}")
+    @Select("select ZYMC, DWMC from data_professional_info where ZYM = #{szzym}")
     Map getMajorById(Object szzym);
 }

+ 23 - 19
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;
 
 /**
@@ -92,19 +89,20 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
         // 学院ID
         Long collegeId = deptApi.getCollegeId(user.getDeptId());
         aDo.setCollegeId(collegeId);
-        // 学院名称
-        DeptRespDTO dept = deptApi.getDept(user.getDeptId());
-        aDo.setCollegeName(dept.getName());
+
+        Map resultmap = aidingStudentsPersonManageMapper.getMajorById(map.get("SZZYM"));
+        log.info("resultMap = {}", resultmap);
         // 专业名称
-        Map szzym = aidingStudentsPersonManageMapper.getMajorById(map.get("SZZYM"));
-        log.info("szzym = {}", szzym);
-        aDo.setMajor((String) szzym.get("ZYMC"));
+        aDo.setMajor((String) resultmap.get("ZYMC"));
+        // 学院名称
+        aDo.setCollegeName((String) resultmap.get("DWMC"));
         // 年级
         aDo.setGrade((String) map.get("SZNJ"));
         // 姓名
         aDo.setNickname(user.getNickname());
         // 状态
         aDo.setStatus(0);
+        // 用户ID
         aidingStudentsPersonManageMapper.insert(aDo);
     }
 
@@ -113,9 +111,10 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
      */
     @Override
     public AidingStudentsPersonManageUploadRespVO checkAidingStudentsManage() {
-        AdminUserRespDTO user =  adminUserApi.getUser(getLoginUser().getId());
-        AidingStudentsPersonManageDO me = this.getById(user.getStudentId());
-        return BeanUtils.toBean(me, AidingStudentsPersonManageUploadRespVO.class);
+        AdminUserRespDTO Loginuser =  adminUserApi.getUser(getLoginUser().getId());
+        AidingStudentsPersonManageDO user = aidingStudentsPersonManageMapper
+                .selectOne(AidingStudentsPersonManageDO::getStudentSno, Loginuser.getStudentId());
+        return BeanUtils.toBean(user, AidingStudentsPersonManageUploadRespVO.class);
     }
 
     /**
@@ -126,7 +125,6 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
     public void editAidingStudentsManage(AidingStudentsPersonManageUploadRespVO uploadVO) {
         AidingStudentsPersonManageDO aDo = new AidingStudentsPersonManageDO();
          aDo = BeanUtils.toBean(uploadVO, AidingStudentsPersonManageDO.class);
-         log.info("aDo 信息如下{}" , aDo);
          aDo.setRejectNotes("");
          aidingStudentsPersonManageMapper.updateById(aDo);
     }
@@ -275,15 +273,16 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
          */
         List<AidingStudentsPersonManageDO> allList = aidingStudentsPersonManageMapper
                 .selectList(new LambdaQueryWrapper<AidingStudentsPersonManageDO>()
-                        .eq(pageReqVO.getCollegeManageId() != null, AidingStudentsPersonManageDO::getCollegeId, pageReqVO.getCollegeManageId())
+                        .like(StringUtils.isNotBlank(pageReqVO.getCollegeName()), AidingStudentsPersonManageDO::getCollegeName, pageReqVO.getCollegeName())
                         .eq(pageReqVO.getManageId() != null ,AidingStudentsPersonManageDO::getManageId, pageReqVO.getManageId())
                         .eq(pageReqVO.getDifficultType() != null,AidingStudentsPersonManageDO::getDifficultType, pageReqVO.getDifficultType())
                         .like(StringUtils.isNotBlank(pageReqVO.getMajor()), AidingStudentsPersonManageDO::getMajor, pageReqVO.getMajor())
                         .like(StringUtils.isNotBlank(pageReqVO.getGrade()), AidingStudentsPersonManageDO::getGrade, pageReqVO.getGrade())
                         .like(StringUtils.isNotBlank(pageReqVO.getClName()), AidingStudentsPersonManageDO::getClassName, pageReqVO.getClName())
-                        .like(StringUtils.isNotBlank(pageReqVO.getName()), AidingStudentsPersonManageDO::getNickname, pageReqVO.getName())
+                        .like(StringUtils.isNotBlank(pageReqVO.getNickname()), AidingStudentsPersonManageDO::getNickname, pageReqVO.getNickname())
                         .like(StringUtils.isNotBlank(pageReqVO.getStudentSno()), AidingStudentsPersonManageDO::getStudentSno, pageReqVO.getStudentSno())
                 );
+        log.info("allList = {}", allList);
         return new PageResult<>(BeanUtils.toBean(allList, AidingStudentPersonManageSchoolRespVO.class), (long) allList.size());
     }
 
@@ -299,6 +298,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 +309,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);