diff --git a/src/SJZY.Track.Application.Contract/Dtos/TrackContents/TrackContentOutput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/TrackContentOutput.cs new file mode 100644 index 00000000..c1b85a88 --- /dev/null +++ b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/TrackContentOutput.cs @@ -0,0 +1,79 @@ +namespace SJZY.Track.Application.Contract.Dtos.TrackContents; + +public sealed class TrackContentOutput +{ + /// + /// 子系统Id + /// + public int SubSystemId { get; set; } + + /// + /// 子系统代码 + /// + public string SubSystemCode { get; set; } + + /// + /// 轨迹状态Id + /// + public int TrackStatusId { get; set; } + + /// + /// 轨迹状态 + /// + public string TrackStatus { get; set; } = null!; + + /// + /// 轨迹内容Id + /// + public int TrackContentId { get; set; } + + /// + /// 轨迹内容 + /// + public string TrackContent { get; set; } = null!; + + /// + /// 轨迹内容英文 + /// + public string TrackEnContent { get; set; } = null!; + + /// + /// 是否完成态 + /// + public bool IsCompleted { get; set; } + + /// + /// 轨迹状态代码 + /// + public string TrackStatusCode { get; set; } + + /// + /// 是否可重复 + /// + public bool IsRepeatable { get; set; } + + /// + /// 是否允许手动修改 + /// + public bool IsAllowManuallyUpdate { get; set; } + + /// + /// 是否允许手动创建 + /// + public bool IsAllowManuallyCreate { get; set; } + + /// + /// 是否广播 + /// + public bool IsToMq { get; set; } + + /// + /// 是否对外 + /// + public bool IsExternal { get; set; } + + /// + /// 轨迹内容code + /// + public string TrackContentCode { get; set; } +} diff --git a/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj b/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj index f0778d54..40071dee 100644 --- a/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj +++ b/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj @@ -5,7 +5,7 @@ net7.0 True - 7.0.14 + 7.0.15 True diff --git a/src/SJZY.Track.Application.Contract/Services/ITrackContentService.cs b/src/SJZY.Track.Application.Contract/Services/ITrackContentService.cs index b24b807c..919f2e65 100644 --- a/src/SJZY.Track.Application.Contract/Services/ITrackContentService.cs +++ b/src/SJZY.Track.Application.Contract/Services/ITrackContentService.cs @@ -1,5 +1,8 @@ +using SJZY.Track.Application.Contract.Dtos.TrackContents; + namespace SJZY.Track.Application.Contract.Services; public interface ITrackContentService { + Task> GetTrackContentsAsync(int subSystemId); } diff --git a/src/SJZY.Track.Application/AutoMapper/TrackContentAutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/TrackContentAutoMapperProfile.cs index a161314e..6b1703fb 100644 --- a/src/SJZY.Track.Application/AutoMapper/TrackContentAutoMapperProfile.cs +++ b/src/SJZY.Track.Application/AutoMapper/TrackContentAutoMapperProfile.cs @@ -17,9 +17,9 @@ public class TrackContentAutoMapperProfile : Profile CreateMap, UnifyPageResultDto>( MemberList.None); CreateMap(MemberList.None); + CreateMap(MemberList.None); CreateMap(MemberList.None).ReverseMap(); - CreateMap< SJZY.Track.Domain.Aggregates.TrackDetailsAggregate.FileItem, SJZY.Track.Application.Contract.Dtos.TrackContents.FileItem>(MemberList.None).ReverseMap(); - + CreateMap(MemberList.None).ReverseMap(); } } diff --git a/src/SJZY.Track.Application/Services/ProvideServices/TrackContentService.cs b/src/SJZY.Track.Application/Services/ProvideServices/TrackContentService.cs new file mode 100644 index 00000000..2494e060 --- /dev/null +++ b/src/SJZY.Track.Application/Services/ProvideServices/TrackContentService.cs @@ -0,0 +1,34 @@ +using SJZY.Track.Application.Contract.Dtos.TrackContents; +using SJZY.Track.Application.Contract.Services; +using SJZY.Track.Domain.Aggregates.TrackContentAggregate; +using SJZY.Track.Domain.Dtos.TrackContents; + +namespace SJZY.Track.Application.Services.ProvideServices; + +/// +/// 轨迹内容服务 +/// +[ApiExplorerSettings(GroupName = "提供接口")] +[Route("/ProviderService")] +public class TrackContentService : ApplicationService, ITrackContentService +{ + private readonly ITrackContentRepository _trackContentRepository; + + public TrackContentService(ITrackContentRepository trackContentRepository) + { + _trackContentRepository = trackContentRepository; + } + + /// + /// 根据子系统id获取轨迹内容列表 + /// + /// + /// + [HttpPost("Track/GetTrackContents")] + public async Task> GetTrackContentsAsync(int subSystemId) + { + var res = await _trackContentRepository.GetTrackContentBySyetemIdAsync(subSystemId); + var result = ObjectMapper.Map, List>(res); + return result; + } +} diff --git a/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderEntity.cs b/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderEntity.cs index ce05158f..a137cffe 100644 --- a/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderEntity.cs +++ b/src/SJZY.Track.Domain/Aggregates/OrderAggregate/OrderEntity.cs @@ -198,7 +198,7 @@ public class OrderEntity : IFullAuditedBasicEntitys, IAggregateRoot /// 冗余订单第三方订单号(创建订单,更新订单时维护) /// [SugarColumn(ColumnName = "ThirdPartyOrderNumber")] - public string? ThirdPartyOrderNumber { get; set; } // + public string? ThirdPartyOrderNumber { get; set; } [SugarColumn(IsIgnore = true)] public List OrderFlights { get; set; } diff --git a/src/SJZY.Track.Repository/Repositories/TrackContentRepository.cs b/src/SJZY.Track.Repository/Repositories/TrackContentRepository.cs index 2c49ff0e..34dd608e 100644 --- a/src/SJZY.Track.Repository/Repositories/TrackContentRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/TrackContentRepository.cs @@ -257,6 +257,7 @@ public class TrackContentRepository : BasicRepository, ITrac .Where(x => x.SubSystemId == subSystemId) .Select((x, y, z) => new TrackContentVO { + SubSystemId = x.SubSystemId, SubSystemCode = z.Key, TrackStatusId = x.TrackStatusId, TrackStatus = y.Status,