|
|
|
@ -75,7 +75,7 @@ namespace Shentun.Peis.Devices |
|
|
|
DataHelper.CheckEntityIsNull(sourceEntity); |
|
|
|
Verify(targetEntity); |
|
|
|
|
|
|
|
var existEntity = await _deviceRepository.FirstOrDefaultAsync(o => o.DeviceCode == sourceEntity.DeviceCode && o.Id != sourceEntity.Id); |
|
|
|
var existEntity = await _deviceRepository.FirstOrDefaultAsync(o => o.DeviceCode == sourceEntity.DeviceCode && o.Id != targetEntity.Id); |
|
|
|
if (existEntity != null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException("编码已存在"); |
|
|
|
|