fix 获取档案类型数据

This commit is contained in:
cheche
2024-01-09 12:04:21 +08:00
parent 2e6c30e305
commit 3d911d4cdb
3 changed files with 19 additions and 21 deletions

View File

@@ -58,17 +58,19 @@ public class EnumsController : ControllerBase
}); });
} }
/// <summary> /// <summary>
/// 获取所有类型 /// 获取档案类型数据
/// </summary> /// </summary>
/// <param name="code"></param> /// <param name="code"></param>
/// <returns></returns> /// <returns></returns>
public object GetTypes(string code) public object GetTypes(string type)
{ {
var types = _dbContext.Queryable<GainfoTypeEntity>().Where(x => x.Code == code).ToList(); var types = _dbContext.Queryable<GainfoTypeEntity>().Where(x => x.Type == type).ToList();
return types.Select(x =>
{
return new return new
{ {
Code = code, Type = x.Type,
Data = types.Select(x => new GainfoTypeResponse Data = types.Select(x => new GainfoTypeResponse
{ {
Id = x.Id, Id = x.Id,
@@ -77,8 +79,8 @@ public class EnumsController : ControllerBase
Descript = x.Descript, Descript = x.Descript,
DescriptEn = x.DescriptEn, DescriptEn = x.DescriptEn,
Remark = x.Remark, Remark = x.Remark,
Sort = x.Sort,
}).ToList() }).ToList()
}; };
});
} }
} }

View File

@@ -15,7 +15,7 @@ namespace Dlhis.Common.Response
public string Type { get; set; } public string Type { get; set; }
/// <summary> /// <summary>
/// 档案号 /// 编码
/// </summary> /// </summary>
public string Code { get; set; } public string Code { get; set; }
@@ -34,9 +34,5 @@ namespace Dlhis.Common.Response
/// </summary> /// </summary>
public string Remark { get; set; } public string Remark { get; set; }
/// <summary>
/// 排序
/// </summary>
public string Sort { get; set; }
} }
} }

View File

@@ -15,9 +15,9 @@ namespace Dlhis.Entity.Basic.Entity
public string Type { get; set; } public string Type { get; set; }
/// <summary> /// <summary>
/// 档案号 /// 编码
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "档案号")] [SugarColumn(ColumnDescription = "编码")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>