From 2f1ec0e33fd1b86162c928407a45c49b1e5d46c7 Mon Sep 17 00:00:00 2001 From: lin <648540858@qq.com> Date: Tue, 16 Jun 2026 11:26:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E5=88=AB=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/gb28181/controller/DeviceControl.java | 14 +++++++------- .../iot/vmp/gb28181/service/IDeviceService.java | 4 ++-- .../gb28181/service/impl/DeviceServiceImpl.java | 8 ++++---- .../iot/vmp/service/redisMsg/IRedisRpcService.java | 4 ++-- .../redisMsg/control/RedisRpcDeviceController.java | 12 ++++++------ .../redisMsg/service/RedisRpcServiceImpl.java | 12 ++++++------ 6 files changed, 27 insertions(+), 27 deletions(-) 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 38bab85b1..742f1469f 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 @@ -178,7 +178,7 @@ public class DeviceControl { @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, "设备不存在"); @@ -192,8 +192,8 @@ public class DeviceControl { @Parameter(name = "width", 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) + @Parameter(name = "lengthX", description = "拉框长度像素值", required = true) + @Parameter(name = "lengthY", description = "拉框宽度像素值", required = true) @GetMapping("/drag_zoom/zoom_out") public void dragZoomOut(@RequestParam String deviceId, @RequestParam(required = false) String channelId, @@ -201,14 +201,14 @@ public class DeviceControl { @RequestParam int width, @RequestParam int midpointX, @RequestParam int midpointY, - @RequestParam int lengthx, - @RequestParam int lengthy){ + @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 5c2120240..de581b10b 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/impl/DeviceServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceServiceImpl.java index 4d820afca..b662392f4 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 @@ -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; } @@ -1312,8 +1312,8 @@ public class DeviceServiceImpl implements IDeviceService { cmdXml.append("" + width+ "\r\n"); cmdXml.append("" + midpointX+ "\r\n"); cmdXml.append("" + midpointY+ "\r\n"); - cmdXml.append("" + lengthx+ "\r\n"); - cmdXml.append("" + lengthy+ "\r\n"); + cmdXml.append("" + lengthX+ "\r\n"); + cmdXml.append("" + lengthY+ "\r\n"); cmdXml.append("\r\n"); try { sipCommander.dragZoomCmd(device, channelId, cmdXml.toString()); 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 ec009d61d..809ba42dc 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 13dde4e71..29e111c19 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 @@ -320,8 +320,8 @@ public class RedisRpcDeviceController extends RpcController { Integer width = paramJson.getInteger("width"); Integer midpointX = paramJson.getInteger("midpointX"); Integer midpointY = paramJson.getInteger("midpointY"); - Integer lengthx = paramJson.getInteger("lengthx"); - Integer lengthy = paramJson.getInteger("lengthy"); + Integer lengthX = paramJson.getInteger("lengthX"); + Integer lengthY = paramJson.getInteger("lengthY"); Device device = deviceService.getDeviceByDeviceId(deviceId); @@ -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())); @@ -352,8 +352,8 @@ public class RedisRpcDeviceController extends RpcController { Integer width = paramJson.getInteger("width"); Integer midpointX = paramJson.getInteger("midpointX"); Integer midpointY = paramJson.getInteger("midpointY"); - Integer lengthx = paramJson.getInteger("lengthx"); - Integer lengthy = paramJson.getInteger("lengthy"); + Integer lengthX = paramJson.getInteger("lengthX"); + Integer lengthY = paramJson.getInteger("lengthY"); Device device = deviceService.getDeviceByDeviceId(deviceId); @@ -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 db56014bb..66f6f2996 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 @@ -434,7 +434,7 @@ 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) { + int midpointY, int lengthX, int lengthY) { JSONObject jsonObject = new JSONObject(); jsonObject.put("device", device.getDeviceId()); jsonObject.put("channelId", channelId); @@ -442,15 +442,15 @@ public class RedisRpcServiceImpl implements IRedisRpcService { jsonObject.put("width", width); jsonObject.put("midpointX", midpointX); jsonObject.put("midpointY", midpointY); - jsonObject.put("lengthx", lengthx); - jsonObject.put("lengthy", lengthy); + jsonObject.put("lengthX", lengthX); + jsonObject.put("lengthY", lengthY); RedisRpcRequest request = buildRequest("device/dragZoomIn", jsonObject); request.setToId(serverId); redisRpcConfig.request(request, 50, TimeUnit.MILLISECONDS); } @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); @@ -458,8 +458,8 @@ public class RedisRpcServiceImpl implements IRedisRpcService { jsonObject.put("width", width); jsonObject.put("midpointX", midpointX); jsonObject.put("midpointY", midpointY); - jsonObject.put("lengthx", lengthx); - jsonObject.put("lengthy", lengthy); + jsonObject.put("lengthX", lengthX); + jsonObject.put("lengthY", lengthY); RedisRpcRequest request = buildRequest("device/dragZoomOut", jsonObject); request.setToId(serverId); redisRpcConfig.request(request, 50, TimeUnit.MILLISECONDS);