|
|
@@ -47,8 +47,8 @@
|
|
|
<if test="pageDto.checkSub==false">
|
|
|
and d.org_id = #{pageDto.orgId}
|
|
|
</if>
|
|
|
- <if test="pageDto.equipmentName!=null and pageDto.equipmentName!=''">
|
|
|
- and d.NAME like concat('%', #{pageDto.equipmentName},'%')
|
|
|
+ <if test="pageDto.hostName!=null and pageDto.hostName!=''">
|
|
|
+ and d.equipment_name like concat('%', #{pageDto.hostName},'%')
|
|
|
</if>
|
|
|
<!-- <if test="pageDto.status !=null">-->
|
|
|
<!-- and dhd.`status` = #{pageDto.status}-->
|
|
|
@@ -71,7 +71,7 @@
|
|
|
`host_code`,
|
|
|
`org_id`
|
|
|
from iot_dvr_disk
|
|
|
- where equipment_code = #{equipmentCode}
|
|
|
+ where host_code = #{equipmentCode} and deleted=0
|
|
|
</select>
|
|
|
<select id="getRecordAlarmHistoryList"
|
|
|
resultType="com.xunmei.iot.vo.dvrDisk.DvrDiskAlarmHistoryPageVo">
|
|
|
@@ -117,13 +117,13 @@
|
|
|
SUM(DD.count) AS diskTotal,
|
|
|
SUM(dd.exceptionCount) as diskExceptionCount
|
|
|
FROM iot_device d
|
|
|
- LEFT JOIN (SELECT equipment_code,count(0) as count,SUM(if(state=1,1,0)) as exceptionCount from iot_dvr_disk WHERE deleted=0 ) dd on d.equipment_code =dd.equipment_code
|
|
|
+ LEFT JOIN (SELECT host_code,count(0) as count,SUM(if(state=1,1,0)) as exceptionCount from iot_dvr_disk WHERE deleted=0 ) dd on dd.host_code =d.equipment_code
|
|
|
where d.deleted=0 and d.category_id=#{pageDto.categoryId}
|
|
|
<if test="pageDto.checkSub==true">
|
|
|
and d.org_path like concat(#{orgPath},"%")
|
|
|
</if>
|
|
|
<if test="pageDto.checkSub==false">
|
|
|
- and d.org_id = #{request.orgId}
|
|
|
+ and d.org_id = #{pageDto.orgId}
|
|
|
</if>
|
|
|
</select>
|
|
|
|