liusheng
8 天以前 c111e3eff1191b29d2d2baf2f485a4bf3a2edc00
smartor/src/main/resources/mapper/smartor/ExternallInfoMapper.xml
@@ -151,6 +151,7 @@
               DWMC,
               RYRQ,
               SFZH,
               YLDH,
               JDR
        from HIT.HF_RYJDXX
    </sql>
@@ -303,8 +304,9 @@
    <select id="getExternalOutHospInfo" resultMap="ExternalOutHospInfResult">
        <include refid="selectOutHospitalRecordVo"/>
        <where>
            <if test="startTime != null and endTime != null ">and jzrq between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
                TO_DATE(#{endTime},'YYYY-MM-DD')
            <if test="startTime != null and endTime != null">
                and jzrq > TO_DATE(#{startTime}, 'YYYY-MM-DD')
                and jzrq &lt;= TO_DATE(#{endTime}, 'YYYY-MM-DD')
            </if>
        </where>
    </select>
@@ -312,17 +314,20 @@
    <select id="getExternalOutHospPatientInfo" resultMap="ExternalPatientInfoResult">
        <include refid="selectOutHospitalPatientRecordVo"/>
        <where>
            <if test="startTime != null and endTime != null ">and jdsj between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
                TO_DATE(#{endTime},'YYYY-MM-DD')
            <if test="startTime != null and endTime != null ">
                and jdsj > TO_DATE(#{startTime}, 'YYYY-MM-DD')
                and jdsj &lt;= TO_DATE(#{endTime}, 'YYYY-MM-DD')
            </if>
            <if test="brid != null ">and BRID = #{brid}</if>
        </where>
    </select>
    <select id="getExternalLeaveHospPatientInfo" resultMap="ExternalLeaveHospPatientInfoResult">
        <include refid="selectLeaveHospitalRecordVo"/>
        <where>
            <if test="startTime != null and endTime != null ">and cysq between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
                TO_DATE(#{endTime},'YYYY-MM-DD')
            <if test="startTime != null and endTime != null ">
                and cysq > TO_DATE(#{startTime}, 'YYYY-MM-DD')
                and cysq &lt;= TO_DATE(#{endTime}, 'YYYY-MM-DD')
            </if>
        </where>
    </select>
@@ -330,8 +335,9 @@
    <select id="getExternalInHospPatientInfo" resultMap="ExternalInHospPatientInfoResult">
        <include refid="selectInHospitalRecordVo"/>
        <where>
            <if test="startTime != null and endTime != null ">and ryrq between TO_DATE(#{startTime}, 'YYYY-MM-DD') AND
                TO_DATE(#{endTime},'YYYY-MM-DD')
            <if test="startTime != null and endTime != null ">
                and ryrq > TO_DATE(#{startTime}, 'YYYY-MM-DD')
                and ryrq &lt;= TO_DATE(#{endTime}, 'YYYY-MM-DD')
            </if>
            <if test="brid != null ">and BRID = #{brid}</if>
        </where>
@@ -340,9 +346,9 @@
    <select id="getExternalUserInfo" resultMap="ExternalUserInfoResult">
        <include refid="selectUserVo"/>
        <where>
            <if test="startTime != null and endTime != null ">and create_time between TO_DATE(#{startTime},
                'YYYY-MM-DD') AND
                TO_DATE(#{endTime},'YYYY-MM-DD')
            <if test="startTime != null and endTime != null ">
                and create_time > TO_DATE(#{startTime}, 'YYYY-MM-DD')
                and create_time &lt;= TO_DATE(#{endTime}, 'YYYY-MM-DD')
            </if>
        </where>
    </select>
@@ -350,9 +356,9 @@
    <select id="getExternalDeptInfo" resultMap="ExternalDeptInfoResult">
        <include refid="selectDeptVo"/>
        <where>
            <if test="startTime != null and endTime != null ">and create_time between TO_DATE(#{startTime},
                'YYYY-MM-DD') AND
                TO_DATE(#{endTime},'YYYY-MM-DD')
            <if test="startTime != null and endTime != null ">
                and create_time > TO_DATE(#{startTime}, 'YYYY-MM-DD')
                and create_time &lt;= TO_DATE(#{endTime}, 'YYYY-MM-DD')
            </if>
        </where>
    </select>