ออกคำสั่ง 27
This commit is contained in:
parent
6c09c68c5c
commit
a89b8e0453
7 changed files with 18120 additions and 27 deletions
|
|
@ -1029,39 +1029,39 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
}
|
}
|
||||||
|
|
||||||
var report_data = (from r in raw_data
|
var report_data = (from r in raw_data
|
||||||
join p in _dbContext.Set<OrganizationEmployeeProfile>()
|
// join p in _dbContext.Set<OrganizationEmployeeProfile>()
|
||||||
.Include(x => x.Profile)
|
// .Include(x => x.Profile)
|
||||||
.ThenInclude(x => x.Position)
|
// .ThenInclude(x => x.Position)
|
||||||
.Include(x => x.Profile)
|
// .Include(x => x.Profile)
|
||||||
.ThenInclude(x => x.PositionLevel)
|
// .ThenInclude(x => x.PositionLevel)
|
||||||
.Include(x => x.Profile)
|
// .Include(x => x.Profile)
|
||||||
.ThenInclude(x => x.PositionType)
|
// .ThenInclude(x => x.PositionType)
|
||||||
.Include(x => x.Profile)
|
// .Include(x => x.Profile)
|
||||||
.ThenInclude(x => x.PosNo)
|
// .ThenInclude(x => x.PosNo)
|
||||||
.Include(x => x.OrgEmployee)
|
// .Include(x => x.OrgEmployee)
|
||||||
.ThenInclude(x => x.OrganizationAgency)
|
// .ThenInclude(x => x.OrganizationAgency)
|
||||||
.ThenInclude(x => x.OrganizationOrganization)
|
// .ThenInclude(x => x.OrganizationOrganization)
|
||||||
//.Include(x => x.OrgEmployee)
|
// //.Include(x => x.OrgEmployee)
|
||||||
//.ThenInclude(x => x.PosNo)
|
// //.ThenInclude(x => x.PosNo)
|
||||||
.Include(x => x.OrgEmployee)
|
// .Include(x => x.OrgEmployee)
|
||||||
.ThenInclude(x => x.PositionEmployeePosition)
|
// .ThenInclude(x => x.PositionEmployeePosition)
|
||||||
.Include(x => x.OrgEmployee)
|
// .Include(x => x.OrgEmployee)
|
||||||
.ThenInclude(x => x.OrganizationPositionEmployeeLevels)
|
// .ThenInclude(x => x.OrganizationPositionEmployeeLevels)
|
||||||
.ThenInclude(x => x.PositionEmployeeLevel)
|
// .ThenInclude(x => x.PositionEmployeeLevel)
|
||||||
on r.RefPlacementProfileId equals p.Id
|
// on r.RefPlacementProfileId equals p.Id
|
||||||
orderby r.Sequence
|
orderby r.Sequence
|
||||||
select new CommandType21Response
|
select new CommandType21Response
|
||||||
{
|
{
|
||||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||||
CitizenId = r.CitizenId.ToThaiNumber(),
|
CitizenId = r.CitizenId.ToThaiNumber(),
|
||||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||||
Organization = p.OrgEmployee == null || p.OrgEmployee!.OrganizationAgency == null || p.OrgEmployee!.OrganizationAgency!.OrganizationOrganization == null ? "" : p.OrgEmployee!.OrganizationAgency!.OrganizationOrganization!.Name,
|
Organization = r.Organization == null ? "" : r.Organization.ToThaiNumber(),
|
||||||
PositionName = p.OrgEmployee == null || p.OrgEmployee.PositionEmployeePosition == null ? "" : p.OrgEmployee.PositionEmployeePosition.Name.ToThaiNumber(),
|
PositionName = r.PositionName == null ? "" : r.PositionName.ToThaiNumber(),
|
||||||
PositionLevel = p.OrgEmployee == null || p.OrgEmployee.OrganizationPositionEmployeeLevels == null ? "" : p.OrgEmployee.OrganizationPositionEmployeeLevels.First().PositionEmployeeLevel.Name.ToThaiNumber(),
|
PositionLevel = r.PositionLevel == null ? "" : r.PositionLevel.ToThaiNumber(),
|
||||||
PositionType = p.Profile.PositionType == null ? "" : p.Profile.PositionType.Name.ToThaiNumber(),
|
PositionType = r.PositionType == null ? "" : r.PositionType.ToThaiNumber(),
|
||||||
PositionNumber = p.OrgEmployee.PosNo == null ? "" : p.OrgEmployee.PosNo.ToThaiNumber(),
|
PositionNumber = r.PositionNumber == null ? "" : r.PositionNumber.ToThaiNumber(),
|
||||||
Salary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
Salary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||||
RetireDate = p.Profile.BirthDate.CalculateRetireDate().ToThaiFullDate3().ToThaiNumber(),
|
RetireDate = r.BirthDate == null ? "" : r.BirthDate.Value.CalculateRetireDate().ToThaiFullDate3().ToThaiNumber(),
|
||||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber()
|
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber()
|
||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
|
||||||
|
|
@ -1596,8 +1596,14 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
Prefix = d.prefix == null ? "" : d.prefix,
|
Prefix = d.prefix == null ? "" : d.prefix,
|
||||||
FirstName = d.firstName,
|
FirstName = d.firstName,
|
||||||
LastName = d.lastName,
|
LastName = d.lastName,
|
||||||
RefPlacementProfileId = d.profileId == null ? null : Guid.Parse(d.profileId),
|
RefPlacementProfileId = d.id,
|
||||||
RefDisciplineId = d.id,
|
RefDisciplineId = d.id,
|
||||||
|
Organization = d.Organization,
|
||||||
|
PositionName = d.PositionName,
|
||||||
|
PositionLevel = d.PositionLevel,
|
||||||
|
PositionType = d.PositionType,
|
||||||
|
PositionNumber = d.PositionNumber,
|
||||||
|
BirthDate = d.BirthDate,
|
||||||
};
|
};
|
||||||
seq++;
|
seq++;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,5 +16,13 @@
|
||||||
public string lastName { get; set; } = string.Empty;
|
public string lastName { get; set; } = string.Empty;
|
||||||
public string? profileId { get; set; } = string.Empty;
|
public string? profileId { get; set; } = string.Empty;
|
||||||
// public Guid? commandId { get; set; } = Guid.Empty;
|
// public Guid? commandId { get; set; } = Guid.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
public DateTime? BirthDate { get; set; }
|
||||||
|
public string? Organization { get; set; }
|
||||||
|
public string? PositionName { get; set; }
|
||||||
|
public string? PositionLevel { get; set; }
|
||||||
|
public string? PositionType { get; set; }
|
||||||
|
public string? PositionNumber { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,5 +47,19 @@ namespace BMA.EHR.Domain.Models.Commands.Core
|
||||||
|
|
||||||
[Comment("เงินค่าตอบแทนรายเดือน")]
|
[Comment("เงินค่าตอบแทนรายเดือน")]
|
||||||
public double? MouthSalaryAmount { get; set; }
|
public double? MouthSalaryAmount { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[MaxLength(40), Comment("วันเกิด")]
|
||||||
|
public DateTime? BirthDate { get; set; }
|
||||||
|
[Comment("ชื่อหน่วยงาน root")]
|
||||||
|
public string? Organization { get; set; }
|
||||||
|
[Comment("ตำแหน่ง")]
|
||||||
|
public string? PositionName { get; set; }
|
||||||
|
[Comment("ระดับ")]
|
||||||
|
public string? PositionLevel { get; set; }
|
||||||
|
[Comment("ประเภท")]
|
||||||
|
public string? PositionType { get; set; }
|
||||||
|
[Comment("เลขที่ตำแหน่ง")]
|
||||||
|
public string? PositionNumber { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
17949
BMA.EHR.Infrastructure/Migrations/20240617051330_update table CommandReceiver add Position.Designer.cs
generated
Normal file
17949
BMA.EHR.Infrastructure/Migrations/20240617051330_update table CommandReceiver add Position.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,91 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace BMA.EHR.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class updatetableCommandReceiveraddPosition : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "BirthDate",
|
||||||
|
table: "CommandReceivers",
|
||||||
|
type: "datetime(6)",
|
||||||
|
maxLength: 40,
|
||||||
|
nullable: true,
|
||||||
|
comment: "วันเกิด");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Organization",
|
||||||
|
table: "CommandReceivers",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ชื่อหน่วยงาน root")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "PositionLevel",
|
||||||
|
table: "CommandReceivers",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ระดับ")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "PositionName",
|
||||||
|
table: "CommandReceivers",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ตำแหน่ง")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "PositionNumber",
|
||||||
|
table: "CommandReceivers",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "เลขที่ตำแหน่ง")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "PositionType",
|
||||||
|
table: "CommandReceivers",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ประเภท")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "BirthDate",
|
||||||
|
table: "CommandReceivers");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Organization",
|
||||||
|
table: "CommandReceivers");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PositionLevel",
|
||||||
|
table: "CommandReceivers");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PositionName",
|
||||||
|
table: "CommandReceivers");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PositionNumber",
|
||||||
|
table: "CommandReceivers");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PositionType",
|
||||||
|
table: "CommandReceivers");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -508,6 +508,11 @@ namespace BMA.EHR.Infrastructure.Migrations
|
||||||
.HasColumnType("double")
|
.HasColumnType("double")
|
||||||
.HasComment("เงินเดือน");
|
.HasComment("เงินเดือน");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("BirthDate")
|
||||||
|
.HasMaxLength(40)
|
||||||
|
.HasColumnType("datetime(6)")
|
||||||
|
.HasComment("วันเกิด");
|
||||||
|
|
||||||
b.Property<string>("CitizenId")
|
b.Property<string>("CitizenId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(13)
|
.HasMaxLength(13)
|
||||||
|
|
@ -582,10 +587,30 @@ namespace BMA.EHR.Infrastructure.Migrations
|
||||||
.HasColumnType("double")
|
.HasColumnType("double")
|
||||||
.HasComment("เงินค่าตอบแทนรายเดือน");
|
.HasComment("เงินค่าตอบแทนรายเดือน");
|
||||||
|
|
||||||
|
b.Property<string>("Organization")
|
||||||
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("ชื่อหน่วยงาน root");
|
||||||
|
|
||||||
|
b.Property<string>("PositionLevel")
|
||||||
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("ระดับ");
|
||||||
|
|
||||||
|
b.Property<string>("PositionName")
|
||||||
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("ตำแหน่ง");
|
||||||
|
|
||||||
|
b.Property<string>("PositionNumber")
|
||||||
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("เลขที่ตำแหน่ง");
|
||||||
|
|
||||||
b.Property<double?>("PositionSalaryAmount")
|
b.Property<double?>("PositionSalaryAmount")
|
||||||
.HasColumnType("double")
|
.HasColumnType("double")
|
||||||
.HasComment("เงินประจำตำแหน่ง");
|
.HasComment("เงินประจำตำแหน่ง");
|
||||||
|
|
||||||
|
b.Property<string>("PositionType")
|
||||||
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("ประเภท");
|
||||||
|
|
||||||
b.Property<string>("Prefix")
|
b.Property<string>("Prefix")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue