fix 访客预约代码调整
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Dlhis.Basic.Appointment.Request;
|
||||
|
||||
public class AppointmentAreaAssignRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 预约区域编码
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string CustomCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组
|
||||
/// </summary>
|
||||
public List<Guid> DeviceCodes { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Dlhis.Entity.Visitor.Enums;
|
||||
using Kurisu.AspNetCore.DataAccess.Dto;
|
||||
|
||||
namespace Dlhis.Basic.Appointment.Request;
|
||||
|
||||
public class AppointmentAreaPageRequest : PageDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 区域类型
|
||||
/// </summary>
|
||||
[EnumDataType(typeof(AppointmentAreaEnumType))]
|
||||
public AppointmentAreaEnumType? Type { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Dlhis.Entity.Visitor.Enums;
|
||||
|
||||
namespace Dlhis.Basic.Appointment.Request;
|
||||
|
||||
public class AppointmentAreaSaveRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据id
|
||||
/// </summary>
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 区域 AppointmentAreaEnumType
|
||||
/// </summary>
|
||||
[EnumDataType(typeof(AppointmentAreaEnumType))]
|
||||
public AppointmentAreaEnumType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 编码
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "编码不能为空")]
|
||||
public string CustomCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Dlhis.Basic.Appointment.Request;
|
||||
|
||||
public class AppointmentConfirmRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 预约明细id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kurisu.AspNetCore.DataAccess.Dto;
|
||||
|
||||
namespace Dlhis.Basic.Appointment.Request;
|
||||
|
||||
public class AppointmentIdNoPageRequest : PageDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 身份证
|
||||
/// </summary>
|
||||
[StringLength(18, MinimumLength = 18, ErrorMessage = "身份证错误")]
|
||||
[Required(ErrorMessage = "身份证不可为空")]
|
||||
public string IdNo { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kurisu.AspNetCore.CustomClass;
|
||||
using Kurisu.AspNetCore.DataAccess.Dto;
|
||||
|
||||
namespace Dlhis.Basic.Appointment.Request;
|
||||
|
||||
public class AppointmentPageRequest : PageDto , IValidatableObject
|
||||
{
|
||||
public DateTimePeriod SearchDateTimePeriod { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (SearchDateTimePeriod.HasValue())
|
||||
{
|
||||
SearchDateTimePeriod.End = SearchDateTimePeriod.End!.Value.AddDays(1).AddSeconds(-1);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Dlhis.Basic.Appointment.Dto;
|
||||
|
||||
namespace Dlhis.Basic.Appointment.Request;
|
||||
|
||||
public class AppointmentReceiveRequest : IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 流水号
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "流水号必填")]
|
||||
public string FlowId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标题
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "标题必填")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对接人工号
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "对接人工号必填")]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对接人姓名
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "对接人姓名必填")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 申请时间
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "申请时间必填")]
|
||||
public DateTime ApplyTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 预约区域
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "申请预约区域必填")]
|
||||
public string ApplyArea { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来源公司
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "来源公司")]
|
||||
public string Company { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来访时间
|
||||
/// </summary>
|
||||
public DateTime Start { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 离开时间
|
||||
/// </summary>
|
||||
public DateTime End { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 厂区
|
||||
/// </summary>
|
||||
public string Factory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 明细
|
||||
/// </summary>
|
||||
[MinLength(1, ErrorMessage = "明细必填")]
|
||||
public List<AppointmentReceiveItemDto> Items { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (Start >= End)
|
||||
{
|
||||
yield return new ValidationResult("来访时间不能大于等于离开时间", new[] { nameof(Start), nameof(End) });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user