轨迹状态校验
This commit is contained in:
parent
6ab8472a4c
commit
2dc9c7f31b
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user