Ver código fonte

学生详情班主任看自己班级的学生统计信息

大数据与最优化研究所 1 ano atrás
pai
commit
330f20ddbc

+ 2 - 0
src/main/java/com/xjrsoft/module/student/controller/StudentManagerController.java

@@ -59,6 +59,8 @@ public class StudentManagerController {
     @SaCheckPermission("studentmanager:detail")
     public R page(@Valid BaseStudentUserPageDto dto) {
 
+        studentManagerService.pageBaseStudentUser(dto);
+
         IPage<BaseStudentUserPageVo> page = studentManagerService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentUserPageVo.class,
                 MPJWrappers.<BaseStudentUser>lambdaJoin()
                         .like(StrUtil.isNotBlank(dto.getUserName()), BaseStudentUser::getUserName, dto.getUserName())

+ 1 - 1
src/main/java/com/xjrsoft/module/student/entity/BaseStudentGraduate.java

@@ -102,7 +102,7 @@ public class BaseStudentGraduate implements Serializable {
     * 附件id
     */
     @ApiModelProperty("附件id")
-    private Long folderId;
+    private Long appendixId;
     /**
     * 证书发放状态(0:未发放 1:已发放)
     */

+ 6 - 0
src/main/java/com/xjrsoft/module/student/mapper/BaseStudentMapper.java

@@ -1,8 +1,11 @@
 package com.xjrsoft.module.student.mapper;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.yulichang.base.MPJBaseMapper;
 import com.xjrsoft.module.schedule.vo.StudentJianyuekbVo;
+import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.entity.BaseStudent;
+import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
 import com.xjrsoft.module.student.vo.StudentInfoVo;
 import org.apache.ibatis.annotations.Mapper;
 
@@ -16,6 +19,9 @@ import java.util.List;
  */
 @Mapper
 public interface BaseStudentMapper extends MPJBaseMapper<BaseStudent> {
+
+    IPage<BaseStudentUserPageVo> pageBaseStudentUser(IPage<BaseStudent> page, BaseStudentUserPageDto dto);
+
     /**
      * 根据用户编号查询学生信息
      * @return

+ 6 - 0
src/main/java/com/xjrsoft/module/student/service/IStudentManagerService.java

@@ -1,12 +1,18 @@
 package com.xjrsoft.module.student.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.entity.BaseStudentUser;
 import com.xjrsoft.module.student.vo.BaseStudentClassVo;
+import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
 
 import java.util.List;
 
 public interface IStudentManagerService extends MPJBaseService<BaseStudentUser> {
+
+    IPage<BaseStudentUserPageVo> pageBaseStudentUser(BaseStudentUserPageDto dto);
+
     /**
      * 新增
      *

+ 2 - 2
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentGraduateServiceImpl.java

@@ -43,8 +43,8 @@ public class BaseStudentGraduateServiceImpl extends MPJBaseServiceImpl<BaseStude
     public Page<BaseStudentGraduatePageVo> getPage(Page<BaseStudentGraduatePageDto> page, BaseStudentGraduatePageDto dto) {
         Page<BaseStudentGraduatePageVo> voPage = baseStudentGraduateMapper.getPage(page, dto);
         for (BaseStudentGraduatePageVo record : voPage.getRecords()) {
-            if(record.getFolderId() != null){
-                record.setFileInfos(fileService.list(Wrappers.<File>query().lambda().eq(File::getFolderId,record.getFolderId())));
+            if(record.getAppendixId() != null){
+                record.setFileInfos(fileService.list(Wrappers.<File>query().lambda().eq(File::getFolderId,record.getAppendixId())));
             }
         }
         return voPage;

+ 10 - 0
src/main/java/com/xjrsoft/module/student/service/impl/StudentManagerServiceImpl.java

@@ -2,14 +2,17 @@ package com.xjrsoft.module.student.service.impl;
 
 import cn.dev33.satoken.secure.BCrypt;
 import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.enums.RoleEnum;
+import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.mapper.BaseClassMapper;
 import com.xjrsoft.module.organization.entity.UserRoleRelation;
 import com.xjrsoft.module.organization.mapper.UserRoleRelationMapper;
+import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.entity.BaseStudentContact;
 import com.xjrsoft.module.student.entity.BaseStudentFamily;
@@ -26,6 +29,7 @@ import com.xjrsoft.module.student.mapper.BaseStudentSubsidizeMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentUserMapper;
 import com.xjrsoft.module.student.service.IStudentManagerService;
 import com.xjrsoft.module.student.vo.BaseStudentClassVo;
+import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -50,6 +54,12 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
     private final UserRoleRelationMapper userRoleRelationMapper;
 
 
+    @Override
+    public IPage<BaseStudentUserPageVo> pageBaseStudentUser(BaseStudentUserPageDto dto) {
+        studentbaseManagerBaseStudentMapper.pageBaseStudentUser(ConventPage.getPage(dto), dto);
+        return null;
+    }
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean add(BaseStudentUser baseStudentUser) {

+ 1 - 1
src/main/java/com/xjrsoft/module/student/vo/BaseStudentGraduatePageVo.java

@@ -101,7 +101,7 @@ public class BaseStudentGraduatePageVo {
     @ContentStyle(dataFormat = 49)
     @ExcelProperty("附件id")
     @ApiModelProperty("附件id")
-    private Long folderId;
+    private Long appendixId;
 
     /**
      * 公文附件列表

+ 1 - 1
src/main/resources/mapper/student/BaseStudentGraduateMapper.xml

@@ -5,7 +5,7 @@
 <mapper namespace="com.xjrsoft.module.student.mapper.BaseStudentGraduateMapper">
     <select id="getPage" parameterType="com.xjrsoft.module.student.dto.BaseStudentGraduatePageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentGraduatePageVo">
         SELECT t5.id,t1.user_id,t1.student_id,t2.name,t4.name AS major_name,t6.name AS stduy_status_cn,
-        IFNULL(t5.status,0) AS status,t5.certificate_number,t5.certificate_date,t7.name AS class_name,t8.name AS grade_name,t5.folder_id FROM base_student t1
+        IFNULL(t5.status,0) AS status,t5.certificate_number,t5.certificate_date,t7.name AS class_name,t8.name AS grade_name,t5.appendix_id FROM base_student t1
         LEFT JOIN xjr_user t2 ON t1.user_id = t2.id
         LEFT JOIN base_student_school_roll t3 ON t1.user_id = t3.user_id
         LEFT JOIN base_major_set t4 ON t3.major_set_id = t4.id