This commit is contained in:
parent
5c789232f1
commit
dc3c5a82a1
9 changed files with 20845 additions and 45 deletions
|
|
@ -163,7 +163,14 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
|
||||
rawData.Status = "PENDING";
|
||||
rawData.ApproveStep = "st2";
|
||||
if (rawData.ApproveStep == "st1")
|
||||
{
|
||||
rawData.ApproveStep = "st2";
|
||||
}
|
||||
else if (rawData.ApproveStep == "st3")
|
||||
{
|
||||
rawData.ApproveStep = "st4";
|
||||
}
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
|
|
@ -196,10 +203,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
if (rawData.ApproveStep != "st2")
|
||||
{
|
||||
throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
}
|
||||
// if (rawData.ApproveStep != "st2")
|
||||
// {
|
||||
// throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
// }
|
||||
|
||||
// check commander approve
|
||||
//var approvers = await _dbContext.Set<RetirementResignEmployeeApprover>()
|
||||
|
|
@ -275,7 +282,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
rawData.Status = "PENDING";
|
||||
// rawData.LeaveComment = reason;
|
||||
rawData.ApproveStep = "st3";
|
||||
if (rawData.Group != "1.1")
|
||||
{
|
||||
rawData.ApproveStep = "st3";
|
||||
}
|
||||
|
||||
|
||||
// TODO: Send notification to 1st Approver
|
||||
|
|
@ -309,10 +319,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
if (rawData.ApproveStep != "st2")
|
||||
{
|
||||
throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
}
|
||||
// if (rawData.ApproveStep != "st2")
|
||||
// {
|
||||
// throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
// }
|
||||
|
||||
// check commander approve
|
||||
var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList();
|
||||
|
|
@ -363,7 +373,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
rawData.Status = "PENDING";
|
||||
// rawData.LeaveComment = reason;
|
||||
rawData.ApproveStep = "st3";
|
||||
if (rawData.Group != "1.1")
|
||||
{
|
||||
rawData.ApproveStep = "st3";
|
||||
}
|
||||
|
||||
|
||||
// TODO: Send notification to 1st Approver
|
||||
|
|
@ -396,10 +409,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
if (rawData.ApproveStep != "st3")
|
||||
{
|
||||
throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
}
|
||||
// if (rawData.ApproveStep != "st3")
|
||||
// {
|
||||
// throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
// }
|
||||
|
||||
// check commander approve
|
||||
var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList();
|
||||
|
|
@ -446,7 +459,14 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
rawData.Status = "APPROVE";
|
||||
// rawData.LeaveDirectorComment = reason;
|
||||
rawData.ApproveStep = "st4";
|
||||
if (rawData.Group != "1.1")
|
||||
{
|
||||
rawData.ApproveStep = "st5";
|
||||
}
|
||||
else
|
||||
{
|
||||
rawData.ApproveStep = "st3";
|
||||
}
|
||||
|
||||
// Send Noti
|
||||
var noti = new Notification
|
||||
|
|
@ -473,10 +493,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
if (rawData.ApproveStep != "st3")
|
||||
{
|
||||
throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
}
|
||||
// if (rawData.ApproveStep != "st3")
|
||||
// {
|
||||
// throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
// }
|
||||
|
||||
// check commander approve
|
||||
var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList();
|
||||
|
|
@ -523,7 +543,14 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
rawData.Status = "REJECT";
|
||||
// rawData.LeaveDirectorComment = reason;
|
||||
rawData.ApproveStep = "st5";
|
||||
if (rawData.Group != "1.1")
|
||||
{
|
||||
rawData.ApproveStep = "st5";
|
||||
}
|
||||
else
|
||||
{
|
||||
rawData.ApproveStep = "st3";
|
||||
}
|
||||
|
||||
// Send Noti
|
||||
var noti = new Notification
|
||||
|
|
|
|||
|
|
@ -118,7 +118,14 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
|
||||
rawData.Status = "PENDING";
|
||||
rawData.ApproveStep = "st2";
|
||||
if (rawData.ApproveStep == "st1")
|
||||
{
|
||||
rawData.ApproveStep = "st2";
|
||||
}
|
||||
else if (rawData.ApproveStep == "st3")
|
||||
{
|
||||
rawData.ApproveStep = "st4";
|
||||
}
|
||||
|
||||
// TODO: Send notification to 1st Commander
|
||||
var firstCommander = rawData.Approvers
|
||||
|
|
@ -149,10 +156,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
if (rawData.ApproveStep != "st2")
|
||||
{
|
||||
throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
}
|
||||
// if (rawData.ApproveStep != "st2")
|
||||
// {
|
||||
// throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
// }
|
||||
|
||||
var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList();
|
||||
|
||||
|
|
@ -199,7 +206,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
else
|
||||
{
|
||||
rawData.Status = "PENDING";
|
||||
rawData.ApproveStep = "st3";
|
||||
if (rawData.Group != "1.1")
|
||||
{
|
||||
rawData.ApproveStep = "st3";
|
||||
}
|
||||
|
||||
// TODO: Send notification to 1st Approver
|
||||
var firstCommander = rawData.Approvers
|
||||
|
|
@ -232,10 +242,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
if (rawData.ApproveStep != "st2")
|
||||
{
|
||||
throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
}
|
||||
// if (rawData.ApproveStep != "st2")
|
||||
// {
|
||||
// throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
// }
|
||||
|
||||
// check commander approve
|
||||
var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "COMMANDER").OrderBy(x => x.Seq).ToList();
|
||||
|
|
@ -286,7 +296,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
rawData.Status = "PENDING";
|
||||
// rawData.LeaveComment = reason;
|
||||
rawData.ApproveStep = "st3";
|
||||
if (rawData.Group != "1.1")
|
||||
{
|
||||
rawData.ApproveStep = "st3";
|
||||
}
|
||||
|
||||
// TODO: Send notification to 1st Approver
|
||||
var firstCommander = rawData.Approvers
|
||||
|
|
@ -318,10 +331,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
if (rawData.ApproveStep != "st3")
|
||||
{
|
||||
throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
}
|
||||
// if (rawData.ApproveStep != "st3")
|
||||
// {
|
||||
// throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
// }
|
||||
|
||||
// check commander approve
|
||||
var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList();
|
||||
|
|
@ -368,7 +381,14 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
rawData.Status = "APPROVE";
|
||||
// rawData.LeaveDirectorComment = reason;
|
||||
rawData.ApproveStep = "st4";
|
||||
if (rawData.Group != "1.1")
|
||||
{
|
||||
rawData.ApproveStep = "st5";
|
||||
}
|
||||
else
|
||||
{
|
||||
rawData.ApproveStep = "st3";
|
||||
}
|
||||
|
||||
if (rawData.profileId != null)
|
||||
{
|
||||
|
|
@ -398,10 +418,10 @@ namespace BMA.EHR.Application.Repositories
|
|||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
if (rawData.ApproveStep != "st3")
|
||||
{
|
||||
throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
}
|
||||
// if (rawData.ApproveStep != "st3")
|
||||
// {
|
||||
// throw new Exception("คำขอนี้ยังไม่ได้อยู่ในขั้นตอนที่สามารถอนุมัติได้ ไม่สามารถทำรายการได้");
|
||||
// }
|
||||
|
||||
// check commander approve
|
||||
var approvers = rawData.Approvers.Where(x => x.ApproveType!.ToUpper() == "APPROVER").OrderBy(x => x.Seq).ToList();
|
||||
|
|
@ -447,8 +467,14 @@ namespace BMA.EHR.Application.Repositories
|
|||
else
|
||||
{
|
||||
rawData.Status = "REJECT";
|
||||
// rawData.LeaveDirectorComment = reason;
|
||||
rawData.ApproveStep = "st5";
|
||||
if (rawData.Group != "1.1")
|
||||
{
|
||||
rawData.ApproveStep = "st5";
|
||||
}
|
||||
else
|
||||
{
|
||||
rawData.ApproveStep = "st3";
|
||||
}
|
||||
|
||||
// Send Noti
|
||||
var noti = new Notification
|
||||
|
|
|
|||
|
|
@ -153,6 +153,8 @@ namespace BMA.EHR.Domain.Models.Retirement
|
|||
|
||||
[Comment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ")]
|
||||
public string? ApproveStep { get; set; } = string.Empty;
|
||||
[Comment("คนยื่นมาอยู่ในกลุ่ม")]
|
||||
public string? Group { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -151,6 +151,8 @@ namespace BMA.EHR.Domain.Models.Retirement
|
|||
|
||||
[Comment("step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ")]
|
||||
public string? ApproveStep { get; set; } = string.Empty;
|
||||
[Comment("คนยื่นมาอยู่ในกลุ่ม")]
|
||||
public string? Group { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public List<RetirementResignEmployeeApprover> Approvers { get; set; } = new();
|
||||
|
|
|
|||
20650
BMA.EHR.Infrastructure/Migrations/20250523034727_update_table_retirementresign_add_group.Designer.cs
generated
Normal file
20650
BMA.EHR.Infrastructure/Migrations/20250523034727_update_table_retirementresign_add_group.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,42 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class update_table_retirementresign_add_group : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Group",
|
||||
table: "RetirementResigns",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "คนยื่นมาอยู่ในกลุ่ม")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Group",
|
||||
table: "RetirementResignEmployees",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "คนยื่นมาอยู่ในกลุ่ม")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Group",
|
||||
table: "RetirementResigns");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Group",
|
||||
table: "RetirementResignEmployees");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -16840,6 +16840,10 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("Group")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("คนยื่นมาอยู่ในกลุ่ม");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("สถานะการใช้งาน");
|
||||
|
|
@ -17770,6 +17774,10 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("Group")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("คนยื่นมาอยู่ในกลุ่ม");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("สถานะการใช้งาน");
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
p.IsActive,
|
||||
p.CreatedAt,
|
||||
p.ApproveStep,
|
||||
p.Group,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
|
|
@ -424,6 +425,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
p.IsDiscipline,
|
||||
p.CancelReason,
|
||||
p.ApproveStep,
|
||||
p.Group,
|
||||
Approvers = p.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"),
|
||||
Commanders = p.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"),
|
||||
KeycloakUserId = p.CreatedUserId,
|
||||
|
|
@ -510,6 +512,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
data.Approvers,
|
||||
data.Commanders,
|
||||
data.ApproveStep,
|
||||
data.Group,
|
||||
idCancel = data.RetirementResignCancels?.Id ?? null,
|
||||
statusCancel = data.RetirementResignCancels?.Status ?? null,
|
||||
statusMain = data.Status == "CANCEL" ? "DONECANCEL" : data.Status,
|
||||
|
|
@ -891,6 +894,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
|
||||
var retirementResign = new RetirementResign
|
||||
{
|
||||
ApproveStep = "st1",
|
||||
Location = req.Location,
|
||||
SendDate = DateTime.Now,
|
||||
ActiveDate = req.ActiveDate,
|
||||
|
|
@ -963,6 +967,19 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
(org.result.child1 == null ? "" : org.result.child1 + "\n") +
|
||||
(org.result.root == null ? "" : org.result.root);
|
||||
retirementResign.OrganizationPositionOld = org.result.position + "\n" + (retirementResign.PositionExecutiveOld == null ? "" : retirementResign.PositionExecutiveOld + "\n") + retirementResign.OrganizationOld;
|
||||
|
||||
if ((retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "ชำนาญงาน") || (retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "ปฏิบัติงาน") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ปฏิบัติการ") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ชำนาญการ"))
|
||||
{
|
||||
retirementResign.Group = "1.1";
|
||||
}
|
||||
else if ((retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "อาวุโส") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ชำนาญการพิเศษ") || (retirementResign.posTypeNameOld == "อำนวยการ" && retirementResign.posLevelNameOld == "ต้น"))
|
||||
{
|
||||
retirementResign.Group = "1.2";
|
||||
}
|
||||
else if ((retirementResign.posTypeNameOld == "ทั่วไป" && retirementResign.posLevelNameOld == "ทักษะพิเศษ") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "เชี่ยวชาญ") || (retirementResign.posTypeNameOld == "วิชาการ" && retirementResign.posLevelNameOld == "ทรงคุณวุฒิ") || (retirementResign.posTypeNameOld == "อำนวยการ" && retirementResign.posLevelNameOld == "สูง") || (retirementResign.posTypeNameOld == "บริหาร" && retirementResign.posLevelNameOld == "ต้น") || (retirementResign.posTypeNameOld == "บริหาร" && retirementResign.posLevelNameOld == "สูง"))
|
||||
{
|
||||
retirementResign.Group = "2";
|
||||
}
|
||||
}
|
||||
await _context.RetirementResigns.AddAsync(retirementResign);
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -1260,6 +1277,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
});
|
||||
}
|
||||
updated.IsCancel = true;
|
||||
updated.Status = "CANCELING";
|
||||
}
|
||||
else if (updated.Status == "REPORT")
|
||||
{
|
||||
|
|
@ -1271,8 +1289,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
Console.WriteLine(_res);
|
||||
Console.WriteLine($"{_configuration["API"]}/org/command/tab2Cancel17/{updated.Id}");
|
||||
}
|
||||
updated.Status = "CANCELING";
|
||||
}
|
||||
else
|
||||
{
|
||||
updated.Status = "CANCEL";
|
||||
}
|
||||
updated.Status = "CANCEL";
|
||||
updated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
updated.LastUpdateUserId = UserId ?? "";
|
||||
updated.LastUpdatedAt = DateTime.Now;
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
p.IsActive,
|
||||
p.CreatedAt,
|
||||
p.ApproveStep,
|
||||
p.Group,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
|
|
@ -363,6 +364,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
p.IsDiscipline,
|
||||
p.CancelReason,
|
||||
p.ApproveStep,
|
||||
p.Group,
|
||||
Approvers = p.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER"),
|
||||
Commanders = p.Approvers.Where(x => x.ApproveType.ToUpper() == "COMMANDER"),
|
||||
KeycloakUserId = p.CreatedUserId,
|
||||
|
|
@ -449,6 +451,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
data.Approvers,
|
||||
data.Commanders,
|
||||
data.ApproveStep,
|
||||
data.Group,
|
||||
idCancel = data.RetirementResignEmployeeCancels?.Id ?? Guid.Empty,
|
||||
statusCancel = data.RetirementResignEmployeeCancels?.Status ?? null,
|
||||
statusMain = data.Status,
|
||||
|
|
@ -828,6 +831,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
}
|
||||
var retirementResignEmployee = new RetirementResignEmployee
|
||||
{
|
||||
ApproveStep = "st1",
|
||||
Location = req.Location,
|
||||
SendDate = DateTime.Now,
|
||||
ActiveDate = req.ActiveDate,
|
||||
|
|
@ -899,6 +903,18 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
(org.result.child1 == null ? "" : org.result.child1 + "\n") +
|
||||
(org.result.root == null ? "" : org.result.root);
|
||||
retirementResignEmployee.OrganizationPositionOld = org.result.position + "\n" + retirementResignEmployee.OrganizationOld;
|
||||
if ((retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "ชำนาญงาน") || (retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "ปฏิบัติงาน") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ปฏิบัติการ") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ชำนาญการ"))
|
||||
{
|
||||
retirementResignEmployee.Group = "1.1";
|
||||
}
|
||||
else if ((retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "อาวุโส") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ชำนาญการพิเศษ") || (retirementResignEmployee.posTypeNameOld == "อำนวยการ" && retirementResignEmployee.posLevelNameOld == "ต้น"))
|
||||
{
|
||||
retirementResignEmployee.Group = "1.2";
|
||||
}
|
||||
else if ((retirementResignEmployee.posTypeNameOld == "ทั่วไป" && retirementResignEmployee.posLevelNameOld == "ทักษะพิเศษ") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "เชี่ยวชาญ") || (retirementResignEmployee.posTypeNameOld == "วิชาการ" && retirementResignEmployee.posLevelNameOld == "ทรงคุณวุฒิ") || (retirementResignEmployee.posTypeNameOld == "อำนวยการ" && retirementResignEmployee.posLevelNameOld == "สูง") || (retirementResignEmployee.posTypeNameOld == "บริหาร" && retirementResignEmployee.posLevelNameOld == "ต้น") || (retirementResignEmployee.posTypeNameOld == "บริหาร" && retirementResignEmployee.posLevelNameOld == "สูง"))
|
||||
{
|
||||
retirementResignEmployee.Group = "2";
|
||||
}
|
||||
}
|
||||
await _context.RetirementResignEmployees.AddAsync(retirementResignEmployee);
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -1166,6 +1182,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
});
|
||||
}
|
||||
updated.IsCancel = true;
|
||||
updated.Status = "CANCELING";
|
||||
}
|
||||
else if (updated.Status == "REPORT")
|
||||
{
|
||||
|
|
@ -1175,8 +1192,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _res = await client.DeleteAsync($"{_configuration["API"]}/org/command/tab2Cancel23/{updated.Id}");
|
||||
}
|
||||
updated.Status = "CANCELING";
|
||||
}
|
||||
else
|
||||
{
|
||||
updated.Status = "CANCEL";
|
||||
}
|
||||
updated.Status = "CANCEL";
|
||||
updated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
updated.LastUpdateUserId = UserId ?? "";
|
||||
updated.LastUpdatedAt = DateTime.Now;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue