From 3aecf92eb7ddf56b1684fedfa271933dbbd8ef15 Mon Sep 17 00:00:00 2001 From: moyongzhen <2534173414@qq.com> Date: Thu, 11 Apr 2024 15:14:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=BD=A8=E8=BF=B9=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=85=B3=E7=B3=BB=E5=AF=B9=E5=A4=96=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QueryTrackPullMappingsInput.cs | 60 +++++++++++++++++++ .../TrackPushConfigAutoMapperProfile.cs | 22 +++++++ .../ProvideServices/TrackPushConfigService.cs | 44 ++++++++++++++ .../ITrackPushConfigRepository.cs | 1 + .../TrackPush/QueryTrackPullMappingsInfoVO.cs | 60 +++++++++++++++++++ .../Repositories/TrackPushConfigRepository.cs | 25 ++++++++ 6 files changed, 212 insertions(+) create mode 100644 src/SJZY.Track.Application.Contract/Dtos/ProvideServices/QueryTrackPullMappingsInput.cs create mode 100644 src/SJZY.Track.Application/AutoMapper/TrackPushConfigAutoMapperProfile.cs create mode 100644 src/SJZY.Track.Application/Services/ProvideServices/TrackPushConfigService.cs create mode 100644 src/SJZY.Track.Domain/Dtos/TrackPush/QueryTrackPullMappingsInfoVO.cs diff --git a/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/QueryTrackPullMappingsInput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/QueryTrackPullMappingsInput.cs new file mode 100644 index 00000000..ed0e9da4 --- /dev/null +++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/QueryTrackPullMappingsInput.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SJZY.Track.Application.Contract.Dtos.ProvideServices +{ + /// + /// 查询轨迹推送映射关系入参 + /// + public class QueryTrackPullMappingsInput + { + /// + /// 子系统id + /// + public int SubsystemsId { get; set; } + + /// + /// 客户id + /// + public int CustomerId { get; set; } + } + + /// + /// 查询轨迹推送映射关系返参项 + /// + public class QueryTrackPullMappingsInfo + { + /// + /// 轨迹代码 + /// + public string? Code { get; set; } + + /// + /// 订单类型 + /// + public int OrderType { get; set; } + + /// + /// 服务商轨迹代码 + /// + public string? ServiceCode { get; set; } + + /// + /// 服务商轨迹状态 + /// + public string? Status { get; set; } + + /// + /// 服务商轨迹内容 + /// + public string? Content { get; set; } + + /// + /// 服务商轨迹内容英文 + /// + public string? ContentEn { get; set; } + } +} diff --git a/src/SJZY.Track.Application/AutoMapper/TrackPushConfigAutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/TrackPushConfigAutoMapperProfile.cs new file mode 100644 index 00000000..7cb8ccd2 --- /dev/null +++ b/src/SJZY.Track.Application/AutoMapper/TrackPushConfigAutoMapperProfile.cs @@ -0,0 +1,22 @@ +using AutoMapper; +using SJZY.Track.Application.Contract.Dtos.ProvideServices; +using SJZY.Track.Application.Contract.Dtos.TrackPush; +using SJZY.Track.Domain.Aggregates.TrackPushAggregate; +using SJZY.Track.Domain.Dtos.TrackPush; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SJZY.Track.Application.AutoMapper +{ + public class TrackPushConfigAutoMapperProfile : Profile + { + public TrackPushConfigAutoMapperProfile() + { + CreateMap(MemberList.None); + CreateMap(MemberList.None); + } + } +} diff --git a/src/SJZY.Track.Application/Services/ProvideServices/TrackPushConfigService.cs b/src/SJZY.Track.Application/Services/ProvideServices/TrackPushConfigService.cs new file mode 100644 index 00000000..4a575526 --- /dev/null +++ b/src/SJZY.Track.Application/Services/ProvideServices/TrackPushConfigService.cs @@ -0,0 +1,44 @@ +using SJZY.Track.Application.Contract.Dtos.ProvideServices; +using SJZY.Track.Domain.Aggregates.TrackPushAggregate; +using SJZY.Track.Domain.Dtos.TrackPush; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.ObjectMapping; + +namespace SJZY.Track.Application.Services.ProvideServices +{ + /// + /// 轨迹推送配置服务 + /// + [ApiExplorerSettings(GroupName = "提供接口")] + [Route("/ProviderService")] + public class TrackPushConfigService : ApplicationService + { + private readonly ITrackPushConfigRepository _trackPushConfigRepository; + + public TrackPushConfigService( + ITrackPushConfigRepository trackPushConfigRepository + ) + { + _trackPushConfigRepository = trackPushConfigRepository; + } + + /// + /// 查询轨迹推送配置关系 + /// + /// + /// + [HttpPost("Track/QueryTrackPullMappings")] + public async Task QueryTrackPullMappingsAsync(QueryTrackPullMappingsInput input) + { + var vo = ObjectMapper.Map(input); + var result = await _trackPushConfigRepository.QueryTrackPullMappingsAsync(vo); + var output = ObjectMapper.Map, List>(result); + + return new UnifyResultDto(true, output, "操作成功"); + } + } +} diff --git a/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs b/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs index 641fb386..3983cd7c 100644 --- a/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs +++ b/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs @@ -35,4 +35,5 @@ public interface ITrackPushConfigRepository : IBasicRepository UpdateContentAsync(Expression> columns, Expression> whereExpression); + Task> QueryTrackPullMappingsAsync(QueryTrackPullMappingsInputVO input); } \ No newline at end of file diff --git a/src/SJZY.Track.Domain/Dtos/TrackPush/QueryTrackPullMappingsInfoVO.cs b/src/SJZY.Track.Domain/Dtos/TrackPush/QueryTrackPullMappingsInfoVO.cs new file mode 100644 index 00000000..26f7b4a8 --- /dev/null +++ b/src/SJZY.Track.Domain/Dtos/TrackPush/QueryTrackPullMappingsInfoVO.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SJZY.Track.Domain.Dtos.TrackPush +{ + /// + /// 查询轨迹推送关系入参 + /// + public class QueryTrackPullMappingsInfoVO + { + /// + /// 轨迹代码 + /// + public string? Code { get; set; } + + /// + /// 订单类型 + /// + public int OrderType { get; set; } + + /// + /// 服务商轨迹代码 + /// + public string? ServiceCode { get; set; } + + /// + /// 服务商轨迹状态 + /// + public string? Status { get; set; } + + /// + /// 服务商轨迹内容 + /// + public string? Content { get; set; } + + /// + /// 服务商轨迹内容英文 + /// + public string? ContentEn { get; set; } + } + + /// + /// 查询轨迹推送关系返参项 + /// + public class QueryTrackPullMappingsInputVO + { + /// + /// 子系统id + /// + public int SubsystemsId { get; set; } + + /// + /// 客户id + /// + public int CustomerId { get; set; } + } +} diff --git a/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs b/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs index 43bbae70..c7e21820 100644 --- a/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs @@ -166,4 +166,29 @@ public class TrackPushConfigRepository : BasicRepository, return await Context.Updateable().SetColumns(columns).Where(whereExpression) .ExecuteCommandHasChangeAsync(); } + + /// + /// 查询轨迹推送关系 + /// + /// + /// + public async Task> QueryTrackPullMappingsAsync(QueryTrackPullMappingsInputVO input) + { + var result = await Context.Queryable().LeftJoin((a, b) => a.Id == b.TrackPushConfigId && !b.IsDeleted) + .LeftJoin((a, b, c) => b.TrackContentId == c.Id && !c.IsDeleted) + .Where((a, b, c) => !a.IsDeleted) + .Where((a, b, c) => a.SubSystemId == input.SubsystemsId && a.CustomId == input.CustomerId) + .Select((a, b, c) => new QueryTrackPullMappingsInfoVO + { + Code = c.Code, + OrderType = b.OrderNoType, + ServiceCode = b.TrackContentCodeValue, + Status = b.TrackStatusValue, + Content = b.TrackContentValue, + ContentEn = b.TrackEnContentValue + }) + .ToListAsync(); + + return result; + } } \ No newline at end of file From c2c1e24dcf5089fbeb0a6829efc5efbe540f8997 Mon Sep 17 00:00:00 2001 From: moyongzhen <2534173414@qq.com> Date: Thu, 11 Apr 2024 15:21:38 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AF=B9=E5=A4=96?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/ITrackPushConfigService.cs | 20 +++++++++++++++++++ .../ProvideServices/TrackPushConfigService.cs | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/SJZY.Track.Application.Contract/Services/ITrackPushConfigService.cs diff --git a/src/SJZY.Track.Application.Contract/Services/ITrackPushConfigService.cs b/src/SJZY.Track.Application.Contract/Services/ITrackPushConfigService.cs new file mode 100644 index 00000000..e191f6bb --- /dev/null +++ b/src/SJZY.Track.Application.Contract/Services/ITrackPushConfigService.cs @@ -0,0 +1,20 @@ +using SJZY.Track.Application.Contract.Dtos.ProvideServices; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; + +namespace SJZY.Track.Application.Contract.Services +{ + public interface ITrackPushConfigService : IRemoteService + { + /// + /// 查询轨迹推送配置关系 + /// + /// + /// + Task QueryTrackPullMappingsAsync(QueryTrackPullMappingsInput input); + } +} diff --git a/src/SJZY.Track.Application/Services/ProvideServices/TrackPushConfigService.cs b/src/SJZY.Track.Application/Services/ProvideServices/TrackPushConfigService.cs index 4a575526..04a8ea53 100644 --- a/src/SJZY.Track.Application/Services/ProvideServices/TrackPushConfigService.cs +++ b/src/SJZY.Track.Application/Services/ProvideServices/TrackPushConfigService.cs @@ -1,4 +1,5 @@ using SJZY.Track.Application.Contract.Dtos.ProvideServices; +using SJZY.Track.Application.Contract.Services; using SJZY.Track.Domain.Aggregates.TrackPushAggregate; using SJZY.Track.Domain.Dtos.TrackPush; using System; @@ -15,7 +16,7 @@ namespace SJZY.Track.Application.Services.ProvideServices /// [ApiExplorerSettings(GroupName = "提供接口")] [Route("/ProviderService")] - public class TrackPushConfigService : ApplicationService + public class TrackPushConfigService : ApplicationService, ITrackPushConfigService { private readonly ITrackPushConfigRepository _trackPushConfigRepository; From 0408ab8e136d65b1715767e7b8ee144ba3d5bf08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com> Date: Thu, 11 Apr 2024 15:31:35 +0800 Subject: [PATCH 3/3] =?UTF-8?q?version=EF=BC=9A7.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SJZY.Track.Application.Contract.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7f1f52a3..7a7f7902 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.1 + 7.0.2 True