Merge branch 'develop' into working

This commit is contained in:
Suphonchai Phoonsawat 2024-07-08 09:18:21 +07:00
commit aaa180e217
22 changed files with 75 additions and 62 deletions

View file

@ -220,9 +220,9 @@ namespace BMA.EHR.Application.Repositories.Commands
OldPositionNumber = p.posMasterNoOld == null ? "" :
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "2" ? $"{ p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "1" ? $"{ p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "0" ? $"{ p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
NewOc = p.root == null ? "" : p.root,
@ -287,11 +287,11 @@ namespace BMA.EHR.Application.Repositories.Commands
OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld,
OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld,
OldPositionNumber = p.posMasterNoOld == null ? "" :
p.nodeOld == "4" ? $"{ p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "3" ? $"{ p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "2" ? $"{ p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "1" ? $"{ p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "0" ? $"{ p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
NewOc = p.root == null ? "" : p.root,
NewPositionName = p.positionName == null ? "" : p.positionName,
@ -1295,7 +1295,7 @@ namespace BMA.EHR.Application.Repositories.Commands
}
foreach (var d in raw_data)
{
var apiUrl = $"{_configuration["API"]}discipline/result/report/find/{d.RefDisciplineId}/{d.RefPlacementProfileId}";
var apiUrl = $"{_configuration["API"]}/discipline/result/report/find/{d.RefDisciplineId}/{d.RefPlacementProfileId}";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));

View file

@ -7487,6 +7487,8 @@ namespace BMA.EHR.Application.Repositories.Commands
{
PersonId = x.RefPlacementProfileId,
Id = x.RefDisciplineId,
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
});
var baseAPI = _configuration["API"];
@ -7603,6 +7605,8 @@ namespace BMA.EHR.Application.Repositories.Commands
{
PersonId = x.RefPlacementProfileId,
Id = x.RefDisciplineId,
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
});
var baseAPI = _configuration["API"];
@ -7719,6 +7723,8 @@ namespace BMA.EHR.Application.Repositories.Commands
{
PersonId = x.RefPlacementProfileId,
Id = x.RefDisciplineId,
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
});
var baseAPI = _configuration["API"];
@ -7834,6 +7840,8 @@ namespace BMA.EHR.Application.Repositories.Commands
{
PersonId = x.RefPlacementProfileId,
Id = x.RefDisciplineId,
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
});
var baseAPI = _configuration["API"];
@ -7950,6 +7958,8 @@ namespace BMA.EHR.Application.Repositories.Commands
{
PersonId = x.RefPlacementProfileId,
Id = x.RefDisciplineId,
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
});
var baseAPI = _configuration["API"];
@ -9158,14 +9168,14 @@ namespace BMA.EHR.Application.Repositories.Commands
var raw = JsonConvert.DeserializeObject<dynamic>(apiResult.Result);
if (raw != null)
{
if(raw.result!.rootId != null && raw.result!.root != null)
if (raw.result!.rootId != null && raw.result!.root != null)
{
ret.Add(new KeyValueItemResponse
{
Id = raw.result!.rootId ?? null,
Name = raw.result!.root ?? null,
});
}
}
}
}
// var rootOcId = await GetRootOcIdAsync(UserOrganizationId);

View file

@ -43,7 +43,7 @@ namespace BMA.EHR.Application.Repositories.Reports
#region
public async Task<object> GetProbationAssignAsync(Guid assign_id, string token)
{
var api_url = $"{_configuration["APIPROBATION"]}assign/probation-assign?assign_id={assign_id}";
var api_url = $"{_configuration["APIPROBATION"]}/assign/probation-assign?assign_id={assign_id}";
ProbationAssignResponse probation_assign;
using (var client = new HttpClient())
{
@ -94,7 +94,7 @@ namespace BMA.EHR.Application.Repositories.Reports
#region (, )
public async Task<object> GetEvaluateRecordAsync(Guid assign_id, string token)
{
var api_url = $"{_configuration["APIPROBATION"]}report/form-record?id={assign_id}";
var api_url = $"{_configuration["APIPROBATION"]}/report/form-record?id={assign_id}";
EvaluateRecordAssignResponse evaluate_record;
using (var client = new HttpClient())
{
@ -142,7 +142,7 @@ namespace BMA.EHR.Application.Repositories.Reports
#region ()
public async Task<object> GetEvaluateAssignAsync(Guid id, string token)
{
var api_url = $"{_configuration["APIPROBATION"]}report/evaluate-commander?id={id}";
var api_url = $"{_configuration["APIPROBATION"]}/report/evaluate-commander?id={id}";
EvaluateAssignResponse evaluate_assign;
using (var client = new HttpClient())
{
@ -190,7 +190,7 @@ namespace BMA.EHR.Application.Repositories.Reports
#region ()
public async Task<object> GetEvaluateChairmanAssignAsync(Guid id, string token)
{
var api_url = $"{_configuration["APIPROBATION"]}report/evaluate-chairman?id={id}";
var api_url = $"{_configuration["APIPROBATION"]}/report/evaluate-chairman?id={id}";
EvaluateChairmanAssignResponse evaluate_assign;
using (var client = new HttpClient())
{
@ -255,7 +255,7 @@ namespace BMA.EHR.Application.Repositories.Reports
#region
public async Task<object> GetEvaluateResultAssignAsync(Guid id, string token)
{
var api_url = $"{_configuration["APIPROBATION"]}evaluate-result?assign_id={id}";
var api_url = $"{_configuration["APIPROBATION"]}/evaluate-result?assign_id={id}";
EvaluateResultAssignResponse evaluate_assign;
using (var client = new HttpClient())
{