|
@@ -489,7 +489,6 @@
|
|
|
<select id="getList" resultType="com.zoniot.ccrc.dto.DeviceDto">
|
|
|
select
|
|
|
sd.*,
|
|
|
- sb.name as building_name,
|
|
|
sc.name as community_name,
|
|
|
so.name as org_name,
|
|
|
sdt.equipment_type,
|
|
@@ -502,7 +501,6 @@
|
|
|
sgm.label,
|
|
|
su.username
|
|
|
from sc_device sd
|
|
|
- left join sc_building sb on(sb.id = sd.building_id)
|
|
|
left join sc_community sc on(sc.id = sd.community_id)
|
|
|
left join sc_organization so on(so.id = sc.org_id)
|
|
|
left join sc_device_type sdt on(sdt.id = sd.device_type_id)
|
|
@@ -515,9 +513,9 @@
|
|
|
<if test="sysId != null"> and sd.sys_id = #{sysId}</if>
|
|
|
<if test="deviceTypeId != null"> and sd.device_type_id = #{deviceTypeId}</if>
|
|
|
<if test="orgId != null"> and sc.org_id = #{orgId}</if>
|
|
|
- <if test="province != null"> and sb.province = #{province}</if>
|
|
|
- <if test="city != null"> and sb.city = #{city}</if>
|
|
|
- <if test="region != null"> and sb.region = #{region}</if>
|
|
|
+ <if test="province != null"> and sc.province = #{province}</if>
|
|
|
+ <if test="city != null"> and sc.city = #{city}</if>
|
|
|
+ <if test="region != null"> and sc.region = #{region}</if>
|
|
|
<if test="communityId != null"> and sd.community_id = #{communityId}</if>
|
|
|
<if test="buildingId != null"> and sd.building_id = #{buildingId}</if>
|
|
|
<if test="deviceNo != null and deviceNo != ''"> AND (sd.device_no LIKE concat('%',#{deviceNo},'%') or sd.meter_no LIKE concat('%',#{deviceNo},'%') or sd.file_no LIKE concat('%',#{deviceNo},'%'))</if>
|
|
@@ -650,7 +648,6 @@
|
|
|
<select id="findDeviceDetail" resultType="com.zoniot.ccrc.dto.DeviceDto">
|
|
|
select
|
|
|
sd.*,
|
|
|
- sb.name as building_name,
|
|
|
sc.name as community_name,
|
|
|
so.name as org_name,
|
|
|
sdt.equipment_type,
|
|
@@ -663,7 +660,6 @@
|
|
|
sgm.label,
|
|
|
su.username
|
|
|
from sc_device sd
|
|
|
- left join sc_building sb on(sb.id = sd.building_id)
|
|
|
left join sc_community sc on(sc.id = sd.community_id)
|
|
|
left join sc_organization so on(so.id = sc.org_id)
|
|
|
left join sc_device_type sdt on(sdt.id = sd.device_type_id)
|