แก้สถ่นะออกคำสั่ง
This commit is contained in:
parent
e160e1e552
commit
c203f18c88
14 changed files with 60 additions and 39 deletions
|
|
@ -294,7 +294,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
||||||
// continue;
|
// continue;
|
||||||
|
|
||||||
// uppdated.CommandTypeId = commandTypeId;
|
// uppdated.CommandTypeId = commandTypeId;
|
||||||
// uppdated.Status = "REPORT";
|
// uppdated.Status = req.status.Trim().ToUpper();
|
||||||
// uppdated.LastUpdateFullName = FullName ?? "System Administrator";
|
// uppdated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||||
// uppdated.LastUpdateUserId = UserId ?? "";
|
// uppdated.LastUpdateUserId = UserId ?? "";
|
||||||
// uppdated.LastUpdatedAt = DateTime.Now;
|
// uppdated.LastUpdatedAt = DateTime.Now;
|
||||||
|
|
@ -769,7 +769,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
||||||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
data.ForEach(profile => profile.Status = "REPORT");
|
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -898,7 +898,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
||||||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
data.ForEach(profile => profile.Status = "REPORT");
|
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -1029,7 +1029,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
||||||
var data = await _context.DisciplineReport_Profiles
|
var data = await _context.DisciplineReport_Profiles
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
data.ForEach(profile => profile.Status = "REPORT");
|
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -1209,7 +1209,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
||||||
var data = await _context.DisciplineReport_Profiles
|
var data = await _context.DisciplineReport_Profiles
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
data.ForEach(profile => profile.Status = "REPORT");
|
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -1327,7 +1327,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
||||||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
data.ForEach(profile => profile.Status = "REPORT");
|
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -1443,7 +1443,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
||||||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
data.ForEach(profile => profile.Status = "REPORT");
|
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -1559,7 +1559,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
||||||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
data.ForEach(profile => profile.Status = "REPORT");
|
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -1675,7 +1675,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
||||||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
data.ForEach(profile => profile.Status = "REPORT");
|
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -1791,7 +1791,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
||||||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
data.ForEach(profile => profile.Status = "REPORT");
|
data.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -1908,12 +1908,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
data1.ForEach(profile => profile.IsReport = "REPORT");
|
data1.ForEach(profile => profile.IsReport = req.status.Trim().ToUpper());
|
||||||
var data2 = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
var data2 = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
data2.ForEach(profile => profile.IsReport = "REPORT");
|
data2.ForEach(profile => profile.IsReport = req.status.Trim().ToUpper());
|
||||||
|
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@ namespace BMA.EHR.Discipline.Service.Requests
|
||||||
public class ReportPersonRequest
|
public class ReportPersonRequest
|
||||||
{
|
{
|
||||||
public string[] refIds { get; set; }
|
public string[] refIds { get; set; }
|
||||||
|
public string status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -759,7 +759,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile =>
|
placementProfiles.ForEach(profile =>
|
||||||
{
|
{
|
||||||
profile.Status = "REPORT";
|
profile.Status = req.status.Trim().ToUpper();
|
||||||
profile.typeCommand = "APPOINT";
|
profile.typeCommand = "APPOINT";
|
||||||
});
|
});
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
@ -969,7 +969,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile =>
|
placementProfiles.ForEach(profile =>
|
||||||
{
|
{
|
||||||
profile.Status = "REPORT";
|
profile.Status = req.status.Trim().ToUpper();
|
||||||
profile.typeCommand = "MOVE";
|
profile.typeCommand = "MOVE";
|
||||||
});
|
});
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
@ -1180,7 +1180,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile =>
|
placementProfiles.ForEach(profile =>
|
||||||
{
|
{
|
||||||
profile.Status = "REPORT";
|
profile.Status = req.status.Trim().ToUpper();
|
||||||
profile.typeCommand = "SLIP";
|
profile.typeCommand = "SLIP";
|
||||||
});
|
});
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
@ -1380,7 +1380,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile =>
|
placementProfiles.ForEach(profile =>
|
||||||
{
|
{
|
||||||
profile.Status = "REPORT";
|
profile.Status = req.status.Trim().ToUpper();
|
||||||
profile.typeCommand = "MOVE";
|
profile.typeCommand = "MOVE";
|
||||||
});
|
});
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
@ -1588,7 +1588,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile =>
|
placementProfiles.ForEach(profile =>
|
||||||
{
|
{
|
||||||
profile.Status = "REPORT";
|
profile.Status = req.status.Trim().ToUpper();
|
||||||
profile.typeCommand = "SLIP";
|
profile.typeCommand = "SLIP";
|
||||||
});
|
});
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
|
||||||
|
|
@ -1564,7 +1564,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile =>
|
placementProfiles.ForEach(profile =>
|
||||||
{
|
{
|
||||||
profile.PlacementStatus = "REPORT";
|
profile.PlacementStatus = req.status.Trim().ToUpper();
|
||||||
profile.typeCommand = "APPOINT";
|
profile.typeCommand = "APPOINT";
|
||||||
});
|
});
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
@ -1895,7 +1895,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile =>
|
placementProfiles.ForEach(profile =>
|
||||||
{
|
{
|
||||||
profile.PlacementStatus = "REPORT";
|
profile.PlacementStatus = req.status.Trim().ToUpper();
|
||||||
profile.typeCommand = "APPOINT";
|
profile.typeCommand = "APPOINT";
|
||||||
});
|
});
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
@ -2219,10 +2219,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
// .Where(x => x.Placement!.PlacementType!.Name == "แต่งตั้งข้าราชการ")
|
// .Where(x => x.Placement!.PlacementType!.Name == "แต่งตั้งข้าราชการ")
|
||||||
// .Where(x => x.typeCommand.Trim().ToUpper() == "APPOIN")
|
// .Where(x => x.typeCommand.Trim().ToUpper() == "APPOIN")
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.PlacementStatus = "REPORT");
|
placementProfiles.ForEach(profile => profile.PlacementStatus = req.status.Trim().ToUpper());
|
||||||
placementProfiles.ForEach(profile =>
|
placementProfiles.ForEach(profile =>
|
||||||
{
|
{
|
||||||
profile.PlacementStatus = "REPORT";
|
profile.PlacementStatus = req.status.Trim().ToUpper();
|
||||||
profile.typeCommand = "APPOIN";
|
profile.typeCommand = "APPOIN";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -2455,7 +2455,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile =>
|
placementProfiles.ForEach(profile =>
|
||||||
{
|
{
|
||||||
profile.PlacementStatus = "REPORT";
|
profile.PlacementStatus = req.status.Trim().ToUpper();
|
||||||
profile.typeCommand = "MOVE";
|
profile.typeCommand = "MOVE";
|
||||||
});
|
});
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
@ -2681,7 +2681,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
var placementProfiles = await _context.PlacementProfiles
|
var placementProfiles = await _context.PlacementProfiles
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.PlacementStatus = "REPORT");
|
placementProfiles.ForEach(profile => profile.PlacementStatus = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -561,7 +561,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
var placementProfiles = await _context.PlacementOfficers
|
var placementProfiles = await _context.PlacementOfficers
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -885,7 +885,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
var placementProfiles = await _context.PlacementReceives
|
var placementProfiles = await _context.PlacementReceives
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -500,7 +500,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
var placementProfiles = await _context.PlacementRepatriations
|
var placementProfiles = await _context.PlacementRepatriations
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -752,7 +752,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
var placementProfiles = await _context.PlacementTransfers
|
var placementProfiles = await _context.PlacementTransfers
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@ namespace BMA.EHR.Placement.Service.Requests
|
||||||
public class ReportPersonRequest
|
public class ReportPersonRequest
|
||||||
{
|
{
|
||||||
public string[] refIds { get; set; }
|
public string[] refIds { get; set; }
|
||||||
|
public string status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -660,7 +660,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
var placementProfiles = await _context.RetirementOthers
|
var placementProfiles = await _context.RetirementOthers
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -880,7 +880,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
var placementProfiles = await _context.RetirementOthers
|
var placementProfiles = await _context.RetirementOthers
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -513,7 +513,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
var placementProfiles = await _context.RetirementResigns
|
var placementProfiles = await _context.RetirementResigns
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1159,7 +1159,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
if (updated == null)
|
if (updated == null)
|
||||||
return Error(GlobalMessages.RetirementResignNotFound, 404);
|
return Error(GlobalMessages.RetirementResignNotFound, 404);
|
||||||
updated.CancelReason = req.Reason;
|
updated.CancelReason = req.Reason;
|
||||||
if (updated.Status == "DONE")
|
if (updated.Status == "DONE" || updated.Status == "WAITTING")
|
||||||
{
|
{
|
||||||
var retirementResignCancel = new RetirementResignCancel
|
var retirementResignCancel = new RetirementResignCancel
|
||||||
{
|
{
|
||||||
|
|
@ -1246,6 +1246,15 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
}
|
}
|
||||||
updated.IsCancel = true;
|
updated.IsCancel = true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using (var client = new HttpClient())
|
||||||
|
{
|
||||||
|
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||||
|
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||||
|
var _res = await client.DeleteAsync($"{_configuration["API"]}/org/command/tab2Cancel17/{updated.Id}");
|
||||||
|
}
|
||||||
|
}
|
||||||
updated.Status = "CANCEL";
|
updated.Status = "CANCEL";
|
||||||
updated.LastUpdateFullName = FullName ?? "System Administrator";
|
updated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||||
updated.LastUpdateUserId = UserId ?? "";
|
updated.LastUpdateUserId = UserId ?? "";
|
||||||
|
|
@ -2116,7 +2125,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
var placementProfiles = await _context.RetirementResigns
|
var placementProfiles = await _context.RetirementResigns
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -2302,7 +2311,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
var placementProfiles = await _context.RetirementResignCancels
|
var placementProfiles = await _context.RetirementResignCancels
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1152,6 +1152,15 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
}
|
}
|
||||||
updated.IsCancel = true;
|
updated.IsCancel = true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using (var client = new HttpClient())
|
||||||
|
{
|
||||||
|
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||||
|
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||||
|
var _res = await client.DeleteAsync($"{_configuration["API"]}/org/command/tab2Cancel23/{updated.Id}");
|
||||||
|
}
|
||||||
|
}
|
||||||
updated.Status = "CANCEL";
|
updated.Status = "CANCEL";
|
||||||
updated.LastUpdateFullName = FullName ?? "System Administrator";
|
updated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||||
updated.LastUpdateUserId = UserId ?? "";
|
updated.LastUpdateUserId = UserId ?? "";
|
||||||
|
|
@ -1557,7 +1566,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
var placementProfiles = await _context.RetirementResignEmployees
|
var placementProfiles = await _context.RetirementResignEmployees
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
@ -1742,7 +1751,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
var placementProfiles = await _context.RetirementResignEmployeeCancels
|
var placementProfiles = await _context.RetirementResignEmployeeCancels
|
||||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
placementProfiles.ForEach(profile => profile.Status = "REPORT");
|
placementProfiles.ForEach(profile => profile.Status = req.status.Trim().ToUpper());
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@ namespace BMA.EHR.Retirement.Service.Requests
|
||||||
public class ReportPersonRequest
|
public class ReportPersonRequest
|
||||||
{
|
{
|
||||||
public string[] refIds { get; set; }
|
public string[] refIds { get; set; }
|
||||||
|
public string status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue