แก้ api ลา

This commit is contained in:
kittapath 2024-11-18 18:43:46 +07:00
parent d08b4ca723
commit 4822110533
20 changed files with 20695 additions and 2783 deletions

View file

@ -92,7 +92,6 @@ namespace BMA.EHR.Insignia.Service.Controllers
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
}
var insigniaPeriods = await _context.InsigniaPeriods.AsQueryable()
// .Where(x => x.Type == type)
.OrderByDescending(x => x.Year)
.ThenByDescending(x => x.StartDate)
.Select(p => new
@ -234,7 +233,6 @@ namespace BMA.EHR.Insignia.Service.Controllers
LastUpdateFullName = FullName ?? "System Administrator",
LastUpdateUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,
RevisionId = revisionId ?? Guid.Empty
};
await _context.InsigniaPeriods.AddAsync(period);
@ -248,7 +246,6 @@ namespace BMA.EHR.Insignia.Service.Controllers
period.ReliefDoc = doc;
}
// await _context.InsigniaPeriods.AddAsync(period);
await _context.SaveChangesAsync();
return Success();