Browse Source

修改回放接口

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
da7f5cfa24
4 changed files with 19 additions and 3 deletions
  1. +6
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionFileServiceImpl.java
  2. +6
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionServiceImpl.java
  3. +5
    -0
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/vo/InspectionInfoVo.java
  4. +2
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/resources/mapper/InspectionMapper.xml

+ 6
- 1
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionFileServiceImpl.java View File

@@ -404,6 +404,11 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
if (StringUtils.isEmpty(id)) {
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
}
//获取租户id
String tenantId = CurrentUserUtil.getTenantId();
if(StringUtils.isEmpty(tenantId)){
return JsonResult.error("租户id为空");
}
//根据问题id查询对应的任务
InspectionFile inspectionFile = inspectionFileMapper.selectById(id);
if (ObjectUtil.isNull(inspectionFile)) {
@@ -416,7 +421,7 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
}
//根据任务id获取任务
Inspection inspection = inspectionMapper.selectOne(Wrappers.<Inspection>lambdaQuery()
.eq(Inspection::getTenantId, 0)
.eq(Inspection::getTenantId, tenantId)
.eq(Inspection::getMark, 1)
.eq(Inspection::getId, inspectionId));
PlayBackInfoVo vo = new PlayBackInfoVo();

+ 6
- 1
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionServiceImpl.java View File

@@ -188,9 +188,14 @@ public class InspectionServiceImpl implements IInspectionService {
if(StringUtils.isEmpty(id)){
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
}
//获取租户id
String tenantId = CurrentUserUtil.getTenantId();
if(StringUtils.isEmpty(tenantId)){
return JsonResult.error("租户id为空");
}
//根据任务id获取任务
Inspection inspection = inspectionMapper.selectOne(Wrappers.<Inspection>lambdaQuery()
.eq(Inspection::getTenantId, 0)
.eq(Inspection::getTenantId, tenantId)
.eq(Inspection::getMark, 1)
.eq(Inspection::getId, id));
PlayBackInfoVo vo = new PlayBackInfoVo();

+ 5
- 0
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/vo/InspectionInfoVo.java View File

@@ -80,6 +80,11 @@ public class InspectionInfoVo {
*/
private Integer flag;

/**
* ai分析后视频
*/
private String aiVideoUrl;



}

+ 2
- 1
tuoheng-service/tuoheng-miniprogram/src/main/resources/mapper/InspectionMapper.xml View File

@@ -72,7 +72,8 @@
ti.inspection_line as inspectionLine,
ti.inspection_line_name as inspectionLineName,
ti.create_user as createUser,
ti.execution_start_time as executionStartTime
ti.execution_start_time as executionStartTime,
ti.ai_video_url as aiVideoUrl
from
th_inspection ti
where ti.mark=1 and ti.tenant_id = #{request.tenantId}

Loading…
Cancel
Save