|
|
@@ -8,18 +8,16 @@ import com.xunmei.common.core.constant.SecurityConstants;
|
|
|
import com.xunmei.common.core.domain.iot.domain.IotDevice;
|
|
|
import com.xunmei.common.core.domain.mediator.domain.MediatorAlarmCode;
|
|
|
import com.xunmei.common.core.domain.mediator.domain.MediatorCategory;
|
|
|
-import com.xunmei.common.core.domain.video.MediatorVideoRecorderHardDiskDetection;
|
|
|
-import com.xunmei.common.core.domain.video.MediatorVideoRecorderHardDiskDetectionLog;
|
|
|
+import com.xunmei.common.core.domain.video.IotDvrHardDiskDetection;
|
|
|
+import com.xunmei.common.core.domain.video.IotDvrHardDiskDetectionLog;
|
|
|
import com.xunmei.common.core.util.BeanHelper;
|
|
|
import com.xunmei.common.core.utils.DateUtils;
|
|
|
import com.xunmei.common.core.utils.IDHelper;
|
|
|
import com.xunmei.mediator.api.mapper.MediatorCategoryMapper;
|
|
|
-import com.xunmei.mediator.api.mapper.MediatorVideoRecorderHardDiskDetectionMapper;
|
|
|
+import com.xunmei.mediator.api.mapper.IotDvrHardDiskDetectionMapper;
|
|
|
import com.xunmei.mediator.api.service.*;
|
|
|
import com.xunmei.mediator.util.CheckDataUtil;
|
|
|
-import com.xunmei.system.api.RemoteDeviceService;
|
|
|
import com.xunmei.system.api.RemoteOrgService;
|
|
|
-import com.xunmei.system.api.domain.SysDevice;
|
|
|
import com.xunmei.system.api.domain.SysOrg;
|
|
|
import com.xunmei.system.api.dto.protection.ReceiveErrorDto;
|
|
|
import com.xunmei.system.api.dto.protection.VideoRecorderHardDiskDetectionEditDto;
|
|
|
@@ -38,7 +36,7 @@ import java.util.*;
|
|
|
* @since 2024-01-30
|
|
|
*/
|
|
|
@Service
|
|
|
-public class MediatorVideoRecorderHardDiskDetectionServiceImpl extends ServiceImpl<MediatorVideoRecorderHardDiskDetectionMapper, MediatorVideoRecorderHardDiskDetection> implements IMediatorVideoRecorderHardDiskDetectionService {
|
|
|
+public class IotDvrHardDiskDetectionServiceImpl extends ServiceImpl<IotDvrHardDiskDetectionMapper, IotDvrHardDiskDetection> implements IotDvrHardDiskDetectionService {
|
|
|
|
|
|
@Resource
|
|
|
RemoteOrgService remoteOrgService;
|
|
|
@@ -49,12 +47,12 @@ public class MediatorVideoRecorderHardDiskDetectionServiceImpl extends ServiceIm
|
|
|
@Resource
|
|
|
IMediatorAlarmCodeService alarmCodeService;
|
|
|
@Resource
|
|
|
- IMediatorVideoRecorderHardDiskDetectionLogService videoRecorderHardDiskDetectionLogService;
|
|
|
+ IotDvrHardDiskDetectionLogService videoRecorderHardDiskDetectionLogService;
|
|
|
@Override
|
|
|
- public MediatorVideoRecorderHardDiskDetection findTopByEquipmentCodeAndOrgId(String equipmentCode, Long orgId) {
|
|
|
+ public IotDvrHardDiskDetection findTopByEquipmentCodeAndOrgId(String equipmentCode, Long orgId) {
|
|
|
return lambdaQuery()
|
|
|
- .eq(MediatorVideoRecorderHardDiskDetection::getEquipmentCode, equipmentCode)
|
|
|
- .eq(MediatorVideoRecorderHardDiskDetection::getOrgId, orgId)
|
|
|
+ .eq(IotDvrHardDiskDetection::getEquipmentCode, equipmentCode)
|
|
|
+ .eq(IotDvrHardDiskDetection::getOrgId, orgId)
|
|
|
.last(Constants.LIMIT1)
|
|
|
.one();
|
|
|
}
|
|
|
@@ -129,12 +127,12 @@ public class MediatorVideoRecorderHardDiskDetectionServiceImpl extends ServiceIm
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
MediatorAlarmCode code = alarmCodeService.selectByCode("112");
|
|
|
map.put("code", code);
|
|
|
- MediatorVideoRecorderHardDiskDetection videoRecorderHardDiskDetection = new MediatorVideoRecorderHardDiskDetection();
|
|
|
+ IotDvrHardDiskDetection videoRecorderHardDiskDetection = new IotDvrHardDiskDetection();
|
|
|
videoRecorderHardDiskDetection.setOrgId(org.getId());
|
|
|
videoRecorderHardDiskDetection.setOrgName(org.getName());
|
|
|
videoRecorderHardDiskDetection.setOrgPath(org.getPath());
|
|
|
videoRecorderHardDiskDetection.setEquipmentCode(videoRecorderHardDiskDetectionEditDto.getEquipmentCode());
|
|
|
- MediatorVideoRecorderHardDiskDetection old = this.findTopByEquipmentCodeAndOrgId(videoRecorderHardDiskDetectionEditDto.getEquipmentCode(), org.getId());
|
|
|
+ IotDvrHardDiskDetection old = this.findTopByEquipmentCodeAndOrgId(videoRecorderHardDiskDetectionEditDto.getEquipmentCode(), org.getId());
|
|
|
if (old != null) {
|
|
|
videoRecorderHardDiskDetection = old;
|
|
|
} else {
|
|
|
@@ -158,7 +156,7 @@ public class MediatorVideoRecorderHardDiskDetectionServiceImpl extends ServiceIm
|
|
|
}
|
|
|
videoRecorderHardDiskDetection.setUpdateTime(LocalDateTime.now());
|
|
|
map.put("videoRecorderHardDiskDetection", videoRecorderHardDiskDetection);
|
|
|
- MediatorVideoRecorderHardDiskDetectionLog videoRecorderHardDiskDetectionLog = new MediatorVideoRecorderHardDiskDetectionLog();
|
|
|
+ IotDvrHardDiskDetectionLog videoRecorderHardDiskDetectionLog = new IotDvrHardDiskDetectionLog();
|
|
|
BeanHelper.copyProperties(videoRecorderHardDiskDetectionLog, videoRecorderHardDiskDetection);
|
|
|
videoRecorderHardDiskDetectionLog.setId((Long) null);
|
|
|
videoRecorderHardDiskDetectionLog.setVideoRecorderHardDiskDetectionId(videoRecorderHardDiskDetection.getId());
|
|
|
@@ -185,8 +183,8 @@ public class MediatorVideoRecorderHardDiskDetectionServiceImpl extends ServiceIm
|
|
|
|
|
|
@Override
|
|
|
public void saveDataInfo(Map<String, Object> objectMap, VideoRecorderHardDiskDetectionEditDto videoRecorderHardDiskDetectionEditDto) {
|
|
|
- MediatorVideoRecorderHardDiskDetection videoRecorderHardDiskDetection = (MediatorVideoRecorderHardDiskDetection) objectMap.get("videoRecorderHardDiskDetection");
|
|
|
- MediatorVideoRecorderHardDiskDetectionLog videoRecorderHardDiskDetectionLog = (MediatorVideoRecorderHardDiskDetectionLog) objectMap.get("videoRecorderHardDiskDetectionLog");
|
|
|
+ IotDvrHardDiskDetection videoRecorderHardDiskDetection = (IotDvrHardDiskDetection) objectMap.get("videoRecorderHardDiskDetection");
|
|
|
+ IotDvrHardDiskDetectionLog videoRecorderHardDiskDetectionLog = (IotDvrHardDiskDetectionLog) objectMap.get("videoRecorderHardDiskDetectionLog");
|
|
|
this.saveOrUpdate(videoRecorderHardDiskDetection);
|
|
|
videoRecorderHardDiskDetectionLogService.saveOrUpdate(videoRecorderHardDiskDetectionLog);
|
|
|
}
|