Преглед на файлове

全局修改排序规则(场次、考场代码)

wangliang преди 1 година
родител
ревизия
ae53b33f87

+ 2 - 1
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEOpenServiceImpl.java

@@ -18,6 +18,7 @@ import com.qmth.themis.business.enums.InvigilateMonitorStatusEnum;
 import com.qmth.themis.business.enums.RecordSelectStrategyEnum;
 import com.qmth.themis.business.service.*;
 import com.qmth.themis.business.util.OssUtil;
+import com.qmth.themis.common.enums.ExceptionResultEnum;
 import com.qmth.themis.common.exception.BusinessException;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -126,7 +127,7 @@ public class TEOpenServiceImpl implements TEOpenService {
             throw new BusinessException("未找到考试信息");
         }
         if (exam.getEnable() == null || exam.getEnable().intValue() == 0) {
-            throw new BusinessException("考试批次已禁用");
+            throw new BusinessException(ExceptionResultEnum.EXAM_ENABLE);
         }
         if (!InvigilateMonitorStatusEnum.FINISHED.equals(exam.getMonitorStatus())) {
             throw new BusinessException("考试批次监考未结束");

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/templete/service/impl/TempleteLogicServiceImpl.java

@@ -822,7 +822,7 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
         Optional.ofNullable(examCacheBean).orElseThrow(() -> new BusinessException(ExceptionResultEnum.EXAM_NO));
 
         if (Objects.isNull(examCacheBean.getEnable()) || examCacheBean.getEnable().intValue() == 0) {
-            throw new BusinessException("考试批次已禁用");
+            throw new BusinessException(ExceptionResultEnum.EXAM_ENABLE);
         }
     }
 

+ 2 - 2
themis-business/src/main/resources/mapper/TBExamInvigilateUserMapper.xml

@@ -39,12 +39,12 @@
 
     <select id="examInvigilateUserQuery" resultType="com.qmth.themis.business.dto.response.TBExamInvigilateUserDto">
         <include refid="queryCommon"/>
-        order by tee.name,CAST(tbeiu.room_code AS UNSIGNED)
+        order by CAST(tbeiu.room_code AS UNSIGNED)
     </select>
 
     <select id="examInvigilateUserExport" resultType="com.qmth.themis.business.dto.RoomCodeExportDto">
         <include refid="queryCommon"/>
-        order by tee.name,CAST(tbeiu.room_code AS UNSIGNED)
+        order by CAST(tbeiu.room_code AS UNSIGNED)
     </select>
 
     <select id="getInvigilateUsers" resultType="java.util.Map">

+ 2 - 2
themis-business/src/main/resources/mapper/TEExamBreachLogMapper.xml

@@ -44,7 +44,7 @@
 		<if test="name != null and name != ''">
 			and t.name like concat('%',#{name},'%')
 		</if>
-        order by f.exam_student_id
+        order by CAST(teea.code AS UNSIGNED),CAST(t.room_code AS UNSIGNED)
 	</select>
 
 	<select id="getExamRevokeBreachPage"
@@ -88,7 +88,7 @@
 		<if test="name != null and name != ''">
 			and t.name like concat('%',#{name},'%')
 		</if>
-        order by f.exam_student_id
+        order by CAST(teea.code AS UNSIGNED),CAST(t.room_code AS UNSIGNED)
 	</select>
 
 	<select id="getExamBreachDetailList"

+ 4 - 3
themis-business/src/main/resources/mapper/TEExamReexamMapper.xml

@@ -61,6 +61,7 @@
             and toer.exam_student_id = tees.id
             )
         </where>
+        order by CAST(tees.room_code AS UNSIGNED)
     </select>
 
     <select id="reexamPageNotDoneList" resultType="com.qmth.themis.business.bean.admin.ReexamListNotDoneBean">
@@ -130,7 +131,7 @@
             </if>
             and teer.status = 1
         </where>
-        order by tees.room_code
+        order by CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
     </select>
 
     <select id="reexamPageNotDoneCount" resultType="java.lang.Integer">
@@ -232,7 +233,7 @@
             </if>
             and (teer.status = 0 or teer.status = 2)
         </where>
-        order by tees.room_code
+        order by CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
     </select>
 
     <select id="getExamReexamPage" resultType="com.qmth.themis.business.bean.admin.ExamReexamListBean">
@@ -274,6 +275,6 @@
             and t.name like concat('%',#{name},'%')
         </if>
         GROUP BY f.exam_student_id
-        order by f.exam_student_id
+        order by CAST(teea.code AS UNSIGNED),CAST(t.room_code AS UNSIGNED)
     </select>
 </mapper>

+ 5 - 7
themis-business/src/main/resources/mapper/TEExamStudentMapper.xml

@@ -68,7 +68,7 @@
                 </if>
             </if>
         </where>
-        order by tees.id
+        order by CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
     </select>
 
     <select id="getTotalCount" resultType="java.util.Map">
@@ -127,7 +127,7 @@
         t.room_code,
         t.room_name
         order by
-        t.exam_id
+        CAST(teea.code AS UNSIGNED),CAST(t.room_code AS UNSIGNED)
     </select>
 
     <select id="getDoneCountByActivityIds"
@@ -270,9 +270,7 @@
         </if>
         and toer.first_start_time is null
         and toer1.id is null) t
-        order by
-        t.examActivityId,
-        t.roomCode
+        order by CAST(t.examActivityCode AS UNSIGNED),CAST(t.roomCode AS UNSIGNED)
     </select>
 
     <select id="getPageForStudentLog"
@@ -305,7 +303,7 @@
         <if test="name != null and name != ''">
             and t.name like concat('%',#{name},'%')
         </if>
-        order by t.id
+        order by CAST(teea.code AS UNSIGNED),CAST(t.room_code AS UNSIGNED)
     </select>
 
     <update id="updateAlreadyExamCount">
@@ -372,7 +370,7 @@
         tees.room_name,
         tees.grade,
         tees.class_no
-        order by tees.id
+        order by CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
     </sql>
 
     <select id="markResultQuery" resultType="com.qmth.themis.business.dto.response.MarkResultDto">

+ 1 - 0
themis-business/src/main/resources/mapper/TIeInvigilateExceptionInfoMapper.xml

@@ -44,6 +44,7 @@
 			and t.name like concat('%',#{name},'%')
 		</if>
 		GROUP BY f.exam_student_id
+        order by CAST(teea.code AS UNSIGNED),CAST(t.room_code AS UNSIGNED)
 	</select>
 	
 	<select id="getExamExceptionDetailList"

+ 8 - 4
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -378,7 +378,7 @@
                 and t.exceptionCount &lt;= #{maxExceptionCount}
             </if>
         </where>
-        order by t.approveStatus
+        order by t.approveStatus,CAST(t.examActivityCode AS UNSIGNED),CAST(t.roomCode AS UNSIGNED)
     </select>
 
     <update id="approveStatusListUpdate">
@@ -525,7 +525,7 @@
         group by t.id,
         tees.room_code,
         tees.room_name,
-        tees.course_code,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,statusTemp,tes.mobile_number,t.breach_status,tees.class_no) t
+        tees.course_code,tees.course_name,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,statusTemp,tes.mobile_number,t.breach_status,tees.class_no) t
         <where>
             <if test="status != null and status != '' or status == 0">
                 <choose>
@@ -546,6 +546,7 @@
                 </if>
             </if>
         </where>
+        order by CAST(t.examActivityCode AS UNSIGNED),CAST(t.roomCode AS UNSIGNED)
     </select>
 
     <select id="invigilatePageProgressListExport"
@@ -623,7 +624,7 @@
         group by t.id,
         tees.room_code,
         tees.room_name,
-        tees.course_code,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,statusTemp,tes.mobile_number,t.breach_status,tees.class_no) t
+        tees.course_code,tees.course_name,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,statusTemp,tes.mobile_number,t.breach_status,tees.class_no) t
         <where>
             <if test="status != null and status != '' or status == 0">
                 <choose>
@@ -644,10 +645,12 @@
                 </if>
             </if>
         </where>
+        order by CAST(t.examActivityCode AS UNSIGNED),CAST(t.roomCode AS UNSIGNED)
     </select>
 
     <select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
         <include refid="invigilatePageListHistorySql"/>
+        order by CAST(t.examActivityCode AS UNSIGNED),CAST(t.roomCode AS UNSIGNED)
     </select>
 
     <sql id="invigilatePageListHistorySql">
@@ -795,6 +798,7 @@
     <select id="invigilatePageListHistoryExport"
             resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
         <include refid="invigilatePageListHistorySql"/>
+        order by CAST(t.examActivityCode AS UNSIGNED),CAST(t.roomCode AS UNSIGNED)
     </select>
 
     <select id="getDoneCountByDay" resultType="java.util.Map">
@@ -1403,7 +1407,7 @@
                 and tees.identity like CONCAT('%', #{identity},'%')
             </if>
         </where>
-        order by tees.id
+        order by CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
     </select>
 
     <select id="examRecordDetailListQuery" resultType="java.lang.String">