|
@@ -9,7 +9,6 @@ import com.ozs.common.core.controller.BaseController;
|
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
|
import com.ozs.common.core.domain.entity.SysDept;
|
|
|
import com.ozs.common.core.domain.entity.SysDictData;
|
|
|
-import com.ozs.common.core.domain.entity.SysRole;
|
|
|
import com.ozs.common.core.redis.RedisCache;
|
|
|
import com.ozs.common.enums.BusinessType;
|
|
|
import com.ozs.common.exception.base.BaseException;
|
|
@@ -34,13 +33,7 @@ import org.springframework.http.MediaType;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -49,12 +42,9 @@ import javax.validation.constraints.NotNull;
|
|
|
import java.io.InputStream;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.DecimalFormat;
|
|
|
-import java.time.LocalDateTime;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
-import static net.sf.jsqlparser.parser.feature.Feature.update;
|
|
|
-
|
|
|
/**
|
|
|
* <p>
|
|
|
* 相机台账管理表 前端控制器
|
|
@@ -1004,13 +994,29 @@ public class BaseCameraManagementController extends BaseController {
|
|
|
throw new BaseException("相机编号【" + vo.getCameraCode() + "】不存在");
|
|
|
}
|
|
|
String recordUrl = CameraUtil.getRecordUrl(one.getCameraCode(), one.getChannel(), vo.getStartTime(), vo.getEntTime());
|
|
|
- if (recordUrl.contains("当前相机暂无回放视频")||recordUrl.contains("当前回放视频数已超过带宽限制,请您10分钟以后重试")) {
|
|
|
+ if (recordUrl.contains("当前相机暂无回放视频") || recordUrl.contains("当前回放视频数已超过带宽限制,请您10分钟以后重试")) {
|
|
|
return AjaxResult.error(recordUrl);
|
|
|
} else {
|
|
|
return AjaxResult.success("ok", recordUrl);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 关闭录像
|
|
|
+ */
|
|
|
+ @GetMapping("/closestream/{path}")
|
|
|
+ @Log(title = "相机台账管理", businessType = BusinessType.OTHER)
|
|
|
+ public AjaxResult closestream(@PathVariable("path") String path) {
|
|
|
+ String start = HttpUtils.sendGet(CameraUtil.closestream(path));
|
|
|
+ log.info("endRecording------------" + start);
|
|
|
+ if ("success".equals(start)) {
|
|
|
+ return AjaxResult.success("");
|
|
|
+ } else {
|
|
|
+ return AjaxResult.error("");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@GetMapping("/api/getRecordByAlarmId")
|
|
|
@Log(title = "相机台账管理", businessType = BusinessType.OTHER)
|
|
|
public AjaxResult getRecordByAlarmId(@RequestParam("alarmId") String alarmId) {
|
|
@@ -1046,7 +1052,7 @@ public class BaseCameraManagementController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/nightVision/{code}/{mode}")
|
|
|
- public AjaxResult nightVision(@PathVariable("code") String code,@PathVariable("mode") Integer mode) {
|
|
|
+ public AjaxResult nightVision(@PathVariable("code") String code, @PathVariable("mode") Integer mode) {
|
|
|
BaseCameraManagement baseCameraManagement = baseCameraManagementService.getOne(new LambdaQueryWrapper<BaseCameraManagement>()
|
|
|
.eq(BaseCameraManagement::getCameraCode, code));
|
|
|
PublishClient.configFrameRate(baseCameraManagement, mode);
|
|
@@ -1094,6 +1100,7 @@ public class BaseCameraManagementController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 首页铃铛进去的页面
|
|
|
+ *
|
|
|
* @param deviceStateResp
|
|
|
* @return
|
|
|
*/
|