|
|
@@ -24,6 +24,7 @@ import com.xunmei.system.api.domain.SysOrg;
|
|
|
import com.xunmei.system.api.dto.protection.ReceiveErrorDto;
|
|
|
import com.xunmei.system.api.dto.protection.VideoRecorderHardDiskDetectionEditDto;
|
|
|
import com.xunmei.system.api.enums.AlarmStatus;
|
|
|
+import com.xunmei.system.api.util.LogUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -183,12 +184,18 @@ public class IotDvrHardDiskDetectionServiceImpl extends ServiceImpl<IotDvrHardDi
|
|
|
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public void saveDataInfo(Map<String, Object> objectMap, VideoRecorderHardDiskDetectionEditDto videoRecorderHardDiskDetectionEditDto) {
|
|
|
IotDvrHardDiskDetection videoRecorderHardDiskDetection = (IotDvrHardDiskDetection) objectMap.get("videoRecorderHardDiskDetection");
|
|
|
IotDvrHardDiskDetectionLog videoRecorderHardDiskDetectionLog = (IotDvrHardDiskDetectionLog) objectMap.get("videoRecorderHardDiskDetectionLog");
|
|
|
this.saveOrUpdate(videoRecorderHardDiskDetection);
|
|
|
videoRecorderHardDiskDetectionLogService.saveOrUpdate(videoRecorderHardDiskDetectionLog);
|
|
|
- iotDvrDiskService.updateStatusByDiskDetection(videoRecorderHardDiskDetection);
|
|
|
+ try {
|
|
|
+ iotDvrDiskService.updateStatusByDiskDetection(videoRecorderHardDiskDetection);
|
|
|
+ } catch (Exception e) {
|
|
|
+ LogUtils.STATUS_INFO_DISKS.error("硬盘检测处理处理磁盘状态时发生异常!内容:{}",e.getMessage());
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
|
|
|
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() {
|
|
|
@Override
|