Merge branch 'develop' into working

This commit is contained in:
Suphonchai Phoonsawat 2024-05-30 09:33:37 +07:00
commit ee2a0f1e36
50 changed files with 37955 additions and 454 deletions

View file

@ -134,47 +134,64 @@ namespace BMA.EHR.Application.Repositories.Reports
id = x.Id,
reason = x.Reason,
remove = x.Remove,
profileId = x.Profile.Id,
citizenId = x.Profile.CitizenId,
prefix = x.Profile.Prefix == null ? "" : x.Profile.Prefix.Name,
fullName = $"{(x.Profile.Prefix == null ? null : x.Profile.Prefix.Name)}{x.Profile.FirstName} {x.Profile.LastName}",
organizationOrganization = x.Profile.OrganizationOrganization,
ocId = x.Profile.OcId,
position = x.Profile.Position == null ? "-" : x.Profile.Position.Name,
positionType = x.Profile.PositionType == null ? "-" : x.Profile.PositionType.Name,
positionExecutive = x.Profile.PositionExecutive,
posNo = x.Profile.PosNo == null ? "-" : x.Profile.PosNo.Name,
positionEmployeePosition = x.Profile.PositionEmployeePosition == null ? "-" : x.Profile.PositionEmployeePosition.Name,
positionEmployeeLevel = x.Profile.PositionEmployeeLevel == null ? "-" : x.Profile.PositionEmployeeLevel.Name,
positionEmployeeGroup = x.Profile.PositionEmployeeGroup == null ? "-" : x.Profile.PositionEmployeeGroup.Name,
posNoEmployee = x.Profile.PosNoEmployee,
profileId = x.profileId,
prefix = x.prefix,
firstName = x.firstName,
lastName = x.lastName,
citizenId = x.citizenId,
root = x.root,
rootId = x.rootId,
rootShortName = x.rootShortName,
child1 = x.child1,
child1Id = x.child1Id,
child1ShortName = x.child1ShortName,
child2 = x.child2,
child2Id = x.child2Id,
child2ShortName = x.child2ShortName,
child3 = x.child3,
child3Id = x.child3Id,
child3ShortName = x.child3ShortName,
child4 = x.child4,
child4Id = x.child4Id,
child4ShortName = x.child4ShortName,
posMasterNo = x.posMasterNo,
position = x.position,
posTypeId = x.posTypeId,
posTypeName = x.posTypeName,
posTypeRank = x.posTypeRank,
posLevelId = x.posLevelId,
posLevelName = x.posLevelName,
posLevelRank = x.posLevelRank,
posExecutiveId = x.posExecutiveId,
posExecutiveName = x.posExecutiveName,
posNo = x.posNo,
})
.ToListAsync();
foreach (var r in profile_retire)
{
var data = new ProfileJsonRequest
{
order = r.order,
id = r.id,
reason = r.reason,
remove = r.remove,
profileId = r.profileId,
citizenId = r.citizenId,
prefix = r.prefix,
fullName = r.fullName,
organizationOrganization = r.organizationOrganization,
oc = r.ocId == null ? null : _organizationCommonRepository.GetOrganizationNameFullPath(r.ocId.Value),
position = r.position,
positionType = r.positionType,
positionExecutive = r.positionExecutive,
posNo = r.posNo,
positionEmployeePosition = r.positionEmployeePosition,
positionEmployeeLevel = r.positionEmployeeLevel,
positionEmployeeGroup = r.positionEmployeeGroup,
posNoEmployee = r.posNoEmployee,
};
retires.Add(data);
}
// foreach (var r in profile_retire)
// {
// var data = new ProfileJsonRequest
// {
// order = r.order,
// id = r.id,
// reason = r.reason,
// remove = r.remove,
// profileId = r.profileId,
// citizenId = r.citizenId,
// prefix = r.prefix,
// fullName = r.fullName,
// organizationOrganization = r.organizationOrganization,
// oc = r.ocId == null ? null : _organizationCommonRepository.GetOrganizationNameFullPath(r.ocId.Value),
// position = r.position,
// positionType = r.positionType,
// positionExecutive = r.positionExecutive,
// posNo = r.posNo,
// positionEmployeePosition = r.positionEmployeePosition,
// positionEmployeeLevel = r.positionEmployeeLevel,
// positionEmployeeGroup = r.positionEmployeeGroup,
// posNoEmployee = r.posNoEmployee,
// };
// retires.Add(data);
// }
return new { retire.Detail, retire.Id, retire.CreatedAt, Year = retire.Year.ToThaiYear().ToString().ToThaiNumber(), retire.Round, retire.Type, retire.TypeReport, Total = profile_retire.Count.ToString().ToThaiNumber(), profile = retires };
}

View file

@ -140,7 +140,7 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
FirstName = p.FirstName,
LastName = p.LastName,
Position = p.Position,
PositionLevel = p.PositionLevel,
// PositionLevel = p.PositionLevel,
IsAncestorDNA = p.IsAncestorDNA,
Salary = p.Salary,
PersonId = p.PersonId,
@ -168,8 +168,11 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
posLevelId = p.posLevelId,
posLevelName = p.posLevelName,
}),//รายการข้อมูลบุคลผู้ถูกร้องเรียน
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
Organization = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
ConsideredAgency = x.ConsideredAgency,//หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง
OrganizationId = x.OrganizationId,//id หน่วยงานกรณี type เป็นหน่วยงาน
ConsideredAgencyId = x.ConsideredAgencyId,//หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง
activeId = x.activeId,
Title = x.Title,//ชื่อเรื่อง
Description = x.Description,//รายละเอียด
DateReceived = x.DateReceived,//วันที่รับเรื่อง
@ -204,8 +207,11 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
_data.Id,
_data.RespondentType,
_data.Persons,
_data.OrganizationId,
_data.Organization,
_data.ConsideredAgency,
_data.OrganizationId,
_data.ConsideredAgencyId,
_data.activeId,
_data.Title,
_data.Description,
_data.DateReceived,
@ -236,8 +242,11 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
var disciplineComplaint = new Domain.Models.Discipline.DisciplineComplaint
{
RespondentType = req.respondentType.Trim().ToUpper(),
Organization = req.organizationId,
Organization = req.organization,
ConsideredAgency = req.consideredAgency,
OrganizationId = req.organizationId,
ConsideredAgencyId = req.consideredAgencyId,
activeId = req.activeId,
Title = req.title,
Description = req.description,
DateReceived = req.dateReceived,
@ -292,7 +301,7 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
Salary = item.salary,
PosNo = item.posNo,
Position = item.position,
PositionLevel = item.positionLevel,
// PositionLevel = item.positionLevel,
IsAncestorDNA = true,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
@ -333,8 +342,11 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
return Error(new Exception("ไม่สามารถแก้ไขข้อมูลนี้ได้"), StatusCodes.Status500InternalServerError);
data.RespondentType = req.respondentType.Trim().ToUpper();
data.Organization = req.organizationId;
data.Organization = req.organization;
data.ConsideredAgency = req.consideredAgency;
data.OrganizationId = req.organizationId;
data.ConsideredAgencyId = req.consideredAgencyId;
data.activeId = req.activeId;
data.Title = req.title;
data.Description = req.description;
data.DateReceived = req.dateReceived;
@ -362,7 +374,7 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
LastName = item.lastName,
Organization = item.organization,
Position = item.position,
PositionLevel = item.positionLevel,
// PositionLevel = item.positionLevel,
IsAncestorDNA = true,
Salary = item.salary,
PersonId = item.personId,
@ -481,6 +493,9 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
RespondentType = data.RespondentType.Trim().ToUpper(),
Organization = data.Organization,
ConsideredAgency = data.ConsideredAgency,
OrganizationId = data.OrganizationId,
ConsideredAgencyId = data.ConsideredAgencyId,
activeId = data.activeId,
Title = data.Title,
Description = data.Description,
DateReceived = data.DateReceived,
@ -539,7 +554,7 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
Salary = item.Salary,
PosNo = item.PosNo,
Position = item.Position,
PositionLevel = item.PositionLevel,
// PositionLevel = item.PositionLevel,
IsAncestorDNA = true,
IsDisciplinary = false,
CreatedFullName = FullName ?? "System Administrator",

View file

@ -96,46 +96,46 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
if (org == null || org.result == null)
return Success(new { data = new List<dynamic>(), total = 0 });
id = org.result.profileId;
}
if (id == "")
return Success(new { data = new List<dynamic>(), total = 0 });
if (id == "")
return Success(new { data = new List<dynamic>(), total = 0 });
var data_search = (from x in _context.DisciplineComplaint_Appeals
where x.Title.Contains(keyword) ||
x.Description.Contains(keyword) ||
x.CaseType.Contains(keyword) ||
x.CaseNumber.Contains(keyword) ||
x.Fullname.Contains(keyword) ||
x.CitizenId.Contains(keyword)
where x.ProfileId == Guid.Parse(id)
select x).ToList();
if (status.Trim().ToUpper() != "ALL")
data_search = data_search.Where(x => x.Status == status).ToList();
if (type.Trim().ToUpper() != "ALL")
data_search = data_search.Where(x => x.Type == type).ToList();
if (year != 0)
data_search = data_search.Where(x => x.Year == year).ToList();
var data = data_search
.Select(x => new
{
Id = x.Id,
Title = x.Title,
Description = x.Description,
Status = x.Status,
Type = x.Type,
Year = x.Year,
CaseType = x.CaseType,
CaseNumber = x.CaseNumber,
Fullname = x.Fullname,
CitizenId = x.CitizenId,
ProfileId = x.ProfileId,
LastUpdatedAt = x.LastUpdatedAt,
})
.OrderByDescending(x => x.LastUpdatedAt)
.Skip((page - 1) * pageSize)
.Take(pageSize)
.ToList();
return Success(new { data, total = data_search.Count() });
var data_search = (from x in _context.DisciplineComplaint_Appeals
where x.Title.Contains(keyword) ||
x.Description.Contains(keyword) ||
x.CaseType.Contains(keyword) ||
x.CaseNumber.Contains(keyword) ||
x.Fullname.Contains(keyword) ||
x.CitizenId.Contains(keyword)
where x.ProfileId == id
select x).ToList();
if (status.Trim().ToUpper() != "ALL")
data_search = data_search.Where(x => x.Status == status).ToList();
if (type.Trim().ToUpper() != "ALL")
data_search = data_search.Where(x => x.Type == type).ToList();
if (year != 0)
data_search = data_search.Where(x => x.Year == year).ToList();
var data = data_search
.Select(x => new
{
Id = x.Id,
Title = x.Title,
Description = x.Description,
Status = x.Status,
Type = x.Type,
Year = x.Year,
CaseType = x.CaseType,
CaseNumber = x.CaseNumber,
Fullname = x.Fullname,
CitizenId = x.CitizenId,
ProfileId = x.ProfileId,
LastUpdatedAt = x.LastUpdatedAt,
})
.OrderByDescending(x => x.LastUpdatedAt)
.Skip((page - 1) * pageSize)
.Take(pageSize)
.ToList();
return Success(new { data, total = data_search.Count() });
}
}
/// <summary>
@ -224,76 +224,94 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
[HttpPost()]
public async Task<ActionResult<ResponseObject>> CreateDiscipline([FromForm] DisciplineComplaint_AppealRequest req)
{
var disciplineComplaint_Appeal = new Domain.Models.Discipline.DisciplineComplaint_Appeal
var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position";
using (var client = new HttpClient())
{
Title = req.Title,
Description = req.Description,
Status = "NEW",
Type = req.Type.Trim().ToUpper(),
Year = req.Year == null ? DateTime.Now.Year : req.Year,
CaseType = req.CaseType,
CaseNumber = req.CaseNumber,
Fullname = req.Fullname,
CitizenId = req.CitizenId,
ProfileId = req.ProfileId,
Position = req.Position,
Oc = req.Oc,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
LastUpdateFullName = FullName ?? "System Administrator",
LastUpdateUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,
};
var disciplineComplaint_Appeal_History = new DisciplineComplaint_Appeal_History
{
DisciplineComplaint_Appeal = disciplineComplaint_Appeal,
Status = "NEW",
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
LastUpdateFullName = FullName ?? "System Administrator",
LastUpdateUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,
};
// await _context.DisciplineComplaint_Appeals.AddAsync(disciplineComplaint_Appeal);
await _context.DisciplineComplaint_Appeal_Historys.AddAsync(disciplineComplaint_Appeal_History);
await _context.SaveChangesAsync();
if (Request.Form.Files != null && Request.Form.Files.Count != 0)
{
foreach (var file in Request.Form.Files)
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
var _res = await client.SendAsync(_req);
var _result = await _res.Content.ReadAsStringAsync();
var org = JsonConvert.DeserializeObject<dynamic>(_result);
if (org == null || org.result == null)
return Success(new { data = new List<dynamic>(), total = 0 });
var id = org.result.profileId;
if (id == "")
return Success(new { data = new List<dynamic>(), total = 0 });
var disciplineComplaint_Appeal = new Domain.Models.Discipline.DisciplineComplaint_Appeal
{
var fileExtension = Path.GetExtension(file.FileName);
var doc = await _documentService.UploadFileAsync(file, file.FileName);
var _doc = await _context.Documents.AsQueryable()
.FirstOrDefaultAsync(x => x.Id == doc.Id);
if (_doc != null)
Title = req.Title,
Description = req.Description,
Status = "NEW",
Type = req.Type.Trim().ToUpper(),
Year = req.Year == null ? DateTime.Now.Year : req.Year,
CaseType = req.CaseType,
CaseNumber = req.CaseNumber,
Fullname = req.Fullname,
CitizenId = req.CitizenId,
ProfileId = id,
Position = req.Position,
Oc = req.Oc,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
LastUpdateFullName = FullName ?? "System Administrator",
LastUpdateUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,
};
var disciplineComplaint_Appeal_History = new DisciplineComplaint_Appeal_History
{
DisciplineComplaint_Appeal = disciplineComplaint_Appeal,
Status = "NEW",
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
LastUpdateFullName = FullName ?? "System Administrator",
LastUpdateUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,
};
// await _context.DisciplineComplaint_Appeals.AddAsync(disciplineComplaint_Appeal);
await _context.DisciplineComplaint_Appeal_Historys.AddAsync(disciplineComplaint_Appeal_History);
await _context.SaveChangesAsync();
if (Request.Form.Files != null && Request.Form.Files.Count != 0)
{
foreach (var file in Request.Form.Files)
{
var disciplineComplaint_Appeal_Doc = new DisciplineComplaint_Appeal_Doc
var fileExtension = Path.GetExtension(file.FileName);
var doc = await _documentService.UploadFileAsync(file, file.FileName);
var _doc = await _context.Documents.AsQueryable()
.FirstOrDefaultAsync(x => x.Id == doc.Id);
if (_doc != null)
{
DisciplineComplaint_Appeal = disciplineComplaint_Appeal,
Document = _doc,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
LastUpdateFullName = FullName ?? "System Administrator",
LastUpdateUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,
};
await _context.DisciplineComplaint_Appeal_Docs.AddAsync(disciplineComplaint_Appeal_Doc);
var disciplineComplaint_Appeal_Doc = new DisciplineComplaint_Appeal_Doc
{
DisciplineComplaint_Appeal = disciplineComplaint_Appeal,
Document = _doc,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
LastUpdateFullName = FullName ?? "System Administrator",
LastUpdateUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,
};
await _context.DisciplineComplaint_Appeal_Docs.AddAsync(disciplineComplaint_Appeal_Doc);
}
}
}
await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08dbca3a-8b6a-4a4e-8b23-1f62e4f30ef6"),
$"มีคำขอยื่นอุทธรณ์/ร้องทุกข์จาก {req.Fullname}",
$"มีคำขอยื่นอุทธรณ์/ร้องทุกข์จาก {req.Fullname}",
"",
true,
true
);
await _context.SaveChangesAsync();
return Success(disciplineComplaint_Appeal.Id);
}
await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08dbca3a-8b6a-4a4e-8b23-1f62e4f30ef6"),
$"มีคำขอยื่นอุทธรณ์/ร้องทุกข์จาก {req.Fullname}",
$"มีคำขอยื่นอุทธรณ์/ร้องทุกข์จาก {req.Fullname}",
"",
true,
true
);
await _context.SaveChangesAsync();
return Success(disciplineComplaint_Appeal.Id);
}
/// <summary>
@ -367,14 +385,14 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
}
}
}
await _repositoryNoti.PushNotificationAsync(
req.ProfileId,
$"เจ้าหน้าที่ได้ทำการสร้างคำร้องอุทธรณ์ร้องทุกข์",
$"เจ้าหน้าที่ได้ทำการสร้างคำร้องอุทธรณ์ร้องทุกข์",
"",
true,
true
);
// await _repositoryNoti.PushNotificationAsyncV2(
// req.ProfileId,
// $"เจ้าหน้าที่ได้ทำการสร้างคำร้องอุทธรณ์ร้องทุกข์",
// $"เจ้าหน้าที่ได้ทำการสร้างคำร้องอุทธรณ์ร้องทุกข์",
// "",
// true,
// true
// );
await _context.SaveChangesAsync();
return Success(disciplineComplaint_Appeal.Id);
}
@ -549,14 +567,14 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
LastUpdatedAt = DateTime.Now,
};
await _context.DisciplineComplaint_Appeal_Historys.AddAsync(disciplineComplaint_Appeal_History);
await _repositoryNoti.PushNotificationAsync(
data.ProfileId,
$"มีการแก้ไขสถานะคำขออุทธรณ์/ร้องทุกข์จาก {data.Fullname} เป็น {StatusDisciplineComplaintAppeal(req.Status.Trim().ToUpper())}",
$"มีการแก้ไขสถานะคำขออุทธรณ์/ร้องทุกข์จาก {data.Fullname} เป็น {StatusDisciplineComplaintAppeal(req.Status.Trim().ToUpper())}",
"",
true,
true
);
// await _repositoryNoti.PushNotificationAsync(
// data.ProfileId,
// $"มีการแก้ไขสถานะคำขออุทธรณ์/ร้องทุกข์จาก {data.Fullname} เป็น {StatusDisciplineComplaintAppeal(req.Status.Trim().ToUpper())}",
// $"มีการแก้ไขสถานะคำขออุทธรณ์/ร้องทุกข์จาก {data.Fullname} เป็น {StatusDisciplineComplaintAppeal(req.Status.Trim().ToUpper())}",
// "",
// true,
// true
// );
}
data.Status = req.Status.Trim().ToUpper();
data.Type = req.Type.Trim().ToUpper();

View file

@ -458,7 +458,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
FirstName = p.FirstName,
LastName = p.LastName,
Position = p.Position,
PositionLevel = p.PositionLevel,
// PositionLevel = p.PositionLevel,
IsAncestorDNA = p.IsAncestorDNA,
Salary = p.Salary,
PersonId = p.PersonId,
@ -492,7 +492,8 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
StatusDiscard = p.StatusDiscard,
// Report = p.DisciplineReport_Profiles.Count() > 0 ? true : false,
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
Organization = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
OrganizationId = x.OrganizationId,//id หน่วยงานกรณี type เป็นหน่วยงาน
DisciplinaryFaultLevelOther = x.DisciplinaryFaultLevelOther,
DisciplineDisciplinary_DocRelevants = x.DisciplineDisciplinary_DocRelevants.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
DisciplineDisciplinary_DocSummaryEvidences = x.DisciplineDisciplinary_DocSummaryEvidences.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
@ -589,6 +590,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
_data.Director,
_data.RespondentType,
_data.Persons,
_data.Organization,
_data.OrganizationId,
_data.DisciplinaryFaultLevelOther,
disciplineDisciplinary_DocRelevants,
@ -692,7 +694,8 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
);
}
}
data.Organization = req.organizationId;
data.Organization = req.organization;
data.OrganizationId = req.organizationId;
data.RespondentType = req.respondentType;
var hisprofile = data.DisciplineDisciplinary_ProfileComplaintInvestigates;
_context.DisciplineDisciplinary_ProfileComplaintInvestigates.RemoveRange(data.DisciplineDisciplinary_ProfileComplaintInvestigates);
@ -710,7 +713,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
LastName = item.lastName,
Organization = item.organization,
Position = item.position,
PositionLevel = item.positionLevel,
// PositionLevel = item.positionLevel,
IsAncestorDNA = isReport == null ? false : isReport.IsAncestorDNA,
Salary = item.salary,
PersonId = item.personId,
@ -1689,7 +1692,8 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
Salary = item.Salary,
PosNo = item.PosNo,
Position = item.Position,
PositionLevel = item.PositionLevel,
PositionLevel = item.posLevelName,
PositionType = item.posTypeName,
Title = data.Title,
OffenseDetails = data.OffenseDetails,
DisciplinaryCaseFault = data.DisciplinaryCaseFault,

View file

@ -286,7 +286,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
FirstName = p.FirstName,
LastName = p.LastName,
Position = p.Position,
PositionLevel = p.PositionLevel,
// PositionLevel = p.PositionLevel,
IsAncestorDNA = p.IsAncestorDNA,
Salary = p.Salary,
PersonId = p.PersonId,
@ -317,7 +317,8 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
IsSend = p.IsReport,
IsDisciplinary = p.IsDisciplinary,
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
Organization = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
OrganizationId = x.OrganizationId,//id หน่วยงานกรณี type เป็นหน่วยงาน
DisciplineInvestigateDocs = x.DisciplineInvestigate_Docs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
DisciplineInvestigateRelevantDocs = x.DisciplineInvestigateRelevant_Docs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
})
@ -368,6 +369,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
_data.Director,
_data.RespondentType,
_data.Persons,
_data.Organization,
_data.OrganizationId,
disciplineInvestigateDocs,
disciplineInvestigateRelevantDocs,
@ -457,7 +459,8 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
);
}
}
data.Organization = req.organizationId;
data.Organization = req.organization;
data.OrganizationId = req.organizationId;
data.RespondentType = req.respondentType;
var hisprofile = data.DisciplineInvestigate_ProfileComplaints;
_context.DisciplineInvestigate_ProfileComplaints.RemoveRange(data.DisciplineInvestigate_ProfileComplaints);
@ -475,7 +478,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
LastName = item.lastName,
Organization = item.organization,
Position = item.position,
PositionLevel = item.positionLevel,
// PositionLevel = item.positionLevel,
IsAncestorDNA = isReport == null ? false : isReport.IsAncestorDNA,
Salary = item.salary,
PersonId = item.personId,
@ -578,6 +581,8 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
RespondentType = data.RespondentType.Trim().ToUpper(),
Organization = data.Organization,
ConsideredAgency = data.ConsideredAgency,
OrganizationId = data.OrganizationId,
ConsideredAgencyId = data.ConsideredAgencyId,
Title = data.Title,
Description = data.Description,
DateReceived = data.DateReceived,
@ -646,7 +651,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
Salary = item.Salary,
PosNo = item.PosNo,
Position = item.Position,
PositionLevel = item.PositionLevel,
// PositionLevel = item.PositionLevel,
IsAncestorDNA = true,
Status = "NEW",
StatusDiscard = "NEW",

View file

@ -128,7 +128,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
FirstName = p.FirstName,
LastName = p.LastName,
Position = p.Position,
PositionLevel = p.PositionLevel,
// PositionLevel = p.PositionLevel,
IsAncestorDNA = p.IsAncestorDNA,
Salary = p.Salary,
PersonId = p.PersonId,
@ -157,7 +157,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
Status = p.Status,
StatusDiscard = p.StatusDiscard,
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
Organization = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
OrganizationId = x.OrganizationId,//id หน่วยงานกรณี type เป็นหน่วยงาน
ResultDescription = x.ResultDescription,//สรุปผลการพิจารณา
ResultOc = x.ResultOc,//
ResultDisciplineType = x.ResultDisciplineType,//
@ -188,6 +189,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
_data.IdComplaint,
_data.RespondentType,
_data.Persons,
_data.Organization,
_data.OrganizationId,
_data.ResultDescription,
_data.ResultOc,

View file

@ -63,7 +63,8 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
(x.Organization == null ? false : x.Organization.Contains(keyword)) ||
(x.Position == null ? false : x.Position.Contains(keyword)) ||
(x.PosNo == null ? false : x.PosNo.Contains(keyword)) ||
(x.PositionLevel == null ? false : x.PositionLevel.Contains(keyword)) ||
(x.posTypeName == null ? false : x.posTypeName.Contains(keyword)) ||
(x.posLevelName == null ? false : x.posLevelName.Contains(keyword)) ||
(x.Title == null ? false : x.Title.Contains(keyword))
select x).ToList();
var data = data_search
@ -100,6 +101,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
Position = x.Position,
PosNo = x.PosNo,
PositionLevel = x.PositionLevel,
PositionType = x.PositionType,
Salary = x.Salary,
Status = x.Status,
DescriptionSuspend = x.DescriptionSuspend,
@ -161,6 +163,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
Position = x.Position,
PosNo = x.PosNo,
PositionLevel = x.PositionLevel,
PositionType = x.PositionType,
Salary = x.Salary,
Status = x.Status,
DescriptionSuspend = x.DescriptionSuspend,
@ -198,6 +201,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
data.Position = req.Position;
data.PosNo = req.PosNo;
data.PositionLevel = req.PositionLevel;
data.PositionType = req.PositionType;
data.Salary = req.Salary;
data.DescriptionSuspend = req.DescriptionSuspend;
data.StartDateSuspend = req.StartDateSuspend;

View file

@ -6,8 +6,11 @@ namespace BMA.EHR.Discipline.Service.Requests
{
public string respondentType { get; set; }// *ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)
public DisciplineComplaintProfileRequest[] persons { get; set; }// กรณีบุคคลใส่ id คน มาใน array แต่ถ้าเป็น type อื่นจะ null
public Guid? organizationId { get; set; }// กรณีหน่วยงานใส่ id ของหน่วยงาน
public Guid consideredAgency { get; set; }// *หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง
public string? organization { get; set; }// กรณีหน่วยงานใส่ id ของหน่วยงาน
public string? consideredAgency { get; set; }// *หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง
public string? organizationId { get; set; }// กรณีหน่วยงานใส่ id ของหน่วยงาน
public string? consideredAgencyId { get; set; }// *หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง
public string? activeId { get; set; }
public string title { get; set; }// *เรื่องที่ร้องเรียน
public string? description { get; set; }// *รายละเอียดของเรื่องร้องเรียน
public DateTime? dateReceived { get; set; }// *วันที่รับเรื่อง เป็นวันที่ถือเป็นจุดเริ่มต้นของวินัยนั้น ๆ
@ -29,7 +32,7 @@ namespace BMA.EHR.Discipline.Service.Requests
public string? lastName { get; set; }
public string? organization { get; set; }
public string? position { get; set; }
public string? positionLevel { get; set; }
// public string? positionLevel { get; set; }
public string? posNo { get; set; }
public double? salary { get; set; }

View file

@ -10,7 +10,7 @@ namespace BMA.EHR.Discipline.Service.Requests
public int? Year { get; set; }
public string? CaseType { get; set; } = string.Empty;
public string? CaseNumber { get; set; } = string.Empty;
public Guid ProfileId { get; set; }
public string ProfileId { get; set; }
public string? CitizenId { get; set; }
public string? Fullname { get; set; }
public string? Position { get; set; }

View file

@ -18,7 +18,7 @@ namespace BMA.EHR.Discipline.Service.Requests
public string? lastName { get; set; }
public string? organization { get; set; }
public string? position { get; set; }
public string? positionLevel { get; set; }
// public string? positionLevel { get; set; }
public string? posNo { get; set; }
public double? salary { get; set; }

View file

@ -28,7 +28,8 @@ namespace BMA.EHR.Discipline.Service.Requests
public string? Result { get; set; }
public Guid[] directors { get; set; }
public DisciplineDisciplinaryInvestigateComplaintProfileRequest[] persons { get; set; }// กรณีบุคคลใส่ id คน มาใน array แต่ถ้าเป็น type อื่นจะ null
public Guid? organizationId { get; set; }// กรณีหน่วยงานใส่ id ของหน่วยงาน
public string? organization { get; set; }// กรณีหน่วยงานใส่ id ของหน่วยงาน
public string? organizationId { get; set; }// กรณีหน่วยงานใส่ id ของหน่วยงาน
public string respondentType { get; set; }// *ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)
}

View file

@ -18,7 +18,7 @@ namespace BMA.EHR.Discipline.Service.Requests
public string? lastName { get; set; }
public string? organization { get; set; }
public string? position { get; set; }
public string? positionLevel { get; set; }
// public string? positionLevel { get; set; }
public string? posNo { get; set; }
public double? salary { get; set; }

View file

@ -16,7 +16,8 @@ namespace BMA.EHR.Discipline.Service.Requests
public string? result { get; set; }
public Guid[] directors { get; set; }
public DisciplineInvestigateComplaintProfileRequest[] persons { get; set; }// กรณีบุคคลใส่ id คน มาใน array แต่ถ้าเป็น type อื่นจะ null
public Guid? organizationId { get; set; }// กรณีหน่วยงานใส่ id ของหน่วยงาน
public string? organization { get; set; }// กรณีหน่วยงานใส่ id ของหน่วยงาน
public string? organizationId { get; set; }// กรณีหน่วยงานใส่ id ของหน่วยงาน
public string respondentType { get; set; }// *ผู้ถูกร้องเรียน (PERSON คือ บุคคล, ORGANIZATION คือ หน่วยงาน, BANGKOK คือ กรุงเทพมหานคร)
}

View file

@ -8,6 +8,7 @@ namespace BMA.EHR.Discipline.Service.Requests
public string? Position { get; set; }
public string? PosNo { get; set; }
public string? PositionLevel { get; set; }
public string? PositionType { get; set; }
public double? Salary { get; set; }
public string? DescriptionSuspend { get; set; }
public DateTime? StartDateSuspend { get; set; }

View file

@ -44,11 +44,20 @@ namespace BMA.EHR.Domain.Models.Discipline
[Comment("ผลการตรวจสอบ")]
public string? Result { get; set; }
[Comment("กรณีหน่วยงานใส่ id ของหน่วยงาน")]
public Guid? Organization { get; set; }
[Comment("กรณีหน่วยงานใส่หน่วยงาน")]
public string? Organization { get; set; }
[Required, Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง")]
public Guid ConsideredAgency { get; set; }
[Comment("กรณีหน่วยงานใส่หน่วยงาน id")]
public string? OrganizationId { get; set; }
[Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง")]
public string? ConsideredAgency { get; set; }
[Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id")]
public string? ConsideredAgencyId { get; set; }
[Comment("version หน่วยงาน")]
public string? activeId { get; set; }
public virtual List<DisciplineComplaint_Profile> DisciplineComplaint_Profiles { get; set; } = new List<DisciplineComplaint_Profile>();
public virtual List<DisciplineComplaint_Doc> DisciplineComplaint_Docs { get; set; } = new List<DisciplineComplaint_Doc>();
public virtual List<DisciplineInvestigate> DisciplineInvestigates { get; set; } = new List<DisciplineInvestigate>();

View file

@ -31,7 +31,7 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? CaseNumber { get; set; } = string.Empty;
[Required, Comment("ProfileId")]
public Guid ProfileId { get; set; }
public string? ProfileId { get; set; }
[MaxLength(13), Comment("รหัสบัตรประชาชน")]
public string? CitizenId { get; set; }

View file

@ -65,8 +65,8 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? Position { get; set; }
[Comment("เลขที่ตำแหน่ง")]
public string? PosNo { get; set; }
[Comment("ระดับ")]
public string? PositionLevel { get; set; }
// [Comment("ระดับ")]
// public string? PositionLevel { get; set; }
[Comment("เงินเดือน")]
public double? Salary { get; set; }
[Comment("รายการเก่า")]

View file

@ -50,11 +50,20 @@ namespace BMA.EHR.Domain.Models.Discipline
[Comment("ผลการตรวจสอบ")]
public string? Result { get; set; }
[Comment("กรณีหน่วยงานใส่ id ของหน่วยงาน")]
public Guid? Organization { get; set; }
[Comment("กรณีหน่วยงานใส่หน่วยงาน")]
public string? Organization { get; set; }
[Required, Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง")]
public Guid ConsideredAgency { get; set; }
[Comment("กรณีหน่วยงานใส่หน่วยงาน id")]
public string? OrganizationId { get; set; }
[Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง")]
public string? ConsideredAgency { get; set; }
[Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id")]
public string? ConsideredAgencyId { get; set; }
[Comment("version หน่วยงาน")]
public string? activeId { get; set; }
[Comment("ลักษณะการสืบสวน (APPOINT_DIRECTORS คือ แต่งตั้งกรรมการสืบสวน, SECRET_INVESTIGATION คือ สืบสวนทางลับ, OTHER คือ อื่น ๆ)")]

View file

@ -65,8 +65,8 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? Position { get; set; }
[Comment("เลขที่ตำแหน่ง")]
public string? PosNo { get; set; }
[Comment("ระดับ")]
public string? PositionLevel { get; set; }
// [Comment("ระดับ")]
// public string? PositionLevel { get; set; }
[Comment("เงินเดือน")]
public double? Salary { get; set; }
[Comment("สถานะออกคำสั่ง")]

View file

@ -47,11 +47,20 @@ namespace BMA.EHR.Domain.Models.Discipline
[Comment("ผลการตรวจสอบ")]
public string? Result { get; set; }
[Comment("กรณีหน่วยงานใส่ id ของหน่วยงาน")]
public Guid? Organization { get; set; }
[Comment("กรณีหน่วยงานใส่หน่วยงาน")]
public string? Organization { get; set; }
[Required, Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง")]
public Guid ConsideredAgency { get; set; }
[Comment("กรณีหน่วยงานใส่หน่วยงาน id")]
public string? OrganizationId { get; set; }
[Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง")]
public string? ConsideredAgency { get; set; }
[Comment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id")]
public string? ConsideredAgencyId { get; set; }
[Comment("version หน่วยงาน")]
public string? activeId { get; set; }
[Comment("ลักษณะการสืบสวน (appoint_directors คือ แต่งตั้งกรรมการสืบสวน, secret_investigation คือ สืบสวนทางลับ, other คือ อื่น ๆ)")]

View file

@ -65,8 +65,8 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? Position { get; set; }
[Comment("เลขที่ตำแหน่ง")]
public string? PosNo { get; set; }
[Comment("ระดับ")]
public string? PositionLevel { get; set; }
// [Comment("ระดับ")]
// public string? PositionLevel { get; set; }
[Comment("เงินเดือน")]
public double? Salary { get; set; }
[Comment("ส่งไปยุติเรื่อง")]

View file

@ -67,6 +67,8 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? PosNo { get; set; }
[Comment("ระดับ")]
public string? PositionLevel { get; set; }
[Comment("ประเภท")]
public string? PositionType { get; set; }
[Comment("เงินเดือน")]
public double? Salary { get; set; }
[Comment("สถานะออกคำสั่ง")]

View file

@ -14,6 +14,68 @@ namespace BMA.EHR.Domain.Models.Retirement
[Comment("ลบออกจากเกษียญ")]
public string Remove { get; set; } = "pending";
public RetirementPeriod RetirementPeriod { get; set; }
public Profile Profile { get; set; }
// public Profile Profile { get; set; }
[Comment("profile Id")]
public string? profileId { get; set; }
[Comment("คำนำหน้า")]
public string? prefix { get; set; }
[Comment("ชื่อ")]
public string? firstName { get; set; }
[Comment("นามสกุล")]
public string? lastName { get; set; }
[Comment("เลขบัตรประชาชน")]
public string? citizenId { get; set; }
[Comment("ชื่อหน่วยงาน root ")]
public string? root { get; set; }
[Comment("id หน่วยงาน root ")]
public string? rootId { get; set; }
[Comment("ชื่อย่อหน่วยงาน root ")]
public string? rootShortName { get; set; }
[Comment("ชื่อหน่วยงาน child1 ")]
public string? child1 { get; set; }
[Comment("id หน่วยงาน child1 ")]
public string? child1Id { get; set; }
[Comment("ชื่อย่อหน่วยงาน child1 ")]
public string? child1ShortName { get; set; }
[Comment("ชื่อหน่วยงาน child2 ")]
public string? child2 { get; set; }
[Comment("id หน่วยงาน child2 ")]
public string? child2Id { get; set; }
[Comment("ชื่อย่อหน่วยงาน child2 ")]
public string? child2ShortName { get; set; }
[Comment("ชื่อหน่วยงาน child3 ")]
public string? child3 { get; set; }
[Comment("id หน่วยงาน child3 ")]
public string? child3Id { get; set; }
[Comment("ชื่อย่อหน่วยงาน child3 ")]
public string? child3ShortName { get; set; }
[Comment("ชื่อหน่วยงาน child4 ")]
public string? child4 { get; set; }
[Comment("id หน่วยงาน child4 ")]
public string? child4Id { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4 ")]
public string? child4ShortName { get; set; }
[Comment("เลขที่ตำแหน่ง ")]
public int? posMasterNo { get; set; }
[Comment("ชื่อตำแหน่งในสายงาน ")]
public string? position { get; set; }
[Comment("id ประเภทตำแหน่ง ")]
public string? posTypeId { get; set; }
[Comment("ชื่อประเภทตำแหน่ง ")]
public string? posTypeName { get; set; }
[Comment("ลำดับประเภทตำแหน่ง ")]
public int? posTypeRank { get; set; }
[Comment("id ระดับตำแหน่ง ")]
public string? posLevelId { get; set; }
[Comment("ชื่อระดับตำแหน่ง ")]
public string? posLevelName { get; set; }
[Comment("ลำดับระดับตำแหน่ง ")]
public int? posLevelRank { get; set; }
[Comment("id ตำแหน่งทางการบริหาร ")]
public string? posExecutiveId { get; set; }
[Comment("ชื่อตำแหน่งทางการบริหาร ")]
public string? posExecutiveName { get; set; }
[Comment("เลขที่ตำแหน่ง ")]
public string? posNo { get; set; }
}
}

View file

@ -0,0 +1,431 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetableRetirementProfileaddroot : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_RetirementProfiles_Profiles_ProfileId",
table: "RetirementProfiles");
migrationBuilder.DropIndex(
name: "IX_RetirementProfiles_ProfileId",
table: "RetirementProfiles");
migrationBuilder.RenameColumn(
name: "ProfileId",
table: "RetirementProfiles",
newName: "profileId");
migrationBuilder.AlterColumn<string>(
name: "profileId",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "profile Id",
oldClrType: typeof(Guid),
oldType: "char(36)")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("Relational:Collation", "ascii_general_ci");
migrationBuilder.AddColumn<string>(
name: "child1",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child1 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1Id",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1ShortName",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อย่อหน่วยงาน child1 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child2 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2Id",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2ShortName",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อย่อหน่วยงาน child2 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child3 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3Id",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3ShortName",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อย่อหน่วยงาน child3 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน child4 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4Id",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4ShortName",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อย่อหน่วยงาน child4 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "citizenId",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "เลขบัตรประชาชน")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "firstName",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "lastName",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "นามสกุล")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "posExecutiveId",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id ตำแหน่งทางการบริหาร ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "posExecutiveName",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อตำแหน่งทางการบริหาร ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "posLevelId",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id ระดับตำแหน่ง ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "posLevelName",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อระดับตำแหน่ง ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<int>(
name: "posLevelRank",
table: "RetirementProfiles",
type: "int",
nullable: true,
comment: "ลำดับระดับตำแหน่ง ");
migrationBuilder.AddColumn<int>(
name: "posMasterNo",
table: "RetirementProfiles",
type: "int",
nullable: true,
comment: "เลขที่ตำแหน่ง ");
migrationBuilder.AddColumn<string>(
name: "posNo",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "เลขที่ตำแหน่ง ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "posTypeId",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id ประเภทตำแหน่ง ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "posTypeName",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อประเภทตำแหน่ง ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<int>(
name: "posTypeRank",
table: "RetirementProfiles",
type: "int",
nullable: true,
comment: "ลำดับประเภทตำแหน่ง ");
migrationBuilder.AddColumn<string>(
name: "position",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อตำแหน่งในสายงาน ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "prefix",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "คำนำหน้า")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "root",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อหน่วยงาน root ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootId",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootShortName",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "ชื่อย่อหน่วยงาน root ")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "child1",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child1Id",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child1ShortName",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child2",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child2Id",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child2ShortName",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child3",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child3Id",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child3ShortName",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child4",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child4Id",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child4ShortName",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "citizenId",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "firstName",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "lastName",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "posExecutiveId",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "posExecutiveName",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "posLevelId",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "posLevelName",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "posLevelRank",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "posMasterNo",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "posNo",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "posTypeId",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "posTypeName",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "posTypeRank",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "position",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "prefix",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "root",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "rootId",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "rootShortName",
table: "RetirementProfiles");
migrationBuilder.RenameColumn(
name: "profileId",
table: "RetirementProfiles",
newName: "ProfileId");
migrationBuilder.AlterColumn<Guid>(
name: "ProfileId",
table: "RetirementProfiles",
type: "char(36)",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
collation: "ascii_general_ci",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "profile Id")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_RetirementProfiles_ProfileId",
table: "RetirementProfiles",
column: "ProfileId");
migrationBuilder.AddForeignKey(
name: "FK_RetirementProfiles_Profiles_ProfileId",
table: "RetirementProfiles",
column: "ProfileId",
principalTable: "Profiles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

View file

@ -15069,9 +15069,6 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("int")
.HasComment("ลำดับที่");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)");
b.Property<string>("Reason")
.IsRequired()
.HasColumnType("longtext")
@ -15085,9 +15082,131 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<Guid>("RetirementPeriodId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.Property<string>("child1")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 ");
b.HasIndex("ProfileId");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 ");
b.Property<string>("child1ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1 ");
b.Property<string>("child2")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 ");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 ");
b.Property<string>("child2ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2 ");
b.Property<string>("child3")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 ");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 ");
b.Property<string>("child3ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3 ");
b.Property<string>("child4")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 ");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 ");
b.Property<string>("child4ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child4 ");
b.Property<string>("citizenId")
.HasColumnType("longtext")
.HasComment("เลขบัตรประชาชน");
b.Property<string>("firstName")
.HasColumnType("longtext")
.HasComment("ชื่อ");
b.Property<string>("lastName")
.HasColumnType("longtext")
.HasComment("นามสกุล");
b.Property<string>("posExecutiveId")
.HasColumnType("longtext")
.HasComment("id ตำแหน่งทางการบริหาร ");
b.Property<string>("posExecutiveName")
.HasColumnType("longtext")
.HasComment("ชื่อตำแหน่งทางการบริหาร ");
b.Property<string>("posLevelId")
.HasColumnType("longtext")
.HasComment("id ระดับตำแหน่ง ");
b.Property<string>("posLevelName")
.HasColumnType("longtext")
.HasComment("ชื่อระดับตำแหน่ง ");
b.Property<int?>("posLevelRank")
.HasColumnType("int")
.HasComment("ลำดับระดับตำแหน่ง ");
b.Property<int?>("posMasterNo")
.HasColumnType("int")
.HasComment("เลขที่ตำแหน่ง ");
b.Property<string>("posNo")
.HasColumnType("longtext")
.HasComment("เลขที่ตำแหน่ง ");
b.Property<string>("posTypeId")
.HasColumnType("longtext")
.HasComment("id ประเภทตำแหน่ง ");
b.Property<string>("posTypeName")
.HasColumnType("longtext")
.HasComment("ชื่อประเภทตำแหน่ง ");
b.Property<int?>("posTypeRank")
.HasColumnType("int")
.HasComment("ลำดับประเภทตำแหน่ง ");
b.Property<string>("position")
.HasColumnType("longtext")
.HasComment("ชื่อตำแหน่งในสายงาน ");
b.Property<string>("prefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้า");
b.Property<string>("profileId")
.HasColumnType("longtext")
.HasComment("profile Id");
b.Property<string>("root")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root ");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root ");
b.Property<string>("rootShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน root ");
b.HasKey("Id");
b.HasIndex("RetirementPeriodId");
@ -17453,20 +17572,12 @@ namespace BMA.EHR.Infrastructure.Migrations
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementProfile", b =>
{
b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile")
.WithMany()
.HasForeignKey("ProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementPeriod", "RetirementPeriod")
.WithMany("RetirementProfiles")
.HasForeignKey("RetirementPeriodId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Profile");
b.Navigation("RetirementPeriod");
});

View file

@ -0,0 +1,66 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class updatetabledisciplineaddroot1 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PositionLevel",
table: "DisciplineReport_Profiles");
migrationBuilder.DropColumn(
name: "PositionLevel",
table: "DisciplineInvestigate_ProfileComplaints");
migrationBuilder.DropColumn(
name: "PositionLevel",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates");
migrationBuilder.DropColumn(
name: "PositionLevel",
table: "DisciplineComplaint_Profiles");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "PositionLevel",
table: "DisciplineReport_Profiles",
type: "longtext",
nullable: true,
comment: "ระดับ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "PositionLevel",
table: "DisciplineInvestigate_ProfileComplaints",
type: "longtext",
nullable: true,
comment: "ระดับ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "PositionLevel",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates",
type: "longtext",
nullable: true,
comment: "ระดับ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "PositionLevel",
table: "DisciplineComplaint_Profiles",
type: "longtext",
nullable: true,
comment: "ระดับ")
.Annotation("MySql:CharSet", "utf8mb4");
}
}
}

View file

@ -0,0 +1,54 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class updatetabledisciplineaddactiveId : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "activeId",
table: "DisciplineInvestigates",
type: "longtext",
nullable: true,
comment: "version หน่วยงาน")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "activeId",
table: "DisciplineDisciplinarys",
type: "longtext",
nullable: true,
comment: "version หน่วยงาน")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "activeId",
table: "DisciplineComplaints",
type: "longtext",
nullable: true,
comment: "version หน่วยงาน")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "activeId",
table: "DisciplineInvestigates");
migrationBuilder.DropColumn(
name: "activeId",
table: "DisciplineDisciplinarys");
migrationBuilder.DropColumn(
name: "activeId",
table: "DisciplineComplaints");
}
}
}

View file

@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class updatetabledisciplineaddlevel : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "PositionLevel",
table: "DisciplineReport_Profiles",
type: "longtext",
nullable: true,
comment: "ระดับ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "PositionType",
table: "DisciplineReport_Profiles",
type: "longtext",
nullable: true,
comment: "ประเภท")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PositionLevel",
table: "DisciplineReport_Profiles");
migrationBuilder.DropColumn(
name: "PositionType",
table: "DisciplineReport_Profiles");
}
}
}

View file

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class updatetableRetirementProfileaddroot : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

View file

@ -36,10 +36,14 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)");
b.Property<Guid>("ConsideredAgency")
.HasColumnType("char(36)")
b.Property<string>("ConsideredAgency")
.HasColumnType("longtext")
.HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง");
b.Property<string>("ConsideredAgencyId")
.HasColumnType("longtext")
.HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
@ -102,9 +106,13 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)");
b.Property<Guid?>("Organization")
.HasColumnType("char(36)")
.HasComment("กรณีหน่วยงานใส่ id ของหน่วยงาน");
b.Property<string>("Organization")
.HasColumnType("longtext")
.HasComment("กรณีหน่วยงานใส่หน่วยงาน");
b.Property<string>("OrganizationId")
.HasColumnType("longtext")
.HasComment("กรณีหน่วยงานใส่หน่วยงาน id");
b.Property<string>("RespondentType")
.IsRequired()
@ -125,6 +133,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("text")
.HasComment("เรื่องที่ร้องเรียน");
b.Property<string>("activeId")
.HasColumnType("longtext")
.HasComment("version หน่วยงาน");
b.HasKey("Id");
b.ToTable("DisciplineComplaints");
@ -206,8 +218,9 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ตำแหน่งผู้อุทธรณ์/ร้องทุกข์");
b.Property<Guid>("ProfileId")
.HasColumnType("char(36)")
b.Property<string>("ProfileId")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ProfileId");
b.Property<string>("Status")
@ -551,8 +564,8 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("สังกัด");
b.Property<Guid?>("PersonId")
.HasColumnType("char(36)")
b.Property<string>("PersonId")
.HasColumnType("longtext")
.HasComment("id อ้างอิง profile");
b.Property<string>("PosNo")
@ -563,10 +576,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ตำแหน่ง");
b.Property<string>("PositionLevel")
.HasColumnType("longtext")
.HasComment("ระดับ");
b.Property<string>("Prefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้า");
@ -575,6 +584,86 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("double")
.HasComment("เงินเดือน");
b.Property<string>("child1")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child1ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1");
b.Property<string>("child2")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child2ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2");
b.Property<string>("child3")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child3ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3");
b.Property<string>("child4")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("child4ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child4");
b.Property<string>("posLevelId")
.HasColumnType("longtext")
.HasComment("id ระดับตำแหน่ง");
b.Property<string>("posLevelName")
.HasColumnType("longtext")
.HasComment("ชื่อระดับตำแหน่ง");
b.Property<int?>("posMasterNo")
.HasColumnType("int")
.HasComment("เลขที่ตำแหน่ง");
b.Property<string>("posTypeId")
.HasColumnType("longtext")
.HasComment("id ประเภทตำแหน่ง");
b.Property<string>("posTypeName")
.HasColumnType("longtext")
.HasComment("ชื่อประเภทตำแหน่ง");
b.Property<string>("root")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.Property<string>("rootShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน root");
b.HasKey("Id");
b.HasIndex("DisciplineComplaintId");
@ -683,10 +772,14 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)");
b.Property<Guid>("ConsideredAgency")
.HasColumnType("char(36)")
b.Property<string>("ConsideredAgency")
.HasColumnType("longtext")
.HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง");
b.Property<string>("ConsideredAgencyId")
.HasColumnType("longtext")
.HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
@ -864,9 +957,13 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)");
b.Property<Guid?>("Organization")
.HasColumnType("char(36)")
.HasComment("กรณีหน่วยงานใส่ id ของหน่วยงาน");
b.Property<string>("Organization")
.HasColumnType("longtext")
.HasComment("กรณีหน่วยงานใส่หน่วยงาน");
b.Property<string>("OrganizationId")
.HasColumnType("longtext")
.HasComment("กรณีหน่วยงานใส่หน่วยงาน id");
b.Property<string>("RespondentType")
.IsRequired()
@ -915,6 +1012,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("text")
.HasComment("เรื่องที่ร้องเรียน");
b.Property<string>("activeId")
.HasColumnType("longtext")
.HasComment("version หน่วยงาน");
b.HasKey("Id");
b.HasIndex("DisciplineInvestigateId");
@ -1718,8 +1819,8 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("สังกัด");
b.Property<Guid?>("PersonId")
.HasColumnType("char(36)")
b.Property<string>("PersonId")
.HasColumnType("longtext")
.HasComment("id อ้างอิง profile");
b.Property<string>("PosNo")
@ -1730,10 +1831,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ตำแหน่ง");
b.Property<string>("PositionLevel")
.HasColumnType("longtext")
.HasComment("ระดับ");
b.Property<string>("Prefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้า");
@ -1750,6 +1847,86 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("สถานะออกคำสั่งงดโทด");
b.Property<string>("child1")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child1ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1");
b.Property<string>("child2")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child2ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2");
b.Property<string>("child3")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child3ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3");
b.Property<string>("child4")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("child4ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child4");
b.Property<string>("posLevelId")
.HasColumnType("longtext")
.HasComment("id ระดับตำแหน่ง");
b.Property<string>("posLevelName")
.HasColumnType("longtext")
.HasComment("ชื่อระดับตำแหน่ง");
b.Property<int?>("posMasterNo")
.HasColumnType("int")
.HasComment("เลขที่ตำแหน่ง");
b.Property<string>("posTypeId")
.HasColumnType("longtext")
.HasComment("id ประเภทตำแหน่ง");
b.Property<string>("posTypeName")
.HasColumnType("longtext")
.HasComment("ชื่อประเภทตำแหน่ง");
b.Property<string>("root")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.Property<string>("rootShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน root");
b.HasKey("Id");
b.HasIndex("DisciplineDisciplinaryId");
@ -1774,10 +1951,14 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("รับเรื่องร้องเรียนจาก ระบุว่ารับเรื่องมาจากใคร/หน่วยงานไหน (สตง., ปปช., ปปท., จดหมาย, อีเมล, โทรศัพท์, บอกกล่าว)");
b.Property<Guid>("ConsideredAgency")
.HasColumnType("char(36)")
b.Property<string>("ConsideredAgency")
.HasColumnType("longtext")
.HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง");
b.Property<string>("ConsideredAgencyId")
.HasColumnType("longtext")
.HasComment("หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)")
.HasColumnOrder(100)
@ -1879,9 +2060,13 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)");
b.Property<Guid?>("Organization")
.HasColumnType("char(36)")
.HasComment("กรณีหน่วยงานใส่ id ของหน่วยงาน");
b.Property<string>("Organization")
.HasColumnType("longtext")
.HasComment("กรณีหน่วยงานใส่หน่วยงาน");
b.Property<string>("OrganizationId")
.HasColumnType("longtext")
.HasComment("กรณีหน่วยงานใส่หน่วยงาน id");
b.Property<string>("RespondentType")
.IsRequired()
@ -1906,6 +2091,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("text")
.HasComment("เรื่องที่ร้องเรียน");
b.Property<string>("activeId")
.HasColumnType("longtext")
.HasComment("version หน่วยงาน");
b.HasKey("Id");
b.HasIndex("DisciplineComplaintId");
@ -2329,8 +2518,8 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("สังกัด");
b.Property<Guid?>("PersonId")
.HasColumnType("char(36)")
b.Property<string>("PersonId")
.HasColumnType("longtext")
.HasComment("id อ้างอิง profile");
b.Property<string>("PosNo")
@ -2341,10 +2530,6 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ตำแหน่ง");
b.Property<string>("PositionLevel")
.HasColumnType("longtext")
.HasComment("ระดับ");
b.Property<string>("Prefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้า");
@ -2353,6 +2538,86 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("double")
.HasComment("เงินเดือน");
b.Property<string>("child1")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child1ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1");
b.Property<string>("child2")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child2ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2");
b.Property<string>("child3")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child3ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3");
b.Property<string>("child4")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("child4ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child4");
b.Property<string>("posLevelId")
.HasColumnType("longtext")
.HasComment("id ระดับตำแหน่ง");
b.Property<string>("posLevelName")
.HasColumnType("longtext")
.HasComment("ชื่อระดับตำแหน่ง");
b.Property<int?>("posMasterNo")
.HasColumnType("int")
.HasComment("เลขที่ตำแหน่ง");
b.Property<string>("posTypeId")
.HasColumnType("longtext")
.HasComment("id ประเภทตำแหน่ง");
b.Property<string>("posTypeName")
.HasColumnType("longtext")
.HasComment("ชื่อประเภทตำแหน่ง");
b.Property<string>("root")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.Property<string>("rootShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน root");
b.HasKey("Id");
b.HasIndex("DisciplineInvestigateId");
@ -2455,8 +2720,8 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("สังกัด");
b.Property<Guid?>("PersonId")
.HasColumnType("char(36)")
b.Property<string>("PersonId")
.HasColumnType("longtext")
.HasComment("id อ้างอิง profile");
b.Property<string>("PosNo")
@ -2471,6 +2736,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ระดับ");
b.Property<string>("PositionType")
.HasColumnType("longtext")
.HasComment("ประเภท");
b.Property<string>("Prefix")
.HasColumnType("longtext")
.HasComment("คำนำหน้า");
@ -2491,6 +2760,86 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("text")
.HasComment("เรื่องที่ร้องเรียน");
b.Property<string>("child1")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child1ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1");
b.Property<string>("child2")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child2ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2");
b.Property<string>("child3")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child3ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3");
b.Property<string>("child4")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("child4ShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child4");
b.Property<string>("posLevelId")
.HasColumnType("longtext")
.HasComment("id ระดับตำแหน่ง");
b.Property<string>("posLevelName")
.HasColumnType("longtext")
.HasComment("ชื่อระดับตำแหน่ง");
b.Property<int?>("posMasterNo")
.HasColumnType("int")
.HasComment("เลขที่ตำแหน่ง");
b.Property<string>("posTypeId")
.HasColumnType("longtext")
.HasComment("id ประเภทตำแหน่ง");
b.Property<string>("posTypeName")
.HasColumnType("longtext")
.HasComment("ชื่อประเภทตำแหน่ง");
b.Property<string>("root")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.Property<string>("rootShortName")
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน root");
b.HasKey("Id");
b.HasIndex("DisciplineDisciplinaryId");

View file

@ -438,7 +438,7 @@ namespace BMA.EHR.Placement.Service.Controllers
(org.result.child3 == null ? "" : org.result.child3 + "/") +
(org.result.child2 == null ? "" : org.result.child2 + "/") +
(org.result.child1 == null ? "" : org.result.child1 + "/") +
(org.result.root == null ? "" : org.result.root + "/");
(org.result.root == null ? "" : org.result.root);
placementAppointment.OrganizationPositionOld = org.result.position + "-" + placementAppointment.OrganizationOld;
}
await _context.PlacementAppointments.AddAsync(placementAppointment);

View file

@ -434,7 +434,7 @@ namespace BMA.EHR.Placement.Service.Controllers
(org.result.child3 == null ? "" : org.result.child3 + "/") +
(org.result.child2 == null ? "" : org.result.child2 + "/") +
(org.result.child1 == null ? "" : org.result.child1 + "/") +
(org.result.root == null ? "" : org.result.root + "/");
(org.result.root == null ? "" : org.result.root);
placementAppointment.OrganizationPositionOld = org.result.position + "-" + placementAppointment.OrganizationOld;
}
await _context.PlacementAppointments.AddAsync(placementAppointment);

View file

@ -264,7 +264,7 @@ namespace BMA.EHR.Placement.Service.Controllers
(org.result.child3 == null ? "" : org.result.child3 + "/") +
(org.result.child2 == null ? "" : org.result.child2 + "/") +
(org.result.child1 == null ? "" : org.result.child1 + "/") +
(org.result.root == null ? "" : org.result.root + "/");
(org.result.root == null ? "" : org.result.root);
placementOfficer.OrganizationPositionOld = org.result.position + "-" + placementOfficer.OrganizationOld;
}
await _context.PlacementOfficers.AddAsync(placementOfficer);

View file

@ -271,7 +271,7 @@ namespace BMA.EHR.Placement.Service.Controllers
(org.result.child3 == null ? "" : org.result.child3 + "/") +
(org.result.child2 == null ? "" : org.result.child2 + "/") +
(org.result.child1 == null ? "" : org.result.child1 + "/") +
(org.result.root == null ? "" : org.result.root + "/");
(org.result.root == null ? "" : org.result.root);
placementRepatriation.OrganizationPositionOld = org.result.position + "-" + placementRepatriation.OrganizationOld;
}
await _context.PlacementRepatriations.AddAsync(placementRepatriation);

View file

@ -504,7 +504,7 @@ namespace BMA.EHR.Placement.Service.Controllers
(org.result.child3 == null ? "" : org.result.child3 + "/") +
(org.result.child2 == null ? "" : org.result.child2 + "/") +
(org.result.child1 == null ? "" : org.result.child1 + "/") +
(org.result.root == null ? "" : org.result.root + "/");
(org.result.root == null ? "" : org.result.root);
placementTransfer.OrganizationPositionOld = org.result.position + "-" + placementTransfer.OrganizationOld;
}
await _context.PlacementTransfers.AddAsync(placementTransfer);

View file

@ -9,7 +9,9 @@ using BMA.EHR.Retirement.Service.Requests;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using Swashbuckle.AspNetCore.Annotations;
using System.Net.Http.Headers;
using System.Security.Claims;
namespace BMA.EHR.Retirement.Service.Controllers
@ -52,6 +54,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value;
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"];
#endregion
@ -89,9 +92,10 @@ namespace BMA.EHR.Retirement.Service.Controllers
{
Id = x.Id,
Order = x.Order,
Order1 = x.Profile == null ? 999999999 : ocIdList.IndexOf((Guid)(x.Profile.OcId)),
Order2 = x.Profile == null || x.Profile.PositionType == null ? 999999999 : x.Profile.PositionType.Order,
Order3 = x.Profile == null || x.Profile.PositionLevel == null ? 999999999 : x.Profile.PositionLevel.Level,
Order1 = x.Order,
// Order1 = x.Order == null ? 999999999 : x.Order,
Order2 = x.posTypeRank,
Order3 = x.posLevelRank,
LastUpdateFullName = x.LastUpdateFullName,
LastUpdateUserId = x.LastUpdateUserId,
LastUpdatedAt = x.LastUpdatedAt,
@ -106,7 +110,8 @@ namespace BMA.EHR.Retirement.Service.Controllers
{
Id = x.Id,
Order = x.Order,
Order1 = x.Profile == null ? null : ocIdList.IndexOf((Guid)(x.Profile.OcId)),
Order1 = x.Order,
// Order1 = x.Order == null ? 999999999 : x.Order,
LastUpdateFullName = x.LastUpdateFullName,
LastUpdateUserId = x.LastUpdateUserId,
LastUpdatedAt = x.LastUpdatedAt,
@ -324,7 +329,6 @@ namespace BMA.EHR.Retirement.Service.Controllers
.Include(x => x.Document)
.Include(x => x.RetirementPeriodHistorys)
.Include(x => x.RetirementProfiles)
.ThenInclude(x => x.Profile)
.Where(x => x.Year == req.Year)
.Where(x => x.Type.Trim().ToUpper().Contains(req.Type.Trim().ToUpper()))
.FirstOrDefaultAsync();
@ -345,11 +349,40 @@ namespace BMA.EHR.Retirement.Service.Controllers
LastUpdatedAt = DateTime.Now,
};
await _context.RetirementPeriods.AddAsync(retire);
var profiles = await _context.Profiles.AsQueryable()
.Where(x => x.ProfileType.Trim().ToUpper().Contains(req.Type.Trim().ToUpper()))
.ToListAsync();
var profiles = new List<OrgRequestArrayData>();
if (req.Type.Trim().ToUpper().Contains("OFFICER"))
{
var apiUrl = $"{_configuration["API"]}org/profile/profileid/retire/{req.Year}";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
var _res = await client.SendAsync(_req);
var _result = await _res.Content.ReadAsStringAsync();
var org = JsonConvert.DeserializeObject<OrgRequestArray>(_result);
if (org != null && org.result != null)
profiles = org.result;
}
}
else
{
var apiUrl = $"{_configuration["API"]}org/profile-employee/profileid/retire/{req.Year}";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
var _res = await client.SendAsync(_req);
var _result = await _res.Content.ReadAsStringAsync();
var org = JsonConvert.DeserializeObject<OrgRequestArray>(_result);
if (org != null && org.result != null)
profiles = org.result;
}
}
profiles = profiles.Where(x => x.BirthDate.CalculateRetireDate().Year == req.Year).ToList();
var order = 1;
foreach (var profile in profiles)
{
@ -358,7 +391,37 @@ namespace BMA.EHR.Retirement.Service.Controllers
Order = order,
Remove = "PENDING",
RetirementPeriod = retire,
Profile = profile,
profileId = profile.profileId,
prefix = profile.prefix,
firstName = profile.firstName,
lastName = profile.lastName,
citizenId = profile.citizenId,
root = profile.root,
rootId = profile.rootId,
rootShortName = profile.rootShortName,
child1 = profile.child1,
child1Id = profile.child1Id,
child1ShortName = profile.child1ShortName,
child2 = profile.child2,
child2Id = profile.child2Id,
child2ShortName = profile.child2ShortName,
child3 = profile.child3,
child3Id = profile.child3Id,
child3ShortName = profile.child3ShortName,
child4 = profile.child4,
child4Id = profile.child4Id,
child4ShortName = profile.child4ShortName,
posMasterNo = profile.posMasterNo,
position = profile.position,
posTypeId = profile.posTypeId,
posTypeName = profile.posTypeName,
posTypeRank = profile.posTypeRank,
posLevelId = profile.posLevelId,
posLevelName = profile.posLevelName,
posLevelRank = profile.posLevelRank,
posExecutiveId = profile.posExecutiveId,
posExecutiveName = profile.posExecutiveName,
posNo = profile.posNo,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
@ -386,55 +449,41 @@ namespace BMA.EHR.Retirement.Service.Controllers
id = x.Id,
reason = x.Reason,
remove = x.Remove,
profileId = x.Profile.Id,
citizenId = x.Profile.CitizenId,
prefix = x.Profile.Prefix == null ? null : x.Profile.Prefix.Name,
fullName = $"{(x.Profile.Prefix == null ? null : x.Profile.Prefix.Name)}{x.Profile.FirstName} {x.Profile.LastName}",
organizationOrganization = x.Profile.OrganizationOrganization,
ocId = x.Profile.OcId,
position = x.Profile.Position == null ? null : x.Profile.Position.Name,
positionType = x.Profile.PositionType == null ? null : x.Profile.PositionType.Name,
positionExecutive = x.Profile.PositionExecutive,
posNo = x.Profile.PosNo == null ? null : x.Profile.PosNo.Name,
positionEmployeePosition = x.Profile.PositionEmployeePosition == null ? null : x.Profile.PositionEmployeePosition.Name,
positionEmployeeLevel = x.Profile.PositionEmployeeLevel == null ? null : x.Profile.PositionEmployeeLevel.Name,
positionEmployeeGroup = x.Profile.PositionEmployeeGroup == null ? null : x.Profile.PositionEmployeeGroup.Name,
posNoEmployee = x.Profile.PosNoEmployee,
profileId = x.profileId,
prefix = x.prefix,
firstName = x.firstName,
lastName = x.lastName,
citizenId = x.citizenId,
root = x.root,
rootId = x.rootId,
rootShortName = x.rootShortName,
child1 = x.child1,
child1Id = x.child1Id,
child1ShortName = x.child1ShortName,
child2 = x.child2,
child2Id = x.child2Id,
child2ShortName = x.child2ShortName,
child3 = x.child3,
child3Id = x.child3Id,
child3ShortName = x.child3ShortName,
child4 = x.child4,
child4Id = x.child4Id,
child4ShortName = x.child4ShortName,
posMasterNo = x.posMasterNo,
position = x.position,
posTypeId = x.posTypeId,
posTypeName = x.posTypeName,
posTypeRank = x.posTypeRank,
posLevelId = x.posLevelId,
posLevelName = x.posLevelName,
posLevelRank = x.posLevelRank,
posExecutiveId = x.posExecutiveId,
posExecutiveName = x.posExecutiveName,
posNo = x.posNo,
})
.ToListAsync();
var file_name = $"retire_tmp_{DateTime.Now.ToString("yyyyMMddTHHmmss")}";
var profile_olds = new List<ProfileJsonRequest>();
foreach (var r in profile_old)
{
var organizationAgency = await GetAgency(r.profileId);
var organizationGovernmentAgency = await GetGovermentAgency(r.profileId);
var data = new ProfileJsonRequest
{
order = r.order,
id = r.id,
reason = r.reason,
remove = r.remove,
profileId = r.profileId,
citizenId = r.citizenId,
prefix = r.prefix,
fullName = r.fullName,
organizationOrganization = r.organizationOrganization,
oc = r.ocId == null ? null : _organizationCommonRepository.GetOrganizationNameFullPath(r.ocId.Value),
position = r.position,
positionType = r.positionType,
positionExecutive = r.positionExecutive,
posNo = r.posNo,
positionEmployeePosition = r.positionEmployeePosition,
positionEmployeeLevel = r.positionEmployeeLevel,
positionEmployeeGroup = r.positionEmployeeGroup,
posNoEmployee = r.posNoEmployee,
organizationAgency = organizationAgency,//หน่วยงานต้นสังกัด
organizationGovernmentAgency = organizationGovernmentAgency,//ส่วนราชการต้นสังกัด
};
profile_olds.Add(data);
}
var profile = Newtonsoft.Json.JsonConvert.SerializeObject(profile_olds);
var profile = Newtonsoft.Json.JsonConvert.SerializeObject(profile_old);
await _documentService.GenerateJsonFile(profile, "/retire", file_name);
var history = new RetirementPeriodHistory
{
@ -490,14 +539,42 @@ namespace BMA.EHR.Retirement.Service.Controllers
profileOlds = profileOlds.Where(x => !x.remove.Trim().ToUpper().Contains("REMOVE")).ToList();
foreach (var profileOld in profileOlds)
{
var _profile = await _context.Profiles.AsQueryable()
.FirstOrDefaultAsync(x => x.CitizenId == profileOld.citizenId);
var data = new RetirementProfile
{
Order = profileOld.order,
Remove = "PENDING",
RetirementPeriod = retire,
Profile = _profile,
profileId = profileOld.profileId,
prefix = profileOld.prefix,
firstName = profileOld.firstName,
lastName = profileOld.lastName,
citizenId = profileOld.citizenId,
root = profileOld.root,
rootId = profileOld.rootId,
rootShortName = profileOld.rootShortName,
child1 = profileOld.child1,
child1Id = profileOld.child1Id,
child1ShortName = profileOld.child1ShortName,
child2 = profileOld.child2,
child2Id = profileOld.child2Id,
child2ShortName = profileOld.child2ShortName,
child3 = profileOld.child3,
child3Id = profileOld.child3Id,
child3ShortName = profileOld.child3ShortName,
child4 = profileOld.child4,
child4Id = profileOld.child4Id,
child4ShortName = profileOld.child4ShortName,
posMasterNo = profileOld.posMasterNo,
position = profileOld.position,
posTypeId = profileOld.posTypeId,
posTypeName = profileOld.posTypeName,
posTypeRank = profileOld.posTypeRank,
posLevelId = profileOld.posLevelId,
posLevelName = profileOld.posLevelName,
posLevelRank = profileOld.posLevelRank,
posExecutiveId = profileOld.posExecutiveId,
posExecutiveName = profileOld.posExecutiveName,
posNo = profileOld.posNo,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
@ -529,7 +606,37 @@ namespace BMA.EHR.Retirement.Service.Controllers
Order = profileOld.Order,
Remove = "PENDING",
RetirementPeriod = retire,
Profile = profileOld.Profile,
profileId = profileOld.profileId,
prefix = profileOld.prefix,
firstName = profileOld.firstName,
lastName = profileOld.lastName,
citizenId = profileOld.citizenId,
root = profileOld.root,
rootId = profileOld.rootId,
rootShortName = profileOld.rootShortName,
child1 = profileOld.child1,
child1Id = profileOld.child1Id,
child1ShortName = profileOld.child1ShortName,
child2 = profileOld.child2,
child2Id = profileOld.child2Id,
child2ShortName = profileOld.child2ShortName,
child3 = profileOld.child3,
child3Id = profileOld.child3Id,
child3ShortName = profileOld.child3ShortName,
child4 = profileOld.child4,
child4Id = profileOld.child4Id,
child4ShortName = profileOld.child4ShortName,
posMasterNo = profileOld.posMasterNo,
position = profileOld.position,
posTypeId = profileOld.posTypeId,
posTypeName = profileOld.posTypeName,
posTypeRank = profileOld.posTypeRank,
posLevelId = profileOld.posLevelId,
posLevelName = profileOld.posLevelName,
posLevelRank = profileOld.posLevelRank,
posExecutiveId = profileOld.posExecutiveId,
posExecutiveName = profileOld.posExecutiveName,
posNo = profileOld.posNo,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
@ -554,54 +661,61 @@ namespace BMA.EHR.Retirement.Service.Controllers
id = x.Id,
reason = x.Reason,
remove = x.Remove,
profileId = x.Profile.Id,
citizenId = x.Profile.CitizenId,
prefix = x.Profile.Prefix == null ? null : x.Profile.Prefix.Name,
fullName = $"{(x.Profile.Prefix == null ? null : x.Profile.Prefix.Name)}{x.Profile.FirstName} {x.Profile.LastName}",
organizationOrganization = x.Profile.OrganizationOrganization,
ocId = x.Profile.OcId,
position = x.Profile.Position == null ? null : x.Profile.Position.Name,
positionType = x.Profile.PositionType == null ? null : x.Profile.PositionType.Name,
positionExecutive = x.Profile.PositionExecutive,
posNo = x.Profile.PosNo == null ? null : x.Profile.PosNo.Name,
positionEmployeePosition = x.Profile.PositionEmployeePosition == null ? null : x.Profile.PositionEmployeePosition.Name,
positionEmployeeLevel = x.Profile.PositionEmployeeLevel == null ? null : x.Profile.PositionEmployeeLevel.Name,
positionEmployeeGroup = x.Profile.PositionEmployeeGroup == null ? null : x.Profile.PositionEmployeeGroup.Name,
posNoEmployee = x.Profile.PosNoEmployee,
profileId = x.profileId,
citizenId = x.citizenId,
prefix = x.prefix,
firstName = x.firstName,
lastName = x.lastName,
fullName = $"{x.prefix}{x.firstName} {x.lastName}",
root = x.root,
rootId = x.rootId,
child1 = x.child1,
child1Id = x.child1Id,
child2 = x.child2,
child2Id = x.child2Id,
child3 = x.child3,
child3Id = x.child3Id,
child4 = x.child4,
child4Id = x.child4Id,
position = x.position,
positionType = x.posTypeName,
positionLevel = x.posLevelName,
positionExecutive = x.posExecutiveName,
posNo = x.posNo,
})
.ToListAsync();
var profile_news = new List<ProfileJsonRequest>();
foreach (var r in profile_new)
{
var organizationAgency = await GetAgency(r.profileId);
var organizationGovernmentAgency = await GetGovermentAgency(r.profileId);
// var profile_news = new List<ProfileJsonRequest>();
// foreach (var r in profile_new)
// {
// var organizationAgency = await GetAgency(r.profileId);
// var organizationGovernmentAgency = await GetGovermentAgency(r.profileId);
var data = new ProfileJsonRequest
{
order = r.order,
id = r.id,
reason = r.reason,
remove = r.remove,
profileId = r.profileId,
citizenId = r.citizenId,
prefix = r.prefix,
fullName = r.fullName,
organizationOrganization = r.organizationOrganization,
oc = r.ocId == null ? null : _organizationCommonRepository.GetOrganizationNameFullPath(r.ocId.Value),
position = r.position,
positionType = r.positionType,
positionExecutive = r.positionExecutive,
posNo = r.posNo,
positionEmployeePosition = r.positionEmployeePosition,
positionEmployeeLevel = r.positionEmployeeLevel,
positionEmployeeGroup = r.positionEmployeeGroup,
posNoEmployee = r.posNoEmployee,
organizationAgency = organizationAgency,//หน่วยงานต้นสังกัด
organizationGovernmentAgency = organizationGovernmentAgency,//ส่วนราชการต้นสังกัด
};
profile_news.Add(data);
}
return Success(new { retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, retire.SignDate, retire.Detail, profile = profile_news });
// var data = new ProfileJsonRequest
// {
// order = r.order,
// id = r.id,
// reason = r.reason,
// remove = r.remove,
// profileId = r.profileId,
// citizenId = r.citizenId,
// prefix = r.prefix,
// fullName = r.fullName,
// organizationOrganization = r.organizationOrganization,
// oc = r.ocId == null ? null : _organizationCommonRepository.GetOrganizationNameFullPath(r.ocId.Value),
// position = r.position,
// positionType = r.positionType,
// positionExecutive = r.positionExecutive,
// posNo = r.posNo,
// positionEmployeePosition = r.positionEmployeePosition,
// positionEmployeeLevel = r.positionEmployeeLevel,
// positionEmployeeGroup = r.positionEmployeeGroup,
// posNoEmployee = r.posNoEmployee,
// organizationAgency = organizationAgency,//หน่วยงานต้นสังกัด
// organizationGovernmentAgency = organizationGovernmentAgency,//ส่วนราชการต้นสังกัด
// };
// profile_news.Add(data);
// }
return Success(new { retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, retire.SignDate, retire.Detail, profile = profile_new });
}
/// <summary>
@ -647,56 +761,67 @@ namespace BMA.EHR.Retirement.Service.Controllers
id = x.Id,
reason = x.Reason,
remove = x.Remove,
profileId = x.Profile.Id,
citizenId = x.Profile.CitizenId,
prefix = x.Profile.Prefix == null ? null : x.Profile.Prefix.Name,
fullName = $"{(x.Profile.Prefix == null ? null : x.Profile.Prefix.Name)}{x.Profile.FirstName} {x.Profile.LastName}",
organizationOrganization = x.Profile.OrganizationOrganization,
ocId = x.Profile.OcId,
position = x.Profile.Position == null ? null : x.Profile.Position.Name,
positionType = x.Profile.PositionType == null ? null : x.Profile.PositionType.Name,
positionExecutive = x.Profile.PositionExecutive,
posNo = x.Profile.PosNo == null ? null : x.Profile.PosNo.Name,
positionEmployeePosition = x.Profile.PositionEmployeePosition == null ? null : x.Profile.PositionEmployeePosition.Name,
positionEmployeeLevel = x.Profile.PositionEmployeeLevel == null ? null : x.Profile.PositionEmployeeLevel.Name,
positionEmployeeGroup = x.Profile.PositionEmployeeGroup == null ? null : x.Profile.PositionEmployeeGroup.Name,
posNoEmployee = x.Profile.PosNoEmployee,
profileId = x.profileId,
citizenId = x.citizenId,
prefix = x.prefix,
firstName = x.firstName,
lastName = x.lastName,
fullName = $"{x.prefix}{x.firstName} {x.lastName}",
root = x.root,
rootId = x.rootId,
child1 = x.child1,
child1Id = x.child1Id,
child2 = x.child2,
child2Id = x.child2Id,
child3 = x.child3,
child3Id = x.child3Id,
child4 = x.child4,
child4Id = x.child4Id,
position = x.position,
positionType = x.posTypeName,
positionLevel = x.posLevelName,
positionExecutive = x.posExecutiveName,
posNo = x.posNo,
// positionEmployeePosition = x.Profile.PositionEmployeePosition == null ? null : x.Profile.PositionEmployeePosition.Name,
// positionEmployeeLevel = x.Profile.PositionEmployeeLevel == null ? null : x.Profile.PositionEmployeeLevel.Name,
// positionEmployeeGroup = x.Profile.PositionEmployeeGroup == null ? null : x.Profile.PositionEmployeeGroup.Name,
// posNoEmployee = x.Profile.PosNoEmployee,
})
.ToListAsync();
var profile_news = new List<ProfileJsonRequest>();
foreach (var r in profile_new)
{
var organizationAgency = await GetAgency(r.profileId);
var organizationGovernmentAgency = await GetGovermentAgency(r.profileId);
// var profile_news = new List<ProfileJsonRequest>();
// foreach (var r in profile_new)
// {
// var organizationAgency = await GetAgency(r.profileId);
// var organizationGovernmentAgency = await GetGovermentAgency(r.profileId);
var data = new ProfileJsonRequest
{
order = r.order,
id = r.id,
reason = r.reason,
remove = r.remove,
profileId = r.profileId,
citizenId = r.citizenId,
prefix = r.prefix,
fullName = r.fullName,
organizationOrganization = r.organizationOrganization,
oc = r.ocId == null ? null : _organizationCommonRepository.GetOrganizationNameFullPath(r.ocId.Value),
position = r.position,
positionType = r.positionType,
positionExecutive = r.positionExecutive,
posNo = r.posNo,
positionEmployeePosition = r.positionEmployeePosition,
positionEmployeeLevel = r.positionEmployeeLevel,
positionEmployeeGroup = r.positionEmployeeGroup,
posNoEmployee = r.posNoEmployee,
organizationAgency = organizationAgency,//หน่วยงานต้นสังกัด
organizationGovernmentAgency = organizationGovernmentAgency,//ส่วนราชการต้นสังกัด
};
profile_news.Add(data);
}
// var data = new ProfileJsonRequest
// {
// order = r.order,
// id = r.id,
// reason = r.reason,
// remove = r.remove,
// profileId = r.profileId,
// citizenId = r.citizenId,
// prefix = r.prefix,
// fullName = r.fullName,
// organizationOrganization = r.organizationOrganization,
// oc = r.ocId == null ? null : _organizationCommonRepository.GetOrganizationNameFullPath(r.ocId.Value),
// position = r.position,
// positionType = r.positionType,
// positionExecutive = r.positionExecutive,
// posNo = r.posNo,
// positionEmployeePosition = r.positionEmployeePosition,
// positionEmployeeLevel = r.positionEmployeeLevel,
// positionEmployeeGroup = r.positionEmployeeGroup,
// posNoEmployee = r.posNoEmployee,
// organizationAgency = organizationAgency,//หน่วยงานต้นสังกัด
// organizationGovernmentAgency = organizationGovernmentAgency,//ส่วนราชการต้นสังกัด
// };
// profile_news.Add(data);
// }
var file = retire.Document == null ? null : await _documentService.ImagesPath(retire.Document.Id);
return Success(new { Json = false, retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, retire.SignDate, retire.Detail, profile = profile_news, File = file });
return Success(new { Json = false, retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, retire.SignDate, retire.Detail, profile = profile_new, File = file });
}
/// <summary>
@ -735,19 +860,19 @@ namespace BMA.EHR.Retirement.Service.Controllers
[HttpPut("profile/{retireId:length(36)}")]
public async Task<ActionResult<ResponseObject>> AddProfileRetirement([FromBody] ProfileRequest req, Guid retireId)
{
var profile = await _context.Profiles
.FirstOrDefaultAsync(x => x.Id == req.ProfileId);
if (profile == null)
return Error(GlobalMessages.DataNotFound, 404);
// var profile = await _context.Profiles
// .FirstOrDefaultAsync(x => x.Id == req.ProfileId);
// if (profile == null)
// return Error(GlobalMessages.DataNotFound, 404);
var retire = await _context.RetirementPeriods
.Include(x => x.RetirementPeriodHistorys)
.Include(x => x.RetirementProfiles)
.ThenInclude(x => x.Profile)
// .ThenInclude(x => x.Profile)
.FirstOrDefaultAsync(x => x.Id == retireId);
if (retire == null)
return Error(GlobalMessages.RetirementNotFound, 404);
if (retire.RetirementProfiles.Where(x => x.Profile == profile).Count() > 0)
if (retire.RetirementProfiles.Where(x => x.profileId == req.ProfileId).Count() > 0)
return Error("บุคคลนี้ได้ทำการเลือกไว้อยู่แล้ว");
foreach (var retire_profile in retire.RetirementProfiles)
{
@ -762,27 +887,72 @@ namespace BMA.EHR.Retirement.Service.Controllers
// if (old_retire != null)
// num = old_retire.Order + 1;
var data = new RetirementProfile
var apiUrl = $"{_configuration["API"]}org/profile/profileid/position/{req.ProfileId}";
using (var client = new HttpClient())
{
Order = num,
Remove = "ADD",
RetirementPeriod = retire,
Profile = profile,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
LastUpdateFullName = FullName ?? "System Administrator",
LastUpdateUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,
};
_context.RetirementProfiles.Add(data);
await _context.SaveChangesAsync();
if (retire.RetirementPeriodHistorys.Count() == 0)
{
await GenOrderByYear(retire.Id);
}
var data = new RetirementProfile
{
Order = num,
Remove = "ADD",
RetirementPeriod = retire,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
CreatedAt = DateTime.Now,
LastUpdateFullName = FullName ?? "System Administrator",
LastUpdateUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,
};
return Success();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
var _res = await client.SendAsync(_req);
var _result = await _res.Content.ReadAsStringAsync();
var org = JsonConvert.DeserializeObject<OrgRequest>(_result);
if (org == null || org.result == null)
return Error("ไม่พบหน่วยงานของผู้ใช้งานคนนี้", 404);
data.profileId = org.result.profileId;
data.prefix = org.result.prefix;
data.firstName = org.result.firstName;
data.lastName = org.result.lastName;
data.citizenId = org.result.citizenId;
data.root = org.result.root;
data.rootId = org.result.rootId;
data.rootShortName = org.result.rootShortName;
data.child1 = org.result.child1;
data.child1Id = org.result.child1Id;
data.child1ShortName = org.result.child1ShortName;
data.child2 = org.result.child2;
data.child2Id = org.result.child2Id;
data.child2ShortName = org.result.child2ShortName;
data.child3 = org.result.child3;
data.child3Id = org.result.child3Id;
data.child3ShortName = org.result.child3ShortName;
data.child4 = org.result.child4;
data.child4Id = org.result.child4Id;
data.child4ShortName = org.result.child4ShortName;
data.posMasterNo = org.result.posMasterNo;
data.position = org.result.position;
data.posTypeId = org.result.posTypeId;
data.posTypeName = org.result.posTypeName;
data.posTypeRank = org.result.posTypeRank;
data.posLevelId = org.result.posLevelId;
data.posLevelName = org.result.posLevelName;
data.posLevelRank = org.result.posLevelRank;
data.posExecutiveId = org.result.posExecutiveId;
data.posExecutiveName = org.result.posExecutiveName;
data.posNo = org.result.posNo;
_context.RetirementProfiles.Add(data);
await _context.SaveChangesAsync();
if (retire.RetirementPeriodHistorys.Count() == 0)
{
await GenOrderByYear(retire.Id);
}
return Success();
}
}
/// <summary>

View file

@ -351,7 +351,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
(org.result.child3 == null ? "" : org.result.child3 + "/") +
(org.result.child2 == null ? "" : org.result.child2 + "/") +
(org.result.child1 == null ? "" : org.result.child1 + "/") +
(org.result.root == null ? "" : org.result.root + "/");
(org.result.root == null ? "" : org.result.root);
retirementOther.OrganizationPositionOld = org.result.position + "-" + retirementOther.OrganizationOld;
}
await _context.RetirementOthers.AddAsync(retirementOther);

View file

@ -312,7 +312,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
(org.result.child3 == null ? "" : org.result.child3 + "/") +
(org.result.child2 == null ? "" : org.result.child2 + "/") +
(org.result.child1 == null ? "" : org.result.child1 + "/") +
(org.result.root == null ? "" : org.result.root + "/");
(org.result.root == null ? "" : org.result.root);
retirementOut.OrganizationPositionOld = org.result.position + "-" + retirementOut.OrganizationOld;
}
await _context.RetirementOuts.AddAsync(retirementOut);

View file

@ -268,6 +268,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
p.posTypeNameOld,
p.posLevelOldId,
p.posLevelNameOld,
p.IsNoDebt,
// Avatar = p.Profile.Avatar == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Profile.Avatar.Id,
RetirementResignDocs = p.RetirementResignDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
// RetirementResignDebtDocs = p.RetirementResignDebtDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
@ -354,6 +355,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
data.posTypeNameOld,
data.posLevelOldId,
data.posLevelNameOld,
data.IsNoDebt,
// Avatar = data.Avatar == Guid.Parse("00000000-0000-0000-0000-000000000000") ? null : await _documentService.ImagesPath(data.Avatar),
Docs = retirementResignDocs,
// DocDebts = retirementResignDebtDocs,
@ -453,7 +455,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
(org.result.child3 == null ? "" : org.result.child3 + "/") +
(org.result.child2 == null ? "" : org.result.child2 + "/") +
(org.result.child1 == null ? "" : org.result.child1 + "/") +
(org.result.root == null ? "" : org.result.root + "/");
(org.result.root == null ? "" : org.result.root);
retirementResign.OrganizationPositionOld = org.result.position + "-" + retirementResign.OrganizationOld;
}
await _context.RetirementResigns.AddAsync(retirementResign);
@ -539,7 +541,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPut("debt/{id:length(36)}")]
public async Task<ActionResult<ResponseObject>> Debt([FromForm] RetirementResignDebtRequest req, Guid id)
public async Task<ActionResult<ResponseObject>> Debt([FromBody] RetirementResignDebtRequest req, Guid id)
{
var updated = await _context.RetirementResigns.AsQueryable()
.FirstOrDefaultAsync(x => x.Id == id);

View file

@ -36,7 +36,12 @@ namespace BMA.EHR.Retirement.Service.Requests
public string? position { get; set; }
public string? posTypeId { get; set; }
public string? posTypeName { get; set; }
public int? posTypeRank { get; set; }
public string? posLevelId { get; set; }
public string? posLevelName { get; set; }
public int? posLevelRank { get; set; }
public string? posExecutiveId { get; set; }
public string? posExecutiveName { get; set; }
public string? posNo { get; set; }
}
}

View file

@ -0,0 +1,47 @@
using BMA.EHR.Domain.Models.MetaData;
using Microsoft.EntityFrameworkCore;
namespace BMA.EHR.Retirement.Service.Requests
{
public class OrgRequestArray
{
public List<OrgRequestArrayData> result { get; set; }
}
public class OrgRequestArrayData
{
public string? profileId { get; set; }
public string? prefix { get; set; }
public string? firstName { get; set; }
public string? lastName { get; set; }
public string? citizenId { get; set; }
public string? root { get; set; }
public string? rootId { get; set; }
public string? rootShortName { get; set; }
public string? child1 { get; set; }
public string? child1Id { get; set; }
public string? child1ShortName { get; set; }
public string? child2 { get; set; }
public string? child2Id { get; set; }
public string? child2ShortName { get; set; }
public string? child3 { get; set; }
public string? child3Id { get; set; }
public string? child3ShortName { get; set; }
public string? child4 { get; set; }
public string? child4Id { get; set; }
public string? child4ShortName { get; set; }
public string? node { get; set; }
public string? nodeId { get; set; }
public string? nodeShortName { get; set; }
public int? posMasterNo { get; set; }
public string? position { get; set; }
public string? posTypeId { get; set; }
public string? posTypeName { get; set; }
public int? posTypeRank { get; set; }
public string? posLevelId { get; set; }
public string? posLevelName { get; set; }
public int? posLevelRank { get; set; }
public string? posExecutiveId { get; set; }
public string? posExecutiveName { get; set; }
public string? posNo { get; set; }
}
}

View file

@ -9,21 +9,55 @@ namespace BMA.EHR.Retirement.Service.Requests
public Guid id { get; set; }
public string reason { get; set; }
public string remove { get; set; }
public Guid profileId { get; set; }
public string? citizenId { get; set; }
// public Guid profileId { get; set; }
// public string? citizenId { get; set; }
// public string? prefix { get; set; }
// public string? fullName { get; set; }
// public string? organizationOrganization { get; set; }
// public string? oc { get; set; }
// public string? position { get; set; }
// public string? positionType { get; set; }
// public string? positionExecutive { get; set; }
// public string? posNo { get; set; }
// public string? positionEmployeePosition { get; set; }
// public string? positionEmployeeLevel { get; set; }
// public string? positionEmployeeGroup { get; set; }
// public string? posNoEmployee { get; set; }
// public string? organizationAgency { get; set; }
// public string? organizationGovernmentAgency { get; set; }
public string? profileId { get; set; }
public string? prefix { get; set; }
public string? fullName { get; set; }
public string? organizationOrganization { get; set; }
public string? oc { get; set; }
public string? firstName { get; set; }
public string? lastName { get; set; }
public string? citizenId { get; set; }
public string? root { get; set; }
public string? rootId { get; set; }
public string? rootShortName { get; set; }
public string? child1 { get; set; }
public string? child1Id { get; set; }
public string? child1ShortName { get; set; }
public string? child2 { get; set; }
public string? child2Id { get; set; }
public string? child2ShortName { get; set; }
public string? child3 { get; set; }
public string? child3Id { get; set; }
public string? child3ShortName { get; set; }
public string? child4 { get; set; }
public string? child4Id { get; set; }
public string? child4ShortName { get; set; }
// public string? node { get; set; }
// public string? nodeId { get; set; }
// public string? nodeShortName { get; set; }
public int? posMasterNo { get; set; }
public string? position { get; set; }
public string? positionType { get; set; }
public string? positionExecutive { get; set; }
public string? posTypeId { get; set; }
public string? posTypeName { get; set; }
public int? posTypeRank { get; set; }
public string? posLevelId { get; set; }
public string? posLevelName { get; set; }
public int? posLevelRank { get; set; }
public string? posExecutiveId { get; set; }
public string? posExecutiveName { get; set; }
public string? posNo { get; set; }
public string? positionEmployeePosition { get; set; }
public string? positionEmployeeLevel { get; set; }
public string? positionEmployeeGroup { get; set; }
public string? posNoEmployee { get; set; }
public string? organizationAgency { get; set; }
public string? organizationGovernmentAgency { get; set; }
}
}

View file

@ -5,6 +5,6 @@ namespace BMA.EHR.Retirement.Service.Requests
{
public class ProfileRequest
{
public Guid ProfileId { get; set; }
public string ProfileId { get; set; }
}
}