api เครื่องราช
This commit is contained in:
parent
6a572144ab
commit
cb33987976
11 changed files with 5290 additions and 5321 deletions
|
|
@ -14,7 +14,7 @@ namespace BMA.EHR.Application
|
||||||
services.AddTransient<OrganizationEmployeeRepository>();
|
services.AddTransient<OrganizationEmployeeRepository>();
|
||||||
services.AddTransient<MessageQueueRepository>();
|
services.AddTransient<MessageQueueRepository>();
|
||||||
services.AddTransient<PlacementCommandRepository>();
|
services.AddTransient<PlacementCommandRepository>();
|
||||||
// services.AddTransient<InsigniaPeriodsRepository>();
|
services.AddTransient<InsigniaPeriodsRepository>();
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -9,6 +9,6 @@ namespace BMA.EHR.Application.Requests
|
||||||
public string Year { get; set; }
|
public string Year { get; set; }
|
||||||
public string RequestStatus { get; set; }
|
public string RequestStatus { get; set; }
|
||||||
public string OrganizationName { get; set; }
|
public string OrganizationName { get; set; }
|
||||||
public List<InsigniaRequestItem> Items { get; set; }
|
public List<dynamic> Items { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,15 @@
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using BMA.EHR.Domain.Models.Base;
|
using BMA.EHR.Domain.Models.Base;
|
||||||
using BMA.EHR.Domain.Models.Documents;
|
using BMA.EHR.Domain.Models.Documents;
|
||||||
|
using BMA.EHR.Domain.Models.MetaData;
|
||||||
|
using BMA.EHR.Domain.Models.Organizations;
|
||||||
|
|
||||||
namespace BMA.EHR.Domain.Models.HR
|
namespace BMA.EHR.Domain.Models.HR
|
||||||
{
|
{
|
||||||
public class Profile : EntityBase
|
public class Profile : EntityBase
|
||||||
{
|
{
|
||||||
[Key]
|
// [Key]
|
||||||
public Guid Id { get; set; }
|
// public Guid Id { get; set; }
|
||||||
[MaxLength(13), Comment("รหัสบัตรประชาชน")]
|
[MaxLength(13), Comment("รหัสบัตรประชาชน")]
|
||||||
public string? CitizenId { get; set; }
|
public string? CitizenId { get; set; }
|
||||||
[MaxLength(50)]
|
[MaxLength(50)]
|
||||||
|
|
@ -18,7 +20,7 @@ namespace BMA.EHR.Domain.Models.HR
|
||||||
[MaxLength(20), Comment("ประเภทลูกจ้าง")]
|
[MaxLength(20), Comment("ประเภทลูกจ้าง")]
|
||||||
public string? EmployeeClass { get; set; }
|
public string? EmployeeClass { get; set; }
|
||||||
[Comment("Id คำนำหน้า")]
|
[Comment("Id คำนำหน้า")]
|
||||||
public Guid? PrefixId { get; set; }
|
public Prefix? Prefix { get; set; }
|
||||||
[Required, MaxLength(100), Comment("ชื่อ")]
|
[Required, MaxLength(100), Comment("ชื่อ")]
|
||||||
public string? FirstName { get; set; }
|
public string? FirstName { get; set; }
|
||||||
[Required, MaxLength(100), Comment("นามสกุล")]
|
[Required, MaxLength(100), Comment("นามสกุล")]
|
||||||
|
|
@ -32,7 +34,7 @@ namespace BMA.EHR.Domain.Models.HR
|
||||||
[MaxLength(100)]
|
[MaxLength(100)]
|
||||||
public string AvatarRef { get; set; }
|
public string AvatarRef { get; set; }
|
||||||
[Comment("Id เพศ")]
|
[Comment("Id เพศ")]
|
||||||
public Guid? GenderId { get; set; }
|
public Gender? Gender { get; set; }
|
||||||
[MaxLength(100), Comment("สัญชาติ")]
|
[MaxLength(100), Comment("สัญชาติ")]
|
||||||
public string? Nationality { get; set; }
|
public string? Nationality { get; set; }
|
||||||
[MaxLength(100), Comment("เชื้อชาติ")]
|
[MaxLength(100), Comment("เชื้อชาติ")]
|
||||||
|
|
@ -127,13 +129,13 @@ namespace BMA.EHR.Domain.Models.HR
|
||||||
public Guid? OrganizationOrganizationId { get; set; }
|
public Guid? OrganizationOrganizationId { get; set; }
|
||||||
public string? OrganizationOrganization { get; set; }
|
public string? OrganizationOrganization { get; set; }
|
||||||
[Comment("Id ตำแหน่ง")]
|
[Comment("Id ตำแหน่ง")]
|
||||||
public Guid? PositionId { get; set; }
|
public PositionPath? Position { get; set; }
|
||||||
[Comment("ตำแหน่ง")]
|
// [Comment("ตำแหน่ง")]
|
||||||
public string? Position { get; set; }
|
// public string? Position { get; set; }
|
||||||
[Comment("Id เลขที่ตำแหน่ง")]
|
[Comment("Id เลขที่ตำแหน่ง")]
|
||||||
public Guid? PosNoId { get; set; }
|
public PositionNumberEntity? PosNo { get; set; }
|
||||||
[Comment("เลขที่ตำแหน่ง")]
|
// [Comment("เลขที่ตำแหน่ง")]
|
||||||
public string? PosNo { get; set; }
|
// public string? PosNo { get; set; }
|
||||||
[Comment("เลขที่ตำแหน่งลูกจ้าง")]
|
[Comment("เลขที่ตำแหน่งลูกจ้าง")]
|
||||||
public string? PosNoEmployee { get; set; }
|
public string? PosNoEmployee { get; set; }
|
||||||
[Comment("Id สายงาน")]
|
[Comment("Id สายงาน")]
|
||||||
|
|
@ -144,14 +146,14 @@ namespace BMA.EHR.Domain.Models.HR
|
||||||
public Guid? PositionPathSideId { get; set; }
|
public Guid? PositionPathSideId { get; set; }
|
||||||
[Comment("ด้าน/สาขา")]
|
[Comment("ด้าน/สาขา")]
|
||||||
public string? PositionPathSide { get; set; }
|
public string? PositionPathSide { get; set; }
|
||||||
[Comment("Id ประเภทตำแหน่ง")]
|
// [Comment("Id ประเภทตำแหน่ง")]
|
||||||
public Guid? PositionTypeId { get; set; }
|
// public Guid? PositionTypeId { get; set; }
|
||||||
[Comment("ประเภทตำแหน่ง")]
|
[Comment("ประเภทตำแหน่ง")]
|
||||||
public string? PositionType { get; set; }
|
public PositionType? PositionType { get; set; }
|
||||||
[Comment(" Id ระดับ")]
|
// [Comment(" Id ระดับ")]
|
||||||
public Guid? PositionLevelId { get; set; }
|
// public Guid? PositionLevelId { get; set; }
|
||||||
[Comment("ระดับ")]
|
[Comment("ระดับ")]
|
||||||
public string? PositionLevel { get; set; }
|
public PositionLevel? PositionLevel { get; set; }
|
||||||
[Comment("Id ตำแหน่งทางการบริหาร")]
|
[Comment("Id ตำแหน่งทางการบริหาร")]
|
||||||
public Guid? PositionExecutiveId { get; set; }
|
public Guid? PositionExecutiveId { get; set; }
|
||||||
[Comment("ตำแหน่งทางการบริหาร")]
|
[Comment("ตำแหน่งทางการบริหาร")]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using BMA.EHR.Domain.Models.Base;
|
using BMA.EHR.Domain.Models.Base;
|
||||||
|
using BMA.EHR.Domain.Models.MetaData;
|
||||||
|
|
||||||
namespace BMA.EHR.Domain.Models.HR
|
namespace BMA.EHR.Domain.Models.HR
|
||||||
{
|
{
|
||||||
|
|
@ -27,8 +28,8 @@ namespace BMA.EHR.Domain.Models.HR
|
||||||
[Comment("ประเภท")]
|
[Comment("ประเภท")]
|
||||||
public string? InsigniaType { get; set; }
|
public string? InsigniaType { get; set; }
|
||||||
[Comment("ชื่อเครื่องราชฯ")]
|
[Comment("ชื่อเครื่องราชฯ")]
|
||||||
public string? Insignia { get; set; }
|
// public string? Insignia { get; set; }
|
||||||
public Guid? InsigniaId { get; set; }
|
public Insignia? Insignia { get; set; }
|
||||||
public virtual List<ProfileInsigniaHistory> ProfileInsigniaHistorys { get; set; } = new List<ProfileInsigniaHistory>();
|
public virtual List<ProfileInsigniaHistory> ProfileInsigniaHistorys { get; set; } = new List<ProfileInsigniaHistory>();
|
||||||
public virtual Profile? Profile { get; set; }
|
public virtual Profile? Profile { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using BMA.EHR.Domain.Models.Base;
|
using BMA.EHR.Domain.Models.Base;
|
||||||
|
using BMA.EHR.Domain.Models.MetaData;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace BMA.EHR.Domain.Models.HR
|
namespace BMA.EHR.Domain.Models.HR
|
||||||
|
|
@ -7,6 +8,8 @@ namespace BMA.EHR.Domain.Models.HR
|
||||||
{
|
{
|
||||||
[Comment("วัน เดือน ปี รับตำแหน่ง")]
|
[Comment("วัน เดือน ปี รับตำแหน่ง")]
|
||||||
public DateTime? Date { get; set; }
|
public DateTime? Date { get; set; }
|
||||||
|
[Comment("ลำดับ")]
|
||||||
|
public int? Order { get; set; }
|
||||||
[Comment("เงินเดือน")]
|
[Comment("เงินเดือน")]
|
||||||
public double? Amount { get; set; }
|
public double? Amount { get; set; }
|
||||||
[Comment("เงินประจำตำแหน่ง")]
|
[Comment("เงินประจำตำแหน่ง")]
|
||||||
|
|
@ -30,7 +33,7 @@ namespace BMA.EHR.Domain.Models.HR
|
||||||
[Comment("Id ประเภทตำแหน่ง")]
|
[Comment("Id ประเภทตำแหน่ง")]
|
||||||
public Guid? PositionTypeId { get; set; }
|
public Guid? PositionTypeId { get; set; }
|
||||||
[Comment("Id ระดับ")]
|
[Comment("Id ระดับ")]
|
||||||
public Guid? PositionLevelId { get; set; }
|
public PositionLevel? PositionLevel { get; set; }
|
||||||
[Comment("Id ตำแหน่งทางการบริหาร")]
|
[Comment("Id ตำแหน่งทางการบริหาร")]
|
||||||
public Guid? PositionExecutiveId { get; set; }
|
public Guid? PositionExecutiveId { get; set; }
|
||||||
[Comment("Id ด้านทางการบริหาร")]
|
[Comment("Id ด้านทางการบริหาร")]
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
|
||||||
using BMA.EHR.Domain.Models.Base;
|
using BMA.EHR.Domain.Models.Base;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using BMA.EHR.Domain.Models.MetaData;
|
using BMA.EHR.Domain.Models.MetaData;
|
||||||
|
using BMA.EHR.Domain.Models.Organizations;
|
||||||
|
|
||||||
namespace BMA.EHR.Domain.Models.Insignias
|
namespace BMA.EHR.Domain.Models.Insignias
|
||||||
{
|
{
|
||||||
|
|
@ -16,7 +17,7 @@ namespace BMA.EHR.Domain.Models.Insignias
|
||||||
|
|
||||||
public InsigniaPeriod Period { get; set; }
|
public InsigniaPeriod Period { get; set; }
|
||||||
|
|
||||||
public OrganizationOrganization OrganizationOrganization { get; set; }
|
public OrganizationEntity Organization { get; set; }
|
||||||
|
|
||||||
public virtual List<InsigniaRequestProfile> RequestProfiles { get; set; } = new List<InsigniaRequestProfile>();
|
public virtual List<InsigniaRequestProfile> RequestProfiles { get; set; } = new List<InsigniaRequestProfile>();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ namespace BMA.EHR.Domain.Models.Placement
|
||||||
public string? Lastname { get; set; }
|
public string? Lastname { get; set; }
|
||||||
[Comment("Id เพศ")]
|
[Comment("Id เพศ")]
|
||||||
public Gender? Gender { get; set; }
|
public Gender? Gender { get; set; }
|
||||||
[Comment("ลำดับที่สอบได้")]
|
// [Comment("ลำดับที่สอบได้")]
|
||||||
public int? Number { get; set; }
|
// public int? Number { get; set; }
|
||||||
|
|
||||||
[Comment("Id ตำแหน่งที่สอบได้")]
|
[Comment("Id ตำแหน่งที่สอบได้")]
|
||||||
public PositionPath? PositionCandidate { get; set; }
|
public PositionPath? PositionCandidate { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,10 @@
|
||||||
public static readonly string InvalidInsigniaRequest = "ไม่พบข้อมูลการยื่นขอพระราชทานเครื่องราชย์ของหน่วยงานที่ระบุ!!";
|
public static readonly string InvalidInsigniaRequest = "ไม่พบข้อมูลการยื่นขอพระราชทานเครื่องราชย์ของหน่วยงานที่ระบุ!!";
|
||||||
|
|
||||||
public static readonly string InvalidInsigniaPeriod = "ไม่พบรอบการยื่นขอพระราชทานเครื่องราชย์อิสริยาภรณ์";
|
public static readonly string InvalidInsigniaPeriod = "ไม่พบรอบการยื่นขอพระราชทานเครื่องราชย์อิสริยาภรณ์";
|
||||||
|
|
||||||
|
public static readonly string InvalidCoinPeriod = "ไม่พบรอบการขอพระราชทานเหรียญจักรพรรดิมาลาที่ระบุ!!";
|
||||||
|
|
||||||
|
public static readonly string InvalidOC = "ไม่พบหน่วยงานที่ระบุในระบบ";
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,9 +94,9 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
Name = periodName,
|
Name = periodName,
|
||||||
RequestStatus = requestStatus,
|
RequestStatus = requestStatus,
|
||||||
OrganizationName = result.OrganizationName,
|
OrganizationName = result.OrganizationName,
|
||||||
Items = new List<InsigniaRequestItem>()
|
Items = new List<dynamic>()
|
||||||
};
|
};
|
||||||
var candidate = _repository.GetInsigniaCandidate(period, ocId);
|
var candidate = await _repository.GetInsigniaCandidate(period, ocId);
|
||||||
|
|
||||||
// ตรวจสอบว่ารายการอยู่ใน table insignia_request_new
|
// ตรวจสอบว่ารายการอยู่ใน table insignia_request_new
|
||||||
if (requestStatus == null)
|
if (requestStatus == null)
|
||||||
|
|
@ -106,15 +106,15 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
}
|
}
|
||||||
if (role == "officer")
|
if (role == "officer")
|
||||||
{
|
{
|
||||||
resend.Items = _repository.InsigniaHasProfile(period, ocId);
|
resend.Items = await _repository.InsigniaHasProfile(period, ocId);
|
||||||
return Success(resend);
|
return Success(resend);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var passData = _context.InsigniaRequests.AsQueryable()
|
var passData = _context.InsigniaRequests.AsQueryable()
|
||||||
.Include(x => x.OrganizationOrganization)
|
.Include(x => x.Organization)
|
||||||
.Include(x => x.RequestProfiles)
|
.Include(x => x.RequestProfiles)
|
||||||
.Where(x => x.OrganizationOrganization.Id == ocId)
|
.Where(x => x.Organization.Id == ocId)
|
||||||
.Where(x => x.Period.Id == period)
|
.Where(x => x.Period.Id == period)
|
||||||
.Select(ir => new
|
.Select(ir => new
|
||||||
{
|
{
|
||||||
|
|
@ -122,8 +122,8 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
requstStatus = ir.RequestStatus,
|
requstStatus = ir.RequestStatus,
|
||||||
requstStatusName = GetRequestlStatusText(ir.RequestStatus),
|
requstStatusName = GetRequestlStatusText(ir.RequestStatus),
|
||||||
fkInstituteId = -1,
|
fkInstituteId = -1,
|
||||||
fkDivisionId = ir.OrganizationOrganization.Id,
|
// fkDivisionId = ir.Organization.Id,
|
||||||
fkDivision = ir.OrganizationOrganization.Name,
|
// fkDivision = ir.Organization.Name,
|
||||||
fkInstitute = "",
|
fkInstitute = "",
|
||||||
fkPeriodId = ir.Period.Id,
|
fkPeriodId = ir.Period.Id,
|
||||||
insigniaRequestHasProfile = ir.RequestProfiles.AsQueryable()
|
insigniaRequestHasProfile = ir.RequestProfiles.AsQueryable()
|
||||||
|
|
@ -169,9 +169,9 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
var failData = _context.InsigniaRequests.AsQueryable()
|
var failData = _context.InsigniaRequests.AsQueryable()
|
||||||
.Include(x => x.OrganizationOrganization)
|
.Include(x => x.Organization)
|
||||||
.Include(x => x.RequestProfiles)
|
.Include(x => x.RequestProfiles)
|
||||||
.Where(x => x.OrganizationOrganization.Id == ocId)
|
.Where(x => x.Organization.Id == ocId)
|
||||||
.Where(x => x.Period.Id == period)
|
.Where(x => x.Period.Id == period)
|
||||||
.Select(ir => new
|
.Select(ir => new
|
||||||
{
|
{
|
||||||
|
|
@ -179,8 +179,8 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
requstStatus = ir.RequestStatus,
|
requstStatus = ir.RequestStatus,
|
||||||
requstStatusName = GetRequestlStatusText(ir.RequestStatus),
|
requstStatusName = GetRequestlStatusText(ir.RequestStatus),
|
||||||
fkInstituteId = -1,
|
fkInstituteId = -1,
|
||||||
fkDivisionId = ir.OrganizationOrganization.Id,
|
// fkDivisionId = ir.Organization.Id,
|
||||||
fkDivision = ir.OrganizationOrganization.Name,
|
// fkDivision = ir.Organization.Name,
|
||||||
fkInstitute = "",
|
fkInstitute = "",
|
||||||
fkPeriodId = ir.Period.Id,
|
fkPeriodId = ir.Period.Id,
|
||||||
insigniaRequestHasProfile = ir.RequestProfiles.AsQueryable()
|
insigniaRequestHasProfile = ir.RequestProfiles.AsQueryable()
|
||||||
|
|
@ -256,28 +256,28 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
Name = periodName,
|
Name = periodName,
|
||||||
RequestStatus = requestStatus,
|
RequestStatus = requestStatus,
|
||||||
OrganizationName = result.OrganizationName,
|
OrganizationName = result.OrganizationName,
|
||||||
Items = new List<InsigniaRequestItem>()
|
Items = new List<dynamic>()
|
||||||
};
|
};
|
||||||
var candidate = _repository.GetInsigniaCandidateBKK(period, ocId);
|
var candidate = await _repository.GetInsigniaCandidateBKK(period, ocId);
|
||||||
|
|
||||||
// ตรวจสอบว่ารายการอยู่ใน table insignia_request_new
|
// ตรวจสอบว่ารายการอยู่ใน table insignia_request_new
|
||||||
if (requestStatus == null)
|
if (requestStatus == null)
|
||||||
{
|
{
|
||||||
// บันทึกรายชื่อ
|
// บันทึกรายชื่อ
|
||||||
_repository.InsertCandidate(period, ocId, candidate);
|
await _repository.InsertCandidate(period, ocId, candidate);
|
||||||
}
|
}
|
||||||
if (role == "officer")
|
if (role == "officer")
|
||||||
{
|
{
|
||||||
resend.Items = _repository.InsigniaHasProfile(period, ocId);
|
resend.Items = await _repository.InsigniaHasProfile(period, ocId);
|
||||||
return Success(resend);
|
return Success(resend);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var passData = _context.InsigniaRequests.AsQueryable()
|
var passData = _context.InsigniaRequests.AsQueryable()
|
||||||
.Include(x => x.OrganizationOrganization)
|
.Include(x => x.Organization)
|
||||||
.Include(x => x.RequestProfiles)
|
.Include(x => x.RequestProfiles)
|
||||||
.Where(x => x.OrganizationOrganization.Id == ocId)
|
.Where(x => x.Organization.Id == ocId)
|
||||||
.Where(x => x.Period.Id == period)
|
.Where(x => x.Period.Id == period)
|
||||||
.Select(ir => new
|
.Select(ir => new
|
||||||
{
|
{
|
||||||
|
|
@ -285,8 +285,8 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
requstStatus = ir.RequestStatus,
|
requstStatus = ir.RequestStatus,
|
||||||
requstStatusName = GetRequestlStatusText(ir.RequestStatus),
|
requstStatusName = GetRequestlStatusText(ir.RequestStatus),
|
||||||
fkInstituteId = -1,
|
fkInstituteId = -1,
|
||||||
fkDivisionId = ir.OrganizationOrganization.Id,
|
// fkDivisionId = ir.Organization.Id,
|
||||||
fkDivision = ir.OrganizationOrganization.Name,
|
// fkDivision = ir.Organization.Name,
|
||||||
fkInstitute = "",
|
fkInstitute = "",
|
||||||
fkPeriodId = ir.Period.Id,
|
fkPeriodId = ir.Period.Id,
|
||||||
insigniaRequestHasProfile = ir.RequestProfiles.AsQueryable()
|
insigniaRequestHasProfile = ir.RequestProfiles.AsQueryable()
|
||||||
|
|
@ -333,9 +333,9 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
var failData = _context.InsigniaRequests.AsQueryable()
|
var failData = _context.InsigniaRequests.AsQueryable()
|
||||||
.Include(x => x.OrganizationOrganization)
|
.Include(x => x.Organization)
|
||||||
.Include(x => x.RequestProfiles)
|
.Include(x => x.RequestProfiles)
|
||||||
.Where(x => x.OrganizationOrganization.Id == ocId)
|
.Where(x => x.Organization.Id == ocId)
|
||||||
.Where(x => x.Period.Id == period)
|
.Where(x => x.Period.Id == period)
|
||||||
.Select(ir => new
|
.Select(ir => new
|
||||||
{
|
{
|
||||||
|
|
@ -343,8 +343,8 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
requstStatus = ir.RequestStatus,
|
requstStatus = ir.RequestStatus,
|
||||||
requstStatusName = GetRequestlStatusText(ir.RequestStatus),
|
requstStatusName = GetRequestlStatusText(ir.RequestStatus),
|
||||||
fkInstituteId = -1,
|
fkInstituteId = -1,
|
||||||
fkDivisionId = ir.OrganizationOrganization.Id,
|
// fkDivisionId = ir.Organization.Id,
|
||||||
fkDivision = ir.OrganizationOrganization.Name,
|
// fkDivision = ir.Organization.Name,
|
||||||
fkInstitute = "",
|
fkInstitute = "",
|
||||||
fkPeriodId = ir.Period.Id,
|
fkPeriodId = ir.Period.Id,
|
||||||
insigniaRequestHasProfile = ir.RequestProfiles.AsQueryable()
|
insigniaRequestHasProfile = ir.RequestProfiles.AsQueryable()
|
||||||
|
|
|
||||||
|
|
@ -116,9 +116,21 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
BmaOfficer = x.IsOfficer,
|
BmaOfficer = x.IsOfficer,
|
||||||
StatusId = x.PlacementStatus,
|
StatusId = x.PlacementStatus,
|
||||||
Draft = x.Draft,
|
Draft = x.Draft,
|
||||||
Number = x.Number,
|
ExamNumber = x.ExamNumber,
|
||||||
Deferment = x.IsRelief,
|
Deferment = x.IsRelief,
|
||||||
}).ToListAsync();
|
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
PositionPathSideId = x.PositionPathSide == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionPathSide.Id,
|
||||||
|
PositionTypeId = x.PositionType == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionType.Id,
|
||||||
|
SalaryAmount = x.Amount,
|
||||||
|
MouthSalaryAmount = x.MouthSalaryAmount,
|
||||||
|
PositionSalaryAmount = x.PositionSalaryAmount,
|
||||||
|
}).OrderBy(x => x.ExamNumber).ToListAsync();
|
||||||
|
|
||||||
var result = new List<dynamic>();
|
var result = new List<dynamic>();
|
||||||
foreach (var p in data)
|
foreach (var p in data)
|
||||||
|
|
@ -139,8 +151,20 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
||||||
p.StatusId,
|
p.StatusId,
|
||||||
p.Draft,
|
p.Draft,
|
||||||
p.Number,
|
p.ExamNumber,
|
||||||
p.Deferment,
|
p.Deferment,
|
||||||
|
|
||||||
|
p.ContainDate,
|
||||||
|
p.OrganizationPositionId,
|
||||||
|
p.PosNoId,
|
||||||
|
p.PositionId,
|
||||||
|
p.PositionLevelId,
|
||||||
|
p.PositionLineId,
|
||||||
|
p.PositionPathSideId,
|
||||||
|
p.PositionTypeId,
|
||||||
|
p.SalaryAmount,
|
||||||
|
p.MouthSalaryAmount,
|
||||||
|
p.PositionSalaryAmount,
|
||||||
};
|
};
|
||||||
result.Add(_data);
|
result.Add(_data);
|
||||||
}
|
}
|
||||||
|
|
@ -157,6 +181,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
.Where(x => x.Placement.Id == examId)
|
.Where(x => x.Placement.Id == examId)
|
||||||
.Where(x => x.OrganizationPosition != null)
|
.Where(x => x.OrganizationPosition != null)
|
||||||
.Where(x => x.OrganizationPosition.Organization != null)
|
.Where(x => x.OrganizationPosition.Organization != null)
|
||||||
|
.Where(x => x.Draft == true)
|
||||||
.Where(x => ocIdList.Contains(x.OrganizationPosition.Organization.Id))
|
.Where(x => ocIdList.Contains(x.OrganizationPosition.Organization.Id))
|
||||||
.Select(x => new
|
.Select(x => new
|
||||||
{
|
{
|
||||||
|
|
@ -174,9 +199,21 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
BmaOfficer = x.IsOfficer,
|
BmaOfficer = x.IsOfficer,
|
||||||
StatusId = x.PlacementStatus,
|
StatusId = x.PlacementStatus,
|
||||||
Draft = x.Draft,
|
Draft = x.Draft,
|
||||||
Number = x.Number,
|
ExamNumber = x.ExamNumber,
|
||||||
Deferment = x.IsRelief,
|
Deferment = x.IsRelief,
|
||||||
}).OrderBy(x => x.Number).ToListAsync();
|
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
PositionPathSideId = x.PositionPathSide == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionPathSide.Id,
|
||||||
|
PositionTypeId = x.PositionType == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionType.Id,
|
||||||
|
SalaryAmount = x.Amount,
|
||||||
|
MouthSalaryAmount = x.MouthSalaryAmount,
|
||||||
|
PositionSalaryAmount = x.PositionSalaryAmount,
|
||||||
|
}).OrderBy(x => x.ExamNumber).ToListAsync();
|
||||||
|
|
||||||
var result = new List<dynamic>();
|
var result = new List<dynamic>();
|
||||||
foreach (var p in data)
|
foreach (var p in data)
|
||||||
|
|
@ -197,8 +234,20 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
||||||
p.StatusId,
|
p.StatusId,
|
||||||
p.Draft,
|
p.Draft,
|
||||||
p.Number,
|
p.ExamNumber,
|
||||||
p.Deferment,
|
p.Deferment,
|
||||||
|
|
||||||
|
p.ContainDate,
|
||||||
|
p.OrganizationPositionId,
|
||||||
|
p.PosNoId,
|
||||||
|
p.PositionId,
|
||||||
|
p.PositionLevelId,
|
||||||
|
p.PositionLineId,
|
||||||
|
p.PositionPathSideId,
|
||||||
|
p.PositionTypeId,
|
||||||
|
p.SalaryAmount,
|
||||||
|
p.MouthSalaryAmount,
|
||||||
|
p.PositionSalaryAmount,
|
||||||
};
|
};
|
||||||
result.Add(_data);
|
result.Add(_data);
|
||||||
}
|
}
|
||||||
|
|
@ -550,6 +599,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
var person = await _context.PlacementProfiles.FindAsync(req.PersonalId);
|
var person = await _context.PlacementProfiles.FindAsync(req.PersonalId);
|
||||||
if (person == null)
|
if (person == null)
|
||||||
return Error(GlobalMessages.DataNotFound, 404);
|
return Error(GlobalMessages.DataNotFound, 404);
|
||||||
|
if (person.Draft == true)
|
||||||
|
return Error("ไม่สามารถแก้ไขข้อมูลนี้ได้เนื่องจากเผยแพร่ไปแล้ว");
|
||||||
|
|
||||||
if (req.PosNoId != null)
|
if (req.PosNoId != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue