修改项目中心查询,文档查询
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
f58ee6f63a
commit
6b807f419b
|
@ -36,6 +36,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public bool? IsDeleted { get; set; }
|
||||
public Guid? FileTypeId { get; set; }
|
||||
|
||||
public Guid? UserTypeId { get; set; }
|
||||
|
||||
public string Name { get; set; } = String.Empty;
|
||||
|
||||
[NotDefault]
|
||||
|
|
|
@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using IRaCIS.Core.Application.Auth;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using System.Linq;
|
||||
|
||||
namespace IRaCIS.Core.Application.Services
|
||||
{
|
||||
|
@ -63,6 +64,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
var trialDocumentQueryable = _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == queryTrialDocument.TrialId)
|
||||
.WhereIf(!string.IsNullOrEmpty(queryTrialDocument.Name), t => t.Name.Contains(queryTrialDocument.Name))
|
||||
.WhereIf(queryTrialDocument.FileTypeId != null, t => t.FileTypeId == queryTrialDocument.FileTypeId)
|
||||
.WhereIf(queryTrialDocument.UserTypeId != null, t => t.NeedConfirmedUserTypeList.Any(t=>t.NeedConfirmUserTypeId== queryTrialDocument.UserTypeId) )
|
||||
.WhereIf(queryTrialDocument.IsDeleted != null, t => t.IsDeleted == queryTrialDocument.IsDeleted)
|
||||
.ProjectTo<TrialDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, isEn_Us = _userInfo.IsEn_Us });
|
||||
|
||||
|
|
|
@ -220,8 +220,8 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
|
||||
|
||||
public int? VisitCount { get; set; }
|
||||
public int? SubjectCount { get; set; }
|
||||
//public int? VisitCount { get; set; }
|
||||
//public int? SubjectCount { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
@ -265,6 +265,9 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
|
||||
public List<string> UserNameList { get; set; } = new List<string>();
|
||||
|
||||
public int? VisitCount { get; set; }
|
||||
public int? SubjectCount { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var siteStatQuery = _trialSiteRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
|
||||
.WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.Site.SiteName.Contains(param.SiteName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.Site.SiteName.Contains(param.SiteName) || t.TrialSiteAliasName.Contains(param.TrialSiteAliasName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName), t => t.TrialSiteAliasName.Contains(param.TrialSiteAliasName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode), t => t.TrialSiteCode.Contains(param.TrialSiteCode))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, t => t.CRCUserList.Any(k => k.UserId == _userInfo.Id))
|
||||
|
|
|
@ -132,8 +132,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.ContactPhone, u => u.MapFrom(s => s.Site.ContactPhone))
|
||||
.ForMember(d => d.Address, u => u.MapFrom(s => s.Site.Address))
|
||||
.ForMember(d => d.Site, u => u.MapFrom(s => s.Site.SiteName))
|
||||
.ForMember(d => d.VisitCount, u => u.MapFrom(s => s.SubjectVisitList.Count()))
|
||||
.ForMember(d => d.SubjectCount, u => u.MapFrom(s => s.SubjectList.Count()))
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -151,6 +150,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.Site, u => u.MapFrom(s => isEn_Us ?s.Site.SiteName:s.Site.SiteNameCN))
|
||||
.ForMember(d => d.Hospital, u => u.MapFrom(s => s.Site.Hospital.HospitalName))
|
||||
.ForMember(d => d.UserCount, u => u.MapFrom(s => s.CRCUserList.Count()))
|
||||
.ForMember(d => d.VisitCount, u => u.MapFrom(s => s.SubjectVisitList.Count()))
|
||||
.ForMember(d => d.SubjectCount, u => u.MapFrom(s => s.SubjectList.Count()))
|
||||
.ForMember(d => d.UserNameList, u => u.MapFrom(s => s.CRCUserList.Where(t => t.IsDeleted == false).Select(u => u.User.FullName)));
|
||||
CreateMap<Site, SiteStatSimpleDTO>();
|
||||
|
||||
|
|
Loading…
Reference in New Issue