แจ้งเตือนล่วงหน้าวินัย
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,
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet()]
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineDisciplinary(int page = 1, int pageSize = 25, string keyword = "")
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineDisciplinary(int page = 1, int pageSize = 25, string keyword = "", string status = "")
|
||||
{
|
||||
var data_search = (from x in _context.DisciplineDisciplinarys
|
||||
where x.Title.Contains(keyword) ||
|
||||
|
|
@ -62,6 +62,8 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
x.DisciplinaryFaultLevel.Contains(keyword) ||
|
||||
x.DisciplinaryCaseFault.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
|
||||
{
|
||||
|
|
@ -465,6 +467,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
// Report = p.DisciplineReport_Profiles.Count() > 0 ? true : false,
|
||||
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
|
||||
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
|
||||
DisciplinaryFaultLevelOther = x.DisciplinaryFaultLevelOther,
|
||||
DisciplineDisciplinary_DocRelevants = x.DisciplineDisciplinary_DocRelevants.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
|
||||
DisciplineDisciplinary_DocSummaryEvidences = x.DisciplineDisciplinary_DocSummaryEvidences.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
|
||||
DisciplineDisciplinary_DocRecordAccusers = x.DisciplineDisciplinary_DocRecordAccusers.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
|
||||
|
|
@ -561,6 +564,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
_data.RespondentType,
|
||||
_data.Persons,
|
||||
_data.OrganizationId,
|
||||
_data.DisciplinaryFaultLevelOther,
|
||||
disciplineDisciplinary_DocRelevants,
|
||||
disciplineDisciplinary_DocSummaryEvidences,
|
||||
disciplineDisciplinary_DocRecordAccusers,
|
||||
|
|
@ -613,6 +617,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
data.DisciplinaryStatusResult = req.DisciplinaryStatusResult;
|
||||
data.DisciplinaryCauseText = req.DisciplinaryCauseText;
|
||||
data.DisciplinaryResult = req.DisciplinaryResult;
|
||||
data.DisciplinaryFaultLevelOther = req.DisciplinaryFaultLevelOther;
|
||||
data.Result = req.Result;
|
||||
data.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
data.LastUpdateUserId = UserId ?? "";
|
||||
|
|
|
|||
|
|
@ -53,11 +53,13 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet()]
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineInvestigate(int page = 1, int pageSize = 25, string keyword = "")
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineInvestigate(int page = 1, int pageSize = 25, string keyword = "", string status = "")
|
||||
{
|
||||
var data_search = (from x in _context.DisciplineInvestigates
|
||||
where x.Title.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
|
||||
{
|
||||
|
|
@ -289,6 +291,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
PosNo = p.PosNo,
|
||||
Organization = p.Organization,
|
||||
IsSend = p.IsReport,
|
||||
IsDisciplinary = p.IsDisciplinary,
|
||||
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
|
||||
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
|
||||
DisciplineInvestigateDocs = x.DisciplineInvestigate_Docs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
|
||||
|
|
@ -451,6 +454,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
Salary = item.salary,
|
||||
PersonId = item.personId,
|
||||
PosNo = item.posNo,
|
||||
IsDisciplinary = isReport == null ? false : isReport.IsDisciplinary,
|
||||
IsReport = isReport == null ? "NEW" : isReport.IsReport,
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
|
|
@ -529,9 +533,9 @@ namespace BMA.EHR.DisciplineInvestigate.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,
|
||||
|
|
@ -584,6 +588,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
LastUpdateUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
});
|
||||
item.IsDisciplinary = true;
|
||||
}
|
||||
foreach (var item in data.DisciplineInvestigate_DocComplaints)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet()]
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineResult(int page = 1, int pageSize = 25, string keyword = "")
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineResult(int page = 1, int pageSize = 25, string keyword = "", string status = "")
|
||||
{
|
||||
var data_search = (from x in _context.DisciplineDisciplinarys
|
||||
where x.Title.Contains(keyword)
|
||||
|
|
@ -62,6 +62,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
// x.DisciplinaryFaultLevel == null ? false : x.DisciplinaryFaultLevel.Contains(keyword) ||
|
||||
// x.DisciplinaryCaseFault == null ? false : x.DisciplinaryCaseFault.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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue