<?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.sh.stc.sict.theme.hpgp.dao.HpgpDepartmentRankMapper">

    <resultMap type="cn.sh.stc.sict.theme.hpgp.model.HpgpDepartmentRank" id="HpgpDepartmentRankMap">
        <result property="standardDept" column="standard_dept"/>
        <result property="hospitalCode" column="hospital_code"/>
        <result property="hospitalName" column="hospital_name"/>
        <result property="deptCode" column="dept_code"/>
        <result property="deptName" column="dept_name"/>
        <result property="rankScore" column="rank_score"/>
    </resultMap>

    <sql id="Base_Column_List"> standard_dept , hospital_code, hospital_name, dept_code, dept_name, rank_score     </sql>

    <select id="getRankByStandardDept" resultMap="HpgpDepartmentRankMap">
        select
        <include refid="Base_Column_List" />
        from hpgp_department_rank where standard_dept = #{deptName} order by rank_score asc limit #{size}
    </select>
</mapper>