修改仓储
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-08-23 11:19:24 +08:00
parent 45b14abe63
commit e81e270d69
51 changed files with 349 additions and 470 deletions
@@ -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)
{