|
@@ -132,6 +132,7 @@
|
|
|
swl.*,
|
|
|
sd.device_no,
|
|
|
sd.meter_no as water_meter_no,
|
|
|
+ sd.file_no,
|
|
|
sd.loc_desc,
|
|
|
sdt1.equipment_type as equipment_type,
|
|
|
sdt1.model as model,
|
|
@@ -170,18 +171,18 @@
|
|
|
|
|
|
<select id="getAreaList" resultType="com.zoniot.ccrc.dto.BuildingSelectInfoDto">
|
|
|
select
|
|
|
- b.id,
|
|
|
- b.name,
|
|
|
- b.province,
|
|
|
- b.city,
|
|
|
- b.region,
|
|
|
- b.community_id as community,
|
|
|
- b.longitude,
|
|
|
- b.latitude,
|
|
|
+ sc.id,
|
|
|
+ sc.name,
|
|
|
+ sc.province,
|
|
|
+ sc.city,
|
|
|
+ sc.region,
|
|
|
+ sc.id as community,
|
|
|
+ sc.longitude,
|
|
|
+ sc.latitude,
|
|
|
t1.device_count
|
|
|
- from sc_building b
|
|
|
+ from sc_community sc
|
|
|
right join (
|
|
|
- select sd.building_id,count(1) as device_count
|
|
|
+ select sd.community_id,count(1) as device_count
|
|
|
from sc_warning_log swl
|
|
|
left join sc_device sd on(sd.id = swl.device_id)
|
|
|
left join sc_grid_management sgm on(sgm.device_id = sd.id and sgm.status = 1)
|
|
@@ -199,9 +200,9 @@
|
|
|
<if test="feedbackStatus != null"> and swl.feedback_status = #{feedbackStatus}</if>
|
|
|
<if test="startDate != null"> and swl.date_create <![CDATA[ >= ]]> #{startDate}</if>
|
|
|
<if test="endDate != null"> and swl.date_create <![CDATA[ <= ]]> #{endDate}</if>
|
|
|
- GROUP BY sd.building_id
|
|
|
- ) t1 on (t1.building_id = b.id)
|
|
|
- where b.status = 1
|
|
|
+ GROUP BY sd.community_id
|
|
|
+ ) t1 on (t1.community_id = sc.id)
|
|
|
+ where sc.status = 1
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|