Merge branch 'develop' into working
This commit is contained in:
commit
22304e7186
4 changed files with 19 additions and 17 deletions
|
|
@ -334,7 +334,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
// // บันทึกรายชื่อ
|
||||
// await _repository.InsertCandidate(period, ocId, candidate);
|
||||
//}
|
||||
if (role.Trim().ToUpper() == "OFFICER")
|
||||
if (role.Trim().ToLower() == "officer")
|
||||
{
|
||||
resend.Items = (await _repository.InsigniaHasProfile(result.PeriodId, ocId, status, type))
|
||||
.Where(x => x.ProfileType!.ToLower() == type.ToLower()).ToList();
|
||||
|
|
@ -453,7 +453,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
// // บันทึกรายชื่อ
|
||||
// await _repository.InsertCandidate(period, ocId, candidate);
|
||||
//}
|
||||
if (role.Trim().ToUpper() == "OFFICER")
|
||||
if (role.Trim().ToLower() == "officer")
|
||||
{
|
||||
resend.Items = await _repository.InsigniaHasProfile(result.PeriodId, ocId, status);
|
||||
return Success(resend);
|
||||
|
|
@ -549,7 +549,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
var resultData = candidates.Where(x => x.ProfileType == "EMPLOYEE").ToList();
|
||||
var resultData = candidates.Where(x => x.ProfileType == "employee").ToList();
|
||||
|
||||
//var resultData = allEmployeeProfileByRoot.Select(x => new
|
||||
//{
|
||||
|
|
@ -1168,7 +1168,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
LastUpdateUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
// Add Information for reused in API Call
|
||||
ProfileType = profile.ProfileType ?? "officer",
|
||||
ProfileType = profile.ProfileType != null && profile.ProfileType != "" ? profile.ProfileType.ToLower() : "officer",
|
||||
Prefix = profile.Prefix,
|
||||
FirstName = profile.FirstName,
|
||||
LastName = profile.LastName,
|
||||
|
|
@ -2139,7 +2139,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
{
|
||||
insigniaNoteProfile.Status = "DONE";
|
||||
|
||||
if (profile.ProfileType == "OFFICER")
|
||||
if (profile.ProfileType == "officer")
|
||||
{
|
||||
var profileInsigniaBody = new PostProfileInsigniaDto
|
||||
{
|
||||
|
|
@ -2207,7 +2207,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
if (req.DateReceive != null && req.Date != null)
|
||||
{
|
||||
profileInsignia.Status = "DONE";
|
||||
if (profile.ProfileType == "OFFICER")
|
||||
if (profile.ProfileType == "officer")
|
||||
{
|
||||
var profileInsigniaBody = new PostProfileInsigniaDto
|
||||
{
|
||||
|
|
@ -2465,7 +2465,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
profile.Status = "DONE";
|
||||
|
||||
// check profile.ProfileType ก่อนส่งไประบบทะเบียนประวัติ
|
||||
if (profile.ProfileType == "OFFICER")
|
||||
if (profile.ProfileType == "officer")
|
||||
{
|
||||
var profileInsigniaBody = new PostProfileInsigniaDto
|
||||
{
|
||||
|
|
@ -3170,11 +3170,11 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
foreach (var InsigniaRequest in insigniaPeriod.InsigniaRequests)
|
||||
{
|
||||
var profiles = await _context.Set<InsigniaRequestProfile>()
|
||||
.Where(p => p.Request.Id == InsigniaRequest.Id && p.ProfileType == req.type.Trim().ToUpper()).Select(x => x.ProfileId.ToString()).ToListAsync();
|
||||
.Where(p => p.Request.Id == InsigniaRequest.Id && p.ProfileType == req.type.Trim().ToLower()).Select(x => x.ProfileId.ToString()).ToListAsync();
|
||||
|
||||
if (profiles.Count > 0)
|
||||
{
|
||||
await _insigniaPeriodRepository.UpdateInsigniaRequestProfile(profiles.ToArray(), req.type.Trim().ToUpper());
|
||||
await _insigniaPeriodRepository.UpdateInsigniaRequestProfile(profiles.ToArray(), req.type.Trim().ToLower());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue