From 3d911d4cdb91600557033c3dd598b7371e414a82 Mon Sep 17 00:00:00 2001 From: cheche <717840555@qq.com> Date: Tue, 9 Jan 2024 12:04:21 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=8E=B7=E5=8F=96=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EnumSetting/EnumsController.cs | 30 ++++++++++--------- .../Response/GainfoTypeResponse.cs | 6 +--- .../Basic/Entity/GainfoTypeEntity.cs | 4 +-- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/Src/Dlhis.Common/EnumSetting/EnumsController.cs b/Src/Dlhis.Common/EnumSetting/EnumsController.cs index fde75e29..e0879962 100644 --- a/Src/Dlhis.Common/EnumSetting/EnumsController.cs +++ b/Src/Dlhis.Common/EnumSetting/EnumsController.cs @@ -58,27 +58,29 @@ public class EnumsController : ControllerBase }); } /// - /// 获取所有类型 + /// 获取档案类型数据 /// /// /// - public object GetTypes(string code) + public object GetTypes(string type) { - var types = _dbContext.Queryable().Where(x => x.Code == code).ToList(); + var types = _dbContext.Queryable().Where(x => x.Type == type).ToList(); - return new + return types.Select(x => { - Code = code, - Data = types.Select(x => new GainfoTypeResponse + return new { - Id = x.Id, Type = x.Type, - Code = x.Code, - Descript = x.Descript, - DescriptEn = x.DescriptEn, - Remark = x.Remark, - Sort = x.Sort, - }).ToList() - }; + Data = types.Select(x => new GainfoTypeResponse + { + Id = x.Id, + Type = x.Type, + Code = x.Code, + Descript = x.Descript, + DescriptEn = x.DescriptEn, + Remark = x.Remark, + }).ToList() + }; + }); } } diff --git a/Src/Dlhis.Common/Response/GainfoTypeResponse.cs b/Src/Dlhis.Common/Response/GainfoTypeResponse.cs index f5056e9b..b5823421 100644 --- a/Src/Dlhis.Common/Response/GainfoTypeResponse.cs +++ b/Src/Dlhis.Common/Response/GainfoTypeResponse.cs @@ -15,7 +15,7 @@ namespace Dlhis.Common.Response public string Type { get; set; } /// - /// 档案号 + /// 编码 /// public string Code { get; set; } @@ -34,9 +34,5 @@ namespace Dlhis.Common.Response /// public string Remark { get; set; } - /// - /// 排序 - /// - public string Sort { get; set; } } } diff --git a/Src/Dlhis.Entity/Basic/Entity/GainfoTypeEntity.cs b/Src/Dlhis.Entity/Basic/Entity/GainfoTypeEntity.cs index f8d96789..eff3e85f 100644 --- a/Src/Dlhis.Entity/Basic/Entity/GainfoTypeEntity.cs +++ b/Src/Dlhis.Entity/Basic/Entity/GainfoTypeEntity.cs @@ -15,9 +15,9 @@ namespace Dlhis.Entity.Basic.Entity public string Type { get; set; } /// - /// 档案号 + /// 编码 /// - [SugarColumn(ColumnDescription = "档案号")] + [SugarColumn(ColumnDescription = "编码")] public string Code { get; set; } ///