|
@@ -7,7 +7,7 @@
|
|
t.id as examId
|
|
t.id as examId
|
|
from
|
|
from
|
|
t_e_exam t
|
|
t_e_exam t
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
and t.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
and t.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
|
|
and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
|
|
and t.enable = 1
|
|
and t.enable = 1
|
|
@@ -82,11 +82,14 @@
|
|
where
|
|
where
|
|
t1.id = t.update_id) as updateName
|
|
t1.id = t.update_id) as updateName
|
|
from t_e_exam t
|
|
from t_e_exam t
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="type != null and type != '' and type == 'monitor'">
|
|
<if test="type != null and type != '' and type == 'monitor'">
|
|
and t.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
and t.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
|
|
and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="finished != null and finished != '' and finished == 1">
|
|
|
|
+ and t.monitor_status = 'FINISHED'
|
|
|
|
+ </if>
|
|
<if test="userId != null and userId != ''">
|
|
<if test="userId != null and userId != ''">
|
|
and t.enable = 1
|
|
and t.enable = 1
|
|
and EXISTS(
|
|
and EXISTS(
|
|
@@ -118,7 +121,8 @@
|
|
<if test="enable != null and enable != '' or enable == 0">
|
|
<if test="enable != null and enable != '' or enable == 0">
|
|
and t.enable = #{enable}
|
|
and t.enable = #{enable}
|
|
</if>
|
|
</if>
|
|
- </where> ) t
|
|
|
|
|
|
+ </where>
|
|
|
|
+ ) t
|
|
<if test="type != null and type != '' and type == 'monitor'">
|
|
<if test="type != null and type != '' and type == 'monitor'">
|
|
left join t_e_exam_student tees on tees.exam_id = t.id
|
|
left join t_e_exam_student tees on tees.exam_id = t.id
|
|
</if>
|
|
</if>
|
|
@@ -141,7 +145,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="examroomQuery" resultType="java.util.HashMap">
|
|
<select id="examroomQuery" resultType="java.util.HashMap">
|
|
- select
|
|
|
|
|
|
+ select
|
|
distinct tees.room_code as roomCode,
|
|
distinct tees.room_code as roomCode,
|
|
tees.room_name as roomName
|
|
tees.room_name as roomName
|
|
from
|
|
from
|
|
@@ -170,8 +174,10 @@
|
|
group_concat(distinct teea.id) as examActivityId,
|
|
group_concat(distinct teea.id) as examActivityId,
|
|
<!--FLOOR((teea.finish_time - teea.start_time) / (24*60*60*1000)) as diffSum1,
|
|
<!--FLOOR((teea.finish_time - teea.start_time) / (24*60*60*1000)) as diffSum1,
|
|
FLOOR(((teea.finish_time - teea.start_time) / (24*60*60*1000) - (unix_timestamp(current_timestamp()) * 1000 - teea.start_time) / (24*60*60*1000))) as reallyTime1,-->
|
|
FLOOR(((teea.finish_time - teea.start_time) / (24*60*60*1000) - (unix_timestamp(current_timestamp()) * 1000 - teea.start_time) / (24*60*60*1000))) as reallyTime1,-->
|
|
- datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) as diffSum,
|
|
|
|
- datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) -
|
|
|
|
|
|
+ datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time /
|
|
|
|
+ 1000,'%Y-%m-%d %H:%i:%s')) as diffSum,
|
|
|
|
+ datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time /
|
|
|
|
+ 1000,'%Y-%m-%d %H:%i:%s')) -
|
|
datediff(now(),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) as reallyTime
|
|
datediff(now(),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) as reallyTime
|
|
from
|
|
from
|
|
t_e_exam_student tees
|
|
t_e_exam_student tees
|
|
@@ -216,7 +222,7 @@
|
|
t_b_exam_invigilate_user tbeiu
|
|
t_b_exam_invigilate_user tbeiu
|
|
left join t_e_exam_student tees on
|
|
left join t_e_exam_student tees on
|
|
tees.room_code = tbeiu.room_code and tees.exam_id = tbeiu.exam_id
|
|
tees.room_code = tbeiu.room_code and tees.exam_id = tbeiu.exam_id
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="userId != null and userId != ''">
|
|
<if test="userId != null and userId != ''">
|
|
and tbeiu.user_id = #{userId}
|
|
and tbeiu.user_id = #{userId}
|
|
</if>
|
|
</if>
|
|
@@ -233,11 +239,15 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<update id="updateInvigilateMonitorStatus">
|
|
<update id="updateInvigilateMonitorStatus">
|
|
- update t_e_exam set monitor_status=#{monitorStatus} where id=#{examId}
|
|
|
|
|
|
+ update t_e_exam
|
|
|
|
+ set monitor_status=#{monitorStatus}
|
|
|
|
+ where id = #{examId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<update id="updateScoreStatus">
|
|
<update id="updateScoreStatus">
|
|
- update t_e_exam set score_status=#{scoreStatus} where id=#{examId}
|
|
|
|
|
|
+ update t_e_exam
|
|
|
|
+ set score_status=#{scoreStatus}
|
|
|
|
+ where id = #{examId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<select id="examQueryForOpen" resultType="com.qmth.themis.business.bean.admin.OpenExamBean">
|
|
<select id="examQueryForOpen" resultType="com.qmth.themis.business.bean.admin.OpenExamBean">
|
|
@@ -253,13 +263,15 @@
|
|
t_e_exam t
|
|
t_e_exam t
|
|
WHERE t.enable=1
|
|
WHERE t.enable=1
|
|
<if test="id != null">
|
|
<if test="id != null">
|
|
- AND t.id = #{id}
|
|
|
|
|
|
+ AND t.id = #{id}
|
|
</if>
|
|
</if>
|
|
<if test="code != null and code !='' ">
|
|
<if test="code != null and code !='' ">
|
|
AND t.code = #{code}
|
|
AND t.code = #{code}
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
<update id="updateScoreProgress">
|
|
<update id="updateScoreProgress">
|
|
- update t_e_exam set progress=#{progress} where id=#{examId}
|
|
|
|
|
|
+ update t_e_exam
|
|
|
|
+ set progress=#{progress}
|
|
|
|
+ where id = #{examId}
|
|
</update>
|
|
</update>
|
|
</mapper>
|
|
</mapper>
|