fix add person witth issue #1067
Some checks failed
release-dev / release-dev (push) Failing after 11s
Some checks failed
release-dev / release-dev (push) Failing after 11s
This commit is contained in:
parent
f4055d01c3
commit
f953e24515
1 changed files with 45 additions and 5 deletions
|
|
@ -6,6 +6,7 @@ using BMA.EHR.Application.Responses.Insignias;
|
||||||
using BMA.EHR.Application.Responses.Organizations;
|
using BMA.EHR.Application.Responses.Organizations;
|
||||||
using BMA.EHR.Domain.Common;
|
using BMA.EHR.Domain.Common;
|
||||||
using BMA.EHR.Domain.Extensions;
|
using BMA.EHR.Domain.Extensions;
|
||||||
|
using BMA.EHR.Domain.Models.HR;
|
||||||
using BMA.EHR.Domain.Models.Insignias;
|
using BMA.EHR.Domain.Models.Insignias;
|
||||||
using BMA.EHR.Domain.Shared;
|
using BMA.EHR.Domain.Shared;
|
||||||
using BMA.EHR.Infrastructure.Persistence;
|
using BMA.EHR.Infrastructure.Persistence;
|
||||||
|
|
@ -1658,9 +1659,9 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
|
|
||||||
if (profileInsignia == null)
|
if (profileInsignia == null)
|
||||||
{
|
{
|
||||||
/* var insigniaNoteProfile = new InsigniaNoteProfile
|
var insigniaNoteProfile = new InsigniaNoteProfile
|
||||||
{
|
{
|
||||||
Salary = profile.ProfileSalary == null || profile.ProfileSalary.Count() == 0 ? null : profile.ProfileSalary.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
|
Salary = profile.ProfileSalary == null ? 0 : profile.ProfileSalary.Amount,
|
||||||
IsApprove = true,
|
IsApprove = true,
|
||||||
Status = "PENDING",
|
Status = "PENDING",
|
||||||
ProfileId = profile.Id,
|
ProfileId = profile.Id,
|
||||||
|
|
@ -1677,7 +1678,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
Address = req.Address,
|
Address = req.Address,
|
||||||
RequestInsignia = insignia,
|
RequestInsignia = insignia,
|
||||||
OrganizationOrganizationReceive = req.OrganizationOrganizationReceive,
|
OrganizationOrganizationReceive = req.OrganizationOrganizationReceive,
|
||||||
req.OrganizationOrganizationSend,
|
OrganizationOrganizationSend = req.OrganizationOrganizationSend,
|
||||||
InsigniaNote = insigniaNote,
|
InsigniaNote = insigniaNote,
|
||||||
CreatedFullName = FullName ?? "System Administrator",
|
CreatedFullName = FullName ?? "System Administrator",
|
||||||
CreatedUserId = UserId ?? "",
|
CreatedUserId = UserId ?? "",
|
||||||
|
|
@ -1685,10 +1686,49 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
LastUpdateFullName = FullName ?? "System Administrator",
|
LastUpdateFullName = FullName ?? "System Administrator",
|
||||||
LastUpdateUserId = UserId ?? "",
|
LastUpdateUserId = UserId ?? "",
|
||||||
LastUpdatedAt = DateTime.Now,
|
LastUpdatedAt = DateTime.Now,
|
||||||
};*/
|
|
||||||
|
|
||||||
|
Amount = profile.ProfileSalary == null ? 0 : profile.ProfileSalary.Amount,
|
||||||
|
CitizenId = profile.CitizenId,
|
||||||
|
DateAppoint = profile.DateAppoint,
|
||||||
|
Prefix = profile.Prefix,
|
||||||
|
FirstName = profile.FirstName,
|
||||||
|
LastName = profile.LastName,
|
||||||
|
Gender = profile.Gender,
|
||||||
|
PosLevelName = profile.PosLevel,
|
||||||
|
PosNo = profile.PosNo,
|
||||||
|
PosTypeName = profile.PosType,
|
||||||
|
Position = profile.Position,
|
||||||
|
ProfileType = profile.ProfileType,
|
||||||
|
PositionSalaryAmount = profile.ProfileSalary == null ? 0 : profile.ProfileSalary.PositionSalaryAmount,
|
||||||
|
|
||||||
|
|
||||||
|
Root = profile.Root,
|
||||||
|
RootId = profile.RootId,
|
||||||
|
RootDnaId = profile.RootDnaId,
|
||||||
|
Child1 = profile.Child1,
|
||||||
|
Child1Id = profile.Child1Id,
|
||||||
|
Child1DnaId = profile.Child1DnaId,
|
||||||
|
Child2 = profile.Child2,
|
||||||
|
Child2Id = profile.Child2Id,
|
||||||
|
Child2DnaId = profile.Child2DnaId,
|
||||||
|
Child3 = profile.Child3,
|
||||||
|
Child3Id = profile.Child3Id,
|
||||||
|
Child3DnaId = profile.Child3DnaId,
|
||||||
|
Child4 = profile.Child4,
|
||||||
|
Child4Id = profile.Child4Id,
|
||||||
|
Child4DnaId = profile.Child4DnaId,
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
insigniaNote.InsigniaNoteProfiles.Add(insigniaNoteProfile);
|
||||||
|
|
||||||
if (req.DateReceive != null && req.Date != null && profile.Id != null)
|
if (req.DateReceive != null && req.Date != null && profile.Id != null)
|
||||||
{
|
{
|
||||||
/*insigniaNoteProfile.Status = "DONE";*/
|
insigniaNoteProfile.Status = "DONE";
|
||||||
|
|
||||||
var profileInsigniaBody = new PostProfileInsigniaDto
|
var profileInsigniaBody = new PostProfileInsigniaDto
|
||||||
{
|
{
|
||||||
profileId = profile.Id,
|
profileId = profile.Id,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue