fix 设备分页返回属性新增Type

This commit is contained in:
cheche
2024-02-01 10:17:43 +08:00
parent 96cdc5a1ef
commit 2f5f6be7d7
2 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
using Dlhis.Entity.Device.Enums; using Dlhis.Entity.Device.Enums;
using Google.Protobuf.WellKnownTypes;
using Kurisu.AspNetCore.Utils.Extensions; using Kurisu.AspNetCore.Utils.Extensions;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
@@ -51,7 +52,9 @@ public class DevicePageResponse
/// <summary> /// <summary>
/// 设备机功能类型 /// 设备机功能类型
/// </summary> /// </summary>
public string TypeDescription { get; set; } public DeviceGroupFunctionEnumType Type { get; set; }
public string TypeDescription => Type.GetDescription();
/// <summary> /// <summary>
/// 部署点 /// 部署点

View File

@@ -32,7 +32,7 @@ public class DeviceService : IDeviceService
{ {
FuncsStr = d.Funcs.ToString(), FuncsStr = d.Funcs.ToString(),
Brand = dt.Brand, Brand = dt.Brand,
TypeDescription = d.Type.ToString(), Type = d.Type,
}, true) }, true)
.ToPageListAsync(request); .ToPageListAsync(request);