migrate (add table ProfileComplaintInvestigate)
This commit is contained in:
parent
fec4095617
commit
fd17afb145
5 changed files with 19968 additions and 24 deletions
|
|
@ -0,0 +1,49 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using BMA.EHR.Domain.Models.Base;
|
||||
using BMA.EHR.Domain.Models.MetaData;
|
||||
using BMA.EHR.Domain.Models.Organizations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace BMA.EHR.Domain.Models.Discipline
|
||||
{
|
||||
public class ProfileComplaintInvestigate : EntityBase
|
||||
{
|
||||
[Comment("id อ้างอิง profile")]
|
||||
public string? PersonId { get; set; }
|
||||
|
||||
[MaxLength(13), Comment("รหัสบัตรประชาชน")]
|
||||
public string? CitizenId { get; set; }
|
||||
|
||||
[Comment("คำนำหน้า")]
|
||||
public string? Prefix { get; set; }
|
||||
|
||||
[Required, MaxLength(100), Comment("ชื่อ")]
|
||||
public string? FirstName { get; set; }
|
||||
|
||||
[Required, MaxLength(100), Comment("นามสกุล")]
|
||||
public string? LastName { get; set; }
|
||||
|
||||
[Comment("id หน่วยงาน rootDna")]
|
||||
public string? rootDnaId { get; set; }
|
||||
|
||||
[Comment("id หน่วยงาน child1Dna")]
|
||||
public string? child1DnaId { get; set; }
|
||||
|
||||
[Comment("id หน่วยงาน child2Dna")]
|
||||
public string? child2DnaId { get; set; }
|
||||
|
||||
[Comment("id หน่วยงาน child3Dna")]
|
||||
public string? child3DnaId { get; set; }
|
||||
|
||||
[Comment("id หน่วยงาน child4Dna")]
|
||||
public string? child4DnaId { get; set; }
|
||||
|
||||
[Comment("ประเภทคำสั่งลงโทษทางวินัย (C-PM-19->คำสั่งลงโทษปลดออกจากราชการ C-PM-20->คำสั่งลงโทษไล่ออกจากราชการ)")]
|
||||
public string? commandType { get; set; }
|
||||
|
||||
[Comment("สถานภาพ (OFFICER->ข้าราชการ EMPLOYEE->ลูกจ้างประจำ)")]
|
||||
public string? profileType { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
19880
BMA.EHR.Infrastructure/Migrations/20250210025433_add table ProfileComplaintInvestigate.Designer.cs
generated
Normal file
19880
BMA.EHR.Infrastructure/Migrations/20250210025433_add table ProfileComplaintInvestigate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addtableProfileComplaintInvestigate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -31,6 +31,7 @@ namespace BMA.EHR.Infrastructure.Persistence
|
|||
public DbSet<DisciplineDisciplinary> DisciplineDisciplinarys { get; set; }
|
||||
public DbSet<DisciplineDisciplinaryExtend> DisciplineDisciplinaryExtends { get; set; }
|
||||
public DbSet<DisciplineDisciplinary_ProfileComplaintInvestigate> DisciplineDisciplinary_ProfileComplaintInvestigates { get; set; }
|
||||
public DbSet<ProfileComplaintInvestigate> ProfileComplaintInvestigate { get; set; }
|
||||
public DbSet<DisciplineDisciplinary_DocInvestigateRelevant> DisciplineDisciplinary_DocInvestigateRelevants { get; set; }
|
||||
public DbSet<DisciplineDisciplinary_DocInvestigate> DisciplineDisciplinary_DocInvestigates { get; set; }
|
||||
public DbSet<DisciplineDisciplinary_DocResult> DisciplineDisciplinary_DocResults { get; set; }
|
||||
|
|
|
|||
|
|
@ -1550,13 +1550,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.Count();
|
||||
|
||||
//ปลดออก
|
||||
var dl_cm19_count = _contextDiscipline.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
var dl_cm19_count = _contextDiscipline.ProfileComplaintInvestigate
|
||||
.Where(x =>
|
||||
x.CreatedAt.Date >= startDate &&
|
||||
x.CreatedAt.Date <= endDate &&
|
||||
x.Status.Trim().ToUpper() == "DONE" &&
|
||||
x.profileType.Trim().ToUpper() == "OFFICER" &&
|
||||
x.CommandTypeId == Guid.Parse("ef8db4d7-1472-4c1d-b73f-9114e618a96f") &&
|
||||
x.commandType.Trim().ToUpper() == "C-PM-19" &&
|
||||
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
|
||||
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
|
||||
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
|
||||
|
|
@ -1565,13 +1564,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.Count();
|
||||
|
||||
//ไล่ออก
|
||||
var dl_cm20_count = _contextDiscipline.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
var dl_cm20_count = _contextDiscipline.ProfileComplaintInvestigate
|
||||
.Where(x =>
|
||||
x.CreatedAt.Date >= startDate &&
|
||||
x.CreatedAt.Date <= endDate &&
|
||||
x.Status.Trim().ToUpper() == "DONE" &&
|
||||
x.profileType.Trim().ToUpper() == "OFFICER" &&
|
||||
x.CommandTypeId == Guid.Parse("d9dee5c3-b75a-4927-9ce2-51e2233cf20b") &&
|
||||
x.commandType.Trim().ToUpper() == "C-PM-20" &&
|
||||
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
|
||||
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
|
||||
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
|
||||
|
|
@ -1678,13 +1676,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.Count();
|
||||
|
||||
//ปลดออก
|
||||
var dl_cm19_count = _contextDiscipline.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
var dl_cm19_count = _contextDiscipline.ProfileComplaintInvestigate
|
||||
.Where(x =>
|
||||
x.CreatedAt.Date >= startDate &&
|
||||
x.CreatedAt.Date <= endDate &&
|
||||
x.Status.Trim().ToUpper() == "DONE" &&
|
||||
x.profileType.Trim().ToUpper() == "OFFICER" &&
|
||||
x.CommandTypeId == Guid.Parse("ef8db4d7-1472-4c1d-b73f-9114e618a96f") &&
|
||||
x.commandType.Trim().ToUpper() == "C-PM-19" &&
|
||||
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
|
||||
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
|
||||
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
|
||||
|
|
@ -1693,13 +1690,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.Count();
|
||||
|
||||
//ไล่ออก
|
||||
var dl_cm20_count = _contextDiscipline.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
var dl_cm20_count = _contextDiscipline.ProfileComplaintInvestigate
|
||||
.Where(x =>
|
||||
x.CreatedAt.Date >= startDate &&
|
||||
x.CreatedAt.Date <= endDate &&
|
||||
x.Status.Trim().ToUpper() == "DONE" &&
|
||||
x.profileType.Trim().ToUpper() == "OFFICER" &&
|
||||
x.CommandTypeId == Guid.Parse("d9dee5c3-b75a-4927-9ce2-51e2233cf20b") &&
|
||||
x.commandType.Trim().ToUpper() == "C-PM-20" &&
|
||||
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
|
||||
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
|
||||
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
|
||||
|
|
@ -1879,13 +1875,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.Count();
|
||||
|
||||
//ปลดออก
|
||||
var dl_cm19_count = _contextDiscipline.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
var dl_cm19_count = _contextDiscipline.ProfileComplaintInvestigate
|
||||
.Where(x =>
|
||||
x.CreatedAt.Date >= startDate &&
|
||||
x.CreatedAt.Date <= endDate &&
|
||||
x.Status.Trim().ToUpper() == "DONE" &&
|
||||
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
|
||||
x.CommandTypeId == Guid.Parse("ef8db4d7-1472-4c1d-b73f-9114e618a96f") &&
|
||||
x.commandType.Trim().ToUpper() == "C-PM-19" &&
|
||||
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
|
||||
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
|
||||
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
|
||||
|
|
@ -1894,13 +1889,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.Count();
|
||||
|
||||
//ไล่ออก
|
||||
var dl_cm20_count = _contextDiscipline.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
var dl_cm20_count = _contextDiscipline.ProfileComplaintInvestigate
|
||||
.Where(x =>
|
||||
x.CreatedAt.Date >= startDate &&
|
||||
x.CreatedAt.Date <= endDate &&
|
||||
x.Status.Trim().ToUpper() == "DONE" &&
|
||||
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
|
||||
x.CommandTypeId == Guid.Parse("d9dee5c3-b75a-4927-9ce2-51e2233cf20b") &&
|
||||
x.commandType.Trim().ToUpper() == "C-PM-20" &&
|
||||
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
|
||||
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
|
||||
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
|
||||
|
|
@ -1985,13 +1979,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.Count();
|
||||
|
||||
//ปลดออก
|
||||
var dl_cm19_count = _contextDiscipline.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
var dl_cm19_count = _contextDiscipline.ProfileComplaintInvestigate
|
||||
.Where(x =>
|
||||
x.CreatedAt.Date >= startDate &&
|
||||
x.CreatedAt.Date <= endDate &&
|
||||
x.Status.Trim().ToUpper() == "DONE" &&
|
||||
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
|
||||
x.CommandTypeId == Guid.Parse("ef8db4d7-1472-4c1d-b73f-9114e618a96f") &&
|
||||
x.commandType.Trim().ToUpper() == "C-PM-19" &&
|
||||
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
|
||||
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
|
||||
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
|
||||
|
|
@ -2000,13 +1993,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.Count();
|
||||
|
||||
//ไล่ออก
|
||||
var dl_cm20_count = _contextDiscipline.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
var dl_cm20_count = _contextDiscipline.ProfileComplaintInvestigate
|
||||
.Where(x =>
|
||||
x.CreatedAt.Date >= startDate &&
|
||||
x.CreatedAt.Date <= endDate &&
|
||||
x.Status.Trim().ToUpper() == "DONE" &&
|
||||
x.profileType.Trim().ToUpper() == "EMPLOYEE" &&
|
||||
x.CommandTypeId == Guid.Parse("d9dee5c3-b75a-4927-9ce2-51e2233cf20b") &&
|
||||
x.commandType.Trim().ToUpper() == "C-PM-20" &&
|
||||
(node == 0 ? x.rootDnaId.Contains(org.rootDnaId) : true) &&
|
||||
(node == 1 ? x.child1DnaId.Contains(org.child1DnaId) : true) &&
|
||||
(node == 2 ? x.child2DnaId.Contains(org.child2DnaId) : true) &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue