diff --git a/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs b/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs index 01489df5..bf905cbc 100644 --- a/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs +++ b/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs @@ -1868,37 +1868,7 @@ namespace BMA.EHR.Insignia.Service.Controllers // continue; if (profile.Status != "DONE") { - // public class PostProfileInsigniaDto - //{ - // public Guid ProfileId { get; set; } - - // public int Year { get; set; } = 0; - - // public string No { get; set; } = string.Empty; - - // public string Volume { get; set; } = string.Empty; - - // public string Section { get; set; } = string.Empty; - - // public string Page { get; set; } = string.Empty; - - // public DateTime ReceiveDate { get; set; } = DateTime.MinValue; - - // public Guid InsigniaId { get; set; } - - // public DateTime DateAnnounce { get; set; } = DateTime.MinValue; - - // public string Issue { get; set; } = string.Empty; - - // public string VolumeNo { get; set; } = string.Empty; - - // public DateTime? RefCommandDate { get; set; } - - // public string RefCommandNo { get; set; } = string.Empty; - - // public string Note { get; set; } = string.Empty; - //} - + profile.Status = "DONE"; @@ -1924,29 +1894,7 @@ namespace BMA.EHR.Insignia.Service.Controllers }; await _userProfileRepository.PostProfileInsigniaAsync(profileInsignia, AccessToken); - //await _context.ProfileInsignias.AddAsync(new ProfileInsignia - //{ - // Year = insigniaNote.Year, - // No = profile.No, - // Issue = profile.VolumeNo, - // VolumeNo = profile.VolumeNo, - // // Volume = profile.Volume, - // Section = profile.Section, - // Page = profile.Page, - // DateAnnounce = profile.Date, - // ReceiveDate = profile.DateReceive, - // InsigniaType = profile.RequestInsignia.InsigniaType == null ? null : profile.RequestInsignia.InsigniaType.Name, - // Insignia = profile.RequestInsignia, - // // RefCommandNo = req.RefCommandNo, - // // RefCommandDate = req.RefCommandDate, - // ProfileId = profile.ProfileId.Value, - // CreatedFullName = FullName ?? "System Administrator", - // CreatedUserId = UserId ?? "", - // CreatedAt = DateTime.Now, - // LastUpdateFullName = FullName ?? "System Administrator", - // LastUpdateUserId = UserId ?? "", - // LastUpdatedAt = DateTime.Now, - //}); + } } await _context.SaveChangesAsync(); @@ -2182,6 +2130,7 @@ namespace BMA.EHR.Insignia.Service.Controllers var _insigniaNoteProfiles = new List(); foreach (var item in items) { + if (item.CitizanId == null) continue; var pf = _userProfileRepository.GetOfficerProfileByCitizenId(item.CitizanId, AccessToken); var profile = insigniaNote.InsigniaNoteProfiles.FirstOrDefault(x => x.ProfileId == pf.Id); if (profile == null)