caozixuan 4 年之前
父節點
當前提交
762b673ca3

+ 1 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBExamStudentMapper.java

@@ -108,7 +108,7 @@ public interface TBExamStudentMapper extends BaseMapper<TBExamStudent> {
      * @param absent
      * @return
      */
-    IPage<TBStudentReportResult> reportList(IPage<Map> iPage, @Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("collegeId") Long collegeId, @Param("courseCode") String courseCode, @Param("clazzId") Long clazzId, @Param("absent") Boolean absent);
+    IPage<TBStudentReportResult> reportList(IPage<Map> iPage, @Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("collegeId") Long collegeId, @Param("courseCode") String courseCode, @Param("clazzId") Long clazzId, @Param("absent") Boolean absent,@Param("studentCode") String studentCode);
 
     List<ExamInfo> listExamBySchoolIdAndStudentCode(@Param("schoolId") Long schoolId, @Param("studentCode") String studentCode);
 

+ 1 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExamStudentService.java

@@ -144,7 +144,7 @@ public interface TBExamStudentService extends IService<TBExamStudent> {
      * @param absent
      * @return
      */
-    IPage<TBStudentReportResult> reportList(IPage<Map> iPage, Long schoolId, Long examId, Long collegeId, String courseCode, Long clazzId, Boolean absent);
+    IPage<TBStudentReportResult> reportList(IPage<Map> iPage, Long schoolId, Long examId, Long collegeId, String courseCode, Long clazzId, Boolean absent,String studentCode);
 
     /**
      * 学生报告-个人成绩总览接口

+ 2 - 2
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamStudentServiceImpl.java

@@ -230,11 +230,11 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
      * @return
      */
     @Override
-    public IPage<TBStudentReportResult> reportList(IPage<Map> iPage, Long schoolId, Long examId, Long collegeId, String courseCode, Long clazzId, Boolean absent) {
+    public IPage<TBStudentReportResult> reportList(IPage<Map> iPage, Long schoolId, Long examId, Long collegeId, String courseCode, Long clazzId, Boolean absent,String studentCode) {
         if (schoolId == null) {
             schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         }
-        return tbExamStudentMapper.reportList(iPage, schoolId, examId, collegeId, courseCode, clazzId, absent);
+        return tbExamStudentMapper.reportList(iPage, schoolId, examId, collegeId, courseCode, clazzId, absent,studentCode);
     }
 
     /**

+ 7 - 0
teachcloud-report-business/src/main/resources/mapper/TBExamStudentMapper.xml

@@ -231,7 +231,14 @@
             <if test="absent != null">
                 and a.absent = #{absent}
             </if>
+            <if test="absent != null">
+                and a.absent = #{absent}
+            </if>
+            <if test="studentCode != null and studentCode.length() > 0">
+                and a.student_code = #{studentCode}
+            </if>
         </where>
+        order by b.school_id desc, b.id desc,a.course_code,c.id,d.id,a.student_code desc
     </select>
     <select id="listExamBySchoolIdAndStudentCode"
             resultType="com.qmth.teachcloud.report.business.bean.result.ExamInfo">

+ 3 - 1
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/CourseController.java

@@ -47,8 +47,10 @@ public class CourseController {
     public Result surveyInspectView(@ApiParam(value = "考试id", required = true) @RequestParam String examId,
                                            @ApiParam(value = "学期", required = true) @RequestParam SemesterEnum semester,
                                            @ApiParam(value = "学校id", required = false) @RequestParam(required = false) String schoolId) {
+        Object obj = ServletUtil.getRequestHeaderSchoolId();
+        Long tmp =  SystemConstant.convertIdToLong(String.valueOf(obj));
 
-        return ResultUtil.ok(courseReportService.findInfoInspectCourseExamTotal(Objects.isNull(schoolId) ? (Long) ServletUtil.getRequestHeaderSchoolId() : SystemConstant.convertIdToLong(schoolId), semester, SystemConstant.convertIdToLong(examId)));
+        return ResultUtil.ok(courseReportService.findInfoInspectCourseExamTotal(Objects.isNull(schoolId) ? tmp : SystemConstant.convertIdToLong(schoolId), semester, SystemConstant.convertIdToLong(examId)));
     }
 
     @ApiOperation(value = "考查课程考试分析接口")

+ 1 - 2
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/DataAnalyzeController.java

@@ -2,7 +2,6 @@ package com.qmth.teachcloud.report.api;
 
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.teachcloud.common.contant.SystemConstant;
-import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.util.Result;
 import com.qmth.teachcloud.common.util.ResultUtil;
 import com.qmth.teachcloud.report.business.service.AnalyzeForReportService;
@@ -35,7 +34,7 @@ public class DataAnalyzeController {
     @RequestMapping(value = "/calculate", method = RequestMethod.POST)
     @Transactional(rollbackFor = Exception.class)
     @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
-    public Result configImport(@RequestParam Long schoolId, @RequestParam Long examId, @RequestParam String courseCode) throws Exception {
+    public Result dataCalculate(@RequestParam Long schoolId, @RequestParam Long examId, @RequestParam String courseCode) throws Exception {
         analyzeForReportService.buildAnalyzeExamCourse(examId,courseCode);
         analyzeForReportService.buildAnalyzeExamCourseRecord(examId, courseCode);
         analyzeForReportService.buildAnalyzeExamCourseCollegeInspect(examId, courseCode);

+ 2 - 1
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/StudentReportController.java

@@ -33,6 +33,7 @@ public class StudentReportController {
                              @ApiParam(value = "科目编码", required = true) @RequestParam(required = false) String courseCode,
                              @ApiParam(value = "班级id", required = true) @RequestParam(required = false) String clazzId,
                              @ApiParam(value = "是否缺考", required = true) @RequestParam(required = false) Boolean absent,
+                             @ApiParam(value = "学号", required = true) @RequestParam(required = false) String studentCode,
                              @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
                              @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
         return ResultUtil.ok(tbExamStudentService.reportList(new Page<>(pageNumber, pageSize), SystemConstant.convertIdToLong(schoolId),
@@ -40,7 +41,7 @@ public class StudentReportController {
                 SystemConstant.convertIdToLong(collegeId),
                 courseCode,
                 SystemConstant.convertIdToLong(clazzId),
-                absent));
+                absent,studentCode));
     }
 
     @ApiOperation(value = "学生报告-个人成绩总览接口")