From 7f0890f0acc0237bc2d174b5fed17278aa610ab0 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Fri, 27 Jun 2025 20:11:23 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=A2=9E=E5=8A=A0=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Dlhis.External/OpenApi/Response/GainfoOpenResponse.cs | 6 +++++- .../OpenApi/Services/Implements/GainfoService.cs | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Src/Dlhis.External/OpenApi/Response/GainfoOpenResponse.cs b/Src/Dlhis.External/OpenApi/Response/GainfoOpenResponse.cs index 33122620..31e9a4c3 100644 --- a/Src/Dlhis.External/OpenApi/Response/GainfoOpenResponse.cs +++ b/Src/Dlhis.External/OpenApi/Response/GainfoOpenResponse.cs @@ -1,4 +1,5 @@ using Dlhis.Entity.Basic.Enums; +using Kurisu.AspNetCore.Utils.Extensions; namespace Dlhis.External.OpenApi.Response; @@ -6,6 +7,9 @@ public class GainfoOpenResponse { public string Code { get; set; } + public GainfoUserTypeEnumType Type { get; set; } + public string TypeDesc => Type.GetDescription(); + public string Name { get; set; } public GenderEnumType Gender { get; set; } @@ -17,4 +21,4 @@ public class GainfoOpenResponse public GainfoStatusEnumType Status { get; set; } public string Factory { get; set; } -} +} \ No newline at end of file diff --git a/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs b/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs index b013d9cb..45b2a43f 100644 --- a/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs +++ b/Src/Dlhis.External/OpenApi/Services/Implements/GainfoService.cs @@ -42,6 +42,7 @@ public class GainfoService : IGainfoService .Select((x, d) => new GainfoOpenResponse { Code = x.Code, + Type = SqlFunc.IIF(x.Type == GainfoUserTypeEnumType.SecurityWhite, GainfoUserTypeEnumType.Normal, x.Type), DepartmentNo = x.DepartmentNo, DepartmentName = d.Name, Name = x.Name, @@ -62,6 +63,7 @@ public class GainfoService : IGainfoService .Select((x, d) => new GainfoOpenResponse { Code = x.Code, + Type = SqlFunc.IIF(x.Type == GainfoUserTypeEnumType.SecurityWhite, GainfoUserTypeEnumType.Normal, x.Type), DepartmentNo = x.DepartmentNo, DepartmentName = d.Name, Name = x.Name, @@ -71,7 +73,7 @@ public class GainfoService : IGainfoService }) .ToListAsync(); - return gainfos.Concat(gainfoLeaves).ToList(); + return gainfos.Concat(gainfoLeaves).ToList(); } ///