<?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.MzsyUserInfoViewMapper">


    <select id="page" resultType="com.docus.server.mzsy.entity.MzsyUserInfoView">
        SELECT paging.ID,
               paging.FEMPCODE,
               paging.FEMPNAME,
               paging.FIP_DEPTID AS FIPDEPTID,
               paging.FISAVAILABLE,
               paging.FL
        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>
</mapper>
