From 91227c1a679c628545114d8e623b18c07e62cf78 Mon Sep 17 00:00:00 2001 From: "{872297557@qq.com}" <872297557@qq.com> Date: Wed, 30 Nov 2022 15:23:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E4=B8=8E=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=9A=84JoinTime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Controllers/UploadDownLoadController.cs | 1 - IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs | 4 ++-- .../Reading/MedicalAudit/ReadingMedicineQuestionService.cs | 3 +++ .../Service/TrialSiteUser/TrialExternalUserService.cs | 4 ++-- IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs index da4c832e..8cec2af4 100644 --- a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs +++ b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs @@ -187,7 +187,6 @@ namespace IRaCIS.Core.API.Controllers section = await reader.ReadNextSectionAsync(); } - //return fileCount; } diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs index 0d4d8b55..9bc73c8c 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs @@ -80,12 +80,12 @@ namespace IRaCIS.Application.Services var query = _doctorRepository.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation) .WhereIf(selectionQuery.DepartmentId != null, t => t.DepartmentId == selectionQuery.DepartmentId) - .WhereIf(selectionQuery.SpecialityId != null, t => t.SpecialityId == selectionQuery.SpecialityId) + .WhereIf(selectionQuery.SpecialityId != null, t => t.SpecialityId == selectionQuery.SpecialityId) .WhereIf(trialConfig.TrialType == TrialType.NoneOfficial, t => t.IsVirtual ==true) .WhereIf(selectionQuery.HospitalId != null, t => t.HospitalId == selectionQuery.HospitalId) .WhereIf(selectionQuery.PositionId != null, t => t.PositionId == selectionQuery.PositionId) .WhereIf(selectionQuery.RankId != null, t => t.RankId == selectionQuery.RankId) - .WhereIf(selectionQuery.ContractorStatus != null, t => t.CooperateStatus == selectionQuery.ContractorStatus) + .WhereIf(selectionQuery.ContractorStatus != null, t => t.CooperateStatus == selectionQuery.ContractorStatus ) .WhereIf(selectionQuery.InformationConfirmed != null, t => t.ResumeStatus == selectionQuery.InformationConfirmed) .WhereIf(selectionQuery.AcceptingNewTrial != null, t => t.AcceptingNewTrial == selectionQuery.AcceptingNewTrial) .WhereIf(!string.IsNullOrWhiteSpace(selectionQuery.Name), t => t.ChineseName.Contains(selectionQuery.Name) || (t.LastName + t.FirstName).Contains(selectionQuery.Name)) diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs index 6bfaa297..363bc591 100644 --- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs @@ -5,6 +5,7 @@ using MassTransit; using IRaCIS.Core.Infrastructure; using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Domain.Share; +using IRaCIS.Core.Application.Filter; namespace IRaCIS.Core.Application.Service { @@ -222,6 +223,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] + [TypeFilter(typeof(TrialResourceFilter))] public async Task AddOrUpdateReadingMedicineTrialQuestion(ReadingMedicineTrialQuestionAddOrEdit inDto) { var existsQuery = _readingMedicineTrialQuestionRepository @@ -245,6 +247,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] + [TypeFilter(typeof(TrialResourceFilter))] public async Task DeleteReadingMedicineTrialQuestion(DeleteReadingMedicineTrialQuestion inDto) { if (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.ParentId == inDto.Id)) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs index 1c7d083a..d6c175ae 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs @@ -216,7 +216,7 @@ namespace IRaCIS.Core.Application.Service if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == userId, true)) { - await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId }); + await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId ,JoinTime = DateTime.Now }); await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable }); @@ -698,7 +698,7 @@ namespace IRaCIS.Core.Application.Service //判断TrialUser中是否存在 不存在就插入 if (!await _repository.AnyAsync(t => t.TrialId == trialId && t.UserId == externalUser.SystemUserId)) { - await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = (Guid)externalUser.SystemUserId }); + await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = (Guid)externalUser.SystemUserId, JoinTime = DateTime.Now }); await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialExternalUserId, u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.UserConfirmed }); diff --git a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs index e7526536..6c98d16f 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs @@ -387,7 +387,7 @@ namespace IRaCIS.Application.Services if( !await _trialUserRepository.AnyAsync(t=>t.TrialId==trialId && t.UserId== userId, true)) { - await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId }); + await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId ,JoinTime = DateTime.Now }); } await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.Id == intoGroupItem.Id, u => new Enroll() { DoctorUserId = userId });