|
|
|
|
@ -97,6 +97,22 @@ public class DeviceController extends BladeController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 设备表 巡检计划设备列表,按照实验室、楼层、房间匹配 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/limsList") |
|
|
|
|
public R<List<Device>> limsList(Device device) { |
|
|
|
|
// 参数校验
|
|
|
|
|
if (device.getLimsId() == null || device.getFloorId() == null || device.getRoomId() == null) { |
|
|
|
|
return R.success("参数为空!"); |
|
|
|
|
} |
|
|
|
|
LambdaQueryWrapper<Device> 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) { |
|
|
|
|
|