修改拦截

This commit is contained in:
2023-01-05 15:20:36 +08:00
parent 6fcd163988
commit 225cd8c949
17 changed files with 159 additions and 77 deletions
@@ -135,6 +135,7 @@ namespace IRaCIS.Core.Application.Contracts
/// <returns></returns>
[HttpPost("{trialId:guid}")]
[Authorize(Policy = IRaCISPolicy.IQC)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> BatchAddTrialQCQuestionConfigure(List<TrialQCQuestionConfigureBatchAdd> batchList, Guid trialId)
{
@@ -180,7 +181,7 @@ namespace IRaCIS.Core.Application.Contracts
//遍历父层级的问题
var batchConfigList = _mapper.Map<List<TrialQCQuestion>>(batchList.Where(t => t.ParentId == null));
foreach (var item in batchConfigList.Where(t=>t.ParentId==null).OrderBy(t => t.ShowOrder))
foreach (var item in batchConfigList.Where(t => t.ParentId == null).OrderBy(t => t.ShowOrder))
{
var oldParentId = item.Id;
item.Id = NewId.NextGuid();
@@ -241,6 +242,7 @@ namespace IRaCIS.Core.Application.Contracts
}
[Authorize(Policy = IRaCISPolicy.IQC)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AddOrUpdateTrialQCQuestionConfigure(TrialQCQuestionAddOrEdit addOrEditTrialQCQuestionConfigure)
{
@@ -264,6 +266,7 @@ namespace IRaCIS.Core.Application.Contracts
[HttpDelete("{trialId:guid}/{trialQCQuestionConfigureId:guid}")]
[Authorize(Policy = IRaCISPolicy.IQC)]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> DeleteTrialQCQuestionConfigure(Guid trialQCQuestionConfigureId, Guid trialId)
{
await VerifyIsQCConfirmedAsync(trialId);