xiaofei hai 1 ano
pai
achega
1e8890fc58

+ 12 - 7
distributed-print-business/src/main/resources/mapper/ExamDetailMapper.xml

@@ -589,16 +589,27 @@
         LEFT JOIN
         basic_semester bs on bs.id = be.semester_id
         <where>
-            and be.enable = true
             <if test="schoolId != null and schoolId > 0">
                 AND det.school_id = #{schoolId}
             </if>
+            <if test="semesterId != null and semesterId != ''">
+                AND bs.id = #{semesterId}
+            </if>
+            <if test="examId != null and examId != ''">
+                AND be.id = #{examId}
+            </if>
             <if test="printPlanIdList != null and printPlanIdList != '' and printPlanIdList.size() > 0">
                 AND det.print_plan_id IN
                 <foreach collection="printPlanIdList" item="item" index="index" open="(" separator="," close=")">
                     #{item}
                 </foreach>
             </if>
+            <if test="courseCode != null and courseCode != ''">
+                AND cou.course_code = #{courseCode}
+            </if>
+            <if test="paperNumber != null and paperNumber != ''">
+                AND cou.paper_number = #{paperNumber}
+            </if>
             <if test="examPlace != null and examPlace != ''">
                 AND det.exam_place = #{examPlace}
             </if>
@@ -614,12 +625,6 @@
             <if test="endDate != null and endDate > 0">
                 AND #{endDate} >= det.exam_end_time
             </if>
-            <if test="semesterId != null and semesterId != ''">
-                AND bs.id = #{semesterId}
-            </if>
-            <if test="examId != null and examId != ''">
-                AND be.id = #{examId}
-            </if>
             <if test="dpr != null">
                 <if test="dpr.requestUserId != null">
                     AND det.create_id = #{dpr.requestUserId}

+ 3 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamDetailController.java

@@ -90,6 +90,9 @@ public class ExamDetailController {
         if (semesterId == null) {
             throw ExceptionResultEnum.ERROR.exception("请选择学期");
         }
+        if (examId == null) {
+            throw ExceptionResultEnum.ERROR.exception("请选择考试");
+        }
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, requestUser.getId(), ServletUtil.getRequest().getServletPath());