修改影像监控查询条件
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
21ded0d466
commit
247b11cec4
|
@ -594,6 +594,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public UserTypeEnum? UserType { get; set; }
|
||||
|
||||
public bool? IsSuccess { get; set; }
|
||||
|
||||
public DateTime? DownloadStartTime { get; set; }
|
||||
public DateTime? DownloadEndTime { get; set; }
|
||||
|
||||
public string IP { get; set; }
|
||||
}
|
||||
|
||||
public class SubjectVisitTaskInfo
|
||||
|
|
|
@ -734,6 +734,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
Id = NewId.NextSequentialGuid(),
|
||||
TrialId = result.TrialId,
|
||||
SubjectCode = result.SubjectCode,
|
||||
IP = _userInfo.IP,
|
||||
DownloadStartTime = DateTime.Now,
|
||||
IsSuccess = false,
|
||||
ImageType = imageType,
|
||||
|
@ -912,6 +913,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
Id = NewId.NextSequentialGuid(),
|
||||
TrialId = info.TrialId,
|
||||
SubjectCode = inQuery.SubjectCode,
|
||||
IP=_userInfo.IP,
|
||||
DownloadStartTime = DateTime.Now,
|
||||
IsSuccess = false,
|
||||
ImageType = imageType,
|
||||
|
@ -998,9 +1000,13 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
{
|
||||
var query = _trialImageDownloadRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(inQuery.SubjectCode.IsNotNullOrEmpty(), t => t.SubjectCode.Contains(inQuery.SubjectCode))
|
||||
.WhereIf(inQuery.IP.IsNotNullOrEmpty(), t => t.IP.Contains(inQuery.IP))
|
||||
.WhereIf(inQuery.ImageType != null, t => t.ImageType == inQuery.ImageType)
|
||||
.WhereIf(inQuery.UserType != null, t => t.CreateUser.UserTypeEnum == inQuery.UserType)
|
||||
.WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess)
|
||||
.WhereIf(inQuery.DownloadStartTime != null, t => t.DownloadStartTime >= inQuery.DownloadStartTime)
|
||||
.WhereIf(inQuery.DownloadEndTime != null, t => t.DownloadEndTime <= inQuery.DownloadEndTime)
|
||||
|
||||
.ProjectTo<TrialImageDownloadView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await query.ToPagedListAsync(inQuery);
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public int ImageCount { get; set; }
|
||||
public long ImageSize { get; set; }
|
||||
|
||||
public string IP { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public enum ImageType
|
||||
|
|
Loading…
Reference in New Issue