修改查询
parent
49a7d5fc29
commit
b770f8765d
|
@ -125,7 +125,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpGet("{trialId:guid}")]
|
[HttpGet("{trialId:guid}")]
|
||||||
public async Task<List<TrialDoctorUserSelectView>> GetDoctorUserSelectList(Guid trialId, [FromServices] IRepository<Enroll> _enrollRepository)
|
public async Task<List<TrialDoctorUserSelectView>> GetDoctorUserSelectList(Guid trialId, [FromServices] IRepository<Enroll> _enrollRepository)
|
||||||
{
|
{
|
||||||
var query = from enroll in _enrollRepository.Where(t => t.TrialId == trialId && t.EnrollStatus >= EnrollStatus.ConfirmIntoGroup)
|
var query = from enroll in _enrollRepository.Where(t => t.TrialId == trialId /*&& t.TaskAllocationRule.IsEnable*/ && /*(t.EnrollStatus >= EnrollStatus.ConfirmIntoGroup ||*/ t.Trial.VisitTaskList.Any(v => v.DoctorUserId == t.DoctorUser.Id))
|
||||||
join user in _userRoleRepository.AsQueryable() on enroll.DoctorId equals user.DoctorId
|
join user in _userRoleRepository.AsQueryable() on enroll.DoctorId equals user.DoctorId
|
||||||
select new TrialDoctorUserSelectView()
|
select new TrialDoctorUserSelectView()
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,10 @@ public partial class Enroll : BaseFullAuditEntity
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<EnrollReadingCriterion> EnrollReadingCriteriaList { get; set; }
|
public List<EnrollReadingCriterion> EnrollReadingCriteriaList { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
|
||||||
|
public TaskAllocationRule TaskAllocationRule { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
public Guid DoctorId { get; set; }
|
public Guid DoctorId { get; set; }
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue