飞行架次增加ai媒体数量
This commit is contained in:
parent
b61dbb1028
commit
305e40da0f
|
|
@ -11,93 +11,96 @@ import java.util.Date;
|
||||||
/**
|
/**
|
||||||
* 飞行架次参数
|
* 飞行架次参数
|
||||||
*
|
*
|
||||||
* @author Sdy
|
* @author Sdy
|
||||||
* @since 1.0.0 2026-05-02
|
* @since 1.0.0 2026-05-02
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Schema(name = "飞行架次参数")
|
@Schema(name = "飞行架次参数")
|
||||||
public class FlightTaskDTO implements Serializable {
|
public class FlightTaskDTO implements Serializable {
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Schema(description = "任务标识")
|
@Schema(description = "任务标识")
|
||||||
private String taskId;
|
private String taskId;
|
||||||
|
|
||||||
@Schema(description = "任务类型 (1航线飞行 2手动飞行 3定时飞行)")
|
@Schema(description = "任务类型 (1航线飞行 2手动飞行 3定时飞行)")
|
||||||
private Integer taskType;
|
private Integer taskType;
|
||||||
|
|
||||||
@Schema(description = "机库SN")
|
@Schema(description = "机库SN")
|
||||||
private String dockSn;
|
private String dockSn;
|
||||||
|
|
||||||
@Schema(description = "机库名称")
|
@Schema(description = "机库名称")
|
||||||
private String dockName;
|
private String dockName;
|
||||||
|
|
||||||
@Schema(description = "机库类型")
|
@Schema(description = "机库类型")
|
||||||
private String dockType;
|
private String dockType;
|
||||||
|
|
||||||
@Schema(description = "机库型号")
|
@Schema(description = "机库型号")
|
||||||
private String dockModel;
|
private String dockModel;
|
||||||
|
|
||||||
@Schema(description = "航线标识")
|
@Schema(description = "航线标识")
|
||||||
private Long routeId;
|
private Long routeId;
|
||||||
|
|
||||||
@Schema(description = "航线名称")
|
@Schema(description = "航线名称")
|
||||||
private String routeName;
|
private String routeName;
|
||||||
|
|
||||||
@Schema(description = "航线类型")
|
@Schema(description = "航线类型")
|
||||||
private String routeType;
|
private String routeType;
|
||||||
|
|
||||||
@Schema(description = "航线距离")
|
@Schema(description = "航线距离")
|
||||||
private Double routeDistance;
|
private Double routeDistance;
|
||||||
|
|
||||||
@Schema(description = "航点数量")
|
@Schema(description = "航点数量")
|
||||||
private Integer waypointNum;
|
private Integer waypointNum;
|
||||||
|
|
||||||
@Schema(description = "部门标识")
|
@Schema(description = "部门标识")
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
@Schema(description = "任务状态(0进行中、-1失败、1完成、2阻飞)")
|
@Schema(description = "任务状态(0进行中、-1失败、1完成、2阻飞)")
|
||||||
private Integer taskStatus;
|
private Integer taskStatus;
|
||||||
|
|
||||||
@Schema(description = "飞行距离")
|
@Schema(description = "飞行距离")
|
||||||
private Double flightDistance;
|
private Double flightDistance;
|
||||||
|
|
||||||
@Schema(description = "飞行时长(秒)")
|
@Schema(description = "飞行时长(秒)")
|
||||||
private Long flightDuration;
|
private Long flightDuration;
|
||||||
|
|
||||||
@Schema(description = "飞行时长")
|
@Schema(description = "飞行时长")
|
||||||
private String flightDurationText;
|
private String flightDurationText;
|
||||||
|
|
||||||
@Schema(description = "媒体数量")
|
@Schema(description = "媒体数量")
|
||||||
private Integer mediaNum;
|
private Integer mediaNum;
|
||||||
|
|
||||||
@Schema(description = "是否断点续飞")
|
@Schema(description = "是否断点续飞")
|
||||||
private Boolean isBreakpointFly;
|
private Boolean isBreakpointFly;
|
||||||
|
|
||||||
@Schema(description = "断点续飞最大时间")
|
@Schema(description = "断点续飞最大时间")
|
||||||
private String breakpointFlyMaxTime;
|
private String breakpointFlyMaxTime;
|
||||||
|
|
||||||
@Schema(description = "断点续飞最小时间")
|
@Schema(description = "断点续飞最小时间")
|
||||||
private String breakpointFlyMinTime;
|
private String breakpointFlyMinTime;
|
||||||
|
|
||||||
@Schema(description = "出库时间")
|
@Schema(description = "出库时间")
|
||||||
private Date outboundDate;
|
private Date outboundDate;
|
||||||
|
|
||||||
@Schema(description = "入库时间")
|
@Schema(description = "入库时间")
|
||||||
private Date inboundDate;
|
private Date inboundDate;
|
||||||
|
|
||||||
@Schema(description = "任务时间")
|
@Schema(description = "任务时间")
|
||||||
private Date createDate;
|
private Date createDate;
|
||||||
|
|
||||||
@Schema(description = "操作人")
|
@Schema(description = "操作人")
|
||||||
private Long creator;
|
private Long creator;
|
||||||
|
|
||||||
@Schema(description = "操作人名称")
|
@Schema(description = "操作人名称")
|
||||||
private String createName;
|
private String createName;
|
||||||
|
|
||||||
@Schema(description = "失败原因")
|
@Schema(description = "失败原因")
|
||||||
private String failureReason;
|
private String failureReason;
|
||||||
|
|
||||||
@Schema(description = "飞机SN")
|
@Schema(description = "飞机SN")
|
||||||
private String uavSn;
|
private String uavSn;
|
||||||
|
|
||||||
|
@Schema(description = "AI媒体数量")
|
||||||
|
private Integer aiMediaNum;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -126,4 +126,8 @@ public class FlightTaskEntity {
|
||||||
* 飞机SN
|
* 飞机SN
|
||||||
*/
|
*/
|
||||||
private String uavSn;
|
private String uavSn;
|
||||||
|
/**
|
||||||
|
* AI媒体数量
|
||||||
|
*/
|
||||||
|
private Integer aiMediaNum;
|
||||||
}
|
}
|
||||||
|
|
@ -49,4 +49,7 @@ public interface ZhiMouService {
|
||||||
|
|
||||||
//下载AI检测报告
|
//下载AI检测报告
|
||||||
byte[] downloadReport(DownloadReport downloadReport);
|
byte[] downloadReport(DownloadReport downloadReport);
|
||||||
|
|
||||||
|
//获取媒体数量
|
||||||
|
Integer getMediaCount(String taskId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ public class FlightTaskServiceImpl extends CrudServiceImpl<FlightTaskDao, Flight
|
||||||
private final SrsService srsService;
|
private final SrsService srsService;
|
||||||
private final ScheduleJobDao scheduleJobDao;
|
private final ScheduleJobDao scheduleJobDao;
|
||||||
private final SysUserService userService;
|
private final SysUserService userService;
|
||||||
|
private final ZhiMouService zhiMouService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public QueryWrapper<FlightTaskEntity> getWrapper(Map<String, Object> params) {
|
public QueryWrapper<FlightTaskEntity> getWrapper(Map<String, Object> params) {
|
||||||
|
|
@ -190,6 +191,11 @@ public class FlightTaskServiceImpl extends CrudServiceImpl<FlightTaskDao, Flight
|
||||||
Long count = mediaFileService.getDao().selectCount(new QueryWrapper<MediaFileEntity>()
|
Long count = mediaFileService.getDao().selectCount(new QueryWrapper<MediaFileEntity>()
|
||||||
.eq("task_id", taskId).eq("dock_sn", dockSn));
|
.eq("task_id", taskId).eq("dock_sn", dockSn));
|
||||||
entity.setMediaNum(count.intValue());
|
entity.setMediaNum(count.intValue());
|
||||||
|
|
||||||
|
//更新ai媒体数量
|
||||||
|
Integer mediaCount = zhiMouService.getMediaCount(taskId);
|
||||||
|
entity.setAiMediaNum(mediaCount);
|
||||||
|
|
||||||
updateById(entity);
|
updateById(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -469,6 +469,16 @@ public class ZhiMouServiceImpl implements ZhiMouService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getMediaCount(String taskId) {
|
||||||
|
try {
|
||||||
|
JSONObject record = getMessageRecord(taskId);
|
||||||
|
return record.getJSONArray("data").size();
|
||||||
|
} catch (Exception e) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private String replaceRtmpIpPort(String originalUrl, String newIp, String newPort) {
|
private String replaceRtmpIpPort(String originalUrl, String newIp, String newPort) {
|
||||||
// 定义RTMP URL的正则表达式模式
|
// 定义RTMP URL的正则表达式模式
|
||||||
Pattern pattern = Pattern.compile("^rtmp://([^/:]+):([^/]+)(/.*)$");
|
Pattern pattern = Pattern.compile("^rtmp://([^/:]+):([^/]+)(/.*)$");
|
||||||
|
|
|
||||||
|
|
@ -2346,4 +2346,9 @@ ALTER TABLE "public"."bus_maintenance"
|
||||||
-- Primary Key structure for table bus_maintenance_img
|
-- Primary Key structure for table bus_maintenance_img
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
ALTER TABLE "public"."bus_maintenance_img"
|
ALTER TABLE "public"."bus_maintenance_img"
|
||||||
ADD CONSTRAINT "bus_maintenance_img_pkey" PRIMARY KEY ("id");
|
ADD CONSTRAINT "bus_maintenance_img_pkey" PRIMARY KEY ("id");
|
||||||
|
|
||||||
|
ALTER TABLE public.bus_flight_task
|
||||||
|
ADD ai_media_num int4 NULL;
|
||||||
|
COMMENT
|
||||||
|
ON COLUMN public.bus_flight_task.ai_media_num IS 'ai媒体数量';
|
||||||
Loading…
Reference in New Issue