|
|
@@ -11,9 +11,11 @@ import com.tuoheng.admin.mapper.EventMapper; |
|
|
|
import com.tuoheng.admin.mapper.InspectionMapper; |
|
|
|
import com.tuoheng.admin.request.EventRequest; |
|
|
|
import com.tuoheng.admin.service.EventService; |
|
|
|
import com.tuoheng.admin.service.InspectionService; |
|
|
|
import com.tuoheng.admin.utils.CurrentUserUtil; |
|
|
|
import com.tuoheng.admin.vo.EventVo; |
|
|
|
import com.tuoheng.common.core.enums.MarkEnum; |
|
|
|
import com.tuoheng.common.core.exception.ServiceException; |
|
|
|
import com.tuoheng.common.core.utils.JsonResult; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
@@ -40,6 +42,9 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event> |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private InspectionMapper inspectionMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private InspectionService inspectionService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 分页查询入侵时间, 根据查询条件 |
|
|
@@ -116,6 +121,17 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event> |
|
|
|
} |
|
|
|
return JsonResult.success(eventVos); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public JsonResult getVideo(String eventId) { |
|
|
|
Event event = eventMapper.selectById(eventId); |
|
|
|
if(ObjectUtils.isNull(event.getInspectionId())){ |
|
|
|
throw new ServiceException("该事件还没有绑定飞行巡检任务"); |
|
|
|
} |
|
|
|
Inspection inspection = inspectionMapper.selectById(event.getInspectionId()); |
|
|
|
return inspectionService.getVideoById(inspection.getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|