‘liusuyi’
2024-03-09 bfebb3257d57c7b1906a09ac3b76af1bc9e62d25
ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java
@@ -465,7 +465,7 @@
                    cmd.setChanNo(channel);
                    cmd.setTargetPosition(targetPositon);
                    cmd.setOperator("sys_patrol_inspect");
                    cmd.setExpired(step.getRecordingTime() * 60);
                    cmd.setExpired(step.getRecordingTime());//秒为单位
                    boolean setTargetPosition = cameraSdkService.guideTargetPosition(cmd);
                    if (setTargetPosition) {
                        /*控制相机巡检成功,开始录像*/
@@ -502,10 +502,10 @@
                if (!StringUtils.isNull(wellId)) {
                    /*获取井坐标*/
                    ArdAlarmpointsWell well = ardAlarmpointsWellMapper.selectArdAlarmpointsWellById(wellId);
                    double[] targetPositon = new double[3];
                    double[] targetPositon = new double[2];
                    targetPositon[0] = well.getLongitude();
                    targetPositon[1] = well.getLatitude();
                    targetPositon[2] = well.getAltitude();
                    //targetPositon[2] = well.getAltitude();
                    /*获取相机坐标*/
                    ArdCameras cameras = ardCamerasMapper.selectArdCamerasById(cameraId);
                    if (StringUtils.isNull(cameras)) {
@@ -522,7 +522,7 @@
                    cmd.setChanNo(channel);
                    cmd.setTargetPosition(targetPositon);
                    cmd.setOperator("sys_patrol_inspect");
                    cmd.setExpired(step.getRecordingTime() * 60);
                    cmd.setExpired(step.getRecordingTime());//秒为单位
                    boolean setTargetPosition = cameraSdkService.guideTargetPosition(cmd);
                    if (!setTargetPosition) {
                        /*控制失败,当前步骤启动时间置null*/
@@ -572,7 +572,7 @@
                    ardVideoInspectRecord.setWellName(ardAlarmpointsWell.getWellId());
                }
                Date currentStepStartDate = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, currentStepStartTime);
                Date currentStepStopDate = DateUtils.addMinutes(currentStepStartDate, step.getRecordingTime());
                Date currentStepStopDate = DateUtils.addSeconds(currentStepStartDate, step.getRecordingTime());
                ardVideoInspectRecord.setStartTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, currentStepStartDate));
                ardVideoInspectRecord.setEndTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, currentStepStopDate));
                ardVideoInspectRecord.setRecordFilePath(url);
@@ -598,7 +598,7 @@
                ArdVideoInspectTaskStep currentStep = objectOptional.get();
                /*获取到当前步骤的开始和结束时间*/
                Date currentStepStartDate = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, currentStepStartTime);
                Date currentStepStopDate = DateUtils.addMinutes(currentStepStartDate, currentStep.getRecordingTime());
                Date currentStepStopDate = DateUtils.addSeconds(currentStepStartDate, currentStep.getRecordingTime());
                /*判断当前步骤时间是否过期*/
                if (!DateUtils.TimeCompare(currentStepStartDate, currentStepStopDate)) {
                    return true;