liusheng
2024-08-28 bedd0a1cef215538df64470df6b8d4a022189136
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -81,6 +81,7 @@
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="viptype != null ">and viptype = #{viptype}</if>
            <if test="pattype != null ">and pattype = #{pattype}</if>
        </where>
    </select>
@@ -271,6 +272,7 @@
            </if>
        </where>
        order by a.update_time desc
    </select>
@@ -315,6 +317,8 @@
        LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
        d.patid
        <where>
            d.del_flag != 1
            AND a.del_flag != 1
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
            <if test="pid != null  and pid != ''">and a.id = #{id}</if>
@@ -353,9 +357,11 @@
                    #{pid}
                </foreach>
            </if>
            AND d.del_flag != 1
            AND a.del_flag != 1
            <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
    </select>
    <select id="selectPatArchiveInfoByOuthosp" parameterType="com.smartor.domain.PatArchiveReq"
@@ -394,6 +400,8 @@
        LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
        d.patid
        <where>
            d.del_flag != 1
            AND a.del_flag != 1
            <if test="pid != null  and pid != ''">and a.id = #{pid}</if>
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
@@ -422,9 +430,11 @@
                    #{pid}
                </foreach>
            </if>
            AND d.del_flag != 1
            AND a.del_flag != 1
            <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
    </select>
    <select id="selectPatArchiveInfoByPhysical" parameterType="com.smartor.domain.PatArchiveReq"
@@ -463,6 +473,8 @@
        LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
        d.patid
        <where>
            d.del_flag != 1
            AND a.del_flag != 1
            <if test="pid != null  and pid != ''">and a.id = #{pid}</if>
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
@@ -492,10 +504,11 @@
                    #{pid}
                </foreach>
            </if>
            AND d.del_flag != 1
            AND a.del_flag != 1
            <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
    </select>
</mapper>