Merge branch 'develop' of github.com:Frappet/BMA-EHR-BackEnd into develop
This commit is contained in:
commit
0b6ba817f6
58 changed files with 26024 additions and 6121 deletions
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"version": 1,
|
|
||||||
"isRoot": true,
|
|
||||||
"tools": {
|
|
||||||
"csharpier": {
|
|
||||||
"version": "0.28.2",
|
|
||||||
"commands": [
|
|
||||||
"dotnet-csharpier"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
162
.github/workflows/release_insignia.yaml
vendored
162
.github/workflows/release_insignia.yaml
vendored
|
|
@ -1,88 +1,88 @@
|
||||||
name: release-dev
|
name: release-dev
|
||||||
run-name: release-dev ${{ github.actor }}
|
run-name: release-dev ${{ github.actor }}
|
||||||
on:
|
on:
|
||||||
# push:
|
# push:
|
||||||
# tags:
|
# tags:
|
||||||
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
# tags-ignore:
|
# tags-ignore:
|
||||||
# - '2.*'
|
# - '2.*'
|
||||||
# Allow run workflow manually from Action tab
|
# Allow run workflow manually from Action tab
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.frappet.com
|
REGISTRY: docker.frappet.com
|
||||||
IMAGE_NAME: ehr/bma-ehr-insignia-service
|
IMAGE_NAME: ehr/bma-ehr-insignia-service
|
||||||
DEPLOY_HOST: frappet.com
|
DEPLOY_HOST: frappet.com
|
||||||
DEPLOY_PORT: 10102
|
DEPLOY_PORT: 10102
|
||||||
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-insignia
|
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-insignia
|
||||||
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||||
|
|
||||||
jobs:
|
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=insignia-1.0.0 -s DOCKER_USER=sorawit -s DOCKER_PASS=P@ssword -s SSH_PASSWORD=P@ssw0rd
|
||||||
release-dev:
|
release-dev:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
# skip Set up QEMU because it fail on act and container
|
# skip Set up QEMU because it fail on act and container
|
||||||
- name: Gen Version
|
- name: Gen Version
|
||||||
id: gen_ver
|
id: gen_ver
|
||||||
run: |
|
run: |
|
||||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||||
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
IMAGE_VER='${GITHUB_REF/refs\/tags\//}'
|
||||||
else
|
else
|
||||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||||
fi
|
fi
|
||||||
if [[ $IMAGE_VER == '' ]]; then
|
if [[ $IMAGE_VER == '' ]]; then
|
||||||
IMAGE_VER='test-vBeta'
|
IMAGE_VER='test-vBeta'
|
||||||
fi
|
fi
|
||||||
echo '::set-output name=image_ver::'$IMAGE_VER
|
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||||
- name: Test Version
|
- name: Test Version
|
||||||
run: |
|
run: |
|
||||||
echo $GITHUB_REF
|
echo $GITHUB_REF
|
||||||
echo ${{ steps.gen_ver.outputs.image_ver }}
|
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Login in to registry
|
- name: Login in to registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ${{env.REGISTRY}}
|
registry: ${{env.REGISTRY}}
|
||||||
username: ${{secrets.DOCKER_USER}}
|
username: ${{secrets.DOCKER_USER}}
|
||||||
password: ${{secrets.DOCKER_PASS}}
|
password: ${{secrets.DOCKER_PASS}}
|
||||||
- name: Build and load local docker image
|
- name: Build and load local docker image
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
file: BMA.EHR.Insignia.Service/Dockerfile
|
file: BMA.EHR.Insignia/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||||
|
|
||||||
- name: Reload docker compose
|
- name: Reload docker compose
|
||||||
uses: appleboy/ssh-action@v0.1.8
|
uses: appleboy/ssh-action@v0.1.8
|
||||||
with:
|
with:
|
||||||
host: ${{env.DEPLOY_HOST}}
|
host: ${{env.DEPLOY_HOST}}
|
||||||
username: frappet
|
username: frappet
|
||||||
password: ${{ secrets.SSH_PASSWORD }}
|
password: ${{ secrets.SSH_PASSWORD }}
|
||||||
port: ${{env.DEPLOY_PORT}}
|
port: ${{env.DEPLOY_PORT}}
|
||||||
script: |
|
script: |
|
||||||
cd "${{env.COMPOSE_PATH}}"
|
cd "${{env.COMPOSE_PATH}}"
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||||
- uses: snow-actions/line-notify@v1.1.0
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
access_token: ${{ env.TOKEN_LINE }}
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
message: |
|
message: |
|
||||||
-Success✅✅✅
|
-Success✅✅✅
|
||||||
Image: ${{env.IMAGE_NAME}}
|
Image: ${{env.IMAGE_NAME}}
|
||||||
Version: ${{ github.event.inputs.IMAGE_VER }}
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
By: ${{secrets.DOCKER_USER}}
|
By: ${{secrets.DOCKER_USER}}
|
||||||
- uses: snow-actions/line-notify@v1.1.0
|
- uses: snow-actions/line-notify@v1.1.0
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
access_token: ${{ env.TOKEN_LINE }}
|
access_token: ${{ env.TOKEN_LINE }}
|
||||||
message: |
|
message: |
|
||||||
-Failure❌❌❌
|
-Failure❌❌❌
|
||||||
Image: ${{env.IMAGE_NAME}}
|
Image: ${{env.IMAGE_NAME}}
|
||||||
Version: ${{ github.event.inputs.IMAGE_VER }}
|
Version: ${{ github.event.inputs.IMAGE_VER }}
|
||||||
By: ${{secrets.DOCKER_USER}}
|
By: ${{secrets.DOCKER_USER}}
|
||||||
|
|
|
||||||
2
.idea/.idea.BMA.EHR.Solution/.idea/.gitignore
generated
vendored
2
.idea/.idea.BMA.EHR.Solution/.idea/.gitignore
generated
vendored
|
|
@ -4,8 +4,8 @@
|
||||||
# Rider ignored files
|
# Rider ignored files
|
||||||
/contentModel.xml
|
/contentModel.xml
|
||||||
/.idea.BMA.EHR.Solution.iml
|
/.idea.BMA.EHR.Solution.iml
|
||||||
/projectSettingsUpdater.xml
|
|
||||||
/modules.xml
|
/modules.xml
|
||||||
|
/projectSettingsUpdater.xml
|
||||||
# Editor-based HTTP Client requests
|
# Editor-based HTTP Client requests
|
||||||
/httpRequests/
|
/httpRequests/
|
||||||
# Datasource local storage ignored files
|
# Datasource local storage ignored files
|
||||||
|
|
|
||||||
11
.idea/.idea.BMA.EHR.Solution/.idea/aws.xml
generated
11
.idea/.idea.BMA.EHR.Solution/.idea/aws.xml
generated
|
|
@ -1,11 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="accountSettings">
|
|
||||||
<option name="activeRegion" value="us-east-1" />
|
|
||||||
<option name="recentlyUsedRegions">
|
|
||||||
<list>
|
|
||||||
<option value="us-east-1" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -9158,11 +9158,14 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
var raw = JsonConvert.DeserializeObject<dynamic>(apiResult.Result);
|
var raw = JsonConvert.DeserializeObject<dynamic>(apiResult.Result);
|
||||||
if (raw != null)
|
if (raw != null)
|
||||||
{
|
{
|
||||||
ret.Add(new KeyValueItemResponse
|
if(raw.result!.rootId != null && raw.result!.root != null)
|
||||||
{
|
{
|
||||||
Id = raw.result!.rootId ?? null,
|
ret.Add(new KeyValueItemResponse
|
||||||
Name = raw.result!.root ?? null,
|
{
|
||||||
});
|
Id = raw.result!.rootId ?? null,
|
||||||
|
Name = raw.result!.root ?? null,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// var rootOcId = await GetRootOcIdAsync(UserOrganizationId);
|
// var rootOcId = await GetRootOcIdAsync(UserOrganizationId);
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -6,28 +6,46 @@ namespace BMA.EHR.Application.Requests
|
||||||
{
|
{
|
||||||
public Guid ProfileId { get; set; }
|
public Guid ProfileId { get; set; }
|
||||||
|
|
||||||
public string Prefix { get; set; }
|
public string CitizenId { get; set; } = String.Empty;
|
||||||
|
|
||||||
public string FullName { get; set; }
|
public string Prefix { get; set; } = String.Empty;
|
||||||
|
|
||||||
public string Position { get; set; }
|
public string FirstName { get; set; } = String.Empty;
|
||||||
|
|
||||||
public string Rank { get; set; }
|
public string LastName { get; set; } = String.Empty;
|
||||||
|
|
||||||
public string GovAge { get; set; }
|
public DateTime? BirthDate { get; set; }
|
||||||
|
|
||||||
|
public DateTime? DateAppoint { get; set; }
|
||||||
|
|
||||||
|
public string? ProfileType { get; set; }
|
||||||
|
|
||||||
|
public string? PosTypeName { get; set; }
|
||||||
|
|
||||||
|
public string? PosLevelName { get; set; }
|
||||||
|
|
||||||
|
public string FullName { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public string Position { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public string Rank { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public string GovAge { get; set; } = String.Empty;
|
||||||
|
|
||||||
public double? Salary { get; set; }
|
public double? Salary { get; set; }
|
||||||
|
|
||||||
public string LastInsignia { get; set; }
|
public double? PositionSalary { get; set; }
|
||||||
|
|
||||||
|
public string LastInsignia { get; set; } = String.Empty;
|
||||||
public Guid? LastInsigniaId { get; set; }
|
public Guid? LastInsigniaId { get; set; }
|
||||||
|
|
||||||
//public Guid PosNo { get; set; }
|
//public Guid PosNo { get; set; }
|
||||||
|
|
||||||
public string PosNo { get; set; }
|
public string PosNo { get; set; } = String.Empty;
|
||||||
|
|
||||||
public InsigniaItem RequestInsignia { get; set; }
|
public InsigniaItem RequestInsignia { get; set; } = new();
|
||||||
|
|
||||||
public string Gender { get; set; }
|
public string Gender { get; set; } = String.Empty;
|
||||||
|
|
||||||
public int Seq { get; set; }
|
public int Seq { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,5 +71,7 @@ namespace BMA.EHR.Domain.Models.Insignias
|
||||||
public string? PosNo { get; set; }
|
public string? PosNo { get; set; }
|
||||||
public double? Amount { get; set; }
|
public double? Amount { get; set; }
|
||||||
public double? PositionSalaryAmount { get; set; }
|
public double? PositionSalaryAmount { get; set; }
|
||||||
|
|
||||||
|
public string? LastInsigniaName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.9" />
|
<PackageReference Include="Oracle.EntityFrameworkCore" Version="7.21.9" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2" />
|
||||||
|
<PackageReference Include="RabbitMQ.Client" Version="6.8.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using BMA.EHR.Application.Common.Interfaces;
|
using BMA.EHR.Application.Common.Interfaces;
|
||||||
using BMA.EHR.Application.Repositories;
|
using BMA.EHR.Application.Repositories;
|
||||||
|
using BMA.EHR.Infrastructure.MessageQueue;
|
||||||
using BMA.EHR.Infrastructure.Persistence;
|
using BMA.EHR.Infrastructure.Persistence;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
|
|
@ -9,6 +10,15 @@ namespace BMA.EHR.Infrastructure
|
||||||
{
|
{
|
||||||
public static class InfrastructureServiceRegistration
|
public static class InfrastructureServiceRegistration
|
||||||
{
|
{
|
||||||
|
public static IServiceCollection AddMessageQueue(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddTransient<RabbitMQConnection>();
|
||||||
|
services.AddTransient<RabbitMQProducer>();
|
||||||
|
services.AddTransient<RabbitMQConsumer>();
|
||||||
|
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
|
||||||
public static IServiceCollection AddLeavePersistence(this IServiceCollection services,
|
public static IServiceCollection AddLeavePersistence(this IServiceCollection services,
|
||||||
IConfiguration configuration)
|
IConfiguration configuration)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
12
BMA.EHR.Infrastructure/MessageQueue/InsigniaRequestPeriod.cs
Normal file
12
BMA.EHR.Infrastructure/MessageQueue/InsigniaRequestPeriod.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace BMA.EHR.Infrastructure.MessageQueue
|
||||||
|
{
|
||||||
|
public class InsigniaRequestPeriod
|
||||||
|
{
|
||||||
|
public Guid PeriodId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
45
BMA.EHR.Infrastructure/MessageQueue/RabbitMQConnection.cs
Normal file
45
BMA.EHR.Infrastructure/MessageQueue/RabbitMQConnection.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using RabbitMQ.Client;
|
||||||
|
|
||||||
|
namespace BMA.EHR.Infrastructure.MessageQueue
|
||||||
|
{
|
||||||
|
public class RabbitMQConnection
|
||||||
|
{
|
||||||
|
private readonly IConnection _connection;
|
||||||
|
private readonly IModel _channel;
|
||||||
|
|
||||||
|
private readonly IConfiguration _configuration;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="configuration"></param>
|
||||||
|
public RabbitMQConnection(IConfiguration configuration)
|
||||||
|
{
|
||||||
|
_configuration = configuration;
|
||||||
|
var hostName = _configuration["RabbitMQ:URL"];
|
||||||
|
var userName = _configuration["RabbitMQ:UserName"];
|
||||||
|
var password = _configuration["RabbitMQ:Password"];
|
||||||
|
|
||||||
|
|
||||||
|
var factory = new ConnectionFactory() { HostName = hostName, UserName = userName, Password = password };
|
||||||
|
_connection = factory.CreateConnection();
|
||||||
|
_channel = _connection.CreateModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public IModel GetChannel() => _channel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
_channel?.Close();
|
||||||
|
_connection?.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
104
BMA.EHR.Infrastructure/MessageQueue/RabbitMQConsumer.cs
Normal file
104
BMA.EHR.Infrastructure/MessageQueue/RabbitMQConsumer.cs
Normal file
|
|
@ -0,0 +1,104 @@
|
||||||
|
using System.Text;
|
||||||
|
using BMA.EHR.Application.Repositories;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using RabbitMQ.Client.Events;
|
||||||
|
|
||||||
|
namespace BMA.EHR.Infrastructure.MessageQueue
|
||||||
|
{
|
||||||
|
public class RabbitMQConsumer
|
||||||
|
{
|
||||||
|
private readonly RabbitMQConnection _connection;
|
||||||
|
private readonly UserProfileRepository _userProfileRepository;
|
||||||
|
private readonly InsigniaPeriodsRepository _insigniaPeriodsRepository;
|
||||||
|
|
||||||
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||||
|
|
||||||
|
|
||||||
|
private const string INSIGNIA_QUEUE = "bma_insignia_request";
|
||||||
|
|
||||||
|
|
||||||
|
public RabbitMQConsumer(RabbitMQConnection connection,
|
||||||
|
UserProfileRepository userProfileRepository,
|
||||||
|
InsigniaPeriodsRepository insigniaPeriodsRepository,
|
||||||
|
IHttpContextAccessor httpContextAccessor)
|
||||||
|
{
|
||||||
|
_connection = connection;
|
||||||
|
_userProfileRepository = userProfileRepository;
|
||||||
|
_insigniaPeriodsRepository = insigniaPeriodsRepository;
|
||||||
|
_httpContextAccessor = httpContextAccessor;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region " Properties "
|
||||||
|
|
||||||
|
private bool? RoleAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("admin");
|
||||||
|
private bool? RoleInsignia1 => _httpContextAccessor?.HttpContext?.User?.IsInRole("insignia1");
|
||||||
|
private bool? RoleInsignia2 => _httpContextAccessor?.HttpContext?.User?.IsInRole("insignia2");
|
||||||
|
private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"];
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private async Task CalculateInsigniaAsync(Guid periodId)
|
||||||
|
{
|
||||||
|
var organizations = await _userProfileRepository.GetActiveRootAsync(AccessToken);
|
||||||
|
|
||||||
|
foreach (var organization in organizations)
|
||||||
|
{
|
||||||
|
if (organization == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
//if(organization.Id != Guid.Parse("e8493cd1-d371-402e-add6-566e68d5d1b3")) continue;
|
||||||
|
|
||||||
|
var result = await _insigniaPeriodsRepository.GetInsigniaRequest(periodId, organization.Id);
|
||||||
|
if (result != null)
|
||||||
|
{
|
||||||
|
Guid period = result.PeriodId;
|
||||||
|
string requestStatus = result.RequestStatus;
|
||||||
|
var candidate = await _insigniaPeriodsRepository.GetInsigniaCandidateBKK(periodId, organization.Id);
|
||||||
|
// ตรวจสอบว่ารายการอยู่ใน table insignia_request_new
|
||||||
|
if (requestStatus == null)
|
||||||
|
{
|
||||||
|
// บันทึกรายชื่อ
|
||||||
|
await _insigniaPeriodsRepository.InsertCandidate(period, organization.Id, candidate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public void StartReceiving()
|
||||||
|
{
|
||||||
|
var channel = _connection.GetChannel();
|
||||||
|
channel.QueueDeclare(queue: INSIGNIA_QUEUE,
|
||||||
|
durable: false,
|
||||||
|
exclusive: false,
|
||||||
|
autoDelete: false,
|
||||||
|
arguments: null);
|
||||||
|
|
||||||
|
var consumer = new EventingBasicConsumer(channel);
|
||||||
|
consumer.Received += (model, ea) =>
|
||||||
|
{
|
||||||
|
var body = ea.Body.ToArray();
|
||||||
|
var message = Encoding.UTF8.GetString(body);
|
||||||
|
//var request = JsonConvert.DeserializeObject<InsigniaRequestPeriod>(message);
|
||||||
|
|
||||||
|
Console.WriteLine(" [x] Received {0}", message);
|
||||||
|
var periodId = Guid.Parse(message);
|
||||||
|
|
||||||
|
// process insignia request while receive message
|
||||||
|
var res = CalculateInsigniaAsync(periodId);
|
||||||
|
Console.WriteLine(" [x] Success Calculate Period {0}", periodId);
|
||||||
|
};
|
||||||
|
|
||||||
|
channel.BasicConsume(queue: INSIGNIA_QUEUE,
|
||||||
|
autoAck: true,
|
||||||
|
consumer: consumer,
|
||||||
|
consumerTag: "",
|
||||||
|
noLocal: false,
|
||||||
|
exclusive: false,
|
||||||
|
arguments: null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
69
BMA.EHR.Infrastructure/MessageQueue/RabbitMQProducer.cs
Normal file
69
BMA.EHR.Infrastructure/MessageQueue/RabbitMQProducer.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
using System.Text;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace BMA.EHR.Infrastructure.MessageQueue
|
||||||
|
{
|
||||||
|
public class RabbitMQProducer
|
||||||
|
{
|
||||||
|
private readonly RabbitMQConnection _connection;
|
||||||
|
|
||||||
|
private const string INSIGNIA_QUEUE = "bma_insignia_request";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection"></param>
|
||||||
|
public RabbitMQProducer(RabbitMQConnection connection)
|
||||||
|
{
|
||||||
|
_connection = connection;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="message"></param>
|
||||||
|
public void SendMessage(string message)
|
||||||
|
{
|
||||||
|
var channel = _connection.GetChannel();
|
||||||
|
channel.QueueDeclare(queue: "myqueue",
|
||||||
|
durable: false,
|
||||||
|
exclusive: false,
|
||||||
|
autoDelete: false,
|
||||||
|
arguments: null);
|
||||||
|
|
||||||
|
var body = Encoding.UTF8.GetBytes(message);
|
||||||
|
|
||||||
|
channel.BasicPublish(exchange: "",
|
||||||
|
routingKey: "myqueue",
|
||||||
|
mandatory: false,
|
||||||
|
basicProperties: null,
|
||||||
|
body: body);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CalculateInsignia(Guid periodId)
|
||||||
|
{
|
||||||
|
var channel = _connection.GetChannel();
|
||||||
|
|
||||||
|
channel.QueueDeclare(queue: INSIGNIA_QUEUE,
|
||||||
|
durable: false,
|
||||||
|
exclusive: false,
|
||||||
|
autoDelete: false,
|
||||||
|
arguments: null);
|
||||||
|
|
||||||
|
// var req = new InsigniaRequestPeriod
|
||||||
|
// {
|
||||||
|
// PeriodId = periodId
|
||||||
|
// };
|
||||||
|
|
||||||
|
// var serializedObject = JsonConvert.SerializeObject(req);
|
||||||
|
|
||||||
|
var body = Encoding.UTF8.GetBytes(periodId.ToString("D"));
|
||||||
|
|
||||||
|
channel.BasicPublish(exchange: "",
|
||||||
|
routingKey: INSIGNIA_QUEUE,
|
||||||
|
mandatory: false,
|
||||||
|
basicProperties: null,
|
||||||
|
body: body);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
18103
BMA.EHR.Infrastructure/Migrations/20240705100331_Add Last InsigniaName to Request.Designer.cs
generated
Normal file
18103
BMA.EHR.Infrastructure/Migrations/20240705100331_Add Last InsigniaName to Request.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,29 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace BMA.EHR.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddLastInsigniaNametoRequest : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "LastInsigniaName",
|
||||||
|
table: "InsigniaRequestProfiles",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "LastInsigniaName",
|
||||||
|
table: "InsigniaRequestProfiles");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6401,6 +6401,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
||||||
b.Property<bool>("IsApprove")
|
b.Property<bool>("IsApprove")
|
||||||
.HasColumnType("tinyint(1)");
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
|
b.Property<string>("LastInsigniaName")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
b.Property<string>("LastName")
|
b.Property<string>("LastName")
|
||||||
.HasColumnType("longtext");
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<UserSecretsId>93677512-b64b-4a19-9e7d-dd283c7ec901</UserSecretsId>
|
|
||||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
|
||||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
|
||||||
<DockerfileContext>.</DockerfileContext>
|
|
||||||
<RootNamespace>BMA.EHR.Insignia.Service</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Hangfire" Version="1.8.5" />
|
|
||||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.5" />
|
|
||||||
<PackageReference Include="Hangfire.MySqlStorage" Version="2.0.3" />
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.9" />
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.9" />
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.1.0" />
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.9" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Microsoft.IdentityModel.Logging" Version="6.32.0" />
|
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" />
|
|
||||||
<PackageReference Include="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="6.0.5.128" />
|
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
|
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
|
|
||||||
<PackageReference Include="Sentry.AspNetCore" Version="3.33.1" />
|
|
||||||
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.2.0" />
|
|
||||||
<PackageReference Include="Serilog.Exceptions" Version="8.4.0" />
|
|
||||||
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
|
|
||||||
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="9.0.3" />
|
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.5.0" />
|
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\BMA.EHR.Infrastructure\BMA.EHR.Infrastructure.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Update="Templates/PersonInsignia.xlsx">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
File diff suppressed because it is too large
Load diff
51
BMA.EHR.Insignia/BMA.EHR.Insignia.csproj
Normal file
51
BMA.EHR.Insignia/BMA.EHR.Insignia.csproj
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<UserSecretsId>93677512-b64b-4a19-9e7d-dd283c7ec901</UserSecretsId>
|
||||||
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
|
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||||
|
<DockerfileContext>.</DockerfileContext>
|
||||||
|
<RootNamespace>BMA.EHR.Insignia.Service</RootNamespace>
|
||||||
|
<AssemblyName>BMA.EHR.Insignia</AssemblyName>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Hangfire" Version="1.8.5" />
|
||||||
|
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.5" />
|
||||||
|
<PackageReference Include="Hangfire.MySqlStorage" Version="2.0.3" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.9" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.9" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.1.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.9" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.IdentityModel.Logging" Version="6.32.0" />
|
||||||
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" />
|
||||||
|
<PackageReference Include="RabbitMQ.Client" Version="6.8.1" />
|
||||||
|
<PackageReference Include="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="6.0.5.128" />
|
||||||
|
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
|
||||||
|
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
|
||||||
|
<PackageReference Include="Sentry.AspNetCore" Version="3.33.1" />
|
||||||
|
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.2.0" />
|
||||||
|
<PackageReference Include="Serilog.Exceptions" Version="8.4.0" />
|
||||||
|
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
|
||||||
|
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="9.0.3" />
|
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.5.0" />
|
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\BMA.EHR.Infrastructure\BMA.EHR.Infrastructure.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="Templates/PersonInsignia.xlsx">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
2568
BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs
Normal file
2568
BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -11,17 +11,17 @@ WORKDIR /src
|
||||||
COPY ["BMA.EHR.Domain/BMA.EHR.Domain.csproj", "BMA.EHR.Domain/"]
|
COPY ["BMA.EHR.Domain/BMA.EHR.Domain.csproj", "BMA.EHR.Domain/"]
|
||||||
COPY ["BMA.EHR.Application/BMA.EHR.Application.csproj", "BMA.EHR.Application/"]
|
COPY ["BMA.EHR.Application/BMA.EHR.Application.csproj", "BMA.EHR.Application/"]
|
||||||
COPY ["BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj", "BMA.EHR.Infrastructure/"]
|
COPY ["BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj", "BMA.EHR.Infrastructure/"]
|
||||||
COPY ["BMA.EHR.Insignia.Service/BMA.EHR.Insignia.Service.csproj", "BMA.EHR.Insignia.Service/"]
|
COPY ["BMA.EHR.Insignia/BMA.EHR.Insignia.csproj", "BMA.EHR.Insignia/"]
|
||||||
|
|
||||||
RUN dotnet restore "BMA.EHR.Insignia.Service/BMA.EHR.Insignia.Service.csproj"
|
RUN dotnet restore "BMA.EHR.Insignia/BMA.EHR.Insignia.csproj"
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src/BMA.EHR.Insignia.Service"
|
WORKDIR "/src/BMA.EHR.Insignia"
|
||||||
RUN dotnet build "BMA.EHR.Insignia.Service.csproj" -c Release -o /app/build
|
RUN dotnet build "BMA.EHR.Insignia.csproj" -c Release -o /app/build
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
RUN dotnet publish "BMA.EHR.Insignia.Service.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
RUN dotnet publish "BMA.EHR.Insignia.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
ENTRYPOINT ["dotnet", "BMA.EHR.Insignia.Service.dll"]
|
ENTRYPOINT ["dotnet", "BMA.EHR.Insignia.dll"]
|
||||||
|
|
@ -2,6 +2,7 @@ using BMA.EHR.Application;
|
||||||
using BMA.EHR.Application.Repositories.Reports;
|
using BMA.EHR.Application.Repositories.Reports;
|
||||||
using BMA.EHR.Domain.Middlewares;
|
using BMA.EHR.Domain.Middlewares;
|
||||||
using BMA.EHR.Infrastructure;
|
using BMA.EHR.Infrastructure;
|
||||||
|
using BMA.EHR.Infrastructure.MessageQueue;
|
||||||
using BMA.EHR.Infrastructure.Persistence;
|
using BMA.EHR.Infrastructure.Persistence;
|
||||||
using BMA.EHR.Insignia.Service;
|
using BMA.EHR.Insignia.Service;
|
||||||
using BMA.EHR.Insignia.Service.Controllers;
|
using BMA.EHR.Insignia.Service.Controllers;
|
||||||
|
|
@ -90,6 +91,9 @@ var builder = WebApplication.CreateBuilder(args);
|
||||||
builder.Services.AddLeaveApplication();
|
builder.Services.AddLeaveApplication();
|
||||||
builder.Services.AddLeavePersistence(builder.Configuration);
|
builder.Services.AddLeavePersistence(builder.Configuration);
|
||||||
|
|
||||||
|
// RabbitMQ
|
||||||
|
builder.Services.AddMessageQueue();
|
||||||
|
|
||||||
builder.Services.AddControllers(options =>
|
builder.Services.AddControllers(options =>
|
||||||
{
|
{
|
||||||
options.SuppressAsyncSuffixInActionNames = false;
|
options.SuppressAsyncSuffixInActionNames = false;
|
||||||
|
|
@ -172,6 +176,9 @@ var app = builder.Build();
|
||||||
await using var db = scope.ServiceProvider.GetRequiredService<ApplicationDBContext>();
|
await using var db = scope.ServiceProvider.GetRequiredService<ApplicationDBContext>();
|
||||||
await db.Database.MigrateAsync();
|
await db.Database.MigrateAsync();
|
||||||
|
|
||||||
|
var rabbitMQConsumer = app.Services.GetRequiredService<RabbitMQConsumer>();
|
||||||
|
rabbitMQConsumer.StartReceiving();
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -43,5 +43,10 @@
|
||||||
"Node": {
|
"Node": {
|
||||||
"API": "https://bma-ehr.frappet.synology.me/api/v1/probation"
|
"API": "https://bma-ehr.frappet.synology.me/api/v1/probation"
|
||||||
},
|
},
|
||||||
"API": "https://bma-ehr.frappet.synology.me/api/v1"
|
"API": "https://bma-ehr.frappet.synology.me/api/v1",
|
||||||
|
"RabbitMQ" :{
|
||||||
|
"URL": "localhost",
|
||||||
|
"UserName": "frappet",
|
||||||
|
"Password": "FPTadmin2357"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -118,25 +118,33 @@ namespace BMA.EHR.Report.Service.Controllers
|
||||||
{
|
{
|
||||||
_count++;
|
_count++;
|
||||||
}
|
}
|
||||||
|
string position = profile.GetType().GetProperty("position").GetValue(profile);
|
||||||
|
position = position != string.Empty && position != null ? position : "-";
|
||||||
string thaiOrder = profile.GetType().GetProperty("order").GetValue(profile).ToString();
|
string thaiOrder = profile.GetType().GetProperty("order").GetValue(profile).ToString();
|
||||||
thaiOrder = $"ลำดับที่ {thaiOrder.ToThaiNumber()}";
|
thaiOrder = $"ลำดับที่ {thaiOrder.ToThaiNumber()}";
|
||||||
|
string thaiPosNo = profile.GetType().GetProperty("posNo").GetValue(profile);
|
||||||
|
thaiPosNo = thaiPosNo != null ? $"(ตำแหน่งเลขที่ {thaiPosNo.ToThaiNumber()})" : $"(ตำแหน่งเลขที่ - )";
|
||||||
|
string organizationOrganization = (profile.GetType().GetProperty("child4").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child4").GetValue(profile) + "/") +
|
||||||
|
(profile.GetType().GetProperty("child3").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child3").GetValue(profile) + "/") +
|
||||||
|
(profile.GetType().GetProperty("child2").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child2").GetValue(profile) + "/") +
|
||||||
|
(profile.GetType().GetProperty("child1").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child1").GetValue(profile) + "/") +
|
||||||
|
(profile.GetType().GetProperty("root").GetValue(profile) == null ? "" : profile.GetType().GetProperty("root").GetValue(profile));
|
||||||
|
string reason = profile.GetType().GetProperty("reason").GetValue(profile);
|
||||||
|
organizationOrganization = organizationOrganization != string.Empty ? organizationOrganization : reason != string.Empty ? reason : string.Empty ;
|
||||||
|
reason = organizationOrganization == reason ? string.Empty : reason;
|
||||||
_profileList.Add(new
|
_profileList.Add(new
|
||||||
{
|
{
|
||||||
count = $"{_count.ToString().ToThaiNumber()}.",
|
count = $"{_count.ToString().ToThaiNumber()}.",
|
||||||
no = $"{(_profileList.Count() + 1).ToString().ToThaiNumber()}.",
|
no = $"{(_profileList.Count() + 1).ToString().ToThaiNumber()}.",
|
||||||
order = thaiOrder,
|
order = thaiOrder,
|
||||||
organizationOrganization = (profile.GetType().GetProperty("child4").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child4").GetValue(profile) + "/") +
|
organizationOrganization = organizationOrganization,
|
||||||
(profile.GetType().GetProperty("child3").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child3").GetValue(profile) + "/") +
|
|
||||||
(profile.GetType().GetProperty("child2").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child2").GetValue(profile) + "/") +
|
|
||||||
(profile.GetType().GetProperty("child1").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child1").GetValue(profile) + "/") +
|
|
||||||
(profile.GetType().GetProperty("root").GetValue(profile) == null ? "" : profile.GetType().GetProperty("root").GetValue(profile)),
|
|
||||||
fullName = $"{profile.GetType().GetProperty("prefix").GetValue(profile)}{profile.GetType().GetProperty("firstName").GetValue(profile)} {profile.GetType().GetProperty("lastName").GetValue(profile)}",
|
fullName = $"{profile.GetType().GetProperty("prefix").GetValue(profile)}{profile.GetType().GetProperty("firstName").GetValue(profile)} {profile.GetType().GetProperty("lastName").GetValue(profile)}",
|
||||||
position = profile.GetType().GetProperty("position").GetValue(profile),
|
position = position,
|
||||||
posNo = profile.GetType().GetProperty("posMasterNo").GetValue(profile),
|
posNo = thaiPosNo,
|
||||||
oc = profile.GetType().GetProperty("root").GetValue(profile),
|
oc = profile.GetType().GetProperty("root").GetValue(profile),
|
||||||
positionEmployeePosition = profile.GetType().GetProperty("position").GetValue(profile),
|
positionEmployeePosition = profile.GetType().GetProperty("position").GetValue(profile),
|
||||||
posNoEmployee = profile.GetType().GetProperty("posMasterNo").GetValue(profile),
|
posNoEmployee = profile.GetType().GetProperty("posMasterNo").GetValue(profile),
|
||||||
reason = profile.GetType().GetProperty("reason").GetValue(profile),
|
reason = reason,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -21,8 +21,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.OrganizationEmploye
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.Command.Service", "BMA.EHR.Command.Service\BMA.EHR.Command.Service.csproj", "{E4E905EE-61DF-4451-B063-5C86BC7574CE}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.Command.Service", "BMA.EHR.Command.Service\BMA.EHR.Command.Service.csproj", "{E4E905EE-61DF-4451-B063-5C86BC7574CE}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.Insignia.Service", "BMA.EHR.Insignia.Service\BMA.EHR.Insignia.Service.csproj", "{04B37ACD-65CF-44ED-BC40-B5E7A71C374B}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.Retirement.Service", "BMA.EHR.Retirement.Service\BMA.EHR.Retirement.Service.csproj", "{3FFE378C-387F-42EA-96E2-68E63BB295F9}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.Retirement.Service", "BMA.EHR.Retirement.Service\BMA.EHR.Retirement.Service.csproj", "{3FFE378C-387F-42EA-96E2-68E63BB295F9}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.Report.Service", "BMA.EHR.Report.Service\BMA.EHR.Report.Service.csproj", "{26FE7B1C-771B-4940-9F40-326A7AD53F1C}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.Report.Service", "BMA.EHR.Report.Service\BMA.EHR.Report.Service.csproj", "{26FE7B1C-771B-4940-9F40-326A7AD53F1C}"
|
||||||
|
|
@ -31,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.Leave.Service", "BM
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMA.EHR.Discipline.Service", "BMA.EHR.Discipline.Service\BMA.EHR.Discipline.Service.csproj", "{0145A11E-7780-437B-A86F-CBDDB50BC3D1}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMA.EHR.Discipline.Service", "BMA.EHR.Discipline.Service\BMA.EHR.Discipline.Service.csproj", "{0145A11E-7780-437B-A86F-CBDDB50BC3D1}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMA.EHR.Insignia", "BMA.EHR.Insignia\BMA.EHR.Insignia.csproj", "{03AB740F-AF31-423E-8546-198B914AF76F}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|
@ -65,10 +65,6 @@ Global
|
||||||
{E4E905EE-61DF-4451-B063-5C86BC7574CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{E4E905EE-61DF-4451-B063-5C86BC7574CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{E4E905EE-61DF-4451-B063-5C86BC7574CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{E4E905EE-61DF-4451-B063-5C86BC7574CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{E4E905EE-61DF-4451-B063-5C86BC7574CE}.Release|Any CPU.Build.0 = Release|Any CPU
|
{E4E905EE-61DF-4451-B063-5C86BC7574CE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{04B37ACD-65CF-44ED-BC40-B5E7A71C374B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{04B37ACD-65CF-44ED-BC40-B5E7A71C374B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{04B37ACD-65CF-44ED-BC40-B5E7A71C374B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{04B37ACD-65CF-44ED-BC40-B5E7A71C374B}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{3FFE378C-387F-42EA-96E2-68E63BB295F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{3FFE378C-387F-42EA-96E2-68E63BB295F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{3FFE378C-387F-42EA-96E2-68E63BB295F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{3FFE378C-387F-42EA-96E2-68E63BB295F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{3FFE378C-387F-42EA-96E2-68E63BB295F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{3FFE378C-387F-42EA-96E2-68E63BB295F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
|
@ -85,6 +81,10 @@ Global
|
||||||
{0145A11E-7780-437B-A86F-CBDDB50BC3D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{0145A11E-7780-437B-A86F-CBDDB50BC3D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{0145A11E-7780-437B-A86F-CBDDB50BC3D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{0145A11E-7780-437B-A86F-CBDDB50BC3D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{0145A11E-7780-437B-A86F-CBDDB50BC3D1}.Release|Any CPU.Build.0 = Release|Any CPU
|
{0145A11E-7780-437B-A86F-CBDDB50BC3D1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{03AB740F-AF31-423E-8546-198B914AF76F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{03AB740F-AF31-423E-8546-198B914AF76F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{03AB740F-AF31-423E-8546-198B914AF76F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{03AB740F-AF31-423E-8546-198B914AF76F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
@ -98,11 +98,11 @@ Global
|
||||||
{81610EF7-AF80-44D8-9263-925C821CF45F} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
{81610EF7-AF80-44D8-9263-925C821CF45F} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
||||||
{A54AA069-8B0E-4784-953B-5DA9F9C8285E} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
{A54AA069-8B0E-4784-953B-5DA9F9C8285E} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
||||||
{E4E905EE-61DF-4451-B063-5C86BC7574CE} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
{E4E905EE-61DF-4451-B063-5C86BC7574CE} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
||||||
{04B37ACD-65CF-44ED-BC40-B5E7A71C374B} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
|
||||||
{3FFE378C-387F-42EA-96E2-68E63BB295F9} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
{3FFE378C-387F-42EA-96E2-68E63BB295F9} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
||||||
{26FE7B1C-771B-4940-9F40-326A7AD53F1C} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
{26FE7B1C-771B-4940-9F40-326A7AD53F1C} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
||||||
{0F15B902-82D7-4878-B12D-B36C14E8EDBC} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
{0F15B902-82D7-4878-B12D-B36C14E8EDBC} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
||||||
{0145A11E-7780-437B-A86F-CBDDB50BC3D1} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
{0145A11E-7780-437B-A86F-CBDDB50BC3D1} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
||||||
|
{03AB740F-AF31-423E-8546-198B914AF76F} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {3111A492-1818-4438-B718-75199D8E779A}
|
SolutionGuid = {3111A492-1818-4438-B718-75199D8E779A}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue