<?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.fssyjhemr.mapper.FsSyJswzhBmztEmrViewMapper">


    <select id="listByBmsjRange" resultType="com.docus.server.fssyjhemr.entity.FsSyJswzhBmztEmrView">
        select jzh,zyh,zycs,kh,bmr,bmgh,ryrq,cyrq,bmsj
        from jhemr.v_jswzh_bmzt_emr
        where bmsj >= TO_DATE(#{startDate}, 'yyyy-mm-dd hh24:mi:ss')
          and bmsj <![CDATA[<]]> TO_DATE(#{endDate}, 'yyyy-mm-dd hh24:mi:ss')
            ${where}
        order by bmsj
    </select>
    <select id="maxBmsj" resultType="java.util.Date">
        select max(bmsj) from jhemr.v_jswzh_bmzt_emr
    </select>
</mapper>
