fix 增加字段IsEnterDoorArea

This commit is contained in:
2024-09-11 10:40:26 +08:00
parent e050d56496
commit 57ec12a1d3
3 changed files with 12 additions and 2 deletions

View File

@@ -51,6 +51,11 @@ public class VisitorAppointmentDetailEntity : SugarBaseEntity
[SugarColumn(ColumnDescription = "车牌")]
public string LicensePlate { get; set; }
/// <summary>
/// 进入门岗
/// </summary>
public bool IsEnterDoorArea { get; set; }
/// <summary>
/// 预约门禁区域
/// </summary>

View File

@@ -45,6 +45,10 @@ public class AppointmentReceiveItemDto : IValidatableObject
/// </summary>
public string ImageUrl { get; set; }
/// <summary>
/// 进入门岗
/// </summary>
public bool IsEnterDoorArea { get; set; }
/// <summary>
/// 预约门岗区域
@@ -63,7 +67,7 @@ public class AppointmentReceiveItemDto : IValidatableObject
public DateTime DoorEnd { get; set; }
/// <summary>
/// 是否进入车间
/// 进入车间
/// </summary>
public bool IsEnterWorkplace { get; set; }

View File

@@ -88,12 +88,13 @@ public class AppointmentService : IAppointmentService
Name = item.Name,
Phone = item.Phone,
Remark = item.Remark,
DoorStatus = areas.Where(x => x.Type == AppointmentAreaEnumType.Door)
DoorStatus = item.IsEnterDoorArea && areas.Where(x => x.Type == AppointmentAreaEnumType.Door)
.Select(x => x.CustomCode)
.Contains(item.ApplyDoorArea)
? VisitorAppointmentDetailStatusEnumType.Wait
: VisitorAppointmentDetailStatusEnumType.Obsolete,
LicensePlate = item.LicensePlate,
IsEnterDoorArea = item.IsEnterDoorArea,
ApplyDoorArea = item.ApplyDoorArea,
DoorStart = item.DoorStart,
DoorEnd = item.DoorEnd,