From ec23ec3d3dc4ec1ba7d79ba4f46ae2c31d5a16a9 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 07 一月 2026 10:49:10 +0800
Subject: [PATCH] 【市一】调整mapper获取ordid
---
smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml | 51 +++++++++++++++++++++++++++++----------------------
1 files changed, 29 insertions(+), 22 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml
index ac28143..59f240b 100644
--- a/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml
@@ -367,25 +367,28 @@
<select id="yhyjsxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserRoleResult">
select user_id, role_id, orgid
FROM yhyjsxx
- <where>
+ WHERE 1=1
+
<if test="hisUserId != null ">and user_id = #{hisUserId}</if>
- </where>
+
</select>
<select id="yhyksxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserDeptResult">
select user_id, user_code, dept_type,department_id as
dept_id,dept_name,deptparent,del_flag,orgid,create_time,create_by,update_time,update_by
FROM yhyksxx
- <where>
- user_id != 'admin'
+ WHERE 1=1
+
+ AND user_id != 'admin'
<if test="hisUserId != null ">and user_id = #{hisUserId}</if>
- </where>
+
</select>
<select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult">
<include refid="selectPatArchiveVo"/>
- <where>
+ WHERE 1=1
+
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if>
<if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if>
@@ -415,7 +418,7 @@
<if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if>
<if test="filterDrname != null ">and filter_drname = #{filterDrname}</if>
<if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if>
- </where>
+
</select>
@@ -494,19 +497,20 @@
b.fuadvice
FROM
cryxx b
- <where>
+ WHERE 1=1
+
<if test="startOutHospTime != null ">and to_char(b.endtime,'YYMMDD') >=
- to_char(#{startOutHospTime}::date,'YYMMDD')
+ AND to_char(#{startOutHospTime}::date,'YYMMDD')
</if>
<if test="endOutHospTime != null ">and to_char(b.endtime,'YYMMDD') <=
- to_char(#{endOutHospTime}::date,'YYMMDD')
+ AND to_char(#{endOutHospTime}::date,'YYMMDD')
</if>
<if test="startInHospTime != null ">and to_char(b.starttime,'YYMMDD') >=
- to_char(#{startInHospTime}::date,'%y%m%d')
+ AND to_char(#{startInHospTime}::date,'%y%m%d')
</if>
<if test="endInHospTime != null ">and to_char(b.starttime,'YYMMDD') <=
- to_char(#{endInHospTime}::date,'YYMMDD')
+ AND to_char(#{endInHospTime}::date,'YYMMDD')
</if>
<if test="inhospno != null ">and b.inhospno = #{inhospno}</if>
<if test="fuflag != null ">and b.fuflag = #{fuflag}</if>
@@ -518,7 +522,7 @@
<if test="outWayId != null ">and b.out_way_id = #{outWayId}</if>
<if test="outWayName != null ">and b.out_way_name = #{outWayName}</if>
<if test="orgid != null ">and b.orgid = #{orgid}</if>
- </where>
+
</select>
@@ -552,16 +556,17 @@
patname,
mainsuit
from mzxx
- <where>
+ WHERE 1=1
+
<if test="beginTime != null ">and to_char( admitdate,'YYMMDD') >=
- to_char(#{beginTime}::date,'YYMMDD')
+ AND to_char(#{beginTime}::date,'YYMMDD')
</if>
<if test="endTime != null ">and to_char( admitdate,'YYMMDD') <=
- to_char(#{endTime}::date,'YYMMDD')
+ AND to_char(#{endTime}::date,'YYMMDD')
</if>
- </where>
+
</select>
@@ -574,7 +579,8 @@
icdname,
icdpym
from jbxx
- <where>
+ WHERE 1=1
+
<if test="icdcode != null and icdcode != ''">and icdcode = #{icdcode}</if>
<if test="lastflag != null and lastflag != ''">and lastflag = #{lastflag}</if>
<if test="chimedflag != null and chimedflag != ''">and chimedflag = #{chimedflag}</if>
@@ -585,7 +591,7 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="hisIcdid != null and hisIcdid != ''">and his_icdid = #{hisIcdid}</if>
- </where>
+
</select>
@@ -596,7 +602,8 @@
u.birthday,u.orgid,u.job_phone,u.phonenumber, u.sex, u.status,
u.login_ip, u.login_date, u.create_by, u.create_time, u.remark
from ryxx u
- <where>
+ WHERE 1=1
+
<if test="userId != null and userId != 0">
AND u.user_id = #{userId}
</if>
@@ -627,7 +634,7 @@
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
- </where>
+
</select>
<select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult">
@@ -645,7 +652,7 @@
d.create_time,
d.his_dept_id,
d.his_parent_id
- FROM bmxx d
+ FROM HEALTHY_DEPT d
</select>
</mapper>
--
Gitblit v1.9.3