แก้บั้กออกคำสั่งบรรจุ
This commit is contained in:
parent
7d88274dae
commit
99485f64e0
4 changed files with 33 additions and 10 deletions
|
|
@ -211,6 +211,10 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
.ThenInclude(x => x.PositionMaster)
|
.ThenInclude(x => x.PositionMaster)
|
||||||
.ThenInclude(x => x.PositionLine)
|
.ThenInclude(x => x.PositionLine)
|
||||||
|
|
||||||
|
.Include(x => x.OrganizationPosition)
|
||||||
|
.ThenInclude(x => x.Organization)
|
||||||
|
.ThenInclude(x => x.OrganizationOrganization)
|
||||||
|
|
||||||
.FirstOrDefaultAsync(x => x.Id == recv.RefPlacementProfileId);
|
.FirstOrDefaultAsync(x => x.Id == recv.RefPlacementProfileId);
|
||||||
|
|
||||||
if (placementProfile == null)
|
if (placementProfile == null)
|
||||||
|
|
@ -233,6 +237,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
ReligionId = placementProfile.Religion == null ? Guid.Empty : placementProfile.Religion.Id,
|
ReligionId = placementProfile.Religion == null ? Guid.Empty : placementProfile.Religion.Id,
|
||||||
BloodGroupId = placementProfile.BloodGroup == null ? Guid.Empty : placementProfile.BloodGroup.Id,
|
BloodGroupId = placementProfile.BloodGroup == null ? Guid.Empty : placementProfile.BloodGroup.Id,
|
||||||
|
|
||||||
|
DateAppoint = placementProfile.RecruitDate == null ? null : placementProfile.RecruitDate.Value,
|
||||||
|
DateStart = placementProfile.RecruitDate == null ? null : placementProfile.RecruitDate.Value,
|
||||||
|
|
||||||
RegistrationAddress = placementProfile.RegistAddress,
|
RegistrationAddress = placementProfile.RegistAddress,
|
||||||
RegistrationSubDistrictId = placementProfile.RegistSubDistrict == null ? Guid.Empty : placementProfile.RegistSubDistrict!.Id,
|
RegistrationSubDistrictId = placementProfile.RegistSubDistrict == null ? Guid.Empty : placementProfile.RegistSubDistrict!.Id,
|
||||||
|
|
@ -263,7 +269,11 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
PositionPathSideId = placementProfile.PositionPathSide == null ? Guid.Empty : placementProfile.PositionPathSide.Id,
|
PositionPathSideId = placementProfile.PositionPathSide == null ? Guid.Empty : placementProfile.PositionPathSide.Id,
|
||||||
PositionType = placementProfile.PositionType,
|
PositionType = placementProfile.PositionType,
|
||||||
PositionLevel = placementProfile.PositionLevel,
|
PositionLevel = placementProfile.PositionLevel,
|
||||||
|
PositionEmployeeLevelId = placementProfile.PositionLevel!.Id,
|
||||||
PositionLineId = placementProfile.PositionLine == null ? Guid.Empty : placementProfile.PositionLine.Id,
|
PositionLineId = placementProfile.PositionLine == null ? Guid.Empty : placementProfile.PositionLine.Id,
|
||||||
|
PositionLine = placementProfile.PositionLine == null ? "" : placementProfile.PositionLine.Name,
|
||||||
|
PosNo = placementProfile.OrganizationPosition!.PositionNumber,
|
||||||
|
|
||||||
IsVerified = true,
|
IsVerified = true,
|
||||||
IsProbation = true,
|
IsProbation = true,
|
||||||
Physical = "",
|
Physical = "",
|
||||||
|
|
@ -292,6 +302,14 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
LastUpdatedAt = DateTime.Now,
|
LastUpdatedAt = DateTime.Now,
|
||||||
LastUpdateFullName = FullName ?? "System Administrator",
|
LastUpdateFullName = FullName ?? "System Administrator",
|
||||||
LastUpdateUserId = UserId ?? "",
|
LastUpdateUserId = UserId ?? "",
|
||||||
|
|
||||||
|
// organization
|
||||||
|
OrganizationShortNameId = placementProfile.OrganizationPosition!.Organization!.OrganizationShortName!.Id,
|
||||||
|
OrganizationShortName = placementProfile.OrganizationPosition!.Organization!.OrganizationShortName!.Name,
|
||||||
|
OrganizationOrganizationId = placementProfile.OrganizationPosition!.Organization!.OrganizationOrganization!.Id,
|
||||||
|
OcId = placementProfile.OrganizationPosition!.Organization!.Id,
|
||||||
|
Oc = _organizationCommonRepository.GetOrganizationNameFullPath(placementProfile.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// add profile education
|
// add profile education
|
||||||
|
|
@ -1290,7 +1308,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
Name = $"{x.Profile!.Prefix!.Name}{x.Profile!.FirstName} {x.Profile!.LastName}",
|
Name = $"{x.Profile!.Prefix!.Name}{x.Profile!.FirstName} {x.Profile!.LastName}",
|
||||||
PositionName = x.OrganizationPosition!.PositionMaster!.PositionExecutive != null ?
|
PositionName = x.OrganizationPosition!.PositionMaster!.PositionExecutive != null ?
|
||||||
x.OrganizationPosition!.PositionMaster!.PositionExecutive!.Name
|
x.OrganizationPosition!.PositionMaster!.PositionExecutive!.Name
|
||||||
:
|
:
|
||||||
x.OrganizationPosition!.PositionMaster!.PositionPath == null ? "" : x.OrganizationPosition!.PositionMaster!.PositionPath!.Name
|
x.OrganizationPosition!.PositionMaster!.PositionPath == null ? "" : x.OrganizationPosition!.PositionMaster!.PositionPath!.Name
|
||||||
})
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ namespace BMA.EHR.Application.Repositories
|
||||||
|
|
||||||
#region " Methods "
|
#region " Methods "
|
||||||
|
|
||||||
public string GetOrganizationNameFullPath(Guid id, bool showRoot = false, bool descending = false)
|
public string GetOrganizationNameFullPath(Guid id, bool showRoot = false, bool descending = false,string seperator = " ")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -39,7 +39,7 @@ namespace BMA.EHR.Application.Repositories
|
||||||
var ret = String.Empty;
|
var ret = String.Empty;
|
||||||
foreach (var oc in ocList)
|
foreach (var oc in ocList)
|
||||||
{
|
{
|
||||||
ret = oc.Name + " " + ret;
|
ret = oc.Name + seperator + ret;
|
||||||
}
|
}
|
||||||
if (ret.Length > 2)
|
if (ret.Length > 2)
|
||||||
ret = ret.Substring(0, ret.Length - 1);
|
ret = ret.Substring(0, ret.Length - 1);
|
||||||
|
|
@ -65,7 +65,7 @@ namespace BMA.EHR.Application.Repositories
|
||||||
{
|
{
|
||||||
Id = x.Id,
|
Id = x.Id,
|
||||||
Name = x.OrganizationOrganization!.Name,
|
Name = x.OrganizationOrganization!.Name,
|
||||||
ParentId = x.Parent!.Id
|
ParentId = x.Parent == null ? Guid.Empty : x.Parent!.Id
|
||||||
})
|
})
|
||||||
.FirstOrDefault(x => x.Id == id);
|
.FirstOrDefault(x => x.Id == id);
|
||||||
|
|
||||||
|
|
@ -81,7 +81,7 @@ namespace BMA.EHR.Application.Repositories
|
||||||
//else
|
//else
|
||||||
// ocList.Add(new OrganizationItem { Id = oc.OCId, Name = oc.OrganizationName });
|
// ocList.Add(new OrganizationItem { Id = oc.OCId, Name = oc.OrganizationName });
|
||||||
|
|
||||||
if (ocData.ParentId != null)
|
if (ocData.ParentId != Guid.Empty)
|
||||||
{
|
{
|
||||||
ocList.AddRange(GetOCWithFullPath(ocData.ParentId, showRoot));
|
ocList.AddRange(GetOCWithFullPath(ocData.ParentId, showRoot));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,8 @@ namespace BMA.EHR.Command.Service.Controllers
|
||||||
FiscalYear = d.CommandYear,
|
FiscalYear = d.CommandYear,
|
||||||
OrderDate = d.CommandAffectDate,
|
OrderDate = d.CommandAffectDate,
|
||||||
OrderByOrganization = d.IssuerOrganizationName,
|
OrderByOrganization = d.IssuerOrganizationName,
|
||||||
OrderBy = d.IssuerOrganizationId,
|
OrderBy = d.IssuerOrganizationName,
|
||||||
|
OrderById = d.IssuerOrganizationId,
|
||||||
signatoryBy = d.AuthorizedUserFullName,
|
signatoryBy = d.AuthorizedUserFullName,
|
||||||
signatoryPosition = d.AuthorizedPosition,
|
signatoryPosition = d.AuthorizedPosition,
|
||||||
OrderStatusValue = d.CommandStatusId,
|
OrderStatusValue = d.CommandStatusId,
|
||||||
|
|
@ -387,6 +388,7 @@ namespace BMA.EHR.Command.Service.Controllers
|
||||||
PositionName = req.registerPosition,
|
PositionName = req.registerPosition,
|
||||||
CommandTypeId = req.orderTypeValue,
|
CommandTypeId = req.orderTypeValue,
|
||||||
IssuerOrganizationId = req.orderBy,
|
IssuerOrganizationId = req.orderBy,
|
||||||
|
IssuerOrganizationName = req.orderByOrganizationName,
|
||||||
AuthorizedUserFullName = req.signatoryBy,
|
AuthorizedUserFullName = req.signatoryBy,
|
||||||
AuthorizedPosition = req.signatoryPosition,
|
AuthorizedPosition = req.signatoryPosition,
|
||||||
PlacementId = req.examRound,
|
PlacementId = req.examRound,
|
||||||
|
|
@ -439,6 +441,7 @@ namespace BMA.EHR.Command.Service.Controllers
|
||||||
order.PositionName = req.registerPosition;
|
order.PositionName = req.registerPosition;
|
||||||
order.CommandType = commandType!;
|
order.CommandType = commandType!;
|
||||||
order.IssuerOrganizationId = req.orderBy;
|
order.IssuerOrganizationId = req.orderBy;
|
||||||
|
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||||
order.AuthorizedUserFullName = req.signatoryBy;
|
order.AuthorizedUserFullName = req.signatoryBy;
|
||||||
order.AuthorizedPosition = req.signatoryPosition;
|
order.AuthorizedPosition = req.signatoryPosition;
|
||||||
order.Placement = placement!;
|
order.Placement = placement!;
|
||||||
|
|
|
||||||
|
|
@ -14,15 +14,17 @@
|
||||||
|
|
||||||
public Guid orderBy { get; set; }
|
public Guid orderBy { get; set; }
|
||||||
|
|
||||||
public string signatoryBy { get; set; }
|
public string orderByOrganizationName { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string signatoryPosition { get; set; }
|
public string signatoryBy { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string signatoryPosition { get; set; } = string.Empty;
|
||||||
|
|
||||||
public Guid examRound { get; set; }
|
public Guid examRound { get; set; }
|
||||||
|
|
||||||
public string registerPosition { get; set; }
|
public string registerPosition { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string conclusionRegisterNo { get; set; }
|
public string conclusionRegisterNo { get; set; } = string.Empty;
|
||||||
|
|
||||||
public DateTime conclusionRegisterDate { get; set; }
|
public DateTime conclusionRegisterDate { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue