Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | |
| | | /** 经度 */ |
| | | @Excel(name = "经度") |
| | | private Long longitude; |
| | | private Double longitude; |
| | | |
| | | /** 纬度 */ |
| | | @Excel(name = "纬度") |
| | | private Long latitude; |
| | | private Double latitude; |
| | | |
| | | /** 高度 */ |
| | | @Excel(name = "高度") |
| | | private Long height; |
| | | private Double height; |
| | | |
| | | /** 比例 */ |
| | | @Excel(name = "比例") |
| | | private Long proportion; |
| | | private Double proportion; |
| | | |
| | | /** 模型路径 */ |
| | | @Excel(name = "模型路径") |
| | |
| | | |
| | | Conf conf = new Conf(); |
| | | conf.setSource(ardVtdu.getRtspSource()); |
| | | if(!"publisher".equalsIgnoreCase(conf.getSource())) { |
| | | conf.setSourceOnDemand(true); |
| | | } |
| | | conf.setRunOnDemandRestart(false); |
| | | conf.setRunOnDemandCloseAfter("5s"); |
| | | conf.setMaxReaders(100); |
| | |
| | | Conf conf = new Conf(); |
| | | conf.setSource(ardVtdu.getRtspSource()); |
| | | conf.setName(ardVtdu.getName()); |
| | | conf.setRunOnDemand(""); |
| | | if(!"publisher".equalsIgnoreCase(conf.getSource())) { |
| | | conf.setSourceOnDemand(true); |
| | | } |
| | | conf.setRunOnDemandRestart(false); |
| | | conf.setRunOnDemandCloseAfter("5s"); |
| | | conf.setMaxReaders(100); |
| | |
| | | @Excel(name = "服务器管理ID") |
| | | private String serverId; |
| | | |
| | | /** |
| | | * 盒子别名 |
| | | */ |
| | | @Excel(name = "盒子别名") |
| | | private String boxAliasName; |
| | | |
| | | /** |
| | | * 服务器实体对象 |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; // 任务结束时间 |
| | | private Long duration; // 持续时长(单位:秒) |
| | | private Integer flightDuration; // 飞行时长(单位:秒) |
| | | private Integer flightMileage; // 飞行里程 |
| | | private Float aveSpeed; // 平均速度 |
| | | private Float maxSpeed; // 最大速度 |
| | | private String serverId; // 服务器ID |
| | | |
| | | // 计算持续时长,单位:秒 |
| | |
| | | import com.ard.common.utils.DateUtils; |
| | | import com.ard.common.utils.uuid.IdUtils; |
| | | import com.ard.system.authorize.service.AuthorizeService; |
| | | import com.ard.work.domain.dto.BoxSettingsDTO; |
| | | import com.ard.work.domain.entity.ArdDroneInfo; |
| | | import com.ard.work.domain.receiver.BoxInfoReceiver; |
| | | import com.ard.work.domain.receiver.BoxStreamUrlReceiver; |
| | | import com.ard.work.mapper.ArdDroneInfoMapper; |
| | | import com.ard.work.service.IArdDroneInfoService; |
| | | import com.ard.work.service.ITyService; |
| | | import com.ard.work.util.UtilMethod; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | */ |
| | | @Override |
| | | public int updateArdDrone(ArdDroneInfo ArdDroneInfo) { |
| | | Boolean b = tyService.updateBoxSettings(BoxSettingsDTO.builder().boxSn(ArdDroneInfo.getBoxSn()).boxName(ArdDroneInfo.getBoxName()).build()); |
| | | if (!b) { |
| | | throw new ServiceException("修改无人机盒子名称失败"); |
| | | } |
| | | ArdDroneInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | return ArdDroneInfoMapper.updateArdDrone(ArdDroneInfo); |
| | | } |
| | |
| | | drone.setId(IdUtils.simpleUUID()); |
| | | drone.setBoxSn(box.getBoxSn()); |
| | | drone.setBoxName(box.getBoxName()); |
| | | drone.setBoxAliasName(box.getBoxName()); |
| | | drone.setStartTime(new Date()); |
| | | drone.setOnLine(box.getOnLine()); |
| | | drone.setVideoServer(box.getVideoServer()); |
| | |
| | | .serverId(serverId) |
| | | .startTime(DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, boxHistoryReceiver.getStartTime())) |
| | | .endTime(DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, boxHistoryReceiver.getEndTime())) |
| | | .flightMileage(boxHistoryReceiver.getFlightMileage()) |
| | | .flightDuration(boxHistoryReceiver.getFlightDuration()) |
| | | .aveSpeed(boxHistoryReceiver.getAveSpeed()) |
| | | .maxSpeed(boxHistoryReceiver.getMaxSpeed()) |
| | | .build(); |
| | | |
| | | Long flyUserId = uavControlService.getCurrentController(flightTask.getBoxSn(), "fly"); |
| | |
| | | throw new ControlException("未找到对应的飞行器信息,boxSn:{}" + boxSn); |
| | | } |
| | | TyHttpCommonReceiver<?> result = tyClient.updateBoxSettings(ardDroneInfo.getServerId(), boxSettingsDTO); |
| | | return result.getState() == 1; |
| | | return result.getState() == 0; |
| | | } |
| | | |
| | | /** |
| | |
| | | <result property="lastTaskId" column="last_task_id" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="deptId" column="dept_id" /> |
| | | <result property="boxAliasName" column="box_alias_name" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | |
| | | c.last_task_id, |
| | | c.server_id, |
| | | c.user_id, |
| | | c.dept_id, |
| | | c.box_alias_name |
| | | c.dept_id |
| | | from ard_drone c |
| | | left join sys_dept d on d.dept_id = c.dept_id |
| | | left join sys_user u on u.user_id = c.user_id |
| | |
| | | <if test="serverId != null">server_id,</if> |
| | | <if test="userId != null">user_id,</if> |
| | | <if test="deptId != null">dept_id,</if> |
| | | <if test="boxAliasName != null">box_alias_name,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | |
| | | <if test="serverId != null">#{serverId},</if> |
| | | <if test="userId != null">#{userId},</if> |
| | | <if test="deptId != null">#{deptId},</if> |
| | | <if test="boxAliasName != null">#{boxAliasName},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | |
| | | <if test="serverId != null">server_id = #{serverId},</if> |
| | | <if test="userId != null">user_id = #{userId},</if> |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | | <if test="boxAliasName != null">box_alias_name = #{boxAliasName},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | |
| | | server_id, |
| | | user_id, |
| | | dept_id, |
| | | box_alias_name, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | |
| | | #{item.serverId}, |
| | | #{item.userId}, |
| | | #{item.deptId}, |
| | | #{item.boxAliasName}, |
| | | #{item.createBy}, |
| | | #{item.createTime}, |
| | | #{item.updateBy}, |
| | |
| | | <result property="videoPath" column="video_path"/> |
| | | <result property="startTime" column="start_time"/> |
| | | <result property="endTime" column="end_time"/> |
| | | <result property="flightDuration" column="flight_duration"/> |
| | | <result property="flightMileage" column="flight_mileage"/> |
| | | <result property="aveSpeed" column="ave_speed"/> |
| | | <result property="maxSpeed" column="max_speed"/> |
| | | <result property="serverId" column="server_id"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | |
| | | aft.video_path, |
| | | aft.start_time, |
| | | aft.end_time, |
| | | aft.flight_duration, |
| | | aft.flight_mileage, |
| | | aft.ave_speed, |
| | | aft.max_speed, |
| | | aft.server_id, |
| | | aft.create_by, |
| | | aft.create_time, |
| | |
| | | <if test="videoPath != null">video_path,</if> |
| | | <if test="startTime != null">start_time,</if> |
| | | <if test="endTime != null">end_time,</if> |
| | | <if test="flightDuration != null">flight_duration,</if> |
| | | <if test="flightMileage != null">flight_mileage,</if> |
| | | <if test="aveSpeed != null">ave_speed,</if> |
| | | <if test="maxSpeed != null">max_speed,</if> |
| | | <if test="serverId != null">server_id,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | |
| | | <if test="videoPath != null">#{videoPath},</if> |
| | | <if test="startTime != null">#{startTime},</if> |
| | | <if test="endTime != null">#{endTime},</if> |
| | | <if test="flightDuration != null">#{flightDuration},</if> |
| | | <if test="flightMileage != null">#{flightMileage},</if> |
| | | <if test="aveSpeed != null">#{aveSpeed},</if> |
| | | <if test="maxSpeed != null">#{maxSpeed},</if> |
| | | <if test="serverId != null">#{serverId},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | |
| | | <if test="videoPath != null">video_path = #{videoPath},</if> |
| | | <if test="startTime != null">start_time = #{startTime},</if> |
| | | <if test="endTime != null">end_time = #{endTime},</if> |
| | | <if test="flightDuration != null">flight_duration = #{flightDuration},</if> |
| | | <if test="flightMileage != null">flight_mileage = #{flightMileage},</if> |
| | | <if test="aveSpeed != null">ave_speed = #{aveSpeed},</if> |
| | | <if test="maxSpeed != null">max_speed = #{maxSpeed},</if> |
| | | <if test="serverId != null">server_id = #{serverId},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |