This commit is contained in:
2022-07-26 15:17:20 +08:00
parent 5b32340594
commit 2f403394f0
3 changed files with 11 additions and 16 deletions
@@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application.Service
{
var verifyExp1 = new EntityVerifyExp<TaskAllocationRule>()
{
VerifyExp = t => t.EnrollId == addOrEditTaskAllocationRule.EnrollId && t.TrialId == addOrEditTaskAllocationRule.TrialId,
VerifyExp = t => t.EnrollId == addOrEditTaskAllocationRule.DoctorUserId && t.TrialId == addOrEditTaskAllocationRule.TrialId,
VerifyMsg = "已有该医生配置,不允许继续增加"
};
@@ -127,7 +127,6 @@ namespace IRaCIS.Core.Application.Service
{
TrialId = enroll.TrialId,
ReadingType = enroll.Trial.ReadingType,
EnrollId =enroll.Id,
DoctorUserId = user.Id,
FullName = user.FullName,
UserCode = user.UserCode,
@@ -142,14 +141,12 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task<List<TrialDoctorUserSelectView>> GetDoctorSelectList(DoctorSelectQuery selectQuery, [FromServices] IRepository<Enroll> _enrollRepository)
{
var query = from enroll in _enrollRepository.Where(t => t.TrialId == selectQuery.TrialId && t.EnrollStatus >= (int)EnrollStatus.ConfirmIntoGroup && t.DoctorUserId !=null)
.WhereIf(selectQuery.ReadingCategory !=null,t=>t.EnrollReadingCategoryList.Any(u=>u.ReadingCategory==selectQuery.ReadingCategory))
join user in _userRepository.AsQueryable() on enroll.DoctorId equals user.DoctorId
var query = from allocationRule in _taskAllocationRuleRepository.Where(t => t.TrialId == selectQuery.TrialId && t.IsEnable)
join user in _userRepository.AsQueryable() on allocationRule.DoctorUserId equals user.Id
select new TrialDoctorUserSelectView()
{
TrialId = enroll.TrialId,
ReadingType = enroll.Trial.ReadingType,
EnrollId = enroll.Id,
TrialId = allocationRule.TrialId,
ReadingType = allocationRule.Trial.ReadingType,
DoctorUserId = user.Id,
FullName = user.FullName,
UserCode = user.UserCode,