@@ -14,16 +14,11 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
/// TrialSiteEquipmentSurveyService
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class TrialSiteEquipmentSurveyService : BaseService, ITrialSiteEquipmentSurveyService
|
||||
public class TrialSiteEquipmentSurveyService(
|
||||
IRepository<TrialSiteEquipmentSurvey> _trialSiteEquipmentSurveyRepository,
|
||||
IRepository<TrialSiteSurvey> _trialSiteSurveyRepository) : BaseService, ITrialSiteEquipmentSurveyService
|
||||
{
|
||||
private readonly IRepository<TrialSiteEquipmentSurvey> _trialSiteEquipmentSurveyRepository;
|
||||
private readonly IRepository<TrialSiteSurvey> _trialSiteSurveyRepository;
|
||||
|
||||
public TrialSiteEquipmentSurveyService(IRepository<TrialSiteEquipmentSurvey> trialSiteEquipmentSurveyRepository, IRepository<TrialSiteSurvey> trialSiteSurveyRepository)
|
||||
{
|
||||
_trialSiteEquipmentSurveyRepository = trialSiteEquipmentSurveyRepository;
|
||||
_trialSiteSurveyRepository = trialSiteSurveyRepository;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpGet("{trialSiteSurveyId:guid}")]
|
||||
|
||||
@@ -31,39 +31,21 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
/// TrialSiteSurveyService
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class TrialSiteSurveyService : BaseService, ITrialSiteSurveyService
|
||||
public class TrialSiteSurveyService(
|
||||
IRepository<TrialSiteSurvey> _trialSiteSurveyRepository,
|
||||
IRepository<TrialSiteUserSurvey> _trialSiteUserSurveyRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<TrialSite> _trialSiteRepository,
|
||||
IRepository<TrialUser> _trialUserRepository,
|
||||
IRepository<TrialSiteUser> _trialSiteUserRepository,
|
||||
IDistributedLockProvider _distributedLockProvider,
|
||||
ITokenService _tokenService,
|
||||
IMailVerificationService _mailVerificationService,
|
||||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig) : BaseService, ITrialSiteSurveyService
|
||||
{
|
||||
private readonly IRepository<TrialSiteSurvey> _trialSiteSurveyRepository;
|
||||
private readonly IRepository<TrialSiteUserSurvey> _trialSiteUserSurveyRepository;
|
||||
private readonly IRepository<User> _userRepository;
|
||||
private readonly IRepository<TrialSite> _trialSiteRepository;
|
||||
private readonly IRepository<TrialUser> _trialUserRepository;
|
||||
private readonly IRepository<TrialSiteUser> _trialSiteUserRepository;
|
||||
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||
private readonly ITokenService _tokenService;
|
||||
private readonly IMailVerificationService _mailVerificationService;
|
||||
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig;
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
|
||||
|
||||
public TrialSiteSurveyService(IRepository<TrialSiteSurvey> trialSiteSurveyRepository, IRepository<TrialUser> trialUserRepository, IRepository<TrialSiteUserSurvey> trialSiteUserSurveyRepository,
|
||||
IRepository<User> userRepository, IRepository<TrialSite> trialSiteRepository,
|
||||
ITokenService tokenService,
|
||||
IMailVerificationService mailVerificationService, IRepository<TrialSiteUser> trialSiteUserRepository, IDistributedLockProvider distributedLockProvider, IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig)
|
||||
{
|
||||
_trialSiteSurveyRepository = trialSiteSurveyRepository;
|
||||
_trialSiteUserSurveyRepository = trialSiteUserSurveyRepository;
|
||||
_userRepository = userRepository;
|
||||
_trialUserRepository = trialUserRepository;
|
||||
_trialSiteRepository = trialSiteRepository;
|
||||
_tokenService = tokenService;
|
||||
_mailVerificationService = mailVerificationService;
|
||||
_trialSiteUserRepository = trialSiteUserRepository;
|
||||
_distributedLockProvider = distributedLockProvider;
|
||||
|
||||
_systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -396,9 +378,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
|
||||
var result = await _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId && t.TrialId == trialId).IgnoreQueryFilters()
|
||||
.ProjectTo<LoginReturnDTO>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }).FirstOrDefaultAsync().IfNullThrowException();
|
||||
.ProjectTo<LoginReturnDTO>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }).FirstOrDefaultAsync().IfNullThrowException();
|
||||
|
||||
var siteSurveryConfig = _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId).IgnoreQueryFilters().Select(t => t.Trial.TrialExtraConfigJsonStr).FirstOrDefault()??string.Empty;
|
||||
var siteSurveryConfig = _trialSiteSurveyRepository.Where(t => t.Id == trialSiteSurveyId).IgnoreQueryFilters().Select(t => t.Trial.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
|
||||
|
||||
result.SiteSurveyFiledConfig = JsonConvert.DeserializeObject<TrialExtraConfig>(siteSurveryConfig) ?? new TrialExtraConfig();
|
||||
return result;
|
||||
@@ -619,7 +601,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
|
||||
|
||||
await _IMailVerificationService.SiteSurveyRejectEmail(messageToSend, survey , trialSiteSubmitBackCommand.RouteUrl, user);
|
||||
await _IMailVerificationService.SiteSurveyRejectEmail(messageToSend, survey, trialSiteSubmitBackCommand.RouteUrl, user);
|
||||
|
||||
|
||||
await _trialSiteSurveyRepository.SaveChangesAsync();
|
||||
|
||||
@@ -15,16 +15,11 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
/// TrialSiteUserSurveyService
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class TrialSiteUserSurveyService : BaseService, ITrialSiteUserSurveyService
|
||||
public class TrialSiteUserSurveyService(
|
||||
IRepository<TrialSiteUserSurvey> _trialSiteUserSurveyRepository,
|
||||
IRepository<TrialSiteSurvey> _trialSiteSurveyRepository) : BaseService, ITrialSiteUserSurveyService
|
||||
{
|
||||
private readonly IRepository<TrialSiteUserSurvey> _trialSiteUserSurveyRepository;
|
||||
private readonly IRepository<TrialSiteSurvey> _trialSiteSurveyRepository;
|
||||
|
||||
public TrialSiteUserSurveyService(IRepository<TrialSiteUserSurvey> trialSiteUserSurveyRepository, IRepository<TrialSiteSurvey> trialSiteSurveyRepository)
|
||||
{
|
||||
_trialSiteUserSurveyRepository = trialSiteUserSurveyRepository;
|
||||
_trialSiteSurveyRepository = trialSiteSurveyRepository;
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<List<TrialSiteUserSurveyView>> GetTrialSiteUserSurveyList(TrialSiteUserSurverQuery inquery)
|
||||
|
||||
Reference in New Issue
Block a user