diff --git a/.github/workflows/release_Retirement.yaml b/.github/workflows/release_Retirement.yaml index 24d501ab..3b55f2ff 100644 --- a/.github/workflows/release_Retirement.yaml +++ b/.github/workflows/release_Retirement.yaml @@ -15,7 +15,7 @@ env: DEPLOY_PORT: 10102 # COMPOSE_PATH: /home/frappet/docker/bma-ehr COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-retirement - TOKEN_LINE: 2Y0kIem9pgiTcWpp4DSOZn4SHu4tpueWFLN22LsAsp0 + TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 jobs: # act workflow_dispatch -W .github/workflows/release_retirement.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 diff --git a/.github/workflows/release_command.yaml b/.github/workflows/release_command.yaml index 5f8df8d7..ed19e8ca 100644 --- a/.github/workflows/release_command.yaml +++ b/.github/workflows/release_command.yaml @@ -15,7 +15,7 @@ env: DEPLOY_PORT: 10102 # COMPOSE_PATH: /home/frappet/docker/bma-ehr COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-command - TOKEN_LINE: 2Y0kIem9pgiTcWpp4DSOZn4SHu4tpueWFLN22LsAsp0 + TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 jobs: # act workflow_dispatch -W .github/workflows/release_command.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 diff --git a/.github/workflows/release_discipline.yaml b/.github/workflows/release_discipline.yaml index 8ed4b2ce..d3bb9e88 100644 --- a/.github/workflows/release_discipline.yaml +++ b/.github/workflows/release_discipline.yaml @@ -15,7 +15,7 @@ env: DEPLOY_PORT: 10102 # COMPOSE_PATH: /home/frappet/docker/bma-ehr COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-discipline - TOKEN_LINE: 2Y0kIem9pgiTcWpp4DSOZn4SHu4tpueWFLN22LsAsp0 + TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 jobs: # act workflow_dispatch -W .github/workflows/release_discipline.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 diff --git a/.github/workflows/release_insignia.yaml b/.github/workflows/release_insignia.yaml index d7a59b96..cf64e4ef 100644 --- a/.github/workflows/release_insignia.yaml +++ b/.github/workflows/release_insignia.yaml @@ -15,7 +15,7 @@ env: TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 jobs: - # act workflow_dispatch -W .github/workflows/release_insignia.yaml --input IMAGE_VER=insignia-1.0.0 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd + # act workflow_dispatch -W .github/workflows/release_insignia.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 release-dev: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release_leave.yaml b/.github/workflows/release_leave.yaml index cceb4315..5e0ef98d 100644 --- a/.github/workflows/release_leave.yaml +++ b/.github/workflows/release_leave.yaml @@ -12,10 +12,10 @@ env: DEPLOY_PORT: 10102 # COMPOSE_PATH: /home/frappet/docker/bma-ehr COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-leave - TOKEN_LINE: 2Y0kIem9pgiTcWpp4DSOZn4SHu4tpueWFLN22LsAsp0 + TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 jobs: - # act workflow_dispatch -W .github/workflows/release_leave.yaml --input IMAGE_VER=leave-1.0.0 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd + # act workflow_dispatch -W .github/workflows/release_leave.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 release-dev: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release_placement.yaml b/.github/workflows/release_placement.yaml index 3f221d5e..2931b2b7 100644 --- a/.github/workflows/release_placement.yaml +++ b/.github/workflows/release_placement.yaml @@ -15,7 +15,7 @@ env: DEPLOY_PORT: 10102 # COMPOSE_PATH: /home/frappet/docker/bma-ehr COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-placement - TOKEN_LINE: 2Y0kIem9pgiTcWpp4DSOZn4SHu4tpueWFLN22LsAsp0 + TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 jobs: # act workflow_dispatch -W .github/workflows/release_placement.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 diff --git a/.github/workflows/release_report.yaml b/.github/workflows/release_report.yaml index 05b2d47d..6dbacca1 100644 --- a/.github/workflows/release_report.yaml +++ b/.github/workflows/release_report.yaml @@ -15,7 +15,7 @@ env: DEPLOY_PORT: 10102 # COMPOSE_PATH: /home/frappet/docker/bma-ehr COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-report-v2 - TOKEN_LINE: 2Y0kIem9pgiTcWpp4DSOZn4SHu4tpueWFLN22LsAsp0 + TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0 jobs: # act workflow_dispatch -W .github/workflows/release_report.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357 diff --git a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs index de0f7e9a..d253bc61 100644 --- a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs @@ -217,10 +217,9 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests var rawData = _dbContext.Set().AsNoTracking() .Include(x => x.Type) .Where(x => x.LeaveStatus != "DRAFT") + .OrderByDescending(x => x.CreatedAt.Date) .AsQueryable(); - - if (year != 0) rawData = rawData.Where(x => x.LeaveStartDate.Year == year); diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index 2ca5556b..e6b5cfcd 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -814,6 +814,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers detail = p.DisciplineDisciplinary.Title, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, unStigma = "คำสั่งลงโทษ ปลดออกจากราชการ", + amount = r.amount, + positionSalaryAmount = r.positionSalaryAmount, + mouthSalaryAmount = r.mouthSalaryAmount, + isGovernment = false, }).ToList(); var baseAPIOrg = _configuration["API"]; @@ -907,6 +911,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers detail = p.DisciplineDisciplinary.Title, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, unStigma = "คำสั่งลงโทษ ไล่ออกจากราชการ", + amount = r.amount, + positionSalaryAmount = r.positionSalaryAmount, + mouthSalaryAmount = r.mouthSalaryAmount, + isGovernment = false, }).ToList(); var baseAPIOrg = _configuration["API"]; @@ -1058,6 +1066,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers detail = p.DisciplineDisciplinary.Title, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, unStigma = "คำสั่งลงโทษ พักจากราชการ", + amount = r.amount, + positionSalaryAmount = r.positionSalaryAmount, + mouthSalaryAmount = r.mouthSalaryAmount, + isGovernment = false }).ToList(); var baseAPIOrg = _configuration["API"]; @@ -1167,6 +1179,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers detail = p.DisciplineDisciplinary.Title, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, unStigma = "คำสั่งลงโทษ ให้ออกจากราชการไว้ก่อน", + amount = r.amount, + positionSalaryAmount = r.positionSalaryAmount, + mouthSalaryAmount = r.mouthSalaryAmount, + isGovernment = false }).ToList(); var baseAPIOrg = _configuration["API"]; @@ -1275,6 +1291,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers detail = p.DisciplineDisciplinary.Title, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, unStigma = "คำสั่งลงโทษ ลงโทษ ภาคทัณฑ์", + amount = r.amount, + positionSalaryAmount = r.positionSalaryAmount, + mouthSalaryAmount = r.mouthSalaryAmount, }).ToList(); var baseAPIOrg = _configuration["API"]; @@ -1382,7 +1401,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers refCommandDate = DateTime.Now, detail = p.DisciplineDisciplinary.Title, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, - unStigma = "คำสั่งลงโทษ ตัดเงินเดือน" + unStigma = "คำสั่งลงโทษ ตัดเงินเดือน", + amount = r.amount, + positionSalaryAmount = r.positionSalaryAmount, + mouthSalaryAmount = r.mouthSalaryAmount, }).ToList(); var baseAPIOrg = _configuration["API"]; @@ -1490,7 +1512,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers refCommandDate = DateTime.Now, detail = p.DisciplineDisciplinary.Title, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, - unStigma = "คำสั่งลงโทษ ลดขั้นเงินเดือน" + unStigma = "คำสั่งลงโทษ ลดขั้นเงินเดือน", + amount = r.amount, + positionSalaryAmount = r.positionSalaryAmount, + mouthSalaryAmount = r.mouthSalaryAmount, }).ToList(); var baseAPIOrg = _configuration["API"]; @@ -1598,7 +1623,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers refCommandDate = DateTime.Now, detail = p.DisciplineDisciplinary.Title, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, - unStigma = "คำสั่งเพิ่มโทษ" + unStigma = "คำสั่งเพิ่มโทษ", + amount = r.amount, + positionSalaryAmount = r.positionSalaryAmount, + mouthSalaryAmount = r.mouthSalaryAmount, }).ToList(); var baseAPIOrg = _configuration["API"]; @@ -1706,7 +1734,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers refCommandDate = DateTime.Now, detail = p.DisciplineDisciplinary.Title, level = p.DisciplineDisciplinary.DisciplinaryFaultLevel, - unStigma = "คำสั่งงดโทษ" + unStigma = "คำสั่งงดโทษ", + amount = r.amount, + positionSalaryAmount = r.positionSalaryAmount, + mouthSalaryAmount = r.mouthSalaryAmount, }).ToList(); var baseAPIOrg = _configuration["API"]; @@ -1830,7 +1861,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers refCommandDate = DateTime.Now, detail = p.DisciplineInvestigate.Title, level = "", - unStigma = "คำสั่งยุติเรื่อง" + unStigma = "คำสั่งยุติเรื่อง", + amount = r.amount, + positionSalaryAmount = r.positionSalaryAmount, + mouthSalaryAmount = r.mouthSalaryAmount, }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; diff --git a/BMA.EHR.Leave/Controllers/LeaveRequestController.cs b/BMA.EHR.Leave/Controllers/LeaveRequestController.cs index 1920fe7a..15299fbd 100644 --- a/BMA.EHR.Leave/Controllers/LeaveRequestController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveRequestController.cs @@ -1462,7 +1462,7 @@ namespace BMA.EHR.Leave.Service.Controllers var _res = await client.PostAsJsonAsync(apiUrlOrg, new { refId = id, - sysName = "SYS_LEAVE_LIST", + sysName = "LEAVE_LIST", posLevelName = profile.PosLevel?.PosLevelName ?? "", posTypeName = profile.PosType?.PosTypeName ?? "", }); diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs index 070e62f6..459aee65 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs @@ -1712,7 +1712,8 @@ namespace BMA.EHR.Placement.Service.Controllers positionType = p.posTypeName == null ? string.Empty : p.posTypeName, positionLevel = p.posLevelName == null ? string.Empty : p.posLevelName, refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}", - templateDoc = r.templateDoc + templateDoc = r.templateDoc, + isGovernment = true }, bodyPosition = new { @@ -1978,7 +1979,8 @@ namespace BMA.EHR.Placement.Service.Controllers positionType = p.posTypeName == null ? string.Empty : p.posTypeName, positionLevel = p.posLevelName == null ? string.Empty : p.posLevelName, refCommandNo = $"{r.commandNo}/{r.commandYear.ToThaiYear()}", - templateDoc = r.templateDoc + templateDoc = r.templateDoc, + isGovernment = true }, bodyPosition = new { diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs index c27da4b6..282f08e3 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs @@ -605,7 +605,7 @@ namespace BMA.EHR.Placement.Service.Controllers var _res = await client.PostAsJsonAsync(apiUrlOrg, new { refId = placementTransfer.Id, - sysName = "SYS_TRANSFER_REQ", + sysName = "PLACEMENT_TRANSFER", posLevelName = placementTransfer.posLevelNameOld, posTypeName = placementTransfer.posTypeNameOld, }); diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs index 53900634..263d33ab 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs @@ -759,6 +759,7 @@ namespace BMA.EHR.Retirement.Service.Controllers isLeave = false, leaveReason = _null, dateLeave = _null, + isGovernment = true, }).ToList(); var baseAPIOrg = _configuration["API"]; @@ -911,6 +912,7 @@ namespace BMA.EHR.Retirement.Service.Controllers isLeave = false, leaveReason = _null, dateLeave = _null, + isGovernment = true }).ToList(); var baseAPIOrg = _configuration["API"]; diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs index eea78c11..c442f029 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs @@ -547,6 +547,7 @@ namespace BMA.EHR.Retirement.Service.Controllers isLeave = true, leaveReason = "ให้ออกจากราชการ", dateLeave = r.commandAffectDate, + isGovernment = false }).ToList(); var baseAPIOrg = _configuration["API"]; diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs index aa3f5b2d..e3c603ae 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs @@ -526,7 +526,7 @@ namespace BMA.EHR.Retirement.Service.Controllers var _res = await client.PostAsJsonAsync($"{_configuration["API"]}/org/workflow/add-workflow", new { refId = retirementResign.Id, - sysName = "SYS_RESIGN", + sysName = "RETIREMENT_RESIFNATION", posLevelName = retirementResign.PositionLevelOld, posTypeName = retirementResign.PositionTypeOld, }); @@ -1882,6 +1882,7 @@ namespace BMA.EHR.Retirement.Service.Controllers isLeave = true, leaveReason = "ลาออกจากราชการ", dateLeave = r.commandAffectDate, + isGovernment = false }).ToList(); var baseAPIOrg = _configuration["API"];