ออกคำสั่งใหม่

This commit is contained in:
kittapath 2025-02-21 19:11:20 +07:00
parent 12aceb5e00
commit e092604b97
15 changed files with 592 additions and 407 deletions

View file

@ -539,7 +539,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
detail = data.DisciplineDisciplinary.Title, detail = data.DisciplineDisciplinary.Title,
level = data.DisciplineDisciplinary.DisciplinaryFaultLevel, level = data.DisciplineDisciplinary.DisciplinaryFaultLevel,
refCommandDate = DateTime.Now, refCommandDate = DateTime.Now,
refCommandNo = $"{d.commandNo}/{d.commandYear}", refCommandNo = $"{d.commandNo}/{d.commandYear?.ToThaiYear()}",
unStigma = d.detail, unStigma = d.detail,
}); });
var _result = await _res.Content.ReadAsStringAsync(); var _result = await _res.Content.ReadAsStringAsync();
@ -586,7 +586,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
detail = data.DisciplineDisciplinary.Title, detail = data.DisciplineDisciplinary.Title,
level = data.DisciplineDisciplinary.DisciplinaryFaultLevel, level = data.DisciplineDisciplinary.DisciplinaryFaultLevel,
refCommandDate = DateTime.Now, refCommandDate = DateTime.Now,
refCommandNo = $"{d.commandNo}/{d.commandYear}", refCommandNo = $"{d.commandNo}/{d.commandYear?.ToThaiYear()}",
unStigma = d.detail, unStigma = d.detail,
}); });
var _result = await _res.Content.ReadAsStringAsync(); var _result = await _res.Content.ReadAsStringAsync();
@ -632,7 +632,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
detail = data1.DisciplineInvestigate.Title, detail = data1.DisciplineInvestigate.Title,
level = "", level = "",
refCommandDate = DateTime.Now, refCommandDate = DateTime.Now,
refCommandNo = $"{d.commandNo}/{d.commandYear}", refCommandNo = $"{d.commandNo}/{d.commandYear?.ToThaiYear()}",
unStigma = d.detail, unStigma = d.detail,
}); });
var _result = await _res.Content.ReadAsStringAsync(); var _result = await _res.Content.ReadAsStringAsync();
@ -660,7 +660,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
detail = data2.DisciplineDisciplinary.Title, detail = data2.DisciplineDisciplinary.Title,
level = data2.DisciplineDisciplinary.DisciplinaryFaultLevel, level = data2.DisciplineDisciplinary.DisciplinaryFaultLevel,
refCommandDate = DateTime.Now, refCommandDate = DateTime.Now,
refCommandNo = $"{d.commandNo}/{d.commandYear}", refCommandNo = $"{d.commandNo}/{d.commandYear?.ToThaiYear()}",
unStigma = d.detail, unStigma = d.detail,
}); });
var _result = await _res.Content.ReadAsStringAsync(); var _result = await _res.Content.ReadAsStringAsync();
@ -815,25 +815,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
select new select new
{ {
profileId = p.PersonId, profileId = p.PersonId,
commandId = r.commandId, profileType = p.profileType,
date = r.commandAffectDate,
refCommandNo = $"{r.commandNo}/{r.commandYear}",
salaryRef = r.templateDoc,
isLeave = true, isLeave = true,
leaveReason = "ได้รับโทษทางวินัย ปลดออกจากราชการ", leaveReason = "ได้รับโทษทางวินัย ปลดออกจากราชการ",
dateLeave = r.commandAffectDate, dateLeave = r.commandDateAffect,
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title, detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ปลดออกจากราชการ", unStigma = "คำสั่งลงโทษ ปลดออกจากราชการ",
commandId = r.commandId,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
isGovernment = false, isGovernment = false,
profileType = p.profileType, commandNo = r.commandNo,
refCommandCode = r.refCommandCode, commandYear = r.commandYear,
refCommandName = r.refCommandName, commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -943,25 +944,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
select new select new
{ {
profileId = p.PersonId, profileId = p.PersonId,
commandId = r.commandId, profileType = p.profileType,
date = r.commandAffectDate,
refCommandNo = $"{r.commandNo}/{r.commandYear}",
salaryRef = r.templateDoc,
isLeave = true, isLeave = true,
leaveReason = "ได้รับโทษทางวินัย ออกจากราชการ", leaveReason = "ได้รับโทษทางวินัย ไล่ออกจากราชการ",
dateLeave = r.commandAffectDate, dateLeave = r.commandDateAffect,
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title, detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ไล่ออกจากราชการ", unStigma = "คำสั่งลงโทษ ไล่ออกจากราชการ",
commandId = r.commandId,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
isGovernment = false, isGovernment = false,
profileType = p.profileType, commandNo = r.commandNo,
refCommandCode = r.refCommandCode, commandYear = r.commandYear,
refCommandName = r.refCommandName, commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1149,25 +1151,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
select new select new
{ {
profileId = p.PersonId, profileId = p.PersonId,
commandId = r.commandId, profileType = p.profileType,
date = r.commandAffectDate,
refCommandNo = $"{r.commandNo}/{r.commandYear}",
salaryRef = r.templateDoc,
isLeave = true, isLeave = true,
leaveReason = "ได้รับโทษทางวินัย พักจากราชการ", leaveReason = "ได้รับโทษทางวินัย พักจากราชการ",
dateLeave = r.commandAffectDate, dateLeave = r.commandDateAffect,
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title, detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ พักจากราชการ", unStigma = "คำสั่งลงโทษ พักจากราชการ",
commandId = r.commandId,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
isGovernment = false, isGovernment = false,
profileType = p.profileType, commandNo = r.commandNo,
refCommandCode = r.refCommandCode, commandYear = r.commandYear,
refCommandName = r.refCommandName, commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1266,25 +1269,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
select new select new
{ {
profileId = p.PersonId, profileId = p.PersonId,
commandId = r.commandId, profileType = p.profileType,
date = r.commandAffectDate,
refCommandNo = $"{r.commandNo}/{r.commandYear}",
salaryRef = r.templateDoc,
isLeave = true, isLeave = true,
leaveReason = "ได้รับโทษทางวินัย ให้ออกจากราชการไว้ก่อน", leaveReason = "ได้รับโทษทางวินัย ให้ออกจากราชการไว้ก่อน",
dateLeave = r.commandAffectDate, dateLeave = r.commandDateAffect,
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title, detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ให้ออกจากราชการไว้ก่อน", unStigma = "คำสั่งลงโทษ ให้ออกจากราชการไว้ก่อน",
commandId = r.commandId,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
isGovernment = false, isGovernment = false,
profileType = p.profileType, commandNo = r.commandNo,
refCommandCode = r.refCommandCode, commandYear = r.commandYear,
refCommandName = r.refCommandName, commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1382,24 +1386,25 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
select new select new
{ {
profileId = p.PersonId, profileId = p.PersonId,
commandId = r.commandId, profileType = p.profileType,
date = r.commandAffectDate,
refCommandNo = $"{r.commandNo}/{r.commandYear}",
salaryRef = r.templateDoc,
isLeave = _null, isLeave = _null,
leaveReason = _null, leaveReason = _null,
dateLeave = _null, dateLeave = _null,
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title, detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ลงโทษ ภาคทัณฑ์", unStigma = "คำสั่งลงโทษ ลงโทษ ภาคทัณฑ์",
commandId = r.commandId,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
profileType = p.profileType, commandNo = r.commandNo,
refCommandCode = r.refCommandCode, commandYear = r.commandYear,
refCommandName = r.refCommandName, commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1497,24 +1502,25 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
select new select new
{ {
profileId = p.PersonId, profileId = p.PersonId,
commandId = r.commandId, profileType = p.profileType,
date = r.commandAffectDate,
refCommandNo = $"{r.commandNo}/{r.commandYear}",
salaryRef = r.templateDoc,
isLeave = _null, isLeave = _null,
leaveReason = _null, leaveReason = _null,
dateLeave = _null, dateLeave = _null,
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title, detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ตัดเงินเดือน", unStigma = "คำสั่งลงโทษ ตัดเงินเดือน",
commandId = r.commandId,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
profileType = p.profileType, commandNo = r.commandNo,
refCommandCode = r.refCommandCode, commandYear = r.commandYear,
refCommandName = r.refCommandName, commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1612,24 +1618,25 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
select new select new
{ {
profileId = p.PersonId, profileId = p.PersonId,
commandId = r.commandId, profileType = p.profileType,
date = r.commandAffectDate,
refCommandNo = $"{r.commandNo}/{r.commandYear}",
salaryRef = r.templateDoc,
isLeave = _null, isLeave = _null,
leaveReason = _null, leaveReason = _null,
dateLeave = _null, dateLeave = _null,
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title, detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ลดขั้นเงินเดือน", unStigma = "คำสั่งลงโทษ ลดขั้นเงินเดือน",
commandId = r.commandId,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
profileType = p.profileType, commandNo = r.commandNo,
refCommandCode = r.refCommandCode, commandYear = r.commandYear,
refCommandName = r.refCommandName, commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1727,24 +1734,25 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
select new select new
{ {
profileId = p.PersonId, profileId = p.PersonId,
commandId = r.commandId, profileType = p.profileType,
date = r.commandAffectDate,
refCommandNo = $"{r.commandNo}/{r.commandYear}",
salaryRef = r.templateDoc,
isLeave = _null, isLeave = _null,
leaveReason = _null, leaveReason = _null,
dateLeave = _null, dateLeave = _null,
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title, detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งเพิ่มโทษ", unStigma = "คำสั่งเพิ่มโทษ",
commandId = r.commandId,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
profileType = p.profileType, commandNo = r.commandNo,
refCommandCode = r.refCommandCode, commandYear = r.commandYear,
refCommandName = r.refCommandName, commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1842,24 +1850,25 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
select new select new
{ {
profileId = p.PersonId, profileId = p.PersonId,
commandId = r.commandId, profileType = p.profileType,
date = r.commandAffectDate,
refCommandNo = $"{r.commandNo}/{r.commandYear}",
salaryRef = r.templateDoc,
isLeave = _null, isLeave = _null,
leaveReason = _null, leaveReason = _null,
dateLeave = _null, dateLeave = _null,
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title, detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งงดโทษ", unStigma = "คำสั่งงดโทษ",
commandId = r.commandId,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
profileType = p.profileType, commandNo = r.commandNo,
refCommandCode = r.refCommandCode, commandYear = r.commandYear,
refCommandName = r.refCommandName, commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1973,24 +1982,25 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
select new select new
{ {
profileId = p.PersonId, profileId = p.PersonId,
commandId = r.commandId, profileType = p.profileType,
date = r.commandAffectDate,
refCommandNo = $"{r.commandNo}/{r.commandYear}",
salaryRef = r.templateDoc,
isLeave = false, isLeave = false,
leaveReason = _null, leaveReason = _null,
dateLeave = _null, dateLeave = _null,
refCommandDate = DateTime.Now,
detail = p.DisciplineInvestigate.Title, detail = p.DisciplineInvestigate.Title,
level = "", level = "",
unStigma = "คำสั่งยุติเรื่อง", unStigma = "คำสั่งยุติเรื่อง",
commandId = r.commandId,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
profileType = p.profileType, commandNo = r.commandNo,
refCommandCode = r.refCommandCode, commandYear = r.commandYear,
refCommandName = r.refCommandName, commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline";
@ -2021,16 +2031,25 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
select new select new
{ {
profileId = p.PersonId, profileId = p.PersonId,
date = r.commandAffectDate, profileType = p.profileType,
refCommandNo = $"{r.commandNo}/{r.commandYear}",
salaryRef = r.templateDoc,
isLeave = false, isLeave = false,
leaveReason = _null, leaveReason = _null,
dateLeave = _null, dateLeave = _null,
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title, detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งยุติเรื่อง" unStigma = "คำสั่งยุติเรื่อง",
commandId = r.commandId,
amount = r.amount,
amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount,
commandNo = r.commandNo,
commandYear = r.commandYear,
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
using (var client = new HttpClient()) using (var client = new HttpClient())
{ {

View file

@ -16,7 +16,7 @@ namespace BMA.EHR.Discipline.Service.Requests
public DateTime? commandAffectDate { get; set; } public DateTime? commandAffectDate { get; set; }
public string? commandNo { get; set; } public string? commandNo { get; set; }
public string? commandYear { get; set; } public int? commandYear { get; set; }
public string? detail { get; set; } public string? detail { get; set; }
} }
} }

View file

@ -10,16 +10,17 @@ namespace BMA.EHR.Discipline.Service.Requests
public class ReportExecuteRequestObj public class ReportExecuteRequestObj
{ {
public string? refId { get; set; } public string? refId { get; set; }
public DateTime commandAffectDate { get; set; }
public string? commandNo { get; set; } public string? commandNo { get; set; }
public string? commandId { get; set; }
public int commandYear { get; set; } public int commandYear { get; set; }
public string? templateDoc { get; set; } public string? commandId { get; set; }
public string? remark { get; set; }
public double? amount { get; set; } public double? amount { get; set; }
public double? amountSpecial { get; set; } public double? amountSpecial { get; set; }
public double? positionSalaryAmount { get; set; } public double? positionSalaryAmount { get; set; }
public double? mouthSalaryAmount { get; set; } public double? mouthSalaryAmount { get; set; }
public string? refCommandCode { get; set; } public string? commandCode { get; set; }
public string? refCommandName { get; set; } public string? commandName { get; set; }
public DateTime commandDateAffect { get; set; }
public DateTime commandDateSign { get; set; }
} }
} }

View file

@ -908,30 +908,35 @@ namespace BMA.EHR.Placement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}" :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}" :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}" :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}" :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}" : "",
position = p.position,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.posTypeName, positionType = p.posTypeName,
positionLevel = p.posLevelName, positionLevel = p.posLevelName,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
posmasterId = p.posmasterId, posmasterId = p.posmasterId,
positionId = p.positionId, positionId = p.positionId,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, orgRoot = p.root,
orgChild1 = p.child1,
orgChild2 = p.child2,
orgChild3 = p.child3,
orgChild4 = p.child4,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNo,
posNoAbb = p.node == 4 ? $"{p.child4ShortName}" :
p.node == 3 ? $"{p.child3ShortName}" :
p.node == 2 ? $"{p.child2ShortName}" :
p.node == 1 ? $"{p.child1ShortName}" :
p.node == 0 ? $"{p.rootShortName}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.position,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1127,30 +1132,35 @@ namespace BMA.EHR.Placement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}" :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}" :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}" :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}" :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}" : "",
position = p.position,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.posTypeName, positionType = p.posTypeName,
positionLevel = p.posLevelName, positionLevel = p.posLevelName,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
posmasterId = p.posmasterId, posmasterId = p.posmasterId,
positionId = p.positionId, positionId = p.positionId,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, orgRoot = p.root,
orgChild1 = p.child1,
orgChild2 = p.child2,
orgChild3 = p.child3,
orgChild4 = p.child4,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNo,
posNoAbb = p.node == 4 ? $"{p.child4ShortName}" :
p.node == 3 ? $"{p.child3ShortName}" :
p.node == 2 ? $"{p.child2ShortName}" :
p.node == 1 ? $"{p.child1ShortName}" :
p.node == 0 ? $"{p.rootShortName}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.position,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1337,27 +1347,34 @@ namespace BMA.EHR.Placement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}" :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}" :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}" :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}" :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}" : "",
position = p.position,
positionType = p.posTypeName, positionType = p.posTypeName,
positionLevel = p.posLevelName, positionLevel = p.posLevelName,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
posmasterId = p.posmasterId, posmasterId = p.posmasterId,
positionId = p.positionId, positionId = p.positionId,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, orgRoot = p.root,
orgChild1 = p.child1,
orgChild2 = p.child2,
orgChild3 = p.child3,
orgChild4 = p.child4,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNo,
posNoAbb = p.node == 4 ? $"{p.child4ShortName}" :
p.node == 3 ? $"{p.child3ShortName}" :
p.node == 2 ? $"{p.child2ShortName}" :
p.node == 1 ? $"{p.child1ShortName}" :
p.node == 0 ? $"{p.rootShortName}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.position,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1549,27 +1566,34 @@ namespace BMA.EHR.Placement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}" :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}" :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}" :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}" :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}" : "",
position = p.position,
positionType = p.posTypeName, positionType = p.posTypeName,
positionLevel = p.posLevelName, positionLevel = p.posLevelName,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
posmasterId = p.posmasterId, posmasterId = p.posmasterId,
positionId = p.positionId, positionId = p.positionId,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, orgRoot = p.root,
orgChild1 = p.child1,
orgChild2 = p.child2,
orgChild3 = p.child3,
orgChild4 = p.child4,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNo,
posNoAbb = p.node == 4 ? $"{p.child4ShortName}" :
p.node == 3 ? $"{p.child3ShortName}" :
p.node == 2 ? $"{p.child2ShortName}" :
p.node == 1 ? $"{p.child1ShortName}" :
p.node == 0 ? $"{p.rootShortName}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.position,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1777,30 +1801,35 @@ namespace BMA.EHR.Placement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}" :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}" :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}" :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}" :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}" : "",
position = p.position,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.posTypeName, positionType = p.posTypeName,
positionLevel = p.posLevelName, positionLevel = p.posLevelName,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
posmasterId = p.posmasterId, posmasterId = p.posmasterId,
positionId = p.positionId, positionId = p.positionId,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, orgRoot = p.root,
orgChild1 = p.child1,
orgChild2 = p.child2,
orgChild3 = p.child3,
orgChild4 = p.child4,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNo,
posNoAbb = p.node == 4 ? $"{p.child4ShortName}" :
p.node == 3 ? $"{p.child3ShortName}" :
p.node == 2 ? $"{p.child2ShortName}" :
p.node == 1 ? $"{p.child1ShortName}" :
p.node == 0 ? $"{p.rootShortName}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.position,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];

View file

@ -1749,8 +1749,8 @@ namespace BMA.EHR.Placement.Service.Controllers
isProbation = true, isProbation = true,
isLeave = false, isLeave = false,
dateRetire = (DateTime?)null, dateRetire = (DateTime?)null,
dateAppoint = r.commandAffectDate, dateAppoint = r.commandDateAffect,
dateStart = r.commandAffectDate, dateStart = r.commandDateAffect,
govAgeAbsent = 0, govAgeAbsent = 0,
govAgePlus = 0, govAgePlus = 0,
birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth, birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth,
@ -1809,30 +1809,34 @@ namespace BMA.EHR.Placement.Service.Controllers
}).ToList(), }).ToList(),
bodySalarys = new bodySalarys = new
{ {
profileId = string.Empty, profileId = p.profileId,
date = r.commandAffectDate,
commandId = r.commandId,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.posMasterNo == null ? "" : positionExecutive = "",
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}" : positionType = p.posTypeName,
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}" : positionLevel = p.posLevelName,
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}" : commandId = r.commandId,
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}" : orgRoot = p.root,
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}" : "", orgChild1 = p.child1,
position = p.positionName == null ? string.Empty : p.positionName, orgChild2 = p.child2,
positionLine = string.Empty, orgChild3 = p.child3,
positionPathSide = string.Empty, orgChild4 = p.child4,
positionExecutive = string.Empty, commandNo = r.commandNo,
positionType = p.posTypeName == null ? string.Empty : p.posTypeName, commandYear = r.commandYear,
positionLevel = p.posLevelName == null ? string.Empty : p.posLevelName, posNo = p.posMasterNo,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}", posNoAbb = p.node == 4 ? $"{p.child4ShortName}" :
templateDoc = r.templateDoc, p.node == 3 ? $"{p.child3ShortName}" :
isGovernment = true, p.node == 2 ? $"{p.child2ShortName}" :
refCommandCode = r.refCommandCode, p.node == 1 ? $"{p.child1ShortName}" :
refCommandName = r.refCommandName, p.node == 0 ? $"{p.rootShortName}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.positionName,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}, },
bodyPosition = new bodyPosition = new
{ {
@ -1860,11 +1864,11 @@ namespace BMA.EHR.Placement.Service.Controllers
if (req.refIds.Length > 0) if (req.refIds.Length > 0)
{ {
profile.commandId = req.refIds[0].commandId; profile.commandId = req.refIds[0].commandId;
profile.refCommandCode = req.refIds[0].refCommandCode; profile.refCommandCode = req.refIds[0].commandCode;
profile.refCommandDate = req.refIds[0].commandAffectDate; profile.refCommandDate = req.refIds[0].commandDateAffect;
profile.refCommandName = req.refIds[0].refCommandName; profile.refCommandName = req.refIds[0].commandName;
profile.refCommandNo = $"{req.refIds[0].commandNo}/{req.refIds[0].commandYear.ToThaiYear()}"; profile.refCommandNo = $"{req.refIds[0].commandNo}/{req.refIds[0].commandYear.ToThaiYear()}";
profile.templateDoc = req.refIds[0].templateDoc; profile.templateDoc = req.refIds[0].remark;
} }
}); });
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
@ -2072,8 +2076,8 @@ namespace BMA.EHR.Placement.Service.Controllers
isProbation = true, isProbation = true,
isLeave = false, isLeave = false,
dateRetire = (DateTime?)null, dateRetire = (DateTime?)null,
dateAppoint = r.commandAffectDate, dateAppoint = r.commandDateAffect,
dateStart = r.commandAffectDate, dateStart = r.commandDateAffect,
govAgeAbsent = 0, govAgeAbsent = 0,
govAgePlus = 0, govAgePlus = 0,
birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth, birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth,
@ -2132,30 +2136,34 @@ namespace BMA.EHR.Placement.Service.Controllers
}).ToList(), }).ToList(),
bodySalarys = new bodySalarys = new
{ {
profileId = string.Empty, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.posMasterNo == null ? "" : positionExecutive = "",
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}" : positionType = p.posTypeName,
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}" : positionLevel = p.posLevelName,
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}" : commandId = r.commandId,
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}" : orgRoot = p.root,
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}" : "", orgChild1 = p.child1,
position = p.positionName == null ? string.Empty : p.positionName, orgChild2 = p.child2,
positionLine = string.Empty, orgChild3 = p.child3,
positionPathSide = string.Empty, orgChild4 = p.child4,
positionExecutive = string.Empty, commandNo = r.commandNo,
positionType = p.posTypeName == null ? string.Empty : p.posTypeName, commandYear = r.commandYear,
positionLevel = p.posLevelName == null ? string.Empty : p.posLevelName, posNo = p.posMasterNo,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}", posNoAbb = p.node == 4 ? $"{p.child4ShortName}" :
templateDoc = r.templateDoc, p.node == 3 ? $"{p.child3ShortName}" :
isGovernment = true, p.node == 2 ? $"{p.child2ShortName}" :
refCommandCode = r.refCommandCode, p.node == 1 ? $"{p.child1ShortName}" :
refCommandName = r.refCommandName, p.node == 0 ? $"{p.rootShortName}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.positionName,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}, },
bodyPosition = new bodyPosition = new
{ {
@ -2183,11 +2191,11 @@ namespace BMA.EHR.Placement.Service.Controllers
if (req.refIds.Length > 0) if (req.refIds.Length > 0)
{ {
profile.commandId = req.refIds[0].commandId; profile.commandId = req.refIds[0].commandId;
profile.refCommandCode = req.refIds[0].refCommandCode; profile.refCommandCode = req.refIds[0].commandCode;
profile.refCommandDate = req.refIds[0].commandAffectDate; profile.refCommandDate = req.refIds[0].commandDateAffect;
profile.refCommandName = req.refIds[0].refCommandName; profile.refCommandName = req.refIds[0].commandName;
profile.refCommandNo = $"{req.refIds[0].commandNo}/{req.refIds[0].commandYear.ToThaiYear()}"; profile.refCommandNo = $"{req.refIds[0].commandNo}/{req.refIds[0].commandYear.ToThaiYear()}";
profile.templateDoc = req.refIds[0].templateDoc; profile.templateDoc = req.refIds[0].remark;
} }
}); });
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
@ -2396,30 +2404,35 @@ namespace BMA.EHR.Placement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}" :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}" :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}" :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}" :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}" : "",
position = p.positionName,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.posTypeName, positionType = p.posTypeName,
positionLevel = p.posLevelName, positionLevel = p.posLevelName,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
posmasterId = p.posmasterId, posmasterId = p.posmasterId,
positionId = p.positionId, positionId = p.positionId,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, orgRoot = p.root,
orgChild1 = p.child1,
orgChild2 = p.child2,
orgChild3 = p.child3,
orgChild4 = p.child4,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNo,
posNoAbb = p.node == 4 ? $"{p.child4ShortName}" :
p.node == 3 ? $"{p.child3ShortName}" :
p.node == 2 ? $"{p.child2ShortName}" :
p.node == 1 ? $"{p.child1ShortName}" :
p.node == 0 ? $"{p.rootShortName}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.positionName,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -2631,30 +2644,35 @@ namespace BMA.EHR.Placement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}" :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}" :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}" :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}" :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}" : "",
position = p.positionName,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.posTypeName, positionType = p.posTypeName,
positionLevel = p.posLevelName, positionLevel = p.posLevelName,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
posmasterId = p.posmasterId, posmasterId = p.posmasterId,
positionId = p.positionId, positionId = p.positionId,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, orgRoot = p.root,
orgChild1 = p.child1,
orgChild2 = p.child2,
orgChild3 = p.child3,
orgChild4 = p.child4,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNo,
posNoAbb = p.node == 4 ? $"{p.child4ShortName}" :
p.node == 3 ? $"{p.child3ShortName}" :
p.node == 2 ? $"{p.child2ShortName}" :
p.node == 1 ? $"{p.child1ShortName}" :
p.node == 0 ? $"{p.rootShortName}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.positionName,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -2851,30 +2869,35 @@ namespace BMA.EHR.Placement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}" :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}" :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}" :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}" :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}" : "",
position = p.positionName,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.posTypeName, positionType = p.posTypeName,
positionLevel = p.posLevelName, positionLevel = p.posLevelName,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
posmasterId = p.posmasterId, posmasterId = p.posmasterId,
positionId = p.positionId, positionId = p.positionId,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, orgRoot = p.root,
orgChild1 = p.child1,
orgChild2 = p.child2,
orgChild3 = p.child3,
orgChild4 = p.child4,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNo,
posNoAbb = p.node == 4 ? $"{p.child4ShortName}" :
p.node == 3 ? $"{p.child3ShortName}" :
p.node == 2 ? $"{p.child2ShortName}" :
p.node == 1 ? $"{p.child1ShortName}" :
p.node == 0 ? $"{p.rootShortName}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.positionName,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];

View file

@ -678,26 +678,36 @@ namespace BMA.EHR.Placement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
commandId = r.commandId,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.PositionNumberOld,
position = p.PositionOld,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.PositionTypeOld, positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld, positionLevel = p.PositionLevelOld,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}", commandId = r.commandId,
templateDoc = r.templateDoc, orgRoot = p.rootOld,
refCommandCode = r.refCommandCode, orgChild1 = p.child1Old,
refCommandName = r.refCommandName, orgChild2 = p.child2Old,
orgChild3 = p.child3Old,
orgChild4 = p.child4Old,
officerOrg = p.Organization, officerOrg = p.Organization,
dateStart = p.DateStart, dateStart = p.DateStart,
dateEnd = p.DateEnd, dateEnd = p.DateEnd,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNoOld,
posNoAbb = p.child4ShortNameOld != null ? $"{p.child4ShortNameOld}" :
p.child3ShortNameOld != null ? $"{p.child3ShortNameOld}" :
p.child2ShortNameOld != null ? $"{p.child2ShortNameOld}" :
p.child1ShortNameOld != null ? $"{p.child1ShortNameOld}" :
p.rootShortNameOld != null ? $"{p.rootShortNameOld}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.PositionOld,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -717,7 +727,7 @@ namespace BMA.EHR.Placement.Service.Controllers
foreach (var profile in data) foreach (var profile in data)
{ {
profile.Status = "DONE"; profile.Status = "DONE";
profile.commandNo = resultData.Count > 0 ? resultData[0].refCommandNo : null; profile.commandNo = resultData.Count > 0 ? $"{resultData[0].commandNo}/{resultData[0].commandYear.ToThaiYear()}" : null;
} }
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
} }

View file

@ -1048,8 +1048,8 @@ namespace BMA.EHR.Placement.Service.Controllers
isProbation = false, isProbation = false,
isLeave = false, isLeave = false,
dateRetire = (DateTime?)null, dateRetire = (DateTime?)null,
dateAppoint = r.commandAffectDate, dateAppoint = r.commandDateAffect,
dateStart = r.commandAffectDate, dateStart = r.commandDateAffect,
govAgeAbsent = 0, govAgeAbsent = 0,
govAgePlus = 0, govAgePlus = 0,
birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth, birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth,
@ -1076,29 +1076,34 @@ namespace BMA.EHR.Placement.Service.Controllers
}, },
bodySalarys = new bodySalarys = new
{ {
profileId = string.Empty, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.posMasterNo == null ? "" : positionExecutive = "",
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}" : positionType = p.posTypeName,
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}" : positionLevel = p.posLevelName,
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}" : commandId = r.commandId,
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}" : orgRoot = p.root,
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}" : "", orgChild1 = p.child1,
position = p.position == null ? string.Empty : p.position, orgChild2 = p.child2,
positionLine = string.Empty, orgChild3 = p.child3,
positionPathSide = string.Empty, orgChild4 = p.child4,
positionExecutive = string.Empty, commandNo = r.commandNo,
positionType = p.posTypeName == null ? string.Empty : p.posTypeName, commandYear = r.commandYear,
positionLevel = p.posLevelName == null ? string.Empty : p.posLevelName, posNo = p.posMasterNo,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}", posNoAbb = p.node == 4 ? $"{p.child4ShortName}" :
templateDoc = r.templateDoc, p.node == 3 ? $"{p.child3ShortName}" :
refCommandCode = r.refCommandCode, p.node == 2 ? $"{p.child2ShortName}" :
refCommandName = r.refCommandName, p.node == 1 ? $"{p.child1ShortName}" :
p.node == 0 ? $"{p.rootShortName}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.position,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}, },
bodyPosition = new bodyPosition = new
{ {

View file

@ -498,29 +498,43 @@ namespace BMA.EHR.Placement.Service.Controllers
var data = await _context.PlacementRepatriations var data = await _context.PlacementRepatriations
.Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString()))
.ToListAsync(); .ToListAsync();
string? _null = null;
var resultData = (from p in data var resultData = (from p in data
join r in req.refIds join r in req.refIds
on p.Id.ToString() equals r.refId on p.Id.ToString() equals r.refId
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
commandId = r.commandId,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.PositionNumberOld,
position = p.PositionOld,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.PositionTypeOld, positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld, positionLevel = p.PositionLevelOld,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}", commandId = r.commandId,
templateDoc = r.templateDoc, orgRoot = p.rootOld,
refCommandCode = r.refCommandCode, orgChild1 = p.child1Old,
refCommandName = r.refCommandName, orgChild2 = p.child2Old,
orgChild3 = p.child3Old,
orgChild4 = p.child4Old,
officerOrg = p.Organization,
dateStart = p.Date,
dateEnd = p.DateRepatriation,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNoOld,
posNoAbb = p.child4ShortNameOld != null ? $"{p.child4ShortNameOld}" :
p.child3ShortNameOld != null ? $"{p.child3ShortNameOld}" :
p.child2ShortNameOld != null ? $"{p.child2ShortNameOld}" :
p.child1ShortNameOld != null ? $"{p.child1ShortNameOld}" :
p.rootShortNameOld != null ? $"{p.rootShortNameOld}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.PositionOld,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];

View file

@ -876,26 +876,37 @@ namespace BMA.EHR.Placement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.PositionNumberOld,
position = p.PositionOld,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.PositionTypeOld, positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld, positionLevel = p.PositionLevelOld,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}", commandId = r.commandId,
templateDoc = r.templateDoc,
leaveReason = "โอนออก", leaveReason = "โอนออก",
dateLeave = r.commandAffectDate, dateLeave = r.commandDateAffect,
isLeave = true, isLeave = true,
refCommandCode = r.refCommandCode, orgRoot = p.rootOld,
refCommandName = r.refCommandName, orgChild1 = p.child1Old,
orgChild2 = p.child2Old,
orgChild3 = p.child3Old,
orgChild4 = p.child4Old,
officerOrg = p.Organization,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNoOld,
posNoAbb = p.child4ShortNameOld != null ? $"{p.child4ShortNameOld}" :
p.child3ShortNameOld != null ? $"{p.child3ShortNameOld}" :
p.child2ShortNameOld != null ? $"{p.child2ShortNameOld}" :
p.child1ShortNameOld != null ? $"{p.child1ShortNameOld}" :
p.rootShortNameOld != null ? $"{p.rootShortNameOld}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.PositionOld,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];

View file

@ -10,16 +10,17 @@ namespace BMA.EHR.Placement.Service.Requests
public class ReportExecuteRequestObj public class ReportExecuteRequestObj
{ {
public string? refId { get; set; } public string? refId { get; set; }
public DateTime commandAffectDate { get; set; }
public string? commandNo { get; set; } public string? commandNo { get; set; }
public string? commandId { get; set; }
public int commandYear { get; set; } public int commandYear { get; set; }
public string? templateDoc { get; set; } public string? commandId { get; set; }
public string? remark { get; set; }
public double? amount { get; set; } public double? amount { get; set; }
public double? amountSpecial { get; set; } public double? amountSpecial { get; set; }
public double? positionSalaryAmount { get; set; } public double? positionSalaryAmount { get; set; }
public double? mouthSalaryAmount { get; set; } public double? mouthSalaryAmount { get; set; }
public string? refCommandCode { get; set; } public string? commandCode { get; set; }
public string? refCommandName { get; set; } public string? commandName { get; set; }
public DateTime commandDateAffect { get; set; }
public DateTime commandDateSign { get; set; }
} }
} }

View file

@ -701,27 +701,37 @@ namespace BMA.EHR.Retirement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.PositionNumberOld,
position = p.PositionOld,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.PositionTypeOld, positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld, positionLevel = p.PositionLevelOld,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
isLeave = false, isLeave = false,
leaveReason = _null, leaveReason = _null,
dateLeave = _null, dateLeave = _null,
commandId = r.commandId,
isGovernment = true, isGovernment = true,
refCommandCode = r.refCommandCode, orgRoot = p.rootOld,
refCommandName = r.refCommandName, orgChild1 = p.child1Old,
orgChild2 = p.child2Old,
orgChild3 = p.child3Old,
orgChild4 = p.child4Old,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNoOld,
posNoAbb = p.child4ShortNameOld != null ? $"{p.child4ShortNameOld}" :
p.child3ShortNameOld != null ? $"{p.child3ShortNameOld}" :
p.child2ShortNameOld != null ? $"{p.child2ShortNameOld}" :
p.child1ShortNameOld != null ? $"{p.child1ShortNameOld}" :
p.rootShortNameOld != null ? $"{p.rootShortNameOld}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.PositionOld,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -911,27 +921,37 @@ namespace BMA.EHR.Retirement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
commandId = r.commandId,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.PositionNumberOld,
position = p.PositionOld,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.PositionTypeOld, positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld, positionLevel = p.PositionLevelOld,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
isLeave = false, isLeave = false,
leaveReason = _null, leaveReason = _null,
dateLeave = _null, dateLeave = _null,
commandId = r.commandId,
isGovernment = true, isGovernment = true,
refCommandCode = r.refCommandCode, orgRoot = p.rootOld,
refCommandName = r.refCommandName, orgChild1 = p.child1Old,
orgChild2 = p.child2Old,
orgChild3 = p.child3Old,
orgChild4 = p.child4Old,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNoOld,
posNoAbb = p.child4ShortNameOld != null ? $"{p.child4ShortNameOld}" :
p.child3ShortNameOld != null ? $"{p.child3ShortNameOld}" :
p.child2ShortNameOld != null ? $"{p.child2ShortNameOld}" :
p.child1ShortNameOld != null ? $"{p.child1ShortNameOld}" :
p.rootShortNameOld != null ? $"{p.rootShortNameOld}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.PositionOld,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];

View file

@ -554,27 +554,37 @@ namespace BMA.EHR.Retirement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
commandId = r.commandId,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.PositionNumberOld,
position = p.PositionOld,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.PositionTypeOld, positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld, positionLevel = p.PositionLevelOld,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
isLeave = true, isLeave = true,
leaveReason = "ให้ออกจากราชการ", leaveReason = "ให้ออกจากราชการ",
dateLeave = r.commandAffectDate, dateLeave = r.commandDateAffect,
commandId = r.commandId,
isGovernment = false, isGovernment = false,
refCommandCode = r.refCommandCode, orgRoot = p.rootOld,
refCommandName = r.refCommandName, orgChild1 = p.child1Old,
orgChild2 = p.child2Old,
orgChild3 = p.child3Old,
orgChild4 = p.child4Old,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNoOld,
posNoAbb = p.child4ShortNameOld != null ? $"{p.child4ShortNameOld}" :
p.child3ShortNameOld != null ? $"{p.child3ShortNameOld}" :
p.child2ShortNameOld != null ? $"{p.child2ShortNameOld}" :
p.child1ShortNameOld != null ? $"{p.child1ShortNameOld}" :
p.rootShortNameOld != null ? $"{p.rootShortNameOld}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.PositionOld,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];

View file

@ -2232,27 +2232,37 @@ namespace BMA.EHR.Retirement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
commandId = r.commandId,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.PositionNumberOld,
position = p.PositionOld,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.PositionTypeOld, positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld, positionLevel = p.PositionLevelOld,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
isLeave = true, isLeave = true,
isGovernment = false,
leaveReason = "ออกจากราชการ", leaveReason = "ออกจากราชการ",
dateLeave = r.commandAffectDate, dateLeave = r.commandDateAffect,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, isGovernment = false,
orgRoot = p.rootOld,
orgChild1 = p.child1Old,
orgChild2 = p.child2Old,
orgChild3 = p.child3Old,
orgChild4 = p.child4Old,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNoOld,
posNoAbb = p.child4ShortNameOld != null ? $"{p.child4ShortNameOld}" :
p.child3ShortNameOld != null ? $"{p.child3ShortNameOld}" :
p.child2ShortNameOld != null ? $"{p.child2ShortNameOld}" :
p.child1ShortNameOld != null ? $"{p.child1ShortNameOld}" :
p.rootShortNameOld != null ? $"{p.rootShortNameOld}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.PositionOld,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -2421,26 +2431,37 @@ namespace BMA.EHR.Retirement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
commandId = r.commandId,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.PositionNumberOld,
position = p.PositionOld,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.PositionTypeOld, positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld, positionLevel = p.PositionLevelOld,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
isLeave = false, isLeave = false,
leaveReason = _null, leaveReason = _null,
dateLeave = _null, dateLeave = _null,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, isGovernment = false,
orgRoot = p.rootOld,
orgChild1 = p.child1Old,
orgChild2 = p.child2Old,
orgChild3 = p.child3Old,
orgChild4 = p.child4Old,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNoOld,
posNoAbb = p.child4ShortNameOld != null ? $"{p.child4ShortNameOld}" :
p.child3ShortNameOld != null ? $"{p.child3ShortNameOld}" :
p.child2ShortNameOld != null ? $"{p.child2ShortNameOld}" :
p.child1ShortNameOld != null ? $"{p.child1ShortNameOld}" :
p.rootShortNameOld != null ? $"{p.rootShortNameOld}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.PositionOld,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];

View file

@ -1676,27 +1676,36 @@ namespace BMA.EHR.Retirement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
commandId = r.commandId,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.PositionNumberOld,
position = p.PositionOld,
// positionLine = "",
// positionPathSide = "",
// positionExecutive = "",
positionType = p.PositionTypeOld, positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld, positionLevel = p.PositionLevelOld,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
isLeave = true, isLeave = true,
isGovernment = false,
leaveReason = "ออกจากราชการ", leaveReason = "ออกจากราชการ",
dateLeave = r.commandAffectDate, dateLeave = r.commandDateAffect,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, isGovernment = false,
orgRoot = p.rootOld,
orgChild1 = p.child1Old,
orgChild2 = p.child2Old,
orgChild3 = p.child3Old,
orgChild4 = p.child4Old,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNoOld,
posNoAbb = p.child4ShortNameOld != null ? $"{p.child4ShortNameOld}" :
p.child3ShortNameOld != null ? $"{p.child3ShortNameOld}" :
p.child2ShortNameOld != null ? $"{p.child2ShortNameOld}" :
p.child1ShortNameOld != null ? $"{p.child1ShortNameOld}" :
p.rootShortNameOld != null ? $"{p.rootShortNameOld}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.PositionOld,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];
@ -1865,26 +1874,37 @@ namespace BMA.EHR.Retirement.Service.Controllers
select new select new
{ {
profileId = p.profileId, profileId = p.profileId,
date = r.commandAffectDate,
amount = r.amount, amount = r.amount,
commandId = r.commandId,
amountSpecial = r.amountSpecial, amountSpecial = r.amountSpecial,
positionSalaryAmount = r.positionSalaryAmount, positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount, mouthSalaryAmount = r.mouthSalaryAmount,
posNo = p.PositionNumberOld,
position = p.PositionOld,
positionLine = "",
positionPathSide = "",
positionExecutive = "", positionExecutive = "",
positionType = p.PositionTypeOld, positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld, positionLevel = p.PositionLevelOld,
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
templateDoc = r.templateDoc,
isLeave = false, isLeave = false,
leaveReason = _null, leaveReason = _null,
dateLeave = _null, dateLeave = _null,
refCommandCode = r.refCommandCode, commandId = r.commandId,
refCommandName = r.refCommandName, isGovernment = false,
orgRoot = p.rootOld,
orgChild1 = p.child1Old,
orgChild2 = p.child2Old,
orgChild3 = p.child3Old,
orgChild4 = p.child4Old,
commandNo = r.commandNo,
commandYear = r.commandYear,
posNo = p.posMasterNoOld,
posNoAbb = p.child4ShortNameOld != null ? $"{p.child4ShortNameOld}" :
p.child3ShortNameOld != null ? $"{p.child3ShortNameOld}" :
p.child2ShortNameOld != null ? $"{p.child2ShortNameOld}" :
p.child1ShortNameOld != null ? $"{p.child1ShortNameOld}" :
p.rootShortNameOld != null ? $"{p.rootShortNameOld}" : "",
commandDateAffect = r.commandDateAffect,
commandDateSign = r.commandDateSign,
positionName = p.PositionOld,
commandCode = r.commandCode,
commandName = r.commandName,
remark = r.remark,
}).ToList(); }).ToList();
var baseAPIOrg = _configuration["API"]; var baseAPIOrg = _configuration["API"];

View file

@ -10,16 +10,17 @@ namespace BMA.EHR.Retirement.Service.Requests
public class ReportExecuteRequestObj public class ReportExecuteRequestObj
{ {
public string? refId { get; set; } public string? refId { get; set; }
public DateTime commandAffectDate { get; set; }
public string? commandNo { get; set; } public string? commandNo { get; set; }
public string? commandId { get; set; }
public int commandYear { get; set; } public int commandYear { get; set; }
public string? templateDoc { get; set; } public string? commandId { get; set; }
public string? remark { get; set; }
public double? amount { get; set; } public double? amount { get; set; }
public double? amountSpecial { get; set; } public double? amountSpecial { get; set; }
public double? positionSalaryAmount { get; set; } public double? positionSalaryAmount { get; set; }
public double? mouthSalaryAmount { get; set; } public double? mouthSalaryAmount { get; set; }
public string? refCommandCode { get; set; } public string? commandCode { get; set; }
public string? refCommandName { get; set; } public string? commandName { get; set; }
public DateTime commandDateAffect { get; set; }
public DateTime commandDateSign { get; set; }
} }
} }