Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
a9a67c1db2
|
@ -4,8 +4,7 @@
|
||||||
{
|
{
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
public Guid DoctorId { 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 Degree { get; set; } = String.Empty;
|
||||||
public string Major { get; set; } = String.Empty;
|
public string Major { get; set; } = String.Empty;
|
||||||
public string Organization { get; set; } = String.Empty;
|
public string Organization { get; set; } = String.Empty;
|
||||||
|
@ -20,13 +19,20 @@
|
||||||
public string ProvinceCN { get; set; } = String.Empty;
|
public string ProvinceCN { get; set; } = String.Empty;
|
||||||
public string CityCN { 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 class EducationInfoViewModel : EducationCommand
|
||||||
{
|
{
|
||||||
public DateTime? CreateTime { get; set; }
|
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
|
public class PostgraduateCommand
|
||||||
|
@ -34,9 +40,9 @@
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
public Guid DoctorId { 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;
|
public string Training { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
@ -72,9 +78,10 @@
|
||||||
public class PostgraduateViewModel : PostgraduateCommand
|
public class PostgraduateViewModel : PostgraduateCommand
|
||||||
{
|
{
|
||||||
public DateTime? CreateTime { get; set; }
|
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 DoctorEducationExperienceDTO
|
public class DoctorEducationExperienceDTO
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,6 +10,23 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
public DoctorConfig()
|
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
|
#region reviewer
|
||||||
|
|
||||||
//基本信息 工作信息 添加时转换使用
|
//基本信息 工作信息 添加时转换使用
|
||||||
|
@ -38,7 +55,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
CreateMap<Education, EducationInfoViewModel>();
|
CreateMap<Education, EducationInfoViewModel>();
|
||||||
|
|
||||||
CreateMap<Vacation, VacationCommand>();
|
CreateMap<Vacation, VacationCommand>();
|
||||||
CreateMap<Education, EducationInfoViewModel>();
|
|
||||||
CreateMap<ResearchPublication, ResearchPublicationDTO>();
|
CreateMap<ResearchPublication, ResearchPublicationDTO>();
|
||||||
CreateMap<Postgraduate, PostgraduateViewModel>();
|
CreateMap<Postgraduate, PostgraduateViewModel>();
|
||||||
CreateMap<Attachment, AttachmentDTO>();
|
CreateMap<Attachment, AttachmentDTO>();
|
||||||
|
|
|
@ -7,7 +7,7 @@ public class Education : BaseFullAuditEntity
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
public DateTime? BeginDate { get; set; }
|
public DateOnly? BeginDate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string City { get; set; } = null!;
|
public string City { get; set; } = null!;
|
||||||
|
@ -29,7 +29,7 @@ public class Education : BaseFullAuditEntity
|
||||||
|
|
||||||
public Guid DoctorId { get; set; }
|
public Guid DoctorId { get; set; }
|
||||||
|
|
||||||
public DateTime? EndDate { get; set; }
|
public DateOnly? EndDate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string Major { get; set; } = null!;
|
public string Major { get; set; } = null!;
|
||||||
|
|
|
@ -10,11 +10,9 @@ public class Postgraduate : BaseFullAuditEntity
|
||||||
|
|
||||||
public Guid DoctorId { get; set; }
|
public Guid DoctorId { get; set; }
|
||||||
|
|
||||||
[Column(TypeName = "date")]
|
public DateOnly? BeginDate { get; set; }
|
||||||
public DateTime? BeginDate { get; set; }
|
|
||||||
|
|
||||||
[Column(TypeName = "date")]
|
public DateOnly? EndDate { get; set; }
|
||||||
public DateTime? EndDate { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
public string Training { get; set; } = string.Empty;
|
public string Training { get; set; } = string.Empty;
|
||||||
|
|
Loading…
Reference in New Issue