@@ -21,6 +21,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
public class TaskAllocationRuleService(
|
||||
IRepository<TaskAllocationRule> _taskAllocationRuleRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<Enroll> _enrollRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||
IRepository<SubjectCanceDoctor> _subjectCanceDoctorRepository) : BaseService, ITaskAllocationRuleService
|
||||
{
|
||||
|
||||
@@ -37,7 +39,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
var list = await _taskAllocationRuleRepository.Where(t => t.TrialId == trialId).ProjectTo<TaskAllocationRuleDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
//所有标准都是一样 后台只返回任意一个标准的就好了
|
||||
var trialTaskConfig = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.TrialId == trialId && t.IsConfirm).ProjectTo<TrialTaskConfigView>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||
var trialTaskConfig = await _readingQuestionCriterionTrialRepository.Where(t => t.TrialId == trialId && t.IsConfirm).ProjectTo<TrialTaskConfigView>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||
|
||||
return (list, trialTaskConfig);
|
||||
}
|
||||
@@ -53,7 +55,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
//冗余 存
|
||||
|
||||
var enrollId = _repository.Where<Enroll>(t => t.TrialId == addOrEditTaskAllocationRule.TrialId && t.DoctorUserId == addOrEditTaskAllocationRule.DoctorUserId).Select(t => t.Id).FirstOrDefault();
|
||||
var enrollId = _enrollRepository.Where(t => t.TrialId == addOrEditTaskAllocationRule.TrialId && t.DoctorUserId == addOrEditTaskAllocationRule.DoctorUserId).Select(t => t.Id).FirstOrDefault();
|
||||
|
||||
if (enrollId == Guid.Empty)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user