轨迹状态提示语
This commit is contained in:
parent
2dc9c7f31b
commit
e9128e1985
@ -87,10 +87,10 @@ public class TrackStatusService : ApplicationService, ITransientDependency
|
|||||||
{
|
{
|
||||||
#region 业务校验
|
#region 业务校验
|
||||||
|
|
||||||
var trackStatusEntity = await _trackStatusRepository.GetFirstAsync(a => a.SubSystemId == input.SubSystemId &&
|
var trackStatusEntitys = await _trackStatusRepository.GetListAsync(a => a.SubSystemId == input.SubSystemId &&
|
||||||
(a.Code == input.Code ||
|
(a.Code == input.Code ||
|
||||||
a.Status == input.TrackStatus || a.EnStatus == input.EntrackStatus));
|
a.Status == input.TrackStatus || a.EnStatus == input.EntrackStatus));
|
||||||
if (trackStatusEntity != null)
|
if (trackStatusEntitys.Any())
|
||||||
{
|
{
|
||||||
//throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]);
|
//throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]);
|
||||||
throw new BusinessException("当前子系统下,轨迹状态代码或轨迹状态或轨迹状态英文存在");
|
throw new BusinessException("当前子系统下,轨迹状态代码或轨迹状态或轨迹状态英文存在");
|
||||||
@ -108,10 +108,10 @@ public class TrackStatusService : ApplicationService, ITransientDependency
|
|||||||
{
|
{
|
||||||
#region 业务校验
|
#region 业务校验
|
||||||
|
|
||||||
var trackStatusEntity = await _trackStatusRepository.GetFirstAsync(a => a.Id != input.Id &&
|
var trackStatusEntitys = await _trackStatusRepository.GetListAsync(a => a.Id != input.Id &&
|
||||||
a.SubSystemId == input.SubSystemId && (a.Code == input.Code ||
|
a.SubSystemId == input.SubSystemId && (a.Code == input.Code ||
|
||||||
a.Status == input.TrackStatus || a.EnStatus == input.EntrackStatus));
|
a.Status == input.TrackStatus || a.EnStatus == input.EntrackStatus));
|
||||||
if (trackStatusEntity != null)
|
if (trackStatusEntitys.Any())
|
||||||
{
|
{
|
||||||
//throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]);
|
//throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]);
|
||||||
throw new BusinessException("当前子系统下,轨迹状态代码或轨迹状态或轨迹状态英文存在");
|
throw new BusinessException("当前子系统下,轨迹状态代码或轨迹状态或轨迹状态英文存在");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user