Merge branch 'S01-轨迹中台' of http://192.168.80.50:3000/Dotnet/SJZY.Track.Api into S01-轨迹中台
This commit is contained in:
commit
cbb9e5ed52
@ -115,4 +115,15 @@ public class TrackTemplateService : ApplicationService, ITrackTemplateService, I
|
|||||||
{
|
{
|
||||||
return await _trackTemplateRepository.GetContentPageAsync(input);
|
return await _trackTemplateRepository.GetContentPageAsync(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模板内容详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("GetContentDetail")]
|
||||||
|
public async Task<GetContentDetailOutputVO> GetContentDetailAsync(int id)
|
||||||
|
{
|
||||||
|
return await _trackTemplateRepository.GetContentDetailAsync(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackTemplateAggregate.Dtos
|
||||||
|
{
|
||||||
|
public class GetContentDetailOutputVO
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否可删
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCanDelete { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否对外
|
||||||
|
/// </summary>
|
||||||
|
public bool IsExternal { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容
|
||||||
|
/// </summary>
|
||||||
|
public string TrackContent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容id
|
||||||
|
/// </summary>
|
||||||
|
public int TrackContentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态
|
||||||
|
/// </summary>
|
||||||
|
public string TrackStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态id
|
||||||
|
/// </summary>
|
||||||
|
public int TrackStatusId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -27,17 +27,17 @@ public class GetContentPageOutputVO
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string EnContent { get; set; }
|
public string EnContent { get; set; }
|
||||||
|
|
||||||
public long? Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否可删
|
/// 是否可删
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? IsCanDelete { get; set; }
|
public bool IsCanDelete { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否对外
|
/// 是否对外
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? IsExternal { get; set; }
|
public bool IsExternal { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所属节点
|
/// 所属节点
|
||||||
@ -47,7 +47,7 @@ public class GetContentPageOutputVO
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 排序
|
/// 排序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public long? Sort { get; set; }
|
public long Sort { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹标记
|
/// 轨迹标记
|
||||||
|
|||||||
@ -10,5 +10,17 @@ public interface ITrackTemplateRepository : IBasicRepository<TrackTemplateEntity
|
|||||||
|
|
||||||
Task<UnifyPageResultDto<GetTrackTemplateListVO>> GetPageTrackTemplate(GetPageTrackTemplateVO input);
|
Task<UnifyPageResultDto<GetTrackTemplateListVO>> GetPageTrackTemplate(GetPageTrackTemplateVO input);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模板内容列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
Task<UnifyPageResultDto<GetContentPageOutputVO>> GetContentPageAsync(GetContentPageInputVO input);
|
Task<UnifyPageResultDto<GetContentPageOutputVO>> GetContentPageAsync(GetContentPageInputVO input);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模板内容详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<GetContentDetailOutputVO> GetContentDetailAsync(int id);
|
||||||
}
|
}
|
||||||
@ -97,11 +97,7 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
return pagedList;
|
return pagedList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc/>
|
||||||
/// 轨迹模板内容列表
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="input"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<UnifyPageResultDto<GetContentPageOutputVO>> GetContentPageAsync(GetContentPageInputVO input)
|
public async Task<UnifyPageResultDto<GetContentPageOutputVO>> GetContentPageAsync(GetContentPageInputVO input)
|
||||||
{
|
{
|
||||||
return await AsSugarClient().Queryable<TrackTemplateContentEntity>()
|
return await AsSugarClient().Queryable<TrackTemplateContentEntity>()
|
||||||
@ -126,4 +122,21 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
}, true)
|
}, true)
|
||||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<GetContentDetailOutputVO> GetContentDetailAsync(int id)
|
||||||
|
{
|
||||||
|
return await AsSugarClient().Queryable<TrackTemplateContentEntity>()
|
||||||
|
.InnerJoin<TrackContentEntity>((templateContent, trackContent) => templateContent.TrackContentId == trackContent.Id && !trackContent.IsDeleted)
|
||||||
|
.LeftJoin<TrackStatusEntity>((templateContent, trackContent, trackStatus) => trackContent.TrackStatusId == trackStatus.Id && !trackStatus.IsDeleted)
|
||||||
|
.Filter(null, true)
|
||||||
|
.Where(templateContent => templateContent.Id == id && !templateContent.IsDeleted)
|
||||||
|
.Select((templateContent, trackContent, trackStatus) => new GetContentDetailOutputVO
|
||||||
|
{
|
||||||
|
Id = templateContent.Id,
|
||||||
|
TrackContent = trackContent.Code + "-" + trackContent.Content,
|
||||||
|
TrackStatus = trackStatus.Status
|
||||||
|
}, true)
|
||||||
|
.SingleAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user