zjh
2025-07-04 d12e3914e9e823a3038335a8f9e0b525343d965b
ltkj-hosp/src/main/resources/mapper/hosp/TjReservationMapper.xml
@@ -78,18 +78,20 @@
    </sql>
    <select id="selectTjReservationList" parameterType="TjReservation" resultMap="TjReservationResult">
        <include refid="selectTjReservationVo"/>
        SELECT a.* ,b.dw_dept_name ,b.grouping_name FROM
        tj_reservation a
        LEFT JOIN tj_dw_grouping b ON b.id = a.grouping_id
        <where>
            <if test="name != null  and name != ''">and name =#{name}</if>
            <if test="idCard != null  and idCard != ''">and id_card = #{idCard}</if>
            <if test="phoe != null  and phoe != ''">and phoe = #{phoe}</if>
            <if test="company != null  and company != ''">and company like concat('%', #{company}, '%')</if>
            <if test="companyId != null  and companyId != ''">and company_id = #{companyId} </if>
            <if test="yykssj != null and yyjssj != null ">and reservation_time  BETWEEN #{yykssj} and #{yyjssj} </if>
            <if test="isExpire != null ">and is_expire = #{isExpire}</if>
            and deleted = '0'
            <if test="name != null  and name != ''">and a.name =#{name}</if>
            <if test="idCard != null  and idCard != ''">and a.id_card = #{idCard}</if>
            <if test="phoe != null  and phoe != ''">and a.phoe = #{phoe}</if>
            <if test="company != null  and company != ''">and a.company like concat('%', #{company}, '%')</if>
            <if test="companyId != null  and companyId != ''">and a.company_id = #{companyId} </if>
            <if test="yykssj != null and yyjssj != null ">and a.reservation_time  BETWEEN #{yykssj} and #{yyjssj} </if>
            <if test="isExpire != null ">and a.is_expire = #{isExpire}</if>
        </where>
        ORDER BY create_time desc
        and a.deleted = 0
        ORDER BY a.create_time desc
    </select>