|
|
@@ -141,7 +141,8 @@ public class SysDictDataService : IDynamicApiController, ITransient
|
|
|
{
|
|
|
return await _sysDictDataRep.AsQueryable()
|
|
|
.Where(u => u.DictTypeId == dictTypeId)
|
|
|
- .OrderBy(u => new { u.OrderNo, u.Code }).ToListAsync();
|
|
|
+ .OrderBy(u => new { u.OrderNo, u.Code })
|
|
|
+ .ToListAsync();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -151,10 +152,11 @@ public class SysDictDataService : IDynamicApiController, ITransient
|
|
|
/// <returns></returns>
|
|
|
[DisplayName("根据字典类型编码获取字典值集合")]
|
|
|
public async Task<List<SysDictData>> GetDataList(string code)
|
|
|
- {
|
|
|
- return await _sysDictDataRep.Context.Queryable<SysDictType>()
|
|
|
- .LeftJoin<SysDictData>((a, b) => a.Id == b.DictTypeId)
|
|
|
- .Where((a, b) => a.Code == code && a.Status == StatusEnum.Enable && b.Status == StatusEnum.Enable)
|
|
|
+ {
|
|
|
+ return await _sysDictDataRep.Context.Queryable<SysDictType>()
|
|
|
+ .LeftJoin<SysDictData>((a, b) => a.Id == b.DictTypeId)
|
|
|
+ .Where((a, b) => a.Code == code && a.Status == StatusEnum.Enable && b.Status == StatusEnum.Enable)
|
|
|
+ .OrderBy((a, b) => new { b.OrderNo, b.Code })
|
|
|
.Select((a, b) => b).ToListAsync();
|
|
|
}
|
|
|
|
|
|
@@ -169,7 +171,8 @@ public class SysDictDataService : IDynamicApiController, ITransient
|
|
|
return await _sysDictDataRep.Context.Queryable<SysDictType>()
|
|
|
.LeftJoin<SysDictData>((a, b) => a.Id == b.DictTypeId)
|
|
|
.Where((a, b) => a.Code == input.Code)
|
|
|
- .WhereIF(input.Status.HasValue, (a, b) => b.Status == (StatusEnum)input.Status.Value)
|
|
|
+ .WhereIF(input.Status.HasValue, (a, b) => b.Status == (StatusEnum)input.Status.Value)
|
|
|
+ .OrderBy((a, b) => new { b.OrderNo, b.Code })
|
|
|
.Select((a, b) => b).ToListAsync();
|
|
|
}
|
|
|
|