From 41cb551eaa18b3110d8971f0a32074352fa0aa7f Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期三, 30 七月 2025 17:00:52 +0800 Subject: [PATCH] zjh20250730-1 --- ltkj-hosp/src/main/resources/mapper/hosp/TjReservationMapper.xml | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ltkj-hosp/src/main/resources/mapper/hosp/TjReservationMapper.xml b/ltkj-hosp/src/main/resources/mapper/hosp/TjReservationMapper.xml index 5a914e2..9a6803b 100644 --- a/ltkj-hosp/src/main/resources/mapper/hosp/TjReservationMapper.xml +++ b/ltkj-hosp/src/main/resources/mapper/hosp/TjReservationMapper.xml @@ -57,6 +57,7 @@ pro_ids, pac_id, company, + company_id, job_no, department, department_id, @@ -78,16 +79,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 "%"#{company}"%"</if> - <if test="reservationTime != null ">and reservation_time BETWEEN #{reservationTime} and now()</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> + and a.deleted = 0 + ORDER BY a.create_time desc </select> @@ -96,14 +101,14 @@ <where> <if test="name != null and name != ''">and name = #{name}</if> <if test="phoe != null and phoe != ''">and phoe = #{phoe}</if> - <if test="company != null and company != ''">and company like "%"#{company}"%"</if> + <if test="company != null and company != ''">and company like concat('%', #{company}, '%')</if> <if test="reservationTime != null ">and reservation_time = #{reservationTime}</if> and deleted = '1' </where> </select> - <select id="selectTjReservationById" parameterType="Long" resultMap="TjReservationResult"> + <select id="selectTjReservationById" parameterType="String" resultMap="TjReservationResult"> <include refid="selectTjReservationVo"/> where id = #{id} </select> -- Gitblit v1.8.0