diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs
index a046a69a..fb4e78aa 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs
@@ -84,6 +84,7 @@ namespace BMA.EHR.Placement.Service.Controllers
p.PositionNumberOld,
p.OrganizationPositionOld,
p.IsActive,
+ p.DateRepatriation,
})
.ToListAsync();
if (PlacementAdmin == true)
@@ -129,6 +130,7 @@ namespace BMA.EHR.Placement.Service.Controllers
p.PositionLevelOld,
p.PositionNumberOld,
p.OrganizationPositionOld,
+ p.DateRepatriation,
Avatar = p.Profile.Avatar == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Profile.Avatar.Id,
})
.FirstOrDefaultAsync();
@@ -156,6 +158,7 @@ namespace BMA.EHR.Placement.Service.Controllers
data.PositionLevelOld,
data.PositionNumberOld,
data.OrganizationPositionOld,
+ data.DateRepatriation,
Avatar = data.Avatar == Guid.Parse("00000000-0000-0000-0000-000000000000") ? null : await _documentService.ImagesPath(data.Avatar),
};
@@ -225,6 +228,7 @@ namespace BMA.EHR.Placement.Service.Controllers
return Error(GlobalMessages.PlacementRepatriationNotFound, 404);
uppdated.PositionNumberOld = req.PositionNumberOld;
+ uppdated.DateRepatriation = req.DateRepatriation;
uppdated.OrganizationPositionOld = req.OrganizationPositionOld;
uppdated.PositionLevelOld = req.PositionLevelOld;
uppdated.PositionTypeOld = req.PositionTypeOld;
@@ -316,30 +320,30 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
- ///
- /// วันที่ส่งตัวกลับ
- ///
- /// Id ส่งตัวกลับ
- ///
- ///
- /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
- /// ไม่ได้ Login เข้าระบบ
- /// เมื่อเกิดข้อผิดพลาดในการทำงาน
- [HttpPut("date/{id:length(36)}")]
- public async Task> UpdateDateRepatriation([FromBody] PlacementRepatriationDateRequest req, Guid id)
- {
- var uppdated = await _context.PlacementRepatriations
- .FirstOrDefaultAsync(x => x.Id == id);
- if (uppdated == null)
- return Error(GlobalMessages.PlacementRepatriationNotFound, 404);
- uppdated.DateRepatriation = req.Date;
- uppdated.LastUpdateFullName = FullName ?? "System Administrator";
- uppdated.LastUpdateUserId = UserId ?? "";
- uppdated.LastUpdatedAt = DateTime.Now;
+ // ///
+ // /// วันที่ส่งตัวกลับ
+ // ///
+ // /// Id ส่งตัวกลับ
+ // ///
+ // ///
+ // /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ // /// ไม่ได้ Login เข้าระบบ
+ // /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ // [HttpPut("date/{id:length(36)}")]
+ // public async Task> UpdateDateRepatriation([FromBody] PlacementRepatriationDateRequest req, Guid id)
+ // {
+ // var uppdated = await _context.PlacementRepatriations
+ // .FirstOrDefaultAsync(x => x.Id == id);
+ // if (uppdated == null)
+ // return Error(GlobalMessages.PlacementRepatriationNotFound, 404);
+ // uppdated.DateRepatriation = req.Date;
+ // uppdated.LastUpdateFullName = FullName ?? "System Administrator";
+ // uppdated.LastUpdateUserId = UserId ?? "";
+ // uppdated.LastUpdatedAt = DateTime.Now;
- await _context.SaveChangesAsync();
+ // await _context.SaveChangesAsync();
- return Success();
- }
+ // return Success();
+ // }
}
}
diff --git a/BMA.EHR.Placement.Service/Requests/PlacementRepatriationEditRequest.cs b/BMA.EHR.Placement.Service/Requests/PlacementRepatriationEditRequest.cs
index 5d84f9a5..1137a695 100644
--- a/BMA.EHR.Placement.Service/Requests/PlacementRepatriationEditRequest.cs
+++ b/BMA.EHR.Placement.Service/Requests/PlacementRepatriationEditRequest.cs
@@ -9,6 +9,7 @@ namespace BMA.EHR.Placement.Service.Requests
public string Reason { get; set; }
public string? OrganizationPositionOld { get; set; }
public DateTime? Date { get; set; }
+ public DateTime? DateRepatriation { get; set; }
public string? PositionTypeOld { get; set; }
public string? PositionLevelOld { get; set; }
public string? PositionNumberOld { get; set; }