巡检计划设备列表数据

master
litao 1 year ago
parent 6e130d23e9
commit c94edcd03b
  1. 16
      src/main/java/org/springblade/modules/business/contraller/DeviceController.java

@ -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) {

Loading…
Cancel
Save