Merge branch 'develop' into working
This commit is contained in:
commit
22304e7186
4 changed files with 19 additions and 17 deletions
|
|
@ -8952,6 +8952,7 @@ namespace BMA.EHR.Application.Repositories
|
||||||
MarkDiscipline = h.MarkDiscipline,
|
MarkDiscipline = h.MarkDiscipline,
|
||||||
MarkLeave = h.MarkLeave,
|
MarkLeave = h.MarkLeave,
|
||||||
MarkRate = h.MarkRate,
|
MarkRate = h.MarkRate,
|
||||||
|
MarkInsignia = h.MarkInsignia,
|
||||||
MatchingConditions = h.MatchingConditions == null || h.MatchingConditions == ""
|
MatchingConditions = h.MatchingConditions == null || h.MatchingConditions == ""
|
||||||
? null
|
? null
|
||||||
: JsonConvert.DeserializeObject<List<MatchingCondition>>(h.MatchingConditions)
|
: JsonConvert.DeserializeObject<List<MatchingCondition>>(h.MatchingConditions)
|
||||||
|
|
@ -9111,7 +9112,7 @@ namespace BMA.EHR.Application.Repositories
|
||||||
LastUpdatedAt = DateTime.Now,
|
LastUpdatedAt = DateTime.Now,
|
||||||
|
|
||||||
// Add Information for reused in API Call
|
// Add Information for reused in API Call
|
||||||
ProfileType = item.ProfileType ?? "officer",
|
ProfileType = item.ProfileType != null && item.ProfileType != "" ? item.ProfileType.ToLower() : "officer",
|
||||||
Prefix = item.Prefix,
|
Prefix = item.Prefix,
|
||||||
FirstName = item.FirstName,
|
FirstName = item.FirstName,
|
||||||
LastName = item.LastName,
|
LastName = item.LastName,
|
||||||
|
|
@ -9221,7 +9222,7 @@ namespace BMA.EHR.Application.Repositories
|
||||||
LastUpdatedAt = DateTime.Now,
|
LastUpdatedAt = DateTime.Now,
|
||||||
|
|
||||||
// Add Information for reused in API Call
|
// Add Information for reused in API Call
|
||||||
ProfileType = item.ProfileType ?? "officer",
|
ProfileType = item.ProfileType != null && item.ProfileType != "" ? item.ProfileType.ToLower() : "officer",
|
||||||
Prefix = item.Prefix,
|
Prefix = item.Prefix,
|
||||||
FirstName = item.FirstName,
|
FirstName = item.FirstName,
|
||||||
LastName = item.LastName,
|
LastName = item.LastName,
|
||||||
|
|
|
||||||
|
|
@ -1590,11 +1590,11 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
|
|
||||||
if (type == "officer")
|
if (type == "officer")
|
||||||
{
|
{
|
||||||
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "OFFICER");
|
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "officer");
|
||||||
}
|
}
|
||||||
else if (type == "employee")
|
else if (type == "employee")
|
||||||
{
|
{
|
||||||
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "EMPLOYEE");
|
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "employee");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (node)
|
switch (node)
|
||||||
|
|
@ -1663,11 +1663,11 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
|
|
||||||
if (type == "officer")
|
if (type == "officer")
|
||||||
{
|
{
|
||||||
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "OFFICER");
|
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "officer");
|
||||||
}
|
}
|
||||||
else if (type == "employee")
|
else if (type == "employee")
|
||||||
{
|
{
|
||||||
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "EMPLOYEE");
|
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "employee");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (node)
|
switch (node)
|
||||||
|
|
@ -1736,11 +1736,11 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
|
|
||||||
if (type == "officer")
|
if (type == "officer")
|
||||||
{
|
{
|
||||||
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "OFFICER");
|
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "officer");
|
||||||
}
|
}
|
||||||
else if (type == "employee")
|
else if (type == "employee")
|
||||||
{
|
{
|
||||||
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToUpper() == "EMPLOYEE");
|
data_insigniaQuery = data_insigniaQuery.Where(r => r.ProfileType.Trim().ToLower() == "employee");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (node)
|
switch (node)
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
public bool? MarkDiscipline { get; set; }
|
public bool? MarkDiscipline { get; set; }
|
||||||
public bool? MarkLeave { get; set; }
|
public bool? MarkLeave { get; set; }
|
||||||
public bool? MarkRate { get; set; }
|
public bool? MarkRate { get; set; }
|
||||||
|
public bool? MarkInsignia { get; set; }
|
||||||
public List<InsigniaRequestDoc>? Docs { get; set; }
|
public List<InsigniaRequestDoc>? Docs { get; set; }
|
||||||
|
|
||||||
public List<MatchingCondition> MatchingConditions { get; set; } = new List<MatchingCondition>();
|
public List<MatchingCondition> MatchingConditions { get; set; } = new List<MatchingCondition>();
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
// // บันทึกรายชื่อ
|
// // บันทึกรายชื่อ
|
||||||
// await _repository.InsertCandidate(period, ocId, candidate);
|
// 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))
|
resend.Items = (await _repository.InsigniaHasProfile(result.PeriodId, ocId, status, type))
|
||||||
.Where(x => x.ProfileType!.ToLower() == type.ToLower()).ToList();
|
.Where(x => x.ProfileType!.ToLower() == type.ToLower()).ToList();
|
||||||
|
|
@ -453,7 +453,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
// // บันทึกรายชื่อ
|
// // บันทึกรายชื่อ
|
||||||
// await _repository.InsertCandidate(period, ocId, candidate);
|
// 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);
|
resend.Items = await _repository.InsigniaHasProfile(result.PeriodId, ocId, status);
|
||||||
return Success(resend);
|
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
|
//var resultData = allEmployeeProfileByRoot.Select(x => new
|
||||||
//{
|
//{
|
||||||
|
|
@ -1168,7 +1168,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
LastUpdateUserId = UserId ?? "",
|
LastUpdateUserId = UserId ?? "",
|
||||||
LastUpdatedAt = DateTime.Now,
|
LastUpdatedAt = DateTime.Now,
|
||||||
// Add Information for reused in API Call
|
// Add Information for reused in API Call
|
||||||
ProfileType = profile.ProfileType ?? "officer",
|
ProfileType = profile.ProfileType != null && profile.ProfileType != "" ? profile.ProfileType.ToLower() : "officer",
|
||||||
Prefix = profile.Prefix,
|
Prefix = profile.Prefix,
|
||||||
FirstName = profile.FirstName,
|
FirstName = profile.FirstName,
|
||||||
LastName = profile.LastName,
|
LastName = profile.LastName,
|
||||||
|
|
@ -2139,7 +2139,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
{
|
{
|
||||||
insigniaNoteProfile.Status = "DONE";
|
insigniaNoteProfile.Status = "DONE";
|
||||||
|
|
||||||
if (profile.ProfileType == "OFFICER")
|
if (profile.ProfileType == "officer")
|
||||||
{
|
{
|
||||||
var profileInsigniaBody = new PostProfileInsigniaDto
|
var profileInsigniaBody = new PostProfileInsigniaDto
|
||||||
{
|
{
|
||||||
|
|
@ -2207,7 +2207,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
if (req.DateReceive != null && req.Date != null)
|
if (req.DateReceive != null && req.Date != null)
|
||||||
{
|
{
|
||||||
profileInsignia.Status = "DONE";
|
profileInsignia.Status = "DONE";
|
||||||
if (profile.ProfileType == "OFFICER")
|
if (profile.ProfileType == "officer")
|
||||||
{
|
{
|
||||||
var profileInsigniaBody = new PostProfileInsigniaDto
|
var profileInsigniaBody = new PostProfileInsigniaDto
|
||||||
{
|
{
|
||||||
|
|
@ -2465,7 +2465,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
profile.Status = "DONE";
|
profile.Status = "DONE";
|
||||||
|
|
||||||
// check profile.ProfileType ก่อนส่งไประบบทะเบียนประวัติ
|
// check profile.ProfileType ก่อนส่งไประบบทะเบียนประวัติ
|
||||||
if (profile.ProfileType == "OFFICER")
|
if (profile.ProfileType == "officer")
|
||||||
{
|
{
|
||||||
var profileInsigniaBody = new PostProfileInsigniaDto
|
var profileInsigniaBody = new PostProfileInsigniaDto
|
||||||
{
|
{
|
||||||
|
|
@ -3170,11 +3170,11 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
foreach (var InsigniaRequest in insigniaPeriod.InsigniaRequests)
|
foreach (var InsigniaRequest in insigniaPeriod.InsigniaRequests)
|
||||||
{
|
{
|
||||||
var profiles = await _context.Set<InsigniaRequestProfile>()
|
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)
|
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