| | |
| | | package com.ruoyi.aibrain.controller; |
| | | |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.HIKVISION.GetPicFromIPV; |
| | | import com.ruoyi.utils.CameraUtils; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | */ |
| | | @PostMapping("startCamera") |
| | | public AjaxResult startCamera(AiCamera aiCamera) { |
| | | CameraUtils.startCamera(aiCamera.getId(),"2"); |
| | | try { |
| | | TimeUnit.SECONDS.sleep(2); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | CameraUtils.startCamera(aiCamera.getId(),"1"); |
| | | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("startCameraAll") |
| | | public AjaxResult startCameraAll() { |
| | | CameraUtils.startCameraAll("2"); |
| | | try { |
| | | TimeUnit.SECONDS.sleep(5); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | CameraUtils.startCameraAll("1"); |
| | | |
| | | return AjaxResult.success(); |
| | | } |
| | | |