飞行架次增加ai媒体数量
This commit is contained in:
parent
b61dbb1028
commit
305e40da0f
|
|
@ -100,4 +100,7 @@ public class FlightTaskDTO implements Serializable {
|
||||||
|
|
||||||
@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://([^/:]+):([^/]+)(/.*)$");
|
||||||
|
|
|
||||||
|
|
@ -2347,3 +2347,8 @@ ALTER TABLE "public"."bus_maintenance"
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
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