| | |
| | | |
| | | <select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult"> |
| | | <include refid="selectPatArchiveVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <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> |
| | |
| | | <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if> |
| | | <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if> |
| | | <if test="campusid != null ">and campusid = #{campusid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | |
| | | a.filter_drcode, |
| | | a.case_person_age |
| | | from pat_archive a,pat_archivetag b ,base_tag c |
| | | <where> |
| | | a.del_flag=0 and |
| | | a.id = b.patid and b.tagid = c.tagid |
| | | where 1=1 |
| | | and a.del_flag = 0 |
| | | and a.id = b.patid |
| | | and b.tagid = c.tagid |
| | | <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if> |
| | | <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if> |
| | | <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> |
| | |
| | | #{tagId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveByPatid" parameterType="Long" resultMap="PatArchiveResult"> |
| | |
| | | FROM |
| | | pat_archive a |
| | | LEFT JOIN pat_archivetag b ON a.id = b.patid AND b.del_flag = 0 |
| | | <where> |
| | | a.del_flag = 0 |
| | | where 1=1 |
| | | and a.del_flag = 0 |
| | | and a.orgid = #{orgid} |
| | | <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">and a.idcardno = #{idcardno}</if> |
| | |
| | | #{tagId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by a.update_time desc |
| | | <if test="pn != null and ps != null">limit ${pn},${ps}</if> |
| | | |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> |
| | |
| | | <if test="isFilter == true"> |
| | | 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> |
| | | |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="pid != null and pid != ''">and a.id = #{pid}</if> |
| | |
| | | <if test="isFilter == true"> |
| | | 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> |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="pid != null and pid != ''">and a.id = #{pid}</if> |
| | |
| | | <if test="isFilter == true"> |
| | | 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> |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> |
| | |
| | | <if test="isFilter == true"> |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | ) as tmp |
| | | </select> |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="pid != null and pid != ''">and a.id = #{pid}</if> |
| | |
| | | <if test="isFilter == true"> |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | | |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="pid != null and pid != ''">and a.id = #{pid}</if> |
| | |
| | | <if test="isFilter == true"> |
| | | 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> |