แก้ model profile
This commit is contained in:
parent
6a0d548f22
commit
94df3aa6c3
7 changed files with 112 additions and 6 deletions
|
|
@ -248,10 +248,31 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
PositionLineId = placementProfile.PositionLine == null ? Guid.Empty : placementProfile.PositionLine.Id,
|
||||
IsVerified = true,
|
||||
IsProbation = true,
|
||||
Physical = "",
|
||||
Ability = "",
|
||||
AvatarRef = "",
|
||||
GovAgeAbsent = 0,
|
||||
GovAgePlus = 0,
|
||||
EntryStatus = "",
|
||||
IsTransfer = false,
|
||||
IsActive = true,
|
||||
IsLeave = false,
|
||||
VerifiedUser = "",
|
||||
FirstNameOld = "",
|
||||
LastNameOld = "",
|
||||
CoupleLive = false,
|
||||
FatherLive = false,
|
||||
MotherLive = false,
|
||||
|
||||
Educations = new List<ProfileEducation>(),
|
||||
Certificates = new List<ProfileCertificate>(),
|
||||
Salaries = new List<ProfileSalary>()
|
||||
Salaries = new List<ProfileSalary>(),
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
LastUpdateFullName = FullName ?? "System Administrator",
|
||||
LastUpdateUserId = UserId ?? "",
|
||||
};
|
||||
|
||||
// add profile education
|
||||
|
|
@ -272,6 +293,13 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
FundName = edu.FundName,
|
||||
Gpa = edu.Gpa,
|
||||
Institute = edu.Institute,
|
||||
IsActive = true,
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
LastUpdateFullName = FullName ?? "System Administrator",
|
||||
LastUpdateUserId = UserId ?? "",
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -285,6 +313,13 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
Issuer = cert.Issuer,
|
||||
CertificateType = cert.CertificateType,
|
||||
ExpireDate = cert.ExpireDate,
|
||||
IsActive = true,
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
LastUpdateFullName = FullName ?? "System Administrator",
|
||||
LastUpdateUserId = UserId ?? "",
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -336,13 +371,14 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
PositionExecutiveId = placementProfile.OrganizationPosition!.PositionMaster!.PositionExecutive! == null ? null : placementProfile.OrganizationPosition!.PositionMaster!.PositionExecutive!.Id,
|
||||
PositionExecutiveSideId = placementProfile.OrganizationPosition!.PositionMaster!.PositionExecutiveSide! == null ? null : placementProfile.OrganizationPosition!.PositionMaster!.PositionExecutiveSide!.Id,
|
||||
|
||||
IsActive = true,
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedFullName = FullName,
|
||||
CreatedUserId = UserId,
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
LastUpdateFullName = FullName,
|
||||
LastUpdateUserId = UserId,
|
||||
|
||||
LastUpdateFullName = FullName ?? "System Administrator",
|
||||
LastUpdateUserId = UserId ?? "",
|
||||
|
||||
};
|
||||
|
||||
//if (placementProfile.PositionPathSide! != null)
|
||||
|
|
@ -366,6 +402,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
{
|
||||
Profile = profile,
|
||||
OrganizationPosition = placementProfile.OrganizationPosition,
|
||||
IsActive = true,
|
||||
IsPublished = true,
|
||||
};
|
||||
_dbContext.Set<ProfilePosition>().Add(profilePosition);
|
||||
|
||||
|
|
@ -384,6 +422,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
Subject = $"คุณได้รับคำสั่งเลขที่ {command.CommandNo}/{command.CommandYear} ลงวันที่ {command.CommandExcecuteDate.Value.ToThaiFullDate3()}",
|
||||
Body = $"คุณได้รับบรรจุเป็นข้าราชการกรุงเทพมหานครสามัญ ตามคำสั่งเลขที่ {command.CommandNo}/{command.CommandYear} ลงวันที่ {command.CommandExcecuteDate.Value.ToThaiFullDate3()}",
|
||||
ReceiverUserId = profile.Id,
|
||||
Payload = "",
|
||||
};
|
||||
_dbContext.Set<Inbox>().Add(inbox);
|
||||
|
||||
|
|
@ -391,6 +430,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
{
|
||||
Body = $"คุณได้รับบรรจุเป็นข้าราชการกรุงเทพมหานครสามัญ ตามคำสั่งเลขที่ {command.CommandNo}/{command.CommandYear} ลงวันที่ {command.CommandExcecuteDate.Value.ToThaiFullDate3()}",
|
||||
ReceiverUserId = profile.Id,
|
||||
Type = "",
|
||||
Payload = "",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
|
@ -407,6 +448,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
Subject = $"คุณได้รับสำเนาคำสั่งเลขที่ {command.CommandNo}/{command.CommandYear} ลงวันที่ {command.CommandExcecuteDate.Value.ToThaiFullDate3()}",
|
||||
Body = $"คำสั่งบบรรจุเป็นข้าราชการกรุงเทพมหานครสามัญ คำสั่งเลขที่ {command.CommandNo}/{command.CommandYear} ลงวันที่ {command.CommandExcecuteDate.Value.ToThaiFullDate3()}",
|
||||
ReceiverUserId = pf.Id,
|
||||
Payload = "",
|
||||
};
|
||||
_dbContext.Set<Inbox>().Add(inbox);
|
||||
|
||||
|
|
@ -414,6 +456,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
{
|
||||
Body = $"คำสั่งบบรรจุเป็นข้าราชการกรุงเทพมหานครสามัญ คำสั่งเลขที่ {command.CommandNo}/{command.CommandYear} ลงวันที่ {command.CommandExcecuteDate.Value.ToThaiFullDate3()}",
|
||||
ReceiverUserId = pf.Id,
|
||||
Type = "",
|
||||
Payload = "",
|
||||
};
|
||||
_dbContext.Set<Notification>().Add(noti);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ namespace BMA.EHR.Domain.Models.HR
|
|||
public string? CoupleLastNameOld { get; set; }
|
||||
[MaxLength(100), Comment("อาชีพคู่สมรส")]
|
||||
public string? CoupleCareer { get; set; }
|
||||
[MaxLength(20), Comment("เลขที่บัตรประชาชนคู่สมรส")]
|
||||
public string? CoupleCitizenId { get; set; }
|
||||
|
||||
[Comment("มีชีวิตคู่สมรส")]
|
||||
public bool CoupleLive { get; set; } = true;
|
||||
[Comment("Id คำนำหน้าบิดา")]
|
||||
public Guid? FatherPrefixId { get; set; }
|
||||
[MaxLength(100), Comment("ชื่อบิดา")]
|
||||
|
|
@ -71,6 +76,11 @@ namespace BMA.EHR.Domain.Models.HR
|
|||
|
||||
[MaxLength(100), Comment("อาชีพบิดา")]
|
||||
public string? FatherCareer { get; set; }
|
||||
[MaxLength(20), Comment("เลขที่บัตรประชาชนบิดา")]
|
||||
public string? FatherCitizenId { get; set; }
|
||||
|
||||
[Comment("มีชีวิตบิดา")]
|
||||
public bool FatherLive { get; set; } = true;
|
||||
[Comment("Id คำนำหน้ามารดา")]
|
||||
public Guid? MotherPrefixId { get; set; }
|
||||
|
||||
|
|
@ -82,6 +92,11 @@ namespace BMA.EHR.Domain.Models.HR
|
|||
|
||||
[MaxLength(100), Comment("อาชีพมารดา")]
|
||||
public string? MotherCareer { get; set; }
|
||||
[MaxLength(20), Comment("เลขที่บัตรประชาชนมารดา")]
|
||||
public string? MotherCitizenId { get; set; }
|
||||
|
||||
[Comment("มีชีวิตมารดา")]
|
||||
public bool MotherLive { get; set; } = true;
|
||||
[MaxLength(200), Comment("ที่อยู่ปัจจุบัน")]
|
||||
public string? CurrentAddress { get; set; }
|
||||
[Comment("Id แขวงปัจจุบัน")]
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ namespace BMA.EHR.Domain.Models.HR
|
|||
// public string? CertiNumber { get; set; }
|
||||
// public DateTime? Start { get; set; }
|
||||
// public DateTime? End { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public virtual List<ProfileCertificateHistory> ProfileCertificateHistorys { get; set; } = new List<ProfileCertificateHistory>();
|
||||
public virtual Profile? Profile { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ namespace BMA.EHR.Domain.Models.HR
|
|||
public string? PositionPath { get; set; }
|
||||
[Comment("Id เป็นวุฒิการศึกษาในตำแหน่ง")]
|
||||
public Guid? PositionPathId { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public virtual List<ProfileEducationHistory> ProfileEducationHistorys { get; set; } = new List<ProfileEducationHistory>();
|
||||
public virtual Profile? Profile { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -60,5 +60,6 @@ namespace BMA.EHR.Domain.Models.HR
|
|||
|
||||
[Comment("ประเภทคำสั่ง")]
|
||||
public string CommandTypeName { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,7 @@ namespace BMA.EHR.Domain.Models.Organizations
|
|||
public OrganizationPositionEntity? OrganizationPosition { get; set; }
|
||||
|
||||
public Profile? Profile { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public bool IsPublished { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -829,6 +829,11 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(100)")
|
||||
.HasComment("อาชีพคู่สมรส");
|
||||
|
||||
b.Property<string>("CoupleCitizenId")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("varchar(20)")
|
||||
.HasComment("เลขที่บัตรประชาชนคู่สมรส");
|
||||
|
||||
b.Property<string>("CoupleFirstName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)")
|
||||
|
|
@ -844,6 +849,10 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(100)")
|
||||
.HasComment("นามสกุลคู่สมรส(เดิม)");
|
||||
|
||||
b.Property<bool>("CoupleLive")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("มีชีวิตคู่สมรส");
|
||||
|
||||
b.Property<Guid?>("CouplePrefixId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("Id คำนำหน้าคู่สมรส");
|
||||
|
|
@ -926,6 +935,11 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(100)")
|
||||
.HasComment("อาชีพบิดา");
|
||||
|
||||
b.Property<string>("FatherCitizenId")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("varchar(20)")
|
||||
.HasComment("เลขที่บัตรประชาชนบิดา");
|
||||
|
||||
b.Property<string>("FatherFirstName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)")
|
||||
|
|
@ -936,6 +950,10 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(100)")
|
||||
.HasComment("นามสกุลบิดา");
|
||||
|
||||
b.Property<bool>("FatherLive")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("มีชีวิตบิดา");
|
||||
|
||||
b.Property<Guid?>("FatherPrefixId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("Id คำนำหน้าบิดา");
|
||||
|
|
@ -1040,6 +1058,11 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(100)")
|
||||
.HasComment("อาชีพมารดา");
|
||||
|
||||
b.Property<string>("MotherCitizenId")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("varchar(20)")
|
||||
.HasComment("เลขที่บัตรประชาชนมารดา");
|
||||
|
||||
b.Property<string>("MotherFirstName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("varchar(100)")
|
||||
|
|
@ -1050,6 +1073,10 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(100)")
|
||||
.HasComment("นามสกุลมารดา");
|
||||
|
||||
b.Property<bool>("MotherLive")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("มีชีวิตมารดา");
|
||||
|
||||
b.Property<Guid?>("MotherPrefixId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("Id คำนำหน้ามารดา");
|
||||
|
|
@ -1828,6 +1855,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่หมดอายุ");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<DateTime?>("IssueDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่ออกใบอนุญาต");
|
||||
|
|
@ -2737,6 +2767,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(1000)")
|
||||
.HasComment("สถานศึกษา");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
|
|
@ -4436,6 +4469,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วัน เดือน ปี รับตำแหน่ง");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
|
|
@ -9384,6 +9420,12 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("IsPublished")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue