|
@@ -730,7 +730,7 @@
|
|
|
sb.longitude,sb.latitude,
|
|
|
sb.province,sb.city,sb.region,sb.community,scom.name as community_name,
|
|
|
scon.serial_number as concentrator_name,scol.collector_no as collector_name,swmed.days,swmed.last_error_type,swmed.meter_reading,scus.customer_name,
|
|
|
- sil.plan_time,sil.install_time,sil.accept_time,sil.new_meter_start,sil.id as install_id,sil.old_meter_end,sd.register_status,sdt.is_valve
|
|
|
+ sil.plan_time,sil.install_time,sil.accept_time,sil.new_meter_start,sil.id as install_id,sil.old_meter_end,sd.register_status,sdt.is_valve,sdt.is_register
|
|
|
from sc_device sd
|
|
|
left join sc_device_type sdt on (sdt.id = sd.device_type and sdt.status = 1)
|
|
|
left join sc_device_manufacturer sdm on (sdm.id = sd.manufacturer_id and sdm.status = 1)
|
|
@@ -758,7 +758,8 @@
|
|
|
<if test="buildingId != null"> and sd.building_id = #{buildingId}</if>
|
|
|
<if test="locDesc != null and locDesc != ''"> AND sd.loc_desc LIKE concat('%',#{locDesc},'%')</if>
|
|
|
<if test="deviceTypeId != null"> and sd.device_type = #{deviceTypeId}</if>
|
|
|
- <if test="registerStatus != null"> and sd.register_status = #{registerStatus}</if>
|
|
|
+ <if test="registerStatus != null and registerStatus == 1"> and sd.register_status = #{registerStatus} and sdt.is_register = 1</if>
|
|
|
+ <if test="registerStatus != null and registerStatus == 0"> and sd.register_status = #{registerStatus} and sdt.is_register = 1</if>
|
|
|
<if test="startDate != null"> and sil.install_time <![CDATA[ >= ]]> #{startDate}</if>
|
|
|
<if test="endDate != null"> and sil.install_time <![CDATA[ <= ]]> #{endDate}</if>
|
|
|
<if test="programItems != null and programItems.size() != 0"> and
|