สรุปผลวินัยเพิ่มstatusบุคคล
This commit is contained in:
parent
49d70b1e05
commit
8dae449c62
10 changed files with 11384 additions and 28 deletions
|
|
@ -211,6 +211,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
Salary = item.salary,
|
||||
PersonId = item.personId,
|
||||
PosNo = item.posNo,
|
||||
Status = "NEW",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
@ -255,8 +256,8 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
Result = x.Result,//ผลการตรวจสอบ
|
||||
Director = x.DisciplineDisciplinary_DirectorInvestigates.Select(d => new
|
||||
{
|
||||
Id = d.Id,
|
||||
DirectorId = d.DisciplineDirector.Id,
|
||||
DirectorId = d.Id,
|
||||
Id = d.DisciplineDirector.Id,
|
||||
Prefix = d.DisciplineDirector.Prefix,
|
||||
FirstName = d.DisciplineDirector.FirstName,
|
||||
LastName = d.DisciplineDirector.LastName,
|
||||
|
|
@ -445,6 +446,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
PersonId = p.PersonId,
|
||||
PosNo = p.PosNo,
|
||||
Organization = p.Organization,
|
||||
Report = p.DisciplineReport_Profiles.Count() > 0 ? true : false,
|
||||
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
|
||||
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
|
||||
DisciplineDisciplinary_DocRelevants = x.DisciplineDisciplinary_DocRelevants.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
|
||||
|
|
@ -636,6 +638,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
Salary = item.salary,
|
||||
PersonId = item.personId,
|
||||
PosNo = item.posNo,
|
||||
Status = "NEW",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
@ -1422,8 +1425,8 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
public async Task<ActionResult<ResponseObject>> PostToSuspend([FromBody] DisciplinePersonIdRequest req, Guid id)
|
||||
{
|
||||
var data = await _context.DisciplineDisciplinarys
|
||||
.Include(x => x.DisciplineReport_Profiles)
|
||||
.Include(x => x.DisciplineDisciplinary_ProfileComplaintInvestigates)
|
||||
.ThenInclude(x => x.DisciplineReport_Profiles)
|
||||
.Where(x => x.Id == id)
|
||||
.FirstOrDefaultAsync();
|
||||
if (data == null)
|
||||
|
|
@ -1432,7 +1435,12 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
var persons = data.DisciplineDisciplinary_ProfileComplaintInvestigates.Where(x => req.persons.Contains(x.Id)).ToList();
|
||||
foreach (var item in persons)
|
||||
{
|
||||
data.DisciplineReport_Profiles.Add(
|
||||
var personIdDupicate = data.DisciplineDisciplinary_ProfileComplaintInvestigates.Where(x => x.PersonId == item.PersonId).FirstOrDefault();
|
||||
if (personIdDupicate == null)
|
||||
continue;
|
||||
if (personIdDupicate.DisciplineReport_Profiles.Count() > 0)
|
||||
continue;
|
||||
personIdDupicate.DisciplineReport_Profiles.Add(
|
||||
new DisciplineReport_Profile
|
||||
{
|
||||
PersonId = item.PersonId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue