Bläddra i källkod

学生成绩录入

dzx 11 månader sedan
förälder
incheckning
83a250df93

+ 9 - 0
src/main/java/com/xjrsoft/module/xycxedu/controller/ExamSubjectScoreEnterController.java

@@ -10,6 +10,7 @@ import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.module.base.entity.BaseClass;
+import com.xjrsoft.module.base.service.IBaseClassService;
 import com.xjrsoft.module.organization.entity.User;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
 import com.xjrsoft.module.xycxedu.dto.AddExamSubjectScoreEnterDto;
@@ -39,6 +40,7 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.validation.Valid;
 import java.io.IOException;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
@@ -56,6 +58,8 @@ public class ExamSubjectScoreEnterController {
 
     private final IExamSubjectScoreEnterService enterService;
 
+    private final IBaseClassService classService;
+
     @GetMapping(value = "/page")
     @ApiOperation(value="成绩录入列表(分页)")
     @SaCheckPermission("examsubjectscoreenter:detail")
@@ -74,6 +78,11 @@ public class ExamSubjectScoreEnterController {
         if (examSubjectScoreEnter == null) {
            return RT.error("找不到此数据!");
         }
+        List<String> classIds = Arrays.asList(examSubjectScoreEnter.getClassIds().split(","));
+        List<BaseClass> classList = classService.listByIds(classIds);
+
+        examSubjectScoreEnter.setClassList(classList);
+
         return RT.ok(examSubjectScoreEnter);
     }
 

+ 3 - 1
src/main/java/com/xjrsoft/module/xycxedu/service/impl/ExamSubjectScoreEnterServiceImpl.java

@@ -174,7 +174,9 @@ public class ExamSubjectScoreEnterServiceImpl extends MPJBaseServiceImpl<ExamSub
         ExamSubjectScoreEnter scoreEnter = this.getById(dto.getExamSubjectScoreEnterId());
         BaseCourseSubject courseSubject = courseSubjectService.getById(scoreEnter.getCourseSubjectId());
 
-        List<ExamSubjectScoreEnterImportVo> result = scoreService.getEnterScoreStudentList(dto);
+        List<ExamSubjectScoreEnterImportVo> result = scoreService.getEnterScoreStudentList(new ExamSubjectScoreEnterDto(){{
+            setExamSubjectScoreEnterId(dto.getExamSubjectScoreEnterId());
+        }});
         List<ArrayList<String>> dataList = new ArrayList<>();
         for (ExamSubjectScoreEnterImportVo recordVo : result) {
             ArrayList<String> data = new ArrayList<>();

+ 5 - 0
src/main/java/com/xjrsoft/module/xycxedu/vo/ExamSubjectScoreEnterVo.java

@@ -2,10 +2,12 @@ package com.xjrsoft.module.xycxedu.vo;
 
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ContentStyle;
+import com.xjrsoft.module.base.entity.BaseClass;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.Date;
+import java.util.List;
 
 /**
 * @title: 成绩录入表单出参
@@ -71,4 +73,7 @@ public class ExamSubjectScoreEnterVo {
     @ApiModelProperty("班级名称")
     private String classIds;
 
+    @ApiModelProperty("班级")
+    private List<BaseClass> classList;
+
 }