แก้บรรจุ
This commit is contained in:
parent
7876063288
commit
94c43e5479
11 changed files with 18442 additions and 428 deletions
|
|
@ -252,7 +252,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
{
|
||||
Sequence = seq,
|
||||
CitizenId = item.CitizenId!,
|
||||
Prefix = item.Prefix!.Name,
|
||||
Prefix = item.Prefix,
|
||||
FirstName = item.Firstname!,
|
||||
LastName = item.Lastname!,
|
||||
RefPlacementProfileId = item.Id,
|
||||
|
|
@ -317,7 +317,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
{
|
||||
Sequence = seq,
|
||||
CitizenId = item.CitizenId!,
|
||||
Prefix = item.Prefix!.Name,
|
||||
Prefix = item.Prefix,
|
||||
FirstName = item.Firstname!,
|
||||
LastName = item.Lastname!,
|
||||
RefPlacementProfileId = item.Id,
|
||||
|
|
@ -383,7 +383,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
{
|
||||
Sequence = seq,
|
||||
CitizenId = item.CitizenId!,
|
||||
Prefix = item.Prefix!.Name,
|
||||
Prefix = item.Prefix,
|
||||
FirstName = item.Firstname!,
|
||||
LastName = item.Lastname!,
|
||||
RefPlacementProfileId = item.Id,
|
||||
|
|
@ -448,7 +448,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
{
|
||||
Sequence = seq,
|
||||
CitizenId = item.CitizenId!,
|
||||
Prefix = item.Prefix!.Name,
|
||||
Prefix = item.Prefix,
|
||||
FirstName = item.Firstname!,
|
||||
LastName = item.Lastname!,
|
||||
RefPlacementProfileId = item.Id,
|
||||
|
|
@ -2675,7 +2675,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
/// </summary>
|
||||
/// <param name="command">object ของรายการคำสั่ง</param>
|
||||
/// <returns></returns>
|
||||
private async Task ExecuteCommand01_02Async(Command command, string token="")
|
||||
private async Task ExecuteCommand01_02Async(Command command, string token = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -2703,21 +2703,21 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PlacementProfileDocs)
|
||||
.ThenInclude(x => x.Document)
|
||||
|
||||
.Include(x => x.Prefix)
|
||||
.Include(x => x.FatherPrefix)
|
||||
.Include(x => x.MotherPrefix)
|
||||
.Include(x => x.MarryPrefix)
|
||||
.Include(x => x.Gender)
|
||||
.Include(x => x.Relationship)
|
||||
.Include(x => x.BloodGroup)
|
||||
.Include(x => x.Religion)
|
||||
// .Include(x => x.Prefix)
|
||||
// .Include(x => x.FatherPrefix)
|
||||
// .Include(x => x.MotherPrefix)
|
||||
// .Include(x => x.MarryPrefix)
|
||||
// .Include(x => x.Gender)
|
||||
// .Include(x => x.Relationship)
|
||||
// .Include(x => x.BloodGroup)
|
||||
// .Include(x => x.Religion)
|
||||
|
||||
.Include(x => x.RegistSubDistrict)
|
||||
.Include(x => x.RegistDistrict)
|
||||
.Include(x => x.RegistProvince)
|
||||
.Include(x => x.CurrentSubDistrict)
|
||||
.Include(x => x.CurrentDistrict)
|
||||
.Include(x => x.CurrentProvince)
|
||||
// .Include(x => x.RegistSubDistrict)
|
||||
// .Include(x => x.RegistDistrict)
|
||||
// .Include(x => x.RegistProvince)
|
||||
// .Include(x => x.CurrentSubDistrict)
|
||||
// .Include(x => x.CurrentDistrict)
|
||||
// .Include(x => x.CurrentProvince)
|
||||
|
||||
.Include(x => x.PositionPath)
|
||||
.Include(x => x.PositionPathSide)
|
||||
|
|
@ -2864,7 +2864,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
var _res = await client.PostAsJsonAsync(apiUrl, new
|
||||
{
|
||||
rank = string.Empty,
|
||||
prefix = placementProfile.Prefix.Name == null ? string.Empty : placementProfile.Prefix.Name,
|
||||
prefix = placementProfile.Prefix == null ? string.Empty : placementProfile.Prefix,
|
||||
firstName = placementProfile.Firstname == null ? string.Empty : placementProfile.Firstname,
|
||||
lastName = placementProfile.Lastname == null ? string.Empty : placementProfile.Lastname,
|
||||
citizenId = placementProfile.CitizenId == null ? string.Empty : placementProfile.CitizenId,
|
||||
|
|
@ -2886,9 +2886,9 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
ethnicity = placementProfile.Race == null ? string.Empty : placementProfile.Race,
|
||||
telephoneNumber = placementProfile.Telephone == null ? string.Empty : placementProfile.Telephone,
|
||||
nationality = placementProfile.Nationality == null ? string.Empty : placementProfile.Nationality,
|
||||
gender = placementProfile.Gender == null ? string.Empty : placementProfile.Gender.Name,
|
||||
relationship = placementProfile.Relationship == null ? string.Empty : placementProfile.Relationship.Name,
|
||||
religion = placementProfile.Religion == null ? string.Empty : placementProfile.Religion.Name,
|
||||
gender = placementProfile.Gender == null ? string.Empty : placementProfile.Gender,
|
||||
relationship = placementProfile.Relationship == null ? string.Empty : placementProfile.Relationship,
|
||||
religion = placementProfile.Religion == null ? string.Empty : placementProfile.Religion,
|
||||
bloodGroup = string.Empty,
|
||||
registrationAddress = placementProfile.RegistAddress == null ? string.Empty : placementProfile.RegistAddress,
|
||||
registrationProvinceId = (String?)null,
|
||||
|
|
@ -3260,21 +3260,21 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PlacementProfileDocs)
|
||||
.ThenInclude(x => x.Document)
|
||||
|
||||
.Include(x => x.Prefix)
|
||||
.Include(x => x.FatherPrefix)
|
||||
.Include(x => x.MotherPrefix)
|
||||
.Include(x => x.MarryPrefix)
|
||||
.Include(x => x.Gender)
|
||||
.Include(x => x.Relationship)
|
||||
.Include(x => x.BloodGroup)
|
||||
.Include(x => x.Religion)
|
||||
// .Include(x => x.Prefix)
|
||||
// .Include(x => x.FatherPrefix)
|
||||
// .Include(x => x.MotherPrefix)
|
||||
// .Include(x => x.MarryPrefix)
|
||||
// .Include(x => x.Gender)
|
||||
// .Include(x => x.Relationship)
|
||||
// .Include(x => x.BloodGroup)
|
||||
// .Include(x => x.Religion)
|
||||
|
||||
.Include(x => x.RegistSubDistrict)
|
||||
.Include(x => x.RegistDistrict)
|
||||
.Include(x => x.RegistProvince)
|
||||
.Include(x => x.CurrentSubDistrict)
|
||||
.Include(x => x.CurrentDistrict)
|
||||
.Include(x => x.CurrentProvince)
|
||||
// .Include(x => x.RegistSubDistrict)
|
||||
// .Include(x => x.RegistDistrict)
|
||||
// .Include(x => x.RegistProvince)
|
||||
// .Include(x => x.CurrentSubDistrict)
|
||||
// .Include(x => x.CurrentDistrict)
|
||||
// .Include(x => x.CurrentProvince)
|
||||
|
||||
.Include(x => x.PositionPath)
|
||||
.Include(x => x.PositionPathSide)
|
||||
|
|
@ -3537,21 +3537,21 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.ThenInclude(x => x.Document)
|
||||
|
||||
|
||||
.Include(x => x.Prefix)
|
||||
.Include(x => x.FatherPrefix)
|
||||
.Include(x => x.MotherPrefix)
|
||||
.Include(x => x.MarryPrefix)
|
||||
.Include(x => x.Gender)
|
||||
.Include(x => x.Relationship)
|
||||
.Include(x => x.BloodGroup)
|
||||
.Include(x => x.Religion)
|
||||
// .Include(x => x.Prefix)
|
||||
// .Include(x => x.FatherPrefix)
|
||||
// .Include(x => x.MotherPrefix)
|
||||
// .Include(x => x.MarryPrefix)
|
||||
// .Include(x => x.Gender)
|
||||
// .Include(x => x.Relationship)
|
||||
// .Include(x => x.BloodGroup)
|
||||
// .Include(x => x.Religion)
|
||||
|
||||
.Include(x => x.RegistSubDistrict)
|
||||
.Include(x => x.RegistDistrict)
|
||||
.Include(x => x.RegistProvince)
|
||||
.Include(x => x.CurrentSubDistrict)
|
||||
.Include(x => x.CurrentDistrict)
|
||||
.Include(x => x.CurrentProvince)
|
||||
// .Include(x => x.RegistSubDistrict)
|
||||
// .Include(x => x.RegistDistrict)
|
||||
// .Include(x => x.RegistProvince)
|
||||
// .Include(x => x.CurrentSubDistrict)
|
||||
// .Include(x => x.CurrentDistrict)
|
||||
// .Include(x => x.CurrentProvince)
|
||||
|
||||
.Include(x => x.PositionPath)
|
||||
.Include(x => x.PositionPathSide)
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
[Comment("Id บรรจุ")]
|
||||
public Placement? Placement { get; set; }
|
||||
[Comment("Id คำนำหน้า")]
|
||||
public Prefix? Prefix { get; set; }
|
||||
public string? Prefix { get; set; }
|
||||
[Comment("ชื่อ")]
|
||||
public string? Firstname { get; set; }
|
||||
[Comment("นามสกุล")]
|
||||
public string? Lastname { get; set; }
|
||||
[Comment("Id เพศ")]
|
||||
public Gender? Gender { get; set; }
|
||||
public string? Gender { get; set; }
|
||||
// [Comment("ลำดับที่สอบได้")]
|
||||
// public int? Number { get; set; }
|
||||
|
||||
|
|
@ -71,11 +71,11 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
public DateTime? DateOfBirth { get; set; }
|
||||
|
||||
[Comment("Id สถานภาพ")]
|
||||
public Relationship? Relationship { get; set; }
|
||||
public string? Relationship { get; set; }
|
||||
[Comment("Id กลุ่มเลือด")]
|
||||
public BloodGroup? BloodGroup { get; set; }
|
||||
public string? BloodGroup { get; set; }
|
||||
[Comment("Id ศาสนา")]
|
||||
public Religion? Religion { get; set; }
|
||||
public string? Religion { get; set; }
|
||||
|
||||
[MaxLength(200), Comment("อีเมล")]
|
||||
public string? Email { get; set; }
|
||||
|
|
@ -84,10 +84,10 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
public string? CitizenId { get; set; }
|
||||
|
||||
[Comment("Id เขตที่ออกบัตรประชาชน")]
|
||||
public District? CitizenDistrict { get; set; }
|
||||
public string? CitizenDistrictId { get; set; }
|
||||
|
||||
[Comment("Id จังหวัดที่ออกบัตรประชาชน")]
|
||||
public Province? CitizenProvince { get; set; }
|
||||
public string? CitizenProvinceId { get; set; }
|
||||
|
||||
[Comment("วันที่ออกบัตร")]
|
||||
public DateTime? CitizenDate { get; set; }
|
||||
|
|
@ -105,13 +105,13 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
public string? RegistAddress { get; set; }
|
||||
|
||||
[Comment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน")]
|
||||
public Province? RegistProvince { get; set; }
|
||||
public string? RegistProvinceId { get; set; }
|
||||
|
||||
[Comment("Id อำเภอที่อยู่ตามทะเบียนบ้าน")]
|
||||
public District? RegistDistrict { get; set; }
|
||||
public string? RegistDistrictId { get; set; }
|
||||
|
||||
[Comment("Id ตำบลที่อยู่ตามทะเบียนบ้าน")]
|
||||
public SubDistrict? RegistSubDistrict { get; set; }
|
||||
public string? RegistSubDistrictId { get; set; }
|
||||
|
||||
[MaxLength(10), Comment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน")]
|
||||
public string? RegistZipCode { get; set; }
|
||||
|
|
@ -123,13 +123,13 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
public string? CurrentAddress { get; set; }
|
||||
|
||||
[Comment("Id จังหวัดที่อยู่ปัจจุบัน")]
|
||||
public Province? CurrentProvince { get; set; }
|
||||
public string? CurrentProvinceId { get; set; }
|
||||
|
||||
[Comment("Id อำเภอที่อยู่ปัจจุบัน")]
|
||||
public District? CurrentDistrict { get; set; }
|
||||
public string? CurrentDistrictId { get; set; }
|
||||
|
||||
[Comment("Id ตำบลที่อยู่ปัจจุบัน")]
|
||||
public SubDistrict? CurrentSubDistrict { get; set; }
|
||||
public string? CurrentSubDistrictId { get; set; }
|
||||
|
||||
[MaxLength(10), Comment("รหัสไปรษณีย์ที่อยู่ปัจจุบัน")]
|
||||
public string? CurrentZipCode { get; set; }
|
||||
|
|
@ -138,7 +138,7 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
public bool? Marry { get; set; }
|
||||
|
||||
[Comment("Id คำนำหน้าชื่อคู่สมรส")]
|
||||
public Prefix? MarryPrefix { get; set; }
|
||||
public string? MarryPrefix { get; set; }
|
||||
|
||||
[MaxLength(100), Comment("ชื่อจริงคู่สมรส")]
|
||||
public string? MarryFirstName { get; set; }
|
||||
|
|
@ -153,7 +153,7 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
public string? MarryNationality { get; set; }
|
||||
|
||||
[Comment("Id คำนำหน้าชื่อบิดา")]
|
||||
public Prefix? FatherPrefix { get; set; }
|
||||
public string? FatherPrefix { get; set; }
|
||||
|
||||
[MaxLength(100), Comment("ชื่อจริงบิดา")]
|
||||
public string? FatherFirstName { get; set; }
|
||||
|
|
@ -168,7 +168,7 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
public string? FatherNationality { get; set; }
|
||||
|
||||
[Comment("Id คำนำหน้าชื่อมารดา")]
|
||||
public Prefix? MotherPrefix { get; set; }
|
||||
public string? MotherPrefix { get; set; }
|
||||
|
||||
[MaxLength(100), Comment("ชื่อจริงมารดา")]
|
||||
public string? MotherFirstName { get; set; }
|
||||
|
|
|
|||
17548
BMA.EHR.Infrastructure/Migrations/20240516093353_update table placement Add prefix.Designer.cs
generated
Normal file
17548
BMA.EHR.Infrastructure/Migrations/20240516093353_update table placement Add prefix.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,715 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableplacementAddprefix : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_BloodGroups_BloodGroupId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Districts_CitizenDistrictId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Districts_CurrentDistrictId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Districts_RegistDistrictId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Genders_GenderId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Prefixes_FatherPrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Prefixes_MarryPrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Prefixes_MotherPrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Prefixes_PrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Provinces_CitizenProvinceId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Provinces_CurrentProvinceId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Provinces_RegistProvinceId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Relationships_RelationshipId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_Religions_ReligionId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_SubDistricts_CurrentSubDistrictId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_SubDistricts_RegistSubDistrictId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_BloodGroupId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_CitizenDistrictId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_CitizenProvinceId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_CurrentDistrictId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_CurrentProvinceId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_CurrentSubDistrictId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_FatherPrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_GenderId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_MarryPrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_MotherPrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_PrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_RegistDistrictId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_RegistProvinceId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_RegistSubDistrictId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_RelationshipId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_ReligionId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BloodGroupId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FatherPrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GenderId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MarryPrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MotherPrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PrefixId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RelationshipId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ReligionId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "RegistSubDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id ตำบลที่อยู่ตามทะเบียนบ้าน",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "RegistProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id จังหวัดที่อยู่ตามทะเบียนบ้าน",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "RegistDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id อำเภอที่อยู่ตามทะเบียนบ้าน",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "CurrentSubDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id ตำบลที่อยู่ปัจจุบัน",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "CurrentProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id จังหวัดที่อยู่ปัจจุบัน",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "CurrentDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id อำเภอที่อยู่ปัจจุบัน",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "CitizenProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id จังหวัดที่ออกบัตรประชาชน",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "CitizenDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id เขตที่ออกบัตรประชาชน",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "BloodGroup",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id กลุ่มเลือด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FatherPrefix",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id คำนำหน้าชื่อบิดา")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Gender",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id เพศ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "MarryPrefix",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id คำนำหน้าชื่อคู่สมรส")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "MotherPrefix",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id คำนำหน้าชื่อมารดา")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Prefix",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id คำนำหน้า")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Relationship",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id สถานภาพ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Religion",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "Id ศาสนา")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BloodGroup",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FatherPrefix",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Gender",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MarryPrefix",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MotherPrefix",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Prefix",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Relationship",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Religion",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "RegistSubDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "Id ตำบลที่อยู่ตามทะเบียนบ้าน")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "RegistProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "Id จังหวัดที่อยู่ตามทะเบียนบ้าน")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "RegistDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "Id อำเภอที่อยู่ตามทะเบียนบ้าน")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "CurrentSubDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "Id ตำบลที่อยู่ปัจจุบัน")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "CurrentProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "Id จังหวัดที่อยู่ปัจจุบัน")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "CurrentDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "Id อำเภอที่อยู่ปัจจุบัน")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "CitizenProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "Id จังหวัดที่ออกบัตรประชาชน")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "CitizenDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "Id เขตที่ออกบัตรประชาชน")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "BloodGroupId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "FatherPrefixId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "GenderId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "MarryPrefixId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "MotherPrefixId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PrefixId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "RelationshipId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ReligionId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_BloodGroupId",
|
||||
table: "PlacementProfiles",
|
||||
column: "BloodGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_CitizenDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
column: "CitizenDistrictId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_CitizenProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
column: "CitizenProvinceId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_CurrentDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
column: "CurrentDistrictId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_CurrentProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
column: "CurrentProvinceId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_CurrentSubDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
column: "CurrentSubDistrictId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_FatherPrefixId",
|
||||
table: "PlacementProfiles",
|
||||
column: "FatherPrefixId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_GenderId",
|
||||
table: "PlacementProfiles",
|
||||
column: "GenderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_MarryPrefixId",
|
||||
table: "PlacementProfiles",
|
||||
column: "MarryPrefixId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_MotherPrefixId",
|
||||
table: "PlacementProfiles",
|
||||
column: "MotherPrefixId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_PrefixId",
|
||||
table: "PlacementProfiles",
|
||||
column: "PrefixId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_RegistDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
column: "RegistDistrictId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_RegistProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
column: "RegistProvinceId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_RegistSubDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
column: "RegistSubDistrictId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_RelationshipId",
|
||||
table: "PlacementProfiles",
|
||||
column: "RelationshipId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_ReligionId",
|
||||
table: "PlacementProfiles",
|
||||
column: "ReligionId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_BloodGroups_BloodGroupId",
|
||||
table: "PlacementProfiles",
|
||||
column: "BloodGroupId",
|
||||
principalTable: "BloodGroups",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Districts_CitizenDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
column: "CitizenDistrictId",
|
||||
principalTable: "Districts",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Districts_CurrentDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
column: "CurrentDistrictId",
|
||||
principalTable: "Districts",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Districts_RegistDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
column: "RegistDistrictId",
|
||||
principalTable: "Districts",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Genders_GenderId",
|
||||
table: "PlacementProfiles",
|
||||
column: "GenderId",
|
||||
principalTable: "Genders",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Prefixes_FatherPrefixId",
|
||||
table: "PlacementProfiles",
|
||||
column: "FatherPrefixId",
|
||||
principalTable: "Prefixes",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Prefixes_MarryPrefixId",
|
||||
table: "PlacementProfiles",
|
||||
column: "MarryPrefixId",
|
||||
principalTable: "Prefixes",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Prefixes_MotherPrefixId",
|
||||
table: "PlacementProfiles",
|
||||
column: "MotherPrefixId",
|
||||
principalTable: "Prefixes",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Prefixes_PrefixId",
|
||||
table: "PlacementProfiles",
|
||||
column: "PrefixId",
|
||||
principalTable: "Prefixes",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Provinces_CitizenProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
column: "CitizenProvinceId",
|
||||
principalTable: "Provinces",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Provinces_CurrentProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
column: "CurrentProvinceId",
|
||||
principalTable: "Provinces",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Provinces_RegistProvinceId",
|
||||
table: "PlacementProfiles",
|
||||
column: "RegistProvinceId",
|
||||
principalTable: "Provinces",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Relationships_RelationshipId",
|
||||
table: "PlacementProfiles",
|
||||
column: "RelationshipId",
|
||||
principalTable: "Relationships",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_Religions_ReligionId",
|
||||
table: "PlacementProfiles",
|
||||
column: "ReligionId",
|
||||
principalTable: "Religions",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_SubDistricts_CurrentSubDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
column: "CurrentSubDistrictId",
|
||||
principalTable: "SubDistricts",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_SubDistricts_RegistSubDistrictId",
|
||||
table: "PlacementProfiles",
|
||||
column: "RegistSubDistrictId",
|
||||
principalTable: "SubDistricts",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -11957,23 +11957,26 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("double")
|
||||
.HasComment("เงินเดือน");
|
||||
|
||||
b.Property<Guid?>("BloodGroupId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("BloodGroup")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id กลุ่มเลือด");
|
||||
|
||||
b.Property<DateTime?>("CitizenDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่ออกบัตร");
|
||||
|
||||
b.Property<Guid?>("CitizenDistrictId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("CitizenDistrictId")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id เขตที่ออกบัตรประชาชน");
|
||||
|
||||
b.Property<string>("CitizenId")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("varchar(20)")
|
||||
.HasComment("เลขประจำตัวประชาชน");
|
||||
|
||||
b.Property<Guid?>("CitizenProvinceId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("CitizenProvinceId")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id จังหวัดที่ออกบัตรประชาชน");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
|
|
@ -11998,14 +12001,17 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("ที่อยู่ปัจจุบัน");
|
||||
|
||||
b.Property<Guid?>("CurrentDistrictId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("CurrentDistrictId")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id อำเภอที่อยู่ปัจจุบัน");
|
||||
|
||||
b.Property<Guid?>("CurrentProvinceId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("CurrentProvinceId")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id จังหวัดที่อยู่ปัจจุบัน");
|
||||
|
||||
b.Property<Guid?>("CurrentSubDistrictId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("CurrentSubDistrictId")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id ตำบลที่อยู่ปัจจุบัน");
|
||||
|
||||
b.Property<string>("CurrentZipCode")
|
||||
.HasMaxLength(10)
|
||||
|
|
@ -12054,15 +12060,17 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(200)")
|
||||
.HasComment("อาชีพบิดา");
|
||||
|
||||
b.Property<Guid?>("FatherPrefixId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("FatherPrefix")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id คำนำหน้าชื่อบิดา");
|
||||
|
||||
b.Property<string>("Firstname")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ชื่อ");
|
||||
|
||||
b.Property<Guid?>("GenderId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("Gender")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id เพศ");
|
||||
|
||||
b.Property<bool?>("IsOfficer")
|
||||
.HasColumnType("tinyint(1)")
|
||||
|
|
@ -12127,8 +12135,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(200)")
|
||||
.HasComment("อาชีพคู่สมรส");
|
||||
|
||||
b.Property<Guid?>("MarryPrefixId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("MarryPrefix")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id คำนำหน้าชื่อคู่สมรส");
|
||||
|
||||
b.Property<string>("MobilePhone")
|
||||
.HasMaxLength(200)
|
||||
|
|
@ -12155,8 +12164,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(200)")
|
||||
.HasComment("อาชีพมารดา");
|
||||
|
||||
b.Property<Guid?>("MotherPrefixId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("MotherPrefix")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id คำนำหน้าชื่อมารดา");
|
||||
|
||||
b.Property<double?>("MouthSalaryAmount")
|
||||
.HasColumnType("double")
|
||||
|
|
@ -12268,8 +12278,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
b.Property<Guid?>("PositionTypeId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("PrefixId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("Prefix")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id คำนำหน้า");
|
||||
|
||||
b.Property<Guid?>("ProfileImgId")
|
||||
.HasColumnType("char(36)");
|
||||
|
|
@ -12287,18 +12298,21 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("ที่อยู่ตามทะเบียนบ้าน");
|
||||
|
||||
b.Property<Guid?>("RegistDistrictId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("RegistDistrictId")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id อำเภอที่อยู่ตามทะเบียนบ้าน");
|
||||
|
||||
b.Property<Guid?>("RegistProvinceId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("RegistProvinceId")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id จังหวัดที่อยู่ตามทะเบียนบ้าน");
|
||||
|
||||
b.Property<bool?>("RegistSame")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ที่อยู่ปัจจุบันเหมือนที่อยู่ตามทะเบียนบ้าน");
|
||||
|
||||
b.Property<Guid?>("RegistSubDistrictId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("RegistSubDistrictId")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id ตำบลที่อยู่ตามทะเบียนบ้าน");
|
||||
|
||||
b.Property<string>("RegistZipCode")
|
||||
.HasMaxLength(10)
|
||||
|
|
@ -12309,8 +12323,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("เหตุผลสละสิทธิ์");
|
||||
|
||||
b.Property<Guid?>("RelationshipId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("Relationship")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id สถานภาพ");
|
||||
|
||||
b.Property<Guid?>("ReliefDocId")
|
||||
.HasColumnType("char(36)");
|
||||
|
|
@ -12319,8 +12334,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("เหตุผลผ่อนผัน");
|
||||
|
||||
b.Property<Guid?>("ReligionId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("Religion")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("Id ศาสนา");
|
||||
|
||||
b.Property<string>("RemarkHorizontal")
|
||||
.HasColumnType("longtext")
|
||||
|
|
@ -12469,26 +12485,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BloodGroupId");
|
||||
|
||||
b.HasIndex("CitizenDistrictId");
|
||||
|
||||
b.HasIndex("CitizenProvinceId");
|
||||
|
||||
b.HasIndex("CurrentDistrictId");
|
||||
|
||||
b.HasIndex("CurrentProvinceId");
|
||||
|
||||
b.HasIndex("CurrentSubDistrictId");
|
||||
|
||||
b.HasIndex("FatherPrefixId");
|
||||
|
||||
b.HasIndex("GenderId");
|
||||
|
||||
b.HasIndex("MarryPrefixId");
|
||||
|
||||
b.HasIndex("MotherPrefixId");
|
||||
|
||||
b.HasIndex("OrganizationPositionId");
|
||||
|
||||
b.HasIndex("PlacementId");
|
||||
|
|
@ -12507,22 +12503,10 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasIndex("PositionTypeId");
|
||||
|
||||
b.HasIndex("PrefixId");
|
||||
|
||||
b.HasIndex("ProfileImgId");
|
||||
|
||||
b.HasIndex("RegistDistrictId");
|
||||
|
||||
b.HasIndex("RegistProvinceId");
|
||||
|
||||
b.HasIndex("RegistSubDistrictId");
|
||||
|
||||
b.HasIndex("RelationshipId");
|
||||
|
||||
b.HasIndex("ReliefDocId");
|
||||
|
||||
b.HasIndex("ReligionId");
|
||||
|
||||
b.ToTable("PlacementProfiles");
|
||||
});
|
||||
|
||||
|
|
@ -16844,46 +16828,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfile", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.BloodGroup", "BloodGroup")
|
||||
.WithMany()
|
||||
.HasForeignKey("BloodGroupId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CitizenDistrict")
|
||||
.WithMany()
|
||||
.HasForeignKey("CitizenDistrictId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CitizenProvince")
|
||||
.WithMany()
|
||||
.HasForeignKey("CitizenProvinceId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "CurrentDistrict")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentDistrictId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "CurrentProvince")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentProvinceId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "CurrentSubDistrict")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentSubDistrictId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "FatherPrefix")
|
||||
.WithMany()
|
||||
.HasForeignKey("FatherPrefixId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.Gender", "Gender")
|
||||
.WithMany()
|
||||
.HasForeignKey("GenderId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MarryPrefix")
|
||||
.WithMany()
|
||||
.HasForeignKey("MarryPrefixId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "MotherPrefix")
|
||||
.WithMany()
|
||||
.HasForeignKey("MotherPrefixId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationPositionEntity", "OrganizationPosition")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationPositionId");
|
||||
|
|
@ -16920,58 +16864,14 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.WithMany()
|
||||
.HasForeignKey("PositionTypeId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.Prefix", "Prefix")
|
||||
.WithMany()
|
||||
.HasForeignKey("PrefixId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProfileImgId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.District", "RegistDistrict")
|
||||
.WithMany()
|
||||
.HasForeignKey("RegistDistrictId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.Province", "RegistProvince")
|
||||
.WithMany()
|
||||
.HasForeignKey("RegistProvinceId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.SubDistrict", "RegistSubDistrict")
|
||||
.WithMany()
|
||||
.HasForeignKey("RegistSubDistrictId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.Relationship", "Relationship")
|
||||
.WithMany()
|
||||
.HasForeignKey("RelationshipId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ReliefDoc")
|
||||
.WithMany()
|
||||
.HasForeignKey("ReliefDocId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.Religion", "Religion")
|
||||
.WithMany()
|
||||
.HasForeignKey("ReligionId");
|
||||
|
||||
b.Navigation("BloodGroup");
|
||||
|
||||
b.Navigation("CitizenDistrict");
|
||||
|
||||
b.Navigation("CitizenProvince");
|
||||
|
||||
b.Navigation("CurrentDistrict");
|
||||
|
||||
b.Navigation("CurrentProvince");
|
||||
|
||||
b.Navigation("CurrentSubDistrict");
|
||||
|
||||
b.Navigation("FatherPrefix");
|
||||
|
||||
b.Navigation("Gender");
|
||||
|
||||
b.Navigation("MarryPrefix");
|
||||
|
||||
b.Navigation("MotherPrefix");
|
||||
|
||||
b.Navigation("OrganizationPosition");
|
||||
|
||||
b.Navigation("Placement");
|
||||
|
|
@ -16990,21 +16890,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.Navigation("PositionType");
|
||||
|
||||
b.Navigation("Prefix");
|
||||
|
||||
b.Navigation("ProfileImg");
|
||||
|
||||
b.Navigation("RegistDistrict");
|
||||
|
||||
b.Navigation("RegistProvince");
|
||||
|
||||
b.Navigation("RegistSubDistrict");
|
||||
|
||||
b.Navigation("Relationship");
|
||||
|
||||
b.Navigation("ReliefDoc");
|
||||
|
||||
b.Navigation("Religion");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Placement.PlacementProfileDoc", b =>
|
||||
|
|
|
|||
|
|
@ -639,8 +639,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("report/{commandTypeId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> PostToReport([FromBody] PlacementProfileRequest req, Guid commandTypeId)
|
||||
[HttpPut("report")]
|
||||
public async Task<ActionResult<ResponseObject>> PostToReport([FromBody] PlacementProfileRequest req)
|
||||
{
|
||||
foreach (var item in req.Id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -625,8 +625,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("report/{commandTypeId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> PostToReport([FromBody] PlacementProfileRequest req, Guid commandTypeId)
|
||||
[HttpPost("report")]
|
||||
public async Task<ActionResult<ResponseObject>> PostToReport([FromBody] PlacementProfileRequest req)
|
||||
{
|
||||
foreach (var item in req.Id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
{
|
||||
PersonalId = x.Id,
|
||||
Avatar = x.ProfileImg == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.ProfileImg.Id,
|
||||
FullName = x.Prefix == null ? null : x.Prefix.Name + $"{x.Firstname} {x.Lastname}",
|
||||
FullName = $"{x.Prefix}{x.Firstname} {x.Lastname}",
|
||||
IdCard = x.CitizenId,
|
||||
ExamNumber = x.ExamNumber,
|
||||
posmasterId = x.posmasterId,
|
||||
|
|
@ -227,11 +227,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
|
||||
if (org == null || org.result == null)
|
||||
return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404);
|
||||
rootId = org.result.rootId == null?"":org.result.rootId;
|
||||
child1Id = org.result.child1Id == null?"":org.result.child1Id;
|
||||
child2Id = org.result.child2Id == null?"":org.result.child2Id;
|
||||
child3Id = org.result.child3Id == null?"":org.result.child3Id;
|
||||
child4Id = org.result.child4Id == null?"":org.result.child4Id;
|
||||
rootId = org.result.rootId == null ? "" : org.result.rootId;
|
||||
child1Id = org.result.child1Id == null ? "" : org.result.child1Id;
|
||||
child2Id = org.result.child2Id == null ? "" : org.result.child2Id;
|
||||
child3Id = org.result.child3Id == null ? "" : org.result.child3Id;
|
||||
child4Id = org.result.child4Id == null ? "" : org.result.child4Id;
|
||||
// return Success(new {rootId=rootId,child1Id=child1Id,child2Id=child2Id,child3Id=child3Id,child4Id=child4Id });
|
||||
var data = await _context.PlacementProfiles
|
||||
.Where(x => x.Placement.Id == examId)
|
||||
|
|
@ -241,7 +241,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
{
|
||||
PersonalId = x.Id,
|
||||
Avatar = x.ProfileImg == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.ProfileImg.Id,
|
||||
FullName = x.Prefix == null ? null : x.Prefix.Name + $"{x.Firstname} {x.Lastname}",
|
||||
FullName = $"{x.Prefix}{x.Firstname} {x.Lastname}",
|
||||
IdCard = x.CitizenId,
|
||||
ExamNumber = x.ExamNumber,
|
||||
posmasterId = x.posmasterId,
|
||||
|
|
@ -360,9 +360,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
{
|
||||
PersonalId = x.Id,
|
||||
IdCard = x.CitizenId,
|
||||
Prefix = x.Prefix == null ? null : x.Prefix.Name,
|
||||
PrefixId = x.Prefix == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.Prefix.Id,
|
||||
FullName = x.Prefix == null ? null : x.Prefix.Name + $"{x.Firstname} {x.Lastname}",
|
||||
Prefix = x.Prefix,
|
||||
FullName = $"{x.Prefix}{x.Firstname} {x.Lastname}",
|
||||
Firstname = x.Firstname,
|
||||
Lastname = x.Lastname,
|
||||
Nationality = x.Nationality,
|
||||
|
|
@ -373,19 +372,15 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
Telephone = x.Telephone,
|
||||
PositionCandidate = x.PositionCandidate == null ? null : x.PositionCandidate.Name,
|
||||
PositionCandidateId = x.PositionCandidate == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionCandidate.Id,
|
||||
Gender = x.Gender == null ? null : x.Gender.Name,
|
||||
GenderId = x.Gender == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.Gender.Id,
|
||||
Relationship = x.Relationship == null ? null : x.Relationship.Name,
|
||||
RelationshipId = x.Relationship == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.Relationship.Id,
|
||||
BloodGroup = x.BloodGroup == null ? null : x.BloodGroup.Name,
|
||||
BloodGroupId = x.BloodGroup == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.BloodGroup.Id,
|
||||
Religion = x.Religion == null ? null : x.Religion.Name,
|
||||
ReligionId = x.Religion == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.Religion.Id,
|
||||
Address = $"{x.RegistAddress}" +
|
||||
(x.RegistSubDistrict == null ? null : " แขวง") + (x.RegistSubDistrict == null ? null : x.RegistSubDistrict.Name) +
|
||||
(x.RegistDistrict == null ? null : " เขต") + (x.RegistDistrict == null ? null : x.RegistDistrict.Name) +
|
||||
(x.RegistProvince == null ? null : " จังหวัด") + (x.RegistProvince == null ? null : x.RegistProvince.Name) +
|
||||
(x.RegistSubDistrict == null ? null : " ") + (x.RegistSubDistrict == null ? null : x.RegistSubDistrict.ZipCode),
|
||||
Gender = x.Gender,
|
||||
Relationship = x.Relationship,
|
||||
BloodGroup = x.BloodGroup,
|
||||
Religion = x.Religion,
|
||||
// Address = $"{x.RegistAddress}" +
|
||||
// (x.RegistSubDistrict == null ? null : " แขวง") + (x.RegistSubDistrict == null ? null : x.RegistSubDistrict.Name) +
|
||||
// (x.RegistDistrict == null ? null : " เขต") + (x.RegistDistrict == null ? null : x.RegistDistrict.Name) +
|
||||
// (x.RegistProvince == null ? null : " จังหวัด") + (x.RegistProvince == null ? null : x.RegistProvince.Name) +
|
||||
// (x.RegistSubDistrict == null ? null : " ") + (x.RegistSubDistrict == null ? null : x.RegistSubDistrict.ZipCode),
|
||||
Education = x.PlacementEducations.Select(p => new
|
||||
{
|
||||
Id = p.Id,
|
||||
|
|
@ -409,35 +404,26 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
IsEducation = p.IsEducation,
|
||||
}),
|
||||
RegistAddress = x.RegistAddress,
|
||||
RegistSubDistrict = x.RegistSubDistrict == null ? null : x.RegistSubDistrict.Name,
|
||||
RegistSubDistrictId = x.RegistSubDistrict == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.RegistSubDistrict.Id,
|
||||
RegistZipCode = x.RegistSubDistrict == null ? null : x.RegistSubDistrict.ZipCode,
|
||||
RegistDistrict = x.RegistDistrict == null ? null : x.RegistDistrict.Name,
|
||||
RegistDistrictId = x.RegistDistrict == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.RegistDistrict.Id,
|
||||
RegistProvince = x.RegistProvince == null ? null : x.RegistProvince.Name,
|
||||
RegistProvinceId = x.RegistProvince == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.RegistProvince.Id,
|
||||
RegistSubDistrictId = x.RegistSubDistrictId,
|
||||
RegistZipCode = x.RegistZipCode,
|
||||
RegistDistrictId = x.RegistDistrictId,
|
||||
RegistProvinceId = x.RegistProvinceId,
|
||||
CurrentAddress = x.CurrentAddress,
|
||||
CurrentSubDistrict = x.CurrentSubDistrict == null ? null : x.CurrentSubDistrict.Name,
|
||||
CurrentSubDistrictId = x.CurrentSubDistrict == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.CurrentSubDistrict.Id,
|
||||
CurrentZipCode = x.CurrentSubDistrict == null ? null : x.CurrentSubDistrict.ZipCode,
|
||||
CurrentDistrict = x.CurrentDistrict == null ? null : x.CurrentDistrict.Name,
|
||||
CurrentDistrictId = x.CurrentDistrict == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.CurrentDistrict.Id,
|
||||
CurrentProvince = x.CurrentProvince == null ? null : x.CurrentProvince.Name,
|
||||
CurrentProvinceId = x.CurrentProvince == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.CurrentProvince.Id,
|
||||
CurrentSubDistrictId = x.CurrentSubDistrictId,
|
||||
CurrentZipCode = x.CurrentZipCode,
|
||||
CurrentDistrictId = x.CurrentDistrictId,
|
||||
CurrentProvinceId = x.CurrentProvinceId,
|
||||
RegistSame = x.RegistSame,
|
||||
MarryPrefix = x.MarryPrefix == null ? null : x.MarryPrefix.Name,
|
||||
MarryPrefixId = x.MarryPrefix == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.MarryPrefix.Id,
|
||||
MarryPrefix = x.MarryPrefix,
|
||||
Couple = x.Marry,
|
||||
MarryFirstName = x.MarryFirstName,
|
||||
MarryLastName = x.MarryLastName,
|
||||
MarryOccupation = x.MarryOccupation,
|
||||
FatherPrefix = x.FatherPrefix == null ? null : x.FatherPrefix.Name,
|
||||
FatherPrefixId = x.FatherPrefix == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.FatherPrefix.Id,
|
||||
FatherPrefix = x.FatherPrefix,
|
||||
FatherFirstName = x.FatherFirstName,
|
||||
FatherLastName = x.FatherLastName,
|
||||
FatherOccupation = x.FatherOccupation,
|
||||
MotherPrefix = x.MotherPrefix == null ? null : x.MotherPrefix.Name,
|
||||
MotherPrefixId = x.MotherPrefix == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.MotherPrefix.Id,
|
||||
MotherPrefix = x.MotherPrefix,
|
||||
MotherFirstName = x.MotherFirstName,
|
||||
MotherLastName = x.MotherLastName,
|
||||
MotherOccupation = x.MotherOccupation,
|
||||
|
|
@ -485,7 +471,6 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
data.PersonalId,
|
||||
data.IdCard,
|
||||
data.Prefix,
|
||||
data.PrefixId,
|
||||
data.FullName,
|
||||
data.Firstname,
|
||||
data.Lastname,
|
||||
|
|
@ -498,45 +483,32 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
data.PositionCandidate,
|
||||
data.PositionCandidateId,
|
||||
data.Gender,
|
||||
data.GenderId,
|
||||
data.Relationship,
|
||||
data.RelationshipId,
|
||||
data.BloodGroup,
|
||||
data.BloodGroupId,
|
||||
data.Religion,
|
||||
data.ReligionId,
|
||||
data.Address,
|
||||
// data.Address,
|
||||
data.Education,
|
||||
data.RegistAddress,
|
||||
data.RegistSubDistrict,
|
||||
data.RegistSubDistrictId,
|
||||
data.RegistZipCode,
|
||||
data.RegistDistrict,
|
||||
data.RegistDistrictId,
|
||||
data.RegistProvince,
|
||||
data.RegistProvinceId,
|
||||
data.CurrentAddress,
|
||||
data.CurrentSubDistrict,
|
||||
data.CurrentSubDistrictId,
|
||||
data.CurrentZipCode,
|
||||
data.CurrentDistrict,
|
||||
data.CurrentDistrictId,
|
||||
data.CurrentProvince,
|
||||
data.CurrentProvinceId,
|
||||
data.RegistSame,
|
||||
data.MarryPrefix,
|
||||
data.MarryPrefixId,
|
||||
data.Couple,
|
||||
data.MarryFirstName,
|
||||
data.MarryLastName,
|
||||
data.MarryOccupation,
|
||||
data.FatherPrefix,
|
||||
data.FatherPrefixId,
|
||||
data.FatherFirstName,
|
||||
data.FatherLastName,
|
||||
data.FatherOccupation,
|
||||
data.MotherPrefix,
|
||||
data.MotherPrefixId,
|
||||
data.MotherFirstName,
|
||||
data.MotherLastName,
|
||||
data.MotherOccupation,
|
||||
|
|
@ -797,52 +769,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
if (person == null)
|
||||
return Error(GlobalMessages.DataNotFound, 404);
|
||||
|
||||
if (req.PrefixId != null)
|
||||
{
|
||||
var save = await _context.Prefixes
|
||||
.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == req.PrefixId);
|
||||
if (save == null)
|
||||
return Error(GlobalMessages.PrefixNotFound, 404);
|
||||
person.Prefix = save;
|
||||
}
|
||||
if (req.GenderId != null)
|
||||
{
|
||||
var save = await _context.Genders
|
||||
.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == req.GenderId);
|
||||
if (save == null)
|
||||
return Error(GlobalMessages.GenderNotFound, 404);
|
||||
person.Gender = save;
|
||||
}
|
||||
if (req.RelationshipId != null)
|
||||
{
|
||||
var save = await _context.Relationships
|
||||
.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == req.RelationshipId);
|
||||
if (save == null)
|
||||
return Error(GlobalMessages.RelationshipNotFound, 404);
|
||||
person.Relationship = save;
|
||||
}
|
||||
if (req.BloodGroupId != null)
|
||||
{
|
||||
var save = await _context.BloodGroups
|
||||
.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == req.BloodGroupId);
|
||||
if (save == null)
|
||||
return Error(GlobalMessages.BloodGroupNotFound, 404);
|
||||
person.BloodGroup = save;
|
||||
}
|
||||
if (req.ReligionId != null)
|
||||
{
|
||||
var save = await _context.Religions
|
||||
.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == req.ReligionId);
|
||||
if (save == null)
|
||||
return Error(GlobalMessages.ReligionNotFound, 404);
|
||||
person.Religion = save;
|
||||
}
|
||||
|
||||
person.Prefix = req.Prefix;
|
||||
person.Gender = req.Gender;
|
||||
person.Relationship = req.Relationship;
|
||||
person.BloodGroup = req.BloodGroup;
|
||||
person.Religion = req.Religion;
|
||||
person.CitizenId = req.CitizenId;
|
||||
person.Firstname = req.FirstName;
|
||||
person.Lastname = req.LastName;
|
||||
|
|
@ -865,55 +796,14 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
if (person == null)
|
||||
return Error(GlobalMessages.DataNotFound, 404);
|
||||
|
||||
if (req.RegistrationSubDistrictId != null)
|
||||
{
|
||||
var save = await _context.SubDistricts.FindAsync(req.RegistrationSubDistrictId);
|
||||
if (save == null)
|
||||
return Error(GlobalMessages.SubDistrictNotFound, 404);
|
||||
person.RegistSubDistrict = save;
|
||||
person.RegistZipCode = save.ZipCode;
|
||||
}
|
||||
|
||||
if (req.RegistrationDistrictId != null)
|
||||
{
|
||||
var save = await _context.Districts.FindAsync(req.RegistrationDistrictId);
|
||||
if (save == null)
|
||||
return Error(GlobalMessages.DistrictNotFound, 404);
|
||||
person.RegistDistrict = save;
|
||||
}
|
||||
|
||||
if (req.RegistrationProvinceId != null)
|
||||
{
|
||||
var save = await _context.Provinces.FindAsync(req.RegistrationProvinceId);
|
||||
if (save == null)
|
||||
return Error(GlobalMessages.ProvinceNotFound, 404);
|
||||
person.RegistProvince = save;
|
||||
}
|
||||
|
||||
if (req.CurrentSubDistrictId != null)
|
||||
{
|
||||
var save = await _context.SubDistricts.FindAsync(req.CurrentSubDistrictId);
|
||||
if (save == null)
|
||||
return Error(GlobalMessages.SubDistrictNotFound, 404);
|
||||
person.CurrentSubDistrict = save;
|
||||
person.CurrentZipCode = save.ZipCode;
|
||||
}
|
||||
|
||||
if (req.CurrentDistrictId != null)
|
||||
{
|
||||
var save = await _context.Districts.FindAsync(req.CurrentDistrictId);
|
||||
if (save == null)
|
||||
return Error(GlobalMessages.DistrictNotFound, 404);
|
||||
person.CurrentDistrict = save;
|
||||
}
|
||||
|
||||
if (req.CurrentProvinceId != null)
|
||||
{
|
||||
var save = await _context.Provinces.FindAsync(req.CurrentProvinceId);
|
||||
if (save == null)
|
||||
return Error(GlobalMessages.ProvinceNotFound, 404);
|
||||
person.CurrentProvince = save;
|
||||
}
|
||||
person.RegistSubDistrictId = req.RegistrationSubDistrictId;
|
||||
person.RegistZipCode = req.RegistrationZipCode;
|
||||
person.RegistDistrictId = req.RegistrationDistrictId;
|
||||
person.RegistProvinceId = req.RegistrationProvinceId;
|
||||
person.CurrentSubDistrictId = req.CurrentSubDistrictId;
|
||||
person.CurrentZipCode = req.CurrentZipCode;
|
||||
person.CurrentDistrictId = req.CurrentDistrictId;
|
||||
person.CurrentProvinceId = req.CurrentProvinceId;
|
||||
person.CurrentAddress = req.CurrentAddress;
|
||||
person.RegistAddress = req.RegistrationAddress;
|
||||
person.RegistSame = req.RegistrationSame;
|
||||
|
|
@ -932,36 +822,9 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
if (person == null)
|
||||
return Error(GlobalMessages.DataNotFound, 404);
|
||||
|
||||
if (req.Couple == true && req.CouplePrefixId != null)
|
||||
{
|
||||
var save_prefix = await _context.Prefixes
|
||||
.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == req.CouplePrefixId);
|
||||
if (save_prefix == null)
|
||||
return Error(GlobalMessages.PrefixNotFound, 404);
|
||||
person.MarryPrefix = save_prefix;
|
||||
}
|
||||
|
||||
if (req.FatherPrefixId != null)
|
||||
{
|
||||
var save_prefix = await _context.Prefixes
|
||||
.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == req.FatherPrefixId);
|
||||
if (save_prefix == null)
|
||||
return Error(GlobalMessages.PrefixNotFound, 404);
|
||||
person.FatherPrefix = save_prefix;
|
||||
}
|
||||
|
||||
if (req.MotherPrefixId != null)
|
||||
{
|
||||
var save_prefix = await _context.Prefixes
|
||||
.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == req.MotherPrefixId);
|
||||
if (save_prefix == null)
|
||||
return Error(GlobalMessages.PrefixNotFound, 404);
|
||||
person.MotherPrefix = save_prefix;
|
||||
}
|
||||
|
||||
person.MotherPrefix = req.MotherPrefix;
|
||||
person.FatherPrefix = req.FatherPrefix;
|
||||
person.MarryPrefix = req.CouplePrefix;
|
||||
person.Marry = req.Couple;
|
||||
person.MarryFirstName = req.CoupleFirstName;
|
||||
person.MarryLastName = req.CoupleLastName;
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@ namespace BMA.EHR.Placement.Service.Requests
|
|||
{
|
||||
public bool? RegistrationSame { get; set; }
|
||||
public string? RegistrationAddress { get; set; }
|
||||
public Guid? RegistrationSubDistrictId { get; set; }
|
||||
public Guid? RegistrationDistrictId { get; set; }
|
||||
public Guid? RegistrationProvinceId { get; set; }
|
||||
public string? RegistrationSubDistrictId { get; set; }
|
||||
public string? RegistrationDistrictId { get; set; }
|
||||
public string? RegistrationProvinceId { get; set; }
|
||||
public string? RegistrationZipCode { get; set; }
|
||||
public string? CurrentAddress { get; set; }
|
||||
public Guid? CurrentSubDistrictId { get; set; }
|
||||
public Guid? CurrentDistrictId { get; set; }
|
||||
public Guid? CurrentProvinceId { get; set; }
|
||||
public string? CurrentSubDistrictId { get; set; }
|
||||
public string? CurrentDistrictId { get; set; }
|
||||
public string? CurrentProvinceId { get; set; }
|
||||
public string? CurrentZipCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace BMA.EHR.Placement.Service.Requests
|
|||
public class PersonFamilyRequest
|
||||
{
|
||||
public bool? Couple { get; set; }
|
||||
public Guid? CouplePrefixId { get; set; }
|
||||
public string? CouplePrefix { get; set; }
|
||||
public string? CoupleFirstName { get; set; }
|
||||
public string? CoupleLastName { get; set; }
|
||||
public string? CoupleLastNameOld { get; set; }
|
||||
|
|
@ -14,14 +14,14 @@ namespace BMA.EHR.Placement.Service.Requests
|
|||
// public string? CoupleCitizenId { get; set; }
|
||||
// public bool CoupleLive { get; set; }
|
||||
|
||||
public Guid? FatherPrefixId { get; set; }
|
||||
public string? FatherPrefix { get; set; }
|
||||
public string? FatherFirstName { get; set; }
|
||||
public string? FatherLastName { get; set; }
|
||||
public string? FatherCareer { get; set; }
|
||||
// public string? FatherCitizenId { get; set; }
|
||||
// public bool FatherLive { get; set; }
|
||||
|
||||
public Guid? MotherPrefixId { get; set; }
|
||||
public string? MotherPrefix { get; set; }
|
||||
public string? MotherFirstName { get; set; }
|
||||
public string? MotherLastName { get; set; }
|
||||
public string? MotherCareer { get; set; }
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@ namespace BMA.EHR.Placement.Service.Requests
|
|||
public class PersonInformationRequest
|
||||
{
|
||||
public string? CitizenId { get; set; }
|
||||
public Guid? PrefixId { get; set; }
|
||||
public string? Prefix { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
public Guid? GenderId { get; set; }
|
||||
public string? Gender { get; set; }
|
||||
public string? Nationality { get; set; }
|
||||
public string? Race { get; set; }
|
||||
public Guid? ReligionId { get; set; }
|
||||
public string? Religion { get; set; }
|
||||
public DateTime? BirthDate { get; set; }
|
||||
public Guid? BloodGroupId { get; set; }
|
||||
public Guid? RelationshipId { get; set; }
|
||||
public string? BloodGroup { get; set; }
|
||||
public string? Relationship { get; set; }
|
||||
public string? TelephoneNumber { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue