Browse Source

getMobileInfo

fanxp 1 year ago
parent
commit
a5fa46af6d

+ 16 - 105
src/main/java/com/xjrsoft/module/student/controller/BaseStudentAssessmentInspectionController.java

@@ -14,10 +14,7 @@ import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.mapper.BaseClassMapper;
-import com.xjrsoft.module.student.dto.AddBaseStudentAssessmentInspectionDto;
-import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobilePageDto;
-import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto;
-import com.xjrsoft.module.student.dto.UpdateBaseStudentAssessmentInspectionDto;
+import com.xjrsoft.module.student.dto.*;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentCategory;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentClassRelation;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
@@ -75,107 +72,6 @@ public class BaseStudentAssessmentInspectionController {
         return RT.ok(ConventPage.getPageOutput(page, BaseStudentAssessmentInspectionPageVo.class));
     }
 
-    @GetMapping(value = "/mobile-page")
-    @ApiOperation(value = "学生操行分记录管理列表(移动端分页)")
-    @SaCheckPermission("basestudentbehaviormanage:detail")
-    public RT<PageOutput<BaseStudentAssessmentInspectionMobilePageVo>> mobilePage(@Valid BaseStudentAssessmentInspectionMobilePageDto dto) {
-//        List<BaseClass> classList = baseClassMapper.selectList(
-//                MPJWrappers.<BaseClass>lambdaJoin()
-//                        .eq(BaseClass::getTeacherId, StpUtil.getLoginIdAsLong())
-//                        .select(BaseClass.class, x -> VoToColumnUtil.fieldsToColumns(BaseClass.class).contains(x.getProperty()))
-//        );
-//        List<Long> classIds = new ArrayList<>();
-//        for (BaseClass baseClass : classList) {
-//            classIds.add(baseClass.getId());
-//        }
-//        dto.setClassIds(classIds);
-//        return RT.ok(getData(dto));
-
-        Page<BaseStudentAssessmentInspectionMobilePageVo> page = baseStudentAssessmentInspectionService.getMobilePage(new Page<>(dto.getLimit(), dto.getSize()), dto);
-        return RT.ok(ConventPage.getPageOutput(page, BaseStudentAssessmentInspectionMobilePageVo.class));
-    }
-
-    PageOutput<BaseStudentAssessmentInspectionPageVo> getData(BaseStudentAssessmentInspectionPageDto dto) {
-        IPage<BaseStudentAssessmentInspectionPageVo> page = baseStudentAssessmentInspectionService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentAssessmentInspectionPageVo.class,
-                MPJWrappers.<BaseStudentAssessmentInspection>lambdaJoin()
-                        .like(StrUtil.isNotEmpty(dto.getCreateUserName()), XjrUser::getName, dto.getCreateUserName())
-                        .like(StrUtil.isNotEmpty(dto.getModifyUserName()), XjrUser::getName, dto.getModifyUserName())
-                        .eq(StrUtil.isNotEmpty(dto.getEnrollType()), BaseClass::getEnrollType, dto.getEnrollType())
-                        .eq(ObjectUtil.isNotNull(dto.getGradeId()), BaseClass::getGradeId, dto.getGradeId())
-                        .eq(BaseStudentAssessmentInspection::getStatus, 1)
-                        .in(ObjectUtil.isNotNull(dto.getClassIds()), BaseStudentAssessmentClassRelation::getClassId, dto.getClassIds())
-                        .in(ObjectUtil.isNotNull(dto.getBaseStudentAssessmentProjectIds()), BaseStudentAssessmentInspection::getBaseStudentAssessmentProjectId, dto.getBaseStudentAssessmentProjectIds())
-                        .between(ObjectUtil.isNotNull(dto.getStartDate()) && ObjectUtil.isNotNull(dto.getEndDate()), BaseStudentAssessmentInspection::getCreateDate, dto.getStartDate(), dto.getEndDate())
-                        .in(ObjectUtil.isNotNull(dto.getBaseStudentAssessmentProjectIds()), BaseStudentAssessmentInspection::getBaseStudentAssessmentProjectId, dto.getBaseStudentAssessmentProjectIds())
-                        .select("c.name as class_name")
-                        .select("u.name as class_teacher")
-                        .select("d.name as dept_name")
-                        .select("(SELECT COUNT(*) FROM base_student_assessment_student_relation WHERE base_student_assessment_inspection_id = t.id) as student_count")
-                        .select("(SELECT name FROM xjr_user WHERE id = t.assessment_user_id) as assessment_user_name")
-                        .select(BaseStudentAssessmentInspection::getScore)
-                        .select(BaseStudentAssessmentInspection::getSortCode)
-                        .select(BaseStudentAssessmentInspection::getReason)
-                        .select(BaseStudentAssessmentInspection::getId)
-                        .select(BaseStudentAssessmentInspection::getFileId)
-                        .selectAs(BaseStudentAssessmentCategory::getName, BaseStudentAssessmentInspectionPageVo::getAssessmentCategoryName)
-                        .selectAs(BaseStudentAssessmentProject::getName, BaseStudentAssessmentInspectionPageVo::getAssessmentProjectName)
-                        .innerJoin(BaseStudentAssessmentCategory.class, BaseStudentAssessmentCategory::getId, BaseStudentAssessmentInspection::getBaseStudentAssessmentCategoryId)
-                        .innerJoin(BaseStudentAssessmentProject.class, BaseStudentAssessmentProject::getId, BaseStudentAssessmentInspection::getBaseStudentAssessmentProjectId)
-                        .leftJoin(XjrUser.class, XjrUser::getId, BaseStudentAssessmentInspection::getAssessmentUserId)
-                        .innerJoin("base_class c ON t.class_ids LIKE CONCAT('%', c.id, '%')")
-                        .innerJoin("xjr_user u on c.teacher_id = u.id")
-                        .innerJoin("xjr_department d on c.org_id = d.id")
-                        .leftJoin(BaseStudentAssessmentClassRelation.class, BaseStudentAssessmentClassRelation::getBaseStudentAssessmentInspectionId, BaseStudentAssessmentInspection::getId)
-        );
-
-        return ConventPage.getPageOutput(page, BaseStudentAssessmentInspectionPageVo.class);
-    }
-
-//    @GetMapping(value = "/moblieInfo")
-//    @ApiOperation(value="根据id查询学生班级巡查考核信息")
-//    @SaCheckPermission("basestudentassessmentinspection:detail")
-//    public RT<List<BaseStudentAssessmentInspectionPageVo>> moblieInfo(@RequestParam Long id){
-//        BaseStudentAssessmentInspection baseStudentAssessmentInspection = baseStudentAssessmentInspectionService.getById(id);
-//        if (baseStudentAssessmentInspection == null) {
-//           return RT.error("找不到此数据!");
-//        }
-//        List<BaseStudentAssessmentInspectionPageVo> list = baseStudentAssessmentInspectionService.selectJoinList(BaseStudentAssessmentInspectionPageVo.class,
-//                MPJWrappers.<BaseStudentAssessmentInspection>lambdaJoin()
-//                .eq(ObjectUtil.isNotNull(id), BaseStudentAssessmentInspection::getId, id)
-//                .eq(BaseStudentAssessmentInspection::getStatus, 1)
-//                .selectAs(BaseClass::getName, BaseStudentAssessmentInspectionPageVo::getClassName)
-//                .select("u.name as class_teacher")
-//                .select("d.name as dept_name")
-//                .select("(SELECT COUNT(*) FROM base_student_assessment_student_relation WHERE base_student_assessment_inspection_id = t.id) as student_count")
-//                .select("(SELECT name FROM xjr_user WHERE id = t.assessment_user_id) as assessment_user_name")
-//                .select(BaseStudentAssessmentInspection::getScore)
-//                .select(BaseStudentAssessmentInspection::getSortCode)
-//                .select(BaseStudentAssessmentInspection::getReason)
-//                .select(BaseStudentAssessmentInspection::getId)
-//                .select(BaseStudentAssessmentInspection::getFileId)
-//                .selectAs(BaseStudentAssessmentCategory::getName, BaseStudentAssessmentInspectionPageVo::getAssessmentCategoryName)
-//                .selectAs(BaseStudentAssessmentProject::getName, BaseStudentAssessmentInspectionPageVo::getAssessmentProjectName)
-//                .innerJoin(BaseStudentAssessmentCategory.class, BaseStudentAssessmentCategory::getId, BaseStudentAssessmentInspection::getBaseStudentAssessmentCategoryId)
-//                .innerJoin(BaseStudentAssessmentProject.class, BaseStudentAssessmentProject::getId, BaseStudentAssessmentInspection::getBaseStudentAssessmentProjectId)
-//                .leftJoin(XjrUser.class, XjrUser::getId, BaseStudentAssessmentInspection::getAssessmentUserId)
-//                .innerJoin(BaseStudentAssessmentClassRelation.class, BaseStudentAssessmentClassRelation::getBaseStudentAssessmentInspectionId, BaseStudentAssessmentInspection::getId)
-//                .innerJoin(BaseClass.class, BaseClass::getId, BaseStudentAssessmentClassRelation::getClassId)
-//                .innerJoin("xjr_user u on t5.teacher_id = u.id")
-//                .innerJoin("xjr_department d on t5.org_id = d.id")
-//        );
-//        for (BaseStudentAssessmentInspectionPageVo inspectionPageVo : list) {
-//            //查询学生
-//            LambdaQueryWrapper<BaseStudentAssessmentStudentRelation> studentQueryWrapper = new LambdaQueryWrapper<>();
-//            studentQueryWrapper
-//                    .eq(BaseStudentAssessmentStudentRelation::getBaseStudentAssessmentInspectionId, inspectionPageVo.getId())
-//                    .select(BaseStudentAssessmentStudentRelation.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentAssessmentStudentRelationVo.class).contains(x.getProperty()));
-//            List<BaseStudentAssessmentStudentRelation> studentList = baseStudentAssessmentStudentRelationService.list(studentQueryWrapper);
-//            inspectionPageVo.setStudentList(BeanUtil.copyToList(studentList, BaseStudentAssessmentStudentRelationVo.class));
-//            inspectionPageVo.setStudentCount(studentList.size());
-//        }
-//        return RT.ok(list);
-//    }
-
     @GetMapping(value = "/info")
     @ApiOperation(value = "根据id查询学生班级巡查考核信息")
     @SaCheckPermission("basestudentassessmentinspection:detail")
@@ -230,6 +126,21 @@ public class BaseStudentAssessmentInspectionController {
         return RT.ok(baseStudentAssessmentInspectionVo);
     }
 
+    @GetMapping(value = "/mobile-page")
+    @ApiOperation(value = "学生操行分记录管理列表(移动端)")
+    @SaCheckPermission("basestudentbehaviormanage:detail")
+    public RT<PageOutput<BaseStudentAssessmentInspectionMobilePageVo>> mobilePage(@Valid BaseStudentAssessmentInspectionMobilePageDto dto) {
+        Page<BaseStudentAssessmentInspectionMobilePageVo> page = baseStudentAssessmentInspectionService.getMobilePage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        return RT.ok(ConventPage.getPageOutput(page, BaseStudentAssessmentInspectionMobilePageVo.class));
+    }
+
+    @GetMapping(value = "/mobile-info")
+    @ApiOperation(value = "根据id查询学生班级巡查考核信息(移动端)")
+    @SaCheckPermission("basestudentassessmentinspection:detail")
+    public RT<BaseStudentAssessmentInspectionMobileVo> mobileInfo(@Valid BaseStudentAssessmentInspectionMobileDto dto) {
+        BaseStudentAssessmentInspectionMobileVo result = baseStudentAssessmentInspectionService.getMobileInfo(dto);
+        return RT.ok(result);
+    }
 
     @PostMapping
     @ApiOperation(value = "新增学生班级巡查考核")

+ 18 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentAssessmentInspectionMobileDto.java

@@ -0,0 +1,18 @@
+package com.xjrsoft.module.student.dto;
+
+import com.xjrsoft.common.page.ListInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+@Data
+public class BaseStudentAssessmentInspectionMobileDto extends ListInput {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("主键")
+    @NotNull(message = "主键不能为空!")
+    private Long id;
+}

+ 90 - 65
src/main/java/com/xjrsoft/module/student/entity/BaseStudentAssessmentStudentRelation.java

@@ -1,66 +1,91 @@
-package com.xjrsoft.module.student.entity;
-
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-
-/**
-* @title: 学生干部管理
-* @Author dzx
-* @Date: 2023-11-14
-* @Version 1.0
-*/
-@Data
-@TableName("base_student_assessment_student_relation")
-@ApiModel(value = "学生班级巡查考核-关联学生对象", description = "学生班级巡查考核-关联学生")
-public class BaseStudentAssessmentStudentRelation implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-    * 主键编号
-    */
-    @ApiModelProperty("主键编号")
-    @TableId
-    private Long id;
-
-    @ApiModelProperty("学生id")
-    private Long userId;
-
-
-    @ApiModelProperty("学生班级巡查考核id")
-    private Long baseStudentAssessmentInspectionId;
-
-
-    @ApiModelProperty("序号")
-    private Integer sortCode;
-
-
-    @ApiModelProperty("学号")
-    private String studentId;
-
-
-    @ApiModelProperty("姓名")
-    private String name;
-
-
-    @ApiModelProperty("所在班级")
-    private String className;
-
-
-    @ApiModelProperty("所学专业")
-    private String majorName;
-
-    @ApiModelProperty("民族(xjr_dictionary_item[nation])")
-    private String nation;
-
-    @ApiModelProperty("性别")
-    private String gender;
-
-
+package com.xjrsoft.module.student.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.github.yulichang.annotation.EntityMapping;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+
+/**
+* @title: 学生班级巡查考核-关联学生
+* @Author fanxp
+* @Date: 2023-11-18
+* @Version 1.0
+*/
+@Data
+@TableName("base_student_assessment_student_relation")
+@ApiModel(value = "学生班级巡查考核-关联学生对象", description = "学生班级巡查考核-关联学生")
+public class BaseStudentAssessmentStudentRelation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    @TableId
+    private Long id;
+    /**
+    * 学生id
+    */
+    @ApiModelProperty("学生id")
+    private Long userId;
+    /**
+    * 班级编号
+    */
+    @ApiModelProperty("班级编号")
+    private Long classId;
+    /**
+    * 学生班级巡查考核id
+    */
+    @ApiModelProperty("学生班级巡查考核id")
+    private Long baseStudentAssessmentInspectionId;
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学号
+    */
+    @ApiModelProperty("学号")
+    private String studentId;
+    /**
+    * 姓名
+    */
+    @ApiModelProperty("姓名")
+    private String name;
+    /**
+    * 性别
+    */
+    @ApiModelProperty("性别")
+    private String gender;
+    /**
+    * 民族(xjr_dictionary_item[nation])
+    */
+    @ApiModelProperty("民族(xjr_dictionary_item[nation])")
+    private String nation;
+    /**
+    * 所在班级
+    */
+    @ApiModelProperty("所在班级")
+    private String className;
+    /**
+    * 所学专业
+    */
+    @ApiModelProperty("所学专业")
+    private String majorName;
+
+
 }

+ 8 - 0
src/main/java/com/xjrsoft/module/student/mapper/BaseStudentAssessmentInspectionMapper.java

@@ -2,10 +2,12 @@ package com.xjrsoft.module.student.mapper;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobileDto;
 import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobilePageDto;
 import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobilePageVo;
+import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobileVo;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo;
 import org.apache.ibatis.annotations.Mapper;
 
@@ -32,4 +34,10 @@ public interface BaseStudentAssessmentInspectionMapper extends MPJBaseMapper<Bas
      * @return
      */
     Page<BaseStudentAssessmentInspectionMobilePageVo> getMobilePage(Page<BaseStudentAssessmentInspectionMobilePageDto> page, BaseStudentAssessmentInspectionMobilePageDto dto);
+
+    /**
+     * app数据详情
+     * @return
+     */
+    BaseStudentAssessmentInspectionMobileVo getMobileInfo(BaseStudentAssessmentInspectionMobileDto dto);
 }

+ 8 - 0
src/main/java/com/xjrsoft/module/student/service/IBaseStudentAssessmentInspectionService.java

@@ -2,10 +2,12 @@ package com.xjrsoft.module.student.service;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobileDto;
 import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobilePageDto;
 import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobilePageVo;
+import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobileVo;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo;
 
 /**
@@ -30,4 +32,10 @@ public interface IBaseStudentAssessmentInspectionService extends MPJBaseService<
      * @return
      */
     Page<BaseStudentAssessmentInspectionMobilePageVo> getMobilePage(Page<BaseStudentAssessmentInspectionMobilePageDto> page, BaseStudentAssessmentInspectionMobilePageDto dto);
+
+    /**
+     * app数据详情
+     * @return
+     */
+    BaseStudentAssessmentInspectionMobileVo getMobileInfo(BaseStudentAssessmentInspectionMobileDto dto);
 }

+ 37 - 0
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentInspectionServiceImpl.java

@@ -1,18 +1,28 @@
 package com.xjrsoft.module.student.service.impl;
 
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.xjrsoft.common.enums.ScoreTypeEnum;
+import com.xjrsoft.module.oa.entity.Schedule;
+import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobileDto;
 import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobilePageDto;
 import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentStudentRelation;
 import com.xjrsoft.module.student.mapper.BaseStudentAssessmentInspectionMapper;
+import com.xjrsoft.module.student.mapper.BaseStudentAssessmentStudentRelationMapper;
 import com.xjrsoft.module.student.service.IBaseStudentAssessmentInspectionService;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobilePageVo;
+import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobileVo;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo;
+import com.xjrsoft.module.system.entity.File;
+import com.xjrsoft.module.system.service.IFileService;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * @title: 学生班级巡查考核
  * @Author dzx
@@ -25,6 +35,10 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
 
     private final BaseStudentAssessmentInspectionMapper assessmentInspectionMapper;
 
+    private final BaseStudentAssessmentStudentRelationMapper assessmentStudentRelationMapper;
+
+    private final IFileService fileService;
+
     @Override
     public Page<BaseStudentAssessmentInspectionPageVo> getPage(Page<BaseStudentAssessmentInspectionPageDto> page, BaseStudentAssessmentInspectionPageDto dto) {
         Page<BaseStudentAssessmentInspectionPageVo> result = assessmentInspectionMapper.getPage(page, dto);
@@ -48,4 +62,27 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
         });
         return result;
     }
+
+    @Override
+    public BaseStudentAssessmentInspectionMobileVo getMobileInfo(BaseStudentAssessmentInspectionMobileDto dto) {
+        BaseStudentAssessmentInspectionMobileVo result = assessmentInspectionMapper.getMobileInfo(dto);
+        // 处理加减分
+        if (result.getScoreType().equals(ScoreTypeEnum.ScoreMinus.getCode())) {
+            result.setScore(result.getScore() * -1);
+        }
+
+        // 获取学生信息
+        List<BaseStudentAssessmentStudentRelation> baseStudentAssessmentStudentRelations = assessmentStudentRelationMapper.selectList(
+                Wrappers.<BaseStudentAssessmentStudentRelation>query().lambda()
+                        .eq(BaseStudentAssessmentStudentRelation::getBaseStudentAssessmentInspectionId, result.getBaseStudentAssessmentInspectionId())
+                        .eq(BaseStudentAssessmentStudentRelation::getClassId,result.getClassId())
+        );
+        result.setStudentList(baseStudentAssessmentStudentRelations);
+        result.setStudentCount(baseStudentAssessmentStudentRelations.size());
+
+        // 获取文件列表
+        result.setFileInfos(fileService.list(Wrappers.<File>query().lambda().eq(File::getFolderId,result.getFileId())));
+
+        return result;
+    }
 }

+ 114 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentAssessmentInspectionMobileVo.java

@@ -0,0 +1,114 @@
+package com.xjrsoft.module.student.vo;
+
+import com.github.yulichang.annotation.EntityMapping;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentStudentRelation;
+import com.xjrsoft.module.system.entity.File;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+* @title: 学生班级巡查考核表单出参
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Data
+public class BaseStudentAssessmentInspectionMobileVo {
+
+    /**
+     * 主键编号
+     */
+    @ApiModelProperty("主键编号")
+    private Long id;
+    /**
+     * 班级编号
+     */
+    @ApiModelProperty("班级编号")
+    private Long classId;
+    /**
+     * 学生班级巡查考核id
+     */
+    @ApiModelProperty("学生班级巡查考核id")
+    private Long baseStudentAssessmentInspectionId;
+    /**
+     * 班级
+     */
+    @ApiModelProperty("班级")
+    private String assessmentClassName;
+    /**
+     * 考核时间
+     */
+    @ApiModelProperty("考核时间")
+    private Date assessmentDate;
+    /**
+     * 数据创建时间
+     */
+    @ApiModelProperty("数据创建时间")
+    private Date createDate;
+    /**
+     * 分数
+     */
+    @ApiModelProperty("分数")
+    private Double score;
+    /**
+     * 分数类型编码
+     */
+    @ApiModelProperty("分数类型编码")
+    private String scoreType;
+    /**
+     * 分数类型
+     */
+    @ApiModelProperty("分数类型")
+    private String scoreTypeCn;
+    /**
+     * 考核用户
+     */
+    @ApiModelProperty("考核用户")
+    private String assessmentUserName;
+    /**
+     * 原因
+     */
+    @ApiModelProperty("原因")
+    private String reason;
+    /**
+     * 文件ID(xjr_file)
+     */
+    @ApiModelProperty("文件ID(xjr_file)")
+    private Long fileId;
+
+    /**
+     * 登记人
+     */
+    @ApiModelProperty("登记人")
+    private String createUserName;
+
+    /**
+     * 考核项目
+     */
+    @ApiModelProperty("考核项目")
+    private String assessmentProjectName;
+
+    /**
+     * 考核类别
+     */
+    @ApiModelProperty("考核类别")
+    private String assessmentCategoryName;
+
+    /**
+     * 影响班级考核的学生
+     */
+    @ApiModelProperty("影响班级考核的学生")
+    private List<BaseStudentAssessmentStudentRelation> studentList;
+
+    @ApiModelProperty("学生人数")
+    private Integer studentCount;
+
+    /**
+     * 附件列表
+     */
+    @ApiModelProperty("附件列表")
+    private List<File> fileInfos;
+}

+ 15 - 1
src/main/resources/mapper/student/BaseStudentAssessmentInspectionMapper.xml

@@ -26,7 +26,7 @@
     <select id="getMobilePage" resultType="com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobilePageVo">
         select t.id,t1.assessment_date,t2.name as assessment_category_name,t3.name as assessment_project_name,t5.name as assessment_class_name,t1.reason,t1.score,t1.score_type,t4.name as score_type_cn,
         (
-        SELECT count(*) FROM base_student_assessment_student_relation WHERE base_student_assessment_inspection_id = t1.id and class_id=t.class_id
+            SELECT count(*) FROM base_student_assessment_student_relation WHERE base_student_assessment_inspection_id = t1.id and class_id=t.class_id
         ) as student_count
         from base_student_assessment_class_relation t
         left join base_student_assessment_inspection t1 on t1.id=t.base_student_assessment_inspection_id
@@ -36,4 +36,18 @@
         left join base_class t5 on t5.id=t.class_id
         where  t1.delete_mark=0 and t1.status=1 ;
     </select>
+
+    <select id="getMobileInfo" parameterType="com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobileDto" resultType="com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobileVo">
+        select t.id,t.class_id,t.base_student_assessment_inspection_id,t1.score,t5.name as assessment_class_name,t2.name as assessment_category_name,t3.name as assessment_project_name,t1.assessment_date,t1.reason,
+        t6.name as assessment_user_name,t7.name as create_user_name,t1.create_date,t1.file_id,t1.score_type,t4.name as score_type_cn
+        from base_student_assessment_class_relation t
+        left join base_student_assessment_inspection t1 on t1.id=t.base_student_assessment_inspection_id
+        left join base_student_assessment_category t2 on (t2.id = t1.base_student_assessment_category_id)
+        left join base_student_assessment_project t3 on (t3.id = t1.base_student_assessment_project_id)
+        left join xjr_dictionary_detail t4 on t4.code=t1.score_type
+        left join base_class t5 on t5.id=t.class_id
+        left join xjr_user t6 on t1.assessment_user_id=t6.id
+        left join xjr_user t7 on t1.create_user_id=t7.id
+        where t.id=#{id};
+    </select>
 </mapper>