From ed3b7940c8262a0eeeabc960575224c8338ab213 Mon Sep 17 00:00:00 2001 From: hardstylewyl <827778732@qq.com> Date: Wed, 19 Mar 2025 17:52:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=A1=A5=E5=85=85=E5=8F=8D=E5=8F=82?= =?UTF-8?q?=E8=BF=90=E8=BE=93=E6=97=B6=E6=95=88=E5=9C=BA=E6=99=AF=E5=8F=8D?= =?UTF-8?q?=E5=8F=82=20=20-=20AreaName=20=E5=8C=BA=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dtos/Warning/Transport/TransportWarningSceneDto.cs | 5 +++++ .../Services/Warning/TransportWarningService.cs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/SJZY.Track.Application.Contract/Dtos/Warning/Transport/TransportWarningSceneDto.cs b/src/SJZY.Track.Application.Contract/Dtos/Warning/Transport/TransportWarningSceneDto.cs index d4ddf002..d6315e6f 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/Warning/Transport/TransportWarningSceneDto.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/Warning/Transport/TransportWarningSceneDto.cs @@ -49,4 +49,9 @@ public class TransportWarningSceneDto /// 区域Id(单一) /// public int? AreaId { get; set; } + + /// + /// 区域id对应的名称 + /// + public string? AreaName { get; set; } } diff --git a/src/SJZY.Track.Application/Services/Warning/TransportWarningService.cs b/src/SJZY.Track.Application/Services/Warning/TransportWarningService.cs index 93b6e47e..e4878a3b 100644 --- a/src/SJZY.Track.Application/Services/Warning/TransportWarningService.cs +++ b/src/SJZY.Track.Application/Services/Warning/TransportWarningService.cs @@ -86,7 +86,8 @@ public class TransportWarningService : ApplicationService LeavePort = x.LeavePort, ProductCode = x.ProductCode, Months = x.Months, - AreaId = x.AreaId + AreaId = x.AreaId, + AreaName = x.AreaId.HasValue ? areaNameDict?.GetValueOrDefault(x.AreaId.Value) : null }); return new UnifyResultDto>(true, map.ToList());