Merge branch 'develop' into working
This commit is contained in:
commit
1a4d03cdd9
21 changed files with 45441 additions and 29 deletions
|
|
@ -382,7 +382,9 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
ComplaintFrom = data.ComplaintFrom,
|
||||
Appellant = data.Appellant,
|
||||
ResultComplaint = data.Result,
|
||||
|
||||
InvestigationStatusResult = "NOT_SPECIFIED",
|
||||
InvestigationExtendStatus = false,
|
||||
Status = "NEW",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
Salary = item.salary,
|
||||
PersonId = item.personId,
|
||||
PosNo = item.posNo,
|
||||
Status = "NEW",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
@ -249,12 +250,14 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
InvestigationDescription = x.InvestigationDescription,
|
||||
InvestigationStatusResult = x.InvestigationStatusResult,
|
||||
InvestigationCauseText = x.InvestigationCauseText,
|
||||
InvestigationExtendStatus = x.InvestigationExtendStatus,
|
||||
InvestigationDaysExtend = x.InvestigationDaysExtend,
|
||||
Status = x.Status,//สถานะเรื่องสืบสวน
|
||||
Result = x.Result,//ผลการตรวจสอบ
|
||||
Director = x.DisciplineDisciplinary_DirectorInvestigates.Select(d => new
|
||||
{
|
||||
Id = d.Id,
|
||||
DirectorId = d.DisciplineDirector.Id,
|
||||
DirectorId = d.Id,
|
||||
Id = d.DisciplineDirector.Id,
|
||||
Prefix = d.DisciplineDirector.Prefix,
|
||||
FirstName = d.DisciplineDirector.FirstName,
|
||||
LastName = d.DisciplineDirector.LastName,
|
||||
|
|
@ -307,6 +310,8 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
_data.InvestigationDescription,
|
||||
_data.InvestigationStatusResult,
|
||||
_data.InvestigationCauseText,
|
||||
_data.InvestigationExtendStatus,
|
||||
_data.InvestigationDaysExtend,
|
||||
_data.Status,
|
||||
_data.Result,
|
||||
_data.Director,
|
||||
|
|
@ -344,6 +349,8 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
data.InvestigationDescription = req.investigationDescription;
|
||||
data.InvestigationStatusResult = req.investigationStatusResult.Trim().ToUpper();
|
||||
data.InvestigationCauseText = req.investigationCauseText.Trim().ToUpper();
|
||||
data.InvestigationExtendStatus = req.investigationExtendStatus;
|
||||
data.InvestigationDaysExtend = req.investigationDaysExtend;
|
||||
data.Result = req.result;
|
||||
data.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
data.LastUpdateUserId = UserId ?? "";
|
||||
|
|
@ -403,6 +410,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
DisciplinaryDateStart = x.DisciplinaryDateStart,
|
||||
DisciplinaryDateEnd = x.DisciplinaryDateEnd,
|
||||
DaysExtend = x.DisciplinaryDaysExtend,
|
||||
ExtendStatus = x.DisciplinaryExtendStatus,
|
||||
DisciplinaryDateInvestigation = x.DisciplinaryDateInvestigation,
|
||||
DisciplinaryDateResult = x.DisciplinaryDateResult,
|
||||
DisciplinaryStatusResult = x.DisciplinaryStatusResult,
|
||||
|
|
@ -438,6 +446,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
PersonId = p.PersonId,
|
||||
PosNo = p.PosNo,
|
||||
Organization = p.Organization,
|
||||
Report = p.DisciplineReport_Profiles.Count() > 0 ? true : false,
|
||||
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
|
||||
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
|
||||
DisciplineDisciplinary_DocRelevants = x.DisciplineDisciplinary_DocRelevants.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
|
||||
|
|
@ -523,6 +532,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
_data.DisciplinaryDateStart,
|
||||
_data.DisciplinaryDateEnd,
|
||||
_data.DaysExtend,
|
||||
_data.ExtendStatus,
|
||||
_data.DisciplinaryDateInvestigation,
|
||||
_data.DisciplinaryDateResult,
|
||||
_data.DisciplinaryStatusResult,
|
||||
|
|
@ -577,6 +587,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
data.DisciplinaryDateStart = req.DisciplinaryDateStart;
|
||||
data.DisciplinaryDateEnd = req.DisciplinaryDateEnd;
|
||||
data.DisciplinaryDaysExtend = req.DaysExtend;
|
||||
data.DisciplinaryExtendStatus = req.ExtendStatus;
|
||||
data.DisciplinaryDateInvestigation = req.DisciplinaryDateInvestigation;
|
||||
data.DisciplinaryDateResult = req.DisciplinaryDateResult;
|
||||
data.DisciplinaryStatusResult = req.DisciplinaryStatusResult;
|
||||
|
|
@ -627,6 +638,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
Salary = item.salary,
|
||||
PersonId = item.personId,
|
||||
PosNo = item.posNo,
|
||||
Status = "NEW",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
@ -659,7 +671,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
return Error(new Exception(GlobalMessages.DataNotFound), (int)StatusCodes.Status404NotFound);
|
||||
if (data.Status.Trim().ToUpper() != "NEW")
|
||||
return Error(new Exception("ไม่สามารถยุติเรื่องได้"), (int)StatusCodes.Status500InternalServerError);
|
||||
if (data.InvestigationStatusResult == null || data.InvestigationStatusResult.Trim().ToUpper() != "NO_CAUSE")
|
||||
if (data.DisciplinaryStatusResult == null || data.DisciplinaryStatusResult.Trim().ToUpper() != "NO_CAUSE")
|
||||
return Error(new Exception("ไม่สามารถยุติเรื่องได้"), (int)StatusCodes.Status500InternalServerError);
|
||||
data.Status = "STOP";
|
||||
|
||||
|
|
@ -1413,8 +1425,8 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
public async Task<ActionResult<ResponseObject>> PostToSuspend([FromBody] DisciplinePersonIdRequest req, Guid id)
|
||||
{
|
||||
var data = await _context.DisciplineDisciplinarys
|
||||
.Include(x => x.DisciplineReport_Profiles)
|
||||
.Include(x => x.DisciplineDisciplinary_ProfileComplaintInvestigates)
|
||||
.ThenInclude(x => x.DisciplineReport_Profiles)
|
||||
.Where(x => x.Id == id)
|
||||
.FirstOrDefaultAsync();
|
||||
if (data == null)
|
||||
|
|
@ -1423,7 +1435,12 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
var persons = data.DisciplineDisciplinary_ProfileComplaintInvestigates.Where(x => req.persons.Contains(x.Id)).ToList();
|
||||
foreach (var item in persons)
|
||||
{
|
||||
data.DisciplineReport_Profiles.Add(
|
||||
var personIdDupicate = data.DisciplineDisciplinary_ProfileComplaintInvestigates.Where(x => x.PersonId == item.PersonId).FirstOrDefault();
|
||||
if (personIdDupicate == null)
|
||||
continue;
|
||||
if (personIdDupicate.DisciplineReport_Profiles.Count() > 0)
|
||||
continue;
|
||||
personIdDupicate.DisciplineReport_Profiles.Add(
|
||||
new DisciplineReport_Profile
|
||||
{
|
||||
PersonId = item.PersonId,
|
||||
|
|
|
|||
|
|
@ -244,12 +244,14 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
InvestigationDescription = x.InvestigationDescription,
|
||||
InvestigationStatusResult = x.InvestigationStatusResult,
|
||||
InvestigationCauseText = x.InvestigationCauseText,
|
||||
InvestigationExtendStatus = x.InvestigationExtendStatus,
|
||||
InvestigationDaysExtend = x.InvestigationDaysExtend,
|
||||
Status = x.Status,//สถานะเรื่องสืบสวน
|
||||
Result = x.Result,//ผลการตรวจสอบ
|
||||
Director = x.DisciplineInvestigate_Directors.Select(d => new
|
||||
{
|
||||
Id = d.Id,
|
||||
DirectorId = d.DisciplineDirector.Id,
|
||||
DirectorId = d.Id,
|
||||
Id = d.DisciplineDirector.Id,
|
||||
Prefix = d.DisciplineDirector.Prefix,
|
||||
FirstName = d.DisciplineDirector.FirstName,
|
||||
LastName = d.DisciplineDirector.LastName,
|
||||
|
|
@ -318,6 +320,8 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
_data.InvestigationDescription,
|
||||
_data.InvestigationStatusResult,
|
||||
_data.InvestigationCauseText,
|
||||
_data.InvestigationExtendStatus,
|
||||
_data.InvestigationDaysExtend,
|
||||
_data.Status,
|
||||
_data.Result,
|
||||
_data.Director,
|
||||
|
|
@ -342,6 +346,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
public async Task<ActionResult<ResponseObject>> UpdateDisciplineInvestigate([FromBody] DisciplineInvestigateRequest req, Guid id)
|
||||
{
|
||||
var data = await _context.DisciplineInvestigates
|
||||
.Include(x => x.DisciplineInvestigate_ProfileComplaints)
|
||||
.Include(x => x.DisciplineInvestigate_Directors)
|
||||
.ThenInclude(x => x.DisciplineDirector)
|
||||
.Where(x => x.Id == id)
|
||||
|
|
@ -358,6 +363,8 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
data.InvestigationDescription = req.investigationDescription;
|
||||
data.InvestigationStatusResult = req.investigationStatusResult.Trim().ToUpper();
|
||||
data.InvestigationCauseText = req.investigationCauseText;
|
||||
data.InvestigationExtendStatus = req.investigationExtendStatus;
|
||||
data.InvestigationDaysExtend = req.investigationDaysExtend;
|
||||
data.Result = req.result;
|
||||
data.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
data.LastUpdateUserId = UserId ?? "";
|
||||
|
|
@ -496,7 +503,10 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
InvestigationDescription = data.InvestigationDescription,
|
||||
InvestigationStatusResult = data.InvestigationStatusResult,
|
||||
InvestigationCauseText = data.InvestigationCauseText,
|
||||
InvestigationExtendStatus = data.InvestigationExtendStatus,
|
||||
InvestigationDaysExtend = data.InvestigationDaysExtend,
|
||||
|
||||
DisciplinaryExtendStatus = false,
|
||||
Status = "NEW",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
|
|
@ -521,6 +531,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
PosNo = item.PosNo,
|
||||
Position = item.Position,
|
||||
PositionLevel = item.PositionLevel,
|
||||
Status = "NEW",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
|
|||
|
|
@ -56,10 +56,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
public async Task<ActionResult<ResponseObject>> GetDisciplineResult(int page = 1, int pageSize = 25, string keyword = "")
|
||||
{
|
||||
var data_search = (from x in _context.DisciplineDisciplinarys
|
||||
where x.Title.Contains(keyword) ||
|
||||
x.DisciplinaryFaultLevel == null ? false : x.DisciplinaryFaultLevel.Contains(keyword) ||
|
||||
x.DisciplinaryCaseFault == null ? false : x.DisciplinaryCaseFault.Contains(keyword) ||
|
||||
x.Status == "DONE"
|
||||
where x.Title.Contains(keyword)
|
||||
// x.DisciplinaryFaultLevel == null ? false : x.DisciplinaryFaultLevel.Contains(keyword) ||
|
||||
// x.DisciplinaryCaseFault == null ? false : x.DisciplinaryCaseFault.Contains(keyword) ||
|
||||
select x).ToList();
|
||||
var data = data_search
|
||||
.Select(x => new
|
||||
|
|
@ -73,6 +72,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
Status = x.Status,//สถานะหรือผลการสอบสวน
|
||||
CreatedAt = x.CreatedAt,//วันที่สร้างเรื่องสอบสวน
|
||||
})
|
||||
.Where(x => x.Status == "DONE" || x.Status == "REPORT")
|
||||
.OrderByDescending(x => x.CreatedAt)
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
|
|
@ -112,9 +112,11 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
PersonId = p.PersonId,
|
||||
PosNo = p.PosNo,
|
||||
Organization = p.Organization,
|
||||
Status = p.Status,
|
||||
}),//รายการข้อมูลบุคลผู้ถูกสืบสวน
|
||||
OrganizationId = x.Organization,//id หน่วยงานกรณี type เป็นหน่วยงาน
|
||||
ResultDescription = x.ResultDescription,//สรุปผลการพิจารณา
|
||||
Status = x.Status,//สถานะหรือผลการสอบสวน
|
||||
})
|
||||
.Where(x => x.Id == id)
|
||||
.FirstOrDefaultAsync();
|
||||
|
|
|
|||
|
|
@ -55,7 +55,9 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
[HttpGet()]
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineSuspend(int page = 1, int pageSize = 25, string keyword = "")
|
||||
{
|
||||
var data_search = (from x in _context.DisciplineReport_Profiles.Include(x => x.DisciplineDisciplinary)
|
||||
var data_search = (from x in _context.DisciplineReport_Profiles
|
||||
.Include(x => x.DisciplineDisciplinary_ProfileComplaintInvestigate)
|
||||
.ThenInclude(x => x.DisciplineDisciplinary)
|
||||
where x.CitizenId.Contains(keyword) ||
|
||||
x.Prefix.Contains(keyword) ||
|
||||
x.FirstName.Contains(keyword) ||
|
||||
|
|
@ -64,7 +66,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
x.Position.Contains(keyword) ||
|
||||
x.PosNo.Contains(keyword) ||
|
||||
x.PositionLevel.Contains(keyword) ||
|
||||
x.DisciplineDisciplinary.Title.Contains(keyword)
|
||||
x.DisciplineDisciplinary_ProfileComplaintInvestigate.DisciplineDisciplinary.Title.Contains(keyword)
|
||||
select x).ToList();
|
||||
var data = data_search
|
||||
.Select(x => new
|
||||
|
|
@ -83,10 +85,10 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
DescriptionSuspend = x.DescriptionSuspend,
|
||||
StartDateSuspend = x.StartDateSuspend,
|
||||
EndDateSuspend = x.EndDateSuspend,
|
||||
Title = x.DisciplineDisciplinary.Title,
|
||||
OffenseDetails = x.DisciplineDisciplinary.OffenseDetails,//ลักษณะความผิด
|
||||
DisciplinaryFaultLevel = x.DisciplineDisciplinary.DisciplinaryFaultLevel,//ระดับโทษความผิด
|
||||
DisciplinaryCaseFault = x.DisciplineDisciplinary.DisciplinaryCaseFault,//กรณีความผิด
|
||||
Title = x.DisciplineDisciplinary_ProfileComplaintInvestigate.DisciplineDisciplinary.Title,
|
||||
OffenseDetails = x.DisciplineDisciplinary_ProfileComplaintInvestigate.DisciplineDisciplinary.OffenseDetails,//ลักษณะความผิด
|
||||
DisciplinaryFaultLevel = x.DisciplineDisciplinary_ProfileComplaintInvestigate.DisciplineDisciplinary.DisciplinaryFaultLevel,//ระดับโทษความผิด
|
||||
DisciplinaryCaseFault = x.DisciplineDisciplinary_ProfileComplaintInvestigate.DisciplineDisciplinary.DisciplinaryCaseFault,//กรณีความผิด
|
||||
})
|
||||
.OrderByDescending(x => x.CitizenId)
|
||||
.Skip((page - 1) * pageSize)
|
||||
|
|
@ -123,10 +125,10 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
DescriptionSuspend = x.DescriptionSuspend,
|
||||
StartDateSuspend = x.StartDateSuspend,
|
||||
EndDateSuspend = x.EndDateSuspend,
|
||||
Title = x.DisciplineDisciplinary.Title,
|
||||
OffenseDetails = x.DisciplineDisciplinary.OffenseDetails,//ลักษณะความผิด
|
||||
DisciplinaryFaultLevel = x.DisciplineDisciplinary.DisciplinaryFaultLevel,//ระดับโทษความผิด
|
||||
DisciplinaryCaseFault = x.DisciplineDisciplinary.DisciplinaryCaseFault,//กรณีความผิด
|
||||
Title = x.DisciplineDisciplinary_ProfileComplaintInvestigate.DisciplineDisciplinary.Title,
|
||||
OffenseDetails = x.DisciplineDisciplinary_ProfileComplaintInvestigate.DisciplineDisciplinary.OffenseDetails,//ลักษณะความผิด
|
||||
DisciplinaryFaultLevel = x.DisciplineDisciplinary_ProfileComplaintInvestigate.DisciplineDisciplinary.DisciplinaryFaultLevel,//ระดับโทษความผิด
|
||||
DisciplinaryCaseFault = x.DisciplineDisciplinary_ProfileComplaintInvestigate.DisciplineDisciplinary.DisciplinaryCaseFault,//กรณีความผิด
|
||||
})
|
||||
.Where(x => x.Id == id)
|
||||
.FirstOrDefaultAsync();
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ namespace BMA.EHR.Discipline.Service.Requests
|
|||
public string investigationDescription { get; set; }
|
||||
public string investigationStatusResult { get; set; }
|
||||
public string? investigationCauseText { get; set; }
|
||||
public bool investigationExtendStatus { get; set; } = false;
|
||||
public int? investigationDaysExtend { get; set; }
|
||||
public string? result { get; set; }
|
||||
public Guid[] directors { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ namespace BMA.EHR.Discipline.Service.Requests
|
|||
public DateTime DisciplinaryDateStart { get; set; }
|
||||
public DateTime DisciplinaryDateEnd { get; set; }
|
||||
public int? DaysExtend { get; set; }
|
||||
public bool ExtendStatus { get; set; } = false;
|
||||
public DateTime? DisciplinaryDateInvestigation { get; set; }
|
||||
public DateTime DisciplinaryDateResult { get; set; }
|
||||
public string? DisciplinaryStatusResult { get; set; }
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ namespace BMA.EHR.Discipline.Service.Requests
|
|||
public string investigationDescription { get; set; }
|
||||
public string investigationStatusResult { get; set; }
|
||||
public string? investigationCauseText { get; set; }
|
||||
public bool investigationExtendStatus { get; set; } = false;
|
||||
public int? investigationDaysExtend { get; set; }
|
||||
public string? result { get; set; }
|
||||
public Guid[] directors { get; set; }
|
||||
public DisciplineInvestigateComplaintProfileRequest[] persons { get; set; }// กรณีบุคคลใส่ id คน มาใน array แต่ถ้าเป็น type อื่นจะ null
|
||||
|
|
|
|||
|
|
@ -78,6 +78,12 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
[Comment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'")]
|
||||
public string? InvestigationCauseText { get; set; }
|
||||
|
||||
[Comment("ขยายเวลา")]
|
||||
public bool InvestigationExtendStatus { get; set; } = false;
|
||||
|
||||
[Comment("จำนวนวันที่ต้องการขยาย")]
|
||||
public int? InvestigationDaysExtend { get; set; }
|
||||
|
||||
|
||||
[Comment("พยานและบันทึกถ้อยคำพยาน")]
|
||||
public string? DisciplinaryWitnesses { get; set; }
|
||||
|
|
@ -103,6 +109,8 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
public DateTime? DisciplinaryDateEnd { get; set; }
|
||||
[Comment("จำนวนวันที่ขยาย")]
|
||||
public int? DisciplinaryDaysExtend { get; set; }
|
||||
[Comment("ขยายเวลา")]
|
||||
public bool DisciplinaryExtendStatus { get; set; } = false;
|
||||
[Comment("วันที่มีคำสั่งให้สอบสวน")]
|
||||
public DateTime? DisciplinaryDateInvestigation { get; set; }
|
||||
[Comment("วันที่รายงานผลการสอบสวน")]
|
||||
|
|
@ -131,6 +139,5 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
public virtual List<DisciplineDisciplinary_DocWitnesses> DisciplineDisciplinary_DocWitnessess { get; set; } = new List<DisciplineDisciplinary_DocWitnesses>();
|
||||
public virtual List<DisciplineDisciplinary_DocOther> DisciplineDisciplinary_DocOthers { get; set; } = new List<DisciplineDisciplinary_DocOther>();
|
||||
public virtual List<DisciplineDisciplinary_DocRelevant> DisciplineDisciplinary_DocRelevants { get; set; } = new List<DisciplineDisciplinary_DocRelevant>();
|
||||
public virtual List<DisciplineReport_Profile> DisciplineReport_Profiles { get; set; } = new List<DisciplineReport_Profile>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,5 +35,6 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
public Guid? CommandTypeId { get; set; }
|
||||
[Required, Comment("Id เรื่องสอบสวน")]
|
||||
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
|
||||
public virtual List<DisciplineReport_Profile> DisciplineReport_Profiles { get; set; } = new List<DisciplineReport_Profile>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
|
||||
[Comment("กรณีมีมูลต้องเลือกว่า 'ร้ายแรง' หรือ 'ไม่ร้ายแรง'")]
|
||||
public string? InvestigationCauseText { get; set; }
|
||||
|
||||
[Comment("ขยายเวลา")]
|
||||
public bool InvestigationExtendStatus { get; set; } = false;
|
||||
|
||||
[Comment("จำนวนวันที่ต้องการขยาย")]
|
||||
public int? InvestigationDaysExtend { get; set; }
|
||||
public DisciplineComplaint DisciplineComplaint { get; set; }
|
||||
public virtual List<DisciplineInvestigate_ProfileComplaint> DisciplineInvestigate_ProfileComplaints { get; set; } = new List<DisciplineInvestigate_ProfileComplaint>();
|
||||
public virtual List<DisciplineInvestigate_DocComplaint> DisciplineInvestigate_DocComplaints { get; set; } = new List<DisciplineInvestigate_DocComplaint>();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace BMA.EHR.Domain.Models.Discipline
|
|||
public DateTime? StartDateSuspend { get; set; }
|
||||
[Comment("วันสิ้นสุดการสั่งพักราชการ/ให้ออกจากราชการไว้ก่อน")]
|
||||
public DateTime? EndDateSuspend { get; set; }
|
||||
[Required, Comment("Id เรื่องสอบสวน")]
|
||||
public DisciplineDisciplinary DisciplineDisciplinary { get; set; }
|
||||
[Required, Comment("Id ผู้ถูกร้องเรียน")]
|
||||
public DisciplineDisciplinary_ProfileComplaintInvestigate DisciplineDisciplinary_ProfileComplaintInvestigate { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,62 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableDisciplineDisciplinarysaddInvestigationDaysExtend : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "InvestigationDaysExtend",
|
||||
table: "DisciplineInvestigates",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "จำนวนวันที่ต้องการขยาย");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "InvestigationExtendStatus",
|
||||
table: "DisciplineInvestigates",
|
||||
type: "tinyint(1)",
|
||||
nullable: true,
|
||||
comment: "ขยายเวลา");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "InvestigationDaysExtend",
|
||||
table: "DisciplineDisciplinarys",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "จำนวนวันที่ต้องการขยาย");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "InvestigationExtendStatus",
|
||||
table: "DisciplineDisciplinarys",
|
||||
type: "tinyint(1)",
|
||||
nullable: true,
|
||||
comment: "ขยายเวลา");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InvestigationDaysExtend",
|
||||
table: "DisciplineInvestigates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InvestigationExtendStatus",
|
||||
table: "DisciplineInvestigates");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InvestigationDaysExtend",
|
||||
table: "DisciplineDisciplinarys");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InvestigationExtendStatus",
|
||||
table: "DisciplineDisciplinarys");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,29 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableDisciplineDisciplinarysaddDisciplineDaysExtend : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "DisciplinaryExtendStatus",
|
||||
table: "DisciplineDisciplinarys",
|
||||
type: "tinyint(1)",
|
||||
nullable: true,
|
||||
comment: "ขยายเวลา");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DisciplinaryExtendStatus",
|
||||
table: "DisciplineDisciplinarys");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,84 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableDisciplineDisciplinarysDisciplinaryDaysExtendnotnull : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "InvestigationExtendStatus",
|
||||
table: "DisciplineInvestigates",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false,
|
||||
comment: "ขยายเวลา",
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "tinyint(1)",
|
||||
oldNullable: true,
|
||||
oldComment: "ขยายเวลา");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "InvestigationExtendStatus",
|
||||
table: "DisciplineDisciplinarys",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false,
|
||||
comment: "ขยายเวลา",
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "tinyint(1)",
|
||||
oldNullable: true,
|
||||
oldComment: "ขยายเวลา");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "DisciplinaryExtendStatus",
|
||||
table: "DisciplineDisciplinarys",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false,
|
||||
comment: "ขยายเวลา",
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "tinyint(1)",
|
||||
oldNullable: true,
|
||||
oldComment: "ขยายเวลา");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "InvestigationExtendStatus",
|
||||
table: "DisciplineInvestigates",
|
||||
type: "tinyint(1)",
|
||||
nullable: true,
|
||||
comment: "ขยายเวลา",
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "tinyint(1)",
|
||||
oldComment: "ขยายเวลา");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "InvestigationExtendStatus",
|
||||
table: "DisciplineDisciplinarys",
|
||||
type: "tinyint(1)",
|
||||
nullable: true,
|
||||
comment: "ขยายเวลา",
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "tinyint(1)",
|
||||
oldComment: "ขยายเวลา");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "DisciplinaryExtendStatus",
|
||||
table: "DisciplineDisciplinarys",
|
||||
type: "tinyint(1)",
|
||||
nullable: true,
|
||||
comment: "ขยายเวลา",
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "tinyint(1)",
|
||||
oldComment: "ขยายเวลา");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,62 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableDisciplineDisciplinarysaddDisciplineDisciplinary_ProfileComplaintInvestigates : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_DisciplineReport_Profiles_DisciplineDisciplinarys_Discipline~",
|
||||
table: "DisciplineReport_Profiles");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DisciplineDisciplinaryId",
|
||||
table: "DisciplineReport_Profiles",
|
||||
newName: "DisciplineDisciplinary_ProfileComplaintInvestigateId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_DisciplineReport_Profiles_DisciplineDisciplinaryId",
|
||||
table: "DisciplineReport_Profiles",
|
||||
newName: "IX_DisciplineReport_Profiles_DisciplineDisciplinary_ProfileComp~");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DisciplineReport_Profiles_DisciplineDisciplinary_ProfileComp~",
|
||||
table: "DisciplineReport_Profiles",
|
||||
column: "DisciplineDisciplinary_ProfileComplaintInvestigateId",
|
||||
principalTable: "DisciplineDisciplinary_ProfileComplaintInvestigates",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_DisciplineReport_Profiles_DisciplineDisciplinary_ProfileComp~",
|
||||
table: "DisciplineReport_Profiles");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DisciplineDisciplinary_ProfileComplaintInvestigateId",
|
||||
table: "DisciplineReport_Profiles",
|
||||
newName: "DisciplineDisciplinaryId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_DisciplineReport_Profiles_DisciplineDisciplinary_ProfileComp~",
|
||||
table: "DisciplineReport_Profiles",
|
||||
newName: "IX_DisciplineReport_Profiles_DisciplineDisciplinaryId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DisciplineReport_Profiles_DisciplineDisciplinarys_Discipline~",
|
||||
table: "DisciplineReport_Profiles",
|
||||
column: "DisciplineDisciplinaryId",
|
||||
principalTable: "DisciplineDisciplinarys",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -533,6 +533,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
.HasColumnType("int")
|
||||
.HasComment("จำนวนวันที่ขยาย");
|
||||
|
||||
b.Property<bool>("DisciplinaryExtendStatus")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ขยายเวลา");
|
||||
|
||||
b.Property<string>("DisciplinaryFaultLevel")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก");
|
||||
|
|
@ -580,6 +584,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่เริ่มการสืบสวน");
|
||||
|
||||
b.Property<int?>("InvestigationDaysExtend")
|
||||
.HasColumnType("int")
|
||||
.HasComment("จำนวนวันที่ต้องการขยาย");
|
||||
|
||||
b.Property<string>("InvestigationDescription")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("รายละเอียดเกี่ยวกับการสืบสวน");
|
||||
|
|
@ -592,6 +600,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ");
|
||||
|
||||
b.Property<bool>("InvestigationExtendStatus")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ขยายเวลา");
|
||||
|
||||
b.Property<string>("InvestigationStatusResult")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สถานะหรือผลการสืบสวน (NOT_SPECIFIED คือ ยังไม่ระบุ, HAVE_CAUSE คือ มีมูล, NO_CAUSE คือ ไม่มีมูล");
|
||||
|
|
@ -1409,6 +1421,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่เริ่มการสืบสวน");
|
||||
|
||||
b.Property<int?>("InvestigationDaysExtend")
|
||||
.HasColumnType("int")
|
||||
.HasComment("จำนวนวันที่ต้องการขยาย");
|
||||
|
||||
b.Property<string>("InvestigationDescription")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("รายละเอียดเกี่ยวกับการสืบสวน");
|
||||
|
|
@ -1421,6 +1437,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("ลักษณะการสืบสวนกรณีเลือกอื่นๆ");
|
||||
|
||||
b.Property<bool>("InvestigationExtendStatus")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ขยายเวลา");
|
||||
|
||||
b.Property<string>("InvestigationStatusResult")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สถานะหรือผลการสืบสวน (not_specified คือ ยังไม่ระบุ, have_cause คือ มีมูล, no_cause คือ ไม่มีมูล");
|
||||
|
|
@ -1879,7 +1899,7 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("เหตุที่ถูกสั่งพักราชการ/ออกจากราชการไว้ก่อน");
|
||||
|
||||
b.Property<Guid>("DisciplineDisciplinaryId")
|
||||
b.Property<Guid>("DisciplineDisciplinary_ProfileComplaintInvestigateId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime?>("EndDateSuspend")
|
||||
|
|
@ -1955,7 +1975,7 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DisciplineDisciplinaryId");
|
||||
b.HasIndex("DisciplineDisciplinary_ProfileComplaintInvestigateId");
|
||||
|
||||
b.ToTable("DisciplineReport_Profiles");
|
||||
});
|
||||
|
|
@ -10240,13 +10260,13 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineReport_Profile", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary", "DisciplineDisciplinary")
|
||||
b.HasOne("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", "DisciplineDisciplinary_ProfileComplaintInvestigate")
|
||||
.WithMany("DisciplineReport_Profiles")
|
||||
.HasForeignKey("DisciplineDisciplinaryId")
|
||||
.HasForeignKey("DisciplineDisciplinary_ProfileComplaintInvestigateId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DisciplineDisciplinary");
|
||||
b.Navigation("DisciplineDisciplinary_ProfileComplaintInvestigate");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b =>
|
||||
|
|
@ -11059,7 +11079,10 @@ namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
|
|||
b.Navigation("DisciplineDisciplinary_DocWitnessess");
|
||||
|
||||
b.Navigation("DisciplineDisciplinary_ProfileComplaintInvestigates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Discipline.DisciplineDisciplinary_ProfileComplaintInvestigate", b =>
|
||||
{
|
||||
b.Navigation("DisciplineReport_Profiles");
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue