fix 增加人员类型

This commit is contained in:
2025-06-27 20:11:23 +08:00
parent 502a17589d
commit 7f0890f0ac
2 changed files with 8 additions and 2 deletions

View File

@@ -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; }
}
}

View File

@@ -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();
}
/// <inheritdoc />