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

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

@ -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"];