feat(trajectory): 新增轨迹检测与 Beacon 注册表
This commit is contained in:
@@ -37,6 +37,13 @@ public class AreaDeviceController {
|
||||
@Resource
|
||||
private AreaDeviceService areaDeviceService;
|
||||
|
||||
@GetMapping("/beacons/all")
|
||||
@Operation(summary = "查询所有启用的Beacon设备(轨迹检测用)")
|
||||
public CommonResult<List<AreaDeviceDTO>> getAllEnabledBeacons() {
|
||||
List<OpsAreaDeviceRelationDO> relations = areaDeviceService.listAllEnabledBeacons();
|
||||
return success(BeanUtils.toBean(relations, AreaDeviceDTO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/{areaId}/badges")
|
||||
@Operation(summary = "查询区域的工牌设备列表")
|
||||
public CommonResult<List<AreaDeviceDTO>> getBadgesByArea(
|
||||
@@ -45,21 +52,21 @@ public class AreaDeviceController {
|
||||
return success(BeanUtils.toBean(relations, AreaDeviceDTO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/{areaId}/devices")
|
||||
@Operation(summary = "查询区域设备列表(按类型)")
|
||||
public CommonResult<List<AreaDeviceDTO>> getDevicesByAreaAndType(
|
||||
@PathVariable("areaId") Long areaId,
|
||||
@RequestParam(value = "relationType", required = false) String relationType) {
|
||||
|
||||
List<OpsAreaDeviceRelationDO> relations;
|
||||
if (relationType != null) {
|
||||
relations = areaDeviceService.listByAreaIdAndType(areaId, relationType);
|
||||
} else {
|
||||
relations = areaDeviceService.listByAreaId(areaId);
|
||||
}
|
||||
|
||||
return success(BeanUtils.toBean(relations, AreaDeviceDTO.class));
|
||||
}
|
||||
@GetMapping("/{areaId}/devices")
|
||||
@Operation(summary = "查询区域设备列表(按类型)")
|
||||
public CommonResult<List<AreaDeviceDTO>> getDevicesByAreaAndType(
|
||||
@PathVariable("areaId") Long areaId,
|
||||
@RequestParam(value = "relationType", required = false) String relationType) {
|
||||
|
||||
List<OpsAreaDeviceRelationDO> relations;
|
||||
if (relationType != null) {
|
||||
relations = areaDeviceService.listByAreaIdAndType(areaId, relationType);
|
||||
} else {
|
||||
relations = areaDeviceService.listByAreaId(areaId);
|
||||
}
|
||||
|
||||
return success(BeanUtils.toBean(relations, AreaDeviceDTO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/device/{deviceId}/relation")
|
||||
@Operation(summary = "查询设备的关联关系")
|
||||
|
||||
Reference in New Issue
Block a user