Merge branch 'develop'

* develop:
  กรองสิทธิ์หน้ารายชื่อผู้ถูกพักราชการ #2084
  #2146 and #2147
  add filter status #2083
  #2142
  fix: update image retrieval logic in LeaveController and adjust RabbitMQ configuration in appsettings
  #2132
  fix ลาติดตามคู่สมรส รายงานแสดง Null
  แก้เอกสารรายงานการลา #2109
  fix: enhance database context configuration with retry logic for resilience
  fix: update end time parsing and improve attendance status logic
  fix: update leave remark formatting for better clarity
  fix report leave12
  fix: improve approval step validation by checking for commanders
  feat: enhance leave request filtering and update configuration settings
  query leave report
  add permission brother
  migrate + api บันทึกผู้ตรวจสอบและส่งไปพิจาณา #2109
This commit is contained in:
Warunee Tamkoo 2025-12-23 17:20:13 +07:00
commit b55e1d1f63
31 changed files with 2723 additions and 644 deletions

View file

@ -627,6 +627,18 @@ namespace BMA.EHR.Insignia.Service.Controllers
? profileAdmin?.RootDnaId
: "";
}
else if (role == "BROTHER")
{
nodeId = profileAdmin?.Node == 4
? profileAdmin?.Child3DnaId
: profileAdmin?.Node == 3
? profileAdmin?.Child2DnaId
: profileAdmin?.Node == 2
? profileAdmin?.Child1DnaId
: profileAdmin?.Node == 1 || profileAdmin?.Node == 0
? profileAdmin?.RootDnaId
: "";
}
else if (role == "ROOT" || role == "PARENT")
{
nodeId = profileAdmin?.RootDnaId;
@ -702,6 +714,11 @@ namespace BMA.EHR.Insignia.Service.Controllers
rawData = rawData
.Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))).ToList();
}
else if (role == "BROTHER")
{
rawData = rawData
.Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : true)))).ToList();
}
else if (role == "ROOT")
{
rawData = rawData
@ -914,6 +931,18 @@ namespace BMA.EHR.Insignia.Service.Controllers
? profileAdmin?.RootDnaId
: "";
}
else if (role == "BROTHER")
{
nodeId = profileAdmin?.Node == 4
? profileAdmin?.Child3DnaId
: profileAdmin?.Node == 3
? profileAdmin?.Child2DnaId
: profileAdmin?.Node == 2
? profileAdmin?.Child1DnaId
: profileAdmin?.Node == 1 || profileAdmin?.Node == 0
? profileAdmin?.RootDnaId
: "";
}
else if (role == "ROOT" || role == "PARENT")
{
nodeId = profileAdmin?.RootDnaId;
@ -987,6 +1016,11 @@ namespace BMA.EHR.Insignia.Service.Controllers
rawData = rawData
.Where(x => node == 4 ? x.Child4DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 1 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : (node == null ? true : true)))))).ToList();
}
else if (role == "BROTHER")
{
rawData = rawData
.Where(x => node == 4 ? x.Child3DnaId == Guid.Parse(nodeId!) : (node == 3 ? x.Child2DnaId == Guid.Parse(nodeId!) : (node == 2 ? x.Child1DnaId == Guid.Parse(nodeId!) : (node == 1 || node == 0 ? x.RootDnaId == Guid.Parse(nodeId!) : true)))).ToList();
}
else if (role == "ROOT")
{
rawData = rawData