ออกคำสั่งใหม่
This commit is contained in:
parent
12aceb5e00
commit
e092604b97
15 changed files with 592 additions and 407 deletions
|
|
@ -908,30 +908,35 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
commandId = r.commandId,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
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 = "",
|
||||
positionType = p.posTypeName,
|
||||
positionLevel = p.posLevelName,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
posmasterId = p.posmasterId,
|
||||
positionId = p.positionId,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
commandId = r.commandId,
|
||||
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();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1127,30 +1132,35 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
commandId = r.commandId,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
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 = "",
|
||||
positionType = p.posTypeName,
|
||||
positionLevel = p.posLevelName,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
posmasterId = p.posmasterId,
|
||||
positionId = p.positionId,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
commandId = r.commandId,
|
||||
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();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1337,27 +1347,34 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
commandId = r.commandId,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
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,
|
||||
positionLevel = p.posLevelName,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
posmasterId = p.posmasterId,
|
||||
positionId = p.positionId,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
commandId = r.commandId,
|
||||
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();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1549,27 +1566,34 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
commandId = r.commandId,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
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,
|
||||
positionLevel = p.posLevelName,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
posmasterId = p.posmasterId,
|
||||
positionId = p.positionId,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
commandId = r.commandId,
|
||||
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();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1777,30 +1801,35 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
commandId = r.commandId,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
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 = "",
|
||||
positionType = p.posTypeName,
|
||||
positionLevel = p.posLevelName,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
posmasterId = p.posmasterId,
|
||||
positionId = p.positionId,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
commandId = r.commandId,
|
||||
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();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
|
|||
|
|
@ -1749,8 +1749,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
isProbation = true,
|
||||
isLeave = false,
|
||||
dateRetire = (DateTime?)null,
|
||||
dateAppoint = r.commandAffectDate,
|
||||
dateStart = r.commandAffectDate,
|
||||
dateAppoint = r.commandDateAffect,
|
||||
dateStart = r.commandDateAffect,
|
||||
govAgeAbsent = 0,
|
||||
govAgePlus = 0,
|
||||
birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth,
|
||||
|
|
@ -1809,30 +1809,34 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
}).ToList(),
|
||||
bodySalarys = new
|
||||
{
|
||||
profileId = string.Empty,
|
||||
date = r.commandAffectDate,
|
||||
commandId = r.commandId,
|
||||
profileId = p.profileId,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
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 == null ? string.Empty : p.positionName,
|
||||
positionLine = string.Empty,
|
||||
positionPathSide = string.Empty,
|
||||
positionExecutive = string.Empty,
|
||||
positionType = p.posTypeName == null ? string.Empty : p.posTypeName,
|
||||
positionLevel = p.posLevelName == null ? string.Empty : p.posLevelName,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
isGovernment = true,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
positionExecutive = "",
|
||||
positionType = p.posTypeName,
|
||||
positionLevel = p.posLevelName,
|
||||
commandId = r.commandId,
|
||||
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,
|
||||
},
|
||||
bodyPosition = new
|
||||
{
|
||||
|
|
@ -1860,11 +1864,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
if (req.refIds.Length > 0)
|
||||
{
|
||||
profile.commandId = req.refIds[0].commandId;
|
||||
profile.refCommandCode = req.refIds[0].refCommandCode;
|
||||
profile.refCommandDate = req.refIds[0].commandAffectDate;
|
||||
profile.refCommandName = req.refIds[0].refCommandName;
|
||||
profile.refCommandCode = req.refIds[0].commandCode;
|
||||
profile.refCommandDate = req.refIds[0].commandDateAffect;
|
||||
profile.refCommandName = req.refIds[0].commandName;
|
||||
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();
|
||||
|
|
@ -2072,8 +2076,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
isProbation = true,
|
||||
isLeave = false,
|
||||
dateRetire = (DateTime?)null,
|
||||
dateAppoint = r.commandAffectDate,
|
||||
dateStart = r.commandAffectDate,
|
||||
dateAppoint = r.commandDateAffect,
|
||||
dateStart = r.commandDateAffect,
|
||||
govAgeAbsent = 0,
|
||||
govAgePlus = 0,
|
||||
birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth,
|
||||
|
|
@ -2132,30 +2136,34 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
}).ToList(),
|
||||
bodySalarys = new
|
||||
{
|
||||
profileId = string.Empty,
|
||||
date = r.commandAffectDate,
|
||||
profileId = p.profileId,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
commandId = r.commandId,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
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 == null ? string.Empty : p.positionName,
|
||||
positionLine = string.Empty,
|
||||
positionPathSide = string.Empty,
|
||||
positionExecutive = string.Empty,
|
||||
positionType = p.posTypeName == null ? string.Empty : p.posTypeName,
|
||||
positionLevel = p.posLevelName == null ? string.Empty : p.posLevelName,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
isGovernment = true,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
positionExecutive = "",
|
||||
positionType = p.posTypeName,
|
||||
positionLevel = p.posLevelName,
|
||||
commandId = r.commandId,
|
||||
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,
|
||||
},
|
||||
bodyPosition = new
|
||||
{
|
||||
|
|
@ -2183,11 +2191,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
if (req.refIds.Length > 0)
|
||||
{
|
||||
profile.commandId = req.refIds[0].commandId;
|
||||
profile.refCommandCode = req.refIds[0].refCommandCode;
|
||||
profile.refCommandDate = req.refIds[0].commandAffectDate;
|
||||
profile.refCommandName = req.refIds[0].refCommandName;
|
||||
profile.refCommandCode = req.refIds[0].commandCode;
|
||||
profile.refCommandDate = req.refIds[0].commandDateAffect;
|
||||
profile.refCommandName = req.refIds[0].commandName;
|
||||
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();
|
||||
|
|
@ -2396,30 +2404,35 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
commandId = r.commandId,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
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 = "",
|
||||
positionType = p.posTypeName,
|
||||
positionLevel = p.posLevelName,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
posmasterId = p.posmasterId,
|
||||
positionId = p.positionId,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
commandId = r.commandId,
|
||||
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();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -2631,30 +2644,35 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
commandId = r.commandId,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
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 = "",
|
||||
positionType = p.posTypeName,
|
||||
positionLevel = p.posLevelName,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
posmasterId = p.posmasterId,
|
||||
positionId = p.positionId,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
commandId = r.commandId,
|
||||
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();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -2851,30 +2869,35 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
commandId = r.commandId,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
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 = "",
|
||||
positionType = p.posTypeName,
|
||||
positionLevel = p.posLevelName,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
posmasterId = p.posmasterId,
|
||||
positionId = p.positionId,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
commandId = r.commandId,
|
||||
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();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
|
|||
|
|
@ -678,26 +678,36 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
commandId = r.commandId,
|
||||
amountSpecial = r.amountSpecial,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
mouthSalaryAmount = r.mouthSalaryAmount,
|
||||
posNo = p.PositionNumberOld,
|
||||
position = p.PositionOld,
|
||||
positionLine = "",
|
||||
positionPathSide = "",
|
||||
positionExecutive = "",
|
||||
positionType = p.PositionTypeOld,
|
||||
positionLevel = p.PositionLevelOld,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
commandId = r.commandId,
|
||||
orgRoot = p.rootOld,
|
||||
orgChild1 = p.child1Old,
|
||||
orgChild2 = p.child2Old,
|
||||
orgChild3 = p.child3Old,
|
||||
orgChild4 = p.child4Old,
|
||||
officerOrg = p.Organization,
|
||||
dateStart = p.DateStart,
|
||||
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();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -717,7 +727,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
foreach (var profile in data)
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1048,8 +1048,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
isProbation = false,
|
||||
isLeave = false,
|
||||
dateRetire = (DateTime?)null,
|
||||
dateAppoint = r.commandAffectDate,
|
||||
dateStart = r.commandAffectDate,
|
||||
dateAppoint = r.commandDateAffect,
|
||||
dateStart = r.commandDateAffect,
|
||||
govAgeAbsent = 0,
|
||||
govAgePlus = 0,
|
||||
birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth,
|
||||
|
|
@ -1076,29 +1076,34 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
},
|
||||
bodySalarys = new
|
||||
{
|
||||
profileId = string.Empty,
|
||||
date = r.commandAffectDate,
|
||||
profileId = p.profileId,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
commandId = r.commandId,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
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 == null ? string.Empty : p.position,
|
||||
positionLine = string.Empty,
|
||||
positionPathSide = string.Empty,
|
||||
positionExecutive = string.Empty,
|
||||
positionType = p.posTypeName == null ? string.Empty : p.posTypeName,
|
||||
positionLevel = p.posLevelName == null ? string.Empty : p.posLevelName,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
positionExecutive = "",
|
||||
positionType = p.posTypeName,
|
||||
positionLevel = p.posLevelName,
|
||||
commandId = r.commandId,
|
||||
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,
|
||||
},
|
||||
bodyPosition = new
|
||||
{
|
||||
|
|
|
|||
|
|
@ -498,29 +498,43 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
var data = await _context.PlacementRepatriations
|
||||
.Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString()))
|
||||
.ToListAsync();
|
||||
string? _null = null;
|
||||
var resultData = (from p in data
|
||||
join r in req.refIds
|
||||
on p.Id.ToString() equals r.refId
|
||||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
commandId = r.commandId,
|
||||
amountSpecial = r.amountSpecial,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
mouthSalaryAmount = r.mouthSalaryAmount,
|
||||
posNo = p.PositionNumberOld,
|
||||
position = p.PositionOld,
|
||||
positionLine = "",
|
||||
positionPathSide = "",
|
||||
positionExecutive = "",
|
||||
positionType = p.PositionTypeOld,
|
||||
positionLevel = p.PositionLevelOld,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
commandId = r.commandId,
|
||||
orgRoot = p.rootOld,
|
||||
orgChild1 = p.child1Old,
|
||||
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();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
|
|||
|
|
@ -876,26 +876,37 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
amountSpecial = r.amountSpecial,
|
||||
commandId = r.commandId,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
mouthSalaryAmount = r.mouthSalaryAmount,
|
||||
posNo = p.PositionNumberOld,
|
||||
position = p.PositionOld,
|
||||
positionLine = "",
|
||||
positionPathSide = "",
|
||||
positionExecutive = "",
|
||||
positionType = p.PositionTypeOld,
|
||||
positionLevel = p.PositionLevelOld,
|
||||
refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}",
|
||||
templateDoc = r.templateDoc,
|
||||
commandId = r.commandId,
|
||||
leaveReason = "โอนออก",
|
||||
dateLeave = r.commandAffectDate,
|
||||
dateLeave = r.commandDateAffect,
|
||||
isLeave = true,
|
||||
refCommandCode = r.refCommandCode,
|
||||
refCommandName = r.refCommandName,
|
||||
orgRoot = p.rootOld,
|
||||
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();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
|
|||
|
|
@ -10,16 +10,17 @@ namespace BMA.EHR.Placement.Service.Requests
|
|||
public class ReportExecuteRequestObj
|
||||
{
|
||||
public string? refId { get; set; }
|
||||
public DateTime commandAffectDate { get; set; }
|
||||
public string? commandNo { get; set; }
|
||||
public string? commandId { 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? amountSpecial { get; set; }
|
||||
public double? positionSalaryAmount { get; set; }
|
||||
public double? mouthSalaryAmount { get; set; }
|
||||
public string? refCommandCode { get; set; }
|
||||
public string? refCommandName { get; set; }
|
||||
public string? commandCode { get; set; }
|
||||
public string? commandName { get; set; }
|
||||
public DateTime commandDateAffect { get; set; }
|
||||
public DateTime commandDateSign { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue