fix 设备/组新城枚举及调整
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Dlhis.Basic.Device.Request;
|
||||
|
||||
@@ -16,4 +17,11 @@ public class DeviceGroupSaveRequest
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "设备组名称不能为空")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备组功能类型
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "设备组功能类型不能为空")]
|
||||
[EnumDataType(typeof(DeviceGroupFunctionEnumType))]
|
||||
public DeviceGroupFunctionEnumType Type { get; set; }
|
||||
}
|
||||
|
||||
@@ -32,6 +32,13 @@ public class DeviceSaveRequest
|
||||
[Required(ErrorMessage = "设备功能不能为空")]
|
||||
public List<DeviceFuncEnumType> Funcs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备机功能类型
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "设备机功能类型不能为空")]
|
||||
[EnumDataType(typeof(DeviceGroupFunctionEnumType))]
|
||||
public DeviceGroupFunctionEnumType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 心跳间隔
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Dlhis.Basic.Device.Response;
|
||||
|
||||
@@ -47,6 +48,11 @@ public class DevicePageResponse
|
||||
|
||||
public string FuncsStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备机功能类型
|
||||
/// </summary>
|
||||
public string TypeDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 部署点
|
||||
/// </summary>
|
||||
|
||||
@@ -32,7 +32,7 @@ public class DeviceService : IDeviceService
|
||||
{
|
||||
FuncsStr = d.Funcs.ToString(),
|
||||
Brand = dt.Brand,
|
||||
|
||||
TypeDescription = d.Type.ToString(),
|
||||
}, true)
|
||||
.ToPageListAsync(request);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user