轨迹模版,轨迹状态查询添加选中的id
This commit is contained in:
parent
3921f00e4b
commit
205526e370
@ -64,6 +64,11 @@
|
||||
/// <summary>
|
||||
/// 关键字
|
||||
/// </summary>
|
||||
public string Keywords { get; set; } = "";
|
||||
public string? Keywords { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 选中的轨迹状态id
|
||||
/// </summary>
|
||||
public List<int>? SelectIds { get; set;}
|
||||
}
|
||||
}
|
||||
@ -15,9 +15,14 @@
|
||||
/// </summary>
|
||||
public string Keywords { get; set; } = "";
|
||||
|
||||
///// <summary>
|
||||
///// 轨迹模版id,轨迹映射的查询使用
|
||||
///// </summary>
|
||||
//public int TrackTemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹模版id,轨迹映射的查询使用
|
||||
/// 选中的轨迹模版id
|
||||
/// </summary>
|
||||
public int TrackTemplateId { get; set; }
|
||||
public List<int>? SelectIds { get; set; }
|
||||
}
|
||||
}
|
||||
@ -10,5 +10,10 @@ public class GetPageTrackStatusVO : PageInfoInput
|
||||
/// <summary>
|
||||
/// 关键字
|
||||
/// </summary>
|
||||
public string Keywords { get; set; }
|
||||
public string? Keywords { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 选中的轨迹状态id
|
||||
/// </summary>
|
||||
public List<int>? SelectIds { get; set; }
|
||||
}
|
||||
@ -12,13 +12,7 @@ public class GetPageTrackTemplateVO : PageInfoInput
|
||||
/// </summary>
|
||||
public string Keywords { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 是否置顶
|
||||
///// </summary>
|
||||
//public bool IsTop { get; set; }=false;
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹模版id
|
||||
/// 选中的轨迹模版id
|
||||
/// </summary>
|
||||
public int TrackTemplateId { get; set; }
|
||||
public List<int>? SelectIds { get; set; }
|
||||
}
|
||||
@ -45,6 +45,7 @@ public class TrackStatusRepository : BasicRepository<TrackStatusEntity>, ITrackS
|
||||
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(),
|
||||
(a, b, c, d) => a.Status.Contains(input.Keywords) || a.EnStatus.Contains(input.Keywords) ||
|
||||
a.Code.Contains(input.Keywords))
|
||||
.OrderByIF(!input.SelectIds.IsNullOrEmpty(), (a, b) => SqlFunc.IIF(input.SelectIds.Contains(a.Id), SqlFunc.DateAdd(SqlFunc.GetDate(), 1), a.CreateTime), OrderByType.Desc)
|
||||
.Select((a, b, c, d) => new GetTrackStatusListVO
|
||||
{
|
||||
Id = a.Id,
|
||||
|
||||
@ -47,9 +47,7 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
||||
.WhereIF(input.SubSystemId > 0, (a, b) => a.SubSystemId == input.SubSystemId)
|
||||
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(),
|
||||
(a, b) => a.Name.Contains(input.Keywords) || a.Code.Contains(input.Keywords))
|
||||
.OrderByIF(input.TrackTemplateId > 0,
|
||||
(a, b) => SqlFunc.IIF(a.Id == input.TrackTemplateId, SqlFunc.DateAdd(SqlFunc.GetDate(), 1),
|
||||
a.CreateTime), OrderByType.Desc)
|
||||
.OrderByIF(!input.SelectIds.IsNullOrEmpty(),(a,b)=> SqlFunc.IIF(input.SelectIds.Contains(a.Id),SqlFunc.DateAdd(SqlFunc.GetDate(), 1), a.CreateTime), OrderByType.Desc)
|
||||
.Select((a, b) => new GetTrackTemplateListVO
|
||||
{
|
||||
Id = a.Id,
|
||||
@ -59,7 +57,9 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
||||
SubSystem = b.CnName
|
||||
})
|
||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||
|
||||
//.OrderByIF(input.TrackTemplateId > 0,
|
||||
// (a, b) => SqlFunc.IIF(a.Id == input.TrackTemplateId, SqlFunc.DateAdd(SqlFunc.GetDate(), 1),
|
||||
//a.CreateTime), OrderByType.Desc)
|
||||
return pagedList;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user