陈昶聿
6 天以前 987e38327f849e1b13d8541246dde08d877db0e8
smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
@@ -122,6 +122,7 @@
        pmo.mainsuit
        from pat_med_outhosp pmo
        WHERE 1=1
            <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
            AND pmo.del_flag=0
            <if test="orgid != null ">and pmo.orgid = #{orgid}</if>
@@ -129,12 +130,11 @@
            <if test="serverState != null ">and pmo.server_state = #{serverState}</if>
            <if test="hospitalname != null  and hospitalname != ''">and pmo.hospitalname like concat('%',
                #{hospitalname},
                AND '%')
               '%')
            </if>
            <if test="deptcodes != null and deptcodes.size()>0">
                AND pmo.deptcode IN
                <foreach collection="deptcodes" item="deptcode" open="(" separator=","
                         AND close=")">
                <foreach collection="deptcodes" item="deptcode" open="(" separator="," close=")">
                    #{deptcode}
                </foreach>
            </if>
@@ -462,6 +462,7 @@
        FROM
        pat_med_outhosp
        WHERE 1=1
            <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
            AND del_flag=0
            <if test="orgid != null">
@@ -483,6 +484,7 @@
        FROM
        service_subtask
        WHERE 1=1
            <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
            AND del_flag = 0
            and service_type=3
@@ -509,6 +511,7 @@
        SELECT deptname, COUNT(1) AS rc
        FROM pat_med_outhosp
        WHERE 1=1
            <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
            AND del_flag=0
            <if test="inhospstate != null">