fix internal

This commit is contained in:
2024-12-12 15:54:40 +08:00
parent cae280218e
commit 3e08b63cbf

View File

@@ -43,6 +43,7 @@ public class AppointmentService : IAppointmentService
await _dbContext.InsertAsync(mst); await _dbContext.InsertAsync(mst);
var invalids = new[] { GainfoUserTypeEnumType.Normal, GainfoUserTypeEnumType.SecurityWhite };
foreach (var item in request.Items) foreach (var item in request.Items)
{ {
if (item.IsEnterDoorArea && areas.Where(x => x.Type == AppointmentAreaEnumType.Door) if (item.IsEnterDoorArea && areas.Where(x => x.Type == AppointmentAreaEnumType.Door)
@@ -82,7 +83,7 @@ public class AppointmentService : IAppointmentService
} }
else else
{ {
(gainfo.Type != GainfoUserTypeEnumType.External && item.IsEnterDoorArea).ThrowIfTrue("内部人员无法发起门岗预约"); (invalids.Contains(gainfo.Type) && item.IsEnterDoorArea).ThrowIfTrue("内部人员无法发起门岗预约");
if (gainfo.Type == GainfoUserTypeEnumType.External) if (gainfo.Type == GainfoUserTypeEnumType.External)
{ {