Browse Source

相机导入添加工务段判断

hexiao 2 years ago
parent
commit
a879668080

+ 13 - 0
hazard-admin/src/main/java/com/ozs/web/controller/accountmanagment/BaseCameraManagementController.java

@@ -481,6 +481,19 @@ public class BaseCameraManagementController extends BaseController {
         return new AjaxResult(200, "ok", CameraUtil.getPlayFlv(cameraCode, one.getChannel()));
     }
 
+    @ApiOperation("查询录像")
+    @GetMapping("/api/records/{cameraCode}/{flay}")
+    public AjaxResult apiRecords(@PathVariable @NotNull(message = "相机编码不能为空") String cameraCode,
+                                 @PathVariable @NotNull(message = "条件不能为空") boolean flay) {
+        LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>();
+        lw.eq(BaseCameraManagement::getCameraCode, cameraCode);
+        BaseCameraManagement one = baseCameraManagementService.getOne(lw);
+        if (ObjectUtils.isEmpty(one)) {
+            throw new BaseException("相机编号【" + cameraCode + "】不存在");
+        }
+        return new AjaxResult(200, "ok", CameraUtil.getPlayFlv(cameraCode, one.getChannel(), flay));
+    }
+
     @ApiOperation("批量查询录像")
     @GetMapping("/api/recordsList")
     public AjaxResult apiRecordsList(@RequestBody