Merge branch 'develop' into working
This commit is contained in:
commit
9d90c98800
8 changed files with 23 additions and 12 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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.
Loading…
Add table
Add a link
Reference in a new issue