【修改】 监控管理中学生分数不一致的问题

This commit is contained in:
dlaren
2025-08-19 15:20:40 +08:00
parent 59ae05442c
commit b25e354303
17 changed files with 235 additions and 203 deletions

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pc.exam.pp.module.exam.dal.mysql.monitor.MonitorMapper">
<resultMap type="TentSpecialy" id="TentSpecialyResult">
<result property="id" column="id" />
<result property="specialtyId" column="specialty_id" />
<result property="points" column="points" />
<result property="tenantId" column="tenant_id" />
<result property="id" column="id"/>
<result property="specialtyId" column="specialty_id"/>
<result property="points" column="points"/>
<result property="tenantId" column="tenant_id"/>
</resultMap>
<update id="deleteByTaskIds">
UPDATE exam_monitor
@@ -21,36 +21,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="deleteByTaskId">
UPDATE exam_monitor
SET deleted = '2'
WHERE task_id =#{taskId}
WHERE task_id = #{taskId}
</update>
<select id="selectByStuIdAndTaskIdTop" resultType="java.lang.String">
select score from exam_monitor where stu_id =#{stuId} and task_id=#{taskId} ORDER BY score DESC
LIMIT 1
select score
from exam_monitor
where stu_id = #{stuId}
and task_id = #{taskId}
ORDER BY score DESC LIMIT 1
</select>
<select id="selectByStuIdAndTaskIdNew" resultType="java.lang.String">
select score from exam_monitor where stu_id =#{stuId} and task_id=#{taskId} ORDER BY create_time DESC
LIMIT 1
select score
from exam_monitor
where stu_id = #{stuId}
and task_id = #{taskId}
ORDER BY create_time DESC LIMIT 1
</select>
<select id="selectByStuIdAndTaskId" resultType="java.lang.String">
select task_id from exam_monitor where stu_id = #{stuId} and exam_status !='2'
select task_id
from exam_monitor
where stu_id = #{stuId}
and exam_status !='2'
</select>
<select id="selectStuIdByTaskId" resultType="java.lang.String">
select stu_id from exam_monitor where task_id =#{taskId} and deleted ='0' and exam_status ='0'
select stu_id
from exam_monitor
where task_id = #{taskId}
and deleted = '0'
and exam_status = '0'
</select>
<select id="selectTent" resultMap="TentSpecialyResult">
SELECT
ets.*,
es.sp_name AS name
FROM
exam_tenant_specialty ets
LEFT JOIN
exam_specialty es
ON
ets.specialty_id = es.sp_id
WHERE
ets.tenant_id = #{loginTenantId}
SELECT ets.*,
es.sp_name AS name
FROM exam_tenant_specialty ets
LEFT JOIN
exam_specialty es
ON
ets.specialty_id = es.sp_id
WHERE ets.tenant_id = #{loginTenantId}
</select>