Compare commits
No commits in common. "45c74694f2110902168340bf0450e18202d09e7a" and "ea4896749269fe65dc39fb296c1a26f18855889f" have entirely different histories.
45c74694f2
...
ea48967492
|
|
@ -4,7 +4,8 @@
|
|||
{
|
||||
public Guid? Id { get; set; }
|
||||
public Guid DoctorId { get; set; }
|
||||
|
||||
public DateTime BeginDate { get; set; }
|
||||
public DateTime EndDate { get; set; }
|
||||
public string Degree { get; set; } = String.Empty;
|
||||
public string Major { get; set; } = String.Empty;
|
||||
public string Organization { get; set; } = String.Empty;
|
||||
|
|
@ -19,20 +20,13 @@
|
|||
public string ProvinceCN { get; set; } = String.Empty;
|
||||
public string CityCN { get; set; } = String.Empty;
|
||||
|
||||
//public string BeginDate { get; set; }
|
||||
//public string EndDate { get; set; }
|
||||
|
||||
public DateTime? BeginDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class EducationInfoViewModel : EducationCommand
|
||||
{
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
public string BeginDateStr => BeginDate?.ToString("yyyy-MM");
|
||||
public string EndDateStr => EndDate?.ToString("yyyy-MM");
|
||||
public string BeginDateStr => BeginDate.ToString("yyyy-MM");
|
||||
public string EndDateStr => EndDate.ToString("yyyy-MM");
|
||||
|
||||
}
|
||||
public class PostgraduateCommand
|
||||
|
|
@ -40,9 +34,9 @@
|
|||
public Guid? Id { get; set; }
|
||||
public Guid DoctorId { get; set; }
|
||||
|
||||
public DateTime? BeginDate { get; set; }
|
||||
public DateTime BeginDate { get; set; }
|
||||
|
||||
public DateTime? EndDate { get; set; }
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
public string Training { get; set; } = String.Empty;
|
||||
|
||||
|
|
@ -78,10 +72,9 @@
|
|||
public class PostgraduateViewModel : PostgraduateCommand
|
||||
{
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public string BeginDateStr => BeginDate.ToString("yyyy-MM");
|
||||
|
||||
public string BeginDateStr => BeginDate?.ToString("yyyy-MM");
|
||||
|
||||
public string EndDateStr => EndDate?.ToString("yyyy-MM");
|
||||
public string EndDateStr => EndDate.ToString("yyyy-MM");
|
||||
}
|
||||
public class DoctorEducationExperienceDTO
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,23 +10,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
public DoctorConfig()
|
||||
{
|
||||
|
||||
// 从 DateTime 映射到 DateOnly
|
||||
CreateMap<DateTime, DateOnly>().ConvertUsing(dt => DateOnly.FromDateTime(dt));
|
||||
|
||||
// 从 DateOnly 映射到 DateTime,假设时间部分为 00:00:00
|
||||
|
||||
CreateMap<DateOnly, DateTime>().ConvertUsing(t => new DateTime(t.Year, t.Month, t.Day));
|
||||
|
||||
// 从 DateOnly? 映射到 DateTime?
|
||||
CreateMap<DateOnly?, DateTime?>()
|
||||
.ConvertUsing(t => t.HasValue ? new DateTime(t.Value.Year, t.Value.Month, t.Value.Day) : (DateTime?)null);
|
||||
|
||||
// 从 DateTime? 映射到 DateOnly?
|
||||
CreateMap<DateTime?, DateOnly?>()
|
||||
.ConvertUsing(dt => dt.HasValue ? DateOnly.FromDateTime(dt.Value) : (DateOnly?)null);
|
||||
|
||||
|
||||
#region reviewer
|
||||
|
||||
//基本信息 工作信息 添加时转换使用
|
||||
|
|
@ -55,6 +38,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<Education, EducationInfoViewModel>();
|
||||
|
||||
CreateMap<Vacation, VacationCommand>();
|
||||
CreateMap<Education, EducationInfoViewModel>();
|
||||
CreateMap<ResearchPublication, ResearchPublicationDTO>();
|
||||
CreateMap<Postgraduate, PostgraduateViewModel>();
|
||||
CreateMap<Attachment, AttachmentDTO>();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ public class Education : BaseFullAuditEntity
|
|||
#region 导航属性
|
||||
|
||||
#endregion
|
||||
public DateOnly? BeginDate { get; set; }
|
||||
public DateTime? BeginDate { get; set; }
|
||||
|
||||
|
||||
public string City { get; set; } = null!;
|
||||
|
|
@ -29,7 +29,7 @@ public class Education : BaseFullAuditEntity
|
|||
|
||||
public Guid DoctorId { get; set; }
|
||||
|
||||
public DateOnly? EndDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
|
||||
public string Major { get; set; } = null!;
|
||||
|
|
|
|||
|
|
@ -10,9 +10,11 @@ public class Postgraduate : BaseFullAuditEntity
|
|||
|
||||
public Guid DoctorId { get; set; }
|
||||
|
||||
public DateOnly? BeginDate { get; set; }
|
||||
[Column(TypeName = "date")]
|
||||
public DateTime? BeginDate { get; set; }
|
||||
|
||||
public DateOnly? EndDate { get; set; }
|
||||
[Column(TypeName = "date")]
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
|
||||
public string Training { get; set; } = string.Empty;
|
||||
|
|
|
|||
Loading…
Reference in New Issue