洪城义警-正式版后台
zengh
2022-09-14 df878618a8882fc057a5863738df43e1fcd878ea
src/main/java/org/springblade/modules/taskqd/mapper/TaskqdMapper.xml
@@ -10,7 +10,6 @@
        <result column="time" property="time"/>
        <result column="province" property="province"/>
        <result column="city" property="city"/>
        <result column="county" property="county"/>
        <result column="jnum" property="jnum"/>
        <result column="line" property="line"/>
        <result column="rtype" property="rtype"/>
@@ -119,17 +118,29 @@
        select qd.* from sys_taskqd qd LEFT JOIN sys_jurisdiction j ON j.id = qd.jurisdiction where 1=1 AND
        <if test="type==0">
            (qd.rtype = "2" or qd.rtype = "0") AND
            find_in_set(#{serid}, serid) and qd.tasktype=#{tasktype}) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid
            <if test="serid != '1123598821738675201'">
                find_in_set(#{serid}, serid) and
            </if>
            qd.tasktype=#{tasktype}) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid
            FROM
            sys_taskfk WHERE
            serid=#{serid} GROUP BY hdid,serid) B ON A.id=B.hdid
            sys_taskfk WHERE 1 = 1
            <if test="serid != '1123598821738675201'">
                and serid=#{serid}
            </if>
            GROUP BY hdid,serid) B ON A.id=B.hdid
        </if>
        <if test="type==2">
            qd.rtype = "1" AND
            find_in_set(#{serid}, serid) and qd.tasktype=#{tasktype}) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid
            <if test="serid != '1123598821738675201'">
                find_in_set(#{serid}, serid) and
            </if>
            qd.tasktype=#{tasktype}) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid
            FROM
            sys_taskfk WHERE
            serid=#{serid} GROUP BY hdid,serid) B ON A.id=B.hdid
            sys_taskfk WHERE 1 = 1
            <if test="serid != '1123598821738675201'">
                and serid=#{serid}
            </if>
            GROUP BY hdid,serid) B ON A.id=B.hdid
        </if>
        <if test="type==1">
            <if test="jurisdiction!='1372091709474910209'">
@@ -138,7 +149,9 @@
                </if>
                qd.rtype = "2"
                and qd.tasktype=#{tasktype}
                and (!find_in_set(#{serid}, serid) OR serid IS NULL )
                <if test="serid != '1123598821738675201'">
                    and (!find_in_set(#{serid}, serid) OR serid IS NULL )
                </if>
                and
                ((j.id =#{jurisdiction} or
                j.parent_id = #{jurisdiction}) or (j.id =#{workjurisdiction} or