xiaofei 7 ヶ月 前
コミット
8e24551858

+ 7 - 8
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicExamStudentServiceImpl.java

@@ -265,14 +265,13 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
         basicExamStudent.setSchoolId(schoolId);
         basicExamStudent.setTeacherId(teacherId);
 
-        // 同一课程+教学班下只能有一位任课老师
-//        List<BasicExamStudent> basicExamStudentList = this.listByExamIdAndCourseIdAndTeachClassName(basicExamStudent.getExamId(), basicExamStudent.getCourseId(), basicExamStudent.getTeachClassName());
-//        if (CollectionUtils.isNotEmpty(basicExamStudentList)) {
-//            List<Long> teacherIds = basicExamStudentList.stream().filter(m -> m.getTeacherId() != null).map(BasicExamStudent::getTeacherId).distinct().collect(Collectors.toList());
-//            if (teacherIds.size() > 1 || (basicExamStudent.getTeacherId() != null && teacherIds.get(0) != null && basicExamStudent.getTeacherId().equals(teacherIds.get(0)))) {
-//                throw ExceptionResultEnum.ERROR.exception("同课程同教学班,只允许设置一个任课老师");
-//            }
-//        }
+        if (ExamModelEnum.MODEL4.equals(basicExam.getExamModel())) {
+            if (basicExamStudent.getPaperType() == null) {
+                basicExamStudent.setPaperType(SystemConstant.DEFAULT_PAPER_TYPE_A);
+            } else if (!SystemConstant.DEFAULT_PAPER_TYPE_A.equals(basicExamStudent.getPaperType())) {
+                throw ExceptionResultEnum.ERROR.exception("模式4的考生卷型只能为A卷");
+            }
+        }
 
         if (SystemConstant.longNotNull(basicExamStudent.getId())) {
             // 编辑 (学号不可更改)

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

@@ -419,7 +419,7 @@ public class ClientServiceImpl implements ClientService {
                     List<Map> ordinaryList = JSONObject.parseArray(ordinaryContent, Map.class);
                     for (Map contentMap : ordinaryList) {
                         String type = contentMap.get("type").toString();
-                        if (outputFileTypeList.contains(OutputFileTypeEnum.SIGN) && ClassifyEnum.SIGN.name().equals(type)) {
+                        if (outputFileTypeList.contains(OutputFileTypeEnum.CHECK_IN) && ClassifyEnum.CHECK_IN.name().equals(type)) {
                             int count = Integer.parseInt(contentMap.get("backupCount").toString());
                             for (int i = 0; i < count; i++) {
                                 spliceOtherContent(otherList, pathList, contentMap);

+ 7 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/ImportLogicServiceImpl.java

@@ -197,6 +197,12 @@ public class ImportLogicServiceImpl implements ImportLogicService {
 //                    stringJoiner.add(RequiredFieldsEnum.EXAM_PLACE.getName() + "必填");
 //                }
             });
+
+            if (ExamModelEnum.MODEL4.equals(basicExam.getExamModel())) {
+                if (basicExamStudent.getPaperType() == null) {
+                    basicExamStudent.setPaperType(SystemConstant.DEFAULT_PAPER_TYPE_A);
+                }
+            }
             // 任课老师和任课老师工号都有值或都没值
             if (StringUtils.isNotBlank(basicExamStudentImport.getTeacherCode()) && StringUtils.isBlank(basicExamStudentImport.getTeacherName())) {
                 stringJoiner.add(RequiredFieldsEnum.TEACHER_NAME.getName() + "必填");
@@ -817,7 +823,7 @@ public class ImportLogicServiceImpl implements ImportLogicService {
                     for (Map.Entry<String, String> entry : m.entrySet()) {
                         // 必填字段
                         if (requiredMap.containsKey(entry.getKey())) {
-                            if(entry.getValue() == null){
+                            if (entry.getValue() == null) {
                                 continue;
                             }
                             EnumResult enumResult = requiredMap.get(entry.getKey());

+ 1 - 1
distributed-print-business/src/main/resources/mapper/BasicCardRuleMapper.xml

@@ -42,7 +42,7 @@
             <if test="schoolId != null and schoolId != ''">
                 and school_id = #{schoolId}
             </if>
-            <if test="enable != null and enable != ''">
+            <if test="enable != null">
                 and enable = #{enable}
             </if>
             <if test="name != null and name != ''">

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

@@ -188,7 +188,7 @@ public class ScanAnswerCardServiceImpl extends ServiceImpl<ScanAnswerCardMapper,
             List<ScanAnswerCardQuestion> scanAnswerCardQuestions = new ArrayList<>();
             int i = 1;
             for (CardPageWrapper page : cardFile.getPages()) {
-                for (FillArea fillArea : page.getExchange().getFillArea().stream().filter(m -> OmrField.QUESTION.equals(m.getField())).collect(Collectors.toList())) {
+                for (FillArea fillArea : page.getExchange().getFillArea().stream().filter(m -> OmrField.QUESTION.name().equals(m.getField().toUpperCase())).collect(Collectors.toList())) {
                     for (FillItem item : fillArea.getItems()) {
                         ScanAnswerCardQuestion scanAnswerCardQuestion = new ScanAnswerCardQuestion();
                         scanAnswerCardQuestion.setId(SystemConstant.getDbUuid());
@@ -200,7 +200,7 @@ public class ScanAnswerCardServiceImpl extends ServiceImpl<ScanAnswerCardMapper,
                         scanAnswerCardQuestion.setSubNumber(item.getSubNumber());
                         scanAnswerCardQuestion.setOptionCount(item.getOptions().size());
                         scanAnswerCardQuestion.setQuestionType(fillArea.isSingle() ? 1 : 2);
-                        scanAnswerCardQuestion.setPaperIndex(i / 2);
+                        scanAnswerCardQuestion.setPaperIndex(i / 2 + 1);
                         scanAnswerCardQuestion.setPageIndex(i % 2 == 1 ? 1 : 2);
                         scanAnswerCardQuestion.setCreateTime(System.currentTimeMillis());
                         scanAnswerCardQuestions.add(scanAnswerCardQuestion);

+ 4 - 4
teachcloud-mark/src/main/resources/mapper/ScanOmrTaskMapper.xml

@@ -48,7 +48,7 @@
 			</if>
 			INNER JOIN mark_paper mp ON s.exam_id = mp.exam_id
 				and s.paper_number = mp.paper_number
-				and s.paper_type = mp.paper_type
+				and s.serial_number = mp.serial_number
 				and mp.status = #{markPaperStatus}
 			<where>
 				<if test="examId != null">
@@ -91,7 +91,7 @@
 			</if>
 		INNER JOIN mark_paper mp ON s.exam_id = mp.exam_id
 			and s.paper_number = mp.paper_number
-			and s.paper_type = mp.paper_type
+			and s.serial_number = mp.serial_number
 			and mp.status = #{markPaperStatus}
 		<where>
 			<if test="examId != null">
@@ -132,7 +132,7 @@
 		INNER join basic_exam_student bes on bes.id = s.basic_student_id
 		INNER JOIN mark_paper mp ON s.exam_id = mp.exam_id
 		and s.paper_number = mp.paper_number
-		and s.paper_type = mp.paper_type
+		and s.serial_number = mp.serial_number
 		and mp.status = #{markPaperStatus}
         <where>
             <if test="examId != null">
@@ -184,7 +184,7 @@
 						<if test="scanOmrTask.markPaperStatus != null">
 							INNER JOIN mark_paper mp ON ms.exam_id = mp.exam_id
 							and ms.paper_number = mp.paper_number
-							and ms.paper_type = mp.paper_type
+							and ms.serial_number = mp.serial_number
 							and mp.status = #{scanOmrTask.markPaperStatus}
 						</if>
 					WHERE