修改仓储
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
@@ -19,6 +19,8 @@ namespace IRaCIS.Application.Services
IRepository<Doctor> _doctorRepository,
IRepository<EnrollDetail> _enrollDetailRepository,
IRepository<Workload> _workloadRepository,
IRepository<User> _userRepository,
IRepository<TrialUser> _trialUserRepository,
IMailVerificationService _mailVerificationService) : BaseService, IEnrollService
{
@@ -140,7 +142,7 @@ namespace IRaCIS.Application.Services
TrialId = trialId,
EnrollStatus = EnrollStatus.HasApplyDownloadResume,
DoctorUserId = _repository.Where<User>(t => t.DoctorId == doctorId).Select(t => t.Id).FirstOrDefault()
DoctorUserId = _userRepository.Where(t => t.DoctorId == doctorId).Select(t => t.Id).FirstOrDefault()
}); ;
await _enrollDetailRepository.AddAsync(new EnrollDetail()
@@ -168,7 +170,7 @@ namespace IRaCIS.Application.Services
var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId);
var hasSPMOrCPM = await _repository.Where<TrialUser>(t => t.TrialId == trialId).AnyAsync(t=> t.User.UserTypeEnum == UserTypeEnum.SPM || t.User.UserTypeEnum == UserTypeEnum.CPM);
var hasSPMOrCPM = await _trialUserRepository.Where(t => t.TrialId == trialId).AnyAsync(t=> t.User.UserTypeEnum == UserTypeEnum.SPM || t.User.UserTypeEnum == UserTypeEnum.CPM);
if (trial != null)
{