Merge branch 'develop' of github.com:Frappet/BMA-EHR-BackEnd into develop

This commit is contained in:
Kittapath 2024-07-11 00:02:51 +07:00
commit 9dd0f1e037
5 changed files with 37 additions and 17 deletions

View file

@ -91,8 +91,15 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
if (entity.LeaveDraftDocument != null)
_dbContext.Attatch(entity.LeaveDraftDocument);
// if (entity.LeaveDocument != null)
// _dbContext.Attatch(entity.LeaveDocument);
if (entity.LeaveDocument != null)
{
foreach(var d in entity.LeaveDocument)
{
_dbContext.Attatch(d);
}
}
if (entity.Type != null)
_dbContext.Attatch(entity.Type);
@ -108,8 +115,14 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
if (entity.LeaveDraftDocument != null)
_dbContext.Attatch(entity.LeaveDraftDocument);
// if (entity.LeaveDocument != null)
// _dbContext.Attatch(entity.LeaveDocument);
if (entity.LeaveDocument != null)
{
foreach (var d in entity.LeaveDocument)
{
_dbContext.Attatch(d);
}
}
if (entity.Type != null)
{

View file

@ -177,6 +177,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
var rowCount = worksheet.Dimension.Rows;
for (int row = 2; row <= rowCount; row++)
{
if (worksheet.Cells[row, 1].ToString() == "") break;
list.Add(new ImportReceiveRequest
{
Number = worksheet.Cells[row, 1].Value != null ? worksheet.Cells[row, 1].Value.ToString() : null,
@ -2096,6 +2097,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
var _insigniaNoteProfiles = new List<dynamic>();
foreach (var item in items)
{
if (item.CitizanId == null) continue;
var _profile = _userProfileRepository.GetOfficerProfileByCitizenId(item.CitizanId, AccessToken);
var profile = insigniaNote.InsigniaNoteProfiles.FirstOrDefault(x => x.ProfileId == _profile.Id);
if (profile == null)
@ -2150,11 +2152,12 @@ namespace BMA.EHR.Insignia.Service.Controllers
new
{
profile.Id,
Prefix = _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Prefix,
Position = _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Position,
_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).CitizenId,
_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).ProfileType,
FullName = $"{_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Prefix}{_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).FirstName} {_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).LastName}",
Prefix = _profile.Prefix,// _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Prefix,
Position = _profile.Position,// _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Position,
CitizenId = _profile.CitizenId,// _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).CitizenId,
ProfileType = _profile.ProfileType,// _userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).ProfileType,
FullName = $"{_profile.Prefix}{_profile.FirstName} {_profile.LastName}",
//FullName = $"{_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).Prefix}{_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).FirstName} {_userProfileRepository.GetOfficerProfileById(profile.ProfileId.Value, AccessToken).LastName}",
RequestInsignia = profile.RequestInsignia == null ? null : profile.RequestInsignia.Name,
RequestInsigniaId = profile.RequestInsignia == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : profile.RequestInsignia.Id,
RequestInsigniaShortName = profile.RequestInsignia == null ? null : profile.RequestInsignia.ShortName,

View file

@ -43,7 +43,7 @@
"Node": {
"API": "https://bma-ehr.frappet.synology.me/api/v1/probation"
},
"API": "https://bma-ehr.frappet.synology.m/api/v1",
"API": "https://bma-ehr.frappet.synology.me/api/v1",
"RabbitMQ" :{
"URL": "localhost",
"UserName": "frappet",

View file

@ -191,6 +191,8 @@ namespace BMA.EHR.Leave.Service.Controllers
if (doc != null)
{
leaveRequest.LeaveDocument.Add(new LeaveDocument { Document = doc });
var a = leaveRequest.LeaveDocument.Last();
_context.Entry(a).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
}
}
}
@ -418,6 +420,8 @@ namespace BMA.EHR.Leave.Service.Controllers
if (doc != null)
{
leaveRequest.LeaveDocument.Add(new LeaveDocument { Document = doc });
var a = leaveRequest.LeaveDocument.Last();
_context.Entry(a).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
}
}
}

View file

@ -25,12 +25,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.Retirement.Service"
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}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMA.EHR.Leave.Service", "BMA.EHR.Leave.Service\BMA.EHR.Leave.Service.csproj", "{0F15B902-82D7-4878-B12D-B36C14E8EDBC}"
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}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMA.EHR.Insignia", "BMA.EHR.Insignia\BMA.EHR.Insignia.csproj", "{03AB740F-AF31-423E-8546-198B914AF76F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMA.EHR.Leave", "BMA.EHR.Leave\BMA.EHR.Leave.csproj", "{B06C5612-2346-44B1-9D50-F8373885BD88}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -73,10 +73,6 @@ Global
{26FE7B1C-771B-4940-9F40-326A7AD53F1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26FE7B1C-771B-4940-9F40-326A7AD53F1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26FE7B1C-771B-4940-9F40-326A7AD53F1C}.Release|Any CPU.Build.0 = Release|Any CPU
{0F15B902-82D7-4878-B12D-B36C14E8EDBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F15B902-82D7-4878-B12D-B36C14E8EDBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F15B902-82D7-4878-B12D-B36C14E8EDBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F15B902-82D7-4878-B12D-B36C14E8EDBC}.Release|Any CPU.Build.0 = Release|Any CPU
{0145A11E-7780-437B-A86F-CBDDB50BC3D1}.Debug|Any CPU.ActiveCfg = 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
@ -85,6 +81,10 @@ Global
{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
{B06C5612-2346-44B1-9D50-F8373885BD88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B06C5612-2346-44B1-9D50-F8373885BD88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B06C5612-2346-44B1-9D50-F8373885BD88}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B06C5612-2346-44B1-9D50-F8373885BD88}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -100,9 +100,9 @@ Global
{E4E905EE-61DF-4451-B063-5C86BC7574CE} = {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}
{0F15B902-82D7-4878-B12D-B36C14E8EDBC} = {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}
{B06C5612-2346-44B1-9D50-F8373885BD88} = {FA618F0C-1AF5-49AB-AE13-C020B403B64F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3111A492-1818-4438-B718-75199D8E779A}