Merge pull request '修改提示语' (#26) from S01-轨迹中台 into test

Reviewed-on: http://192.168.80.50:3000/Dotnet/SJZY.Track.Api/pulls/26
This commit is contained in:
liuwenxiang 2024-03-02 14:46:40 +08:00
commit 48bb84a2fd

View File

@ -203,14 +203,14 @@ namespace SJZY.Track.Application.Services.TrackContents
{ {
if (input.Options != OptionTypeNoNull.删除) if (input.Options != OptionTypeNoNull.删除)
{ {
if (input.TrackContentId == input.MapTrackContentId) throw new BusinessException(message: _stringLocalizer["IsTrackContentMapAny"]); if (input.SubSystemId == input.MapSubSystemId) throw new BusinessException(message: _stringLocalizer["NotAllowedToMapSubSystem"]);
Expression<Func<TrackContentMapEntity, bool>> isMapAnyExp = x => Expression<Func<TrackContentMapEntity, bool>> isMapAnyExp = x =>
x.TrackContentId == input.TrackContentId && x.MapTrackContentId == input.MapTrackContentId; x.TrackContentId == input.TrackContentId && x.MapTrackContentId == input.MapTrackContentId;
if (input.Options == OptionTypeNoNull.修改) isMapAnyExp.And(x => x.Id != input.Id); if (input.Options == OptionTypeNoNull.修改) isMapAnyExp.And(x => x.Id != input.Id);
if (await _trackContentRepository.IsMapAnyAsync(isMapAnyExp)) if (await _trackContentRepository.IsMapAnyAsync(isMapAnyExp))
throw new BusinessException(message: _stringLocalizer["NotAllowedToMapOneself"]); throw new BusinessException(message: _stringLocalizer["IsTrackContentMapAny"]);
} }
switch (input.Options) switch (input.Options)