lin
2024-03-21 98222128889b7943d02bfa6a9bd09782cb2bfbcb
src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
@@ -53,39 +53,37 @@
        LEFT JOIN blade_region br on br.code = jg.community_code
        LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        <where>
            <if test="task.roleName != null and task.roleName != ''">
            <if test="isAdministrator==2">
                <choose>
                    <when test="task.roleName != null and task.roleName != ''">
                <if test="task.roleName=='wgy'">
                    <if test="isAdministrator==2">
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and jp.grid_code in
                                    and jh.grid_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jp.grid_code in ('')
                                    and jh.grid_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                </if>
                <if test="task.roleName=='mj'">
                    <if test="isAdministrator==2">
                        <if test="task.roleName=='mj' and isAdministrator==2">
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and jpag.community_code in
                                    and br.village_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jpag.community_code in ('')
                                    and br.village_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                </if>
            </if>
            <if test="isAdministrator==2">
                    </when>
                    <otherwise>
                <choose>
                    <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                        and
@@ -106,6 +104,8 @@
                        (
                        jg.grid_code in ('') or br.village_code in ('')
                        )
                            </otherwise>
                        </choose>
                    </otherwise>
                </choose>
            </if>
@@ -194,9 +194,10 @@
        LEFT JOIN blade_region br on br.code = jg.community_code
        LEFT JOIN jczz_task_bail_reporting_event jtbre on jtbre.task_id = jt.id
        <where>
            <if test="task.roleName != null and task.roleName != ''">
                <if test="task.roleName=='wgy'">
                    <if test="isAdministrator==2">
                <choose>
                    <when test="task.roleName != null and task.roleName != ''">
                        <if test="task.roleName=='wgy'">
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and jh.grid_code in
@@ -208,7 +209,6 @@
                                and jh.grid_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                </if>
                <if test="task.roleName=='mj' and isAdministrator==2">
                    <choose>
@@ -223,8 +223,8 @@
                        </otherwise>
                    </choose>
                </if>
            </if>
            <if test="isAdministrator==2">
                    </when>
                    <otherwise>
                <choose>
                    <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                        and
@@ -247,6 +247,8 @@
                        )
                    </otherwise>
                </choose>
                    </otherwise>
                </choose>
            </if>
            <if test="task.status != null and task.status != null">
                and jt.status = #{task.status}