lin
2024-03-02 861e9b1eb145094dff6d1caf3dba30d7ce0e11d7
src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml
@@ -350,7 +350,8 @@
        <where>
            and jtr.is_deleted = 0
            and jtr.confirm_flag = 1
            <if test="userId != null">
            <if test="userId != null and roleName == 'wgy'" >
                AND (
                jp.grid_code IN (
                SELECT
@@ -373,6 +374,28 @@
                AND jgm.user_id = #{userId}
                ))
            </if>
            <if test="userId != null and roleName == 'mj'">
                AND (
                jp.jw_grid_code IN (
                SELECT
                jpag.jw_grid_code
                FROM
                jczz_police_affairs_grid jpag
                WHERE
                jpag.is_deleted = 0
                AND jpag.police_user_id = #{userId}
                )
                OR jh.jw_grid_code IN (
                SELECT
                jpag.jw_grid_code
                FROM
                jczz_police_affairs_grid jpag
                WHERE
                jpag.is_deleted = 0
                AND jpag.police_user_id = #{userId}
                ))
            </if>
        </where>
    </select>