|
|
@ -25,16 +25,6 @@ |
|
|
|
<result property="updatedTime" column="UPDATED_TIME"/> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<!-- 小区楼栋关系 --> |
|
|
|
<resultMap id="neighborhoodBuildingMap" type="com.epmet.commons.tools.dto.result.OptionResultDTO"> |
|
|
|
<id column="value" property="value" /> |
|
|
|
<result column="label" property="label"/> |
|
|
|
<collection property="children" column="value" ofType="com.epmet.commons.tools.dto.result.OptionResultDTO" select="selectBuildingList"> |
|
|
|
<id column="value" property="value" /> |
|
|
|
<result column="label" property="label" /> |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<!-- 更新小区详细地址和备注 --> |
|
|
|
<update id="updateNeighborHood"> |
|
|
|
update ic_neighbor_hood |
|
|
@ -673,32 +663,24 @@ |
|
|
|
SORT, DOOR_NAME+0 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getNeighborhoodBuildingList" resultMap="neighborhoodBuildingMap"> |
|
|
|
<select id="getNeighborhoodList" resultType="com.epmet.dto.IcNeighborHoodDTO"> |
|
|
|
SELECT |
|
|
|
id AS 'value', |
|
|
|
NEIGHBOR_HOOD_NAME AS label |
|
|
|
n.id, |
|
|
|
n.NEIGHBOR_HOOD_NAME, |
|
|
|
n.GRID_ID, |
|
|
|
g.GRID_NAME |
|
|
|
FROM |
|
|
|
ic_neighbor_hood |
|
|
|
ic_neighbor_hood n |
|
|
|
LEFT JOIN customer_grid g ON n.GRID_ID = g.id |
|
|
|
WHERE |
|
|
|
DEL_FLAG = '0' |
|
|
|
AND CUSTOMER_ID = #{customerId} |
|
|
|
n.DEL_FLAG = '0' |
|
|
|
AND n.CUSTOMER_ID = #{customerId} |
|
|
|
<if test="gridId != null and gridId != ''"> |
|
|
|
AND GRID_ID = #{gridId} |
|
|
|
AND n.GRID_ID = #{gridId} |
|
|
|
</if> |
|
|
|
AND ( |
|
|
|
AGENCY_ID = #{agencyId} |
|
|
|
OR AGENCY_PIDS LIKE CONCAT('%', #{agencyId}, '%')) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectBuildingList" parameterType="map" resultType="com.epmet.commons.tools.dto.result.OptionResultDTO"> |
|
|
|
SELECT |
|
|
|
id AS 'value', |
|
|
|
BUILDING_NAME AS label |
|
|
|
FROM |
|
|
|
ic_building |
|
|
|
WHERE |
|
|
|
DEL_FLAG = '0' |
|
|
|
AND NEIGHBOR_HOOD_ID = #{value} |
|
|
|
n.AGENCY_ID = #{agencyId} |
|
|
|
OR n.AGENCY_PIDS LIKE CONCAT('%', #{agencyId}, '%')) |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |
|
|
|