เพิ่มการบันทึกไปทะเบียนประวัติ ตามประเภท officer หรือ employee โดยไปเรียก api ของระบบโครงสร้าง
Some checks failed
release-dev / release-dev (push) Failing after 12s
Some checks failed
release-dev / release-dev (push) Failing after 12s
This commit is contained in:
parent
d9be2426c4
commit
fd25873348
1 changed files with 64 additions and 17 deletions
|
|
@ -2293,24 +2293,71 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
if (profile.Status != "DONE")
|
||||
{
|
||||
profile.Status = "DONE";
|
||||
var profileInsignia = new PostProfileInsigniaDto
|
||||
|
||||
// check profile.ProfileType ก่อนส่งไประบบทะเบียนประวัติ
|
||||
if (profile.ProfileType == "OFFICER")
|
||||
{
|
||||
profileId = profile.ProfileId.Value,
|
||||
year = insigniaNote.Year,
|
||||
no = profile.No,
|
||||
volumeNo = profile.VolumeNo,
|
||||
section = profile.Section,
|
||||
page = profile.Page,
|
||||
receiveDate = profile.DateReceive.Value,
|
||||
dateAnnounce = profile.Date.Value,
|
||||
insigniaId = profile.RequestInsignia.Id,
|
||||
issue = "",
|
||||
note = "",
|
||||
refCommandDate = null,
|
||||
refCommandNo = "",
|
||||
volume = "",
|
||||
};
|
||||
await _userProfileRepository.PostProfileInsigniaAsync(profileInsignia, AccessToken);
|
||||
var profileInsigniaBody = new PostProfileInsigniaDto
|
||||
{
|
||||
profileId = profile!.ProfileId!.Value,
|
||||
year = insigniaNote.Year,
|
||||
no = profile!.No ?? "",
|
||||
volumeNo = profile!.VolumeNo ?? "",
|
||||
section = profile!.Section ?? "",
|
||||
page = profile!.Page ?? "",
|
||||
receiveDate = profile.DateReceive!.Value,
|
||||
dateAnnounce = profile.Date!.Value,
|
||||
insigniaId = profile.RequestInsignia!.Id,
|
||||
issue = "",
|
||||
note = "",
|
||||
refCommandDate = null,
|
||||
refCommandNo = "",
|
||||
volume = "",
|
||||
|
||||
};
|
||||
await _userProfileRepository.PostProfileInsigniaAsync(profileInsigniaBody, AccessToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
var profileInsigniaBody = new PostProfileEmpInsigniaDto
|
||||
{
|
||||
profileEmployeeId = profile!.ProfileId!.Value,
|
||||
year = insigniaNote.Year,
|
||||
no = profile!.No ?? "",
|
||||
volumeNo = profile!.VolumeNo ?? "",
|
||||
section = profile!.Section ?? "",
|
||||
page = profile!.Page ?? "",
|
||||
receiveDate = profile.DateReceive!.Value,
|
||||
dateAnnounce = profile.Date!.Value,
|
||||
insigniaId = profile.RequestInsignia!.Id,
|
||||
issue = "",
|
||||
note = "",
|
||||
refCommandDate = null,
|
||||
refCommandNo = "",
|
||||
volume = "",
|
||||
|
||||
};
|
||||
await _userProfileRepository.PostProfileEmpInsigniaAsync(profileInsigniaBody, AccessToken);
|
||||
}
|
||||
|
||||
//var profileInsignia = new PostProfileInsigniaDto
|
||||
//{
|
||||
// profileId = profile.ProfileId.Value,
|
||||
// year = insigniaNote.Year,
|
||||
// no = profile.No,
|
||||
// volumeNo = profile.VolumeNo,
|
||||
// section = profile.Section,
|
||||
// page = profile.Page,
|
||||
// receiveDate = profile.DateReceive.Value,
|
||||
// dateAnnounce = profile.Date.Value,
|
||||
// insigniaId = profile.RequestInsignia.Id,
|
||||
// issue = "",
|
||||
// note = "",
|
||||
// refCommandDate = null,
|
||||
// refCommandNo = "",
|
||||
// volume = "",
|
||||
//};
|
||||
//await _userProfileRepository.PostProfileInsigniaAsync(profileInsignia, AccessToken);
|
||||
}
|
||||
}
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue