This commit is contained in:
kittapath 2025-02-05 17:48:58 +07:00
parent dbe6916782
commit 5ea175ca77
61 changed files with 66329 additions and 129 deletions

File diff suppressed because it is too large Load diff

View file

@ -776,40 +776,40 @@ namespace BMA.EHR.Application.Repositories.Reports
.Where(x => x.RequestInsignia.InsigniaType != null)
.Where(x => x.RequestInsignia.InsigniaType.Name == "เหรียญบำเหน็จในราชการ");
if (type == "officer")
{
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType == "officer");
}
else if (type == "employee")
{
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType == "employee");
}
if (type == "officer")
{
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType == "officer");
}
else if (type == "employee")
{
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType == "employee");
}
switch (node)
{
case 0:
data_insigniaQuery = data_insigniaQuery.Where(r => r.RootId == nodeId);
break;
switch (node)
{
case 0:
data_insigniaQuery = data_insigniaQuery.Where(r => r.RootDnaId == nodeId);
break;
case 1:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child1Id == nodeId);
break;
case 1:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child1DnaId == nodeId);
break;
case 2:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child2Id == nodeId);
break;
case 2:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child2DnaId == nodeId);
break;
case 3:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child3Id == nodeId);
break;
case 3:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child3DnaId == nodeId);
break;
case 4:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child4Id == nodeId);
break;
case 4:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child4DnaId == nodeId);
break;
default:
break;
}
default:
break;
}
var data = await data_insigniaQuery
.Select(x => new
{
@ -909,7 +909,7 @@ namespace BMA.EHR.Application.Repositories.Reports
&& r.Status == "PENDING"
&& r.RequestInsignia.InsigniaType != null
&& r.RequestInsignia.InsigniaType.Name != "เหรียญบำเหน็จในราชการ"
select new
select new
{
Male = r.Gender == "ชาย" ? 1 : 0,
Female = r.Gender == "หญิง" ? 1 : 0,
@ -920,7 +920,7 @@ namespace BMA.EHR.Application.Repositories.Reports
.Include(x => x.Request)
.ThenInclude(x => x.Period)
.Include(x => x.Request)
/*.ThenInclude(x => x.Organization)*/
/*.ThenInclude(x => x.Organization)*/
.Include(x => x.RequestInsignia)
.ThenInclude(x => x.InsigniaType)
.Where(r => r.Request.Period == period
@ -941,23 +941,23 @@ namespace BMA.EHR.Application.Repositories.Reports
switch (node)
{
case 0:
dataQuery = dataQuery.Where(r => r.RootId == nodeId);
dataQuery = dataQuery.Where(r => r.RootDnaId == nodeId);
break;
case 1:
dataQuery = dataQuery.Where(r => r.Child1Id == nodeId);
dataQuery = dataQuery.Where(r => r.Child1DnaId == nodeId);
break;
case 2:
dataQuery = dataQuery.Where(r => r.Child2Id == nodeId);
dataQuery = dataQuery.Where(r => r.Child2DnaId == nodeId);
break;
case 3:
dataQuery = dataQuery.Where(r => r.Child3Id == nodeId);
dataQuery = dataQuery.Where(r => r.Child3DnaId == nodeId);
break;
case 4:
dataQuery = dataQuery.Where(r => r.Child4Id == nodeId);
dataQuery = dataQuery.Where(r => r.Child4DnaId == nodeId);
break;
default:
@ -1069,7 +1069,7 @@ namespace BMA.EHR.Application.Repositories.Reports
.Where(x => x.IsApprove == true)
.Where(x => x.Status == "PENDING")
.Where(x => x.RequestInsignia.InsigniaType != null);
/*.Where(x => x.RequestInsignia.InsigniaType.Name == "เหรียญบำเหน็จในราชการ");*/
/*.Where(x => x.RequestInsignia.InsigniaType.Name == "เหรียญบำเหน็จในราชการ");*/
if (type == "officer")
{
@ -1083,23 +1083,23 @@ namespace BMA.EHR.Application.Repositories.Reports
switch (node)
{
case 0:
data_insigniaQuery = data_insigniaQuery.Where(r => r.RootId == nodeId);
data_insigniaQuery = data_insigniaQuery.Where(r => r.RootDnaId == nodeId);
break;
case 1:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child1Id == nodeId);
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child1DnaId == nodeId);
break;
case 2:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child2Id == nodeId);
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child2DnaId == nodeId);
break;
case 3:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child3Id == nodeId);
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child3DnaId == nodeId);
break;
case 4:
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child4Id == nodeId);
data_insigniaQuery = data_insigniaQuery.Where(r => r.Child4DnaId == nodeId);
break;
default:
@ -1145,22 +1145,22 @@ namespace BMA.EHR.Application.Repositories.Reports
}
}*/
var insignia = data.Select((r, index) => new
{
RowNo = (index + 1).ToNumericText().ToThaiNumber(),
FullName = r.FullName,
RequestInsigniaName = r.RequestInsigniaName,
ResultY1APR = "-",
ResultY1OCT = "-",
ResultY2APR = "-",
ResultY2OCT = "-",
ResultY3APR = "-",
ResultY3OCT = "-",
ResultY4APR = "-",
ResultY4OCT = "-",
ResultY5APR = "-",
ResultY5OCT = "-",
Remark = "",
}).ToList();
{
RowNo = (index + 1).ToNumericText().ToThaiNumber(),
FullName = r.FullName,
RequestInsigniaName = r.RequestInsigniaName,
ResultY1APR = "-",
ResultY1OCT = "-",
ResultY2APR = "-",
ResultY2OCT = "-",
ResultY3APR = "-",
ResultY3OCT = "-",
ResultY4APR = "-",
ResultY4OCT = "-",
ResultY5APR = "-",
ResultY5OCT = "-",
Remark = "",
}).ToList();
return insignia;
}

View file

@ -52,7 +52,20 @@ namespace BMA.EHR.Application.Requests
public double? Amount { get; set; }
public double? PositionSalaryAmount { get; set; }
public Guid? RootId { get; set; }
public Guid? RootDnaId { get; set; }
public string? Root { get; set; }
public Guid? Child1Id { get; set; }
public Guid? Child1DnaId { get; set; }
public string? Child1 { get; set; }
public Guid? Child2Id { get; set; }
public Guid? Child2DnaId { get; set; }
public string? Child2 { get; set; }
public Guid? Child3Id { get; set; }
public Guid? Child3DnaId { get; set; }
public string? Child3 { get; set; }
public Guid? Child4Id { get; set; }
public Guid? Child4DnaId { get; set; }
public string? Child4 { get; set; }
public List<MatchingCondition> MatchingConditions { get; set; } = new List<MatchingCondition>();
}

View file

@ -54,6 +54,11 @@ namespace BMA.EHR.Application.Responses.Profiles
public Guid? Child2Id { get; set; }
public Guid? Child3Id { get; set; }
public Guid? Child4Id { get; set; }
public Guid? RootDnaId { get; set; }
public Guid? Child1DnaId { get; set; }
public Guid? Child2DnaId { get; set; }
public Guid? Child3DnaId { get; set; }
public Guid? Child4DnaId { get; set; }
public double? Amount { get; set; }
public double? PositionSalaryAmount { get; set; }
public string? Commander { get; set; }

View file

@ -49,6 +49,19 @@ namespace BMA.EHR.Application.Responses.Profiles
public double? Amount { get; set; }
public double? PositionSalaryAmount { get; set; }
public Guid? RootId { get; set; }
public Guid? RootDnaId { get; set; }
public string? Root { get; set; }
public Guid? Child1Id { get; set; }
public Guid? Child1DnaId { get; set; }
public string? Child1 { get; set; }
public Guid? Child2Id { get; set; }
public Guid? Child2DnaId { get; set; }
public string? Child2 { get; set; }
public Guid? Child3Id { get; set; }
public Guid? Child3DnaId { get; set; }
public string? Child3 { get; set; }
public Guid? Child4Id { get; set; }
public Guid? Child4DnaId { get; set; }
public string? Child4 { get; set; }
}
}

View file

@ -192,18 +192,23 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
root = p.root,
rootId = p.rootId,
rootDnaId = p.rootDnaId,
rootShortName = p.rootShortName,
child1 = p.child1,
child1Id = p.child1Id,
child1DnaId = p.child1DnaId,
child1ShortName = p.child1ShortName,
child2 = p.child2,
child2Id = p.child2Id,
child2DnaId = p.child2DnaId,
child2ShortName = p.child2ShortName,
child3 = p.child3,
child3Id = p.child3Id,
child3DnaId = p.child3DnaId,
child3ShortName = p.child3ShortName,
child4 = p.child4,
child4Id = p.child4Id,
child4DnaId = p.child4DnaId,
child4ShortName = p.child4ShortName,
posMasterNo = p.posMasterNo,
posTypeId = p.posTypeId,
@ -330,18 +335,23 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
root = item.root,
rootId = item.rootId,
rootDnaId = item.rootDnaId,
rootShortName = item.rootShortName,
child1 = item.child1,
child1Id = item.child1Id,
child1DnaId = item.child1DnaId,
child1ShortName = item.child1ShortName,
child2 = item.child2,
child2Id = item.child2Id,
child2DnaId = item.child2DnaId,
child2ShortName = item.child2ShortName,
child3 = item.child3,
child3Id = item.child3Id,
child3DnaId = item.child3DnaId,
child3ShortName = item.child3ShortName,
child4 = item.child4,
child4Id = item.child4Id,
child4DnaId = item.child4DnaId,
child4ShortName = item.child4ShortName,
posMasterNo = item.posMasterNo,
posTypeId = item.posTypeId,
@ -439,18 +449,23 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
root = item.root,
rootId = item.rootId,
rootDnaId = item.rootDnaId,
rootShortName = item.rootShortName,
child1 = item.child1,
child1Id = item.child1Id,
child1DnaId = item.child1DnaId,
child1ShortName = item.child1ShortName,
child2 = item.child2,
child2Id = item.child2Id,
child2DnaId = item.child2DnaId,
child2ShortName = item.child2ShortName,
child3 = item.child3,
child3Id = item.child3Id,
child3DnaId = item.child3DnaId,
child3ShortName = item.child3ShortName,
child4 = item.child4,
child4Id = item.child4Id,
child4DnaId = item.child4DnaId,
child4ShortName = item.child4ShortName,
posMasterNo = item.posMasterNo,
posTypeId = item.posTypeId,
@ -612,18 +627,23 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
root = item.root,
rootId = item.rootId,
rootDnaId = item.rootDnaId,
rootShortName = item.rootShortName,
child1 = item.child1,
child1Id = item.child1Id,
child1DnaId = item.child1DnaId,
child1ShortName = item.child1ShortName,
child2 = item.child2,
child2Id = item.child2Id,
child2DnaId = item.child2DnaId,
child2ShortName = item.child2ShortName,
child3 = item.child3,
child3Id = item.child3Id,
child3DnaId = item.child3DnaId,
child3ShortName = item.child3ShortName,
child4 = item.child4,
child4Id = item.child4Id,
child4DnaId = item.child4DnaId,
child4ShortName = item.child4ShortName,
posMasterNo = item.posMasterNo,
posTypeId = item.posTypeId,

View file

@ -501,18 +501,23 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
root = p.root,
rootId = p.rootId,
rootDnaId = p.rootDnaId,
rootShortName = p.rootShortName,
child1 = p.child1,
child1Id = p.child1Id,
child1DnaId = p.child1DnaId,
child1ShortName = p.child1ShortName,
child2 = p.child2,
child2Id = p.child2Id,
child2DnaId = p.child2DnaId,
child2ShortName = p.child2ShortName,
child3 = p.child3,
child3Id = p.child3Id,
child3DnaId = p.child3DnaId,
child3ShortName = p.child3ShortName,
child4 = p.child4,
child4Id = p.child4Id,
child4DnaId = p.child4DnaId,
child4ShortName = p.child4ShortName,
posMasterNo = p.posMasterNo,
posTypeId = p.posTypeId,
@ -762,18 +767,23 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
root = item.root,
rootId = item.rootId,
rootDnaId = item.rootDnaId,
rootShortName = item.rootShortName,
child1 = item.child1,
child1Id = item.child1Id,
child1DnaId = item.child1DnaId,
child1ShortName = item.child1ShortName,
child2 = item.child2,
child2Id = item.child2Id,
child2DnaId = item.child2DnaId,
child2ShortName = item.child2ShortName,
child3 = item.child3,
child3Id = item.child3Id,
child3DnaId = item.child3DnaId,
child3ShortName = item.child3ShortName,
child4 = item.child4,
child4Id = item.child4Id,
child4DnaId = item.child4DnaId,
child4ShortName = item.child4ShortName,
posMasterNo = item.posMasterNo,
posTypeId = item.posTypeId,
@ -1754,18 +1764,23 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
root = item.root,
rootId = item.rootId,
rootDnaId = item.rootDnaId,
rootShortName = item.rootShortName,
child1 = item.child1,
child1Id = item.child1Id,
child1DnaId = item.child1DnaId,
child1ShortName = item.child1ShortName,
child2 = item.child2,
child2Id = item.child2Id,
child2DnaId = item.child2DnaId,
child2ShortName = item.child2ShortName,
child3 = item.child3,
child3Id = item.child3Id,
child3DnaId = item.child3DnaId,
child3ShortName = item.child3ShortName,
child4 = item.child4,
child4Id = item.child4Id,
child4DnaId = item.child4DnaId,
child4ShortName = item.child4ShortName,
posMasterNo = item.posMasterNo,
posTypeId = item.posTypeId,

View file

@ -248,7 +248,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("{page}/{id:guid}")]
public async Task<ActionResult<ResponseObject>> GetByDisciplineInvestigate(string page,Guid id)
public async Task<ActionResult<ResponseObject>> GetByDisciplineInvestigate(string page, Guid id)
{
page = page.Trim().ToUpper();
string getPermission;
@ -268,7 +268,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
{
getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_DISCIPLINE_INVESTIGATE");
}
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
if (jsonData["status"]?.ToString() != "200")
{
@ -334,25 +334,30 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
root = p.root,
rootId = p.rootId,
rootDnaId = p.rootDnaId,
rootShortName = p.rootShortName,
child1 = p.child1,
child1Id = p.child1Id,
child1DnaId = p.child1DnaId,
child1ShortName = p.child1ShortName,
child2 = p.child2,
child2Id = p.child2Id,
child2DnaId = p.child2DnaId,
child2ShortName = p.child2ShortName,
child3 = p.child3,
child3Id = p.child3Id,
child3DnaId = p.child3DnaId,
child3ShortName = p.child3ShortName,
child4 = p.child4,
child4Id = p.child4Id,
child4DnaId = p.child4DnaId,
child4ShortName = p.child4ShortName,
posMasterNo = p.posMasterNo,
posTypeId = p.posTypeId,
posTypeName = p.posTypeName,
posLevelId = p.posLevelId,
posLevelName = p.posLevelName,
IsSend = p.IsReport,
IsDisciplinary = p.IsDisciplinary,
profileType = p.profileType,
@ -532,18 +537,23 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
root = item.root,
rootId = item.rootId,
rootDnaId = item.rootDnaId,
rootShortName = item.rootShortName,
child1 = item.child1,
child1Id = item.child1Id,
child1DnaId = item.child1DnaId,
child1ShortName = item.child1ShortName,
child2 = item.child2,
child2Id = item.child2Id,
child2DnaId = item.child2DnaId,
child2ShortName = item.child2ShortName,
child3 = item.child3,
child3Id = item.child3Id,
child3DnaId = item.child3DnaId,
child3ShortName = item.child3ShortName,
child4 = item.child4,
child4Id = item.child4Id,
child4DnaId = item.child4DnaId,
child4ShortName = item.child4ShortName,
posMasterNo = item.posMasterNo,
posTypeId = item.posTypeId,
@ -582,12 +592,12 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "SYS_DISCIPLINE_INVESTIGATE");
if (getWorkflow == false)
{
var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_DISCIPLINE_INVESTIGATE");
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
if (jsonData["status"]?.ToString() != "200")
{
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
}
var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_DISCIPLINE_INVESTIGATE");
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
if (jsonData["status"]?.ToString() != "200")
{
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
}
}
var data = await _context.DisciplineInvestigates
.Where(x => x.Id == id)
@ -692,18 +702,23 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
root = item.root,
rootId = item.rootId,
rootDnaId = item.rootDnaId,
rootShortName = item.rootShortName,
child1 = item.child1,
child1Id = item.child1Id,
child1DnaId = item.child1DnaId,
child1ShortName = item.child1ShortName,
child2 = item.child2,
child2Id = item.child2Id,
child2DnaId = item.child2DnaId,
child2ShortName = item.child2ShortName,
child3 = item.child3,
child3Id = item.child3Id,
child3DnaId = item.child3DnaId,
child3ShortName = item.child3ShortName,
child4 = item.child4,
child4Id = item.child4Id,
child4DnaId = item.child4DnaId,
child4ShortName = item.child4ShortName,
posMasterNo = item.posMasterNo,
posTypeId = item.posTypeId,
@ -805,12 +820,12 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
var getWorkflow = await _permission.GetPermissionAPIWorkflowAsync(id.ToString(), "SYS_DISCIPLINE_INVESTIGATE");
if (getWorkflow == false)
{
var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_DISCIPLINE_INVESTIGATE");
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
if (jsonData["status"]?.ToString() != "200")
{
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
}
var getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_DISCIPLINE_INVESTIGATE");
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
if (jsonData["status"]?.ToString() != "200")
{
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
}
}
var data = await _context.DisciplineInvestigates
.Where(x => x.Id == id)

View file

@ -167,18 +167,23 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
Organization = p.Organization,
root = p.root,
rootId = p.rootId,
rootDnaId = p.rootDnaId,
rootShortName = p.rootShortName,
child1 = p.child1,
child1Id = p.child1Id,
child1DnaId = p.child1DnaId,
child1ShortName = p.child1ShortName,
child2 = p.child2,
child2Id = p.child2Id,
child2DnaId = p.child2DnaId,
child2ShortName = p.child2ShortName,
child3 = p.child3,
child3Id = p.child3Id,
child3DnaId = p.child3DnaId,
child3ShortName = p.child3ShortName,
child4 = p.child4,
child4Id = p.child4Id,
child4DnaId = p.child4DnaId,
child4ShortName = p.child4ShortName,
posMasterNo = p.posMasterNo,
posTypeId = p.posTypeId,

View file

@ -96,25 +96,30 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
Organization = x.Organization,
root = x.root,
rootId = x.rootId,
rootDnaId = x.rootDnaId,
rootShortName = x.rootShortName,
child1 = x.child1,
child1Id = x.child1Id,
child1DnaId = x.child1DnaId,
child1ShortName = x.child1ShortName,
child2 = x.child2,
child2Id = x.child2Id,
child2DnaId = x.child2DnaId,
child2ShortName = x.child2ShortName,
child3 = x.child3,
child3Id = x.child3Id,
child3DnaId = x.child3DnaId,
child3ShortName = x.child3ShortName,
child4 = x.child4,
child4Id = x.child4Id,
child4DnaId = x.child4DnaId,
child4ShortName = x.child4ShortName,
posMasterNo = x.posMasterNo,
posTypeId = x.posTypeId,
posTypeName = x.posTypeName,
posLevelId = x.posLevelId,
posLevelName = x.posLevelName,
Position = x.Position,
PosNo = x.PosNo,
PositionLevel = x.PositionLevel == null ? "" : x.PositionLevel,
@ -173,18 +178,23 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
Organization = x.Organization,
root = x.root,
rootId = x.rootId,
rootDnaId = x.rootDnaId,
rootShortName = x.rootShortName,
child1 = x.child1,
child1Id = x.child1Id,
child1DnaId = x.child1DnaId,
child1ShortName = x.child1ShortName,
child2 = x.child2,
child2Id = x.child2Id,
child2DnaId = x.child2DnaId,
child2ShortName = x.child2ShortName,
child3 = x.child3,
child3Id = x.child3Id,
child3DnaId = x.child3DnaId,
child3ShortName = x.child3ShortName,
child4 = x.child4,
child4Id = x.child4Id,
child4DnaId = x.child4DnaId,
child4ShortName = x.child4ShortName,
posMasterNo = x.posMasterNo,
posTypeId = x.posTypeId,

View file

@ -38,18 +38,23 @@ namespace BMA.EHR.Discipline.Service.Requests
public string? root { get; set; }
public string? rootId { get; set; }
public string? rootDnaId { get; set; }
public string? rootShortName { get; set; }
public string? child1 { get; set; }
public string? child1Id { get; set; }
public string? child1DnaId { get; set; }
public string? child1ShortName { get; set; }
public string? child2 { get; set; }
public string? child2Id { get; set; }
public string? child2DnaId { get; set; }
public string? child2ShortName { get; set; }
public string? child3 { get; set; }
public string? child3Id { get; set; }
public string? child3DnaId { get; set; }
public string? child3ShortName { get; set; }
public string? child4 { get; set; }
public string? child4Id { get; set; }
public string? child4DnaId { get; set; }
public string? child4ShortName { get; set; }
public int? posMasterNo { get; set; }
public string? posTypeId { get; set; }

View file

@ -24,18 +24,23 @@ namespace BMA.EHR.Discipline.Service.Requests
public string? root { get; set; }
public string? rootId { get; set; }
public string? rootDnaId { get; set; }
public string? rootShortName { get; set; }
public string? child1 { get; set; }
public string? child1Id { get; set; }
public string? child1DnaId { get; set; }
public string? child1ShortName { get; set; }
public string? child2 { get; set; }
public string? child2Id { get; set; }
public string? child2DnaId { get; set; }
public string? child2ShortName { get; set; }
public string? child3 { get; set; }
public string? child3Id { get; set; }
public string? child3DnaId { get; set; }
public string? child3ShortName { get; set; }
public string? child4 { get; set; }
public string? child4Id { get; set; }
public string? child4DnaId { get; set; }
public string? child4ShortName { get; set; }
public int? posMasterNo { get; set; }
public string? posTypeId { get; set; }

View file

@ -24,18 +24,23 @@ namespace BMA.EHR.Discipline.Service.Requests
public string? root { get; set; }
public string? rootId { get; set; }
public string? rootDnaId { get; set; }
public string? rootShortName { get; set; }
public string? child1 { get; set; }
public string? child1Id { get; set; }
public string? child1DnaId { get; set; }
public string? child1ShortName { get; set; }
public string? child2 { get; set; }
public string? child2Id { get; set; }
public string? child2DnaId { get; set; }
public string? child2ShortName { get; set; }
public string? child3 { get; set; }
public string? child3Id { get; set; }
public string? child3DnaId { get; set; }
public string? child3ShortName { get; set; }
public string? child4 { get; set; }
public string? child4Id { get; set; }
public string? child4DnaId { get; set; }
public string? child4ShortName { get; set; }
public int? posMasterNo { get; set; }
public string? posTypeId { get; set; }

View file

@ -25,30 +25,40 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? root { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootId { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootDnaId { 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("id หน่วยงาน child1")]
public string? child1DnaId { 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("id หน่วยงาน child2")]
public string? child2DnaId { 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("id หน่วยงาน child3")]
public string? child3DnaId { 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("id หน่วยงาน child4")]
public string? child4DnaId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4")]
public string? child4ShortName { get; set; }
[Comment("เลขที่ตำแหน่ง")]

View file

@ -25,30 +25,40 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? root { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootId { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootDnaId { 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("id หน่วยงาน child1")]
public string? child1DnaId { 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("id หน่วยงาน child2")]
public string? child2DnaId { 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("id หน่วยงาน child3")]
public string? child3DnaId { 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("id หน่วยงาน child4")]
public string? child4DnaId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4")]
public string? child4ShortName { get; set; }
[Comment("เลขที่ตำแหน่ง")]

View file

@ -25,30 +25,40 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? root { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootId { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootDnaId { 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("id หน่วยงาน child1")]
public string? child1DnaId { 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("id หน่วยงาน child2")]
public string? child2DnaId { 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("id หน่วยงาน child3")]
public string? child3DnaId { 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("id หน่วยงาน child4")]
public string? child4DnaId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4")]
public string? child4ShortName { get; set; }
[Comment("เลขที่ตำแหน่ง")]

View file

@ -25,30 +25,40 @@ namespace BMA.EHR.Domain.Models.Discipline
public string? root { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootId { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootDnaId { 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("id หน่วยงาน child1")]
public string? child1DnaId { 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("id หน่วยงาน child2")]
public string? child2DnaId { 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("id หน่วยงาน child3")]
public string? child3DnaId { 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("id หน่วยงาน child4")]
public string? child4DnaId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4")]
public string? child4ShortName { get; set; }
[Comment("เลขที่ตำแหน่ง")]

View file

@ -81,14 +81,19 @@ namespace BMA.EHR.Domain.Models.Insignias
public double? Amount { get; set; }
public double? PositionSalaryAmount { get; set; }
public Guid? RootId { get; set; }
public Guid? RootDnaId { get; set; }
public string? Root { get; set; }
public Guid? Child1Id { get; set; }
public Guid? Child1DnaId { get; set; }
public string? Child1 { get; set; }
public Guid? Child2Id { get; set; }
public Guid? Child2DnaId { get; set; }
public string? Child2 { get; set; }
public Guid? Child3Id { get; set; }
public Guid? Child3DnaId { get; set; }
public string? Child3 { get; set; }
public Guid? Child4Id { get; set; }
public Guid? Child4DnaId { get; set; }
public string? Child4 { get; set; }
}
}

View file

@ -73,14 +73,19 @@ namespace BMA.EHR.Domain.Models.Insignias
public double? PositionSalaryAmount { get; set; }
public string? LastInsigniaName { get; set; }
public Guid? RootId { get; set; }
public Guid? RootDnaId { get; set; }
public string? Root { get; set; }
public Guid? Child1Id { get; set; }
public Guid? Child1DnaId { get; set; }
public string? Child1 { get; set; }
public Guid? Child2Id { get; set; }
public Guid? Child2DnaId { get; set; }
public string? Child2 { get; set; }
public Guid? Child3Id { get; set; }
public Guid? Child3DnaId { get; set; }
public string? Child3 { get; set; }
public Guid? Child4Id { get; set; }
public Guid? Child4DnaId { get; set; }
public string? Child4 { get; set; }
}
}

View file

@ -65,30 +65,40 @@ namespace BMA.EHR.Domain.Models.Placement
public string? root { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootId { get; set; }
[Comment("id หน่วยงาน rootDna")]
public string? rootDnaId { 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("id หน่วยงาน child1Dna")]
public string? child1DnaId { 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("id หน่วยงาน child2Dna")]
public string? child2DnaId { 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("id หน่วยงาน child3Dna")]
public string? child3DnaId { 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("id หน่วยงาน child4Dna")]
public string? child4DnaId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4")]
public string? child4ShortName { get; set; }
[Comment("ระดับโครงสร้าง")]

View file

@ -27,6 +27,14 @@ namespace BMA.EHR.Domain.Models.Placement
[Comment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้")]
public string? rootDnaId { get; set; }
[Comment("id หน่วยงาน child1Dna")]
public string? child1DnaId { get; set; }
[Comment("id หน่วยงาน child2Dna")]
public string? child2DnaId { get; set; }
[Comment("id หน่วยงาน child3Dna")]
public string? child3DnaId { get; set; }
[Comment("id หน่วยงาน child4Dna")]
public string? child4DnaId { get; set; }
}
}

View file

@ -50,30 +50,40 @@ namespace BMA.EHR.Domain.Models.Placement
public string? rootOld { get; set; }
[Comment("id หน่วยงาน root old")]
public string? rootOldId { get; set; }
[Comment("id หน่วยงาน rootDna old")]
public string? rootDnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน root old")]
public string? rootShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child1 old")]
public string? child1Old { get; set; }
[Comment("id หน่วยงาน child1 old")]
public string? child1OldId { get; set; }
[Comment("id หน่วยงาน child1Dna old")]
public string? child1DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child1 old")]
public string? child1ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child2 old")]
public string? child2Old { get; set; }
[Comment("id หน่วยงาน child2 old")]
public string? child2OldId { get; set; }
[Comment("id หน่วยงาน child2Dna old")]
public string? child2DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child2 old")]
public string? child2ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child3 old")]
public string? child3Old { get; set; }
[Comment("id หน่วยงาน child3 old")]
public string? child3OldId { get; set; }
[Comment("id หน่วยงาน child3Dna old")]
public string? child3DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child3 old")]
public string? child3ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child4 old")]
public string? child4Old { get; set; }
[Comment("id หน่วยงาน child4 old")]
public string? child4OldId { get; set; }
[Comment("id หน่วยงาน child4Dna old")]
public string? child4DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4 old")]
public string? child4ShortNameOld { get; set; }
[Comment("เลขที่ตำแหน่ง old")]

View file

@ -275,30 +275,40 @@ namespace BMA.EHR.Domain.Models.Placement
public string? root { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootId { get; set; }
[Comment("id หน่วยงาน rootDna")]
public string? rootDnaId { 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("id หน่วยงาน child1Dna")]
public string? child1DnaId { 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("id หน่วยงาน child2Dna")]
public string? child2DnaId { 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("id หน่วยงาน child3Dna")]
public string? child3DnaId { 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("id หน่วยงาน child4Dna")]
public string? child4DnaId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4")]
public string? child4ShortName { get; set; }
[Comment("id revision")]

View file

@ -72,30 +72,40 @@ namespace BMA.EHR.Domain.Models.Placement
public string? root { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootId { get; set; }
[Comment("id หน่วยงาน rootDna")]
public string? rootDnaId { 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("id หน่วยงาน child1Dna")]
public string? child1DnaId { 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("id หน่วยงาน child2Dna")]
public string? child2DnaId { 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("id หน่วยงาน child3Dna")]
public string? child3DnaId { 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("id หน่วยงาน child4Dna")]
public string? child4DnaId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4")]
public string? child4ShortName { get; set; }
[Comment("ระดับโครงสร้าง")]

View file

@ -51,30 +51,40 @@ namespace BMA.EHR.Domain.Models.Placement
public string? rootOld { get; set; }
[Comment("id หน่วยงาน root old")]
public string? rootOldId { get; set; }
[Comment("id หน่วยงาน rootDna old")]
public string? rootDnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน root old")]
public string? rootShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child1 old")]
public string? child1Old { get; set; }
[Comment("id หน่วยงาน child1 old")]
public string? child1OldId { get; set; }
[Comment("id หน่วยงาน child1Dna old")]
public string? child1DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child1 old")]
public string? child1ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child2 old")]
public string? child2Old { get; set; }
[Comment("id หน่วยงาน child2 old")]
public string? child2OldId { get; set; }
[Comment("id หน่วยงาน child2Dna old")]
public string? child2DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child2 old")]
public string? child2ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child3 old")]
public string? child3Old { get; set; }
[Comment("id หน่วยงาน child3 old")]
public string? child3OldId { get; set; }
[Comment("id หน่วยงาน child3Dna old")]
public string? child3DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child3 old")]
public string? child3ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child4 old")]
public string? child4Old { get; set; }
[Comment("id หน่วยงาน child4 old")]
public string? child4OldId { get; set; }
[Comment("id หน่วยงาน child4Dna old")]
public string? child4DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4 old")]
public string? child4ShortNameOld { get; set; }
[Comment("เลขที่ตำแหน่ง old")]

View file

@ -48,30 +48,40 @@ namespace BMA.EHR.Domain.Models.Placement
public string? rootOld { get; set; }
[Comment("id หน่วยงาน root old")]
public string? rootOldId { get; set; }
[Comment("id หน่วยงาน rootDna old")]
public string? rootDnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน root old")]
public string? rootShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child1 old")]
public string? child1Old { get; set; }
[Comment("id หน่วยงาน child1 old")]
public string? child1OldId { get; set; }
[Comment("id หน่วยงาน child1Dna old")]
public string? child1DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child1 old")]
public string? child1ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child2 old")]
public string? child2Old { get; set; }
[Comment("id หน่วยงาน child2 old")]
public string? child2OldId { get; set; }
[Comment("id หน่วยงาน child2Dna old")]
public string? child2DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child2 old")]
public string? child2ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child3 old")]
public string? child3Old { get; set; }
[Comment("id หน่วยงาน child3 old")]
public string? child3OldId { get; set; }
[Comment("id หน่วยงาน child3Dna old")]
public string? child3DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child3 old")]
public string? child3ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child4 old")]
public string? child4Old { get; set; }
[Comment("id หน่วยงาน child4 old")]
public string? child4OldId { get; set; }
[Comment("id หน่วยงาน child4Dna old")]
public string? child4DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4 old")]
public string? child4ShortNameOld { get; set; }
[Comment("เลขที่ตำแหน่ง old")]

View file

@ -39,30 +39,40 @@ namespace BMA.EHR.Domain.Models.Retirement
public string? root { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootId { get; set; }
[Comment("id หน่วยงาน root")]
public string? rootDnaId { 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("id หน่วยงาน child1")]
public string? child1DnaId { 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("id หน่วยงาน child2")]
public string? child2DnaId { 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("id หน่วยงาน child3")]
public string? child3DnaId { 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("id หน่วยงาน child4")]
public string? child4DnaId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4")]
public string? child4ShortName { get; set; }
// [Comment("id revision")]

View file

@ -61,30 +61,40 @@ namespace BMA.EHR.Domain.Models.Retirement
public string? rootOld { get; set; }
[Comment("id หน่วยงาน root old")]
public string? rootOldId { get; set; }
[Comment("id หน่วยงาน rootDna old")]
public string? rootDnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน root old")]
public string? rootShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child1 old")]
public string? child1Old { get; set; }
[Comment("id หน่วยงาน child1 old")]
public string? child1OldId { get; set; }
[Comment("id หน่วยงาน child1Dna old")]
public string? child1DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child1 old")]
public string? child1ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child2 old")]
public string? child2Old { get; set; }
[Comment("id หน่วยงาน child2 old")]
public string? child2OldId { get; set; }
[Comment("id หน่วยงาน child2Dna old")]
public string? child2DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child2 old")]
public string? child2ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child3 old")]
public string? child3Old { get; set; }
[Comment("id หน่วยงาน child3 old")]
public string? child3OldId { get; set; }
[Comment("id หน่วยงาน child3Dna old")]
public string? child3DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child3 old")]
public string? child3ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child4 old")]
public string? child4Old { get; set; }
[Comment("id หน่วยงาน child4 old")]
public string? child4OldId { get; set; }
[Comment("id หน่วยงาน child4Dna old")]
public string? child4DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4 old")]
public string? child4ShortNameOld { get; set; }
[Comment("เลขที่ตำแหน่ง old")]

View file

@ -47,30 +47,39 @@ namespace BMA.EHR.Domain.Models.Retirement
public string? rootOld { get; set; }
[Comment("id หน่วยงาน root old")]
public string? rootOldId { get; set; }
public string? rootDnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน root old")]
public string? rootShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child1 old")]
public string? child1Old { get; set; }
[Comment("id หน่วยงาน child1 old")]
public string? child1OldId { get; set; }
[Comment("id หน่วยงาน child1 old")]
public string? child1DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child1 old")]
public string? child1ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child2 old")]
public string? child2Old { get; set; }
[Comment("id หน่วยงาน child2 old")]
public string? child2OldId { get; set; }
[Comment("id หน่วยงาน child2 old")]
public string? child2DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child2 old")]
public string? child2ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child3 old")]
public string? child3Old { get; set; }
[Comment("id หน่วยงาน child3 old")]
public string? child3OldId { get; set; }
[Comment("id หน่วยงาน child3 old")]
public string? child3DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child3 old")]
public string? child3ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child4 old")]
public string? child4Old { get; set; }
[Comment("id หน่วยงาน child4 old")]
public string? child4OldId { get; set; }
[Comment("id หน่วยงาน child4 old")]
public string? child4DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4 old")]
public string? child4ShortNameOld { get; set; }
[Comment("เลขที่ตำแหน่ง old")]

View file

@ -29,30 +29,40 @@ namespace BMA.EHR.Domain.Models.Retirement
public string? root { get; set; }
[Comment("id หน่วยงาน root ")]
public string? rootId { get; set; }
[Comment("id หน่วยงาน root ")]
public string? rootDnaId { 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("id หน่วยงาน child1 ")]
public string? child1DnaId { 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("id หน่วยงาน child2 ")]
public string? child2DnaId { 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("id หน่วยงาน child3 ")]
public string? child3DnaId { 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("id หน่วยงาน child4 ")]
public string? child4DnaId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4 ")]
public string? child4ShortName { get; set; }
[Comment("เลขที่ตำแหน่ง ")]

View file

@ -100,30 +100,40 @@ namespace BMA.EHR.Domain.Models.Retirement
public string? rootOld { get; set; }
[Comment("id หน่วยงาน root old")]
public string? rootOldId { get; set; }
[Comment("id หน่วยงาน root old")]
public string? rootDnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน root old")]
public string? rootShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child1 old")]
public string? child1Old { get; set; }
[Comment("id หน่วยงาน child1 old")]
public string? child1OldId { get; set; }
[Comment("id หน่วยงาน child1 old")]
public string? child1DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child1 old")]
public string? child1ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child2 old")]
public string? child2Old { get; set; }
[Comment("id หน่วยงาน child2 old")]
public string? child2OldId { get; set; }
[Comment("id หน่วยงาน child2 old")]
public string? child2DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child2 old")]
public string? child2ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child3 old")]
public string? child3Old { get; set; }
[Comment("id หน่วยงาน child3 old")]
public string? child3OldId { get; set; }
[Comment("id หน่วยงาน child3 old")]
public string? child3DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child3 old")]
public string? child3ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child4 old")]
public string? child4Old { get; set; }
[Comment("id หน่วยงาน child4 old")]
public string? child4OldId { get; set; }
[Comment("id หน่วยงาน child4 old")]
public string? child4DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4 old")]
public string? child4ShortNameOld { get; set; }
[Comment("เลขที่ตำแหน่ง old")]

View file

@ -100,30 +100,40 @@ namespace BMA.EHR.Domain.Models.Retirement
public string? rootOld { get; set; }
[Comment("id หน่วยงาน root old")]
public string? rootOldId { get; set; }
[Comment("id หน่วยงาน root old")]
public string? rootDnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน root old")]
public string? rootShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child1 old")]
public string? child1Old { get; set; }
[Comment("id หน่วยงาน child1 old")]
public string? child1OldId { get; set; }
[Comment("id หน่วยงาน child1 old")]
public string? child1DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child1 old")]
public string? child1ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child2 old")]
public string? child2Old { get; set; }
[Comment("id หน่วยงาน child2 old")]
public string? child2OldId { get; set; }
[Comment("id หน่วยงาน child2 old")]
public string? child2DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child2 old")]
public string? child2ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child3 old")]
public string? child3Old { get; set; }
[Comment("id หน่วยงาน child3 old")]
public string? child3OldId { get; set; }
[Comment("id หน่วยงาน child3 old")]
public string? child3DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child3 old")]
public string? child3ShortNameOld { get; set; }
[Comment("ชื่อหน่วยงาน child4 old")]
public string? child4Old { get; set; }
[Comment("id หน่วยงาน child4 old")]
public string? child4OldId { get; set; }
[Comment("id หน่วยงาน child4 old")]
public string? child4DnaOldId { get; set; }
[Comment("ชื่อย่อหน่วยงาน child4 old")]
public string? child4ShortNameOld { get; set; }
[Comment("เลขที่ตำแหน่ง old")]

View file

@ -0,0 +1,498 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetableplacementProfileadddnaroot : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "RetirementOthers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "RetirementOthers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "RetirementOthers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "RetirementOthers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "RetirementOthers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "PlacementTransfers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "PlacementTransfers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "PlacementTransfers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "PlacementTransfers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "PlacementTransfers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "PlacementRepatriations",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "PlacementRepatriations",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "PlacementRepatriations",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "PlacementRepatriations",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "PlacementRepatriations",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "PlacementReceives",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "PlacementReceives",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "PlacementReceives",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "PlacementReceives",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "PlacementReceives",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "PlacementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "PlacementOfficers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "PlacementOfficers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "PlacementOfficers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "PlacementOfficers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "PlacementOfficers",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "PlacementAppointments",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "PlacementAppointments",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "PlacementAppointments",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "PlacementAppointments",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "PlacementAppointments",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน rootDna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "PlacementAppointmentEmployee",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "PlacementAppointmentEmployee",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "PlacementAppointmentEmployee",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "PlacementAppointmentEmployee",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4Dna")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "PlacementAppointmentEmployee",
type: "longtext",
nullable: true,
comment: "id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "RetirementOthers");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "RetirementOthers");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "RetirementOthers");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "RetirementOthers");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "RetirementOthers");
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "PlacementTransfers");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "PlacementTransfers");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "PlacementTransfers");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "PlacementTransfers");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "PlacementTransfers");
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "PlacementRepatriations");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "PlacementRepatriations");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "PlacementRepatriations");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "PlacementRepatriations");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "PlacementRepatriations");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "PlacementReceives");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "PlacementReceives");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "PlacementReceives");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "PlacementReceives");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "PlacementReceives");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "PlacementProfiles");
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "PlacementOfficers");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "PlacementOfficers");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "PlacementOfficers");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "PlacementOfficers");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "PlacementOfficers");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "PlacementAppointments");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "PlacementAppointments");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "PlacementAppointments");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "PlacementAppointments");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "PlacementAppointments");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "PlacementAppointmentEmployee");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "PlacementAppointmentEmployee");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "PlacementAppointmentEmployee");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "PlacementAppointmentEmployee");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "PlacementAppointmentEmployee");
}
}
}

View file

@ -0,0 +1,317 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetableplacementProfileadddnaroot1 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "RetirementResigns",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "RetirementResigns",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "RetirementResigns",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "RetirementResigns",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "RetirementResigns",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "RetirementResignEmployees",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "RetirementResignEmployees",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "RetirementResignEmployees",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "RetirementResignEmployees",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "RetirementResignEmployees",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4 ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "RetirementProfiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaOldId",
table: "RetirementOuts",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaOldId",
table: "RetirementOuts",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaOldId",
table: "RetirementOuts",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaOldId",
table: "RetirementOuts",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4 old")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaOldId",
table: "RetirementOuts",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "RetirementDeceaseds",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "RetirementDeceaseds",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "RetirementDeceaseds",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "RetirementDeceaseds",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "RetirementDeceaseds",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "RetirementResigns");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "RetirementResigns");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "RetirementResigns");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "RetirementResigns");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "RetirementResigns");
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "RetirementResignEmployees");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "RetirementResignEmployees");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "RetirementResignEmployees");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "RetirementResignEmployees");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "RetirementResignEmployees");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "RetirementProfiles");
migrationBuilder.DropColumn(
name: "child1DnaOldId",
table: "RetirementOuts");
migrationBuilder.DropColumn(
name: "child2DnaOldId",
table: "RetirementOuts");
migrationBuilder.DropColumn(
name: "child3DnaOldId",
table: "RetirementOuts");
migrationBuilder.DropColumn(
name: "child4DnaOldId",
table: "RetirementOuts");
migrationBuilder.DropColumn(
name: "rootDnaOldId",
table: "RetirementOuts");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "RetirementDeceaseds");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "RetirementDeceaseds");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "RetirementDeceaseds");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "RetirementDeceaseds");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "RetirementDeceaseds");
}
}
}

View file

@ -0,0 +1,129 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetableplacementProfileadddnaroot2 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "Child1DnaId",
table: "InsigniaRequestProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child2DnaId",
table: "InsigniaRequestProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child3DnaId",
table: "InsigniaRequestProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child4DnaId",
table: "InsigniaRequestProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "RootDnaId",
table: "InsigniaRequestProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child1DnaId",
table: "InsigniaNoteProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child2DnaId",
table: "InsigniaNoteProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child3DnaId",
table: "InsigniaNoteProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "Child4DnaId",
table: "InsigniaNoteProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.AddColumn<Guid>(
name: "RootDnaId",
table: "InsigniaNoteProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Child1DnaId",
table: "InsigniaRequestProfiles");
migrationBuilder.DropColumn(
name: "Child2DnaId",
table: "InsigniaRequestProfiles");
migrationBuilder.DropColumn(
name: "Child3DnaId",
table: "InsigniaRequestProfiles");
migrationBuilder.DropColumn(
name: "Child4DnaId",
table: "InsigniaRequestProfiles");
migrationBuilder.DropColumn(
name: "RootDnaId",
table: "InsigniaRequestProfiles");
migrationBuilder.DropColumn(
name: "Child1DnaId",
table: "InsigniaNoteProfiles");
migrationBuilder.DropColumn(
name: "Child2DnaId",
table: "InsigniaNoteProfiles");
migrationBuilder.DropColumn(
name: "Child3DnaId",
table: "InsigniaNoteProfiles");
migrationBuilder.DropColumn(
name: "Child4DnaId",
table: "InsigniaNoteProfiles");
migrationBuilder.DropColumn(
name: "RootDnaId",
table: "InsigniaNoteProfiles");
}
}
}

View file

@ -6082,24 +6082,36 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<string>("Child1")
.HasColumnType("longtext");
b.Property<Guid?>("Child1DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child1Id")
.HasColumnType("char(36)");
b.Property<string>("Child2")
.HasColumnType("longtext");
b.Property<Guid?>("Child2DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child2Id")
.HasColumnType("char(36)");
b.Property<string>("Child3")
.HasColumnType("longtext");
b.Property<Guid?>("Child3DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child3Id")
.HasColumnType("char(36)");
b.Property<string>("Child4")
.HasColumnType("longtext");
b.Property<Guid?>("Child4DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child4Id")
.HasColumnType("char(36)");
@ -6261,6 +6273,9 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<string>("Root")
.HasColumnType("longtext");
b.Property<Guid?>("RootDnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("RootId")
.HasColumnType("char(36)");
@ -6491,24 +6506,36 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<string>("Child1")
.HasColumnType("longtext");
b.Property<Guid?>("Child1DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child1Id")
.HasColumnType("char(36)");
b.Property<string>("Child2")
.HasColumnType("longtext");
b.Property<Guid?>("Child2DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child2Id")
.HasColumnType("char(36)");
b.Property<string>("Child3")
.HasColumnType("longtext");
b.Property<Guid?>("Child3DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child3Id")
.HasColumnType("char(36)");
b.Property<string>("Child4")
.HasColumnType("longtext");
b.Property<Guid?>("Child4DnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("Child4Id")
.HasColumnType("char(36)");
@ -6631,6 +6658,9 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Property<string>("Root")
.HasColumnType("longtext");
b.Property<Guid?>("RootDnaId")
.HasColumnType("char(36)");
b.Property<Guid?>("RootId")
.HasColumnType("char(36)");
@ -11440,6 +11470,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1Dna");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
@ -11464,6 +11498,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2Dna");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
@ -11488,6 +11526,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3Dna");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
@ -11512,6 +11554,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4Dna");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
@ -11628,6 +11674,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน rootDna");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
@ -11770,6 +11820,22 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1Dna");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2Dna");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3Dna");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4Dna");
b.Property<string>("citizenId")
.HasColumnType("longtext")
.HasComment("เลขบัตรประชาชน");
@ -11794,6 +11860,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
@ -12182,6 +12252,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("สถานะคำขอ");
b.Property<string>("child1DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1Dna old");
b.Property<string>("child1Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 old");
@ -12194,6 +12268,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1 old");
b.Property<string>("child2DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2Dna old");
b.Property<string>("child2Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 old");
@ -12206,6 +12284,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2 old");
b.Property<string>("child3DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3Dna old");
b.Property<string>("child3Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 old");
@ -12218,6 +12300,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3 old");
b.Property<string>("child4DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4Dna old");
b.Property<string>("child4Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 old");
@ -12274,6 +12360,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("profile Id");
b.Property<string>("rootDnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน rootDna old");
b.Property<string>("rootOld")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root old");
@ -12710,6 +12800,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1Dna");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
@ -12734,6 +12828,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2Dna");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
@ -12758,6 +12856,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3Dna");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
@ -12782,6 +12884,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4Dna");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
@ -12939,6 +13045,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน rootDna");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
@ -13184,6 +13294,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1Dna");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
@ -13208,6 +13322,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2Dna");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
@ -13232,6 +13350,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3Dna");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
@ -13256,6 +13378,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4Dna");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
@ -13368,6 +13494,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน rootDna");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
@ -13817,6 +13947,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("สถานะคำขอ");
b.Property<string>("child1DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1Dna old");
b.Property<string>("child1Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 old");
@ -13829,6 +13963,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1 old");
b.Property<string>("child2DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2Dna old");
b.Property<string>("child2Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 old");
@ -13841,6 +13979,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2 old");
b.Property<string>("child3DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3Dna old");
b.Property<string>("child3Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 old");
@ -13853,6 +13995,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3 old");
b.Property<string>("child4DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4Dna old");
b.Property<string>("child4Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 old");
@ -13905,6 +14051,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("profile Id");
b.Property<string>("rootDnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน rootDna old");
b.Property<string>("rootOld")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root old");
@ -14018,6 +14168,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("สถานะคำขอ");
b.Property<string>("child1DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1Dna old");
b.Property<string>("child1Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 old");
@ -14030,6 +14184,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1 old");
b.Property<string>("child2DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2Dna old");
b.Property<string>("child2Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 old");
@ -14042,6 +14200,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2 old");
b.Property<string>("child3DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3Dna old");
b.Property<string>("child3Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 old");
@ -14054,6 +14216,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3 old");
b.Property<string>("child4DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4Dna old");
b.Property<string>("child4Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 old");
@ -14106,6 +14272,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("profile Id");
b.Property<string>("rootDnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน rootDna old");
b.Property<string>("rootOld")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root old");
@ -14411,6 +14581,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
@ -14423,6 +14597,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
@ -14435,6 +14613,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
@ -14447,6 +14629,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
@ -14507,6 +14693,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
@ -14947,6 +15137,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("สถานะคำขอ");
b.Property<string>("child1DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1Dna old");
b.Property<string>("child1Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 old");
@ -14959,6 +15153,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1 old");
b.Property<string>("child2DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2Dna old");
b.Property<string>("child2Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 old");
@ -14971,6 +15169,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2 old");
b.Property<string>("child3DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3Dna old");
b.Property<string>("child3Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 old");
@ -14983,6 +15185,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3 old");
b.Property<string>("child4DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4Dna old");
b.Property<string>("child4Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 old");
@ -15035,6 +15241,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("profile Id");
b.Property<string>("rootDnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน rootDna old");
b.Property<string>("rootOld")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root old");
@ -15212,6 +15422,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("สถานะคำขอ");
b.Property<string>("child1DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 old");
b.Property<string>("child1Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 old");
@ -15224,6 +15438,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1 old");
b.Property<string>("child2DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 old");
b.Property<string>("child2Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 old");
@ -15236,6 +15454,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2 old");
b.Property<string>("child3DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 old");
b.Property<string>("child3Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 old");
@ -15248,6 +15470,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3 old");
b.Property<string>("child4DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 old");
b.Property<string>("child4Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 old");
@ -15304,6 +15530,9 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)");
b.Property<string>("rootDnaOldId")
.HasColumnType("longtext");
b.Property<string>("rootOld")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root old");
@ -15569,6 +15798,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 ");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 ");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 ");
@ -15581,6 +15814,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 ");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 ");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 ");
@ -15593,6 +15830,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 ");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 ");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 ");
@ -15605,6 +15846,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 ");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 ");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 ");
@ -15681,6 +15926,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root ");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root ");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root ");
@ -16423,6 +16672,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("สถานะลาออก");
b.Property<string>("child1DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 old");
b.Property<string>("child1Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 old");
@ -16435,6 +16688,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1 old");
b.Property<string>("child2DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 old");
b.Property<string>("child2Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 old");
@ -16447,6 +16704,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2 old");
b.Property<string>("child3DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 old");
b.Property<string>("child3Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 old");
@ -16459,6 +16720,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3 old");
b.Property<string>("child4DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 old");
b.Property<string>("child4Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 old");
@ -16511,6 +16776,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("profile Id");
b.Property<string>("rootDnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root old");
b.Property<string>("rootOld")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root old");
@ -17128,6 +17397,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("สถานะลาออก");
b.Property<string>("child1DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1 old");
b.Property<string>("child1Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1 old");
@ -17140,6 +17413,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child1 old");
b.Property<string>("child2DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2 old");
b.Property<string>("child2Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2 old");
@ -17152,6 +17429,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child2 old");
b.Property<string>("child3DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3 old");
b.Property<string>("child3Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3 old");
@ -17164,6 +17445,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("ชื่อย่อหน่วยงาน child3 old");
b.Property<string>("child4DnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4 old");
b.Property<string>("child4Old")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4 old");
@ -17216,6 +17501,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("profile Id");
b.Property<string>("rootDnaOldId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root old");
b.Property<string>("rootOld")
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root old");

View file

@ -0,0 +1,258 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class updatetabledisciplinecomadddna : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "DisciplineReport_Profiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "DisciplineReport_Profiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "DisciplineReport_Profiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "DisciplineReport_Profiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "DisciplineReport_Profiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "DisciplineInvestigate_ProfileComplaints",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "DisciplineInvestigate_ProfileComplaints",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "DisciplineInvestigate_ProfileComplaints",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "DisciplineInvestigate_ProfileComplaints",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "DisciplineInvestigate_ProfileComplaints",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child1DnaId",
table: "DisciplineComplaint_Profiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child1")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child2DnaId",
table: "DisciplineComplaint_Profiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child2")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child3DnaId",
table: "DisciplineComplaint_Profiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child3")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "child4DnaId",
table: "DisciplineComplaint_Profiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน child4")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "rootDnaId",
table: "DisciplineComplaint_Profiles",
type: "longtext",
nullable: true,
comment: "id หน่วยงาน root")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "DisciplineReport_Profiles");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "DisciplineReport_Profiles");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "DisciplineReport_Profiles");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "DisciplineReport_Profiles");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "DisciplineReport_Profiles");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "DisciplineInvestigate_ProfileComplaints");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "DisciplineInvestigate_ProfileComplaints");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "DisciplineInvestigate_ProfileComplaints");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "DisciplineInvestigate_ProfileComplaints");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "DisciplineInvestigate_ProfileComplaints");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "DisciplineDisciplinary_ProfileComplaintInvestigates");
migrationBuilder.DropColumn(
name: "child1DnaId",
table: "DisciplineComplaint_Profiles");
migrationBuilder.DropColumn(
name: "child2DnaId",
table: "DisciplineComplaint_Profiles");
migrationBuilder.DropColumn(
name: "child3DnaId",
table: "DisciplineComplaint_Profiles");
migrationBuilder.DropColumn(
name: "child4DnaId",
table: "DisciplineComplaint_Profiles");
migrationBuilder.DropColumn(
name: "rootDnaId",
table: "DisciplineComplaint_Profiles");
}
}
}

View file

@ -592,6 +592,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
@ -604,6 +608,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
@ -616,6 +624,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
@ -628,6 +640,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
@ -664,6 +680,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
@ -1859,6 +1879,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
@ -1871,6 +1895,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
@ -1883,6 +1911,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
@ -1895,6 +1927,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
@ -1931,6 +1967,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
@ -2554,6 +2594,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
@ -2566,6 +2610,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
@ -2578,6 +2626,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
@ -2590,6 +2642,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
@ -2626,6 +2682,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
@ -2780,6 +2840,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child1");
b.Property<string>("child1DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
b.Property<string>("child1Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child1");
@ -2792,6 +2856,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child2");
b.Property<string>("child2DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
b.Property<string>("child2Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child2");
@ -2804,6 +2872,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child3");
b.Property<string>("child3DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
b.Property<string>("child3Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child3");
@ -2816,6 +2888,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน child4");
b.Property<string>("child4DnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
b.Property<string>("child4Id")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน child4");
@ -2852,6 +2928,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
.HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root");
b.Property<string>("rootDnaId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");
b.Property<string>("rootId")
.HasColumnType("longtext")
.HasComment("id หน่วยงาน root");

View file

@ -936,14 +936,19 @@ namespace BMA.EHR.Insignia.Service.Controllers
LastInsigniaName = lastInsignia,
Root = profile.Root,
RootId = profile.RootId,
RootDnaId = profile.RootDnaId,
Child1 = profile.Child1,
Child1Id = profile.Child1Id,
Child1DnaId = profile.Child1DnaId,
Child2 = profile.Child2,
Child2Id = profile.Child2Id,
Child2DnaId = profile.Child2DnaId,
Child3 = profile.Child3,
Child3Id = profile.Child3Id,
Child3DnaId = profile.Child3DnaId,
Child4 = profile.Child4,
Child4Id = profile.Child4Id,
Child4DnaId = profile.Child4DnaId,
});
await _context.SaveChangesAsync();
@ -1091,14 +1096,19 @@ namespace BMA.EHR.Insignia.Service.Controllers
PositionSalaryAmount = profileOld.PositionSalaryAmount,
Root = profileOld.Root,
RootId = profileOld.RootId,
RootDnaId = profileOld.RootDnaId,
Child1 = profileOld.Child1,
Child1Id = profileOld.Child1Id,
Child1DnaId = profileOld.Child1Id,
Child2 = profileOld.Child2,
Child2Id = profileOld.Child2Id,
Child2DnaId = profileOld.Child2DnaId,
Child3 = profileOld.Child3,
Child3Id = profileOld.Child3Id,
Child3DnaId = profileOld.Child3DnaId,
Child4 = profileOld.Child4,
Child4Id = profileOld.Child4Id,
Child4DnaId = profileOld.Child4DnaId,
});
}
}
@ -1856,15 +1866,20 @@ namespace BMA.EHR.Insignia.Service.Controllers
Amount = pf.Amount,
PositionSalaryAmount = pf.PositionSalaryAmount,
RootId = pf.RootId,
RootDnaId = pf.RootDnaId,
Root = pf.Root,
Child1 = pf.Child1,
Child1Id = pf.Child1Id,
Child1DnaId = pf.Child1DnaId,
Child2 = pf.Child2,
Child2Id = pf.Child2Id,
Child2DnaId = pf.Child2DnaId,
Child3 = pf.Child3,
Child3Id = pf.Child3Id,
Child3DnaId = pf.Child3DnaId,
Child4 = pf.Child4,
Child4Id = pf.Child4Id,
Child4DnaId = pf.Child4DnaId,
LastUpdateFullName = FullName ?? "System Administrator",
LastUpdateUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,
@ -2041,14 +2056,19 @@ namespace BMA.EHR.Insignia.Service.Controllers
PositionSalaryAmount = _profile.PositionSalaryAmount,
Root = _profile.Root,
RootId = _profile.RootId,
RootDnaId = _profile.RootDnaId,
Child1 = _profile.Child1,
Child1Id = _profile.Child1Id,
Child1DnaId = _profile.Child1DnaId,
Child2 = _profile.Child2,
Child2Id = _profile.Child2Id,
Child2DnaId = _profile.Child2DnaId,
Child3 = _profile.Child3,
Child3Id = _profile.Child3Id,
Child3DnaId = _profile.Child3DnaId,
Child4 = _profile.Child4,
Child4Id = _profile.Child4Id,
Child4DnaId = _profile.Child4DnaId,
};
}
else

View file

@ -527,18 +527,23 @@ namespace BMA.EHR.Placement.Service.Controllers
return Error("ไม่พบหน่วยงานนี้ในระบบ", 404);
uppdated.root = org.result.root;
uppdated.rootId = org.result.rootId;
uppdated.rootDnaId = org.result.rootDnaId;
uppdated.rootShortName = org.result.rootShortName;
uppdated.child1 = req.node <= 0 ? null : org.result.child1;
uppdated.child1Id = req.node <= 0 ? null : org.result.child1Id;
uppdated.child1DnaId = req.node <= 0 ? null : org.result.child1DnaId;
uppdated.child1ShortName = req.node <= 0 ? null : org.result.child1ShortName;
uppdated.child2 = req.node <= 1 ? null : org.result.child2;
uppdated.child2Id = req.node <= 1 ? null : org.result.child2Id;
uppdated.child2DnaId = req.node <= 1 ? null : org.result.child2DnaId;
uppdated.child2ShortName = req.node <= 1 ? null : org.result.child2ShortName;
uppdated.child3 = req.node <= 2 ? null : org.result.child3;
uppdated.child3Id = req.node <= 2 ? null : org.result.child3Id;
uppdated.child3DnaId = req.node <= 2 ? null : org.result.child3DnaId;
uppdated.child3ShortName = req.node <= 2 ? null : org.result.child3ShortName;
uppdated.child4 = req.node <= 3 ? null : org.result.child4;
uppdated.child4Id = req.node <= 3 ? null : org.result.child4Id;
uppdated.child4DnaId = req.node <= 3 ? null : org.result.child4DnaId;
uppdated.child4ShortName = req.node <= 3 ? null : org.result.child4ShortName;
}
@ -961,11 +966,11 @@ namespace BMA.EHR.Placement.Service.Controllers
var placementProfiles = await _context.PlacementAppointments
.Where(x => req.refIds.Contains(x.Id.ToString()))
.ToListAsync();
placementProfiles.ForEach(profile =>
{
profile.Status = "REPORT";
profile.typeCommand = "MOVE";
});
placementProfiles.ForEach(profile =>
{
profile.Status = "REPORT";
profile.typeCommand = "MOVE";
});
await _context.SaveChangesAsync();
return Success();
}
@ -1844,6 +1849,10 @@ namespace BMA.EHR.Placement.Service.Controllers
rootId = profile.rootId,
rootShortName = profile.rootShortName,
rootDnaId = profile.rootDnaId,
child1DnaId = profile.child1DnaId,
child2DnaId = profile.child2DnaId,
child3DnaId = profile.child3DnaId,
child4DnaId = profile.child4DnaId,
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",

View file

@ -559,18 +559,23 @@ namespace BMA.EHR.Placement.Service.Controllers
uppdated.root = org.result.root;
uppdated.rootId = org.result.rootId;
uppdated.rootDnaId = org.result.rootDnaId;
uppdated.rootShortName = org.result.rootShortName;
uppdated.child1 = req.node <= 0 ? null : org.result.child1;
uppdated.child1Id = req.node <= 0 ? null : org.result.child1Id;
uppdated.child1DnaId = req.node <= 0 ? null : org.result.child1DnaId;
uppdated.child1ShortName = req.node <= 0 ? null : org.result.child1ShortName;
uppdated.child2 = req.node <= 1 ? null : org.result.child2;
uppdated.child2Id = req.node <= 1 ? null : org.result.child2Id;
uppdated.child2DnaId = req.node <= 1 ? null : org.result.child2DnaId;
uppdated.child2ShortName = req.node <= 1 ? null : org.result.child2ShortName;
uppdated.child3 = req.node <= 2 ? null : org.result.child3;
uppdated.child3Id = req.node <= 2 ? null : org.result.child3Id;
uppdated.child3DnaId = req.node <= 2 ? null : org.result.child3DnaId;
uppdated.child3ShortName = req.node <= 2 ? null : org.result.child3ShortName;
uppdated.child4 = req.node <= 3 ? null : org.result.child4;
uppdated.child4Id = req.node <= 3 ? null : org.result.child4Id;
uppdated.child4DnaId = req.node <= 3 ? null : org.result.child4DnaId;
uppdated.child4ShortName = req.node <= 3 ? null : org.result.child4ShortName;
}

View file

@ -810,18 +810,23 @@ namespace BMA.EHR.Placement.Service.Controllers
person.LastUpdatedAt = DateTime.Now;
person.root = null;
person.rootId = null;
person.rootDnaId = null;
person.rootShortName = null;
person.child1 = null;
person.child1Id = null;
person.child1DnaId = null;
person.child1ShortName = null;
person.child2 = null;
person.child2Id = null;
person.child2Id = null;
person.child2ShortName = null;
person.child3 = null;
person.child3Id = null;
person.child3DnaId = null;
person.child3ShortName = null;
person.child4 = null;
person.child4Id = null;
person.child4DnaId = null;
person.child4ShortName = null;
person.orgRevisionId = null;
person.posMasterNo = null;
@ -920,18 +925,23 @@ namespace BMA.EHR.Placement.Service.Controllers
person.root = org.result.root;
person.rootId = org.result.rootId;
person.rootDnaId = org.result.rootDnaId;
person.rootShortName = org.result.rootShortName;
person.child1 = req.node <= 0 ? null : org.result.child1;
person.child1Id = req.node <= 0 ? null : org.result.child1Id;
person.child1DnaId = req.node <= 0 ? null : org.result.child1DnaId;
person.child1ShortName = req.node <= 0 ? null : org.result.child1ShortName;
person.child2 = req.node <= 1 ? null : org.result.child2;
person.child2Id = req.node <= 1 ? null : org.result.child2Id;
person.child2DnaId = req.node <= 1 ? null : org.result.child2DnaId;
person.child2ShortName = req.node <= 1 ? null : org.result.child2ShortName;
person.child3 = req.node <= 2 ? null : org.result.child3;
person.child3Id = req.node <= 2 ? null : org.result.child3Id;
person.child3DnaId = req.node <= 2 ? null : org.result.child3DnaId;
person.child3ShortName = req.node <= 2 ? null : org.result.child3ShortName;
person.child4 = req.node <= 3 ? null : org.result.child4;
person.child4Id = req.node <= 3 ? null : org.result.child4Id;
person.child4DnaId = req.node <= 3 ? null : org.result.child4DnaId;
person.child4ShortName = req.node <= 3 ? null : org.result.child4ShortName;
}
@ -1314,18 +1324,23 @@ namespace BMA.EHR.Placement.Service.Controllers
}
profile.root = null;
profile.rootId = null;
profile.rootDnaId = null;
profile.rootShortName = null;
profile.child1 = null;
profile.child1Id = null;
profile.child1DnaId = null;
profile.child1ShortName = null;
profile.child2 = null;
profile.child2Id = null;
profile.child2DnaId = null;
profile.child2ShortName = null;
profile.child3 = null;
profile.child3Id = null;
profile.child3DnaId = null;
profile.child3ShortName = null;
profile.child4 = null;
profile.child4Id = null;
profile.child4DnaId = null;
profile.child4ShortName = null;
profile.orgRevisionId = null;
profile.posMasterNo = null;
@ -2919,7 +2934,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(item.child4DnaId) : true) &&
x.PlacementStatus.Trim().ToUpper() == "DONE")
.GroupBy(x => x.typeCommand.Trim().ToUpper())
.Select(g => new
@ -2933,7 +2952,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE" &&
x.type.Trim().ToUpper() == "OFFICER")
.GroupBy(x => x.typeCommand.Trim().ToUpper())
@ -2948,7 +2971,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootOldId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaOldId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -2956,7 +2983,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -2964,7 +2995,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootOldId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaOldId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -2972,7 +3007,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootOldId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaOldId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -2980,7 +3019,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootOldId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaOldId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -3018,7 +3061,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(item.child4DnaId) : true) &&
x.PlacementStatus.Trim().ToUpper() == "DONE")
.GroupBy(x => x.typeCommand.Trim().ToUpper())
.Select(g => new
@ -3032,7 +3079,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE" &&
x.type.Trim().ToUpper() == "OFFICER")
.GroupBy(x => x.typeCommand.Trim().ToUpper())
@ -3047,7 +3098,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootOldId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaOldId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -3055,7 +3110,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -3063,7 +3122,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootOldId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaOldId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -3071,7 +3134,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootOldId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaOldId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -3079,7 +3146,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootOldId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaOldId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -3210,7 +3281,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE" &&
x.type.Trim().ToUpper() == "EMPLOYEE")
.GroupBy(x => x.typeCommand.Trim().ToUpper())
@ -3225,7 +3300,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootId.Contains(item.rootId))
(node == 0 ? x.rootDnaId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(item.child4DnaId) : true))
.Count();
//var pa_appoint = placementAppointments.FirstOrDefault(x => x.TypeCommand == "APPOINTED")?.Count ?? 0;
@ -3251,7 +3330,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootId.Contains(item.rootId) &&
(node == 0 ? x.rootDnaId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(item.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE" &&
x.type.Trim().ToUpper() == "EMPLOYEE")
.GroupBy(x => x.typeCommand.Trim().ToUpper())
@ -3266,7 +3349,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootId.Contains(item.rootId))
(node == 0 ? x.rootDnaId.Contains(item.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(item.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(item.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(item.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(item.child4DnaId) : true))
.Count();
//var pa_appoint = placementAppointments.FirstOrDefault(x => x.TypeCommand == "APPOINTED")?.Count ?? 0;

View file

@ -372,18 +372,23 @@ namespace BMA.EHR.Placement.Service.Controllers
placementOfficer.citizenId = org.result.citizenId;
placementOfficer.rootOld = org.result.root;
placementOfficer.rootOldId = org.result.rootId;
placementOfficer.rootDnaOldId = org.result.rootDnaId;
placementOfficer.rootShortNameOld = org.result.rootShortName;
placementOfficer.child1Old = org.result.child1;
placementOfficer.child1OldId = org.result.child1Id;
placementOfficer.child1DnaOldId = org.result.child1DnaId;
placementOfficer.child1ShortNameOld = org.result.child1ShortName;
placementOfficer.child2Old = org.result.child2;
placementOfficer.child2OldId = org.result.child2Id;
placementOfficer.child2DnaOldId = org.result.child2DnaId;
placementOfficer.child2ShortNameOld = org.result.child2ShortName;
placementOfficer.child3Old = org.result.child3;
placementOfficer.child3OldId = org.result.child3Id;
placementOfficer.child3DnaOldId = org.result.child3DnaId;
placementOfficer.child3ShortNameOld = org.result.child3ShortName;
placementOfficer.child4Old = org.result.child4;
placementOfficer.child4OldId = org.result.child4Id;
placementOfficer.child4DnaOldId = org.result.child4DnaId;
placementOfficer.child4ShortNameOld = org.result.child4ShortName;
placementOfficer.posMasterNoOld = org.result.posMasterNo;
placementOfficer.posTypeOldId = org.result.posTypeId;

View file

@ -628,18 +628,23 @@ namespace BMA.EHR.Placement.Service.Controllers
uppdated.root = org.result.root;
uppdated.rootId = org.result.rootId;
uppdated.rootDnaId = org.result.rootDnaId;
uppdated.rootShortName = org.result.rootShortName;
uppdated.child1 = req.node <= 0 ? null : org.result.child1;
uppdated.child1Id = req.node <= 0 ? null : org.result.child1Id;
uppdated.child1DnaId = req.node <= 0 ? null : org.result.child1DnaId;
uppdated.child1ShortName = req.node <= 0 ? null : org.result.child1ShortName;
uppdated.child2 = req.node <= 1 ? null : org.result.child2;
uppdated.child2Id = req.node <= 1 ? null : org.result.child2Id;
uppdated.child2DnaId = req.node <= 1 ? null : org.result.child2DnaId;
uppdated.child2ShortName = req.node <= 1 ? null : org.result.child2ShortName;
uppdated.child3 = req.node <= 2 ? null : org.result.child3;
uppdated.child3Id = req.node <= 2 ? null : org.result.child3Id;
uppdated.child3DnaId = req.node <= 2 ? null : org.result.child3DnaId;
uppdated.child3ShortName = req.node <= 2 ? null : org.result.child3ShortName;
uppdated.child4 = req.node <= 3 ? null : org.result.child4;
uppdated.child4Id = req.node <= 3 ? null : org.result.child4Id;
uppdated.child4DnaId = req.node <= 3 ? null : org.result.child4DnaId;
uppdated.child4ShortName = req.node <= 3 ? null : org.result.child4ShortName;
}

View file

@ -250,18 +250,23 @@ namespace BMA.EHR.Placement.Service.Controllers
placementRepatriation.citizenId = org.result.citizenId;
placementRepatriation.rootOld = org.result.root;
placementRepatriation.rootOldId = org.result.rootId;
placementRepatriation.rootDnaOldId = org.result.rootDnaId;
placementRepatriation.rootShortNameOld = org.result.rootShortName;
placementRepatriation.child1Old = org.result.child1;
placementRepatriation.child1OldId = org.result.child1Id;
placementRepatriation.child1DnaOldId = org.result.child1DnaId;
placementRepatriation.child1ShortNameOld = org.result.child1ShortName;
placementRepatriation.child2Old = org.result.child2;
placementRepatriation.child2OldId = org.result.child2Id;
placementRepatriation.child2DnaOldId = org.result.child2DnaId;
placementRepatriation.child2ShortNameOld = org.result.child2ShortName;
placementRepatriation.child3Old = org.result.child3;
placementRepatriation.child3OldId = org.result.child3Id;
placementRepatriation.child3DnaOldId = org.result.child3DnaId;
placementRepatriation.child3ShortNameOld = org.result.child3ShortName;
placementRepatriation.child4Old = org.result.child4;
placementRepatriation.child4OldId = org.result.child4Id;
placementRepatriation.child4DnaOldId = org.result.child4DnaId;
placementRepatriation.child4ShortNameOld = org.result.child4ShortName;
placementRepatriation.posMasterNoOld = org.result.posMasterNo;
placementRepatriation.posTypeOldId = org.result.posTypeId;

View file

@ -505,18 +505,23 @@ namespace BMA.EHR.Placement.Service.Controllers
placementTransfer.citizenId = org.result.citizenId;
placementTransfer.rootOld = org.result.root;
placementTransfer.rootOldId = org.result.rootId;
placementTransfer.rootDnaOldId = org.result.rootDnaId;
placementTransfer.rootShortNameOld = org.result.rootShortName;
placementTransfer.child1Old = org.result.child1;
placementTransfer.child1OldId = org.result.child1Id;
placementTransfer.child1DnaOldId = org.result.child1DnaId;
placementTransfer.child1ShortNameOld = org.result.child1ShortName;
placementTransfer.child2Old = org.result.child2;
placementTransfer.child2OldId = org.result.child2Id;
placementTransfer.child2DnaOldId = org.result.child2DnaId;
placementTransfer.child2ShortNameOld = org.result.child2ShortName;
placementTransfer.child3Old = org.result.child3;
placementTransfer.child3OldId = org.result.child3Id;
placementTransfer.child3DnaOldId = org.result.child3DnaId;
placementTransfer.child3ShortNameOld = org.result.child3ShortName;
placementTransfer.child4Old = org.result.child4;
placementTransfer.child4OldId = org.result.child4Id;
placementTransfer.child4DnaOldId = org.result.child4DnaId;
placementTransfer.child4ShortNameOld = org.result.child4ShortName;
placementTransfer.posMasterNoOld = org.result.posMasterNo;
placementTransfer.posTypeOldId = org.result.posTypeId;

View file

@ -16,9 +16,14 @@ namespace BMA.EHR.Placement.Service.Requests
{
public string? name { get; set; }
public string? rootId { get; set; }
public string? rootDnaId { get; set; }
public string? child1Id { get; set; }
public string? child1DnaId { get; set; }
public string? child2Id { get; set; }
public string? child2DnaId { get; set; }
public string? child3Id { get; set; }
public string? child3DnaId { get; set; }
public string? child4Id { get; set; }
public string? child4DnaId { get; set; }
}
}

View file

@ -18,18 +18,23 @@ namespace BMA.EHR.Placement.Service.Requests
public DateTime? birthDate { get; set; }
public string? root { get; set; }
public string? rootId { get; set; }
public string? rootDnaId { get; set; }
public string? rootShortName { get; set; }
public string? child1 { get; set; }
public string? child1Id { get; set; }
public string? child1DnaId { get; set; }
public string? child1ShortName { get; set; }
public string? child2 { get; set; }
public string? child2Id { get; set; }
public string? child2DnaId { get; set; }
public string? child2ShortName { get; set; }
public string? child3 { get; set; }
public string? child3Id { get; set; }
public string? child3DnaId { get; set; }
public string? child3ShortName { get; set; }
public string? child4 { get; set; }
public string? child4Id { get; set; }
public string? child4DnaId { get; set; }
public string? child4ShortName { get; set; }
public string? node { get; set; }
public string? nodeId { get; set; }

View file

@ -18,6 +18,10 @@ namespace BMA.EHR.Placement.Service.Requests
public string? rootId { get; set; }
public string? rootShortName { get; set; }
public string? rootDnaId { get; set; }
public string? child1DnaId { get; set; }
public string? child2DnaId { get; set; }
public string? child3DnaId { get; set; }
public string? child4DnaId { get; set; }
}
}

View file

@ -1480,7 +1480,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
{
//เกษียณ
var retire = _context.RetirementPeriods
.Include(x => x.RetirementProfiles.Where(x => x.rootId == org.rootId))
.Include(x => x.RetirementProfiles.Where(x =>
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true)))
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
@ -1509,7 +1514,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootOldId.Contains(org.rootId) &&
(node == 0 ? x.rootDnaOldId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(org.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -1519,7 +1528,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.rootId.Contains(org.rootId))
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
//ให้ออก
@ -1529,7 +1542,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.CreatedAt.Date <= endDate &&
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.rootOldId.Contains(org.rootId))
(node == 0 ? x.rootDnaOldId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(org.child4DnaId) : true))
.Count();
//ปลดออก
@ -1540,7 +1557,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.CommandTypeId == Guid.Parse("ef8db4d7-1472-4c1d-b73f-9114e618a96f") &&
x.rootId.Contains(org.rootId))
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
//ไล่ออก
@ -1551,7 +1572,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.CommandTypeId == Guid.Parse("d9dee5c3-b75a-4927-9ce2-51e2233cf20b") &&
x.rootId.Contains(org.rootId))
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
data1.Add(new
@ -1579,7 +1604,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
{
//เกษียณ
var retire = _context.RetirementPeriods
.Include(x => x.RetirementProfiles.Where(x => x.rootId == org.rootId))
.Include(x => x.RetirementProfiles.Where(x =>
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true)))
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
@ -1593,7 +1623,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootOldId == org.rootId &&
(node == 0 ? x.rootDnaOldId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(org.child4DnaId) : true) &&
x.IsCancel == false && x.Status == "DONE")
.ToList();
@ -1608,7 +1642,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.rootOldId.Contains(org.rootId) &&
(node == 0 ? x.rootDnaOldId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(org.child4DnaId) : true) &&
x.Status.Trim().ToUpper() == "DONE")
.Count();
@ -1618,7 +1656,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.rootId.Contains(org.rootId))
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
//ให้ออก
@ -1628,7 +1670,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.CreatedAt.Date <= endDate &&
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.rootOldId.Contains(org.rootId))
(node == 0 ? x.rootDnaOldId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaOldId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaOldId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaOldId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaOldId.Contains(org.child4DnaId) : true))
.Count();
//ปลดออก
@ -1639,7 +1685,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.CommandTypeId == Guid.Parse("ef8db4d7-1472-4c1d-b73f-9114e618a96f") &&
x.rootId.Contains(org.rootId))
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
//ไล่ออก
@ -1650,7 +1700,11 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.CommandTypeId == Guid.Parse("d9dee5c3-b75a-4927-9ce2-51e2233cf20b") &&
x.rootId.Contains(org.rootId))
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
data2.Add(new
@ -1772,17 +1826,22 @@ namespace BMA.EHR.Retirement.Service.Controllers
{
//เกษียณ
var retire = _context.RetirementPeriods
.Include(x => x.RetirementProfiles.Where(x => x.rootId == org.rootId))
.Include(x => x.RetirementProfiles.Where(x =>
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true)))
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.Type.Trim().ToUpper() == "OFFICER")
x.Type.Trim().ToUpper() == "EMPLOYEE")
.FirstOrDefault();
var rt_count = retire != null ? retire.RetirementProfiles.Count() : 0;
//ลาออก
var retirementResigns = _context.RetirementResigns
var retirementResigns = _context.RetirementResignEmployees
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
@ -1801,8 +1860,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.rootId.Contains(org.rootId))
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
//ให้ออก
@ -1811,7 +1874,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
x.rootOldId.Contains(org.rootId))
.Count();
@ -1821,9 +1884,13 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
x.CommandTypeId == Guid.Parse("ef8db4d7-1472-4c1d-b73f-9114e618a96f") &&
x.rootId.Contains(org.rootId))
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
//ไล่ออก
@ -1832,9 +1899,13 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
x.CommandTypeId == Guid.Parse("d9dee5c3-b75a-4927-9ce2-51e2233cf20b") &&
x.rootId.Contains(org.rootId))
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
data1.Add(new
@ -1861,17 +1932,22 @@ namespace BMA.EHR.Retirement.Service.Controllers
{
//เกษียณ
var retire = _context.RetirementPeriods
.Include(x => x.RetirementProfiles.Where(x => x.rootId == org.rootId))
.Include(x => x.RetirementProfiles.Where(x =>
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true)))
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.Type.Trim().ToUpper() == "OFFICER")
x.Type.Trim().ToUpper() == "EMPLOYEE")
.FirstOrDefault();
var rt_count = retire != null ? retire.RetirementProfiles.Count() : 0;
//ลาออก
var retirementResigns = _context.RetirementResigns
var retirementResigns = _context.RetirementResignEmployees
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
@ -1890,8 +1966,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
.Where(x =>
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.rootId.Contains(org.rootId))
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
//ให้ออก
@ -1900,7 +1980,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
x.rootOldId.Contains(org.rootId))
.Count();
@ -1910,9 +1990,13 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
x.CommandTypeId == Guid.Parse("ef8db4d7-1472-4c1d-b73f-9114e618a96f") &&
x.rootId.Contains(org.rootId))
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
//ไล่ออก
@ -1921,9 +2005,13 @@ namespace BMA.EHR.Retirement.Service.Controllers
x.CreatedAt.Date >= startDate &&
x.CreatedAt.Date <= endDate &&
x.Status.Trim().ToUpper() == "DONE" &&
x.profileType.Trim().ToUpper() == "OFFICER" &&
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
x.CommandTypeId == Guid.Parse("d9dee5c3-b75a-4927-9ce2-51e2233cf20b") &&
x.rootId.Contains(org.rootId))
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
(node == 3 ? x.child3DnaId.Contains(org.child3DnaId) : true) &&
(node == 4 ? x.child4DnaId.Contains(org.child4DnaId) : true))
.Count();
data2.Add(new

View file

@ -267,18 +267,23 @@ namespace BMA.EHR.Retirement.Service.Controllers
retirementDeceased.citizenId = org.result.citizenId;
retirementDeceased.root = org.result.root;
retirementDeceased.rootId = org.result.rootId;
retirementDeceased.rootDnaId = org.result.rootDnaId;
retirementDeceased.rootShortName = org.result.rootShortName;
retirementDeceased.child1 = org.result.child1;
retirementDeceased.child1Id = org.result.child1Id;
retirementDeceased.child1DnaId = org.result.child1DnaId;
retirementDeceased.child1ShortName = org.result.child1ShortName;
retirementDeceased.child2 = org.result.child2;
retirementDeceased.child2Id = org.result.child2Id;
retirementDeceased.child2DnaId = org.result.child2DnaId;
retirementDeceased.child2ShortName = org.result.child2ShortName;
retirementDeceased.child3 = org.result.child3;
retirementDeceased.child3Id = org.result.child3Id;
retirementDeceased.child3DnaId = org.result.child3DnaId;
retirementDeceased.child3ShortName = org.result.child3ShortName;
retirementDeceased.child4 = org.result.child4;
retirementDeceased.child4Id = org.result.child4Id;
retirementDeceased.child4DnaId = org.result.child4DnaId;
retirementDeceased.child4ShortName = org.result.child4ShortName;
retirementDeceased.posMasterNo = org.result.posMasterNo;
retirementDeceased.position = org.result.position;
@ -329,18 +334,23 @@ namespace BMA.EHR.Retirement.Service.Controllers
retirementDeceased.citizenId = org.result.citizenId;
retirementDeceased.root = org.result.root;
retirementDeceased.rootId = org.result.rootId;
retirementDeceased.rootDnaId = org.result.rootDnaId;
retirementDeceased.rootShortName = org.result.rootShortName;
retirementDeceased.child1 = org.result.child1;
retirementDeceased.child1Id = org.result.child1Id;
retirementDeceased.child1DnaId = org.result.child1DnaId;
retirementDeceased.child1ShortName = org.result.child1ShortName;
retirementDeceased.child2 = org.result.child2;
retirementDeceased.child2Id = org.result.child2Id;
retirementDeceased.child2DnaId = org.result.child2DnaId;
retirementDeceased.child2ShortName = org.result.child2ShortName;
retirementDeceased.child3 = org.result.child3;
retirementDeceased.child3Id = org.result.child3Id;
retirementDeceased.child3DnaId = org.result.child3DnaId;
retirementDeceased.child3ShortName = org.result.child3ShortName;
retirementDeceased.child4 = org.result.child4;
retirementDeceased.child4Id = org.result.child4Id;
retirementDeceased.child4DnaId = org.result.child4DnaId;
retirementDeceased.child4ShortName = org.result.child4ShortName;
retirementDeceased.posMasterNo = org.result.posMasterNo;
retirementDeceased.position = org.result.position;

View file

@ -372,18 +372,23 @@ namespace BMA.EHR.Retirement.Service.Controllers
retirementOther.citizenId = org.result.citizenId;
retirementOther.rootOld = org.result.root;
retirementOther.rootOldId = org.result.rootId;
retirementOther.rootDnaOldId = org.result.rootDnaId;
retirementOther.rootShortNameOld = org.result.rootShortName;
retirementOther.child1Old = org.result.child1;
retirementOther.child1OldId = org.result.child1Id;
retirementOther.child1DnaOldId = org.result.child1DnaId;
retirementOther.child1ShortNameOld = org.result.child1ShortName;
retirementOther.child2Old = org.result.child2;
retirementOther.child2OldId = org.result.child2Id;
retirementOther.child2DnaOldId = org.result.child2DnaId;
retirementOther.child2ShortNameOld = org.result.child2ShortName;
retirementOther.child3Old = org.result.child3;
retirementOther.child3OldId = org.result.child3Id;
retirementOther.child3DnaOldId = org.result.child3DnaId;
retirementOther.child3ShortNameOld = org.result.child3ShortName;
retirementOther.child4Old = org.result.child4;
retirementOther.child4OldId = org.result.child4Id;
retirementOther.child4DnaOldId = org.result.child4DnaId;
retirementOther.child4ShortNameOld = org.result.child4ShortName;
retirementOther.posMasterNoOld = org.result.posMasterNo;
retirementOther.posTypeOldId = org.result.posTypeId;

View file

@ -295,18 +295,23 @@ namespace BMA.EHR.Retirement.Service.Controllers
retirementOut.citizenId = org.result.citizenId;
retirementOut.rootOld = org.result.root;
retirementOut.rootOldId = org.result.rootId;
retirementOut.rootDnaOldId = org.result.rootDnaId;
retirementOut.rootShortNameOld = org.result.rootShortName;
retirementOut.child1Old = org.result.child1;
retirementOut.child1OldId = org.result.child1Id;
retirementOut.child1DnaOldId = org.result.child1DnaId;
retirementOut.child1ShortNameOld = org.result.child1ShortName;
retirementOut.child2Old = org.result.child2;
retirementOut.child2OldId = org.result.child2Id;
retirementOut.child2DnaOldId = org.result.child2DnaId;
retirementOut.child2ShortNameOld = org.result.child2ShortName;
retirementOut.child3Old = org.result.child3;
retirementOut.child3OldId = org.result.child3Id;
retirementOut.child3DnaOldId = org.result.child3DnaId;
retirementOut.child3ShortNameOld = org.result.child3ShortName;
retirementOut.child4Old = org.result.child4;
retirementOut.child4OldId = org.result.child4Id;
retirementOut.child4DnaOldId = org.result.child4DnaId;
retirementOut.child4ShortNameOld = org.result.child4ShortName;
retirementOut.posMasterNoOld = org.result.posMasterNo;
retirementOut.posTypeOldId = org.result.posTypeId;

View file

@ -934,18 +934,23 @@ namespace BMA.EHR.Retirement.Service.Controllers
retirementResign.citizenId = org.result.citizenId;
retirementResign.rootOld = org.result.root;
retirementResign.rootOldId = org.result.rootId;
retirementResign.rootDnaOldId = org.result.rootDnaId;
retirementResign.rootShortNameOld = org.result.rootShortName;
retirementResign.child1Old = org.result.child1;
retirementResign.child1OldId = org.result.child1Id;
retirementResign.child1DnaOldId = org.result.child1DnaId;
retirementResign.child1ShortNameOld = org.result.child1ShortName;
retirementResign.child2Old = org.result.child2;
retirementResign.child2OldId = org.result.child2Id;
retirementResign.child2DnaOldId = org.result.child2DnaId;
retirementResign.child2ShortNameOld = org.result.child2ShortName;
retirementResign.child3Old = org.result.child3;
retirementResign.child3OldId = org.result.child3Id;
retirementResign.child3DnaOldId = org.result.child3DnaId;
retirementResign.child3ShortNameOld = org.result.child3ShortName;
retirementResign.child4Old = org.result.child4;
retirementResign.child4OldId = org.result.child4Id;
retirementResign.child4DnaOldId = org.result.child4DnaId;
retirementResign.child4ShortNameOld = org.result.child4ShortName;
retirementResign.posMasterNoOld = org.result.posMasterNo;
retirementResign.posTypeOldId = org.result.posTypeId;

View file

@ -871,18 +871,23 @@ namespace BMA.EHR.Retirement.Service.Controllers
retirementResignEmployee.citizenId = org.result.citizenId;
retirementResignEmployee.rootOld = org.result.root;
retirementResignEmployee.rootOldId = org.result.rootId;
retirementResignEmployee.rootDnaOldId = org.result.rootDnaId;
retirementResignEmployee.rootShortNameOld = org.result.rootShortName;
retirementResignEmployee.child1Old = org.result.child1;
retirementResignEmployee.child1OldId = org.result.child1Id;
retirementResignEmployee.child1DnaOldId = org.result.child1DnaId;
retirementResignEmployee.child1ShortNameOld = org.result.child1ShortName;
retirementResignEmployee.child2Old = org.result.child2;
retirementResignEmployee.child2OldId = org.result.child2Id;
retirementResignEmployee.child2DnaOldId = org.result.child2DnaId;
retirementResignEmployee.child2ShortNameOld = org.result.child2ShortName;
retirementResignEmployee.child3Old = org.result.child3;
retirementResignEmployee.child3OldId = org.result.child3Id;
retirementResignEmployee.child3DnaOldId = org.result.child3DnaId;
retirementResignEmployee.child3ShortNameOld = org.result.child3ShortName;
retirementResignEmployee.child4Old = org.result.child4;
retirementResignEmployee.child4OldId = org.result.child4Id;
retirementResignEmployee.child4DnaOldId = org.result.child4DnaId;
retirementResignEmployee.child4ShortNameOld = org.result.child4ShortName;
retirementResignEmployee.posMasterNoOld = org.result.posMasterNo;
retirementResignEmployee.posTypeOldId = org.result.posTypeId;

View file

@ -16,9 +16,14 @@ namespace BMA.EHR.Retirement.Service.Requests
{
public string? name { get; set; }
public string? rootId { get; set; }
public string? rootDnaId { get; set; }
public string? child1Id { get; set; }
public string? child1DnaId { get; set; }
public string? child2Id { get; set; }
public string? child2DnaId { get; set; }
public string? child3Id { get; set; }
public string? child3DnaId { get; set; }
public string? child4Id { get; set; }
public string? child4DnaId { get; set; }
}
}

View file

@ -16,18 +16,23 @@ namespace BMA.EHR.Retirement.Service.Requests
public string? citizenId { get; set; }
public string? root { get; set; }
public string? rootId { get; set; }
public string? rootDnaId { get; set; }
public string? rootShortName { get; set; }
public string? child1 { get; set; }
public string? child1Id { get; set; }
public string? child1DnaId { get; set; }
public string? child1ShortName { get; set; }
public string? child2 { get; set; }
public string? child2Id { get; set; }
public string? child2DnaId { get; set; }
public string? child2ShortName { get; set; }
public string? child3 { get; set; }
public string? child3Id { get; set; }
public string? child3DnaId { get; set; }
public string? child3ShortName { get; set; }
public string? child4 { get; set; }
public string? child4Id { get; set; }
public string? child4DnaId { get; set; }
public string? child4ShortName { get; set; }
public string? node { get; set; }
public string? nodeId { get; set; }