|
@@ -1052,14 +1052,14 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
// 找出未记录日志的设备
|
|
// 找出未记录日志的设备
|
|
Set<String> inactiveCameraCodes = new HashSet<>(allCameraCodes);
|
|
Set<String> inactiveCameraCodes = new HashSet<>(allCameraCodes);
|
|
inactiveCameraCodes.removeAll(loggedCameraCodes);
|
|
inactiveCameraCodes.removeAll(loggedCameraCodes);
|
|
|
|
+ // 保存设备状态变更记录
|
|
|
|
+ saveDeviceResume(loggedCameraCodes, 1);
|
|
|
|
+ saveDeviceResume(inactiveCameraCodes, 2);
|
|
|
|
|
|
// 更新设备状态
|
|
// 更新设备状态
|
|
updateDeviceStatus(loggedCameraCodes, 1); // 启用设备
|
|
updateDeviceStatus(loggedCameraCodes, 1); // 启用设备
|
|
updateDeviceStatus(inactiveCameraCodes, 2); // 禁用设备
|
|
updateDeviceStatus(inactiveCameraCodes, 2); // 禁用设备
|
|
|
|
|
|
- // 保存设备状态变更记录
|
|
|
|
- saveDeviceResume(loggedCameraCodes, 1);
|
|
|
|
- saveDeviceResume(inactiveCameraCodes, 2);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// 辅助方法:更新设备状态
|
|
// 辅助方法:更新设备状态
|
|
@@ -1084,6 +1084,9 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
BaseDeviceDynamicManagement deviceDynamicManagement = baseDeviceDynamicManagementService.getOne(
|
|
BaseDeviceDynamicManagement deviceDynamicManagement = baseDeviceDynamicManagementService.getOne(
|
|
new LambdaQueryWrapper<BaseDeviceDynamicManagement>()
|
|
new LambdaQueryWrapper<BaseDeviceDynamicManagement>()
|
|
.eq(BaseDeviceDynamicManagement::getCameraCode, cameraCode));
|
|
.eq(BaseDeviceDynamicManagement::getCameraCode, cameraCode));
|
|
|
|
+ BaseDeviceResume deviceResume = baseDeviceResumeService.getOne(
|
|
|
|
+ new LambdaQueryWrapper<BaseDeviceResume>()
|
|
|
|
+ .eq(BaseDeviceResume::getCameraCode, cameraCode));
|
|
|
|
|
|
boolean shouldDisable = (status == 1) || (deviceDynamicManagement != null && (status == 2 && deviceDynamicManagement.getIsDisable().equals(1)));
|
|
boolean shouldDisable = (status == 1) || (deviceDynamicManagement != null && (status == 2 && deviceDynamicManagement.getIsDisable().equals(1)));
|
|
|
|
|
|
@@ -1091,7 +1094,7 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
resume.setCameraCode(cameraCode);
|
|
resume.setCameraCode(cameraCode);
|
|
resume.setIsDisable(status);
|
|
resume.setIsDisable(status);
|
|
|
|
|
|
- if (shouldDisable) {
|
|
|
|
|
|
+ if (shouldDisable||ObjectUtils.isEmpty(deviceResume)) {
|
|
resumes.add(resume);
|
|
resumes.add(resume);
|
|
}
|
|
}
|
|
}
|
|
}
|