| | |
| | | import com.ruoyi.device.camera.domain.CameraCmd; |
| | | import com.ruoyi.device.camera.service.IArdCamerasService; |
| | | import com.ruoyi.device.hiksdk.service.IHikClientService; |
| | | import com.ruoyi.inspect.domain.ArdVideoInspectRecord; |
| | | import com.ruoyi.inspect.domain.ArdVideoInspectTask; |
| | | import com.ruoyi.inspect.domain.ArdVideoInspectTaskStep; |
| | | import com.ruoyi.inspect.service.IArdVideoInspectRecordService; |
| | | import com.ruoyi.inspect.service.IArdVideoInspectTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | IArdVideoInspectTaskService ardVideoInspectTaskService; |
| | | @Resource |
| | | IArdAlarmpointsWellService ardAlarmpointsWellService; |
| | | |
| | | @Resource |
| | | IArdVideoInspectRecordService ardVideoInspectRecordService; |
| | | @Resource |
| | | IArdCamerasService ardCamerasService; |
| | | @Resource |
| | |
| | | .map(ArdVideoInspectTaskStep::getRecordingTime) |
| | | .findFirst(); |
| | | if (recordingTime.isPresent()) { |
| | | System.out.println("找到了匹配的对象,名称为: " + recordingTime.get()); |
| | | System.out.println("找到了匹配的recordingTime: " + recordingTime.get()); |
| | | /*获取到当前步骤的持续时间*/ |
| | | Date currentStepStartDate = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, currentStepStartTime); |
| | | Date currentStepStopDate = DateUtils.addMinutes(currentStepStartDate,recordingTime.get()); |
| | |
| | | cmd.setEnable(false);//停止录像 |
| | | String record = hikClientService.record(cmd); |
| | | /*更新巡检记录*/ |
| | | |
| | | ArdVideoInspectRecord ardVideoInspectRecord=new ArdVideoInspectRecord(); |
| | | ardVideoInspectRecord.setStepId(currentStepId); |
| | | 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(record); |
| | | ardVideoInspectRecordService.insertArdVideoInspectRecord(ardVideoInspectRecord); |
| | | log.info(record); |
| | | } |
| | | } else { |
| | | System.out.println("未找到匹配的对象"); |
| | | System.out.println("未找到匹配的recordingTime"); |
| | | } |
| | | |
| | | } |