From dae537a223cecf7d34c5356a0180eda2adfffa8f Mon Sep 17 00:00:00 2001 From: "{872297557@qq.com}" <872297557@qq.com> Date: Fri, 9 Dec 2022 13:01:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8B=A6=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/FinancialChangeController.cs | 4 +- .../Controllers/InspectionController.cs | 2 +- .../Controllers/UploadDownLoadController.cs | 14 +++--- .../BusinessFilter/TrialResourceFilter.cs | 8 +--- .../Service/QC/NoneDicomStudyService.cs | 6 +-- .../Service/QC/QCOperationService.cs | 44 +++++++++---------- .../ReadingMedicineQuestionService.cs | 4 +- .../TrialSiteEquipmentSurveyService.cs | 4 +- .../SiteSurvey/TrialSiteSurveyService.cs | 12 ++--- .../SiteSurvey/TrialSiteUserSurveyService.cs | 4 +- .../TrialSiteUser/TrialExternalUserService.cs | 4 +- .../TrialSiteUser/TrialMaintenanceService.cs | 6 +-- .../Service/TrialSiteUser/TrialService.cs | 2 +- .../Service/TrialSiteUser/TrialSiteService.cs | 8 ++-- .../Service/Visit/SubjectService.cs | 4 +- .../Service/Visit/SubjectVisitService.cs | 8 ++-- .../Service/Visit/VisitPlanService.cs | 2 +- .../Service/WorkLoad/DoctorWorkloadService.cs | 6 +-- .../Service/WorkLoad/EnrollService.cs | 10 ++--- IRaCIS.Core.Domain/_Config/_StaticData.cs | 2 +- 20 files changed, 75 insertions(+), 79 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/FinancialChangeController.cs b/IRaCIS.Core.API/Controllers/FinancialChangeController.cs index 0c5562ad8..0b64cd206 100644 --- a/IRaCIS.Core.API/Controllers/FinancialChangeController.cs +++ b/IRaCIS.Core.API/Controllers/FinancialChangeController.cs @@ -90,7 +90,7 @@ namespace IRaCIS.Core.API.Controllers.Special /// [HttpPost, Route("doctorWorkload/workLoadAddOrUpdate")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task WorkLoadAddOrUpdate([FromServices] IDoctorWorkloadService _trialWorkloadService, WorkloadCommand workLoadAddOrUpdateModel) { var userId = Guid.Parse(User.FindFirst("id").Value); @@ -112,7 +112,7 @@ namespace IRaCIS.Core.API.Controllers.Special [HttpDelete, Route("doctorWorkload/deleteWorkLoad/{id:guid}/{trialId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task DeleteWorkLoad([FromServices] IDoctorWorkloadService _trialWorkloadService, Guid id) { //先判断该工作量的费用是否被锁定,如果被锁定,则不能删除 diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index 1041ae67b..9d8bf8c6b 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -300,7 +300,7 @@ namespace IRaCIS.Core.API.Controllers /// [HttpPost, Route("Inspection/configTrialBasicInfo/TrialConfigSignatureConfirm")] [UnitOfWork] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task TrialConfigSignatureConfirm(DataInspectionDto opt) { diff --git a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs index 7d60487ae..d8324023e 100644 --- a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs +++ b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs @@ -228,7 +228,7 @@ namespace IRaCIS.Core.API.Controllers [HttpPost, Route("Study/ArchiveStudy")] [DisableFormValueModelBinding] [DisableRequestSizeLimit] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task ArchiveStudyNew(/*[FromForm] ArchiveStudyCommand archiveStudyCommand,*/ Guid trialId, Guid subjectVisitId, string studyInstanceUid, Guid? abandonStudyId, [FromServices] ILogger _logger, [FromServices] IEasyCachingProvider _provider, @@ -523,7 +523,7 @@ namespace IRaCIS.Core.API.Controllers /// /// [HttpPost("VisitTask/UploadReadingAnswerImage/{trialId:guid}/{visitTaskId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task> UploadReadingAnswerImage(Guid trialId, Guid visitTaskId) { @@ -548,7 +548,7 @@ namespace IRaCIS.Core.API.Controllers /// /// [HttpPost("VisitTask/UploadJudgeTaskImage/{trialId:guid}/{visitTaskId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task> UploadJudgeTaskImage(Guid trialId, Guid visitTaskId) { @@ -576,7 +576,7 @@ namespace IRaCIS.Core.API.Controllers /// /// [HttpPost("TaskMedicalReview/UploadMedicalReviewImage/{trialId:guid}/{taskMedicalReviewId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task> UploadMedicalReviewImage(Guid trialId, Guid taskMedicalReviewId) { string path = string.Empty; @@ -615,7 +615,7 @@ namespace IRaCIS.Core.API.Controllers //[DisableRequestSizeLimit] [RequestSizeLimit(1_073_741_824)] [HttpPost("NoneDicomStudy/UploadNoneDicomFile/{trialId:guid}/{subjectVisitId:guid}/{noneDicomStudyId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.CRC)] public async Task UploadNoneDicomFile(IFormCollection formCollection, Guid subjectVisitId, Guid noneDicomStudyId, [FromServices] IRepository _noneDicomStudyRepository) { @@ -676,7 +676,7 @@ namespace IRaCIS.Core.API.Controllers /// /// [HttpPost("QCOperation/UploadVisitCheckExcel/{trialId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM)] public async Task UploadVisitCheckExcel(Guid trialId) { @@ -982,7 +982,7 @@ namespace IRaCIS.Core.API.Controllers [HttpPost, Route("enroll/downloadResume/{trialId:guid}/{language}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [AllowAnonymous] public async Task> DownloadResume(int language, Guid trialId, Guid[] doctorIdArray) { diff --git a/IRaCIS.Core.Application/BusinessFilter/TrialResourceFilter.cs b/IRaCIS.Core.Application/BusinessFilter/TrialResourceFilter.cs index a5e59292a..64964e14a 100644 --- a/IRaCIS.Core.Application/BusinessFilter/TrialResourceFilter.cs +++ b/IRaCIS.Core.Application/BusinessFilter/TrialResourceFilter.cs @@ -18,11 +18,7 @@ namespace IRaCIS.Core.Application.Filter private readonly string _trialOpt; - public TrialResourceFilter(IEasyCachingProvider provider, IUserInfo userInfo) - { - _provider = provider; - _userInfo = userInfo; - } + public TrialResourceFilter(IEasyCachingProvider provider, IUserInfo userInfo, string trialOpt) { @@ -117,7 +113,7 @@ namespace IRaCIS.Core.Application.Filter // 项目停止、或者完成 不允许操作 else { - context.Result = new JsonResult(ResponseOutput.NotOk("只有项目状态处于进行中时,才允许进行操作")); + context.Result = new JsonResult(ResponseOutput.NotOk("本次请求被配置规则拦截:项目状态处于进行中时,才允许操作,若此处逻辑有误,请联系开发人员修改")); } diff --git a/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs b/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs index 210aab107..c461842c9 100644 --- a/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs +++ b/IRaCIS.Core.Application/Service/QC/NoneDicomStudyService.cs @@ -47,7 +47,7 @@ namespace IRaCIS.Core.Application.Contracts [UnitOfWork] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task> AddOrUpdateNoneDicomStudy(NoneDicomStudyAddOrEdit addOrEditNoneDicomStudy) { @@ -92,7 +92,7 @@ namespace IRaCIS.Core.Application.Contracts } - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{noneDicomStudyId:guid}")] public async Task DeleteNoneDicomStudy(Guid noneDicomStudyId, Guid subjectVisitId) { @@ -115,7 +115,7 @@ namespace IRaCIS.Core.Application.Contracts [HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{noneDicomStudyFileId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task DeleteNoneDicomStudyFile(Guid noneDicomStudyFileId, Guid subjectVisitId) { //提交了 但是IQC同意的时候 是可以删除的 | 普通提交后也不能删除 diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 27d2a290b..d4c481c4e 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application.Image.QA #region QC质疑 以及回复 关闭 [HttpGet("{trialId:guid}/{subjectVisitId:guid}/{currentQCType:int}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.IQC)] public async Task VerifyQCCanAddChallenge(Guid subjectVisitId, [FromRoute] CurrentQC currentQCType) { @@ -81,7 +81,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPost("{trialId:guid}/{trialQCProcess:int}/{currentQCType:int}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.IQC)] public async Task AddOrUpdateQCChallenge(QCChallengeCommand qaQuestionCommand, Guid trialId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType) { @@ -139,7 +139,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPut] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [UnitOfWork] [Authorize(Policy = IRaCISPolicy.IQC)] public async Task CloseQCChallenge(CloseQCChallengeInDto input) @@ -192,7 +192,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{qcChallengeId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.IQC)] public async Task DeleteQCChallenge(Guid qcChallengeId) { @@ -219,7 +219,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPost("{trialId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.CRC_IQC)] public async Task AddQCChallengeReply(QADialogCommand qaDialogCommand) { @@ -254,7 +254,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPost("{trialId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM_CRC)] public async Task AddCheckChallengeReply(CheckChallengeDialogCommand checkDialogCommand) { @@ -293,7 +293,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPut("{trialId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM)] public async Task CloseCheckChallenge(CloseCheckChallengeDto input) { @@ -327,7 +327,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPut("{trialId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM)] [UnitOfWork] public async Task SetCheckPass(SetCheckPassDt data) @@ -372,7 +372,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPut("{trialId:guid}/{subjectVisitId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.CRC)] public async Task CRCRequstCheckBack(Guid subjectVisitId) { @@ -443,7 +443,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPut("{trialId:guid}/{subjectVisitId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM)] [UnitOfWork] public async Task CheckBack(Guid subjectVisitId) @@ -520,7 +520,7 @@ namespace IRaCIS.Core.Application.Image.QA /// 添加或者更新 QC核对问题列表 两个人不能同时操作,就算意外进去了,提交数据,也不会覆盖前一个人数据, 后台已经做好判断 /// [HttpPost("{trialId:guid}/{subjectVisitId:guid}/{trialQCProcess:int}/{currentQCType:int}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.IQC)] public async Task AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType) { @@ -592,7 +592,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPut("{trialId:guid}/{subjectVisitId:guid}/{studyId:guid}/{seriesId:guid}/{state:int}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.IQC)] public async Task SetSeriesState(Guid subjectVisitId, Guid studyId, Guid seriesId, int state) { @@ -659,7 +659,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPost("{trialId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.CRC_IQC)] public async Task UpdateModality(UpdateModalityCommand updateModalityCommand) { @@ -736,7 +736,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// SeriesCount [HttpPost, Route("{trialId:guid}/{subjectVisitId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [UnitOfWork] [Authorize(Policy = IRaCISPolicy.CRC_IQC)] public async Task DeleteStudyList(Guid[] ids, Guid subjectVisitId, Guid trialId) @@ -882,7 +882,7 @@ namespace IRaCIS.Core.Application.Image.QA /// true 获取 false是取消领取 /// [HttpPut("{trialId:guid}/{subjectVisitId:guid}/{obtaionOrCancel:bool}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.IQC)] public async Task ObtainOrCancelQCTask(Guid trialId, Guid subjectVisitId, bool obtaionOrCancel) { @@ -1095,7 +1095,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPost] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.CRC)] public async Task CRCRequestToQC(CRCRequestToQCCommand cRCRequestToQCCommand) { @@ -1318,7 +1318,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPost("{trialId:guid}/{subjectVisitId:guid}/{auditState:int}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.IQC)] [UnitOfWork] public async Task QCPassedOrFailed(Guid trialId, Guid subjectVisitId, [FromRoute] AuditStateEnum auditState) @@ -1546,7 +1546,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPut("{trialId:guid}/{subjectVisitId:guid}/{setOrCancel:bool}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.IQC)] public async Task SetVisitUrgent(Guid trialId, Guid subjectVisitId, bool setOrCancel) { @@ -1583,7 +1583,7 @@ namespace IRaCIS.Core.Application.Image.QA /// /// [HttpPut("{trialId:guid}/{subjectVisitId:guid}/{qcChallengeId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.IQC)] public async Task SetNeedReupload(Guid trialId, Guid qcChallengeId) { @@ -1680,7 +1680,7 @@ namespace IRaCIS.Core.Application.Image.QA /// [HttpPost] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.CRC)] public async Task SetReuploadFinished(CRCReuploadFinishedCommand cRCReuploadFinishedCommand) { @@ -1755,7 +1755,7 @@ namespace IRaCIS.Core.Application.Image.QA [HttpPut("{trialId:guid}/{subjectVisitId:guid}/{qcChallengeId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.CRC)] public async Task CRCRequestReUpload(Guid qcChallengeId) { @@ -1800,7 +1800,7 @@ namespace IRaCIS.Core.Application.Image.QA /// [HttpPut("{trialId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task UpdateSubjectAndSVInfo(UploadSubjectAndVisitCommand command) { var dbSubjectVisit = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == command.SubjectVisitId)).IfNullThrowException(); diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs index 363bc5916..67a549856 100644 --- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs @@ -223,7 +223,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task AddOrUpdateReadingMedicineTrialQuestion(ReadingMedicineTrialQuestionAddOrEdit inDto) { var existsQuery = _readingMedicineTrialQuestionRepository @@ -247,7 +247,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task DeleteReadingMedicineTrialQuestion(DeleteReadingMedicineTrialQuestion inDto) { if (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.ParentId == inDto.Id)) diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteEquipmentSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteEquipmentSurveyService.cs index c8ba08836..ead710cf2 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteEquipmentSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteEquipmentSurveyService.cs @@ -34,7 +34,7 @@ namespace IRaCIS.Core.Application.Contracts return await trialSiteEquipmentSurveyQueryable.ToListAsync(); } - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [HttpPost("{trialId:guid}")] public async Task AddOrUpdateTrialSiteEquipmentSurvey(TrialSiteEquipmentSurveyAddOrEdit addOrEditTrialSiteEquipmentSurvey) { @@ -54,7 +54,7 @@ namespace IRaCIS.Core.Application.Contracts } - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [HttpDelete("{trialSiteEquipmentSurveyId:guid}/{trialId:guid}")] public async Task DeleteTrialSiteEquipmentSurvey(Guid trialSiteEquipmentSurveyId) { diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index c7f80bdc4..74fed2de4 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -323,7 +323,7 @@ namespace IRaCIS.Core.Application.Contracts /// /// /// - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task AddOrUpdateTrialSiteSurvey(TrialSiteSurveyAddOrEdit addOrEditTrialSiteSurvey) { @@ -466,7 +466,7 @@ namespace IRaCIS.Core.Application.Contracts /// 驳回 New /// /// - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task SubmissionRejection(TrialSiteSubmitBackCommand trialSiteSubmitBackCommand) { @@ -617,7 +617,7 @@ namespace IRaCIS.Core.Application.Contracts [HttpPut("{trialId:guid}/{trialSiteSurveyId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task AbandonSiteSurvey(Guid trialSiteSurveyId) { @@ -643,9 +643,9 @@ namespace IRaCIS.Core.Application.Contracts /// /// /// - //[TypeFilter(typeof(TrialResourceFilter))] + // [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [HttpPost] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [UnitOfWork] public async Task TrialSurveySubmit(TrialSiteSurvyeSubmitDTO siteSurvyeSubmit) { @@ -756,7 +756,7 @@ namespace IRaCIS.Core.Application.Contracts await _trialSiteUserSurveyRepository.SaveChangesAsync(); } - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task SendSiteSurveyUserJoinEmail(TrialSiteUserSurveyJoinCommand joinCommand) { diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs index 0cb37aac6..4817a91fb 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs @@ -34,7 +34,7 @@ namespace IRaCIS.Core.Application.Contracts return await trialSiteUserSurveyQueryable.ToListAsync(); } - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [HttpPost("{trialId:guid}")] public async Task AddOrUpdateTrialSiteUserSurvey(TrialSiteUserSurveyAddOrEdit addOrEditTrialSiteUserSurvey) { @@ -67,7 +67,7 @@ namespace IRaCIS.Core.Application.Contracts } - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [HttpDelete("{trialSiteUserSurveyId:guid}/{trialId:guid}")] public async Task DeleteTrialSiteUserSurvey(Guid trialSiteUserSurveyId) { diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs index 8e46915c0..0d236d4cb 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialExternalUserService.cs @@ -68,7 +68,7 @@ namespace IRaCIS.Core.Application.Service /// /// [Authorize(Policy = IRaCISPolicy.PM_APM)] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task AddOrUpdateTrialExternalUser(TrialExternalUserAddAndSendEmail addOrEditTrialExternalUser) { @@ -199,7 +199,7 @@ namespace IRaCIS.Core.Application.Service //New 省掉邀请流程 [HttpPost] [Authorize(Policy = IRaCISPolicy.PM_APM)] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [UnitOfWork] public async Task SendExternalUserJoinEmail(TrialExternalUserSendEmail sendEmail) { diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs index b2dafc9e3..a811eeae5 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs @@ -128,7 +128,7 @@ namespace IRaCIS.Application.Services /// //[TrialAudit(AuditType.TrialAudit, AuditOptType.AddTrialStaff)] [HttpPost] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM)] public async Task AddTrialUsers(TrialUserAddCommand[] userTrialCommands) { @@ -150,7 +150,7 @@ namespace IRaCIS.Application.Services - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM)] [HttpPut] public async Task UpdateTrialUser(UpdateTrialUserCommand updateTrialUserCommand) @@ -187,7 +187,7 @@ namespace IRaCIS.Application.Services /// 项目参与人员退出 其中IQC退出 回去释放工作量 //[TrialAudit(AuditType.TrialAudit, AuditOptType.DeleteTrailStaff)] [HttpDelete, Route("{id:guid}/{trialId:guid}/{isDelete:bool}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [UnitOfWork] [Obsolete] public async Task DeleteMaintenanceUser(Guid id, bool isDelete) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index 7cfd50b72..f79f66a45 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -522,7 +522,7 @@ namespace IRaCIS.Application.Services /// [HttpPost("{trialId:guid}/{status:int}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task UpdateEnrollStatus(Guid trialId, EnrollStatus status) { await _repository.AddAsync(new EnrollDetail() diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs index c88187b28..fe2d59af2 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs @@ -215,7 +215,7 @@ namespace IRaCIS.Core.Application.Services [HttpPost] [UnitOfWork] [Authorize(Policy = IRaCISPolicy.PM_APM)] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task AddTrialSites(List trialSites) { var addArray = _mapper.Map>(trialSites); @@ -286,7 +286,7 @@ namespace IRaCIS.Core.Application.Services /// 批量添加Site下 CRC的负责人 [HttpPost] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM)] public async Task AssignSiteCRC(List trialSiteCRCList) { @@ -300,7 +300,7 @@ namespace IRaCIS.Core.Application.Services /// 删除CRC人员 [HttpDelete, Route("{id:guid}/{trialId:guid}/{isDelete:bool}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM)] public async Task DeleteSiteCRC(Guid id, bool isDelete) { @@ -347,7 +347,7 @@ namespace IRaCIS.Core.Application.Services /// 删除 项目 下某一site [HttpDelete("{id:guid}/{trialId:guid}")] [TrialAudit(AuditType.TrialAudit, AuditOptType.DeleteTrialSite)] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Obsolete] public async Task DeleteTrialSite(Guid id) { diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs index 4ac5448f3..4a79816d1 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs @@ -27,7 +27,7 @@ namespace IRaCIS.Application.Services /// [TrialAudit(AuditType.SubjectAudit, AuditOptType.AddOrUpdateSubject)] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM_CRC_QC)] public async Task> AddOrUpdateSubject([FromBody] SubjectCommand subjectCommand) { @@ -82,7 +82,7 @@ namespace IRaCIS.Application.Services [HttpDelete("{trialId:guid}/{id:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [UnitOfWork] [Authorize(Policy = IRaCISPolicy.PM_APM_CRC)] public async Task DeleteSubject(Guid id) diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs index 8932d4834..16eecc7b8 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs @@ -54,7 +54,7 @@ namespace IRaCIS.Core.Application.Services } [HttpPost] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [UnitOfWork] [Authorize(Policy = IRaCISPolicy.CRC)] public async Task> AddOrUpdateSV(SubjectVisitCommand svCommand) @@ -158,7 +158,7 @@ namespace IRaCIS.Core.Application.Services [HttpPut("{trialId:guid}/{subjectVisitId:guid}/{isUrgent:bool}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_IQC)] public async Task SetSubjectVisitUrgent(Guid subjectVisitId, bool isUrgent) { @@ -170,7 +170,7 @@ namespace IRaCIS.Core.Application.Services [HttpDelete, Route("{trialId:guid}/{id:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.CRC)] public async Task DeleteSV(Guid id) { @@ -490,7 +490,7 @@ namespace IRaCIS.Core.Application.Services /// /// [HttpPut("{trialId:guid}/{subjectVisitId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Obsolete] public async Task SetSVExecuted(Guid subjectVisitId) { diff --git a/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs b/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs index 7db4f54f5..21c0a07c1 100644 --- a/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs +++ b/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs @@ -473,7 +473,7 @@ namespace IRaCIS.Application.Services /// 删除项目计划某一项 废弃 [HttpDelete("{id:guid}/{trialId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Obsolete] public async Task DeleteVisitStage(Guid id) { diff --git a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs index 41914561e..10a7eeec3 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs @@ -55,7 +55,7 @@ namespace IRaCIS.Application.Services /// [HttpPost("{trialId}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM)] public async Task UploadReviewerAckSOW(Guid trialId, ReviewerAckDTO attachmentViewModel) @@ -85,7 +85,7 @@ namespace IRaCIS.Application.Services /// [HttpDelete, Route("{trialId}/{doctorId}/{attachmentId}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM)] public async Task DeleteReviewerAckSOW(Guid trialId, Guid doctorId, Guid attachmentId) { @@ -169,7 +169,7 @@ namespace IRaCIS.Application.Services /// /// [HttpPost("{trialId}/{doctorId}/{type}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM)] public async Task UpdateReviewerReadingType(Guid trialId, Guid doctorId, int type) { diff --git a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs index 18b545401..870ad4698 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs @@ -133,7 +133,7 @@ namespace IRaCIS.Application.Services /// [HttpPost("{trialId:guid}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)] public async Task SelectReviewers(Guid trialId, Guid[] doctorIdArray) { @@ -186,7 +186,7 @@ namespace IRaCIS.Application.Services /// [HttpPost("{trialId:guid}/{commitState:int}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)] public async Task SubmitReviewer(Guid trialId, Guid[] doctorIdArray, int commitState) { @@ -266,7 +266,7 @@ namespace IRaCIS.Application.Services /// [HttpPost("{trialId:guid}/{auditState:int}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)] public async Task ApproveReviewer(Guid trialId, Guid[] doctorIdArray, int auditState) { @@ -352,7 +352,7 @@ namespace IRaCIS.Application.Services /// [HttpPost] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)] [UnitOfWork] public async Task ConfirmReviewer(ConfirmReviewerCommand confirmReviewerCommand, @@ -447,7 +447,7 @@ namespace IRaCIS.Application.Services /// /// [HttpPost("{trialId:guid}/{doctorId:guid}/{optType:int}")] - [TypeFilter(typeof(TrialResourceFilter))] + [TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })] [Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM)] [Obsolete] public async Task EnrollBackOrOut(Guid trialId, Guid doctorId, int optType, DateTime? outEnrollTime) diff --git a/IRaCIS.Core.Domain/_Config/_StaticData.cs b/IRaCIS.Core.Domain/_Config/_StaticData.cs index 438cb37d5..4711d3180 100644 --- a/IRaCIS.Core.Domain/_Config/_StaticData.cs +++ b/IRaCIS.Core.Domain/_Config/_StaticData.cs @@ -56,7 +56,7 @@ public static class StaticData //默认 public static readonly string AfterStopCannNotOpt = "AfterStopCannNotOpt"; - //ongoing 前能操作 + //ongoing 前能操作 但是Stop后 也不能操作 public static readonly string BeforeOngoingCantOpt = "BeforeOngoingCantOpt"; }