删除后端权限认证

This commit is contained in:
2023-07-03 10:14:28 +08:00
parent 748cc495be
commit 70813984be
16 changed files with 95 additions and 68 deletions
@@ -407,7 +407,7 @@ namespace IRaCIS.Core.Application.Services
}
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt", "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM)]
//[Authorize(Policy = IRaCISPolicy.PM)]
public async Task<IResponseOutput> AddOrUpdateTrialDocument(AddOrEditTrialDocument addOrEditTrialDocument)
{
if (addOrEditTrialDocument.Id == null)
@@ -477,7 +477,7 @@ namespace IRaCIS.Core.Application.Services
/// <param name="trialId"></param>
/// <returns></returns>
[HttpDelete("{trialId:guid}/{trialDocumentId:guid}")]
[Authorize(Policy = IRaCISPolicy.PM)]
//[Authorize(Policy = IRaCISPolicy.PM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt", "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> DeleteTrialDocument(Guid trialDocumentId, Guid trialId)
{
@@ -68,7 +68,7 @@ namespace IRaCIS.Core.Application.Image.QA
[HttpGet("{trialId:guid}/{subjectVisitId:guid}/{currentQCType:int}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
public async Task<IResponseOutput> VerifyQCCanAddChallenge(Guid subjectVisitId, [FromRoute] CurrentQC currentQCType)
{
await VerifyIsCanQCAsync(null, subjectVisitId);
@@ -92,7 +92,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPost("{trialId:guid}/{trialQCProcess:int}/{currentQCType:int}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
public async Task<IResponseOutput> AddOrUpdateQCChallenge(QCChallengeCommand qaQuestionCommand, Guid trialId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType)
{
await VerifyIsCanQCAsync(null, qaQuestionCommand.SubjectVisitId);
@@ -152,7 +152,7 @@ namespace IRaCIS.Core.Application.Image.QA
[HttpPut]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[UnitOfWork]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
public async Task<IResponseOutput> CloseQCChallenge(CloseQCChallengeInDto input)
{
@@ -206,7 +206,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{qcChallengeId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
public async Task<IResponseOutput> DeleteQCChallenge(Guid qcChallengeId)
{
@@ -234,7 +234,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPost("{trialId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.CRC_IQC)]
// [Authorize(Policy = IRaCISPolicy.CRC_IQC)]
public async Task<IResponseOutput> AddQCChallengeReply(QADialogCommand qaDialogCommand)
{
var qaReply = _mapper.Map<QCChallengeDialog>(qaDialogCommand);
@@ -269,7 +269,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPost("{trialId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM_CRC)]
//[Authorize(Policy = IRaCISPolicy.PM_APM_CRC)]
public async Task<IResponseOutput> AddCheckChallengeReply(CheckChallengeDialogCommand checkDialogCommand)
{
@@ -309,7 +309,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPut("{trialId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
public async Task<IResponseOutput> CloseCheckChallenge(CloseCheckChallengeDto input)
{
@@ -345,7 +345,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPut("{trialId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[UnitOfWork]
public async Task<IResponseOutput> SetCheckPass(SetCheckPassDt data)
{
@@ -392,7 +392,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPut("{trialId:guid}/{subjectVisitId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.CRC)]
//[Authorize(Policy = IRaCISPolicy.CRC)]
public async Task<IResponseOutput> CRCRequstCheckBack(Guid subjectVisitId)
{
var sv = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId)).IfNullThrowException();
@@ -436,7 +436,7 @@ namespace IRaCIS.Core.Application.Image.QA
[HttpPut("{trialId:guid}/{subjectVisitId:guid}")]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> RejectCheckBack(Guid subjectVisitId)
{
@@ -471,7 +471,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPut("{trialId:guid}/{subjectVisitId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[UnitOfWork]
public async Task<IResponseOutput> CheckBack(Guid subjectVisitId)
{
@@ -550,7 +550,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// </summary>
[HttpPost("{trialId:guid}/{subjectVisitId:guid}/{trialQCProcess:int}/{currentQCType:int}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
public async Task<IResponseOutput> AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType)
{
//验证是否能操作
@@ -622,7 +622,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{studyId:guid}/{seriesId:guid}/{state:int}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
public async Task<IResponseOutput> SetSeriesState(Guid subjectVisitId, Guid studyId, Guid seriesId, int state)
{
@@ -689,7 +689,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPost("{trialId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.CRC_IQC)]
// [Authorize(Policy = IRaCISPolicy.CRC_IQC)]
public async Task<IResponseOutput> UpdateModality(UpdateModalityCommand updateModalityCommand)
{
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC)
@@ -770,7 +770,7 @@ namespace IRaCIS.Core.Application.Image.QA
[HttpPost, Route("{trialId:guid}/{subjectVisitId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[UnitOfWork]
[Authorize(Policy = IRaCISPolicy.CRC_IQC)]
// [Authorize(Policy = IRaCISPolicy.CRC_IQC)]
public async Task<IResponseOutput> DeleteStudyList(Guid[] ids, Guid subjectVisitId, Guid trialId)
{
@@ -853,7 +853,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <summary>替换当前领取人 </summary>
[HttpPut("{trialId:guid}/{subjectVisitId:guid}")]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ReplaceQCTaskActionUser(Guid trialId, Guid subjectVisitId)
{
@@ -888,7 +888,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{obtaionOrCancel:bool}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
public async Task<IResponseOutput> ObtainOrCancelQCTask(Guid trialId, Guid subjectVisitId, bool obtaionOrCancel)
{
@@ -1111,7 +1111,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.CRC)]
//[Authorize(Policy = IRaCISPolicy.CRC)]
public async Task<IResponseOutput> CRCRequestToQC(CRCRequestToQCCommand cRCRequestToQCCommand)
{
@@ -1418,7 +1418,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPost("{trialId:guid}/{subjectVisitId:guid}/{auditState:int}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
[UnitOfWork]
public async Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, [FromRoute] AuditStateEnum auditState)
{
@@ -1657,7 +1657,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{setOrCancel:bool}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
public async Task<IResponseOutput> SetVisitUrgent(Guid trialId, Guid subjectVisitId, bool setOrCancel)
{
var sv = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId)).IfNullThrowException();
@@ -1695,7 +1695,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{qcChallengeId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
public async Task<IResponseOutput> SetNeedReupload(Guid trialId, Guid qcChallengeId)
{
@@ -1796,7 +1796,7 @@ namespace IRaCIS.Core.Application.Image.QA
/// <returns></returns>
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.CRC)]
//[Authorize(Policy = IRaCISPolicy.CRC)]
public async Task<IResponseOutput> SetReuploadFinished(CRCReuploadFinishedCommand cRCReuploadFinishedCommand)
{
@@ -1874,7 +1874,7 @@ namespace IRaCIS.Core.Application.Image.QA
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{qcChallengeId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.CRC)]
//[Authorize(Policy = IRaCISPolicy.CRC)]
public async Task<IResponseOutput> CRCRequestReUpload(Guid qcChallengeId)
{
var qcChallenge = (await _qcChallengeRepository.FirstOrDefaultAsync(t => t.Id == qcChallengeId)).IfNullThrowException();
@@ -1959,7 +1959,7 @@ namespace IRaCIS.Core.Application.Image.QA
[HttpPost("{trialId:guid}")]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ForwardSVDicomImage(Guid[] subjectVisitIdList)
{
@@ -141,7 +141,7 @@ namespace IRaCIS.Core.Application.Contracts
/// <param name="trialId"></param>
/// <returns></returns>
[HttpPost("{trialId:guid}")]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> BatchAddTrialQCQuestionConfigure(List<TrialQCQuestionConfigureBatchAdd> batchList, Guid trialId)
{
@@ -248,7 +248,7 @@ namespace IRaCIS.Core.Application.Contracts
return childList;
}
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AddOrUpdateTrialQCQuestionConfigure(TrialQCQuestionAddOrEdit addOrEditTrialQCQuestionConfigure)
{
@@ -273,7 +273,7 @@ namespace IRaCIS.Core.Application.Contracts
[HttpDelete("{trialId:guid}/{trialQCQuestionConfigureId:guid}")]
[Authorize(Policy = IRaCISPolicy.IQC)]
//[Authorize(Policy = IRaCISPolicy.IQC)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> DeleteTrialQCQuestionConfigure(Guid trialQCQuestionConfigureId, Guid trialId)
{
@@ -830,7 +830,7 @@ namespace IRaCIS.Core.Application
/// 签名确认 包括项目的三组配置 + QC问题确认 后修改状态 (适用于不会回退的,项目废除、状态修改, 存在回退 不在这里弄,提供单独接口修改状态)
/// </summary>
/// <returns></returns>
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
public async Task<IResponseOutput> TrialConfigSignatureConfirm(SignConfirmDTO signConfirmDTO)
{
await VerifyOnlyInOngoingOrInitialIzingOptAsync(signConfirmDTO.TrialId);
@@ -912,7 +912,7 @@ namespace IRaCIS.Core.Application
/// <param name="trialConfig"></param>
/// <returns></returns>
[HttpPut]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt", "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ConfigTrialBasicInfo(BasicTrialConfig trialConfig)
{
@@ -936,7 +936,7 @@ namespace IRaCIS.Core.Application
/// <param name="trialConfig"></param>
/// <returns></returns>
[HttpPut]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt", "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ConfigTrialProcessInfo(TrialProcessConfig trialConfig)
{
@@ -1052,7 +1052,7 @@ namespace IRaCIS.Core.Application
/// <param name="trialConfig"></param>
/// <returns></returns>
[HttpPut]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt", "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ConfigTrialUrgentInfo(TrialUrgentConfig trialConfig)
{
@@ -1101,7 +1101,7 @@ namespace IRaCIS.Core.Application
/// <returns></returns>
[HttpPut("{trialId:guid}/{trialStatusStr}/{reason?}")]
[UnitOfWork]
[Authorize(Policy = IRaCISPolicy.PM)]
//[Authorize(Policy = IRaCISPolicy.PM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> UpdateTrialState(Guid trialId, string trialStatusStr, string? reason)
{
@@ -1176,7 +1176,7 @@ namespace IRaCIS.Core.Application
/// <param name="isAbandon"></param>
/// <returns></returns>
[HttpPut("{trialId:guid}/{isAbandon:bool}")]
[Authorize(Policy = IRaCISPolicy.PM)]
//[Authorize(Policy = IRaCISPolicy.PM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt", "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AbandonTrial(Guid trialId, /*Guid? signId,*/ bool isAbandon)
{
@@ -67,7 +67,7 @@ namespace IRaCIS.Core.Application.Service
/// </summary>
/// <param name="addOrEditTrialExternalUser"></param>
/// <returns></returns>
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[UnitOfWork]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AddOrUpdateTrialExternalUser(TrialExternalUserAddAndSendEmail addOrEditTrialExternalUser)
@@ -218,7 +218,7 @@ namespace IRaCIS.Core.Application.Service
[HttpDelete("{trialExternalUserId:guid}/{isSystemUser:bool}/{systemUserId}")]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
public async Task<IResponseOutput> DeleteTrialExternalUser(Guid trialExternalUserId, bool isSystemUser, Guid systemUserId)
{
var trialExternalUser = await _trialExternalUseRepository.FirstOrDefaultAsync(t => t.Id == trialExternalUserId);
@@ -243,7 +243,7 @@ namespace IRaCIS.Core.Application.Service
//New 省掉邀请流程
[HttpPost]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[UnitOfWork]
public async Task<IResponseOutput> SendExternalUserJoinEmail(TrialExternalUserSendEmail sendEmail)
@@ -157,7 +157,7 @@ namespace IRaCIS.Application.Services
//[TrialAudit(AuditType.TrialAudit, AuditOptType.AddTrialStaff)]
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
public async Task<IResponseOutput> AddTrialUsers(TrialUserAddCommand[] userTrialCommands)
{
@@ -179,7 +179,7 @@ namespace IRaCIS.Application.Services
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[HttpPut]
public async Task<IResponseOutput> UpdateTrialUser(UpdateTrialUserCommand updateTrialUserCommand)
{
@@ -212,7 +212,7 @@ namespace IRaCIS.Core.Application.Services
/// <summary>Setting页面 Site批量添加</summary>
[HttpPost]
[UnitOfWork]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AddTrialSites(List<TrialSiteCommand> trialSites)
{
@@ -232,7 +232,7 @@ namespace IRaCIS.Core.Application.Services
/// <param name="editTrialSiteCommand"></param>
/// <returns></returns>
[HttpPut]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
public async Task<IResponseOutput> EditTrialSite(EditTrialSiteCommand editTrialSiteCommand)
{
@@ -289,7 +289,7 @@ namespace IRaCIS.Core.Application.Services
/// <summary> 批量添加Site下 CRC的负责人 </summary>
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
public async Task<IResponseOutput> AssignSiteCRC(List<AssginSiteCRCCommand> trialSiteCRCList)
{
var addArray = _mapper.Map<List<TrialSiteUser>>(trialSiteCRCList);
@@ -303,7 +303,7 @@ namespace IRaCIS.Core.Application.Services
/// <summary> 删除CRC人员</summary>
[HttpDelete, Route("{id:guid}/{trialId:guid}/{isDelete:bool}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
public async Task<IResponseOutput> DeleteSiteCRC(Guid id, bool isDelete)
{
@@ -28,7 +28,7 @@ namespace IRaCIS.Application.Services
[TrialAudit(AuditType.SubjectAudit, AuditOptType.AddOrUpdateSubject)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM_CRC_QC)]
//[Authorize(Policy = IRaCISPolicy.PM_APM_CRC_QC)]
public async Task<IResponseOutput<string>> AddOrUpdateSubject([FromBody] SubjectCommand subjectCommand)
{
var svlist = new List<SubjectVisit>();
@@ -75,7 +75,7 @@ namespace IRaCIS.Application.Services
[HttpPut]
[UnitOfWork]
[Authorize(Policy = IRaCISPolicy.PM_APM_CRC_QC)]
//[Authorize(Policy = IRaCISPolicy.PM_APM_CRC_QC)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> UpdateSubjectStatus(SubjectStatusChangeCommand subjectStatusChangeCommand)
{
@@ -87,7 +87,7 @@ namespace IRaCIS.Application.Services
[HttpDelete("{trialId:guid}/{id:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[UnitOfWork]
[Authorize(Policy = IRaCISPolicy.PM_APM_CRC)]
//[Authorize(Policy = IRaCISPolicy.PM_APM_CRC)]
public async Task<IResponseOutput> DeleteSubject(Guid id)
{
@@ -73,7 +73,7 @@ namespace IRaCIS.Core.Application.Services
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[UnitOfWork]
[Authorize(Policy = IRaCISPolicy.CRC)]
//[Authorize(Policy = IRaCISPolicy.CRC)]
public async Task<IResponseOutput<string>> AddOrUpdateSV(SubjectVisitCommand svCommand)
{
@@ -202,7 +202,7 @@ namespace IRaCIS.Core.Application.Services
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{isUrgent:bool}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_IQC)]
//[Authorize(Policy = IRaCISPolicy.PM_IQC)]
public async Task<IResponseOutput> SetSubjectVisitUrgent(Guid subjectVisitId, bool isUrgent)
{
await _subjectVisitRepository.UpdatePartialFromQueryAsync(subjectVisitId, u => new SubjectVisit() { IsUrgent = isUrgent }, true);
@@ -214,7 +214,7 @@ namespace IRaCIS.Core.Application.Services
[HttpDelete, Route("{trialId:guid}/{id:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.CRC)]
//[Authorize(Policy = IRaCISPolicy.CRC)]
public async Task<IResponseOutput> DeleteSV(Guid id)
{
if (await _repository.AnyAsync<DicomStudy>(t => t.SubjectVisitId == id))
@@ -103,7 +103,7 @@ namespace IRaCIS.Application.Services
/// <summary> 添加或更新访视计划某项</summary>
[UnitOfWork]
[HttpPost]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt", "AfterStopCannNotOpt" })]
//[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AddOrUpdateVisitStage(VisitPlanCommand visitPlan)
@@ -214,7 +214,7 @@ namespace IRaCIS.Application.Services
[UnitOfWork]
[HttpPost("{trialId:guid}")]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt", "AfterStopCannNotOpt" })]
//[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ConfirmTrialVisitPlan(Guid trialId)
@@ -59,7 +59,7 @@ namespace IRaCIS.Application.Services
//[HttpPost("{trialId}")]
//[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
////[Authorize(Policy = IRaCISPolicy.PM_APM)]
//public async Task<IResponseOutput> UploadReviewerAckSOW(Guid trialId,
// ReviewerAckDTO attachmentViewModel)
//{
@@ -89,7 +89,7 @@ namespace IRaCIS.Application.Services
//[HttpDelete, Route("{trialId}/{doctorId}/{attachmentId}")]
//[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
////[Authorize(Policy = IRaCISPolicy.PM_APM)]
//public async Task<IResponseOutput> DeleteReviewerAckSOW(Guid trialId, Guid doctorId, Guid attachmentId)
//{
// var success1 = await _attachmentRepository.BatchDeleteNoTrackingAsync(a => a.Id == attachmentId);
@@ -113,7 +113,7 @@ namespace IRaCIS.Application.Services
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> SetEnrollReadingCategory(SetEnrollReadingCategoryInDto inDto)
{
@@ -167,7 +167,7 @@ namespace IRaCIS.Application.Services
/// </summary>
/// <param name="inCommand"></param>
/// <returns></returns>
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> UpdateTrialReviewerState(SetEnrollEnableCommand inCommand)
{
@@ -183,7 +183,7 @@ namespace IRaCIS.Application.Services
/// <returns></returns>
[HttpPost("{trialId}/{doctorId}/{type}")]
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
public async Task<IResponseOutput> UpdateReviewerReadingType(Guid trialId, Guid doctorId, int type)
{
var success2 = await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.DoctorId == doctorId, u =>
@@ -545,7 +545,7 @@ namespace IRaCIS.Application.Services
/// <summary>
/// 添加或更新工作量
/// </summary>
[Authorize(Policy = IRaCISPolicy.PM_APM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM)]
public async Task<IResponseOutput> AddOrUpdateWorkload(WorkloadCommand workLoadAddOrUpdateModel,
Guid userId)
{
@@ -135,7 +135,7 @@ namespace IRaCIS.Application.Services
[HttpPost("{trialId:guid}")]
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)]
public async Task<IResponseOutput> SelectReviewers(Guid trialId, Guid[] doctorIdArray)
{
var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId);
@@ -188,7 +188,7 @@ namespace IRaCIS.Application.Services
[HttpPost("{trialId:guid}/{commitState:int}")]
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)]
public async Task<IResponseOutput> SubmitReviewer(Guid trialId, Guid[] doctorIdArray, int commitState)
{
@@ -269,7 +269,7 @@ namespace IRaCIS.Application.Services
[HttpPost("{trialId:guid}/{auditState:int}")]
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)]
public async Task<IResponseOutput> ApproveReviewer(Guid trialId, Guid[] doctorIdArray, int auditState)
{
@@ -355,7 +355,7 @@ namespace IRaCIS.Application.Services
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM_SMM_CMM)]
[UnitOfWork]
public async Task<IResponseOutput> ConfirmReviewer(ConfirmReviewerCommand confirmReviewerCommand,
[FromServices] IRepository<TrialUser> _trialUserRepository,
@@ -476,7 +476,7 @@ namespace IRaCIS.Application.Services
/// <returns></returns>
[HttpPost("{trialId:guid}/{doctorId:guid}/{optType:int}")]
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM)]
//[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM)]
[Obsolete]
public async Task<IResponseOutput> EnrollBackOrOut(Guid trialId, Guid doctorId, int optType, DateTime? outEnrollTime)
{