|
|
@@ -213,7 +213,7 @@
|
|
|
SUM(dd.exceptionCount) as diskExceptionCount
|
|
|
FROM iot_device_info d
|
|
|
LEFT JOIN
|
|
|
- (SELECT host_code,count(0) as count,SUM(if(state=1,1,0)) as exceptionCount from iot_dvr_disk WHERE
|
|
|
+ (SELECT org_id, host_code,count(0) as count,SUM(if(state=1,1,0)) as exceptionCount from iot_dvr_disk WHERE
|
|
|
deleted=0
|
|
|
<if test="pageDto.checkSub==true">
|
|
|
and org_path like concat(#{orgPath},"%")
|
|
|
@@ -221,8 +221,7 @@
|
|
|
<if test="pageDto.checkSub==false">
|
|
|
and org_id = #{pageDto.orgId}
|
|
|
</if>
|
|
|
-
|
|
|
- group by host_code) dd on dd.host_code =d.device_code
|
|
|
+ group by org_id,host_code ) dd on dd.host_code =d.device_code and d.org_id=dd.org_id
|
|
|
where d.deleted=0 and d.device_type=1
|
|
|
<if test="pageDto.checkSub==true">
|
|
|
and d.org_path like concat(#{orgPath},"%")
|