feat (farm): 设备中心

- 设备分类
This commit is contained in:
达富斌
2025-10-24 19:34:37 +08:00
parent b61e154dcf
commit a710dead4c
5 changed files with 8 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ public class DeviceInfoSaveReqVO {
@Schema(description = "预留类型字段", example = "1")
private String type;
private String deviceUrl;
@Schema(description = "设备厂商")
private String vendor;

View File

@@ -28,6 +28,7 @@ public class DeviceInfoSaveV2ReqVO {
@Schema(description = "设备名称(本服务自定义名称)")
private String deviceName;
private String deviceUrl;
@Schema(description = "负责人")
private String managerId;

View File

@@ -19,6 +19,8 @@ public class DeviceModelRespVO {
@Schema(description = "设备型号ID")
private String deviceModelId;
@Schema(description = "设备型号编号")
private String typeCode;
@Schema(description = "设备型号名称")
private String deviceModelName;

View File

@@ -21,6 +21,8 @@ public class DeviceTypeRespVO {
private String deviceTypeId;
@Schema(description = "设备类型名称")
private String deviceTypeName;
@Schema(description = "设备类型编号")
private String typeCode;
@Schema(description = "设备类型图片")
private String image;
@Schema(description = "设备类型图片集合")

View File

@@ -120,6 +120,7 @@ public class DeviceClassifyServiceImpl implements DeviceClassifyService {
.map(device -> new DeviceTypeRespVO(
String.valueOf(device.getId()),
device.getName(),
device.getTypeCode(),
device.getImage(),
device.getImageList()
))
@@ -141,6 +142,7 @@ public class DeviceClassifyServiceImpl implements DeviceClassifyService {
.filter(device -> device.getParentId() != null && device.getParentId().equals(parentId))
.map(childDevice -> new DeviceModelRespVO(
String.valueOf(childDevice.getId()),
childDevice.getTypeCode(),
parentDevice.getName() + "/" + childDevice.getName()
))
.collect(Collectors.toList());