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) { public Result MP4(@PathVariable Integer id) {
checkLogin(id); checkLogin(id);
LocalDateTime localDateTime = LocalDateTime.of(2022,7,21,8,20); 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()); String path = localDateTime.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))+".mp4";
return Result.success(); 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") @PostMapping("/io/toPtz")
@ApiOperation(value = "转至球机IO配置点") @ApiOperation(value = "转至球机IO配置点")
public Result toPtz(@RequestBody CameraIOPtz req) { 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()); cameraControlModule.toPtz(ptzId,req.getCameraId());
return Result.success(); return Result.success();
} }

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

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

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

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

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

Loading…
Cancel
Save