1、修改tplink上传进度查询接口:tplink处理成功后,将视频上传状态改为上传中、如果未获取到文件大小直接记录为上传失败
2、调整考核tplink回放视频接口,sql查询条件
This commit is contained in:
parent
bf058c7304
commit
48835f89a9
|
|
@ -1,6 +1,8 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
|
@ -17,7 +19,8 @@ public class Mp4HandleEntity implements Serializable {
|
|||
private Date startTime;
|
||||
private Date endTime;
|
||||
private String orgCode;
|
||||
private String orderId;
|
||||
private String orderId;//工单id
|
||||
private java.lang.String sn;//摄像头
|
||||
private List<TplinkInfoEntity> taskList;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -197,8 +197,13 @@ public class TplinkUploadLogController extends JeecgController<TplinkUploadLog,
|
|||
LocalDateTime normalizedStart = startLdt.toLocalDate().atStartOfDay();
|
||||
LocalDateTime normalizedEnd = endLdt.toLocalDate().atTime(23, 59, 59);
|
||||
QueryWrapper<TplinkUploadLog> qw = new QueryWrapper<>();
|
||||
//查询开始、结束对应的所有日期所有视频信息 如果切视频慢 这里不需要改动 有分区
|
||||
qw.ge("start_time", normalizedStart)
|
||||
.le("start_time", normalizedEnd);
|
||||
//上传完成的
|
||||
qw.eq("upload_status","2");
|
||||
//哪个摄像头
|
||||
qw.eq("sn",dto.getSn());
|
||||
List<TplinkUploadLog> sourceMp4List = tplinkUploadLogService.list(qw);
|
||||
|
||||
if (CollectionUtils.isEmpty(sourceMp4List)) {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,11 @@ public class TplinkUploadProcessQueryJob implements Job {
|
|||
if (code == 200) {
|
||||
long length = conn.getContentLengthLong();
|
||||
if (length != -1) {
|
||||
task.setMp4Len(length + "");
|
||||
task.setUploadStatus("0");//上传中
|
||||
task.setMp4Len(length + "");//视频最终大小
|
||||
}else{
|
||||
task.setUploadStatus("1");//上传失败
|
||||
task.setUploadErrorMsg("未获取到视频大小");
|
||||
}
|
||||
}
|
||||
conn.disconnect();
|
||||
|
|
|
|||
Loading…
Reference in New Issue