diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index 8cbbe14bb..89841ef0d 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -451,7 +451,8 @@ namespace IRaCIS.Core.Application.Image.QA //.WhereIf(visitSearchDTO.ChallengeState != null, t => t.ChallengeState == visitSearchDTO.ChallengeState) .ProjectTo(_mapper.ConfigurationProvider); - var defalutSortArray = new string[] { nameof(SubjectVisit.IsUrgent) + " desc", nameof(QCVisitViewModel.AuditState) +" asc" }; + var defalutSortArray = new string[] { nameof(QCVisitViewModel.IsUrgent) + " desc", nameof(QCVisitViewModel.SubjectId), nameof(QCVisitViewModel.VisitNum) }; + //var defalutSortArray = new string[] { nameof(SubjectVisit.IsUrgent) + " desc", nameof(QCVisitViewModel.AuditState) +" asc" }; var pageList = await query.ToPagedListAsync(visitSearchDTO.PageIndex, visitSearchDTO.PageSize, visitSearchDTO.SortField, visitSearchDTO.Asc, string.IsNullOrWhiteSpace(visitSearchDTO.SortField), defalutSortArray); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs index 6e0e3fe84..69f2ddcde 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs @@ -228,8 +228,12 @@ namespace IRaCIS.Application.Contracts public DateTime? DeletedTime { get; set; } + public DateTime? EnabledTime { get; set; } + public DateTime UpdateTime { get; set; } + public DateTime CreateTime { get; set; } + public string Site { get; set; } = String.Empty; public string SiteCode { get; set; } = String.Empty; diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs index f8f5ed306..31808a25a 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs @@ -278,6 +278,16 @@ namespace IRaCIS.Core.Application.Services _mapper.Map(editTrialSiteCommand, dbEntity); + if (editTrialSiteCommand.IsDeleted) + { + dbEntity.EnabledTime = null; + + } + else + { + dbEntity.EnabledTime = DateTime.Now; + } + await _trialSiteRepository.SaveChangesAsync(); return ResponseOutput.Ok(); diff --git a/IRaCIS.Core.Domain/TrialSiteUser/TrialSite.cs b/IRaCIS.Core.Domain/TrialSiteUser/TrialSite.cs index 3dc6ef9a7..26597de4b 100644 --- a/IRaCIS.Core.Domain/TrialSiteUser/TrialSite.cs +++ b/IRaCIS.Core.Domain/TrialSiteUser/TrialSite.cs @@ -22,6 +22,7 @@ namespace IRaCIS.Core.Domain.Models public bool IsDeleted { get; set; } public DateTime? DeletedTime { get; set; } + public DateTime? EnabledTime { get; set; } public Guid? DeleteUserId { get; set; }