From 2baa05224b72fbae849678e338bbc85506a9cfe6 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期一, 29 九月 2025 18:31:55 +0800 Subject: [PATCH] 新增Orgid --- smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml | 44 +++++++++++++++++++++++++++++++++++--------- 1 files changed, 35 insertions(+), 9 deletions(-) diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml index d26ad2d..11c69e2 100644 --- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml @@ -266,6 +266,15 @@ where id = #{id} and del_flag=0 </select> + <select id="selectPatArchiveByPatnos" resultMap="PatArchiveResult"> + SELECT id, patientno + FROM pat_archive + WHERE patientno IN + <foreach item="patno" collection="patnos" open="(" separator="," close=")"> + #{patno} + </foreach> + </select> + <insert id="insertPatArchiveSingle" parameterType="com.smartor.domain.PatArchive" useGeneratedKeys="true" keyProperty="id"> insert into pat_archive @@ -369,7 +378,7 @@ </trim> </insert> - <insert id="insertPatArchive"> + <insert id="insertPatArchive" useGeneratedKeys="true" keyProperty="id"> insert into pat_archive(name,viptype,sex,idcardno,birthdate,place_of_residence,age,age2,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time ,create_by,create_time,isupload,upload_time,pattype,nation,birthplace,native_place,patientno,patid_his,sd_flag,age_unit,age_unit2,notrequired_flag,notrequiredreason,care_facilities,case_path, @@ -510,6 +519,8 @@ </if> </where> order by a.update_time desc + <if test="pn != null and ps != null">limit ${pn},${ps}</if> + </select> @@ -649,7 +660,9 @@ AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) </if> </where> - order by a.update_time desc + -- order by a.update_time desc + <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> + </select> <select id="selectPatArchiveInfoByOuthosp" parameterType="com.smartor.domain.PatArchiveReq" @@ -739,7 +752,8 @@ AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) </if> </where> - order by a.update_time desc + -- order by a.update_time desc + <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> </select> <select id="selectPatArchiveInfoByPhysical" parameterType="com.smartor.domain.PatArchiveReq" @@ -831,7 +845,8 @@ AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) </if> </where> - order by a.update_time desc + -- order by a.update_time desc + <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> </select> <select id="selectPatArchiveInfoByInhospQC" parameterType="com.smartor.domain.PatArchiveReq" @@ -919,8 +934,14 @@ <if test="endtime != null"> AND d.endtime = #{endtime} </if> - <if test="cry != null and cry == 0 ">and d.endtime is null</if> - <if test="cry != null and cry == 1 ">and d.endtime is not null</if> + <if test="drname != null and drname != ''"> + AND d.drname LIKE concat('%',#{drname}, '%') + </if> + <if test="drcode != null"> + AND d.drcode = #{drcode} + </if> + <if test="allhosp != null and allhosp == 1 ">and d.endtime is null</if> + <if test="allhosp != null and allhosp == 4 ">and d.endtime is not null</if> <if test="visitno != null and visitno != ''"> AND d.inhospno = #{visitno} </if> @@ -969,7 +990,8 @@ AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) </if> </where> - order by a.id,a.update_time desc ) as tmp order by endtime desc + <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> + ) as tmp </select> <select id="selectPatArchiveInfoByOuthospQC" parameterType="com.smartor.domain.PatArchiveReq" @@ -1050,6 +1072,9 @@ <if test="drname != null and drname != ''"> AND d.drname LIKE concat('%',#{drname}, '%') </if> + <if test="drcode != null"> + AND d.drcode = #{drcode} + </if> <if test="pids != null"> AND a.id NOT IN <foreach collection="pids" item="pid" open="(" separator="," close=")"> @@ -1060,7 +1085,7 @@ AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) </if> </where> - order by a.update_time desc + <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> </select> <select id="selectPatArchiveInfoByPhysicalQC" parameterType="com.smartor.domain.PatArchiveReq" @@ -1152,6 +1177,7 @@ AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) </if> </where> - order by a.update_time desc + -- order by a.update_time desc + <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> </select> </mapper> -- Gitblit v1.9.3