修改查询
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
3a65046c48
commit
7542c20bcc
|
|
@ -278,7 +278,7 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public List<string> CurrentUserHospitalGroupList { get; set; } = new List<string>();
|
||||
|
||||
public List<string> ViewHospitalGroupList => StudyHospitalGroupList.Except(CurrentUserHospitalGroupList).ToList();
|
||||
public List<string> ViewHospitalGroupList => StudyHospitalGroupList.Intersect(CurrentUserHospitalGroupList).ToList();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ using System.Threading.Channels;
|
|||
using NPOI.HSSF.Record.Chart;
|
||||
using IRaCIS.Core.Application.Helper.OtherTool;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using DocumentFormat.OpenXml.Drawing.Charts;
|
||||
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
|
|
@ -63,6 +64,7 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<SubjectPatient> _subjectPatientRepository, IRepository<SCPStudyHospitalGroup> _SCPStudyHospitalGroupRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<SCPPatient> _patientRepository,
|
||||
IRepository<HospitalGroup> _hospitalGroupRepository,
|
||||
IRepository<SCPStudy> _studyRepository,
|
||||
IRepository<Subject> _subjectRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
|
|
@ -660,7 +662,7 @@ namespace IRaCIS.Application.Services
|
|||
};
|
||||
|
||||
|
||||
|
||||
var allHospitalGroupList = _hospitalGroupRepository.Where(t => t.IsEnable).Select(t => t.Name).ToList();
|
||||
|
||||
var pageList = await resultQuery.ToPagedListAsync(inQuery, nameof(PatientQueryView.PatientIdStr));
|
||||
|
||||
|
|
@ -669,6 +671,8 @@ namespace IRaCIS.Application.Services
|
|||
if (isAdminOrOA)
|
||||
{
|
||||
//不处理,默认看所有
|
||||
|
||||
item.CurrentUserHospitalGroupList = allHospitalGroupList;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -790,11 +794,15 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var pageList = await query.ToPagedListAsync(inQuery, nameof(PatientStudySimpleView.StudyTime));
|
||||
|
||||
var allHospitalGroupList= _hospitalGroupRepository.Where(t=>t.IsEnable).Select(t=> new HospitalGroupInfo() { Id = t.Id, Code = t.Code, Name = t.Name }).ToList();
|
||||
|
||||
foreach (var item in pageList.CurrentPageData)
|
||||
{
|
||||
if (isAdminOrOA)
|
||||
{
|
||||
//不处理,默认看所有
|
||||
|
||||
item.CurrentUserHospitalGroupList = allHospitalGroupList;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue