ard-admin/src/main/java/com/ard/web/controller/work/UavCameraController.java
@@ -24,6 +24,13 @@ @Resource private ITyService tyService; @ApiOperation(value = "设置相机模式", notes = "actionParam值:1-拍照,2-录像") @ApiOperationSupport(order = 1) @PostMapping("/updateCameraMode") public AjaxResult updateCameraMode(@RequestBody CameraModeDTO cameraModeDTO) { tyService.updateCameraMode(cameraModeDTO); return AjaxResult.success(); } @ApiOperation("拍照") @ApiOperationSupport(order = 1) ard-work/src/main/java/com/ard/work/service/impl/TyServiceImpl.java
@@ -336,9 +336,10 @@ throw new ControlException("未找到对应的飞行器信息,boxSn:{}" + boxSn); } //设置相机模式为拍照模式 updateCameraMode(CameraModeDTO.builder().boxSn(capturePicDto.getBoxSn()).actionParam((byte) 0x01).build()); //updateCameraMode(CameraModeDTO.builder().boxSn(capturePicDto.getBoxSn()).actionParam((byte) 0x01).build()); //设置拍照回传 photoReturnToggle(PhotoReturnToggleDTO.builder().boxSn(capturePicDto.getBoxSn()).actionParam((byte) 0x01).build()); //photoReturnToggle(PhotoReturnToggleDTO.builder().boxSn(capturePicDto.getBoxSn()).actionParam((byte) 0x01) // .build()); CapturePicCmd capturePicCommand = new CapturePicCmd(capturePicDto); this.sendMessage(ardDroneInfo.getServerId(), capturePicCommand); @@ -358,7 +359,7 @@ } BaseCmd baseCmd; if (recordDto.getIsRecord()) { updateCameraMode(CameraModeDTO.builder().boxSn(recordDto.getBoxSn()).actionParam((byte) 0x02).build()); //updateCameraMode(CameraModeDTO.builder().boxSn(recordDto.getBoxSn()).actionParam((byte) 0x02).build()); baseCmd = new RecordStartCmd(recordDto); } else { baseCmd = new RecordStopCmd(recordDto); ard-work/src/main/resources/mapper/ArdFlightTaskPartMapper.xml
@@ -15,14 +15,17 @@ <select id="selectByTaskStartTime" resultType="ArdFlightTaskPart"> SELECT * FROM ard_flight_task_part u WHERE u.box_sn = #{boxSn} <if test="params.beginTime != null"><!-- 开始时间检索 --> <where> u.box_sn = #{boxSn} <if test="params.beginTime != null"> AND u.create_time >= #{params.beginTime} </if> <if test="params.endTime != null"><!-- 结束时间检索 --> <if test="params.endTime != null"> AND u.create_time <= #{params.endTime} </if> ORDER BY u.create_time asc </where> ORDER BY u.create_time ASC </select> </mapper>