From 3c46b264b86bb38984370f685c6866c5f7784808 Mon Sep 17 00:00:00 2001 From: zhs <zhs18203887318@163.com> Date: 星期三, 16 四月 2025 21:42:39 +0800 Subject: [PATCH] 04-16改_手术病人分页and患者信息子页面时间查询 --- smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml index f199f79..e17bbef 100644 --- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml @@ -202,7 +202,7 @@ a.del_flag = 0 AND b.del_flag = 0 AND a.idcardno IS NOT NULL - <if test="startOutHospTime != null"> + <!--<if test="startOutHospTime != null"> AND STR_TO_DATE(b.endtime,'%Y-%m-%d') >= STR_TO_DATE(#{startOutHospTime},'%Y-%m-%d') </if> <if test="endOutHospTime != null"> @@ -215,6 +215,18 @@ </if> <if test="endInHospTime != null"> AND STR_TO_DATE(b.starttime, '%Y-%m-%d') <= STR_TO_DATE(#{startInHospTime}, '%Y-%m-%d') + </if>--> + <if test="startOutHospTime != null ">and date_format(b.endtime,'%y%m%d') >= + date_format(#{startOutHospTime},'%y%m%d') + </if> + <if test="endOutHospTime != null ">and date_format(b.endtime,'%y%m%d') <= + date_format(#{endOutHospTime},'%y%m%d') + </if> + <if test="startInHospTime != null ">and date_format(b.starttime,'%y%m%d') >= + date_format(#{startInHospTime},'%y%m%d') + </if> + <if test="endInHospTime != null ">and date_format(b.starttime,'%y%m%d') <= + date_format(#{endInHospTime},'%y%m%d') </if> <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, '%') @@ -230,7 +242,7 @@ <if test="endtime != null ">and b.endtime = #{endtime}</if> <if test="patno != null ">and b.patno = #{patno}</if> <if test="nurseId != null ">and b.nurse_id = #{nurseId}</if> - <if test="nurseName != null ">and b.nurse_name = #{nurseName}</if> + <if test="nurseName != null and nurseName != ''">and b.nurse_name = #{nurseName}</if> <if test="checkFlag != null ">and b.check_flag = #{checkFlag}</if> <if test="cry != null and cry == 0 ">and b.endtime is null</if> <if test="cry != null and cry == 1 ">and b.endtime is not null</if> -- Gitblit v1.9.3