From c94edcd03bd0de273ce14b96a46da6d6c784cdf1 Mon Sep 17 00:00:00 2001 From: litao Date: Mon, 9 Dec 2024 18:45:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E8=AE=A1=E5=88=92=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=88=97=E8=A1=A8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/contraller/DeviceController.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/org/springblade/modules/business/contraller/DeviceController.java b/src/main/java/org/springblade/modules/business/contraller/DeviceController.java index 9b3c4b5..b5a611c 100644 --- a/src/main/java/org/springblade/modules/business/contraller/DeviceController.java +++ b/src/main/java/org/springblade/modules/business/contraller/DeviceController.java @@ -97,6 +97,22 @@ public class DeviceController extends BladeController { } } + /** + * 设备表 巡检计划设备列表,按照实验室、楼层、房间匹配 + */ + @GetMapping("/limsList") + public R> limsList(Device device) { + // 参数校验 + if (device.getLimsId() == null || device.getFloorId() == null || device.getRoomId() == null) { + return R.success("参数为空!"); + } + LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(Device.class) + .eq(Device::getLimsId, device.getLimsId()) + .eq(Device::getFloorId, device.getFloorId()) + .eq(Device::getRoomId, device.getRoomId()); + return R.data(deviceService.list(wrapper)); + } + private String sanitizeInput(String input) { // 对输入进行清理,防止 SQL 注入等安全问题 if (input == null) {