From f69436475431777807c509e4931a239866f06225 Mon Sep 17 00:00:00 2001 From: hardstylewyl <827778732@qq.com> Date: Thu, 19 Dec 2024 10:52:05 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=B8=8B=E6=8B=89=E8=BD=A8=E8=BF=B9?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=A2=9E=E5=8A=A0=E6=8E=A8=E9=80=81=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E7=B1=BB=E5=9E=8B=EF=BC=8C=E8=BF=94=E5=9B=9E=E6=89=80?= =?UTF-8?q?=E6=9C=89=E8=BD=A8=E8=BF=B9=E5=86=85=E5=AE=B9=EF=BC=8C=20=20-?= =?UTF-8?q?=20=E8=A1=A5=E5=85=85=E9=80=BB=E8=BE=91=EF=BC=9A=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E8=A1=8C=E4=B8=BA=E4=B8=8B=E6=8B=89=EF=BC=8C=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=A4=96=E9=83=A8=E6=9C=8D=E5=8A=A1=E5=95=86=E8=BD=A8?= =?UTF-8?q?=E8=BF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dtos/TrackContents/GetAvailableContentInput.cs | 5 +++-- .../Services/TrackContents/TrackContentService.cs | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentInput.cs index 47425b3c..39ae0073 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentInput.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentInput.cs @@ -13,7 +13,7 @@ public class GetAvailableContentInput public string? OrderNo { get; set; } /// - /// 操作类型 1=创建 2=修改 3=删除 + /// 操作类型 1=创建 2=修改 3=删除 4=推送 /// public TrackOptionType TrackOptionType { get; set; } } @@ -22,5 +22,6 @@ public enum TrackOptionType { 创建 = 1, 修改 = 2, - 删除 = 3 + 删除 = 3, + 推送 = 4, } diff --git a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs index c5e23f8d..78c97d7b 100644 --- a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs +++ b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs @@ -14,6 +14,7 @@ using SJZY.Track.Domain.Aggregates.TrackStatusAggregate; using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate; using SJZY.Track.Domain.Dtos.TrackContents; using SJZY.Track.Domain.Dtos.TrackTemplate; +using SJZY.Track.Domain.Enums; using SJZY.Track.Domain.Queries; namespace SJZY.Track.Application.Services.TrackContents; @@ -292,6 +293,12 @@ public class TrackContentService : ApplicationService //获取轨迹详情 var trackDetails = await _trackDetailsEsRepository.GetListAsync(order.Id); + // 删除时去除掉外部服务商轨迹 + if (input.TrackOptionType == TrackOptionType.删除) + { + trackDetails = trackDetails.Where(m => m.Source != (int) TrackSourceEnum.ExternalServiceProvide).ToList(); + } + //获取当前子系统下所有的轨迹内容 var contentList = await _trackContentRepository.GetListBySystemIdAsync(input.SystemId); if (contentList == null)