Merge branch 'working' into develop

# Conflicts:
#	.vs/BMA.EHR.Recruit.Service/v17/.suo
#	obj/Debug/net7.0/BMA.EHR.Recruit.Service.AssemblyInfo.cs
#	obj/Debug/net7.0/BMA.EHR.Recruit.Service.AssemblyInfoInputs.cache
This commit is contained in:
Suphonchai Phoonsawat 2025-04-18 12:10:10 +07:00
commit 1e9b168697
41 changed files with 8781 additions and 9755 deletions

View file

@ -38,6 +38,7 @@
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" /> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
<PackageReference Include="MongoDB.Driver" Version="2.19.0" /> <PackageReference Include="MongoDB.Driver" Version="2.19.0" />
<PackageReference Include="MongoDB.Driver.GridFS" Version="2.19.0" /> <PackageReference Include="MongoDB.Driver.GridFS" Version="2.19.0" />
<PackageReference Include="NEST" Version="7.17.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<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" />

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ActiveDebugProfile>https</ActiveDebugProfile> <ActiveDebugProfile>https</ActiveDebugProfile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor> <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View file

@ -0,0 +1,25 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace BMA.EHR.Recruit.Service.Core
{
public class DateTimeFixConverter : JsonConverter<DateTime>
{
public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType == JsonTokenType.String)
{
if (DateTime.TryParse(reader.GetString(), out var date))
{
return date;
}
}
throw new JsonException("Invalid date format.");
}
public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)
{
writer.WriteStringValue(value.ToString("yyyy-MM-dd"));
}
}
}

View file

@ -0,0 +1,272 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Nest;
using Newtonsoft.Json;
using System.Diagnostics;
using System.Net.Http.Headers;
using System.Security.Claims;
using System.Text.Encodings.Web;
using System.Text.Json;
using JsonSerializer = System.Text.Json.JsonSerializer;
namespace BMA.EHR.Recruit.Service.Core
{
public class RequestLoggingMiddleware
{
private readonly RequestDelegate _next;
private readonly IConfiguration _configuration;
private string Uri = "";
private string IndexFormat = "";
private string SystemName = "";
private string APIKey = "";
public RequestLoggingMiddleware(RequestDelegate next, IConfiguration configuration)
{
_next = next;
_configuration = configuration;
Uri = _configuration["ElasticConfiguration:Uri"] ?? "http://192.168.1.40:9200";
IndexFormat = _configuration["ElasticConfiguration:IndexFormat"] ?? "bma-ehr-log-index";
SystemName = _configuration["ElasticConfiguration:SystemName"] ?? "Unknown";
}
protected async Task<string> GetExternalAPIAsync(string apiPath, string accessToken, string apiKey)
{
try
{
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken.Replace("Bearer ", ""));
client.DefaultRequestHeaders.Add("api_key", apiKey);
var _res = await client.GetAsync(apiPath);
if (_res.IsSuccessStatusCode)
{
var _result = await _res.Content.ReadAsStringAsync();
return _result;
}
return string.Empty;
}
}
catch
{
throw;
}
}
public async Task<GetProfileByKeycloakIdLocal?> GetProfileByKeycloakIdAsync(Guid keycloakId, string? accessToken)
{
try
{
var apiPath = $"{_configuration["API"]}/org/dotnet/keycloak/{keycloakId}";
var apiKey = _configuration["API_KEY"];
var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey);
if (apiResult != null)
{
var raw = JsonConvert.DeserializeObject<GetProfileByKeycloakIdResultLocal>(apiResult);
if (raw != null)
return raw.Result;
}
return null;
}
catch
{
throw;
}
}
public async Task Invoke(HttpContext context)
{
var settings = new ConnectionSettings(new Uri(Uri))
.DefaultIndex(IndexFormat);
var client = new ElasticClient(settings);
var startTime = DateTime.UtcNow;
var stopwatch = Stopwatch.StartNew();
string? responseBodyJson = null;
string? requestBodyJson = null;
string requestBody = await ReadRequestBodyAsync(context);
if (requestBody != "")
{
if (context.Request.HasFormContentType)
{
var form = await context.Request.ReadFormAsync(); // อ่าน form-data
var formData = new Dictionary<string, object>();
foreach (var field in form)
{
formData[field.Key] = field.Value.ToString();
}
// อ่านไฟล์ที่ถูกส่งมา (ถ้ามี)
if (form.Files.Count > 0)
{
var fileDataList = new List<object>();
foreach (var file in form.Files)
{
fileDataList.Add(new
{
FileName = file.FileName,
ContentType = file.ContentType,
Size = file.Length
});
}
formData["Files"] = fileDataList;
}
requestBodyJson = JsonSerializer.Serialize(formData, new JsonSerializerOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, WriteIndented = true, Converters = { new DateTimeFixConverter() } });
}
else
{
requestBodyJson = JsonSerializer.Serialize(JsonSerializer.Deserialize<object>(requestBody), new JsonSerializerOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, WriteIndented = true, Converters = { new DateTimeFixConverter() } });
}
}
var originalBodyStream = context.Response.Body;
using (var memoryStream = new MemoryStream())
{
// เปลี่ยน stream ของ Response เพื่อให้สามารถอ่านได้
context.Response.Body = memoryStream;
var keycloakId = context.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value ?? Guid.Empty.ToString("D");
var token = context.Request.Headers["Authorization"];
var pf = await GetProfileByKeycloakIdAsync(Guid.Parse(keycloakId), token);
await _next(context); // ดำเนินการต่อไปยัง Middleware อื่น ๆ
stopwatch.Stop();
var processTime = stopwatch.ElapsedMilliseconds;
var endTime = DateTime.UtcNow;
var logType = context.Response.StatusCode switch
{
>= 500 => "error",
>= 400 => "warning",
_ => "info"
};
string? message = null;
// อ่านข้อมูลจาก Response หลังจากที่ได้ถูกส่งออกไป
memoryStream.Seek(0, SeekOrigin.Begin);
var responseBody = new StreamReader(memoryStream).ReadToEnd();
if (responseBody != "")
responseBodyJson = JsonSerializer.Serialize(JsonSerializer.Deserialize<object>(responseBody), new JsonSerializerOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, WriteIndented = true, Converters = { new DateTimeFixConverter() } });
var json = JsonSerializer.Deserialize<JsonElement>(responseBody);
if(json.ValueKind == JsonValueKind.Array)
{
message = "success";
}
else
{
if (json.TryGetProperty("message", out var messageElement))
{
message = messageElement.GetString();
}
}
var logData = new
{
logType = logType,
ip = context.Connection.RemoteIpAddress?.ToString(),
rootId = pf == null ? null : pf.RootId,
systemName = SystemName,
startTimeStamp = startTime.ToString("o"),
endTimeStamp = endTime.ToString("o"),
processTime = processTime,
host = context.Request.Host.Value,
method = context.Request.Method,
endpoint = context.Request.Path + context.Request.QueryString,
responseCode = context.Response.StatusCode == 304 ? "200" : context.Response.StatusCode.ToString(),
responseDescription = message,
input = requestBodyJson,
output = responseBodyJson,
userId = keycloakId,
userName = $"{pf?.Prefix ?? ""}{pf?.FirstName ?? ""} {pf?.LastName ?? ""}",
user = pf?.CitizenId ?? ""
};
// เขียนข้อมูลกลับไปยัง original Response body
memoryStream.Seek(0, SeekOrigin.Begin);
await memoryStream.CopyToAsync(originalBodyStream);
client.IndexDocument(logData);
}
//Log.Information("API Request Log: {@LogData}", logData);
}
private async Task<string> ReadRequestBodyAsync(HttpContext context)
{
context.Request.EnableBuffering();
using var reader = new StreamReader(context.Request.Body, leaveOpen: true);
var body = await reader.ReadToEndAsync();
context.Request.Body.Position = 0;
return body;
}
}
public class GetProfileByKeycloakIdLocal
{
public Guid Id { get; set; }
public string? Prefix { get; set; }
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? CitizenId { get; set; }
public string? Root { get; set; }
public string? Child1 { get; set; }
public string? Child2 { get; set; }
public string? Child3 { get; set; }
public string? Child4 { get; set; }
public Guid? RootId { get; set; }
public Guid? Child1Id { get; set; }
public Guid? Child2Id { get; set; }
public Guid? Child3Id { get; set; }
public Guid? Child4Id { get; set; }
public Guid? RootDnaId { get; set; }
public Guid? Child1DnaId { get; set; }
public Guid? Child2DnaId { get; set; }
public Guid? Child3DnaId { get; set; }
public Guid? Child4DnaId { get; set; }
public double? Amount { get; set; }
public double? PositionSalaryAmount { get; set; }
public string? Commander { get; set; }
public Guid? CommanderId { get; set; }
public Guid? CommanderKeycloak { get; set; }
}
public class GetProfileByKeycloakIdResultLocal
{
public string Message { get; set; } = string.Empty;
public int Status { get; set; } = -1;
public GetProfileByKeycloakIdLocal? Result { get; set; }
}
}

View file

@ -1,22 +1,23 @@
using Microsoft.AspNetCore.Mvc.Versioning;
using Microsoft.AspNetCore.Mvc;
using Microsoft.IdentityModel.Logging;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
using System.Text;
using Serilog.Sinks.Elasticsearch;
using Serilog;
using System.Reflection;
using Serilog.Exceptions;
using Microsoft.EntityFrameworkCore;
using MongoDB.Bson.Serialization.Serializers;
using MongoDB.Bson.Serialization;
using MongoDB.Bson;
using BMA.EHR.Recruit.Service.Data;
using BMA.EHR.Recruit.Service; using BMA.EHR.Recruit.Service;
using Microsoft.AspNetCore.Mvc.ApiExplorer; using BMA.EHR.Recruit.Service.Core;
using BMA.EHR.Recruit.Service.Data;
using BMA.EHR.Recruit.Service.Services; using BMA.EHR.Recruit.Service.Services;
using BMA.EHR.Recurit.Service.Data; using BMA.EHR.Recurit.Service.Data;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Versioning;
using Microsoft.EntityFrameworkCore;
using Microsoft.IdentityModel.Logging;
using Microsoft.IdentityModel.Tokens;
using MongoDB.Bson;
using MongoDB.Bson.Serialization;
using MongoDB.Bson.Serialization.Serializers;
using Serilog;
using Serilog.Exceptions;
using Serilog.Sinks.Elasticsearch;
using System.Reflection;
using System.Text;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
var issuer = builder.Configuration["Jwt:Issuer"]; var issuer = builder.Configuration["Jwt:Issuer"];
@ -67,8 +68,8 @@ builder.Services.AddTransient<MinIOService>();
builder.Services.AddTransient<PermissionRepository>(); builder.Services.AddTransient<PermissionRepository>();
// use serilog // use serilog
ConfigureLogs(); //ConfigureLogs();
builder.Host.UseSerilog(); //builder.Host.UseSerilog();
BsonSerializer.RegisterSerializer(new GuidSerializer(BsonType.String)); BsonSerializer.RegisterSerializer(new GuidSerializer(BsonType.String));
BsonSerializer.RegisterSerializer(new DateTimeSerializer(BsonType.String)); BsonSerializer.RegisterSerializer(new DateTimeSerializer(BsonType.String));
@ -136,6 +137,8 @@ app.UseDefaultFiles();
app.UseStaticFiles(); app.UseStaticFiles();
app.MapControllers(); app.MapControllers();
app.UseMiddleware<RequestLoggingMiddleware>();
// apply migrations // apply migrations
await using var scope = app.Services.CreateAsyncScope(); await using var scope = app.Services.CreateAsyncScope();
await using var db = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>(); await using var db = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();

View file

@ -7,32 +7,5 @@
"System": "Warning" "System": "Warning"
} }
} }
}, }
"ElasticConfiguration": {
"Uri": "http://localhost:9200"
},
"AllowedHosts": "*",
"ConnectionStrings": {
"MongoConnection": "mongodb://admin:adminVM123@127.0.0.1:27017",
"DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
"OrgConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_organization_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
"RecruitConnection": "server=192.168.1.80;user=root;password=adminVM123;database=bma_recruit_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
},
"Jwt": {
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
"Issuer": "https://id.frappet.synology.me/realms/bma-ehr"
},
"EPPlus": {
"ExcelPackage": {
"LicenseContext": "NonCommercial"
}
},
"MinIO": {
"Endpoint": "https://edm-s3.frappet.synology.me/",
"AccessKey": "XxtdnJajPjp3hHuKdOMn",
"SecretKey": "rVPzB05giC7bA400cUuIThzT4T9SGCcpcmL3tBBg",
"BucketName": "bma-ehr-fpt"
},
"API": "https://bma-ehr.frappet.synology.me/api/v1",
"API_KEY": "fKRL16yyEgbyTEJdsMw2h64tGSCmkW685PRtM3CygzX1JOSdptT9UJtpgWwKM8FybRTJups3GTFwj27ZRvlPdIkv3XgCoVJaD5LmR06ozuEPvCCRSdp2WFthg08V5xHc56fTPfZLpr1VmXrhd6dvYhHIqKkQUJR02Rlkss11cLRWEQOssEFVA4xdu2J5DIRO1EM5m7wRRvEwcDB4mYRXD9HH52SMq6iYqUWEWsMwLdbk7QW9yYESUEuzMW5gWrb6vIeWZxJV5bTz1PcWUyR7eO9Fyw1F5DiQYc9JgzTC1mW7cv31fEtTtrfbJYKIb5EbWilqIEUKC6A0UKBDDek35ML0006cqRVm0pvdOH6jeq7VQyYrhdXe59dBEyhYGUIfozoVBvW7Up4QBuOMjyPjSqJPlMBKwaseptfrblxQV1AOOivSBpf1ZcQyOZ8JktRtKUDSuXsmG0lsXwFlI3JCeSHdpVdgZWFYcJPegqfrB6KotR02t9AVkpLs1ZWrixwz"
} }

View file

@ -9,18 +9,20 @@
} }
}, },
"ElasticConfiguration": { "ElasticConfiguration": {
"Uri": "http://localhost:9200" "Uri": "http://192.168.1.40:9200",
"IndexFormat": "bma-ehr-log-index",
"SystemName": "recruiting"
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"ConnectionStrings": { "ConnectionStrings": {
"MongoConnection": "mongodb://admin:adminVM123@127.0.0.1:27017", "MongoConnection": "mongodb://admin:adminVM123@127.0.0.1:27017",
"DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
"OrgConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_organization_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", "OrgConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms_organization;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
"RecruitConnection": "server=192.168.1.80;user=root;password=adminVM123;database=bma_recruit_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" "RecruitConnection": "server=192.168.1.80;user=root;password=adminVM123;database=hrms_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
}, },
"Jwt": { "Jwt": {
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", "Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
"Issuer": "https://id.frappet.synology.me/realms/bma-ehr" "Issuer": "https://id.frappet.synology.me/realms/hrms"
}, },
"EPPlus": { "EPPlus": {
"ExcelPackage": { "ExcelPackage": {

File diff suppressed because it is too large Load diff

View file

@ -1,20 +1,20 @@
{ {
"runtimeOptions": { "runtimeOptions": {
"tfm": "net7.0", "tfm": "net7.0",
"frameworks": [ "frameworks": [
{ {
"name": "Microsoft.NETCore.App", "name": "Microsoft.NETCore.App",
"version": "7.0.0" "version": "7.0.0"
}, },
{ {
"name": "Microsoft.AspNetCore.App", "name": "Microsoft.AspNetCore.App",
"version": "7.0.0" "version": "7.0.0"
} }
], ],
"configProperties": { "configProperties": {
"System.GC.Server": true, "System.GC.Server": true,
"System.Reflection.NullabilityInfoContext.IsSupported": true, "System.Reflection.NullabilityInfoContext.IsSupported": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
} }
} }
} }

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -7,32 +7,5 @@
"System": "Warning" "System": "Warning"
} }
} }
}, }
"ElasticConfiguration": {
"Uri": "http://localhost:9200"
},
"AllowedHosts": "*",
"ConnectionStrings": {
"MongoConnection": "mongodb://admin:adminVM123@127.0.0.1:27017",
"DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
"OrgConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_organization_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
"RecruitConnection": "server=192.168.1.80;user=root;password=adminVM123;database=bma_recruit_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
},
"Jwt": {
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
"Issuer": "https://id.frappet.synology.me/realms/bma-ehr"
},
"EPPlus": {
"ExcelPackage": {
"LicenseContext": "NonCommercial"
}
},
"MinIO": {
"Endpoint": "https://edm-s3.frappet.synology.me/",
"AccessKey": "XxtdnJajPjp3hHuKdOMn",
"SecretKey": "rVPzB05giC7bA400cUuIThzT4T9SGCcpcmL3tBBg",
"BucketName": "bma-ehr-fpt"
},
"API": "https://bma-ehr.frappet.synology.me/api/v1",
"API_KEY": "fKRL16yyEgbyTEJdsMw2h64tGSCmkW685PRtM3CygzX1JOSdptT9UJtpgWwKM8FybRTJups3GTFwj27ZRvlPdIkv3XgCoVJaD5LmR06ozuEPvCCRSdp2WFthg08V5xHc56fTPfZLpr1VmXrhd6dvYhHIqKkQUJR02Rlkss11cLRWEQOssEFVA4xdu2J5DIRO1EM5m7wRRvEwcDB4mYRXD9HH52SMq6iYqUWEWsMwLdbk7QW9yYESUEuzMW5gWrb6vIeWZxJV5bTz1PcWUyR7eO9Fyw1F5DiQYc9JgzTC1mW7cv31fEtTtrfbJYKIb5EbWilqIEUKC6A0UKBDDek35ML0006cqRVm0pvdOH6jeq7VQyYrhdXe59dBEyhYGUIfozoVBvW7Up4QBuOMjyPjSqJPlMBKwaseptfrblxQV1AOOivSBpf1ZcQyOZ8JktRtKUDSuXsmG0lsXwFlI3JCeSHdpVdgZWFYcJPegqfrB6KotR02t9AVkpLs1ZWrixwz"
} }

View file

@ -9,18 +9,20 @@
} }
}, },
"ElasticConfiguration": { "ElasticConfiguration": {
"Uri": "http://localhost:9200" "Uri": "http://192.168.1.40:9200",
"IndexFormat": "bma-ehr-log-index",
"SystemName": "recruiting"
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"ConnectionStrings": { "ConnectionStrings": {
"MongoConnection": "mongodb://admin:adminVM123@127.0.0.1:27017", "MongoConnection": "mongodb://admin:adminVM123@127.0.0.1:27017",
"DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
"OrgConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_organization_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;", "OrgConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=hrms_organization;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;",
"RecruitConnection": "server=192.168.1.80;user=root;password=adminVM123;database=bma_recruit_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" "RecruitConnection": "server=192.168.1.80;user=root;password=adminVM123;database=hrms_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
}, },
"Jwt": { "Jwt": {
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", "Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
"Issuer": "https://id.frappet.synology.me/realms/bma-ehr" "Issuer": "https://id.frappet.synology.me/realms/hrms"
}, },
"EPPlus": { "EPPlus": {
"ExcelPackage": { "ExcelPackage": {

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="GetEFProjectMetadata">
<MSBuild Condition=" '$(TargetFramework)' == '' "
Projects="$(MSBuildProjectFile)"
Targets="GetEFProjectMetadata"
Properties="TargetFramework=$(TargetFrameworks.Split(';')[0]);EFProjectMetadataFile=$(EFProjectMetadataFile)" />
<ItemGroup Condition=" '$(TargetFramework)' != '' ">
<EFProjectMetadata Include="AssemblyName: $(AssemblyName)" />
<EFProjectMetadata Include="Language: $(Language)" />
<EFProjectMetadata Include="OutputPath: $(OutputPath)" />
<EFProjectMetadata Include="Platform: $(Platform)" />
<EFProjectMetadata Include="PlatformTarget: $(PlatformTarget)" />
<EFProjectMetadata Include="ProjectAssetsFile: $(ProjectAssetsFile)" />
<EFProjectMetadata Include="ProjectDir: $(ProjectDir)" />
<EFProjectMetadata Include="RootNamespace: $(RootNamespace)" />
<EFProjectMetadata Include="RuntimeFrameworkVersion: $(RuntimeFrameworkVersion)" />
<EFProjectMetadata Include="TargetFileName: $(TargetFileName)" />
<EFProjectMetadata Include="TargetFrameworkMoniker: $(TargetFrameworkMoniker)" />
<EFProjectMetadata Include="Nullable: $(Nullable)" />
<EFProjectMetadata Include="TargetFramework: $(TargetFramework)" />
<EFProjectMetadata Include="TargetPlatformIdentifier: $(TargetPlatformIdentifier)" />
</ItemGroup>
<WriteLinesToFile Condition=" '$(TargetFramework)' != '' "
File="$(EFProjectMetadataFile)"
Lines="@(EFProjectMetadata)" />
</Target>
</Project>

View file

@ -110,6 +110,10 @@
"target": "Package", "target": "Package",
"version": "[2.19.0, )" "version": "[2.19.0, )"
}, },
"NEST": {
"target": "Package",
"version": "[7.17.5, )"
},
"Newtonsoft.Json": { "Newtonsoft.Json": {
"target": "Package", "target": "Package",
"version": "[13.0.3, )" "version": "[13.0.3, )"

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)system.text.json\7.0.0\buildTransitive\net6.0\System.Text.Json.targets" Condition="Exists('$(NuGetPackageRoot)system.text.json\7.0.0\buildTransitive\net6.0\System.Text.Json.targets')" /> <Import Project="$(NuGetPackageRoot)system.text.json\7.0.0\buildTransitive\net6.0\System.Text.Json.targets" Condition="Exists('$(NuGetPackageRoot)system.text.json\7.0.0\buildTransitive\net6.0\System.Text.Json.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.extensions.logging.abstractions\7.0.0\buildTransitive\net6.0\Microsoft.Extensions.Logging.Abstractions.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.logging.abstractions\7.0.0\buildTransitive\net6.0\Microsoft.Extensions.Logging.Abstractions.targets')" /> <Import Project="$(NuGetPackageRoot)microsoft.extensions.logging.abstractions\7.0.0\buildTransitive\net6.0\Microsoft.Extensions.Logging.Abstractions.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.logging.abstractions\7.0.0\buildTransitive\net6.0\Microsoft.Extensions.Logging.Abstractions.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets')" /> <Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets')" />
<Import Project="$(NuGetPackageRoot)sentry\3.29.1\buildTransitive\Sentry.targets" Condition="Exists('$(NuGetPackageRoot)sentry\3.29.1\buildTransitive\Sentry.targets')" /> <Import Project="$(NuGetPackageRoot)sentry\3.29.1\buildTransitive\Sentry.targets" Condition="Exists('$(NuGetPackageRoot)sentry\3.29.1\buildTransitive\Sentry.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.visualstudio.azure.containers.tools.targets\1.17.0\build\Microsoft.VisualStudio.Azure.Containers.Tools.Targets.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.visualstudio.azure.containers.tools.targets\1.17.0\build\Microsoft.VisualStudio.Azure.Containers.Tools.Targets.targets')" /> <Import Project="$(NuGetPackageRoot)microsoft.visualstudio.azure.containers.tools.targets\1.17.0\build\Microsoft.VisualStudio.Azure.Containers.Tools.Targets.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.visualstudio.azure.containers.tools.targets\1.17.0\build\Microsoft.VisualStudio.Azure.Containers.Tools.Targets.targets')" />
</ImportGroup> </ImportGroup>
</Project> </Project>

View file

@ -15,7 +15,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("BMA.EHR.Recruit.Service")] [assembly: System.Reflection.AssemblyCompanyAttribute("BMA.EHR.Recruit.Service")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+831e67604282eb3e82a74774be73ba99ec472e57")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6748d01aa46af106321ce776d114ca5b76e74bf2")]
[assembly: System.Reflection.AssemblyProductAttribute("BMA.EHR.Recruit.Service")] [assembly: System.Reflection.AssemblyProductAttribute("BMA.EHR.Recruit.Service")]
[assembly: System.Reflection.AssemblyTitleAttribute("BMA.EHR.Recruit.Service")] [assembly: System.Reflection.AssemblyTitleAttribute("BMA.EHR.Recruit.Service")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View file

@ -1 +1 @@
46e58d4bbba0e23723a59aa64185ffde2dc0004dada1c8c5e7340999d46cc964 18782c2453613fb6b79d879c5b0cf9b43fdf0fc4b8bacf291e009707682783b3

View file

@ -1,23 +1,24 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// // Runtime Version:4.0.30319.42000
// Changes to this file may cause incorrect behavior and will be lost if //
// the code is regenerated. // Changes to this file may cause incorrect behavior and will be lost if
// </auto-generated> // the code is regenerated.
//------------------------------------------------------------------------------ // </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection; using System;
using System.Reflection;
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("DotNetEd.CoreAdmin")]
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer")] [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("DotNetEd.CoreAdmin")]
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Microsoft.AspNetCore.Mvc.Versioning")] [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer")]
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Microsoft.AspNetCore.OpenApi")] [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Microsoft.AspNetCore.Mvc.Versioning")]
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Mvc.Grid.Core")] [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Microsoft.AspNetCore.OpenApi")]
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Swashbuckle.AspNetCore.Annotations")] [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Mvc.Grid.Core")]
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Swashbuckle.AspNetCore.SwaggerGen")] [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Swashbuckle.AspNetCore.Annotations")]
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("WatchDog")] [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Swashbuckle.AspNetCore.SwaggerGen")]
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("WatchDog")]
// Generated by the MSBuild WriteCodeFragment class.
// Generated by the MSBuild WriteCodeFragment class.

View file

@ -1 +1 @@
118adb39fa17e550a6ea3f0884bcc470c472eff8c41b45c6866e270cec7ab054 b3124fd4c4016491f5d30ffb74ef9ab034b453eddb7643416b841a217eb48e03

View file

@ -1 +1 @@
48b99599757630e72457bb87242ce14f53dc48b77c68e94f7d93523f2a74ffa8 1ac8c898b4be5e4b0e3e5d4c2b884f5ff73ae58e10f6d08eb2faa4812afbfec0

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
<Project> <Project>
<Import Project="Microsoft.AspNetCore.StaticWebAssetEndpoints.props" /> <Import Project="Microsoft.AspNetCore.StaticWebAssetEndpoints.props" />
<Import Project="Microsoft.AspNetCore.StaticWebAssets.props" /> <Import Project="Microsoft.AspNetCore.StaticWebAssets.props" />
</Project> </Project>

View file

@ -1,3 +1,3 @@
<Project> <Project>
<Import Project="..\build\BMA.EHR.Recruit.Service.props" /> <Import Project="..\build\BMA.EHR.Recruit.Service.props" />
</Project> </Project>

View file

@ -1,3 +1,3 @@
<Project> <Project>
<Import Project="..\buildMultiTargeting\BMA.EHR.Recruit.Service.props" /> <Import Project="..\buildMultiTargeting\BMA.EHR.Recruit.Service.props" />
</Project> </Project>

View file

@ -2564,6 +2564,22 @@
} }
} }
}, },
"NEST/7.17.5": {
"type": "package",
"dependencies": {
"Elasticsearch.Net": "7.17.5"
},
"compile": {
"lib/netstandard2.0/Nest.dll": {
"related": ".pdb;.xml"
}
},
"runtime": {
"lib/netstandard2.0/Nest.dll": {
"related": ".pdb;.xml"
}
}
},
"NETStandard.Library/1.6.1": { "NETStandard.Library/1.6.1": {
"type": "package", "type": "package",
"dependencies": { "dependencies": {
@ -8254,6 +8270,25 @@
"mysqlconnector.nuspec" "mysqlconnector.nuspec"
] ]
}, },
"NEST/7.17.5": {
"sha512": "bo9UyuIoVRx4IUQiuC8ZrlZuvAXKIccernC7UUKukQCEmRq2eVIk+gubHlnMQljrP51q0mN4cjgy9vv5uZPkoA==",
"type": "package",
"path": "nest/7.17.5",
"files": [
".nupkg.metadata",
".signature.p7s",
"lib/net461/Nest.dll",
"lib/net461/Nest.pdb",
"lib/net461/Nest.xml",
"lib/netstandard2.0/Nest.dll",
"lib/netstandard2.0/Nest.pdb",
"lib/netstandard2.0/Nest.xml",
"license.txt",
"nest.7.17.5.nupkg.sha512",
"nest.nuspec",
"nuget-icon.png"
]
},
"NETStandard.Library/1.6.1": { "NETStandard.Library/1.6.1": {
"sha512": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", "sha512": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==",
"type": "package", "type": "package",
@ -13675,6 +13710,7 @@
"Microsoft.VisualStudio.Azure.Containers.Tools.Targets >= 1.17.0", "Microsoft.VisualStudio.Azure.Containers.Tools.Targets >= 1.17.0",
"MongoDB.Driver >= 2.19.0", "MongoDB.Driver >= 2.19.0",
"MongoDB.Driver.GridFS >= 2.19.0", "MongoDB.Driver.GridFS >= 2.19.0",
"NEST >= 7.17.5",
"Newtonsoft.Json >= 13.0.3", "Newtonsoft.Json >= 13.0.3",
"Pomelo.EntityFrameworkCore.MySql >= 7.0.0", "Pomelo.EntityFrameworkCore.MySql >= 7.0.0",
"Pomelo.EntityFrameworkCore.MySql.Design >= 1.1.2", "Pomelo.EntityFrameworkCore.MySql.Design >= 1.1.2",
@ -13801,6 +13837,10 @@
"target": "Package", "target": "Package",
"version": "[2.19.0, )" "version": "[2.19.0, )"
}, },
"NEST": {
"target": "Package",
"version": "[7.17.5, )"
},
"Newtonsoft.Json": { "Newtonsoft.Json": {
"target": "Package", "target": "Package",
"version": "[13.0.3, )" "version": "[13.0.3, )"

View file

@ -1,6 +1,6 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "so4FDnKvBAM=", "dgSpecHash": "2b/aE3ltIAI=",
"success": true, "success": true,
"projectFilePath": "D:\\Develop\\SourceCode\\hrms-api-recruit\\BMA.EHR.Recruit.Service.csproj", "projectFilePath": "D:\\Develop\\SourceCode\\hrms-api-recruit\\BMA.EHR.Recruit.Service.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
@ -149,6 +149,7 @@
"C:\\Users\\jack\\.nuget\\packages\\mono.texttemplating\\2.2.1\\mono.texttemplating.2.2.1.nupkg.sha512", "C:\\Users\\jack\\.nuget\\packages\\mono.texttemplating\\2.2.1\\mono.texttemplating.2.2.1.nupkg.sha512",
"C:\\Users\\jack\\.nuget\\packages\\mysql.data\\8.0.29\\mysql.data.8.0.29.nupkg.sha512", "C:\\Users\\jack\\.nuget\\packages\\mysql.data\\8.0.29\\mysql.data.8.0.29.nupkg.sha512",
"C:\\Users\\jack\\.nuget\\packages\\mysqlconnector\\2.2.5\\mysqlconnector.2.2.5.nupkg.sha512", "C:\\Users\\jack\\.nuget\\packages\\mysqlconnector\\2.2.5\\mysqlconnector.2.2.5.nupkg.sha512",
"C:\\Users\\jack\\.nuget\\packages\\nest\\7.17.5\\nest.7.17.5.nupkg.sha512",
"C:\\Users\\jack\\.nuget\\packages\\netstandard.library\\1.6.1\\netstandard.library.1.6.1.nupkg.sha512", "C:\\Users\\jack\\.nuget\\packages\\netstandard.library\\1.6.1\\netstandard.library.1.6.1.nupkg.sha512",
"C:\\Users\\jack\\.nuget\\packages\\newtonsoft.json\\13.0.3\\newtonsoft.json.13.0.3.nupkg.sha512", "C:\\Users\\jack\\.nuget\\packages\\newtonsoft.json\\13.0.3\\newtonsoft.json.13.0.3.nupkg.sha512",
"C:\\Users\\jack\\.nuget\\packages\\newtonsoft.json.bson\\1.0.2\\newtonsoft.json.bson.1.0.2.nupkg.sha512", "C:\\Users\\jack\\.nuget\\packages\\newtonsoft.json.bson\\1.0.2\\newtonsoft.json.bson.1.0.2.nupkg.sha512",