diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoCardService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoCardService.cs index 8957da51..b16421d4 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoCardService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoCardService.cs @@ -74,8 +74,12 @@ public class GainfoCardService : IGainfoCardService .Select(x => x.Code) .ToListAsync(); - await _gainfoPermissionService.ResetPermissionsAsync(userNo, DeviceTaskEnumType.Update, deviceCodes, "卡类型编辑下发"); gainfo.CardType = typeId; + + if (deviceCodes.IsPresent()) + { + await _gainfoPermissionService.ResetPermissionsAsync(userNo, DeviceTaskEnumType.Update, deviceCodes, "卡类型编辑下发"); + } } await _dbContext.UpdateAsync(gainfos);