|
|
@@ -24,6 +24,7 @@ import com.xunmei.mediator.util.CheckDataUtil;
|
|
|
import com.xunmei.mediator.websocket.constant.WebSocketConstants;
|
|
|
import com.xunmei.mediator.websocket.dto.WebsocketExecuteReq;
|
|
|
import com.xunmei.common.core.enums.iot.DeviceTypeEnum;
|
|
|
+import com.xunmei.mediator.websocket.dto.WebsocketResult;
|
|
|
import com.xunmei.mediator.websocket.enums.ProductEnums;
|
|
|
import com.xunmei.mediator.websocket.service.RouterService;
|
|
|
import com.xunmei.system.api.RemoteOrgService;
|
|
|
@@ -69,6 +70,7 @@ public class IotDvrHardDiskDetectionServiceImpl extends ServiceImpl<IotDvrHardDi
|
|
|
IotServerInfoService iotServerInfoService;
|
|
|
@Resource
|
|
|
IIotDeviceInfoService iotDeviceInfoService;
|
|
|
+
|
|
|
@Override
|
|
|
public ProductEnums product() {
|
|
|
return ProductEnums.DVS;
|
|
|
@@ -91,6 +93,11 @@ public class IotDvrHardDiskDetectionServiceImpl extends ServiceImpl<IotDvrHardDi
|
|
|
dto.setEquipmentCode(recorderHardDiskDetectionReq.getDvsCode());
|
|
|
dto.setCheckStatus(recorderHardDiskDetectionReq.getCheckStatus());
|
|
|
dto.setCheckTime(recorderHardDiskDetectionReq.getCheckTime());
|
|
|
+ List<Map<String, Object>> maps = new ArrayList<>();
|
|
|
+ /*for (JSONObject object : recorderHardDiskDetectionReq.getDetailInfo()) {
|
|
|
+ Map javaObject = object.toJavaObject(Map.class);
|
|
|
+ maps.add(javaObject);
|
|
|
+ }*/
|
|
|
dto.setDetailInfo(recorderHardDiskDetectionReq.getDetailInfo());
|
|
|
|
|
|
String token = req.getToken();
|
|
|
@@ -99,8 +106,8 @@ public class IotDvrHardDiskDetectionServiceImpl extends ServiceImpl<IotDvrHardDi
|
|
|
dto.setToken(token);
|
|
|
dto.setDeviceName(req.getDeviceName());
|
|
|
dto.setProductName(req.getProductName());
|
|
|
-
|
|
|
- return saveData(dto, req.getId());
|
|
|
+ WebsocketResult result = WebsocketResult.of(saveData(dto, req.getId()), req.getTopic(), req.getId());
|
|
|
+ return result;
|
|
|
} catch (IllegalAccessException e) {
|
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
|
@@ -246,7 +253,7 @@ public class IotDvrHardDiskDetectionServiceImpl extends ServiceImpl<IotDvrHardDi
|
|
|
LogUtils.STATUS_INFO_DISKS.info("硬盘检测上报状态消息,开始处理对应盘符状态.....");
|
|
|
iotDvrDiskService.updateStatusByDiskDetection(videoRecorderHardDiskDetection, videoRecorderHardDiskDetectionEditDto.getToken());
|
|
|
} catch (Exception e) {
|
|
|
- LogUtils.STATUS_INFO_DISKS.info("硬盘检测处理处理对应盘符状态时发生异常!内容:{}",e.getMessage());
|
|
|
+ LogUtils.STATUS_INFO_DISKS.info("硬盘检测处理处理对应盘符状态时发生异常!内容:{}", e.getMessage());
|
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
|
|