From 2f5f6be7d7972e4cb89698e3c83dc755508ea33e Mon Sep 17 00:00:00 2001 From: cheche <717840555@qq.com> Date: Thu, 1 Feb 2024 10:17:43 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=AE=BE=E5=A4=87=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=B1=9E=E6=80=A7=E6=96=B0=E5=A2=9EType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Dlhis.Basic/Device/Response/DevicePageResponse.cs | 5 ++++- Src/Dlhis.Basic/Device/Services/Implements/DeviceService.cs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Src/Dlhis.Basic/Device/Response/DevicePageResponse.cs b/Src/Dlhis.Basic/Device/Response/DevicePageResponse.cs index 73955b65..b2869e94 100644 --- a/Src/Dlhis.Basic/Device/Response/DevicePageResponse.cs +++ b/Src/Dlhis.Basic/Device/Response/DevicePageResponse.cs @@ -1,4 +1,5 @@ using Dlhis.Entity.Device.Enums; +using Google.Protobuf.WellKnownTypes; using Kurisu.AspNetCore.Utils.Extensions; using System.ComponentModel.DataAnnotations; @@ -51,7 +52,9 @@ public class DevicePageResponse /// /// 设备机功能类型 /// - public string TypeDescription { get; set; } + public DeviceGroupFunctionEnumType Type { get; set; } + + public string TypeDescription => Type.GetDescription(); /// /// 部署点 diff --git a/Src/Dlhis.Basic/Device/Services/Implements/DeviceService.cs b/Src/Dlhis.Basic/Device/Services/Implements/DeviceService.cs index 38cb83ea..c3fafd5f 100644 --- a/Src/Dlhis.Basic/Device/Services/Implements/DeviceService.cs +++ b/Src/Dlhis.Basic/Device/Services/Implements/DeviceService.cs @@ -32,7 +32,7 @@ public class DeviceService : IDeviceService { FuncsStr = d.Funcs.ToString(), Brand = dt.Brand, - TypeDescription = d.Type.ToString(), + Type = d.Type, }, true) .ToPageListAsync(request);