linwe
2024-06-24 60e1a68fa319cd9e92d632bf678b31af20973508
src/main/java/org/springblade/modules/grid/mapper/GridmanMapper.xml
@@ -79,11 +79,16 @@
        SELECT count(1) number
        FROM jczz_gridman jgm
        LEFT JOIN jczz_grid jg ON jg.grid_code = jgm.grid_code
        WHERE jg.community_code = #{code}
        <where>
            jg.community_code in
            <foreach collection="communityCodeList" item="code" open="(" close=")" separator=",">
                #{code}
            </foreach>
        AND jg.is_deleted = 0
        <if test="userId!=null and roleType == '1'">
            and jgm.user_id= #{userId}
        </if>
        </where>
    </select>
    <select id="getCompanyStatistics" resultType="java.lang.Integer">
@@ -92,8 +97,11 @@
        FROM
        jczz_property_company_district jpcd
        LEFT JOIN jczz_district jd ON jd.id = jpcd.district_id
        WHERE
        jd.community_code = #{code}
        <where>
            jd.community_code in
            <foreach collection="communityCodeList" item="code" open="(" close=")" separator=",">
                #{code}
            </foreach>
        and jpcd.is_deleted= 0
        <if test="userId!=null and roleType == '1'">
            AND jd.aoi_code in (
@@ -109,6 +117,7 @@
            AND jda.aoi_code IS NOT NULL
            )
        </if>
        </where>
    </select>
    <select id="getOwnersCommitteeStatistics" resultType="java.lang.Integer">
@@ -116,8 +125,11 @@
        count(1)
        FROM jczz_owners_committee joc LEFT JOIN
        jczz_district jd ON jd.id = joc.area_id
        WHERE
        jd.community_code = #{code}
        <where>
            jd.community_code in
            <foreach collection="communityCodeList" item="code" open="(" close=")" separator=",">
                #{code}
            </foreach>
        and joc.delete_flag= 0
        <if test="userId!=null and roleType == '1'">
            AND jd.aoi_code in (
@@ -133,6 +145,7 @@
            AND jda.aoi_code IS NOT NULL
            )
        </if>
        </where>
    </select>