轨迹标记也添加选中

This commit is contained in:
moyongzhen 2024-03-01 16:38:41 +08:00
parent 8bf416104a
commit e3a8a94e1e
6 changed files with 25 additions and 11 deletions

View File

@ -55,6 +55,11 @@
/// </summary> /// </summary>
public int SubSystemId { get; set; } public int SubSystemId { get; set; }
/// <summary>
/// 选中的轨迹标记id
/// </summary>
public List<int>? SelectIds { get; set; }
///// <summary> ///// <summary>
///// 关键字 ///// 关键字
///// </summary> ///// </summary>

View File

@ -13,6 +13,11 @@ namespace SJZY.Track.Domain.Dtos.TrackFlags
/// </summary> /// </summary>
public int SubSystemId { get; set; } public int SubSystemId { get; set; }
/// <summary>
/// 选中的轨迹标记id
/// </summary>
public List<int>? SelectIds { get; set; }
///// <summary> ///// <summary>
///// 关键字 ///// 关键字
///// </summary> ///// </summary>

View File

@ -62,6 +62,7 @@ public class TrackContentRepository : BasicRepository<TrackContentEntity>, ITrac
(a, b, c, d, e, f) => a.Code.Contains(input.Keywords) || a.Content.Contains(input.Keywords) (a, b, c, d, e, f) => a.Code.Contains(input.Keywords) || a.Content.Contains(input.Keywords)
|| a.EnContent.Contains(input.Keywords) || a.EnContent.Contains(input.Keywords)
) )
.OrderByDescending((a, b, c, d, e, f) => a.CreateTime)
.Select((a, b, c, d, e, f) => new GetTrackContentListVO .Select((a, b, c, d, e, f) => new GetTrackContentListVO
{ {
Id = a.Id, Id = a.Id,

View File

@ -46,6 +46,8 @@ public class TrackFlagRepository : BasicRepository<TrackFlagEntity>, ITrackFlagR
.LeftJoin<VUserEntity>((a, b, c) => a.CreateUserId == c.Id) .LeftJoin<VUserEntity>((a, b, c) => a.CreateUserId == c.Id)
.LeftJoin<VUserEntity>((a, b, c, d) => a.UpdateUserId == d.Id) .LeftJoin<VUserEntity>((a, b, c, d) => a.UpdateUserId == d.Id)
.WhereIF(input.SubSystemId > 0, (a, b, c, d) => a.SubSystemId == input.SubSystemId) .WhereIF(input.SubSystemId > 0, (a, b, c, d) => a.SubSystemId == input.SubSystemId)
.OrderByIF(input.SelectIds.IsNullOrEmpty(), (a, b, c, d) => a.CreateTime, OrderByType.Desc)
.OrderByIF(!input.SelectIds.IsNullOrEmpty(), (a, b, c, d) => SqlFunc.IIF(input.SelectIds.Contains(a.Id), SqlFunc.DateAdd(SqlFunc.GetDate(), 1), a.CreateTime), OrderByType.Desc)
.Select((a, b, c, d) => new GetTrackFlagListVO .Select((a, b, c, d) => new GetTrackFlagListVO
{ {
Id = a.Id, Id = a.Id,
@ -56,8 +58,7 @@ public class TrackFlagRepository : BasicRepository<TrackFlagEntity>, ITrackFlagR
CreateTime = a.CreateTime, CreateTime = a.CreateTime,
CreateUser = c.Name, CreateUser = c.Name,
UpdateTime = a.UpdateTime, UpdateTime = a.UpdateTime,
UpdateUser = d.Name, UpdateUser = d.Name
}) })
.ToPagedListAsync(input.PageIndex, input.PageSize); .ToPagedListAsync(input.PageIndex, input.PageSize);

View File

@ -45,7 +45,8 @@ public class TrackStatusRepository : BasicRepository<TrackStatusEntity>, ITrackS
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(), .WhereIF(!input.Keywords.IsNullOrWhiteSpace(),
(a, b, c, d) => a.Status.Contains(input.Keywords) || a.EnStatus.Contains(input.Keywords) || (a, b, c, d) => a.Status.Contains(input.Keywords) || a.EnStatus.Contains(input.Keywords) ||
a.Code.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) .OrderByIF(input.SelectIds.IsNullOrEmpty(), (a, b, c, d) => a.CreateTime, OrderByType.Desc)
.OrderByIF(!input.SelectIds.IsNullOrEmpty(), (a, b, c, d) => SqlFunc.IIF(input.SelectIds.Contains(a.Id), SqlFunc.DateAdd(SqlFunc.GetDate(), 1), a.CreateTime), OrderByType.Desc)
.Select((a, b, c, d) => new GetTrackStatusListVO .Select((a, b, c, d) => new GetTrackStatusListVO
{ {
Id = a.Id, Id = a.Id,

View File

@ -24,13 +24,13 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
.Where((a, b) => a.Id == id) .Where((a, b) => a.Id == id)
.Select((a, b) => new .Select((a, b) => new
GetTrackTemplateDetailVO GetTrackTemplateDetailVO
{ {
Id = a.Id, Id = a.Id,
Code = a.Code, Code = a.Code,
Name = a.Name, Name = a.Name,
SubSystemId = a.SubSystemId, SubSystemId = a.SubSystemId,
SubSystem = b.CnName SubSystem = b.CnName
}).FirstAsync(); }).FirstAsync();
return detail; return detail;
} }
@ -47,7 +47,8 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
.WhereIF(input.SubSystemId > 0, (a, b) => a.SubSystemId == input.SubSystemId) .WhereIF(input.SubSystemId > 0, (a, b) => a.SubSystemId == input.SubSystemId)
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(), .WhereIF(!input.Keywords.IsNullOrWhiteSpace(),
(a, b) => a.Name.Contains(input.Keywords) || a.Code.Contains(input.Keywords)) (a, b) => a.Name.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) .OrderByIF(input.SelectIds.IsNullOrEmpty(), (a, b) => 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 .Select((a, b) => new GetTrackTemplateListVO
{ {
Id = a.Id, Id = a.Id,