| | |
| | | String wellId = step.getWellId();
|
| | | if (!StringUtils.isNull(wellId)) {
|
| | | /*获取井坐标*/
|
| | | ArdAlarmpointsWell ardAlarmpointsWell = ardAlarmpointsWellMapper.selectArdAlarmpointsWellById(wellId);
|
| | | ArdAlarmpointsWell well = ardAlarmpointsWellMapper.selectArdAlarmpointsWellById(wellId);
|
| | | double[] targetPositon = new double[3];
|
| | | targetPositon[0] = ardAlarmpointsWell.getLongitude();
|
| | | targetPositon[1] = ardAlarmpointsWell.getLatitude();
|
| | | targetPositon[2] = ardAlarmpointsWell.getAltitude();
|
| | | targetPositon[0] = well.getLongitude();
|
| | | targetPositon[1] = well.getLatitude();
|
| | | targetPositon[2] = well.getAltitude();
|
| | | /*获取相机坐标*/
|
| | | ArdCameras cameras = ardCamerasMapper.selectArdCamerasById(cameraId);
|
| | | if (StringUtils.isNull(cameras)) {
|
| | |
| | | cmd.setTargetPosition(targetPositon);
|
| | | cmd.setOperator("sys_patrol_inspect");
|
| | | cmd.setExpired(step.getRecordingTime() * 60);
|
| | | Map<String, Double> ptzMap = new HashMap<>();
|
| | | ptzMap.put("p", ardAlarmpointsWell.getGuideP());
|
| | | ptzMap.put("t", ardAlarmpointsWell.getGuideT());
|
| | | ptzMap.put("z", ardAlarmpointsWell.getGuideZ());
|
| | | cmd.setPtzMap(ptzMap);
|
| | | boolean setTargetPosition;
|
| | | if (cmd.getPtzMap().get("p") != null) {
|
| | | setTargetPosition = cameraSdkService.setPtz(cmd);
|
| | | } else {
|
| | | setTargetPosition = cameraSdkService.guideTargetPosition(cmd);
|
| | | }
|
| | |
|
| | | boolean setTargetPosition = cameraSdkService.guideTargetPosition(cmd);
|
| | | if (setTargetPosition) {
|
| | | /*控制相机巡检成功,开始录像*/
|
| | | cameraSdkService.recordStart(cmd);
|
| | |
| | | String wellId = step.getWellId();
|
| | | if (!StringUtils.isNull(wellId)) {
|
| | | /*获取井坐标*/
|
| | | ArdAlarmpointsWell ardAlarmpointsWell = ardAlarmpointsWellMapper.selectArdAlarmpointsWellById(wellId);
|
| | | ArdAlarmpointsWell well = ardAlarmpointsWellMapper.selectArdAlarmpointsWellById(wellId);
|
| | | double[] targetPositon = new double[3];
|
| | | targetPositon[0] = ardAlarmpointsWell.getLongitude();
|
| | | targetPositon[1] = ardAlarmpointsWell.getLatitude();
|
| | | targetPositon[2] = ardAlarmpointsWell.getAltitude();
|
| | | targetPositon[0] = well.getLongitude();
|
| | | targetPositon[1] = well.getLatitude();
|
| | | targetPositon[2] = well.getAltitude();
|
| | | /*获取相机坐标*/
|
| | | ArdCameras cameras = ardCamerasMapper.selectArdCamerasById(cameraId);
|
| | | if (StringUtils.isNull(cameras)) {
|
| | |
| | | cmd.setTargetPosition(targetPositon);
|
| | | cmd.setOperator("sys_patrol_inspect");
|
| | | cmd.setExpired(step.getRecordingTime() * 60);
|
| | | Map<String, Double> ptzMap = new HashMap<>();
|
| | | ptzMap.put("p", ardAlarmpointsWell.getGuideP());
|
| | | ptzMap.put("t", ardAlarmpointsWell.getGuideT());
|
| | | ptzMap.put("z", ardAlarmpointsWell.getGuideZ());
|
| | | cmd.setPtzMap(ptzMap);
|
| | | boolean setTargetPosition;
|
| | | if (cmd.getPtzMap().get("p") != null) {
|
| | | setTargetPosition = cameraSdkService.setPtz(cmd);
|
| | | } else {
|
| | | setTargetPosition = cameraSdkService.guideTargetPosition(cmd);
|
| | | }
|
| | | boolean setTargetPosition = cameraSdkService.guideTargetPosition(cmd);
|
| | | if (!setTargetPosition) {
|
| | | /*控制失败,当前步骤启动时间置null*/
|
| | | ardVideoInspectTask.setCurrentStepStartTime("");
|
| | |
| | | cmd.setChanNo(channel);
|
| | | cmd.setOperator("sys_patrol_inspect");
|
| | | cmd.setRecordBucketName("record");
|
| | | cmd.setRecordObjectName("inspect_" + IdUtils.fastSimpleUUID());
|
| | | cmd.setRecordObjectName("inspectGuide/" + DateUtils.getDateYYYYMMDD()+"/"+ IdUtils.fastSimpleUUID());
|
| | | String url = cameraSdkService.recordStopToMinio(cmd);
|
| | | /*插入巡检记录*/
|
| | | ArdVideoInspectRecord ardVideoInspectRecord = new ArdVideoInspectRecord();
|