lin
2024-03-20 70a29ae28b85643e00a4b7fbf111a95646a24dc2
src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
@@ -34,6 +34,49 @@
        <if test="rotation.regionCode!=null and rotation.regionCode!=''">
            and jr.community_code like concat('%',#{rotation.regionCode},'%')
        </if>
        <if test="isAdministrator==2">
            <choose>
                <when test="rotation.roleName != null and rotation.roleName != ''">
                    <if test="rotation.roleName=='wgy'">
                        <choose>
                            <when test="gridCodeList !=null and gridCodeList !=''">
                                and jr.type = 2
                                and jr.community_code REGEXP #{gridCodeList}
                            </when>
                            <otherwise>
                                and jr.type = 2
                                and jr.community_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                    <if test="rotation.roleName=='mj'">
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList!=''">
                                and jr.type = 1
                                and jr.community_code REGEXP #{regionChildCodesList}
                            </when>
                            <otherwise>
                                and jr.type = 1
                                and jr.community_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                    <if test="rotation.roleName=='inhabitant'">
                        and jr.type = 3
                    </if>
                </when>
                <otherwise>
                    <choose>
                        <when test="regionChildCodesList !=null and regionChildCodesList!=''">
                            and jr.community_code REGEXP #{regionChildCodesList}
                        </when>
                        <otherwise>
                            and jr.community_code in ('')
                        </otherwise>
                    </choose>
                </otherwise>
            </choose>
        </if>
    </select>