<?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="com.docus.server.mzsy.mapper.MzsyHisUserInfoMapper">


    <select id="page" resultType="com.docus.server.mzsy.entity.MzsyUserInfoView">
        SELECT YGDM,
                   YGDH,

        FROM (SELECT ROW_NUMBER() OVER (ORDER BY ID) AS RowNumber,
                     ID,
                     FEMPCODE,
                     FEMPNAME,
                     FIP_DEPTID,
                     FISAVAILABLE,
                     FL
              FROM dbo.ZD_EMR_EMPLOYEE
             ) AS paging
        WHERE paging.RowNumber BETWEEN ${startRow} AND ${endRow}
    </select>
    <select id="findByYgDms" resultType="com.docus.server.mzsy.entity.MzsyHisUserInfo">
        SELECT YGDM,
               YGDH
        FROM dbo.GY_YGDM
        WHERE YGDM IN
        <foreach collection="ygDms" open="(" separator="," close=")" item="ygDm">
            #{ygDm}
        </foreach>
    </select>
</mapper>
