1.录像地址修改

2.球机转至io配置点时使用code
3.详细报警内容
4.未连接球机排除球机的id信息
dongguan-huaweiyun
LAPTOP-S9HJSOEB\昊天 2 years ago
parent 60be776976
commit e37fc3a7f6

@ -364,8 +364,9 @@ public class CameraControlController {
public Result MP4(@PathVariable Integer id) {
checkLogin(id);
LocalDateTime localDateTime = LocalDateTime.of(2022,7,21,8,20);
cameraControlModule.downloadMp4(id,"E:\\work\\"+localDateTime.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))+".mp4", localDateTime,localDateTime.plusMinutes(3),configProperties.getSavePath());
return Result.success();
String path = localDateTime.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))+".mp4";
cameraControlModule.downloadMp4(id,"E:\\work\\"+path, localDateTime,localDateTime.plusMinutes(3),configProperties.getSavePath());
return Result.success(configProperties.getCameraConfig().getWorkUrl()+path);
}

@ -142,7 +142,13 @@ public class CameraController {
@PostMapping("/io/toPtz")
@ApiOperation(value = "转至球机IO配置点")
public Result toPtz(@RequestBody CameraIOPtz req) {
Integer ptzId = cameraService.getPtzId(req.getCameraIOId());
Integer ptzId = null;
if(req.getCameraIOId()!=null){
ptzId = cameraService.getPtzId(req.getCameraIOId());
}else {
ptzId = cameraService.getPtzIdByCodeAndCameraId(req.getCode(),req.getCameraId());
}
cameraControlModule.toPtz(ptzId,req.getCameraId());
return Result.success();
}

@ -9,7 +9,7 @@ import java.util.List;
@Data
public class DeviceReq {
String deviceCode;
String warmName;
String warnName;
List<CameraList> cameraList;
@ -20,7 +20,7 @@ public class DeviceReq {
public Warn getWarn() {
Warn warn = new Warn();
warn.setDeviceCode(this.deviceCode);
warn.setWarnName(this.warmName);
warn.setWarnName(this.warnName);
warn.setType(this.type);
warn.setStartTime(LocalDateTime.now());
return warn;

@ -10,6 +10,7 @@ public class WarnVO extends Warn {
private String streetName;
private String timeLength;
private String typeName;
@ApiModelProperty("为海康球机时,调用此命令")
private String cmd1;

@ -147,9 +147,11 @@ public class CameraService {
if(ok){
camera.setStatus("连接正常");
}else {
CameraConnMap.disConn(camera.getId());
camera.setStatus("未连接");
}
}catch (Exception e){
CameraConnMap.disConn(camera.getId());
camera.setStatus("未连接");
}finally {
latch.countDown();

@ -33,6 +33,7 @@ public class WarnService {
int remainingSeconds = seconds.intValue() % 60;
String timeLength = String.format("%02d:%02d", minutes,remainingSeconds);
warnVO.setTimeLength(timeLength);
warnVO.setTypeName("1".equals(warnVO.getType())?"报警":"巡检");
}
});

@ -13,6 +13,10 @@
<if test="req.streetId != null and req.streetId != 0">
and t.street_id = #{req.streetId}
</if>
<if test="req.type != null and req.type != 0">
and t.type = #{req.type}
</if>
</where>
order by t.id desc
</select>

Loading…
Cancel
Save