飞行架次增加ai媒体数量
This commit is contained in:
parent
b61dbb1028
commit
305e40da0f
|
|
@ -18,86 +18,89 @@ import java.util.Date;
|
|||
@Schema(name = "飞行架次参数")
|
||||
public class FlightTaskDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "任务标识")
|
||||
private String taskId;
|
||||
@Schema(description = "任务标识")
|
||||
private String taskId;
|
||||
|
||||
@Schema(description = "任务类型 (1航线飞行 2手动飞行 3定时飞行)")
|
||||
private Integer taskType;
|
||||
@Schema(description = "任务类型 (1航线飞行 2手动飞行 3定时飞行)")
|
||||
private Integer taskType;
|
||||
|
||||
@Schema(description = "机库SN")
|
||||
private String dockSn;
|
||||
@Schema(description = "机库SN")
|
||||
private String dockSn;
|
||||
|
||||
@Schema(description = "机库名称")
|
||||
private String dockName;
|
||||
@Schema(description = "机库名称")
|
||||
private String dockName;
|
||||
|
||||
@Schema(description = "机库类型")
|
||||
private String dockType;
|
||||
@Schema(description = "机库类型")
|
||||
private String dockType;
|
||||
|
||||
@Schema(description = "机库型号")
|
||||
private String dockModel;
|
||||
@Schema(description = "机库型号")
|
||||
private String dockModel;
|
||||
|
||||
@Schema(description = "航线标识")
|
||||
private Long routeId;
|
||||
@Schema(description = "航线标识")
|
||||
private Long routeId;
|
||||
|
||||
@Schema(description = "航线名称")
|
||||
private String routeName;
|
||||
@Schema(description = "航线名称")
|
||||
private String routeName;
|
||||
|
||||
@Schema(description = "航线类型")
|
||||
private String routeType;
|
||||
@Schema(description = "航线类型")
|
||||
private String routeType;
|
||||
|
||||
@Schema(description = "航线距离")
|
||||
private Double routeDistance;
|
||||
@Schema(description = "航线距离")
|
||||
private Double routeDistance;
|
||||
|
||||
@Schema(description = "航点数量")
|
||||
private Integer waypointNum;
|
||||
@Schema(description = "航点数量")
|
||||
private Integer waypointNum;
|
||||
|
||||
@Schema(description = "部门标识")
|
||||
private Long deptId;
|
||||
@Schema(description = "部门标识")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "任务状态(0进行中、-1失败、1完成、2阻飞)")
|
||||
private Integer taskStatus;
|
||||
@Schema(description = "任务状态(0进行中、-1失败、1完成、2阻飞)")
|
||||
private Integer taskStatus;
|
||||
|
||||
@Schema(description = "飞行距离")
|
||||
private Double flightDistance;
|
||||
@Schema(description = "飞行距离")
|
||||
private Double flightDistance;
|
||||
|
||||
@Schema(description = "飞行时长(秒)")
|
||||
private Long flightDuration;
|
||||
@Schema(description = "飞行时长(秒)")
|
||||
private Long flightDuration;
|
||||
|
||||
@Schema(description = "飞行时长")
|
||||
private String flightDurationText;
|
||||
@Schema(description = "飞行时长")
|
||||
private String flightDurationText;
|
||||
|
||||
@Schema(description = "媒体数量")
|
||||
private Integer mediaNum;
|
||||
@Schema(description = "媒体数量")
|
||||
private Integer mediaNum;
|
||||
|
||||
@Schema(description = "是否断点续飞")
|
||||
private Boolean isBreakpointFly;
|
||||
@Schema(description = "是否断点续飞")
|
||||
private Boolean isBreakpointFly;
|
||||
|
||||
@Schema(description = "断点续飞最大时间")
|
||||
private String breakpointFlyMaxTime;
|
||||
@Schema(description = "断点续飞最大时间")
|
||||
private String breakpointFlyMaxTime;
|
||||
|
||||
@Schema(description = "断点续飞最小时间")
|
||||
private String breakpointFlyMinTime;
|
||||
@Schema(description = "断点续飞最小时间")
|
||||
private String breakpointFlyMinTime;
|
||||
|
||||
@Schema(description = "出库时间")
|
||||
private Date outboundDate;
|
||||
@Schema(description = "出库时间")
|
||||
private Date outboundDate;
|
||||
|
||||
@Schema(description = "入库时间")
|
||||
private Date inboundDate;
|
||||
@Schema(description = "入库时间")
|
||||
private Date inboundDate;
|
||||
|
||||
@Schema(description = "任务时间")
|
||||
private Date createDate;
|
||||
@Schema(description = "任务时间")
|
||||
private Date createDate;
|
||||
|
||||
@Schema(description = "操作人")
|
||||
private Long creator;
|
||||
@Schema(description = "操作人")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "操作人名称")
|
||||
private String createName;
|
||||
@Schema(description = "操作人名称")
|
||||
private String createName;
|
||||
|
||||
@Schema(description = "失败原因")
|
||||
private String failureReason;
|
||||
@Schema(description = "失败原因")
|
||||
private String failureReason;
|
||||
|
||||
@Schema(description = "飞机SN")
|
||||
private String uavSn;
|
||||
@Schema(description = "飞机SN")
|
||||
private String uavSn;
|
||||
|
||||
@Schema(description = "AI媒体数量")
|
||||
private Integer aiMediaNum;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,4 +126,8 @@ public class FlightTaskEntity {
|
|||
* 飞机SN
|
||||
*/
|
||||
private String uavSn;
|
||||
/**
|
||||
* AI媒体数量
|
||||
*/
|
||||
private Integer aiMediaNum;
|
||||
}
|
||||
|
|
@ -49,4 +49,7 @@ public interface ZhiMouService {
|
|||
|
||||
//下载AI检测报告
|
||||
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 ScheduleJobDao scheduleJobDao;
|
||||
private final SysUserService userService;
|
||||
private final ZhiMouService zhiMouService;
|
||||
|
||||
@Override
|
||||
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>()
|
||||
.eq("task_id", taskId).eq("dock_sn", dockSn));
|
||||
entity.setMediaNum(count.intValue());
|
||||
|
||||
//更新ai媒体数量
|
||||
Integer mediaCount = zhiMouService.getMediaCount(taskId);
|
||||
entity.setAiMediaNum(mediaCount);
|
||||
|
||||
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) {
|
||||
// 定义RTMP URL的正则表达式模式
|
||||
Pattern pattern = Pattern.compile("^rtmp://([^/:]+):([^/]+)(/.*)$");
|
||||
|
|
|
|||
|
|
@ -2347,3 +2347,8 @@ ALTER TABLE "public"."bus_maintenance"
|
|||
-- ----------------------------
|
||||
ALTER TABLE "public"."bus_maintenance_img"
|
||||
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