From 2dc9c7f31b8e15df40e60b7a8e677b2980016e91 Mon Sep 17 00:00:00 2001 From: moyongzhen <2534173414@qq.com> Date: Sat, 2 Mar 2024 09:50:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A8=E8=BF=B9=E7=8A=B6=E6=80=81=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/TrackStatus/TrackStatusService.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs b/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs index 686854db..b742ae81 100644 --- a/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs +++ b/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs @@ -92,7 +92,8 @@ public class TrackStatusService : ApplicationService, ITransientDependency a.Status == input.TrackStatus || a.EnStatus == input.EntrackStatus)); if (trackStatusEntity != null) { - throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]); + //throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]); + throw new BusinessException("当前子系统下,轨迹状态代码或轨迹状态或轨迹状态英文存在"); } #endregion @@ -112,7 +113,8 @@ public class TrackStatusService : ApplicationService, ITransientDependency a.Status == input.TrackStatus || a.EnStatus == input.EntrackStatus)); if (trackStatusEntity != null) { - throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]); + //throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]); + throw new BusinessException("当前子系统下,轨迹状态代码或轨迹状态或轨迹状态英文存在"); } #endregion @@ -130,7 +132,8 @@ public class TrackStatusService : ApplicationService, ITransientDependency var isExistStatus = await _trackContentRepository.GetFirstAsync(a => a.TrackStatusId==input.Id); if (isExistStatus!=null) { - throw new BusinessException(message: _stringLocalizer["IsExistTrackStatus"]); + //throw new BusinessException(message: _stringLocalizer["IsExistTrackStatus"]); + throw new BusinessException("轨迹内容已经绑定了该轨迹状态,请先删除轨迹内容后再删除该轨迹状态"); } #endregion var isTrue = await _trackStatusRepository.SoftDeleteAsync(x => x.Id == input.Id);