liusheng
2 天以前 da026a34bcc97b2eb49607a3b02d94d8f683f997
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -180,8 +180,8 @@
    <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>
@@ -212,7 +212,6 @@
            <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>
@@ -250,9 +249,10 @@
        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>
@@ -264,7 +264,6 @@
                    #{tagId}
                </foreach>
            </if>
        </where>
    </select>
    <select id="selectPatArchiveByPatid" parameterType="Long" resultMap="PatArchiveResult">
@@ -513,8 +512,8 @@
        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>
@@ -528,7 +527,6 @@
                    #{tagId}
                </foreach>
            </if>
        </where>
        order by a.update_time desc
        <if test="pn != null  and ps != null">limit ${pn},${ps}</if>
@@ -596,8 +594,8 @@
        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>
@@ -672,7 +670,6 @@
            <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>
@@ -728,8 +725,8 @@
        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>
@@ -766,7 +763,6 @@
            <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>
@@ -822,8 +818,8 @@
        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>
@@ -861,7 +857,6 @@
            <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>
@@ -930,8 +925,8 @@
        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>
@@ -1010,7 +1005,6 @@
            <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>
@@ -1066,8 +1060,8 @@
        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>
@@ -1107,7 +1101,6 @@
            <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>
@@ -1162,8 +1155,8 @@
        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>
@@ -1201,7 +1194,6 @@
            <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>