fix 获取档案类型数据
This commit is contained in:
@@ -58,27 +58,29 @@ 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 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()
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user