บันทึกไฟล์หนังสือเวียน

This commit is contained in:
Kittapath 2023-09-14 00:10:03 +07:00
parent 60dc1025a9
commit 4d420a8443
7 changed files with 16373 additions and 5 deletions

View file

@ -538,12 +538,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
.ToListAsync();
var retirementDeceased = await _context.RetirementDeceaseds.AsQueryable()
.Include(x => x.Document)
.Include(x => x.DocumentForward)
.Where(x => x.Id == id)
.FirstOrDefaultAsync();
if (retirementDeceased == null)
return Error(GlobalMessages.RetirementDeceasedNotFound, 404);
if (retirementDeceased.Document == null)
if (retirementDeceased.DocumentForward == null)
return Error(GlobalMessages.NoFileToUpload, 404);
// create command payload
@ -551,7 +551,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
payload_attach.Add(new PayloadAttachment
{
name = "หนังสือเวียนถึงแก่กรรม",
url = $"{_configuration["API"]}/order/download/attachment/{retirementDeceased.Document.Id}"
url = $"{_configuration["API"]}/order/download/attachment/{retirementDeceased.DocumentForward.Id}"
});
var payload = new CommandPayload()