fix issue #1083 : SIT รายงานระบบบรรจุ ข้อมูลไม่ถูกบันทึกลงรายงาน
Some checks failed
release-dev / release-dev (push) Failing after 11s

This commit is contained in:
Bright 2025-02-04 11:34:02 +07:00
parent 4988427f9f
commit 5ec9580e96
2 changed files with 47 additions and 17 deletions

View file

@ -742,7 +742,11 @@ namespace BMA.EHR.Placement.Service.Controllers
var placementProfiles = await _context.PlacementAppointments
.Where(x => req.refIds.Contains(x.Id.ToString()))
.ToListAsync();
placementProfiles.ForEach(profile => profile.Status = "REPORT");
placementProfiles.ForEach(profile =>
{
profile.Status = "REPORT";
profile.typeCommand = "APPOINTED";
});
await _context.SaveChangesAsync();
return Success();
}
@ -977,7 +981,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x => req.refIds.Contains(x.Id.ToString()))
// .Where(x => x.Status.ToUpper() == "REPORT")
.ToListAsync();
placementProfiles.ForEach(profile => profile.Status = "PENDING");
placementProfiles.ForEach(profile =>
{
profile.Status = "REPORT";
profile.typeCommand = "MOVE";
});
await _context.SaveChangesAsync();
return Success();
}
@ -1587,7 +1595,11 @@ namespace BMA.EHR.Placement.Service.Controllers
// .Where(x => x.Placement!.PlacementType!.Name == "เลื่อนข้าราชการ")
// .Where(x => x.typeCommand.Trim().ToUpper() == "SLIP")
.ToListAsync();
placementProfiles.ForEach(profile => profile.Status = "REPORT");
placementProfiles.ForEach(profile =>
{
profile.Status = "REPORT";
profile.typeCommand = "SLIP";
});
await _context.SaveChangesAsync();
return Success();
}