Merge branch 'develop' into working

This commit is contained in:
Suphonchai Phoonsawat 2023-09-13 10:52:27 +07:00
commit 7ac4ed3598
10 changed files with 67 additions and 51 deletions

View file

@ -905,7 +905,9 @@ namespace BMA.EHR.Application.Repositories.Reports
await _repositoryNoti.PushNotificationAsync( await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08db721d-ade4-480e-8d84-0853946a0ea5"), Guid.Parse("08db721d-ade4-480e-8d84-0853946a0ea5"),
$"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round}", $"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round}",
$"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round}" $"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round}",
"",
true
); );
} }
} }

View file

@ -259,10 +259,8 @@ namespace BMA.EHR.Application.Repositories.Reports
OrganizationOrganization = string.IsNullOrEmpty(evaluate_assign.data.experimentee.OrganizationOrganization) ? string.Empty : evaluate_assign.data.experimentee.OrganizationOrganization, OrganizationOrganization = string.IsNullOrEmpty(evaluate_assign.data.experimentee.OrganizationOrganization) ? string.Empty : evaluate_assign.data.experimentee.OrganizationOrganization,
Oc = string.IsNullOrEmpty(evaluate_assign.data.experimentee.Oc) ? string.Empty : evaluate_assign.data.experimentee.Oc, Oc = string.IsNullOrEmpty(evaluate_assign.data.experimentee.Oc) ? string.Empty : evaluate_assign.data.experimentee.Oc,
Reson = string.IsNullOrEmpty(evaluate_assign.data.evaluate.reson) ? string.Empty : evaluate_assign.data.evaluate.reson, Reson = string.IsNullOrEmpty(evaluate_assign.data.evaluate.reson) ? string.Empty : evaluate_assign.data.evaluate.reson,
DevelopComplete = evaluate_assign.data.evaluate.develop_complete.ToString() == "1" ? "/" : " ", DevelopComplete = string.IsNullOrEmpty(evaluate_assign.data.evaluate.develop_complete.ToString()) ? 0 : evaluate_assign.data.evaluate.develop_complete,
NotDevelopComplete = evaluate_assign.data.evaluate.develop_complete.ToString() == "0" ? "/" : " ", PassResult = string.IsNullOrEmpty(evaluate_assign.data.evaluate.pass_result.ToString()) ? 0 : evaluate_assign.data.evaluate.pass_result,
PassResult = evaluate_assign.data.evaluate.pass_result.ToString() == "1" ? "/" : " ",
NotPassResult = evaluate_assign.data.evaluate.pass_result.ToString() == "0" ? "/" : " ",
ExpandMonth = string.IsNullOrEmpty(evaluate_assign.data.evaluate.expand_month.ToString()) ? string.Empty : evaluate_assign.data.evaluate.expand_month.ToString().ToThaiNumber(), ExpandMonth = string.IsNullOrEmpty(evaluate_assign.data.evaluate.expand_month.ToString()) ? string.Empty : evaluate_assign.data.evaluate.expand_month.ToString().ToThaiNumber(),
ChairmanName = string.IsNullOrEmpty(evaluate_assign.data.chairman.name) ? string.Empty : evaluate_assign.data.chairman.name, ChairmanName = string.IsNullOrEmpty(evaluate_assign.data.chairman.name) ? string.Empty : evaluate_assign.data.chairman.name,
ChairmanPosition = string.IsNullOrEmpty(evaluate_assign.data.chairman.Position) ? string.Empty : evaluate_assign.data.chairman.Position, ChairmanPosition = string.IsNullOrEmpty(evaluate_assign.data.chairman.Position) ? string.Empty : evaluate_assign.data.chairman.Position,

View file

@ -414,44 +414,44 @@ namespace BMA.EHR.Placement.Service.Controllers
uppdated.Prefix = save; uppdated.Prefix = save;
} }
if (req.RelationshipId != null) // if (req.RelationshipId != null)
{ // {
var save = await _context.Relationships.FindAsync(req.RelationshipId); // var save = await _context.Relationships.FindAsync(req.RelationshipId);
if (save == null) // if (save == null)
return Error(GlobalMessages.RelationshipNotFound, 404); // return Error(GlobalMessages.RelationshipNotFound, 404);
uppdated.Relationship = save; // uppdated.Relationship = save;
} // }
if (req.ReligionId != null) // if (req.ReligionId != null)
{ // {
var save = await _context.Religions.FindAsync(req.ReligionId); // var save = await _context.Religions.FindAsync(req.ReligionId);
if (save == null) // if (save == null)
return Error(GlobalMessages.ReligionNotFound, 404); // return Error(GlobalMessages.ReligionNotFound, 404);
uppdated.Religion = save; // uppdated.Religion = save;
} // }
if (req.BloodGroupId != null) // if (req.BloodGroupId != null)
{ // {
var save = await _context.BloodGroups.FindAsync(req.BloodGroupId); // var save = await _context.BloodGroups.FindAsync(req.BloodGroupId);
if (save == null) // if (save == null)
return Error(GlobalMessages.BloodGroupNotFound, 404); // return Error(GlobalMessages.BloodGroupNotFound, 404);
uppdated.BloodGroup = save; // uppdated.BloodGroup = save;
} // }
if (req.GenderId != null) // if (req.GenderId != null)
{ // {
var save = await _context.Genders.FindAsync(req.GenderId); // var save = await _context.Genders.FindAsync(req.GenderId);
if (save == null) // if (save == null)
return Error(GlobalMessages.GenderNotFound, 404); // return Error(GlobalMessages.GenderNotFound, 404);
uppdated.Gender = save; // uppdated.Gender = save;
} // }
uppdated.CitizenId = req.CitizenId; uppdated.CitizenId = req.CitizenId;
uppdated.Firstname = req.Firstname; uppdated.Firstname = req.Firstname;
uppdated.Lastname = req.Lastname; uppdated.Lastname = req.Lastname;
uppdated.DateOfBirth = req.DateOfBirth; // uppdated.DateOfBirth = req.DateOfBirth;
uppdated.Nationality = req.Nationality; // uppdated.Nationality = req.Nationality;
uppdated.Race = req.Race; // uppdated.Race = req.Race;
uppdated.TelephoneNumber = req.TelephoneNumber; // uppdated.TelephoneNumber = req.TelephoneNumber;
uppdated.EducationOld = req.EducationOld; uppdated.EducationOld = req.EducationOld;
uppdated.Reason = req.Reason; uppdated.Reason = req.Reason;
uppdated.OrganizationPositionOld = req.OrganizationPositionOld; uppdated.OrganizationPositionOld = req.OrganizationPositionOld;

View file

@ -375,7 +375,9 @@ namespace BMA.EHR.Placement.Service.Controllers
await _repositoryNoti.PushNotificationAsync( await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08db721d-add6-47b0-8a13-5f45d106e8d1"), Guid.Parse("08db721d-add6-47b0-8a13-5f45d106e8d1"),
$"{profile.Prefix?.Name}{profile.FirstName} {profile.LastName} ได้ทำการยื่นคำขอโอน", $"{profile.Prefix?.Name}{profile.FirstName} {profile.LastName} ได้ทำการยื่นคำขอโอน",
$"{profile.Prefix?.Name}{profile.FirstName} {profile.LastName} ได้ทำการยื่นคำขอโอนไปยัง {req.Organization}" $"{profile.Prefix?.Name}{profile.FirstName} {profile.LastName} ได้ทำการยื่นคำขอโอนไปยัง {req.Organization}",
"",
true
); );
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
@ -440,12 +442,16 @@ namespace BMA.EHR.Placement.Service.Controllers
await _repositoryNoti.PushNotificationAsync( await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08db721d-ade4-480e-8d84-0853946a0ea5"), Guid.Parse("08db721d-ade4-480e-8d84-0853946a0ea5"),
$"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอนได้รับการอนุมัติ", $"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอนได้รับการอนุมัติ",
$"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอนไปยัง {uppdated.Organization}ได้รับการอนุมัติ" $"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอนไปยัง {uppdated.Organization}ได้รับการอนุมัติ",
"",
true
); );
await _repositoryNoti.PushNotificationAsync( await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08db721d-ada0-4e64-89d3-7584a893d8b8"), Guid.Parse("08db721d-ada0-4e64-89d3-7584a893d8b8"),
$"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอน", $"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอน",
$"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอนไปยัง {uppdated.Organization}ได้รับการอนุมัติ" $"{uppdated.Profile.Prefix?.Name}{uppdated.Profile.FirstName} {uppdated.Profile.LastName} ได้ทำการยื่นคำขอโอนไปยัง {uppdated.Organization}ได้รับการอนุมัติ",
"",
true
); );
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();

View file

@ -1261,9 +1261,7 @@ namespace BMA.EHR.Report.Service.Controllers
report.ReportParameters["EvaluateDateFinish"].Value = evaluateAssign.GetType().GetProperty("EvaluateDateFinish").GetValue(evaluateAssign); report.ReportParameters["EvaluateDateFinish"].Value = evaluateAssign.GetType().GetProperty("EvaluateDateFinish").GetValue(evaluateAssign);
report.ReportParameters["Reson"].Value = evaluateAssign.GetType().GetProperty("Reson").GetValue(evaluateAssign); report.ReportParameters["Reson"].Value = evaluateAssign.GetType().GetProperty("Reson").GetValue(evaluateAssign);
report.ReportParameters["DevelopComplete"].Value = evaluateAssign.GetType().GetProperty("DevelopComplete").GetValue(evaluateAssign); report.ReportParameters["DevelopComplete"].Value = evaluateAssign.GetType().GetProperty("DevelopComplete").GetValue(evaluateAssign);
report.ReportParameters["NotDevelopComplete"].Value = evaluateAssign.GetType().GetProperty("NotDevelopComplete").GetValue(evaluateAssign);
report.ReportParameters["PassResult"].Value = evaluateAssign.GetType().GetProperty("PassResult").GetValue(evaluateAssign); report.ReportParameters["PassResult"].Value = evaluateAssign.GetType().GetProperty("PassResult").GetValue(evaluateAssign);
report.ReportParameters["NotPassResult"].Value = evaluateAssign.GetType().GetProperty("NotPassResult").GetValue(evaluateAssign);
report.ReportParameters["ExpandMonth"].Value = evaluateAssign.GetType().GetProperty("ExpandMonth").GetValue(evaluateAssign); report.ReportParameters["ExpandMonth"].Value = evaluateAssign.GetType().GetProperty("ExpandMonth").GetValue(evaluateAssign);
report.ReportParameters["ChairmanName"].Value = evaluateAssign.GetType().GetProperty("ChairmanName").GetValue(evaluateAssign); report.ReportParameters["ChairmanName"].Value = evaluateAssign.GetType().GetProperty("ChairmanName").GetValue(evaluateAssign);
report.ReportParameters["ChairmanPosition"].Value = evaluateAssign.GetType().GetProperty("ChairmanPosition").GetValue(evaluateAssign); report.ReportParameters["ChairmanPosition"].Value = evaluateAssign.GetType().GetProperty("ChairmanPosition").GetValue(evaluateAssign);

View file

@ -314,9 +314,9 @@ namespace BMA.EHR.Retirement.Service.Controllers
Prefix = orgPos!.Profile!.Prefix!.Name, Prefix = orgPos!.Profile!.Prefix!.Name,
FirstName = orgPos!.Profile!.FirstName!, FirstName = orgPos!.Profile!.FirstName!,
LastName = orgPos!.Profile!.LastName!, LastName = orgPos!.Profile!.LastName!,
// IsSendMail = req.IsSendMail, IsSendMail = true,
// IsSendInbox = req.IsSendInbox, IsSendInbox = true,
// IsSendNotification = req.IsSendNotification, IsSendNotification = true,
OrganizationName = orgPos!.OrganizationPosition!.Organization!.OrganizationOrganization!.Name, OrganizationName = orgPos!.OrganizationPosition!.Organization!.OrganizationOrganization!.Name,
PositionName = orgPos!.OrganizationPosition!.PositionMaster!.PositionPath!.Name, PositionName = orgPos!.OrganizationPosition!.PositionMaster!.PositionPath!.Name,
ReceiveUser = profile, ReceiveUser = profile,

View file

@ -354,7 +354,9 @@ namespace BMA.EHR.Retirement.Service.Controllers
await _repositoryNoti.PushNotificationAsync( await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08db721d-ae2f-4f5d-836a-02d2413df33d"), Guid.Parse("08db721d-ae2f-4f5d-836a-02d2413df33d"),
$"{profile.Prefix?.Name}{profile.FirstName} {profile.LastName} ได้ทำการยื่นคำลาออก", $"{profile.Prefix?.Name}{profile.FirstName} {profile.LastName} ได้ทำการยื่นคำลาออก",
$"{profile.Prefix?.Name}{profile.FirstName} {profile.LastName} ได้ทำการยื่นคำลาออก" $"{profile.Prefix?.Name}{profile.FirstName} {profile.LastName} ได้ทำการยื่นคำลาออก",
"",
true
); );
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
@ -502,7 +504,9 @@ namespace BMA.EHR.Retirement.Service.Controllers
await _repositoryNoti.PushNotificationAsync( await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08db721d-ae67-4ed1-8b3c-490f44a73e65"), Guid.Parse("08db721d-ae67-4ed1-8b3c-490f44a73e65"),
$"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ได้รับการอนุมัติจากผู้บังคับบัญชา", $"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ได้รับการอนุมัติจากผู้บังคับบัญชา",
$"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ได้รับการอนุมัติจากผู้บังคับบัญชา" $"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ได้รับการอนุมัติจากผู้บังคับบัญชา",
"",
true
); );
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
@ -539,7 +543,9 @@ namespace BMA.EHR.Retirement.Service.Controllers
await _repositoryNoti.PushNotificationAsync( await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08db721d-ae67-4ed1-8b3c-490f44a73e65"), Guid.Parse("08db721d-ae67-4ed1-8b3c-490f44a73e65"),
$"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ถูกยับยั้งจากผู้บังคับบัญชา", $"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ถูกยับยั้งจากผู้บังคับบัญชา",
$"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ถูกยับยั้งจากผู้บังคับบัญชา" $"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ถูกยับยั้งจากผู้บังคับบัญชา",
"",
true
); );
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
@ -573,7 +579,9 @@ namespace BMA.EHR.Retirement.Service.Controllers
await _repositoryNoti.PushNotificationAsync( await _repositoryNoti.PushNotificationAsync(
updated.Profile.Id, updated.Profile.Id,
$"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ได้รับการอนุมัติจากผู้มีอำนาจ", $"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ได้รับการอนุมัติจากผู้มีอำนาจ",
$"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ได้รับการอนุมัติจากผู้มีอำนาจ" $"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ได้รับการอนุมัติจากผู้มีอำนาจ",
"",
true
); );
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
@ -610,7 +618,9 @@ namespace BMA.EHR.Retirement.Service.Controllers
await _repositoryNoti.PushNotificationAsync( await _repositoryNoti.PushNotificationAsync(
updated.Profile.Id, updated.Profile.Id,
$"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ถูกยับยั้งจากผู้มีอำนาจ", $"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ถูกยับยั้งจากผู้มีอำนาจ",
$"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ถูกยับยั้งจากผู้มีอำนาจ" $"คำขอลาออกขอ {updated.Profile.Prefix?.Name}{updated.Profile.FirstName} {updated.Profile.LastName} ถูกยับยั้งจากผู้มีอำนาจ",
"",
true
); );
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
@ -914,7 +924,9 @@ namespace BMA.EHR.Retirement.Service.Controllers
await _repositoryNoti.PushNotificationAsync( await _repositoryNoti.PushNotificationAsync(
uppdated.RetirementResign.Profile.Id, uppdated.RetirementResign.Profile.Id,
$"การนัดสัมภาษณ์เหตุผลการลาออก {req.AppointDate.ToThaiFullDate()}", $"การนัดสัมภาษณ์เหตุผลการลาออก {req.AppointDate.ToThaiFullDate()}",
$"การนัดสัมภาษณ์เหตุผลการลาออก {req.AppointDate.ToThaiFullDate()}" $"การนัดสัมภาษณ์เหตุผลการลาออก {req.AppointDate.ToThaiFullDate()}",
"",
true
); );
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();