From 142cf9dd702d360000699182fa830a09ab98fc5a Mon Sep 17 00:00:00 2001 From: luyie Date: Fri, 20 Sep 2024 11:59:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=A7=86=E9=A2=91=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=EF=BC=8C=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bigmodel/business/controller/VectorDataController.java | 10 ++++++++++ .../hnac/gglm/bigmodel/business/service/VectorDataService.java | 3 +++ .../bigmodel/business/service/impl/VectorDataServiceImpl.java | 6 ++++++ .../hnac/hzinfo/inspect/task/schedule/VideoTaskSchedule.java | 2 +- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/controller/VectorDataController.java b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/controller/VectorDataController.java index 0d4c8d1..05015e1 100644 --- a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/controller/VectorDataController.java +++ b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/controller/VectorDataController.java @@ -4,6 +4,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.gglm.bigmodel.business.service.VectorDataService; import com.hnac.gglm.bigmodel.business.vo.DeviceModelData; import com.hnac.hzinfo.api.annotation.ApiInterface; +import com.hnac.hzinfo.sdk.v5.device.dto.DeviceAttrInfoDTO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO; @@ -63,4 +64,13 @@ public class VectorDataController { public R> getModelData() { return R.data(vectorDataService.getModelData()); } + + + @GetMapping("/getDeviceAttr") + @ApiOperation(value = "获取模型数据") + @ApiOperationSupport(order = 4) + @ApiInterface + public R> getDeviceAttr( ) { + return R.data(vectorDataService.getDeviceAttr()); + } } diff --git a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/VectorDataService.java b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/VectorDataService.java index 0c20182..cf61e75 100644 --- a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/VectorDataService.java +++ b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/VectorDataService.java @@ -1,6 +1,7 @@ package com.hnac.gglm.bigmodel.business.service; import com.hnac.gglm.bigmodel.business.vo.DeviceModelData; +import com.hnac.hzinfo.sdk.v5.device.dto.DeviceAttrInfoDTO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO; @@ -20,4 +21,6 @@ public interface VectorDataService { List getModelEventData(); List getModelData(); + + List getDeviceAttr(); } diff --git a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/impl/VectorDataServiceImpl.java b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/impl/VectorDataServiceImpl.java index 574562f..157b810 100644 --- a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/impl/VectorDataServiceImpl.java +++ b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/service/impl/VectorDataServiceImpl.java @@ -2,6 +2,7 @@ package com.hnac.gglm.bigmodel.business.service.impl; import com.hnac.gglm.bigmodel.business.service.VectorDataService; import com.hnac.gglm.bigmodel.business.vo.DeviceModelData; +import com.hnac.hzinfo.sdk.v5.device.dto.DeviceAttrInfoDTO; import com.hnac.hzinfo.sdk.v5.model.ModelClient; import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO; @@ -61,4 +62,9 @@ public class VectorDataServiceImpl implements VectorDataService { } return modelDataList; } + + @Override + public List getDeviceAttr() { + return null; + } } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/schedule/VideoTaskSchedule.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/schedule/VideoTaskSchedule.java index bd13fb4..c408c71 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/schedule/VideoTaskSchedule.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/schedule/VideoTaskSchedule.java @@ -172,7 +172,7 @@ public class VideoTaskSchedule { record.setUpdateUser(task.getUpdateUser()); record.setCurrentStatus("1"); CameraInfoEntity camera = this.getCameraByProIdAndConId(project.getProjectId(), content.getContentId()); - log.info("【taskId:" + task.getId() + "】视频巡检任务执行,获取视频巡检结果,camera:" + Optional.of(camera).map(JsonUtil::toJson).orElse("null")); + log.info("【taskId:" + task.getId() + "】视频巡检任务执行,获取视频巡检结果,camera:" + Optional.ofNullable(camera).map(JsonUtil::toJson).orElse("null")); if (Func.isNotEmpty(camera)) { // 获取计划时间段内视频的告警信息设置是否异常 if (Func.isNotEmpty(camera.getEmCode())) {