แก้บั้ก put ข้อมูลคำสั่ง

เพิ่ม command type code ไปที่ response
This commit is contained in:
Suphonchai Phoonsawat 2023-08-25 13:46:18 +07:00
parent 16ac719f8a
commit 200e8eb5f6
2 changed files with 5 additions and 2 deletions

View file

@ -272,7 +272,7 @@ namespace BMA.EHR.Application.Repositories.Commands
PositionEmployeeLevelId = placementProfile.PositionLevel!.Id, 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, PositionLine = placementProfile.PositionLine == null ? "" : placementProfile.PositionLine.Name,
PosNo = placementProfile.OrganizationPosition!.PositionNumber, PosNo = placementProfile.OrganizationPosition!.PositionNumber,
IsVerified = true, IsVerified = true,
IsProbation = true, IsProbation = true,
@ -553,7 +553,8 @@ namespace BMA.EHR.Application.Repositories.Commands
// attatch // attatch
_dbContext.Attatch(entity.CommandStatus); _dbContext.Attatch(entity.CommandStatus);
_dbContext.Attatch(entity.CommandType); _dbContext.Attatch(entity.CommandType);
_dbContext.Attatch(entity.Placement); if (entity.Placement != null)
_dbContext.Attatch(entity.Placement);
return await base.UpdateAsync(entity); return await base.UpdateAsync(entity);
} }

View file

@ -341,6 +341,7 @@ namespace BMA.EHR.Command.Service.Controllers
{ {
orderId = orderId, orderId = orderId,
orderTypeValue = data.CommandTypeId, orderTypeValue = data.CommandTypeId,
orderTypeCode = data.CommandType.CommandCode.ToLower(),
orderTitle = data.CommandSubject, orderTitle = data.CommandSubject,
orderNo = data.CommandNo, orderNo = data.CommandNo,
orderYear = data.CommandYear, orderYear = data.CommandYear,
@ -354,6 +355,7 @@ namespace BMA.EHR.Command.Service.Controllers
conclusionRegisterDate = data.ConclusionRegisterDate, conclusionRegisterDate = data.ConclusionRegisterDate,
conclusionResultNo = data.ConclusionResultNo, conclusionResultNo = data.ConclusionResultNo,
conclusionResultDate = data.ConclusionResultDate, conclusionResultDate = data.ConclusionResultDate,
}; };
return Success(result); return Success(result);