修改仓储
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,7 +19,10 @@ namespace IRaCIS.Core.Application.Service
/// UserFeedBackService
/// </summary>
[ApiExplorerSettings(GroupName = "Management")]
public class UserFeedBackService (IRepository<UserFeedBack> _userFeedBackRepository) : BaseService, IUserFeedBackService
public class UserFeedBackService (IRepository<UserFeedBack> _userFeedBackRepository,
IRepository<VisitTask> _visitTaskRepository,
IRepository<SubjectVisit> _subjectVisitRepository,
IRepository<Subject> _subjectRepository) : BaseService, IUserFeedBackService
{
@@ -74,7 +77,7 @@ namespace IRaCIS.Core.Application.Service
if (addOrEditUserFeedBack.VisitTaskId != null)
{
var info = await _repository.Where<VisitTask>(t => t.Id == addOrEditUserFeedBack.VisitTaskId).Select(t => new { t.SubjectId, t.SourceSubjectVisitId, t.Subject.TrialSiteId }).FirstOrDefaultAsync();
var info = await _visitTaskRepository.Where(t => t.Id == addOrEditUserFeedBack.VisitTaskId).Select(t => new { t.SubjectId, t.SourceSubjectVisitId, t.Subject.TrialSiteId }).FirstOrDefaultAsync();
if (info != null)
{
@@ -86,7 +89,7 @@ namespace IRaCIS.Core.Application.Service
else if (addOrEditUserFeedBack.SubjectVisitId != null)
{
var info = await _repository.Where<SubjectVisit>(t => t.Id == addOrEditUserFeedBack.SubjectVisitId).Select(t => new { t.TrialSiteId, t.SubjectId }).FirstOrDefaultAsync();
var info = await _subjectVisitRepository.Where(t => t.Id == addOrEditUserFeedBack.SubjectVisitId).Select(t => new { t.TrialSiteId, t.SubjectId }).FirstOrDefaultAsync();
if (info != null)
{
@@ -96,7 +99,7 @@ namespace IRaCIS.Core.Application.Service
}
else if (addOrEditUserFeedBack.SubjectId != null)
{
var info = await _repository.Where<Subject>(t => t.Id == addOrEditUserFeedBack.SubjectId).Select(t => new { t.TrialSiteId }).FirstOrDefaultAsync();
var info = await _subjectRepository.Where(t => t.Id == addOrEditUserFeedBack.SubjectId).Select(t => new { t.TrialSiteId }).FirstOrDefaultAsync();
if (info != null)
{
@@ -32,6 +32,7 @@ namespace IRaCIS.Application.Services
IRepository<UserPassWordLog> _userPassWordLogRepository,
IDistributedLockProvider _distributedLockProvider,
IEasyCachingProvider _cache,
IRepository<Trial> _trialRepository,
IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig,
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
@@ -814,7 +815,7 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task<PageOutput<UserLogView>> GetUserLogList(UserLogQuery inQuery)
{
DateTime? trialCreateTime = inQuery.TrialId != null ? _repository.Where<Trial>(t => t.Id == inQuery.TrialId).Select(t => t.CreateTime).FirstOrDefault() : null;
DateTime? trialCreateTime = inQuery.TrialId != null ? _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.CreateTime).FirstOrDefault() : null;
var userLogQueryable =
_userLogRepository