陈昶聿
2 天以前 50443fef22aaa77a1456e1981b51c10e69618b34
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -346,8 +346,9 @@
            </if>
        </if>
        <if test="deptOrDistrict==2">
            AND (1=1
            <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
                AND (leavehospitaldistrictcode IN
                AND leavehospitaldistrictcode IN
                <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
                         separator=","
                         close=")">
@@ -357,14 +358,15 @@
            <if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0">
                OR deptcode IN
                <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
                         close="))">
                         close=")">
                    #{leaveldeptcode}
                </foreach>
            </if>
            </if>)
        </if>
        <if test="deptOrDistrict==3">
            AND (1=1
            <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
                AND (leavehospitaldistrictcode IN
                AND leavehospitaldistrictcode IN
                <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
                         separator=","
                         close=")">
@@ -372,17 +374,19 @@
                </foreach>
            </if>
            <if test=" visitDeptCodes != null and visitDeptCodes.size()>0">
                and visit_dept_code IN
                AND visit_dept_code IN
                <foreach collection="visitDeptCodes" item="visitDeptCode" open="(" separator=","
                         close="))">
                         close=")">
                    #{visitDeptCode}
                </foreach>
            </if>
            )
        </if>
        <if test="deptOrDistrict==4">
            AND (1=1
            <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
                AND (leavehospitaldistrictcode IN
                AND leavehospitaldistrictcode IN
                <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
                         separator=","
                         close=")">
@@ -392,10 +396,11 @@
            <if test=" visitDeptCodes != null and visitDeptCodes.size()>0">
                OR visit_dept_code IN
                <foreach collection="visitDeptCodes" item="visitDeptCode" open="(" separator=","
                         close="))">
                         close=")">
                    #{visitDeptCode}
                </foreach>
            </if>
            )
        </if>
        <if test="visitTime != null">
@@ -643,6 +648,8 @@
            AND date_format(visit_time,'%y%m%d') &lt;= date_format(#{endtime},'%y%m%d')
        </if>
        <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
        <if test="serviceType != null and serviceType != ''">and service_type = #{serviceType}</if>
        <if test="serviceTypes != null and serviceTypes != ''">and service_type IN (#{serviceTypes})</if>
        <if test="deptcode != null  and deptcode != ''">and deptcode = #{deptcode}</if>
        <if test="deptname != null  and deptname != ''">and deptname = #{deptname}</if>
        <if test="isabnormal != null">and isabnormal = #{isabnormal}</if>
@@ -722,6 +729,8 @@
            AND date_format(visit_time,'%y%m%d') &lt;= date_format(#{endtime},'%y%m%d')
        </if>
        <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
        <if test="serviceType != null and serviceType != ''">and service_type = #{serviceType}</if>
        <if test="serviceTypes != null and serviceTypes != ''">and service_type IN (#{serviceTypes})</if>
        <if test="isabnormal != null ">and isabnormal = #{isabnormal}</if>
        <if test="deptcode != null  and deptcode != ''">and deptcode = #{deptcode}</if>
        <if test="deptname != null  and deptname != ''">and deptname = #{deptname}</if>