From d3563327184817eef41cc319bbdaad44a07a09e3 Mon Sep 17 00:00:00 2001 From: kittapath Date: Mon, 28 Oct 2024 09:57:11 +0700 Subject: [PATCH] no message --- .github/workflows/release_Retirement.yaml | 36 ++--- .github/workflows/release_discipline.yaml | 36 ++--- .github/workflows/release_placement.yaml | 36 ++--- .../Controllers/DisciplineResultController.cs | 18 ++- .../PlacementAppointmentController.cs | 132 +++++++++++++++- .../Controllers/PlacementController.cs | 146 +++++++++++++++++- .../Controllers/PlacementOfficerController.cs | 21 ++- .../Controllers/PlacementReceiveController.cs | 28 +++- .../PlacementTransferController.cs | 24 ++- .../Controllers/RetirementOtherController.cs | 59 ++++++- .../Controllers/RetirementResignController.cs | 54 ++++++- 11 files changed, 515 insertions(+), 75 deletions(-) diff --git a/.github/workflows/release_Retirement.yaml b/.github/workflows/release_Retirement.yaml index 3b55f2ff..02bfe31e 100644 --- a/.github/workflows/release_Retirement.yaml +++ b/.github/workflows/release_Retirement.yaml @@ -69,21 +69,21 @@ jobs: docker compose pull docker compose up -d echo "${{ steps.gen_ver.outputs.image_ver }}"> success - - uses: snow-actions/line-notify@v1.1.0 - if: success() - with: - access_token: ${{ env.TOKEN_LINE }} - message: | - -Success✅✅✅ - Image: ${{env.IMAGE_NAME}} - Version: ${{ github.event.inputs.IMAGE_VER }} - By: ${{secrets.DOCKER_USER}} - - uses: snow-actions/line-notify@v1.1.0 - if: failure() - with: - access_token: ${{ env.TOKEN_LINE }} - message: | - -Failure❌❌❌ - Image: ${{env.IMAGE_NAME}} - Version: ${{ github.event.inputs.IMAGE_VER }} - By: ${{secrets.DOCKER_USER}} + # - uses: snow-actions/line-notify@v1.1.0 + # if: success() + # with: + # access_token: ${{ env.TOKEN_LINE }} + # message: | + # -Success✅✅✅ + # Image: ${{env.IMAGE_NAME}} + # Version: ${{ github.event.inputs.IMAGE_VER }} + # By: ${{secrets.DOCKER_USER}} + # - uses: snow-actions/line-notify@v1.1.0 + # if: failure() + # with: + # access_token: ${{ env.TOKEN_LINE }} + # message: | + # -Failure❌❌❌ + # Image: ${{env.IMAGE_NAME}} + # Version: ${{ github.event.inputs.IMAGE_VER }} + # By: ${{secrets.DOCKER_USER}} diff --git a/.github/workflows/release_discipline.yaml b/.github/workflows/release_discipline.yaml index d3bb9e88..59f6f5e9 100644 --- a/.github/workflows/release_discipline.yaml +++ b/.github/workflows/release_discipline.yaml @@ -69,21 +69,21 @@ jobs: docker compose pull docker compose up -d echo "${{ steps.gen_ver.outputs.image_ver }}"> success - - uses: snow-actions/line-notify@v1.1.0 - if: success() - with: - access_token: ${{ env.TOKEN_LINE }} - message: | - -Success✅✅✅ - Image: ${{env.IMAGE_NAME}} - Version: ${{ github.event.inputs.IMAGE_VER }} - By: ${{secrets.DOCKER_USER}} - - uses: snow-actions/line-notify@v1.1.0 - if: failure() - with: - access_token: ${{ env.TOKEN_LINE }} - message: | - -Failure❌❌❌ - Image: ${{env.IMAGE_NAME}} - Version: ${{ github.event.inputs.IMAGE_VER }} - By: ${{secrets.DOCKER_USER}} + # - uses: snow-actions/line-notify@v1.1.0 + # if: success() + # with: + # access_token: ${{ env.TOKEN_LINE }} + # message: | + # -Success✅✅✅ + # Image: ${{env.IMAGE_NAME}} + # Version: ${{ github.event.inputs.IMAGE_VER }} + # By: ${{secrets.DOCKER_USER}} + # - uses: snow-actions/line-notify@v1.1.0 + # if: failure() + # with: + # access_token: ${{ env.TOKEN_LINE }} + # message: | + # -Failure❌❌❌ + # Image: ${{env.IMAGE_NAME}} + # Version: ${{ github.event.inputs.IMAGE_VER }} + # By: ${{secrets.DOCKER_USER}} diff --git a/.github/workflows/release_placement.yaml b/.github/workflows/release_placement.yaml index 2931b2b7..53c65a53 100644 --- a/.github/workflows/release_placement.yaml +++ b/.github/workflows/release_placement.yaml @@ -69,21 +69,21 @@ jobs: docker compose pull docker compose up -d echo "${{ steps.gen_ver.outputs.image_ver }}"> success - - uses: snow-actions/line-notify@v1.1.0 - if: success() - with: - access_token: ${{ env.TOKEN_LINE }} - message: | - -Success✅✅✅ - Image: ${{env.IMAGE_NAME}} - Version: ${{ github.event.inputs.IMAGE_VER }} - By: ${{secrets.DOCKER_USER}} - - uses: snow-actions/line-notify@v1.1.0 - if: failure() - with: - access_token: ${{ env.TOKEN_LINE }} - message: | - -Failure❌❌❌ - Image: ${{env.IMAGE_NAME}} - Version: ${{ github.event.inputs.IMAGE_VER }} - By: ${{secrets.DOCKER_USER}} + # - uses: snow-actions/line-notify@v1.1.0 + # if: success() + # with: + # access_token: ${{ env.TOKEN_LINE }} + # message: | + # -Success✅✅✅ + # Image: ${{env.IMAGE_NAME}} + # Version: ${{ github.event.inputs.IMAGE_VER }} + # By: ${{secrets.DOCKER_USER}} + # - uses: snow-actions/line-notify@v1.1.0 + # if: failure() + # with: + # access_token: ${{ env.TOKEN_LINE }} + # message: | + # -Failure❌❌❌ + # Image: ${{env.IMAGE_NAME}} + # Version: ${{ github.event.inputs.IMAGE_VER }} + # By: ${{secrets.DOCKER_USER}} diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index e6b5cfcd..9bed8741 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -1013,7 +1013,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) .ToListAsync(); - var resultData = (from p in data + var report_data = (from p in data join r in req.refIds on p.Id.ToString() equals r.refId select new @@ -1025,7 +1025,21 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers salary = r.Amount }).ToList(); - return Success(resultData); + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + fullName = _null, + positionname = r.RemarkHorizontal, + positionno = _null, + organizationname = _null, + salary = _null, + }); + } + return Success(result); } catch { diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs index c64be772..ef616479 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs @@ -857,7 +857,34 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + Education = _null, + OldOc = _null, + OldPositionType = _null, + OldPositionLevel = _null, + OldPositionNumber = _null, + OldSalary = _null, + LeaveDate = _null, + NewOc = _null, + NewPositionType = _null, + NewPositionLevel = _null, + NewPositionNumber = _null, + NewSalary = _null, + AppointDate = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { @@ -1036,7 +1063,34 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + Education = _null, + OldOc = _null, + OldPositionType = _null, + OldPositionLevel = _null, + OldPositionNumber = _null, + OldSalary = _null, + LeaveDate = _null, + NewOc = _null, + NewPositionType = _null, + NewPositionLevel = _null, + NewPositionNumber = _null, + NewSalary = _null, + AppointDate = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { @@ -1193,7 +1247,29 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + OldOrganization = _null, + OldPositionLevel = _null, + OldPositionNumber = _null, + OldSalary = _null, + NewOc = _null, + NewPositionLevel = _null, + NewPositionNumber = _null, + NewSalary = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { @@ -1345,7 +1421,27 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + OldOc = _null, + OldPositionNumber = _null, + OldSalary = _null, + NewOc = _null, + NewPositionNumber = _null, + NewSalary = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { @@ -1508,7 +1604,33 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + Education = _null, + OldOc = _null, + OldPositionType = _null, + OldPositionLevel = _null, + OldPositionNumber = _null, + OldSalary = _null, + NewOc = _null, + NewPositionType = _null, + NewPositionLevel = _null, + NewPositionNumber = _null, + NewSalary = _null, + AppointDate = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs index 385725ee..9d0af130 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs @@ -1599,7 +1599,34 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + Education = _null, + PositionName = _null, + ExamNumber = _null, + PlacementName = _null, + Oc = _null, + PositionType = _null, + PositionLevel = _null, + PositionNumber = _null, + Salary = _null, + AppointDate = _null, + OccupationPosition = _null, + PositionCandidate = _null, + OcCandidate = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { @@ -1871,7 +1898,33 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + Education = _null, + PositionName = _null, + ExamNumber = _null, + PlacementName = _null, + Oc = _null, + PositionType = _null, + PositionLevel = _null, + PositionNumber = _null, + Salary = _null, + AppointDate = _null, + OccupationPosition = _null, + PositionCandidate = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { @@ -2162,7 +2215,35 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + Education = _null, + OldOc = _null, + OldPositionType = _null, + OldPositionLevel = _null, + OldPositionNumber = _null, + OldSalary = _null, + OldPosition = _null, + NewOc = _null, + NewPosition = _null, + NewPositionType = _null, + NewPositionLevel = _null, + NewPositionNumber = _null, + NewSalary = _null, + AppointDate = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { @@ -2356,7 +2437,35 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + Education = _null, + OldOc = _null, + OldPosition = _null, + OldPositionType = _null, + OldPositionLevel = _null, + OldPositionNumber = _null, + OldSalary = _null, + NewOc = _null, + NewPosition = _null, + NewPositionType = _null, + NewPositionLevel = _null, + NewPositionNumber = _null, + NewSalary = _null, + AppointDate = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { @@ -2542,7 +2651,34 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + Education = _null, + OldOc = _null, + OldPositionType = _null, + OldPositionLevel = _null, + OldPositionNumber = _null, + OldSalary = _null, + LeaveDate = _null, + NewOc = _null, + NewPositionType = _null, + NewPositionLevel = _null, + NewPositionNumber = _null, + NewSalary = _null, + AppointDate = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs index 1278de12..810e46bd 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs @@ -660,7 +660,26 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + PositionName = _null, + Organization = _null, + StartDate = _null, + EndDate = _null, + Reason = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs index 4c3c330e..be777e86 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs @@ -14,6 +14,7 @@ using Newtonsoft.Json.Linq; using Swashbuckle.AspNetCore.Annotations; using System.Net.Http.Headers; using System.Security.Claims; +using System.Reflection; namespace BMA.EHR.Placement.Service.Controllers { @@ -991,7 +992,32 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + Education = _null, + OldOc = _null, + OldPositionType = _null, + OldPositionLevel = _null, + OldSalary = _null, + NewOc = _null, + NewPositionType = _null, + NewPositionLevel = _null, + NewPositionNumber = _null, + NewSalary = _null, + AppointDate = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs index 607b88aa..1e6bba4a 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs @@ -866,7 +866,29 @@ namespace BMA.EHR.Placement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + OldOc = _null, + PositionType = _null, + PositionLevel = _null, + PositionNumber = _null, + Salary = _null, + ReceiveOrganizationName = _null, + ActiveDate = _null, + Reason = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs index 81452701..0f6f6e66 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs @@ -713,7 +713,34 @@ namespace BMA.EHR.Retirement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + Education = _null, + OldOc = _null, + OldPositionType = _null, + OldPositionLevel = _null, + OldPositionNumber = _null, + OldSalary = _null, + LeaveDate = _null, + NewOc = _null, + NewPositionType = _null, + NewPositionLevel = _null, + NewPositionNumber = _null, + NewSalary = _null, + AppointDate = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { @@ -886,7 +913,35 @@ namespace BMA.EHR.Retirement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + Education = _null, + OldOc = _null, + OldPositionType = _null, + OldPositionLevel = _null, + OldPositionNumber = _null, + OldSalary = _null, + LeaveDate = _null, + MilitaryDate = _null, + NewOc = _null, + NewPositionType = _null, + NewPositionLevel = _null, + NewPositionNumber = _null, + NewSalary = _null, + AppointDate = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs index 30e9c2b0..2882603d 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs @@ -1743,7 +1743,7 @@ namespace BMA.EHR.Retirement.Service.Controllers orderby r.Sequence select new { - Seq = r.Sequence.ToString().ToThaiNumber(), + No = r.Sequence.ToString().ToThaiNumber(), CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(), FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", PositionName = p.PositionOld ?? "", @@ -1757,7 +1757,30 @@ namespace BMA.EHR.Retirement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + CitizenId = _null, + PositionName = _null, + Organization = _null, + PositionLevel = _null, + PositionType = _null, + PositionNumber = _null, + ActiveDate = _null, + Salary = _null, + Remark = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch { @@ -1984,7 +2007,7 @@ namespace BMA.EHR.Retirement.Service.Controllers orderby r.Sequence select new { - Seq = r.Sequence.ToString().ToThaiNumber(), + No = r.Sequence.ToString().ToThaiNumber(), CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(), FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", PositionName = p.PositionOld ?? "", @@ -1998,7 +2021,30 @@ namespace BMA.EHR.Retirement.Service.Controllers RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); - return Success(report_data); + + var result = new List(); + + foreach (var r in report_data) + { + result.Add(r); + string? _null = null; + result.Add(new { + No = _null, + FullName = r.RemarkHorizontal, + CitizenId = _null, + PositionName = _null, + Organization = _null, + PositionLevel = _null, + PositionType = _null, + PositionNumber = _null, + ActiveDate = _null, + Salary = _null, + Remark = _null, + RemarkHorizontal = _null, + RemarkVertical = _null, + }); + } + return Success(result); } catch {