|
|
@ -138,117 +138,6 @@ |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<!--<select id="searchBuildingByPage" resultType="map"> |
|
|
|
select |
|
|
|
a.ID as buildingId, |
|
|
|
a.BUILDING_NAME as buildingName, |
|
|
|
a.TOTAL_HOUSE_NUM as totalHouseNum, |
|
|
|
a.TOTAL_FLOOR_NUM as totalFloorNum, |
|
|
|
a.TOTAL_UNIT_NUM as totalUnitNum, |
|
|
|
a.BUILDING_NAME as buildingType, |
|
|
|
b.NEIGHBOR_HOOD_NAME as neighborHoodName |
|
|
|
from ic_building a |
|
|
|
|
|
|
|
LEFT JOIN ic_neighbor_hood b on a.NEIGHBOR_HOOD_ID = b.ID |
|
|
|
|
|
|
|
<if test="neighbor.id != null and neighbor.id.trim() != ''"> |
|
|
|
AND b.ID = #{neighbor.id} |
|
|
|
</if> |
|
|
|
<if test="neighbor.agencyId != null and neighbor.agencyId.trim() != ''"> |
|
|
|
AND b.AGENCY_ID = #{neighbor.agencyId} |
|
|
|
</if> |
|
|
|
<if test="neighbor.gridId != null and neighbor.gridId.trim() != ''"> |
|
|
|
AND b.GRID_ID = #{neighbor.gridId} |
|
|
|
</if> |
|
|
|
<if test="neighbor.neighborHoodName != null and neighbor.neighborHoodName.trim() != ''"> |
|
|
|
AND b.NEIGHBOR_HOOD_NAME like concat('%',trim(#{neighbor.neighborHoodName}),'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<where> |
|
|
|
|
|
|
|
<if test="building.id != null and building.id.trim() != ''"> |
|
|
|
AND a.ID = #{building.id} |
|
|
|
</if> |
|
|
|
<if test="building.buildingName != null and building.buildingName.trim() != ''"> |
|
|
|
AND a.BUILDING_NAME like concat('%',trim(#{building.buildingName}),'%') |
|
|
|
</if> |
|
|
|
<if test="building.delFlag != null and building.delFlag.trim() != ''"> |
|
|
|
AND a.DEL_FLAG = #{building.delFlag} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
|
|
|
|
</select>--> |
|
|
|
|
|
|
|
|
|
|
|
<!--<select id="searchAllBuilding" resultType="com.epmet.excel.IcBuildingExcel"> |
|
|
|
select |
|
|
|
|
|
|
|
a.BUILDING_NAME as buildingName, |
|
|
|
a.TOTAL_HOUSE_NUM as totalHouseNum, |
|
|
|
a.TOTAL_FLOOR_NUM as totalFloorNum, |
|
|
|
a.TOTAL_UNIT_NUM as totalUnitNum, |
|
|
|
|
|
|
|
b.NEIGHBOR_HOOD_NAME as neighborHoodName, |
|
|
|
f.ORGANIZATION_NAME as agencyName, |
|
|
|
g.GRID_NAME as gridName |
|
|
|
from ic_building a |
|
|
|
|
|
|
|
LEFT JOIN ic_neighbor_hood b on a.NEIGHBOR_HOOD_ID = b.ID |
|
|
|
and b.ID in ( |
|
|
|
select c.id from ic_neighbor_hood c |
|
|
|
INNER JOIN customer_agency d on c.AGENCY_ID = d.ID |
|
|
|
INNER JOIN customer_grid e on c.GRID_ID = e.ID |
|
|
|
${ew.customSqlSegment} |
|
|
|
) |
|
|
|
LEFT JOIN customer_agency f on b.AGENCY_ID = f.ID |
|
|
|
LEFT JOIN customer_grid g on b.GRID_ID = g.ID |
|
|
|
${ew1.customSqlSegment} |
|
|
|
</select>--> |
|
|
|
<!--<select id="searchAllBuilding" resultType="com.epmet.excel.IcBuildingExcel"> |
|
|
|
select |
|
|
|
a.ID as buildingId, |
|
|
|
a.BUILDING_NAME as buildingName, |
|
|
|
a.TOTAL_HOUSE_NUM as totalHouseNum, |
|
|
|
a.TOTAL_FLOOR_NUM as totalFloorNum, |
|
|
|
a.TOTAL_UNIT_NUM as totalUnitNum, |
|
|
|
a.BUILDING_NAME as buildingType, |
|
|
|
b.NEIGHBOR_HOOD_NAME as neighborHoodName, |
|
|
|
c.ORGANIZATION_NAME as agencyName, |
|
|
|
d.GRID_NAME as gridName |
|
|
|
from ic_building a |
|
|
|
|
|
|
|
LEFT JOIN ic_neighbor_hood b on a.NEIGHBOR_HOOD_ID = b.ID |
|
|
|
LEFT JOIN customer_agency c on b.AGENCY_ID = c.ID |
|
|
|
LEFT JOIN customer_grid c on b.GRID_ID = d.ID |
|
|
|
|
|
|
|
<if test="neighbor.id != null and neighbor.id.trim() != ''"> |
|
|
|
AND b.ID = #{neighbor.id} |
|
|
|
</if> |
|
|
|
<if test="neighbor.agencyId != null and neighbor.agencyId.trim() != ''"> |
|
|
|
AND b.AGENCY_ID = #{neighbor.agencyId} |
|
|
|
</if> |
|
|
|
<if test="neighbor.gridId != null and neighbor.gridId.trim() != ''"> |
|
|
|
AND b.GRID_ID = #{neighbor.gridId} |
|
|
|
</if> |
|
|
|
<if test="neighbor.neighborHoodName != null and neighbor.neighborHoodName.trim() != ''"> |
|
|
|
AND b.NEIGHBOR_HOOD_NAME like concat('%',trim(#{neighbor.neighborHoodName}),'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<where> |
|
|
|
|
|
|
|
<if test="building.id != null and building.id.trim() != ''"> |
|
|
|
AND a.ID = #{building.id} |
|
|
|
</if> |
|
|
|
<if test="building.buildingName != null and building.buildingName.trim() != ''"> |
|
|
|
AND a.BUILDING_NAME like concat('%',trim(#{building.buildingName}),'%') |
|
|
|
</if> |
|
|
|
<if test="building.delFlag != null and building.delFlag.trim() != ''"> |
|
|
|
AND a.DEL_FLAG = #{building.delFlag} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select>--> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectAgencyChildrenList" resultType="com.epmet.entity.CustomerAgencyEntity"> |
|
|
|
|
|
|
|
SELECT |
|
|
@ -330,7 +219,6 @@ |
|
|
|
#{val} |
|
|
|
</foreach> |
|
|
|
order by gridName,neighborHoodName,buildingName |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |
|
|
|