diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/ChannelFrontEndController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/ChannelFrontEndController.java index d5cc56552..8c9674d9b 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/ChannelFrontEndController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/ChannelFrontEndController.java @@ -603,15 +603,15 @@ public class ChannelFrontEndController { @Parameter(name = "channelId", description = "通道ID", required = true) @Parameter(name = "length", description = "播放窗口长度像素值", required = true) @Parameter(name = "width", description = "播放窗口宽度像素值", required = true) - @Parameter(name = "midpointX", description = "拉框中心的横轴坐标像素值", required = true) - @Parameter(name = "midpointY", description = "拉框中心的纵轴坐标像素值", required = true) + @Parameter(name = "midPointX", description = "拉框中心的横轴坐标像素值", required = true) + @Parameter(name = "midPointY", description = "拉框中心的纵轴坐标像素值", required = true) @Parameter(name = "lengthX", description = "拉框长度像素值", required = true) @Parameter(name = "lengthY", description = "拉框宽度像素值", required = true) @GetMapping("/drag_zoom_in") - public DeferredResult> dragZoomIn(Integer channelId, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY){ + public DeferredResult> dragZoomIn(Integer channelId, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY){ if (log.isDebugEnabled()) { - log.debug("[通用通道]拉框放大 API调用,channelId:{} ,length:{} ,width:{} ,midpointX:{} ,midpointY:{} ,lengthX:{} ,lengthY:{}",channelId, length, width, midpointX, midpointY, lengthX, lengthY); + log.debug("[通用通道]拉框放大 API调用,channelId:{} ,length:{} ,width:{} ,midPointX:{} ,midPointY:{} ,lengthX:{} ,lengthY:{}",channelId, length, width, midPointX, midPointY, lengthX, lengthY); } CommonGBChannel channel = channelService.getOne(channelId); @@ -621,8 +621,8 @@ public class ChannelFrontEndController { controlCode.setCode(1); controlCode.setLength(length); controlCode.setWidth(width); - controlCode.setMidPointX(midpointX); - controlCode.setMidPointY(midpointY); + controlCode.setMidPointX(midPointX); + controlCode.setMidPointY(midPointY); controlCode.setLengthX(lengthX); controlCode.setLengthY(lengthY); @@ -648,15 +648,15 @@ public class ChannelFrontEndController { @Parameter(name = "channelId", description = "通道ID", required = true) @Parameter(name = "length", description = "播放窗口长度像素值", required = true) @Parameter(name = "width", description = "播放窗口宽度像素值", required = true) - @Parameter(name = "midpointX", description = "拉框中心的横轴坐标像素值", required = true) - @Parameter(name = "midpointY", description = "拉框中心的纵轴坐标像素值", required = true) + @Parameter(name = "midPointX", description = "拉框中心的横轴坐标像素值", required = true) + @Parameter(name = "midPointY", description = "拉框中心的纵轴坐标像素值", required = true) @Parameter(name = "lengthX", description = "拉框长度像素值", required = true) @Parameter(name = "lengthY", description = "拉框宽度像素值", required = true) @GetMapping("/drag_zoom_out") - public DeferredResult> dragZoomOut(Integer channelId, Integer length, Integer width, Integer midpointX, Integer midpointY, Integer lengthX, Integer lengthY){ + public DeferredResult> dragZoomOut(Integer channelId, Integer length, Integer width, Integer midPointX, Integer midPointY, Integer lengthX, Integer lengthY){ if (log.isDebugEnabled()) { - log.debug("[通用通道]拉框缩小 API调用,channelId:{} ,length:{} ,width:{} ,midpointX:{} ,midpointY:{} ,lengthX:{} ,lengthY:{}",channelId, length, width, midpointX, midpointY, lengthX, lengthY); + log.debug("[通用通道]拉框缩小 API调用,channelId:{} ,length:{} ,width:{} ,midPointX:{} ,midPointY:{} ,lengthX:{} ,lengthY:{}",channelId, length, width, midPointX, midPointY, lengthX, lengthY); } CommonGBChannel channel = channelService.getOne(channelId); @@ -666,8 +666,8 @@ public class ChannelFrontEndController { controlCode.setCode(2); controlCode.setLength(length); controlCode.setWidth(width); - controlCode.setMidPointX(midpointX); - controlCode.setMidPointY(midpointY); + controlCode.setMidPointX(midPointX); + controlCode.setMidPointY(midPointY); controlCode.setLengthX(lengthX); controlCode.setLengthY(lengthY); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceControl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceControl.java index 742f1469f..03c608bb4 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceControl.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/DeviceControl.java @@ -165,24 +165,24 @@ public class DeviceControl { @Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "length", description = "播放窗口长度像素值", required = true) @Parameter(name = "width", description = "播放窗口宽度像素值", required = true) - @Parameter(name = "midpointX", description = "拉框中心的横轴坐标像素值", required = true) - @Parameter(name = "midpointY", description = "拉框中心的纵轴坐标像素值", required = true) + @Parameter(name = "midPointX", description = "拉框中心的横轴坐标像素值", required = true) + @Parameter(name = "midPointY", description = "拉框中心的纵轴坐标像素值", required = true) @Parameter(name = "lengthX", description = "拉框长度像素值", required = true) @Parameter(name = "lengthY", description = "拉框宽度像素值", required = true) @GetMapping("drag_zoom/zoom_in") public void dragZoomIn(@RequestParam String deviceId, String channelId, @RequestParam int length, @RequestParam int width, - @RequestParam int midpointX, - @RequestParam int midpointY, + @RequestParam int midPointX, + @RequestParam int midPointY, @RequestParam int lengthX, @RequestParam int lengthY) { if (log.isDebugEnabled()) { - log.debug(String.format("设备拉框放大 API调用,deviceId:%s ,channelId:%s ,length:%d ,width:%d ,midpointX:%d ,midpointY:%d ,lengthX:%d ,lengthY:%d",deviceId, channelId, length, width, midpointX, midpointY,lengthX, lengthY)); + log.debug(String.format("设备拉框放大 API调用,deviceId:%s ,channelId:%s ,length:%d ,width:%d ,midPointX:%d ,midPointY:%d ,lengthX:%d ,lengthY:%d",deviceId, channelId, length, width, midPointX, midPointY,lengthX, lengthY)); } Device device = deviceService.getDeviceByDeviceId(deviceId); Assert.notNull(device, "设备不存在"); - deviceService.dragZoomIn(device, channelId, length, width, midpointX, midpointY, lengthX, lengthY); + deviceService.dragZoomIn(device, channelId, length, width, midPointX, midPointY, lengthX, lengthY); } @Operation(summary = "拉框缩小", security = @SecurityRequirement(name = JwtUtils.HEADER)) @@ -190,8 +190,8 @@ public class DeviceControl { @Parameter(name = "channelId", description = "通道国标编号") @Parameter(name = "length", description = "播放窗口长度像素值", required = true) @Parameter(name = "width", description = "播放窗口宽像素值", required = true) - @Parameter(name = "midpointX", description = "拉框中心的横轴坐标像素值", required = true) - @Parameter(name = "midpointY", description = "拉框中心的纵轴坐标像素值", required = true) + @Parameter(name = "midPointX", description = "拉框中心的横轴坐标像素值", required = true) + @Parameter(name = "midPointY", description = "拉框中心的纵轴坐标像素值", required = true) @Parameter(name = "lengthX", description = "拉框长度像素值", required = true) @Parameter(name = "lengthY", description = "拉框宽度像素值", required = true) @GetMapping("/drag_zoom/zoom_out") @@ -199,16 +199,16 @@ public class DeviceControl { @RequestParam(required = false) String channelId, @RequestParam int length, @RequestParam int width, - @RequestParam int midpointX, - @RequestParam int midpointY, + @RequestParam int midPointX, + @RequestParam int midPointY, @RequestParam int lengthX, @RequestParam int lengthY){ if (log.isDebugEnabled()) { - log.debug(String.format("设备拉框缩小 API调用,deviceId:%s ,channelId:%s ,length:%d ,width:%d ,midpointX:%d ,midpointY:%d ,lengthX:%d ,lengthY:%d",deviceId, channelId, length, width, midpointX, midpointY,lengthX, lengthY)); + log.debug(String.format("设备拉框缩小 API调用,deviceId:%s ,channelId:%s ,length:%d ,width:%d ,midPointX:%d ,midPointY:%d ,lengthX:%d ,lengthY:%d",deviceId, channelId, length, width, midPointX, midPointY,lengthX, lengthY)); } Device device = deviceService.getDeviceByDeviceId(deviceId); Assert.notNull(device, "设备不存在"); - deviceService.dragZoomOut(device, channelId, length, width, midpointX, midpointY, lengthX,lengthY); + deviceService.dragZoomOut(device, channelId, length, width, midPointX, midPointY, lengthX,lengthY); } } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IDeviceService.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IDeviceService.java index de581b10b..0ba7d7c8c 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IDeviceService.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IDeviceService.java @@ -185,9 +185,9 @@ public interface IDeviceService { void homePosition(Device device, String channelId, Boolean enabled, Integer resetTime, Integer presetIndex, ErrorCallback callback); - void dragZoomIn(Device device, String channelId, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY); + void dragZoomIn(Device device, String channelId, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY); - void dragZoomOut(Device device, String channelId, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY); + void dragZoomOut(Device device, String channelId, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY); void deviceStatus(Device device, ErrorCallback callback); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPTZService.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPTZService.java index 4c2c69f5d..69adb7388 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPTZService.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPTZService.java @@ -18,8 +18,8 @@ public interface IPTZService { void queryPresetList(CommonGBChannel channel, ErrorCallback> callback); - void dragZoomIn(CommonGBChannel channel, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY); + void dragZoomIn(CommonGBChannel channel, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY); - void dragZoomOut(CommonGBChannel channel, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY); + void dragZoomOut(CommonGBChannel channel, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY); } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceServiceImpl.java index b662392f4..54b8cdd49 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceServiceImpl.java @@ -1276,9 +1276,9 @@ public class DeviceServiceImpl implements IDeviceService { } @Override - public void dragZoomIn(Device device, String channelId, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY) { + public void dragZoomIn(Device device, String channelId, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY) { if (!userSetting.getServerId().equals(device.getServerId())) { - redisRpcService.dragZoomIn(device.getServerId(), device, channelId, length, width, midpointX, midpointY, lengthX, lengthY); + redisRpcService.dragZoomIn(device.getServerId(), device, channelId, length, width, midPointX, midPointY, lengthX, lengthY); return; } @@ -1286,8 +1286,8 @@ public class DeviceServiceImpl implements IDeviceService { cmdXml.append("\r\n"); cmdXml.append("" + length+ "\r\n"); cmdXml.append("" + width+ "\r\n"); - cmdXml.append("" + midpointX+ "\r\n"); - cmdXml.append("" + midpointY+ "\r\n"); + cmdXml.append("" + midPointX+ "\r\n"); + cmdXml.append("" + midPointY+ "\r\n"); cmdXml.append("" + lengthX+ "\r\n"); cmdXml.append("" + lengthY+ "\r\n"); cmdXml.append("\r\n"); @@ -1300,9 +1300,9 @@ public class DeviceServiceImpl implements IDeviceService { } @Override - public void dragZoomOut(Device device, String channelId, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY) { + public void dragZoomOut(Device device, String channelId, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY) { if (!userSetting.getServerId().equals(device.getServerId())) { - redisRpcService.dragZoomOut(device.getServerId(), device, channelId, length, width, midpointX, midpointY, lengthX, lengthY); + redisRpcService.dragZoomOut(device.getServerId(), device, channelId, length, width, midPointX, midPointY, lengthX, lengthY); return; } @@ -1310,8 +1310,8 @@ public class DeviceServiceImpl implements IDeviceService { cmdXml.append("\r\n"); cmdXml.append("" + length+ "\r\n"); cmdXml.append("" + width+ "\r\n"); - cmdXml.append("" + midpointX+ "\r\n"); - cmdXml.append("" + midpointY+ "\r\n"); + cmdXml.append("" + midPointX+ "\r\n"); + cmdXml.append("" + midPointY+ "\r\n"); cmdXml.append("" + lengthX+ "\r\n"); cmdXml.append("" + lengthY+ "\r\n"); cmdXml.append("\r\n"); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PTZServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PTZServiceImpl.java index b5a43a498..1d4a9fbcf 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PTZServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PTZServiceImpl.java @@ -92,7 +92,7 @@ public class PTZServiceImpl implements IPTZService { } @Override - public void dragZoomIn(CommonGBChannel channel, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY) { + public void dragZoomIn(CommonGBChannel channel, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY) { if (channel.getDataType() != ChannelDataType.GB28181) { log.warn("[INFO 消息] 只有国标通道的支持云台控制, 通道ID: {}", channel.getGbId()); throw new ControllerException(ErrorCode.ERROR100.getCode(), "不支持"); @@ -102,11 +102,11 @@ public class PTZServiceImpl implements IPTZService { throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到设备ID"); } DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(channel.getGbId()); - deviceService.dragZoomIn(device, deviceChannel.getDeviceId(), length, width, midpointX, midpointY, lengthX, lengthY); + deviceService.dragZoomIn(device, deviceChannel.getDeviceId(), length, width, midPointX, midPointY, lengthX, lengthY); } @Override - public void dragZoomOut(CommonGBChannel channel, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY) { + public void dragZoomOut(CommonGBChannel channel, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY) { if (channel.getDataType() != ChannelDataType.GB28181) { log.warn("[INFO 消息] 只有国标通道的支持云台控制, 通道ID: {}", channel.getGbId()); throw new ControllerException(ErrorCode.ERROR100.getCode(), "不支持"); @@ -116,7 +116,7 @@ public class PTZServiceImpl implements IPTZService { throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到设备ID"); } DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(channel.getGbId()); - deviceService.dragZoomOut(device, deviceChannel.getDeviceId(), length, width, midpointX, midpointY, lengthX, lengthY); + deviceService.dragZoomOut(device, deviceChannel.getDeviceId(), length, width, midPointX, midPointY, lengthX, lengthY); } @Override diff --git a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/IRedisRpcService.java b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/IRedisRpcService.java index 809ba42dc..9f63b0d80 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/IRedisRpcService.java +++ b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/IRedisRpcService.java @@ -69,9 +69,9 @@ public interface IRedisRpcService { WVPResult homePosition(String serverId, Device device, String channelId, Boolean enabled, Integer resetTime, Integer presetIndex); - void dragZoomIn(String serverId, Device device, String channelId, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY); + void dragZoomIn(String serverId, Device device, String channelId, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY); - void dragZoomOut(String serverId, Device device, String channelId, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY); + void dragZoomOut(String serverId, Device device, String channelId, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY); WVPResult deviceStatus(String serverId, Device device); diff --git a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcDeviceController.java b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcDeviceController.java index 29e111c19..c57c84dff 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcDeviceController.java +++ b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcDeviceController.java @@ -318,8 +318,8 @@ public class RedisRpcDeviceController extends RpcController { String channelId = paramJson.getString("channelId"); Integer length = paramJson.getInteger("length"); Integer width = paramJson.getInteger("width"); - Integer midpointX = paramJson.getInteger("midpointX"); - Integer midpointY = paramJson.getInteger("midpointY"); + Integer midPointX = paramJson.getInteger("midPointX"); + Integer midPointY = paramJson.getInteger("midPointY"); Integer lengthX = paramJson.getInteger("lengthX"); Integer lengthY = paramJson.getInteger("lengthY"); @@ -332,7 +332,7 @@ public class RedisRpcDeviceController extends RpcController { return response; } try { - deviceService.dragZoomIn(device, channelId, length, width, midpointX, midpointY, lengthX, lengthY); + deviceService.dragZoomIn(device, channelId, length, width, midPointX, midPointY, lengthX, lengthY); }catch (ControllerException e) { response.setStatusCode(e.getCode()); response.setBody(WVPResult.fail(ErrorCode.ERROR100.getCode(), e.getMsg())); @@ -350,8 +350,8 @@ public class RedisRpcDeviceController extends RpcController { String channelId = paramJson.getString("channelId"); Integer length = paramJson.getInteger("length"); Integer width = paramJson.getInteger("width"); - Integer midpointX = paramJson.getInteger("midpointX"); - Integer midpointY = paramJson.getInteger("midpointY"); + Integer midPointX = paramJson.getInteger("midPointX"); + Integer midPointY = paramJson.getInteger("midPointY"); Integer lengthX = paramJson.getInteger("lengthX"); Integer lengthY = paramJson.getInteger("lengthY"); @@ -364,7 +364,7 @@ public class RedisRpcDeviceController extends RpcController { return response; } try { - deviceService.dragZoomOut(device, channelId, length, width, midpointX, midpointY, lengthX, lengthY); + deviceService.dragZoomOut(device, channelId, length, width, midPointX, midPointY, lengthX, lengthY); }catch (ControllerException e) { response.setStatusCode(e.getCode()); response.setBody(WVPResult.fail(ErrorCode.ERROR100.getCode(), e.getMsg())); diff --git a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/service/RedisRpcServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/service/RedisRpcServiceImpl.java index 66f6f2996..a3a69b2bc 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/service/RedisRpcServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/service/RedisRpcServiceImpl.java @@ -433,15 +433,15 @@ public class RedisRpcServiceImpl implements IRedisRpcService { } @Override - public void dragZoomIn(String serverId, Device device, String channelId, int length, int width, int midpointX, - int midpointY, int lengthX, int lengthY) { + public void dragZoomIn(String serverId, Device device, String channelId, int length, int width, int midPointX, + int midPointY, int lengthX, int lengthY) { JSONObject jsonObject = new JSONObject(); jsonObject.put("device", device.getDeviceId()); jsonObject.put("channelId", channelId); jsonObject.put("length", length); jsonObject.put("width", width); - jsonObject.put("midpointX", midpointX); - jsonObject.put("midpointY", midpointY); + jsonObject.put("midPointX", midPointX); + jsonObject.put("midPointY", midPointY); jsonObject.put("lengthX", lengthX); jsonObject.put("lengthY", lengthY); RedisRpcRequest request = buildRequest("device/dragZoomIn", jsonObject); @@ -450,14 +450,14 @@ public class RedisRpcServiceImpl implements IRedisRpcService { } @Override - public void dragZoomOut(String serverId, Device device, String channelId, int length, int width, int midpointX, int midpointY, int lengthX, int lengthY) { + public void dragZoomOut(String serverId, Device device, String channelId, int length, int width, int midPointX, int midPointY, int lengthX, int lengthY) { JSONObject jsonObject = new JSONObject(); jsonObject.put("device", device.getDeviceId()); jsonObject.put("channelId", channelId); jsonObject.put("length", length); jsonObject.put("width", width); - jsonObject.put("midpointX", midpointX); - jsonObject.put("midpointY", midpointY); + jsonObject.put("midPointX", midPointX); + jsonObject.put("midPointY", midPointY); jsonObject.put("lengthX", lengthX); jsonObject.put("lengthY", lengthY); RedisRpcRequest request = buildRequest("device/dragZoomOut", jsonObject); diff --git a/web/src/mixins/dragZoom.js b/web/src/mixins/dragZoom.js index f6ff9bafa..9785bf841 100644 --- a/web/src/mixins/dragZoom.js +++ b/web/src/mixins/dragZoom.js @@ -185,8 +185,8 @@ export default { const params = { length: Math.round(this.dragVideoRect.width), width: Math.round(this.dragVideoRect.height), - midpointX: Math.round(sx + rectW / 2), - midpointY: Math.round(sy + rectH / 2), + midPointX: Math.round(sx + rectW / 2), + midPointY: Math.round(sy + rectH / 2), lengthX: Math.round(rectW), lengthY: Math.round(rectH) }