no message
This commit is contained in:
parent
3e63a99ce0
commit
c694f08dbe
2 changed files with 75 additions and 406 deletions
|
|
@ -998,31 +998,78 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
on p.Id.ToString() equals r.refId
|
||||
select new
|
||||
{
|
||||
profileId = p.profileId,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
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,
|
||||
bodyProfile = new
|
||||
{
|
||||
rank = string.Empty,
|
||||
prefix = p.prefix == null ? string.Empty : p.prefix,
|
||||
firstName = p.firstName == null ? string.Empty : p.firstName,
|
||||
lastName = p.lastName == null ? string.Empty : p.lastName,
|
||||
citizenId = p.citizenId == null ? string.Empty : p.citizenId,
|
||||
position = p.position == null ? string.Empty : p.position,
|
||||
posLevelId = p.posLevelId == null ? string.Empty : p.posLevelId,
|
||||
posTypeId = p.posTypeId == null ? string.Empty : p.posTypeId,
|
||||
email = (String?)null,
|
||||
phone = (String?)null,
|
||||
keycloak = string.Empty,
|
||||
isProbation = true,
|
||||
isLeave = false,
|
||||
dateRetire = (DateTime?)null,
|
||||
dateAppoint = r.commandAffectDate,
|
||||
dateStart = r.commandAffectDate,
|
||||
govAgeAbsent = 0,
|
||||
govAgePlus = 0,
|
||||
birthDate = p.DateOfBirth == null ? (DateTime?)null : p.DateOfBirth,
|
||||
reasonSameDate = (DateTime?)null,
|
||||
ethnicity = p.Race == null ? string.Empty : p.Race,
|
||||
telephoneNumber = (String?)null,
|
||||
nationality = p.Nationality == null ? string.Empty : p.Nationality,
|
||||
gender = p.Gender == null ? string.Empty : p.Gender,
|
||||
relationship = p.Relationship == null ? string.Empty : p.Relationship,
|
||||
religion = p.Religion == null ? string.Empty : p.Religion,
|
||||
bloodGroup = string.Empty,
|
||||
registrationAddress = (String?)null,
|
||||
registrationProvinceId = (String?)null,
|
||||
registrationDistrictId = (String?)null,
|
||||
registrationSubDistrictId = (String?)null,
|
||||
registrationZipCode = (String?)null,
|
||||
currentAddress = (String?)null,
|
||||
currentProvinceId = (String?)null,
|
||||
currentDistrictId = (String?)null,
|
||||
currentSubDistrictId = (String?)null,
|
||||
currentZipCode = (String?)null,
|
||||
},
|
||||
bodySalarys = new
|
||||
{
|
||||
profileId = string.Empty,
|
||||
date = r.commandAffectDate,
|
||||
amount = r.amount,
|
||||
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
|
||||
},
|
||||
bodyPosition = new
|
||||
{
|
||||
posmasterId = p.posmasterId,
|
||||
positionId = p.positionId
|
||||
}
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current";
|
||||
//var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-current";
|
||||
var apiUrlOrg = $"{_configuration["API"]}/org/command/excexute/create-officer-profile";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue