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>
/// <param name="code"></param>
/// <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
{
Code = code,
Type = x.Type,
Data = types.Select(x => new GainfoTypeResponse
{
Id = x.Id,
@@ -77,8 +79,8 @@ public class EnumsController : ControllerBase
Descript = x.Descript,
DescriptEn = x.DescriptEn,
Remark = x.Remark,
Sort = x.Sort,
}).ToList()
};
});
}
}

View File

@@ -15,7 +15,7 @@ namespace Dlhis.Common.Response
public string Type { get; set; }
/// <summary>
/// 档案号
/// 编码
/// </summary>
public string Code { get; set; }
@@ -34,9 +34,5 @@ namespace Dlhis.Common.Response
/// </summary>
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; }
/// <summary>
/// 档案号
/// 编码
/// </summary>
[SugarColumn(ColumnDescription = "档案号")]
[SugarColumn(ColumnDescription = "编码")]
public string Code { get; set; }
/// <summary>