<?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">
|
<mapper namespace="cn.gistack.sm.exam.mapper.ExamScoreMapper">
|
|
<!--分页列表查询-->
|
<select id="selectExamScorePage" resultType="cn.gistack.sm.exam.vo.ExamScoreVO">
|
select
|
sm_exam_plan_score.*
|
from sm_exam_plan_score
|
where 1=1
|
order by sm_exam_plan_score.id desc
|
</select>
|
<!--根据巡检次数和方案id得到具体的分数-->
|
<select id="getExamScoreByPlanIdAndCount" resultType="java.lang.Integer">
|
select
|
IFNULL(MAX(eps.score),0) AS score
|
from sm_exam_plan_score eps
|
WHERE eps.range_start <= #{count} AND eps.range_end >= #{count} AND eps.plan_id = #{planId}
|
LIMIT 0,1
|
</select>
|
</mapper>
|