Merge remote-tracking branch 'origin/S01-轨迹中台' into S01-轨迹中台
This commit is contained in:
commit
95d91559e8
@ -35,4 +35,15 @@ public class TrackPushService : ApplicationService, ITransientDependency
|
||||
{
|
||||
return await _trackPushConfigRepository.GetPageAsync(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹推送配置内容列表
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("GetContentPage")]
|
||||
public async Task<UnifyPageResultDto<GetTrackPushContentPageOutputVO>> GetContentPageAsync([FromBody] GetTrackPushContentPageInputVO input)
|
||||
{
|
||||
return await _trackPushConfigRepository.GetContentPageAsync(input);
|
||||
}
|
||||
}
|
||||
@ -6,4 +6,6 @@ namespace SJZY.Track.Domain.Aggregates.TrackPushAggregate;
|
||||
public interface ITrackPushConfigRepository : IBasicRepository<TrackPushConfigEntity>
|
||||
{
|
||||
Task<UnifyPageResultDto<GetTrackPushConfigPageOutputVO>> GetPageAsync(KeywordsInputVO input);
|
||||
|
||||
Task<UnifyPageResultDto<GetTrackPushContentPageOutputVO>> GetContentPageAsync(GetTrackPushContentPageInputVO input);
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
namespace SJZY.Track.Domain.Dtos.TrackPush;
|
||||
|
||||
public class GetTrackPushContentPageInputVO : PageInfoInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 轨迹推送配置id
|
||||
/// </summary>
|
||||
public int TrackPushConfigId { get; set; }
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
namespace SJZY.Track.Domain.Dtos.TrackPush;
|
||||
|
||||
public class GetTrackPushContentPageOutputVO
|
||||
{
|
||||
/// <summary>
|
||||
/// 轨迹内容代码
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹内容
|
||||
/// </summary>
|
||||
public string Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹内容英文
|
||||
/// </summary>
|
||||
public string EnContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 推送扩展字段
|
||||
/// </summary>
|
||||
public string ExpandFieldsValue { get; set; }
|
||||
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 推送单号类型
|
||||
/// </summary>
|
||||
public string OrderNoType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 推送排序
|
||||
/// </summary>
|
||||
public int Sort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 推送轨迹内容代码
|
||||
/// </summary>
|
||||
public string TrackContentCodeValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 推送轨迹内容
|
||||
/// </summary>
|
||||
public string TrackContentValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 推送轨迹内容英文
|
||||
/// </summary>
|
||||
public string TrackEnContentValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 推送轨迹状态
|
||||
/// </summary>
|
||||
public string TrackStatusValue { get; set; }
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
using SJZY.Track.Domain.Aggregates.TrackPushAggregate;
|
||||
using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
|
||||
using SJZY.Track.Domain.Aggregates.TrackPushAggregate;
|
||||
using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
|
||||
using SJZY.Track.Domain.Dtos.Common;
|
||||
using SJZY.Track.Domain.Dtos.TrackPush;
|
||||
@ -19,7 +20,7 @@ public class TrackPushConfigRepository : BasicRepository<TrackPushConfigEntity>,
|
||||
.Filter(null, true)
|
||||
.Where(trackPush => !trackPush.IsDeleted)
|
||||
.WhereIF(input.SubSystemId.HasValue, trackPush => trackPush.SubSystemId == input.SubSystemId)
|
||||
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(), (trackPush, system, externalSubject, template) => externalSubject.Name.Contains(input.Keywords) || template.Name.Contains(input.Keywords))
|
||||
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(), (trackPush, system, externalSubject, template) => externalSubject.Abbreviation.Contains(input.Keywords) || externalSubject.Name.Contains(input.Keywords) || template.Name.Contains(input.Keywords))
|
||||
.OrderByDescending(trackPush => trackPush.CreateTime)
|
||||
.Select((trackPush, system, externalSubject, template) => new GetTrackPushConfigPageOutputVO
|
||||
{
|
||||
@ -34,4 +35,18 @@ public class TrackPushConfigRepository : BasicRepository<TrackPushConfigEntity>,
|
||||
.Distinct()
|
||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||
}
|
||||
|
||||
public async Task<UnifyPageResultDto<GetTrackPushContentPageOutputVO>> GetContentPageAsync(GetTrackPushContentPageInputVO input)
|
||||
{
|
||||
return await Context.Queryable<TrackPushContentConfigEntity>()
|
||||
.InnerJoin<TrackContentEntity>((pushContent, trackContent) => pushContent.TrackContentId == trackContent.Id)
|
||||
.Where(pushContent => pushContent.TrackPushConfigId == input.TrackPushConfigId)
|
||||
.OrderBy((pushContent, trackContent) => pushContent.Sort)
|
||||
.Select((pushContent, trackContent) => new GetTrackPushContentPageOutputVO
|
||||
{
|
||||
Id = pushContent.Id,
|
||||
Sort = pushContent.Sort
|
||||
}, true)
|
||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user