|
@@ -877,28 +877,6 @@
|
|
<include refid="invigilatePageListHistorySql"/>
|
|
<include refid="invigilatePageListHistorySql"/>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="getDoneCount" resultType="java.util.Map">
|
|
|
|
- select f.exam_activity_id
|
|
|
|
- activityId,count(distinct(f.exam_student_id)) cc from t_oe_exam_record
|
|
|
|
- f
|
|
|
|
- left join t_e_exam_student t on f.exam_student_id=t.id
|
|
|
|
- left join t_e_student h on t.student_id=h.id
|
|
|
|
- where f.exam_id = #{examId}
|
|
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
|
- and h.org_id=#{orgId}
|
|
|
|
- </if>
|
|
|
|
- <if test="activityId != null and activityId != ''">
|
|
|
|
- and f.exam_activity_id = #{activityId}
|
|
|
|
- </if>
|
|
|
|
- <if test="roomCode != null and roomCode != ''">
|
|
|
|
- and t.room_code =#{roomCode}
|
|
|
|
- </if>
|
|
|
|
- <if test="courseCode != null and courseCode != ''">
|
|
|
|
- and t.course_code = #{courseCode}
|
|
|
|
- </if>
|
|
|
|
- group by f.exam_activity_id
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
<select id="getDoneCountByDay" resultType="java.util.Map">
|
|
<select id="getDoneCountByDay" resultType="java.util.Map">
|
|
select
|
|
select
|
|
FROM_UNIXTIME(f.first_prepare_time / 1000,'%Y-%m-%d') AS day,
|
|
FROM_UNIXTIME(f.first_prepare_time / 1000,'%Y-%m-%d') AS day,
|
|
@@ -1061,194 +1039,132 @@
|
|
AND t.id IS NOT NULL
|
|
AND t.id IS NOT NULL
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="getWarnDistribution" resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorWarnDistributionBean">
|
|
|
|
|
|
+ <select id="getWarnDistribution"
|
|
|
|
+ resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorWarnDistributionBean">
|
|
select
|
|
select
|
|
- tiiwi.info as type,
|
|
|
|
- count(tiiwi.exam_record_id) as warnCount
|
|
|
|
|
|
+ tiiwi.info as type,
|
|
|
|
+ count(tiiwi.exam_record_id) as warnCount
|
|
from
|
|
from
|
|
- t_ie_invigilate_warn_info tiiwi
|
|
|
|
- join t_oe_exam_record toer on tiiwi.exam_record_id = toer.id
|
|
|
|
- join t_e_exam tee on toer.exam_id = tee.id
|
|
|
|
|
|
+ t_ie_invigilate_warn_info tiiwi
|
|
|
|
+ join t_oe_exam_record toer on tiiwi.exam_record_id = toer.id
|
|
|
|
+ join t_e_exam tee on toer.exam_id = tee.id
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
|
- and tee.org_id = #{orgId}
|
|
|
|
- </if>
|
|
|
|
- and (toer.STATUS = 'FIRST_PREPARE' or toer.STATUS = 'ANSWERING'
|
|
|
|
- or toer.STATUS = 'BREAK_OFF' or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and (toer.STATUS = 'FIRST_PREPARE' or toer.STATUS = 'ANSWERING'
|
|
|
|
+ or toer.STATUS = 'BREAK_OFF' or toer.STATUS = 'RESUME_PREPARE')
|
|
group by
|
|
group by
|
|
- tiiwi.`info`
|
|
|
|
|
|
+ tiiwi.`info`
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="getWarnRegionDistribution" resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorWarnRegionDistributionBean">
|
|
|
|
|
|
+ <select id="getWarnRegionDistribution"
|
|
|
|
+ resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorWarnRegionDistributionBean">
|
|
select
|
|
select
|
|
- tir.country,
|
|
|
|
- tir.province,
|
|
|
|
- count(tiiwi.exam_record_id) as warnCount
|
|
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province,
|
|
|
|
+ count(tiiwi.exam_record_id) as warnCount
|
|
from
|
|
from
|
|
- t_ip_region tir
|
|
|
|
- join t_oe_exam_record toer on
|
|
|
|
- tir.exam_record_id = toer.id
|
|
|
|
- left join t_ie_invigilate_warn_info tiiwi on
|
|
|
|
- tiiwi.exam_record_id = toer.id
|
|
|
|
- join t_e_exam tee on toer.exam_id = tee.id
|
|
|
|
|
|
+ t_ip_region tir
|
|
|
|
+ join t_oe_exam_record toer on
|
|
|
|
+ tir.exam_record_id = toer.id
|
|
|
|
+ left join t_ie_invigilate_warn_info tiiwi on
|
|
|
|
+ tiiwi.exam_record_id = toer.id
|
|
|
|
+ join t_e_exam tee on toer.exam_id = tee.id
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
|
- and tee.org_id = #{orgId}
|
|
|
|
- </if>
|
|
|
|
- and (toer.STATUS = 'FIRST_PREPARE' or toer.STATUS = 'ANSWERING'
|
|
|
|
- or toer.STATUS = 'BREAK_OFF' or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and (toer.STATUS = 'FIRST_PREPARE' or toer.STATUS = 'ANSWERING'
|
|
|
|
+ or toer.STATUS = 'BREAK_OFF' or toer.STATUS = 'RESUME_PREPARE')
|
|
group by
|
|
group by
|
|
- tir.country,
|
|
|
|
- tir.province;
|
|
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province;
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getMap" resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorMapBean">
|
|
<select id="getMap" resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorMapBean">
|
|
select
|
|
select
|
|
- t.country,
|
|
|
|
- t.province,
|
|
|
|
- sum(t.onlineCount) as onlineCount,
|
|
|
|
- sum(t.warnCount) as warnCount
|
|
|
|
|
|
+ t.country,
|
|
|
|
+ t.province,
|
|
|
|
+ sum(t.onlineCount) as onlineCount,
|
|
|
|
+ sum(t.warnCount) as warnCount
|
|
from
|
|
from
|
|
- (
|
|
|
|
- select
|
|
|
|
- tir.country,
|
|
|
|
- tir.province,
|
|
|
|
- count(toer.id) as onlineCount,
|
|
|
|
- 0 as warnCount
|
|
|
|
- from
|
|
|
|
- t_ip_region tir
|
|
|
|
- join t_oe_exam_record toer on
|
|
|
|
- tir.exam_record_id = toer.id
|
|
|
|
- join t_e_exam tee on
|
|
|
|
- toer.exam_id = tee.id
|
|
|
|
- WHERE 1 = 1
|
|
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
|
- and tee.org_id = #{orgId}
|
|
|
|
- </if>
|
|
|
|
- and toer.client_websocket_status = 'ON_LINE'
|
|
|
|
- and (toer.STATUS = 'FIRST_PREPARE'
|
|
|
|
- or toer.STATUS = 'ANSWERING'
|
|
|
|
- or toer.STATUS = 'BREAK_OFF'
|
|
|
|
- or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
- group by
|
|
|
|
- tir.country,
|
|
|
|
- tir.province
|
|
|
|
- union all
|
|
|
|
- select
|
|
|
|
- tir.country,
|
|
|
|
- tir.province,
|
|
|
|
- 0 as onlineCount,
|
|
|
|
- count(tiiwi.exam_record_id) as warnCount
|
|
|
|
- from
|
|
|
|
- t_ip_region tir
|
|
|
|
- join t_oe_exam_record toer on
|
|
|
|
- tir.exam_record_id = toer.id
|
|
|
|
- left join t_ie_invigilate_warn_info tiiwi on
|
|
|
|
- tiiwi.exam_record_id = tir.exam_record_id
|
|
|
|
- join t_e_exam tee on
|
|
|
|
- toer.exam_id = tee.id
|
|
|
|
- WHERE 1 = 1
|
|
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
|
- and tee.org_id = #{orgId}
|
|
|
|
- </if>
|
|
|
|
- and (toer.STATUS = 'FIRST_PREPARE'
|
|
|
|
- or toer.STATUS = 'ANSWERING'
|
|
|
|
- or toer.STATUS = 'BREAK_OFF'
|
|
|
|
- or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
- group by
|
|
|
|
- tir.country,
|
|
|
|
- tir.province) t
|
|
|
|
- group by
|
|
|
|
- t.country,
|
|
|
|
- t.province
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- <select id="getOrgExamingCount" resultType="java.util.Map">
|
|
|
|
- SELECT
|
|
|
|
- o. NAME orgName,
|
|
|
|
- tem.cc count
|
|
|
|
- FROM
|
|
|
|
- (
|
|
|
|
- SELECT
|
|
|
|
- h.org_id orgId,
|
|
|
|
- count(DISTINCT(h.id)) cc
|
|
|
|
- FROM
|
|
|
|
- t_oe_exam_record f
|
|
|
|
- LEFT JOIN t_e_exam_student t ON f.exam_student_id = t.id
|
|
|
|
- LEFT JOIN t_e_student h ON t.student_id = h.id
|
|
|
|
- WHERE 1 = 1
|
|
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
|
- and h.org_id=#{orgId}
|
|
|
|
- </if>
|
|
|
|
- and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
|
|
- or f.STATUS = 'BREAK_OFF' or f.STATUS = 'RESUME_PREPARE')
|
|
|
|
- AND f.client_websocket_status='ON_LINE'
|
|
|
|
- GROUP BY
|
|
|
|
- h.org_id
|
|
|
|
- ) tem
|
|
|
|
- LEFT JOIN t_b_org o ON o.id = tem.orgId
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- <select id="getOrgDistribution" resultType="java.util.Map">
|
|
|
|
- SELECT
|
|
|
|
- o. NAME orgName,
|
|
|
|
- tem.cc count
|
|
|
|
- FROM
|
|
|
|
(
|
|
(
|
|
- SELECT
|
|
|
|
- h.org_id orgId,
|
|
|
|
- count(DISTINCT(w.id)) cc
|
|
|
|
- FROM
|
|
|
|
- t_oe_exam_record f
|
|
|
|
- LEFT JOIN t_ie_invigilate_warn_info w ON f.id = w.exam_record_id
|
|
|
|
- LEFT JOIN t_e_exam_student t ON f.exam_student_id = t.id
|
|
|
|
- LEFT JOIN t_e_student h ON t.student_id = h.id
|
|
|
|
|
|
+ select
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province,
|
|
|
|
+ count(toer.id) as onlineCount,
|
|
|
|
+ 0 as warnCount
|
|
|
|
+ from
|
|
|
|
+ t_ip_region tir
|
|
|
|
+ join t_oe_exam_record toer on
|
|
|
|
+ tir.exam_record_id = toer.id
|
|
|
|
+ join t_e_exam tee on
|
|
|
|
+ toer.exam_id = tee.id
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
<if test="orgId != null and orgId != ''">
|
|
<if test="orgId != null and orgId != ''">
|
|
- and h.org_id=#{orgId}
|
|
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
</if>
|
|
</if>
|
|
- and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
|
|
- or f.STATUS = 'BREAK_OFF' or f.STATUS = 'RESUME_PREPARE')
|
|
|
|
- AND w.id IS NOT NULL
|
|
|
|
- AND w.type!='NONE'
|
|
|
|
- GROUP BY
|
|
|
|
- h.org_id
|
|
|
|
- ) tem
|
|
|
|
- LEFT JOIN t_b_org o ON o.id = tem.orgId
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- <select id="getTypeDistribution" resultType="java.util.Map">
|
|
|
|
- SELECT
|
|
|
|
- substring(w.info,instr(w.info,"【") + 1,instr(w.info,"】") - 2) as type,
|
|
|
|
- count(DISTINCT(w.id)) count
|
|
|
|
- FROM
|
|
|
|
- t_oe_exam_record f
|
|
|
|
- LEFT JOIN t_ie_invigilate_warn_info w ON f.id = w.exam_record_id
|
|
|
|
- left join t_e_exam h on f.exam_id=h.id
|
|
|
|
|
|
+ and toer.client_websocket_status = 'ON_LINE'
|
|
|
|
+ and (toer.STATUS = 'FIRST_PREPARE'
|
|
|
|
+ or toer.STATUS = 'ANSWERING'
|
|
|
|
+ or toer.STATUS = 'BREAK_OFF'
|
|
|
|
+ or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ group by
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province
|
|
|
|
+ union all
|
|
|
|
+ select
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province,
|
|
|
|
+ 0 as onlineCount,
|
|
|
|
+ count(tiiwi.exam_record_id) as warnCount
|
|
|
|
+ from
|
|
|
|
+ t_ip_region tir
|
|
|
|
+ join t_oe_exam_record toer on
|
|
|
|
+ tir.exam_record_id = toer.id
|
|
|
|
+ left join t_ie_invigilate_warn_info tiiwi on
|
|
|
|
+ tiiwi.exam_record_id = tir.exam_record_id
|
|
|
|
+ join t_e_exam tee on
|
|
|
|
+ toer.exam_id = tee.id
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
<if test="orgId != null and orgId != ''">
|
|
<if test="orgId != null and orgId != ''">
|
|
- and h.org_id=#{orgId}
|
|
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
</if>
|
|
</if>
|
|
- and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
|
|
- or f.STATUS = 'BREAK_OFF' or f.STATUS = 'RESUME_PREPARE')
|
|
|
|
- AND w.id IS NOT NULL
|
|
|
|
- AND w.type!='NONE'
|
|
|
|
- GROUP BY
|
|
|
|
- w.info
|
|
|
|
|
|
+ and (toer.STATUS = 'FIRST_PREPARE'
|
|
|
|
+ or toer.STATUS = 'ANSWERING'
|
|
|
|
+ or toer.STATUS = 'BREAK_OFF'
|
|
|
|
+ or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ group by
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province) t
|
|
|
|
+ group by
|
|
|
|
+ t.country,
|
|
|
|
+ t.province
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="getWarnTrend" resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorHourWarnCountBean">
|
|
|
|
- SELECT
|
|
|
|
- FROM_UNIXTIME(w.create_time / 1000,'%H') hour,
|
|
|
|
- count(1) count
|
|
|
|
- FROM t_ie_invigilate_warn_info w
|
|
|
|
- left join t_e_exam h on w.exam_id=h.id
|
|
|
|
- WHERE w.type!='NONE' and w.create_time>=#{startTime}
|
|
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
|
- and h.org_id=#{orgId}
|
|
|
|
- </if>
|
|
|
|
- GROUP BY
|
|
|
|
- FROM_UNIXTIME(w.create_time / 1000,'%H')
|
|
|
|
|
|
+ <select id="getWarnTrend" resultType="com.qmth.themis.business.bean.result.TimeScaleDataResult">
|
|
|
|
+ select
|
|
|
|
+ t.hour,
|
|
|
|
+ sum(t.warnCount) as warnCount
|
|
|
|
+ from
|
|
|
|
+ (
|
|
|
|
+ <foreach collection="timeData" item="item" index="index">
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="index == 0">
|
|
|
|
+ <include refid="getWarnTrendCommon" />
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ union all
|
|
|
|
+ <include refid="getWarnTrendCommon" />
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ </foreach>
|
|
|
|
+ ) t
|
|
|
|
+ group by
|
|
|
|
+ t.hour
|
|
|
|
+ order by
|
|
|
|
+ t.hour
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<update id="updateHasAnswerFile">
|
|
<update id="updateHasAnswerFile">
|
|
@@ -1648,4 +1564,97 @@
|
|
</where>
|
|
</where>
|
|
order by tees.id
|
|
order by tees.id
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="getTimeScale" resultType="java.util.Map">
|
|
|
|
+ select
|
|
|
|
+ <foreach collection="timeSize" item="item" index="index" separator=",">
|
|
|
|
+ DATE_FORMAT(date_sub(#{currentDate}, interval #{item} minute),'%Y-%m-%d %H:%i:00') as '${item}'
|
|
|
|
+ </foreach>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <sql id="getWarnTrendCommon">
|
|
|
|
+ <!--select
|
|
|
|
+ t.hour,
|
|
|
|
+ count(distinct t.examRecordId) as onlineCount,
|
|
|
|
+ 0 as warnCount
|
|
|
|
+ from
|
|
|
|
+ (
|
|
|
|
+ select
|
|
|
|
+ DATE_FORMAT(#{item}, '%H:%i') as hour,
|
|
|
|
+ teesol.exam_record_id as examRecordId,
|
|
|
|
+ DATE_FORMAT(FROM_UNIXTIME(teesol.create_time / 1000), '%Y-%m-%d %H:%i:00') as createTime
|
|
|
|
+ from
|
|
|
|
+ t_e_exam_student_online_log teesol
|
|
|
|
+ join t_oe_exam_record toer on toer.id = teesol.exam_record_id
|
|
|
|
+ join t_e_exam tee on toer.exam_id = tee.id
|
|
|
|
+ WHERE 1 = 1
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and (teesol.create_time <![CDATA[ >= ]]> unix_timestamp(date_sub(#{currentDate}, interval 30 minute)) * 1000
|
|
|
|
+ and teesol.create_time <![CDATA[ <= ]]> unix_timestamp(#{currentDate}) * 1000)) t
|
|
|
|
+ where
|
|
|
|
+ (t.createTime <![CDATA[ >= ]]> #{item} and t.createTime <![CDATA[ < ]]> date_add(#{item}, interval #{interval} minute))
|
|
|
|
+ union all
|
|
|
|
+ -->
|
|
|
|
+ select
|
|
|
|
+ t.hour,
|
|
|
|
+ <!--0 as onlineCount,-->
|
|
|
|
+ count(t.examRecordId) as warnCount
|
|
|
|
+ from
|
|
|
|
+ (
|
|
|
|
+ select
|
|
|
|
+ DATE_FORMAT(#{item}, '%H:%i') as hour,
|
|
|
|
+ tiiwi.exam_record_id as examRecordId,
|
|
|
|
+ DATE_FORMAT(FROM_UNIXTIME(tiiwi.create_time / 1000), '%Y-%m-%d %H:%i:00') as createTime
|
|
|
|
+ from
|
|
|
|
+ t_oe_exam_record toer
|
|
|
|
+ join t_ie_invigilate_warn_info tiiwi on
|
|
|
|
+ tiiwi.exam_record_id = toer.id
|
|
|
|
+ join t_e_exam tee on toer.exam_id = tee.id
|
|
|
|
+ WHERE 1 = 1
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and (tiiwi.create_time <![CDATA[ >= ]]> unix_timestamp(date_sub(#{currentDate}, interval 30 minute)) * 1000
|
|
|
|
+ and tiiwi.create_time <![CDATA[ <= ]]> unix_timestamp(#{currentDate}) * 1000)) t
|
|
|
|
+ where
|
|
|
|
+ (t.createTime <![CDATA[ >= ]]> #{item} and t.createTime <![CDATA[ < ]]> date_add(#{item}, interval #{interval} minute))
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="getTimeOnlineData" resultType="com.qmth.themis.business.bean.result.TimeOnlineDataResult">
|
|
|
|
+ select t.* from
|
|
|
|
+ (
|
|
|
|
+ select
|
|
|
|
+ DATE_FORMAT(FROM_UNIXTIME(teesol.create_time / 1000), '%H:%i') as hour,
|
|
|
|
+ count(distinct teesol.exam_record_id) as onlineCount,
|
|
|
|
+ 0 as offlineCount
|
|
|
|
+ from
|
|
|
|
+ t_e_exam_student_online_log teesol
|
|
|
|
+ join t_oe_exam_record toer on toer.id = teesol.exam_record_id
|
|
|
|
+ join t_e_exam tee on toer.exam_id = tee.id
|
|
|
|
+ where 1 = 1
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and (teesol.create_time <![CDATA[ >= ]]> unix_timestamp(date_sub(#{currentDate}, interval #{scaleSize} minute)) * 1000
|
|
|
|
+ and teesol.create_time <![CDATA[ <= ]]> unix_timestamp(#{currentDate}) * 1000)
|
|
|
|
+ and teesol.`type` = 'ON_LINE' group by teesol.create_time
|
|
|
|
+ union all
|
|
|
|
+ select
|
|
|
|
+ DATE_FORMAT(FROM_UNIXTIME(teesol.create_time / 1000), '%H:%i') as hour,
|
|
|
|
+ 0 as onlineCount,
|
|
|
|
+ count(distinct teesol.exam_record_id) as offlineCount
|
|
|
|
+ from
|
|
|
|
+ t_e_exam_student_online_log teesol
|
|
|
|
+ join t_oe_exam_record toer on toer.id = teesol.exam_record_id
|
|
|
|
+ join t_e_exam tee on toer.exam_id = tee.id
|
|
|
|
+ where 1 = 1
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and (teesol.create_time <![CDATA[ >= ]]> unix_timestamp(date_sub(#{currentDate}, interval #{scaleSize} minute)) * 1000
|
|
|
|
+ and teesol.create_time <![CDATA[ <= ]]> unix_timestamp(#{currentDate}) * 1000)
|
|
|
|
+ and teesol.`type` = 'OFF_LINE' group by teesol.create_time) t order by t.hour;
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|