fix issue #1083 : SIT รายงานระบบบรรจุ ข้อมูลไม่ถูกบันทึกลงรายงาน

This commit is contained in:
Bright 2025-02-04 13:26:25 +07:00
parent 5ec9580e96
commit 4fc2ee5ca0

View file

@ -961,7 +961,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 = "MOVE";
});
await _context.SaveChangesAsync();
return Success();
}
@ -981,11 +985,7 @@ 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 = "REPORT";
profile.typeCommand = "MOVE";
});
placementProfiles.ForEach(profile => profile.Status = "PENDING");
await _context.SaveChangesAsync();
return Success();
}
@ -1181,7 +1181,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x => req.refIds.Contains(x.Id.ToString()))
// .Where(x => x.type == "EMPLOYEE")
.ToListAsync();
placementProfiles.ForEach(profile => profile.Status = "REPORT");
placementProfiles.ForEach(profile =>
{
profile.Status = "REPORT";
profile.typeCommand = "SLIP";
});
await _context.SaveChangesAsync();
return Success();
}
@ -1384,7 +1388,11 @@ namespace BMA.EHR.Placement.Service.Controllers
.Where(x => req.refIds.Contains(x.Id.ToString()))
// .Where(x => x.type == "EMPLOYEE")
.ToListAsync();
placementProfiles.ForEach(profile => profile.Status = "REPORT");
placementProfiles.ForEach(profile =>
{
profile.Status = "REPORT";
profile.typeCommand = "MOVE";
});
await _context.SaveChangesAsync();
return Success();
}