diff --git a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs index 5a060ba3..14bcd022 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs @@ -2322,7 +2322,7 @@ namespace BMA.EHR.Application.Repositories.Commands Prefix = d.prefix, FirstName = d.firstName, LastName = d.lastName, - RefPlacementProfileId = d.profileId, + RefPlacementProfileId = d.profileId == null ? null: Guid.Parse(d.profileId), RefDisciplineId = d.id, }; seq++; @@ -2374,7 +2374,7 @@ namespace BMA.EHR.Application.Repositories.Commands Prefix = d.prefix, FirstName = d.firstName, LastName = d.lastName, - RefPlacementProfileId = d.profileId, + RefPlacementProfileId = d.profileId == null ? null : Guid.Parse(d.profileId), RefDisciplineId = d.id, }; seq++; @@ -2426,7 +2426,7 @@ namespace BMA.EHR.Application.Repositories.Commands Prefix = d.prefix, FirstName = d.firstName, LastName = d.lastName, - RefPlacementProfileId = d.profileId, + RefPlacementProfileId = d.profileId == null ? null : Guid.Parse(d.profileId), RefDisciplineId = d.id, }; seq++; @@ -2478,7 +2478,7 @@ namespace BMA.EHR.Application.Repositories.Commands Prefix = d.prefix, FirstName = d.firstName, LastName = d.lastName, - RefPlacementProfileId = d.profileId, + RefPlacementProfileId = d.profileId == null ? null : Guid.Parse(d.profileId), RefDisciplineId = d.id, }; seq++; @@ -2530,7 +2530,7 @@ namespace BMA.EHR.Application.Repositories.Commands Prefix = d.prefix, FirstName = d.firstName, LastName = d.lastName, - RefPlacementProfileId = d.profileId, + RefPlacementProfileId = d.profileId == null ? null : Guid.Parse(d.profileId), RefDisciplineId = d.id, }; seq++; diff --git a/BMA.EHR.Application/Responses/PassSalaryResponse.cs b/BMA.EHR.Application/Responses/PassSalaryResponse.cs index c41412b0..14a3c341 100644 --- a/BMA.EHR.Application/Responses/PassSalaryResponse.cs +++ b/BMA.EHR.Application/Responses/PassSalaryResponse.cs @@ -14,7 +14,7 @@ public string prefix { get; set; } = string.Empty; public string firstName { get; set; } = string.Empty; public string lastName { get; set; } = string.Empty; - public Guid? profileId { get; set; } = Guid.Empty; + public string? profileId { get; set; } = string.Empty; // public Guid? commandId { get; set; } = Guid.Empty; } } diff --git a/BMA.EHR.Command.Service/Controllers/OrderController.cs b/BMA.EHR.Command.Service/Controllers/OrderController.cs index 41ed8cd2..707b409d 100644 --- a/BMA.EHR.Command.Service/Controllers/OrderController.cs +++ b/BMA.EHR.Command.Service/Controllers/OrderController.cs @@ -4565,12 +4565,12 @@ namespace BMA.EHR.Command.Service.Controllers .OrderBy(x => x.Sequence) .Select(r => new CommandReceiverResponse { - RefRecordId = r.RefPlacementProfileId!.Value, + RefRecordId = r.RefPlacementProfileId == null? Guid.Parse("00000000-0000-0000-0000-000000000000") : r.RefPlacementProfileId.Value, PersonalId = r.Id, Sequence = r.Sequence, IdCard = r.CitizenId, Name = $"{r.Prefix!}{r.FirstName!} {r.LastName!}", - SelectStatus = existed.FirstOrDefault(x => x.RefPlacementProfileId!.Value == r.RefPlacementProfileId!.Value) != null, + SelectStatus = r.RefPlacementProfileId == null ? false : (existed.FirstOrDefault(x => x.RefPlacementProfileId!.Value == r.RefPlacementProfileId!.Value) != null), Education = "" // ยังหาไม่เจอว่าอยุ่ field ไหน }).ToList();