แก้บรรจุผูกกับโครงสร้างใหม่
This commit is contained in:
parent
06af1fc632
commit
adada88230
6 changed files with 17266 additions and 19 deletions
|
|
@ -193,10 +193,10 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
[MaxLength(20), Comment("โทรศัพท์ บริษัท")]
|
||||
public string? OccupationTelephone { get; set; }
|
||||
|
||||
[Comment("Id ตำแหน่งเลขที่")]
|
||||
[Comment("ชื่อตำแหน่งเลขที่")]
|
||||
public PositionNumberEntity? PositionNumber { get; set; }
|
||||
|
||||
[Comment("Id ตำแหน่ง")]
|
||||
[Comment("ชื่อตำแหน่ง")]
|
||||
public PositionPath? PositionPath { get; set; }
|
||||
|
||||
[Comment("Id ด้าน/สาขา")]
|
||||
|
|
@ -260,6 +260,18 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
[Comment("id ตำแหน่ง")]
|
||||
public Guid? positionId { get; set; }
|
||||
|
||||
[Comment("ชื่อหน่วยงาน")]
|
||||
public string? organizationName { get; set; }
|
||||
|
||||
[Comment("ชื่อย่อหน่วยงาน")]
|
||||
public string? orgTreeShortName { get; set; }
|
||||
|
||||
[Comment("ชื่อตำแหน่งเลขที่")]
|
||||
public int? PosNumber { get; set; }
|
||||
|
||||
[Comment("ชื่อตำแหน่ง")]
|
||||
public string? PosPath { get; set; }
|
||||
|
||||
|
||||
[Comment("Id รูปโปรไฟล์")]
|
||||
public virtual Document? ProfileImg { get; set; }
|
||||
|
|
|
|||
17138
BMA.EHR.Infrastructure/Migrations/20240221072604_update table placement add shortname.Designer.cs
generated
Normal file
17138
BMA.EHR.Infrastructure/Migrations/20240221072604_update table placement add shortname.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,65 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableplacementaddshortname : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PosNumber",
|
||||
table: "PlacementProfiles",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "ชื่อตำแหน่งเลขที่");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PosPath",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "orgTreeShortName",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "organizationName",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PosNumber",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PosPath",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "orgTreeShortName",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "organizationName",
|
||||
table: "PlacementProfiles");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -11992,6 +11992,14 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("double")
|
||||
.HasComment("คะแนนเต็มภาค ค");
|
||||
|
||||
b.Property<int?>("PosNumber")
|
||||
.HasColumnType("int")
|
||||
.HasComment("ชื่อตำแหน่งเลขที่");
|
||||
|
||||
b.Property<string>("PosPath")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ชื่อตำแหน่ง");
|
||||
|
||||
b.Property<Guid?>("PositionCandidateId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
|
|
@ -12104,6 +12112,14 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("char(36)")
|
||||
.HasComment("id โครงสร้าง");
|
||||
|
||||
b.Property<string>("orgTreeShortName")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ชื่อย่อหน่วยงาน");
|
||||
|
||||
b.Property<string>("organizationName")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ชื่อหน่วยงาน");
|
||||
|
||||
b.Property<Guid?>("positionId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("id ตำแหน่ง");
|
||||
|
|
|
|||
|
|
@ -114,10 +114,12 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
ProfilePhoto = x.Id,
|
||||
PositionCandidate = x.PositionCandidate == null ? null : x.PositionCandidate.Name,
|
||||
PositionCandidateId = x.PositionCandidate == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionCandidate.Id,
|
||||
OrganizationName = x.OrganizationPosition == null ? null : (x.OrganizationPosition.Organization == null ? null : (x.OrganizationPosition.Organization.OrganizationOrganization == null ? null : x.OrganizationPosition.Organization.OrganizationOrganization.Name)),////
|
||||
// OrganizationName = x.OrganizationPosition == null ? null : (x.OrganizationPosition.Organization == null ? null : (x.OrganizationPosition.Organization.OrganizationOrganization == null ? null : x.OrganizationPosition.Organization.OrganizationOrganization.Name)),////
|
||||
OrganizationShortName = x.OrganizationPosition == null ? null : (x.OrganizationPosition.Organization == null ? null : (x.OrganizationPosition.Organization.OrganizationShortName == null ? null : x.OrganizationPosition.Organization.OrganizationShortName.Name)),////
|
||||
PositionNumber = x.PositionNumber == null ? null : x.PositionNumber.Name,
|
||||
PositionPath = x.PositionPath == null ? null : x.PositionPath.Name,
|
||||
PosNumber = x.PosNumber,
|
||||
PosPath = x.PosPath,
|
||||
organizationName = x.organizationName,
|
||||
orgTreeShortName = x.orgTreeShortName,
|
||||
ReportingDate = x.ReportingDate,
|
||||
BmaOfficer = x.IsOfficer,
|
||||
StatusId = x.PlacementStatus,
|
||||
|
|
@ -132,7 +134,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
|
||||
ContainDate = x.RecruitDate,
|
||||
OrganizationPositionId = x.OrganizationPosition == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.OrganizationPosition.Id,
|
||||
PosNoId = x.PositionNumber == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionNumber.Id,
|
||||
// PosNoId = x.PositionNumber == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionNumber.Id,
|
||||
// PositionId = x.PositionPath == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionPath.Id,
|
||||
PositionLevelId = x.PositionLevel == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionLevel.Id,
|
||||
PositionLineId = x.PositionLine == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionLine.Id,
|
||||
|
|
@ -155,10 +157,12 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
p.ProfilePhoto,
|
||||
p.PositionCandidate,
|
||||
p.PositionCandidateId,
|
||||
p.OrganizationName,
|
||||
// p.OrganizationName,
|
||||
p.OrganizationShortName,
|
||||
p.PositionNumber,
|
||||
p.PositionPath,
|
||||
p.PosNumber,
|
||||
p.PosPath,
|
||||
p.organizationName,
|
||||
p.orgTreeShortName,
|
||||
p.ReportingDate,
|
||||
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
||||
p.StatusId,
|
||||
|
|
@ -168,7 +172,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
|
||||
p.ContainDate,
|
||||
p.OrganizationPositionId,
|
||||
p.PosNoId,
|
||||
// p.PosNoId,
|
||||
// p.PositionId,
|
||||
p.PositionLevelId,
|
||||
p.PositionLineId,
|
||||
|
|
@ -208,10 +212,12 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
ProfilePhoto = x.Id,
|
||||
PositionCandidate = x.PositionCandidate == null ? null : x.PositionCandidate.Name,
|
||||
PositionCandidateId = x.PositionCandidate == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionCandidate.Id,
|
||||
OrganizationName = x.OrganizationPosition == null ? null : (x.OrganizationPosition.Organization == null ? null : (x.OrganizationPosition.Organization.OrganizationOrganization == null ? null : x.OrganizationPosition.Organization.OrganizationOrganization.Name)),////
|
||||
// OrganizationName = x.OrganizationPosition == null ? null : (x.OrganizationPosition.Organization == null ? null : (x.OrganizationPosition.Organization.OrganizationOrganization == null ? null : x.OrganizationPosition.Organization.OrganizationOrganization.Name)),////
|
||||
OrganizationShortName = x.OrganizationPosition == null ? null : (x.OrganizationPosition.Organization == null ? null : (x.OrganizationPosition.Organization.OrganizationShortName == null ? null : x.OrganizationPosition.Organization.OrganizationShortName.Name)),////
|
||||
PositionNumber = x.PositionNumber == null ? null : x.PositionNumber.Name,
|
||||
PositionPath = x.PositionPath == null ? null : x.PositionPath.Name,
|
||||
PosNumber = x.PosNumber,
|
||||
PosPath = x.PosPath,
|
||||
organizationName = x.organizationName,
|
||||
orgTreeShortName = x.orgTreeShortName,
|
||||
ReportingDate = x.ReportingDate,
|
||||
BmaOfficer = x.IsOfficer,
|
||||
StatusId = x.PlacementStatus,
|
||||
|
|
@ -226,7 +232,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
|
||||
ContainDate = x.RecruitDate,
|
||||
OrganizationPositionId = x.OrganizationPosition == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.OrganizationPosition.Id,
|
||||
PosNoId = x.PositionNumber == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionNumber.Id,
|
||||
// PosNoId = x.PositionNumber == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionNumber.Id,
|
||||
// PositionId = x.PositionPath == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionPath.Id,
|
||||
PositionLevelId = x.PositionLevel == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionLevel.Id,
|
||||
PositionLineId = x.PositionLine == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionLine.Id,
|
||||
|
|
@ -248,10 +254,12 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
p.ProfilePhoto,
|
||||
p.PositionCandidate,
|
||||
p.PositionCandidateId,
|
||||
p.OrganizationName,
|
||||
// p.OrganizationName,
|
||||
p.OrganizationShortName,
|
||||
p.PositionNumber,
|
||||
p.PositionPath,
|
||||
p.PosNumber,
|
||||
p.PosPath,
|
||||
p.organizationName,
|
||||
p.orgTreeShortName,
|
||||
p.ReportingDate,
|
||||
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
||||
p.StatusId,
|
||||
|
|
@ -261,7 +269,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
|
||||
p.ContainDate,
|
||||
p.OrganizationPositionId,
|
||||
p.PosNoId,
|
||||
// p.PosNoId,
|
||||
// p.PositionId,
|
||||
p.PositionLevelId,
|
||||
p.PositionLineId,
|
||||
|
|
@ -717,6 +725,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
// person.PositionType = save;
|
||||
// }
|
||||
person.Draft = false;
|
||||
person.organizationName = req.organizationName;
|
||||
person.orgTreeShortName = req.orgTreeShortName;
|
||||
person.PosPath = req.posPath;
|
||||
person.PosNumber = req.posNumber;
|
||||
person.node = req.node;
|
||||
person.nodeId = req.nodeId;
|
||||
person.posmasterId = req.posmasterId;
|
||||
|
|
@ -1107,7 +1119,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
{
|
||||
var position = await _context.PlacementProfiles
|
||||
.Where(x => x.PositionNumber != null)
|
||||
.Select(x => x.PositionNumber.Id)
|
||||
.Select(x => x.PositionNumber)
|
||||
.ToListAsync();
|
||||
|
||||
return Success(position);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ namespace BMA.EHR.Placement.Service.Requests
|
|||
public double? MouthSalaryAmount { get; set; }
|
||||
public double? PositionSalaryAmount { get; set; }
|
||||
|
||||
public string? organizationName { get; set; }
|
||||
public string? orgTreeShortName { get; set; }
|
||||
public string? posPath { get; set; }
|
||||
public int? posNumber { get; set; }
|
||||
public int? node { get; set; }
|
||||
public Guid? nodeId { get; set; }
|
||||
public Guid? posmasterId { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue