fix issue #1083 : SIT รายงานระบบบรรจุ ข้อมูลไม่ถูกบันทึกลงรายงาน
Some checks failed
release-dev / release-dev (push) Failing after 11s
Some checks failed
release-dev / release-dev (push) Failing after 11s
This commit is contained in:
parent
4988427f9f
commit
5ec9580e96
2 changed files with 47 additions and 17 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1545,7 +1545,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
// .Where(x => x.Placement!.PlacementType!.Name != "สอบแข่งขัน")
|
||||
// .Where(x => x.typeCommand.Trim().ToUpper() == "APPOINTED")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.PlacementStatus = "REPORT");
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.PlacementStatus = "REPORT";
|
||||
profile.typeCommand = "APPOINTED";
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -1874,10 +1878,14 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
// .Include(x => x.Placement)
|
||||
// .ThenInclude(x => x.PlacementType)
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
// .Where(x => x.Placement!.PlacementType!.Name != "สอบแข่งขัน")
|
||||
// .Where(x => x.Placement!.PlacementType!.Name != "สอบคัดเลือก")
|
||||
// .Where(x => x.typeCommand.Trim().ToUpper() == "APPOINTED")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.PlacementStatus = "REPORT");
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.PlacementStatus = "REPORT";
|
||||
profile.typeCommand = "APPOINTED";
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -2200,6 +2208,12 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
// .Where(x => x.typeCommand.Trim().ToUpper() == "APPOIN")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.PlacementStatus = "REPORT");
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.PlacementStatus = "REPORT";
|
||||
profile.typeCommand = "APPOIN";
|
||||
});
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -2430,7 +2444,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
// .Where(x => x.Placement!.PlacementType!.Name == "ย้ายข้าราชการ")
|
||||
// .Where(x => x.typeCommand.Trim().ToUpper() == "MOVE")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.PlacementStatus = "REPORT");
|
||||
placementProfiles.ForEach(profile =>
|
||||
{
|
||||
profile.PlacementStatus = "REPORT";
|
||||
profile.typeCommand = "MOVE";
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
|
@ -2966,11 +2984,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
x.Status.Trim().ToUpper() == "DONE")
|
||||
.Count();
|
||||
|
||||
var pp_appoint = placementProfiles.FirstOrDefault(x => x.TypeCommand == "APPOINT")?.Count ?? 0;
|
||||
var pp_slip = placementProfiles.FirstOrDefault(x => x.TypeCommand == "SLIP")?.Count ?? 0;
|
||||
var pp_appoint = placementProfiles.FirstOrDefault(x => x.TypeCommand == "APPOINTED")?.Count ?? 0;
|
||||
var pp_slip = placementProfiles.FirstOrDefault(x => x.TypeCommand == "APPOINT")?.Count ?? 0;
|
||||
var pp_move = placementProfiles.FirstOrDefault(x => x.TypeCommand == "MOVE")?.Count ?? 0;
|
||||
|
||||
var pa_appoint = placementAppointments.FirstOrDefault(x => x.TypeCommand == "APPOINT")?.Count ?? 0;
|
||||
var pa_appoint = placementAppointments.FirstOrDefault(x => x.TypeCommand == "APPOINTED")?.Count ?? 0;
|
||||
var pa_slip = placementAppointments.FirstOrDefault(x => x.TypeCommand == "SLIP")?.Count ?? 0;
|
||||
var pa_move = placementAppointments.FirstOrDefault(x => x.TypeCommand == "MOVE")?.Count ?? 0;
|
||||
|
||||
|
|
@ -3065,11 +3083,11 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
x.Status.Trim().ToUpper() == "DONE")
|
||||
.Count();
|
||||
|
||||
var pp_appoint = placementProfiles.FirstOrDefault(x => x.TypeCommand == "APPOINT")?.Count ?? 0;
|
||||
var pp_slip = placementProfiles.FirstOrDefault(x => x.TypeCommand == "SLIP")?.Count ?? 0;
|
||||
var pp_appoint = placementProfiles.FirstOrDefault(x => x.TypeCommand == "APPOINTED")?.Count ?? 0;
|
||||
var pp_slip = placementProfiles.FirstOrDefault(x => x.TypeCommand == "APPOIN")?.Count ?? 0;
|
||||
var pp_move = placementProfiles.FirstOrDefault(x => x.TypeCommand == "MOVE")?.Count ?? 0;
|
||||
|
||||
var pa_appoint = placementAppointments.FirstOrDefault(x => x.TypeCommand == "APPOINT")?.Count ?? 0;
|
||||
var pa_appoint = placementAppointments.FirstOrDefault(x => x.TypeCommand == "APPOINTED")?.Count ?? 0;
|
||||
var pa_slip = placementAppointments.FirstOrDefault(x => x.TypeCommand == "SLIP")?.Count ?? 0;
|
||||
var pa_move = placementAppointments.FirstOrDefault(x => x.TypeCommand == "MOVE")?.Count ?? 0;
|
||||
|
||||
|
|
@ -3194,7 +3212,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
x.CreatedAt.Date <= endDate &&
|
||||
x.rootId.Contains(item.rootId) &&
|
||||
x.Status.Trim().ToUpper() == "DONE" &&
|
||||
x.type.Trim().ToUpper() == "OFFICER")
|
||||
x.type.Trim().ToUpper() == "EMPLOYEE")
|
||||
.GroupBy(x => x.typeCommand.Trim().ToUpper())
|
||||
.Select(g => new
|
||||
{
|
||||
|
|
@ -3203,7 +3221,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
})
|
||||
.ToList();
|
||||
|
||||
var pa_appoint = placementAppointments.FirstOrDefault(x => x.TypeCommand == "APPOINT")?.Count ?? 0;
|
||||
var pa_appoint = placementAppointments.FirstOrDefault(x => x.TypeCommand == "APPOINTED")?.Count ?? 0;
|
||||
var pa_slip = placementAppointments.FirstOrDefault(x => x.TypeCommand == "SLIP")?.Count ?? 0;
|
||||
var pa_move = placementAppointments.FirstOrDefault(x => x.TypeCommand == "MOVE")?.Count ?? 0;
|
||||
|
||||
|
|
@ -3227,7 +3245,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
x.CreatedAt.Date <= endDate &&
|
||||
x.rootId.Contains(item.rootId) &&
|
||||
x.Status.Trim().ToUpper() == "DONE" &&
|
||||
x.type.Trim().ToUpper() == "OFFICER")
|
||||
x.type.Trim().ToUpper() == "EMPLOYEE")
|
||||
.GroupBy(x => x.typeCommand.Trim().ToUpper())
|
||||
.Select(g => new
|
||||
{
|
||||
|
|
@ -3236,7 +3254,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
})
|
||||
.ToList();
|
||||
|
||||
var pa_appoint = placementAppointments.FirstOrDefault(x => x.TypeCommand == "APPOINT")?.Count ?? 0;
|
||||
var pa_appoint = placementAppointments.FirstOrDefault(x => x.TypeCommand == "APPOINTED")?.Count ?? 0;
|
||||
var pa_slip = placementAppointments.FirstOrDefault(x => x.TypeCommand == "SLIP")?.Count ?? 0;
|
||||
var pa_move = placementAppointments.FirstOrDefault(x => x.TypeCommand == "MOVE")?.Count ?? 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue