fix 档案类型修正
This commit is contained in:
@@ -78,26 +78,5 @@ public class GainfosController : ControllerBase
|
||||
{
|
||||
await _gainfoService.OnboardingAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取档案下拉表的所有字段
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetAllFields")]
|
||||
public List<string> GetAllFields()
|
||||
{
|
||||
return _gainfoService.GetAllFields();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取档案下拉表的固定字段的数据
|
||||
/// </summary>
|
||||
/// <param name="fieldName"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetAllFieldData")]
|
||||
public List<string> GetColumnData(string fieldName)
|
||||
{
|
||||
return _gainfoService.GetColumnData(fieldName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,9 +16,4 @@ public interface IGainfoService : IScopeDependency
|
||||
Task DimissionAsync(GainfoDImissionRequest request);
|
||||
|
||||
Task OnboardingAsync(GainfoDImissionRequest request);
|
||||
|
||||
public List<string> GetAllFields();
|
||||
|
||||
public List<string> GetColumnData(string columnName);
|
||||
|
||||
}
|
||||
|
||||
@@ -22,30 +22,6 @@ public class GainfoService : IGainfoService
|
||||
_dbContext = dbContext;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取档案下拉表的所有字段
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<string> GetAllFields()
|
||||
{
|
||||
var entityType = typeof(GainfofieldsEntity);
|
||||
var propertyNames = entityType.GetProperties().Select(p => p.Name).ToList();
|
||||
|
||||
return propertyNames;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取档案下拉表的固定字段的数据
|
||||
/// </summary>
|
||||
/// <param name="columnName"></param>
|
||||
/// <returns></returns>
|
||||
public List<string> GetColumnData(string columnName)
|
||||
{
|
||||
// 动态获取表的某一列数据
|
||||
var columnData = _dbContext.Queryable<GainfofieldsEntity>().Select<string>(columnName).ToList();
|
||||
|
||||
return columnData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 档案分页
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user