Merge branch 'develop' of github.com:Frappet/BMA-EHR-BackEnd into develop
This commit is contained in:
commit
57e8d68d96
8 changed files with 35 additions and 18 deletions
|
|
@ -7039,8 +7039,8 @@ namespace BMA.EHR.Application.Repositories
|
|||
(await _userProfileRepository.GetEmployeeProfileByRootIdAsync(ocId, AccessToken));
|
||||
|
||||
var type_coin = await GetCoinCandidate(periodId, ocId, allOfficerProfilesByRoot);
|
||||
var employee_type1 = await GetEmployeeInsignia_Type1(periodId, ocId, allEmployeeProfileByRoot);
|
||||
var employee_type2 = await GetEmployeeInsignia_Type2(periodId, ocId, allEmployeeProfileByRoot);
|
||||
//var employee_type1 = await GetEmployeeInsignia_Type1(periodId, ocId, allEmployeeProfileByRoot);
|
||||
//var employee_type2 = await GetEmployeeInsignia_Type2(periodId, ocId, allEmployeeProfileByRoot);
|
||||
var type1_level1 = await GetInsigniaCandidate_Type1_Level1(periodId, ocId, allOfficerProfilesByRoot);
|
||||
var type1_level2 = await GetInsigniaCandidate_Type1_Level2(periodId, ocId, allOfficerProfilesByRoot);
|
||||
var type1_level3 = await GetInsigniaCandidate_Type1_Level3(periodId, ocId, allOfficerProfilesByRoot);
|
||||
|
|
@ -7165,19 +7165,22 @@ namespace BMA.EHR.Application.Repositories
|
|||
result_candidate.Add(r);
|
||||
}
|
||||
|
||||
foreach (var r in employee_type2)
|
||||
{
|
||||
var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
if (old == null)
|
||||
result_candidate.Add(r);
|
||||
}
|
||||
// TODO : Remove for Test Error
|
||||
//foreach (var r in employee_type2)
|
||||
//{
|
||||
// var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
// if (old == null)
|
||||
// result_candidate.Add(r);
|
||||
//}
|
||||
|
||||
//foreach (var r in employee_type1)
|
||||
//{
|
||||
// var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
// if (old == null)
|
||||
// result_candidate.Add(r);
|
||||
//}
|
||||
|
||||
|
||||
foreach (var r in employee_type1)
|
||||
{
|
||||
var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
if (old == null)
|
||||
result_candidate.Add(r);
|
||||
}
|
||||
//foreach (var r in type)
|
||||
//{
|
||||
// var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
|
|
|
|||
|
|
@ -817,6 +817,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
amount = r.amount,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
mouthSalaryAmount = r.mouthSalaryAmount,
|
||||
isGovernment = false,
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -913,6 +914,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
amount = r.amount,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
mouthSalaryAmount = r.mouthSalaryAmount,
|
||||
isGovernment = false,
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1067,6 +1069,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
amount = r.amount,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
mouthSalaryAmount = r.mouthSalaryAmount,
|
||||
isGovernment = false
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -1179,6 +1182,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
amount = r.amount,
|
||||
positionSalaryAmount = r.positionSalaryAmount,
|
||||
mouthSalaryAmount = r.mouthSalaryAmount,
|
||||
isGovernment = false
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
|
|||
|
|
@ -502,11 +502,15 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
if (insigniaNoteProfile.Status != "DONE")
|
||||
return Error(GlobalMessages.InsigniaNoBorrow);
|
||||
|
||||
var userProfile = _userProfileRepository.GetOfficerProfileById(insigniaNoteProfile.ProfileId.Value, AccessToken);
|
||||
|
||||
//var _organization = await _context.Organizations.AsQueryable()
|
||||
// .FirstOrDefaultAsync(x => x.Id == insigniaNoteProfile.Profile.OcId);
|
||||
|
||||
//TODO : Hardcode OCId ต้องแก้ให้ดึงมาจากคน Login
|
||||
if (req.BorrowOrganizationId == null) req.BorrowOrganizationId = Guid.Parse("e8493cd1-d371-402e-add6-566e68d5d1b3");
|
||||
var user_oc = _userProfileRepository.GetUserOCId(userProfile.Keycloak.Value, AccessToken);
|
||||
if (req.BorrowOrganizationId == null) req.BorrowOrganizationId = user_oc;
|
||||
//if (req.BorrowOrganizationId == null) req.BorrowOrganizationId = Guid.Parse("e8493cd1-d371-402e-add6-566e68d5d1b3");
|
||||
|
||||
var organization = _userProfileRepository.GetOc(req.BorrowOrganizationId.Value, 0, AccessToken);
|
||||
//if (organization == null)
|
||||
|
|
|
|||
|
|
@ -2812,7 +2812,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
[HttpPut("upload/{requestId:length(36)}"), DisableRequestSizeLimit]
|
||||
public async Task<ActionResult<ResponseObject>> UpdatePersonDeferment([FromForm] ImportFileRequest req, Guid requestId)
|
||||
{
|
||||
var insigniaRequest = await _context.InsigniaRequests.Include(x => x.Document).Where(x => x.Id == requestId).FirstOrDefaultAsync();
|
||||
var insigniaRequest = await _context.InsigniaRequests.AsNoTracking().Include(x => x.Document).Where(x => x.Id == requestId).FirstOrDefaultAsync();
|
||||
if (insigniaRequest == null)
|
||||
return Error(GlobalMessages.InsigniaRequestNotFound, 404);
|
||||
|
||||
|
|
|
|||
|
|
@ -1712,7 +1712,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
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
|
||||
templateDoc = r.templateDoc,
|
||||
isGovernment = true
|
||||
},
|
||||
bodyPosition = new
|
||||
{
|
||||
|
|
@ -1978,7 +1979,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
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
|
||||
templateDoc = r.templateDoc,
|
||||
isGovernment = true
|
||||
},
|
||||
bodyPosition = new
|
||||
{
|
||||
|
|
|
|||
|
|
@ -759,6 +759,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
isLeave = false,
|
||||
leaveReason = _null,
|
||||
dateLeave = _null,
|
||||
isGovernment = true,
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
@ -911,6 +912,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
isLeave = false,
|
||||
leaveReason = _null,
|
||||
dateLeave = _null,
|
||||
isGovernment = true
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
|
|||
|
|
@ -547,6 +547,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
isLeave = true,
|
||||
leaveReason = "ให้ออกจากราชการ",
|
||||
dateLeave = r.commandAffectDate,
|
||||
isGovernment = false
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
|
|||
|
|
@ -1885,6 +1885,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
isLeave = true,
|
||||
leaveReason = "ลาออกจากราชการ",
|
||||
dateLeave = r.commandAffectDate,
|
||||
isGovernment = false
|
||||
}).ToList();
|
||||
|
||||
var baseAPIOrg = _configuration["API"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue