Sfoglia il codice sorgente

fix:印刷计划表查询学期获取方式变更

caozixuan 3 anni fa
parent
commit
403c00d8a2

+ 6 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamStudentMapper.java

@@ -35,6 +35,12 @@ public interface ExamStudentMapper extends BaseMapper<ExamStudent> {
 
     void insertBatch(@Param("examStudents") List<ExamStudent> examStudents);
 
+    /**
+     * 根据班级id查询考生,班级可以是教学班或行政班(两表查)
+     * @param schoolId 学校id
+     * @param classId 班级id
+     * @return 考生查询结果
+     */
     List<ExamStudent> listExamStudentBySchoolIdAndClazzId(@Param("schoolId") Long schoolId, @Param("classId") String classId);
 
     SysOrg getSysOrgByBelongOrgId(@Param("studentCode") String studentCode, @Param("schoolId") Long schoolId);

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -1751,12 +1751,12 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
                     examStudentService.insertBatch(examStudents);
                 }
                 int studentCount = examStudents.size();
-                if (studentCount - examDetail.getTotalSubjects().intValue() != 0) {
+                if (studentCount - examDetail.getTotalSubjects() != 0) {
                     UpdateWrapper<ExamDetail> updateWrapper = new UpdateWrapper<>();
                     updateWrapper.lambda().set(ExamDetail::getTotalSubjects, studentCount).eq(ExamDetail::getId, examDetail.getId());
                     examDetailService.update(updateWrapper);
                 }
-                if (studentCount - examDetailCourse.getTotalSubjects().intValue() != 0) {
+                if (studentCount - examDetailCourse.getTotalSubjects() != 0) {
                     UpdateWrapper<ExamDetailCourse> updateWrapper = new UpdateWrapper<>();
                     updateWrapper.lambda().set(ExamDetailCourse::getTotalSubjects, studentCount).eq(ExamDetailCourse::getId, examDetailCourse.getId());
                     examDetailCourseService.update(updateWrapper);

+ 4 - 2
distributed-print-business/src/main/resources/mapper/ExamPaperStructureMapper.xml

@@ -6,7 +6,7 @@
         SELECT
             eps.id,
             epp.school_id schoolId,
-            epp.semester_id semesterId,
+            bs.id semesterId,
             bs.name semesterName,
             epp.third_relate_id thirdRelateId,
             epp.third_relate_name thirdRelateName,
@@ -20,7 +20,9 @@
         FROM
             exam_print_plan epp
                 LEFT JOIN
-            basic_semester bs ON epp.semester_id = bs.name
+            basic_exam be on epp.exam_id = be.id
+                LEFT JOIN
+            basic_semester bs ON be.semester_id = bs.id
                 LEFT JOIN
             (SELECT DISTINCT
                 a.print_plan_id,