linwe
2023-12-06 27aba12a2708699d5bab06db3d6f508da595b7b7
查询网格 bug 修改
2 files modified
31 ■■■■ changed files
src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml 20 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml 11 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml
@@ -161,8 +161,8 @@
            FROM jczz_house_rental jhr
            LEFT JOIN
            (
                select housing_rental_id,count(*) num from jczz_house_tenant
                where is_deleted = 0
        select housing_rental_id,count(*) num from jczz_household
        where is_deleted = 0 and housing_rental_id is not null
                GROUP BY housing_rental_id
            ) jht
            ON jht.housing_rental_id = jhr.id
@@ -180,7 +180,9 @@
            FROM jczz_house_rental jhr
            LEFT JOIN
            (
            select housing_rental_id,count(*) num from jczz_house_tenant where is_deleted = 0 GROUP BY housing_rental_id
        select housing_rental_id,count(*) num from jczz_household
        where is_deleted = 0 and housing_rental_id is not null
        GROUP BY housing_rental_id
            ) jht
            ON jht.housing_rental_id = jhr.id
            LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jhr.house_code
@@ -197,7 +199,9 @@
            FROM jczz_house_rental jhr
            LEFT JOIN
            (
            select housing_rental_id,count(*) num from jczz_house_tenant where is_deleted = 0 GROUP BY housing_rental_id
        select housing_rental_id,count(*) num from jczz_household
        where is_deleted = 0 and housing_rental_id is not null
        GROUP BY housing_rental_id
            ) jht
            ON jht.housing_rental_id = jhr.id
            LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jhr.house_code
@@ -223,11 +227,11 @@
        JOIN jczz_doorplate_address jda ON jda.address_code = jhr.house_code
        JOIN jczz_house jh ON jh.house_code = jhr.house_code and jh.is_deleted = 0
        LEFT JOIN (
        SELECT jht.housing_rental_id,jht.name as tenantName,jht.phone
        FROM jczz_house_tenant jht RIGHT JOIN (
        SELECT jht.housing_rental_id,jht.name as tenantName,jht.phoneNumber phone
        FROM jczz_household jht RIGHT JOIN (
        SELECT MAX(ID) as id,housing_rental_id
        FROM jczz_house_tenant
        WHERE is_deleted = 0
        FROM jczz_household
        WHERE is_deleted = 0 and house_rental_id is not null
        <if test="vo.tenantName != null and vo.tenantName != ''">
            AND name LIKE CONCAT('%',#{vo.tenantName},'%')
        </if>
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -215,15 +215,14 @@
    <!--查询网格-->
    <select id="getGrid" resultType="org.springblade.modules.house.vo.HouseholdOtherVO">
        SELECT
            jg.id as code,
            jgm.gridman_name as name,jgm.mobile as phone
        FROM
            jczz_grid_range jgr
        SELECT jg.id            as code,
               jgm.gridman_name as name,
               jgm.mobile       as phone
        FROM jczz_grid_range jgr
        LEFT JOIN jczz_grid jg ON jg.id = jgr.grid_id and jg.is_deleted = 0
        LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id and jgm.is_deleted = 0
        WHERE 1=1
        AND jgr.house_code = #{household.houseCode}
          AND jgr.house_code = #{household.houseCode} limit 1
    </select>
    <!--查询公安信息-->