แจ้งเตือนร้องทุกข์
This commit is contained in:
parent
a0b7be76ae
commit
b8c5f88142
11 changed files with 3533 additions and 458 deletions
|
|
@ -25,15 +25,18 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
private readonly DisciplineDbContext _context;
|
||||
private readonly MinIODisciplineService _documentService;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
private readonly NotificationRepository _repositoryNoti;
|
||||
|
||||
public DisciplineComplaintController(DisciplineDbContext context,
|
||||
MinIODisciplineService documentService,
|
||||
NotificationRepository repositoryNoti,
|
||||
IHttpContextAccessor httpContextAccessor)
|
||||
{
|
||||
// _repository = repository;
|
||||
_context = context;
|
||||
_documentService = documentService;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
_repositoryNoti = repositoryNoti;
|
||||
}
|
||||
|
||||
#region " Properties "
|
||||
|
|
@ -223,7 +226,14 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
LastUpdatedAt = DateTime.Now,
|
||||
});
|
||||
}
|
||||
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
Guid.Parse("08dbca3a-8b6a-4a4e-8b23-1f62e4f30ef6"),
|
||||
$"มีคำขอร้องเรียนเรื่อง {req.title}",
|
||||
$"มีคำขอร้องเรียนเรื่อง {req.title}",
|
||||
"",
|
||||
true,
|
||||
true
|
||||
);
|
||||
await _context.DisciplineComplaints.AddAsync(disciplineComplaint);
|
||||
await _context.SaveChangesAsync();
|
||||
return Success(disciplineComplaint.Id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue