linwe
2024-07-08 7a1e4d9fe3fe2172d5c4fba524f17ffd73ffbb3e
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -955,16 +955,37 @@
            select house_code from jczz_household where is_deleted = 0 and relationship = 1 and house_code is not null and house_code != '' GROUP BY house_code
            ) a on a.house_code = jh.house_code
            left join
            (
            select house_code from jczz_household where is_deleted = 0 and relationship = 18 and house_code is not null and house_code != '' GROUP BY house_code
            ) b on b.house_code = jh.house_code
            (select house_code
             from jczz_household
             where is_deleted = 0
               and relationship = 18
               and house_code is not null
               and house_code != ''
             GROUP BY house_code) b on b.house_code = jh.house_code
            left join
            (
            select house_code from jczz_household where is_deleted = 0 and relationship is null or (relationship!=1 and relationship!=18) and house_code is not null and house_code != '' GROUP BY house_code
            ) c on c.house_code = jh.house_code
        ) d left join jczz_user_house_label juhl on d.house_code = juhl.house_code and lable_type = 2
        where juhl.id is null and status is not null
        limit #{i},#{size}
            (select house_code
             from jczz_household
             where is_deleted = 0 and relationship is null
                or (relationship!=1 and relationship!=18) and house_code is not null and house_code != ''
             GROUP BY house_code) c on c.house_code = jh.house_code) d
                            left join jczz_user_house_label juhl on d.house_code = juhl.house_code and lable_type = 2
        where juhl.id is null
          and status is not null
            limit #{i}
            , #{size}
    </select>
    <select id="getHoseTotalAndAreaTotalByDistrictCode" resultType="java.util.Map">
        SELECT
        count( 1 ) AS houseCount,
        IFNULL(sum( area ),0) AS houseArea
        FROM
        jczz_house jh
        WHERE
        jh.district_code in
        <foreach collection="aoiCodeList" item="code" open="(" close=")" separator=",">
            #{code}
        </foreach>
    </select>