Browse Source

班级考核增加字段

dzx142631 1 year ago
parent
commit
81b6deaece

+ 34 - 1
src/main/java/com/xjrsoft/module/student/controller/BaseStudentAssessmentInspectionController.java

@@ -20,13 +20,17 @@ import com.xjrsoft.module.student.entity.BaseStudentAssessmentClassRelation;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentProject;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentStudentRelation;
+import com.xjrsoft.module.student.mapper.BaseStudentAssessmentCategoryMapper;
+import com.xjrsoft.module.student.mapper.BaseStudentAssessmentProjectMapper;
 import com.xjrsoft.module.student.service.IBaseStudentAssessmentClassRelationService;
 import com.xjrsoft.module.student.service.IBaseStudentAssessmentInspectionService;
+import com.xjrsoft.module.student.service.IBaseStudentAssessmentStudentRelationService;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentClassRelationListVo;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionVo;
 import com.xjrsoft.module.student.vo.BaseStudentAssessmentStudentRelationVo;
 import com.xjrsoft.module.teacher.entity.XjrUser;
+import com.xjrsoft.module.teacher.mapper.XjrUserMapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
@@ -57,7 +61,10 @@ public class BaseStudentAssessmentInspectionController {
 
     private final IBaseStudentAssessmentInspectionService baseStudentAssessmentInspectionService;
     private final IBaseStudentAssessmentClassRelationService baseStudentAssessmentClassRelationService;
-    private final com.xjrsoft.module.student.service.IBaseStudentAssessmentStudentRelationService baseStudentAssessmentStudentRelationService;
+    private final IBaseStudentAssessmentStudentRelationService baseStudentAssessmentStudentRelationService;
+    private final BaseStudentAssessmentProjectMapper baseStudentAssessmentProjectMapper;
+    private final BaseStudentAssessmentCategoryMapper baseStudentAssessmentCategoryMapper;
+    private final XjrUserMapper xjrUserMapper;
 
     @GetMapping(value = "/page")
     @ApiOperation(value="学生班级巡查考核列表(分页)")
@@ -128,7 +135,33 @@ public class BaseStudentAssessmentInspectionController {
                 .select(BaseStudentAssessmentStudentRelation.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentAssessmentStudentRelationVo.class).contains(x.getProperty()));
         List<BaseStudentAssessmentStudentRelation> studentList = baseStudentAssessmentStudentRelationService.list(studentQueryWrapper);
         baseStudentAssessmentInspectionVo.setStudentList(BeanUtil.copyToList(studentList, BaseStudentAssessmentStudentRelationVo.class));
+        baseStudentAssessmentInspectionVo.setStudentCount(studentList.size());
 
+        //查询考核项目
+        BaseStudentAssessmentProject project = baseStudentAssessmentProjectMapper.selectById(baseStudentAssessmentInspection.getBaseStudentAssessmentProjectId());
+        if(project != null){
+            baseStudentAssessmentInspectionVo.setAssessmentProjectName(project.getName());
+        }
+        //查询考核类别
+        BaseStudentAssessmentCategory category = baseStudentAssessmentCategoryMapper.selectById(baseStudentAssessmentInspection.getBaseStudentAssessmentCategoryId());
+        if(category != null){
+            baseStudentAssessmentInspectionVo.setAssessmentCategoryName(category.getName());
+        }
+        //登记人
+        XjrUser createUser = xjrUserMapper.selectById(baseStudentAssessmentInspection.getCreateUserId());
+        if(createUser != null){
+            baseStudentAssessmentInspectionVo.setCreateUserName(createUser.getName());
+        }
+        //考核人
+        XjrUser assessmentUser = xjrUserMapper.selectById(baseStudentAssessmentInspection.getAssessmentUserId());
+        if(createUser != null){
+            baseStudentAssessmentInspectionVo.setAssessmentUserName(assessmentUser.getName());
+        }
+        //修改人
+        XjrUser modifyUser = xjrUserMapper.selectById(baseStudentAssessmentInspection.getModifyUserId());
+        if(modifyUser != null){
+            baseStudentAssessmentInspectionVo.setModifyUserName(modifyUser.getName());
+        }
         return RT.ok(baseStudentAssessmentInspectionVo);
     }
 

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

@@ -112,7 +112,13 @@ public class BaseStudentAssessmentInspectionVo {
      * 考核项目
      */
     @ApiModelProperty("考核项目")
-    private Long assessmentProjectName;
+    private String assessmentProjectName;
+
+    /**
+     * 考核类别
+     */
+    @ApiModelProperty("考核类别")
+    private String assessmentCategoryName;
 
     /**
      * 影响班级考核的学生
@@ -127,4 +133,7 @@ public class BaseStudentAssessmentInspectionVo {
     @ApiModelProperty("考核班级")
     @EntityMapping(thisField = "id", joinField = "baseStudentAssessmentInspectionId")
     private List<BaseStudentAssessmentClassRelationListVo> classList;
+
+    @ApiModelProperty("学生人数")
+    private Integer studentCount;
 }