|
|
@@ -1,12 +1,12 @@
|
|
|
package com.xunmei.iot.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
-import com.xunmei.common.core.domain.iot.domain.IotDvrChannel;
|
|
|
import com.xunmei.common.core.domain.video.MediatorVideoDiagnosisRecord;
|
|
|
-import com.xunmei.iot.mapper.IotDvrChannelMapper;
|
|
|
+import com.xunmei.iot.mapper.IotDeviceInfoMapper;
|
|
|
import com.xunmei.iot.mapper.VideoDaysCheckMapper;
|
|
|
import com.xunmei.iot.mapper.VideoDiagnosisRecordMapper;
|
|
|
import com.xunmei.iot.service.IotService;
|
|
|
+import com.xunmei.system.api.domain.iot.IotDeviceInfo;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -19,8 +19,7 @@ public class IotServiceImpl implements IotService {
|
|
|
@Resource
|
|
|
VideoDiagnosisRecordMapper diagnosisRecordMapper;
|
|
|
@Resource
|
|
|
- IotDvrChannelMapper channelMapper;
|
|
|
-
|
|
|
+ IotDeviceInfoMapper iotDeviceInfoMapper;
|
|
|
@Override
|
|
|
public Integer selectVideoDayExceptionChannelNums(Long orgId) {
|
|
|
//此处考虑录像完整性和录像天数,任意一个异常就算异常
|
|
|
@@ -30,9 +29,10 @@ public class IotServiceImpl implements IotService {
|
|
|
|
|
|
@Override
|
|
|
public Integer selectVideoDiagnosisExceptionChannelNums(Long orgId) {
|
|
|
- LambdaQueryWrapper<IotDvrChannel> channelWrapper = new LambdaQueryWrapper<>();
|
|
|
- channelWrapper.eq(IotDvrChannel::getOrgId, orgId);
|
|
|
- if (channelMapper.selectCount(channelWrapper) < 1) {
|
|
|
+ LambdaQueryWrapper<IotDeviceInfo> channelWrapper = new LambdaQueryWrapper<>();
|
|
|
+ channelWrapper.eq(IotDeviceInfo::getOrgId, orgId);
|
|
|
+ channelWrapper.in(IotDeviceInfo::getDeviceType, 2,3);
|
|
|
+ if (iotDeviceInfoMapper.selectCount(channelWrapper) < 1) {
|
|
|
return null;
|
|
|
}
|
|
|
LambdaQueryWrapper<MediatorVideoDiagnosisRecord> wrapper = new LambdaQueryWrapper<MediatorVideoDiagnosisRecord>();
|