xiaofei 11 miesięcy temu
rodzic
commit
bbf9b1af1e

+ 1 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicExamStudentServiceImpl.java

@@ -26,6 +26,7 @@ import com.qmth.teachcloud.common.enums.BasicExamStudentStatusEnum;
 import com.qmth.teachcloud.common.enums.EnumResult;
 import com.qmth.teachcloud.common.enums.ExamModelEnum;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+import com.qmth.teachcloud.common.enums.mark.MarkPaperStatus;
 import com.qmth.teachcloud.common.service.*;
 import com.qmth.teachcloud.common.util.ConvertUtil;
 import com.qmth.teachcloud.common.util.ExcelUtil;

+ 1 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamTaskApplyController.java

@@ -235,7 +235,7 @@ public class ExamTaskApplyController {
     @RequestMapping(value = "/page_tiku_paper", method = RequestMethod.POST)
     @Transactional(rollbackFor = Exception.class)
     @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
-    @OperationLogDetail(operationType = OperationTypeEnum.SELECT, detail = "查询题库试卷列表,课程代码:{{courseCode}}、试卷名称:{{paperName}}、教师工号:{{account}}")
+    @OperationLogDetail(operationType = OperationTypeEnum.SELECT, detail = "查询题库试卷列表,课程ID:{{courseId}}、试卷名称:{{paperName}}、教师工号:{{account}}")
     public Result pageTikuPaper(@ApiParam(value = "课程代码") @RequestParam(required = false) Long courseId,
                                 @ApiParam(value = "试卷名称") @RequestParam(value = "paperName", required = false) String paperName,
                                 @ApiParam(value = "教师工号") @RequestParam(value = "account", required = false) String account,

+ 2 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/aspect/LogAspect.java

@@ -268,6 +268,8 @@ public class LogAspect {
                     return detail;
                 }
             }
+            // 未替换参数,全部置空
+            detail = detail.replaceAll("\\{\\{[A-Za-z0-9].+}}", "");
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 2 - 1
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkPaperServiceImpl.java

@@ -263,7 +263,8 @@ public class MarkPaperServiceImpl extends ServiceImpl<MarkPaperMapper, MarkPaper
     public Boolean finishPaper(Long examId, String paperNumber, String teachClassName) {
         MarkPaper markPaper = this.getByExamIdAndPaperNumber(examId, paperNumber);
         Objects.requireNonNull(markPaper, "未找到评卷信息");
-        String courseInfo = String.format("%s[%s],试卷编号%s,", markPaper.getCourseName(), markPaper.getCourseCode(), markPaper.getPaperNumber());
+        BasicCourse basicCourse = basicCourseService.getById(markPaper.getCourseId());
+        String courseInfo = String.format("%s[%s],试卷编号%s,", basicCourse.getName(), basicCourse.getCode(), markPaper.getPaperNumber());
         if (Objects.nonNull(markPaper.getStatus()) && markPaper.getStatus() != MarkPaperStatus.FINISH) {
             throw ExceptionResultEnum.ERROR.exception(courseInfo + "评卷任务未完成,请完成评卷任务并检查成绩后再导出");
         }

+ 3 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -1757,6 +1757,9 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
     public void updateByBasicExamStudent(BasicExamStudent basicExamStudent, MarkPaper markPaper, Set<String> secretNumberSet) {
         MarkStudent markStudent = this.findByExamIdAndPaperNumberAndStudentCode(basicExamStudent.getExamId(), basicExamStudent.getPaperNumber(), basicExamStudent.getStudentCode());
         if (markStudent == null) {
+            if(MarkPaperStatus.FINISH.equals(markPaper.getStatus())){
+                throw ExceptionResultEnum.ERROR.exception("试卷编号["+markPaper.getPaperNumber()+"]已结束阅卷,不允许新增考生");
+            }
             markStudent = new MarkStudent(SystemConstant.getDbUuid(), basicExamStudent.getExamId(), basicExamStudent.getId(), basicExamStudent.getCourseId(), basicExamStudent.getPaperNumber(), markPaper.getCoursePaperId(), markPaper.getPaperType(), basicExamStudent.getStudentCode(), "", basicExamStudent.getExamPlace(), basicExamStudent.getExamRoom(), basicExamStudent.getExamStartTime(), basicExamStudent.getExamEndTime(), markPaper.getUserId());
             if (markStudent.getSecretNumber() == null) {
                 markStudent.randomSecretNumber();

+ 12 - 9
teachcloud-mark/src/main/resources/mapper/MarkStudentMapper.xml

@@ -398,6 +398,8 @@
                bes.teach_class_name teachClassName,
                bc.code courseCode,
                bc.name courseName,
+               bes.exam_start_time examStartTime,
+               bes.exam_end_time examEndTime,
                bes.status,
                ifnull(s.objective_score,0)+ifnull(s.subjective_score,0) totalScore
         from mark_student s
@@ -622,19 +624,20 @@
     <select id="listUnexistStudentByExamIdAndCoursePaperId"
             resultType="com.qmth.teachcloud.mark.dto.UnexistStudentDto">
         SELECT
-        t.course_code courseCode,
-        t.course_name courseName,
-        so.name teachingRoomName,
-        t.paper_number paperNumber,
-        t.student_code studentCode,
-        t.student_name studentName
+            bc.code courseCode,
+            bc.name courseName,
+            so.name teachingRoomName,
+            t.paper_number paperNumber,
+            t.student_code studentCode,
+            bes.student_name studentName
         FROM
-        mark_student t left join sys_user su on t.create_id = su.id
+        (select * from mark_student where exam_id = #{examId}) t
+            left join (select * from basic_exam_student where exam_id = #{examId}) bes on t.basic_student_id = bes.id
+            left join sys_user su on t.create_id = su.id
         left join basic_course bc on t.course_id = bc.id
         left join sys_org so on bc.teaching_room_id = so.id
         WHERE
-        t.exam_id = #{examId}
-        AND t.scan_status = 'UNEXIST'
+         t.scan_status = 'UNEXIST'
         <if test="courseId != null">
             and t.course_id = #{courseId}
         </if>