|
|
@ -452,12 +452,11 @@ |
|
|
|
|
|
|
|
<select id="listBuildingInfo" resultType="com.epmet.dto.result.BuildingResultDTO"> |
|
|
|
SELECT |
|
|
|
CONCAT( n.NEIGHBOR_HOOD_NAME, '-', b.BUILDING_NAME ) AS label, |
|
|
|
CONCAT( n.NEIGHBOR_HOOD_NAME, b.BUILDING_NAME ) AS label, |
|
|
|
b.id AS buildingId, |
|
|
|
b.BUILDING_NAME AS buildingName, |
|
|
|
n.id AS neighborhoodId, |
|
|
|
n.NEIGHBOR_HOOD_NAME AS neighborhoodName, |
|
|
|
n.CUSTOMER_ID AS neighborhoodName, |
|
|
|
n.GRID_ID, |
|
|
|
g.GRID_NAME |
|
|
|
FROM |
|
|
@ -472,6 +471,9 @@ |
|
|
|
<if test="gridId != null and gridId != ''"> |
|
|
|
AND n.GRID_ID = #{gridId} |
|
|
|
</if> |
|
|
|
<if test="buildingName != null and buildingName != ''"> |
|
|
|
AND (n.NEIGHBOR_HOOD_NAME LIKE CONCAT('%', #{buildingName}, '%') OR b.BUILDING_NAME LIKE CONCAT('%', #{buildingName}, '%')) |
|
|
|
</if> |
|
|
|
AND ( |
|
|
|
n.AGENCY_ID = #{agencyId} |
|
|
|
OR n.AGENCY_PIDS LIKE CONCAT('%', #{agencyId}, '%')) |
|
|
|