แจ้งเตือนล่วงหน้าวินัย
This commit is contained in:
parent
46599d1bc5
commit
b371717f89
16 changed files with 3710 additions and 63 deletions
|
|
@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
||||
|
|
@ -56,12 +57,14 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet()]
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineComplaint(int page = 1, int pageSize = 25, string keyword = "")
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineComplaint(int page = 1, int pageSize = 25, string keyword = "", string status = "")
|
||||
{
|
||||
var data_search = (from x in _context.DisciplineComplaints
|
||||
where x.Title.Contains(keyword) ||
|
||||
x.Appellant.Contains(keyword)
|
||||
select x).ToList();
|
||||
if (status.Trim().ToUpper() != "ALL")
|
||||
data_search = data_search.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList();
|
||||
var data = data_search
|
||||
.Select(x => new
|
||||
{
|
||||
|
|
@ -188,9 +191,9 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
Title = req.title,
|
||||
Description = req.description,
|
||||
DateReceived = req.dateReceived,
|
||||
LevelConsideration = req.levelConsideration.Trim().ToUpper(),
|
||||
LevelConsideration = req.levelConsideration == null ? null : req.levelConsideration.Trim().ToUpper(),
|
||||
DateConsideration = req.dateConsideration,
|
||||
OffenseDetails = req.offenseDetails.Trim().ToUpper(),
|
||||
OffenseDetails = req.offenseDetails == null ? null : req.offenseDetails.Trim().ToUpper(),
|
||||
DateNotification = req.dateNotification,
|
||||
ComplaintFrom = req.complaintFrom,
|
||||
Appellant = req.appellant,
|
||||
|
|
@ -262,9 +265,9 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
data.Title = req.title;
|
||||
data.Description = req.description;
|
||||
data.DateReceived = req.dateReceived;
|
||||
data.LevelConsideration = req.levelConsideration.Trim().ToUpper();
|
||||
data.LevelConsideration = req.levelConsideration == null ? null : req.levelConsideration.Trim().ToUpper();
|
||||
data.DateConsideration = req.dateConsideration;
|
||||
data.OffenseDetails = req.offenseDetails.Trim().ToUpper();
|
||||
data.OffenseDetails = req.offenseDetails == null ? null : req.offenseDetails.Trim().ToUpper();
|
||||
data.DateNotification = req.dateNotification;
|
||||
data.ComplaintFrom = req.complaintFrom;
|
||||
data.Appellant = req.appellant;
|
||||
|
|
@ -385,9 +388,9 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
Title = data.Title,
|
||||
Description = data.Description,
|
||||
DateReceived = data.DateReceived,
|
||||
LevelConsideration = data.LevelConsideration.Trim().ToUpper(),
|
||||
LevelConsideration = data.LevelConsideration == null ? null : data.LevelConsideration.Trim().ToUpper(),
|
||||
DateConsideration = data.DateConsideration,
|
||||
OffenseDetails = data.OffenseDetails.Trim().ToUpper(),
|
||||
OffenseDetails = data.OffenseDetails == null ? null : data.OffenseDetails.Trim().ToUpper(),
|
||||
DateNotification = data.DateNotification,
|
||||
ComplaintFrom = data.ComplaintFrom,
|
||||
Appellant = data.Appellant,
|
||||
|
|
@ -419,6 +422,7 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
PosNo = item.PosNo,
|
||||
Position = item.Position,
|
||||
PositionLevel = item.PositionLevel,
|
||||
IsDisciplinary = false,
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue