From 740f379847e21878429b7cb48bebfa9d2b72ab94 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期三, 20 九月 2023 11:38:57 +0800
Subject: [PATCH] 设备健康列表
---
ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java b/ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java
index a13a827..4ad799a 100644
--- a/ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java
@@ -1,8 +1,6 @@
package com.ruoyi.inspect.service.impl;
-import java.text.SimpleDateFormat;
import java.util.*;
-
import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell;
import com.ruoyi.alarmpoints.well.mapper.ArdAlarmpointsWellMapper;
import com.ruoyi.common.utils.DateUtils;
@@ -10,7 +8,6 @@
import com.ruoyi.device.camera.domain.ArdCameras;
import com.ruoyi.device.camera.domain.CameraCmd;
import com.ruoyi.device.camera.mapper.ArdCamerasMapper;
-import com.ruoyi.device.hiksdk.config.MinioClientSingleton;
import com.ruoyi.device.hiksdk.service.IHikClientService;
import com.ruoyi.inspect.domain.ArdVideoInspectRecord;
import com.ruoyi.inspect.mapper.ArdVideoInspectRecordMapper;
@@ -24,7 +21,6 @@
import com.ruoyi.inspect.mapper.ArdVideoInspectTaskMapper;
import com.ruoyi.inspect.domain.ArdVideoInspectTask;
import com.ruoyi.inspect.service.IArdVideoInspectTaskService;
-
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
@@ -35,7 +31,7 @@
* @date 2023-05-30
*/
@Service
-@Slf4j(topic = "PatrolInspectionTask")
+@Slf4j(topic = "patrolInspectionTask")
public class ArdVideoInspectTaskServiceImpl implements IArdVideoInspectTaskService {
@Resource
private ArdVideoInspectTaskMapper ardVideoInspectTaskMapper;
@@ -97,6 +93,7 @@
@Transactional
@Override
public int insertArdVideoInspectTask(ArdVideoInspectTask ardVideoInspectTask) {
+ ardVideoInspectTask.setId(IdUtils.simpleUUID());
ardVideoInspectTask.setCreateBy(SecurityUtils.getUsername());
ardVideoInspectTask.setCreateTime(DateUtils.getNowDate());
ardVideoInspectTask.setUserId(SecurityUtils.getUserId());
@@ -417,7 +414,7 @@
try {
String currentStepId = ardVideoInspectTask.getCurrentStepId();
if (StringUtils.isNull(currentStepId)) {
- log.info("褰撳墠寮�濮嬪贰妫�姝ラid涓虹┖");
+ log.debug("褰撳墠寮�濮嬪贰妫�姝ラid涓虹┖");
return;
}
log.debug("宸℃姝ラ锛�" + currentStepId + "灏濊瘯寮�濮�");
@@ -442,6 +439,11 @@
targetPositon[2] = ardAlarmpointsWell.getAltitude();
/*鑾峰彇鐩告満鍧愭爣*/
ArdCameras cameras = ardCamerasMapper.selectArdCamerasById(cameraId);
+ if(StringUtils.isNull(cameras))
+ {
+ log.debug("鎵句笉鍒扮浉鏈�:"+cameraId);
+ return;
+ }
double[] cameraPositon = new double[3];
cameraPositon[0] = cameras.getLongitude();
cameraPositon[1] = cameras.getLatitude();
@@ -449,7 +451,7 @@
/*鎺у埗鐩告満宸℃*/
CameraCmd cmd = new CameraCmd();
cmd.setCameraId(cameraId);
- cmd.setChannelNum(channel);
+ cmd.setChanNo(channel);
cmd.setTargetPosition(targetPositon);
cmd.setOperator("sys_patrol_inspect");
cmd.setExpired(step.getRecordingTime() * 60);
@@ -474,7 +476,7 @@
try {
String currentStepId = ardVideoInspectTask.getCurrentStepId();
if (StringUtils.isNull(currentStepId)) {
- log.info("褰撳墠寮�濮嬪贰妫�姝ラid涓虹┖");
+ log.debug("褰撳墠寮�濮嬪贰妫�姝ラid涓虹┖");
return;
}
log.debug("宸℃姝e父锛屽皾璇曞紩瀵硷細" + currentStepId);
@@ -495,6 +497,11 @@
targetPositon[2] = ardAlarmpointsWell.getAltitude();
/*鑾峰彇鐩告満鍧愭爣*/
ArdCameras cameras = ardCamerasMapper.selectArdCamerasById(cameraId);
+ if(StringUtils.isNull(cameras))
+ {
+ log.debug("鎵句笉鍒扮浉鏈�:"+cameraId);
+ return;
+ }
double[] cameraPositon = new double[3];
cameraPositon[0] = cameras.getLongitude();
cameraPositon[1] = cameras.getLatitude();
@@ -502,7 +509,7 @@
/*鎺у埗鐩告満宸℃*/
CameraCmd cmd = new CameraCmd();
cmd.setCameraId(cameraId);
- cmd.setChannelNum(channel);
+ cmd.setChanNo(channel);
cmd.setTargetPosition(targetPositon);
cmd.setOperator("sys_patrol_inspect");
cmd.setExpired(step.getRecordingTime() * 60);
@@ -541,7 +548,7 @@
/*鍋滄褰曞儚*/
CameraCmd cmd = new CameraCmd();
cmd.setCameraId(cameraId);
- cmd.setChannelNum(channel);
+ cmd.setChanNo(channel);
cmd.setOperator("sys_patrol_inspect");
cmd.setRecordBucketName("record");
cmd.setRecordObjectName("inspect_" + IdUtils.fastSimpleUUID());
--
Gitblit v1.9.3