修改拦截

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
@@ -10,6 +10,7 @@ using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Application.Filter;
namespace IRaCIS.Core.Application.Service
{
@@ -59,6 +60,7 @@ namespace IRaCIS.Core.Application.Service
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AddOrUpdateTaskAllocationRule(TaskAllocationRuleAddOrEdit addOrEditTaskAllocationRule)
{
@@ -87,6 +89,7 @@ namespace IRaCIS.Core.Application.Service
}
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[HttpDelete("{taskAllocationRuleId:guid}")]
public async Task<IResponseOutput> DeleteTaskAllocationRule(Guid taskAllocationRuleId)
@@ -125,6 +125,8 @@ namespace IRaCIS.Core.Application.Service
/// <returns></returns>
[HttpPost]
[UnitOfWork]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ConfirmGenerateSelfConsistentTask(ConsistentConfirmGenerateCommand inCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
{
@@ -269,6 +271,8 @@ namespace IRaCIS.Core.Application.Service
/// <returns></returns>
[HttpPost]
[UnitOfWork]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ConfirmGenerateGroupConsistentTask(GroupConsistentConfirmGenrateCommand inCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
{
var trialId = inCommand.TrialId;
@@ -709,6 +713,7 @@ namespace IRaCIS.Core.Application.Service
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AddOrUpdateTaskConsistentRule(TaskConsistentRuleAddOrEdit addOrEditTaskConsistentRule)
{
@@ -730,6 +735,7 @@ namespace IRaCIS.Core.Application.Service
}
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[HttpDelete("{taskConsistentRuleId:guid}")]
public async Task<IResponseOutput> DeleteTaskConsistentRule(Guid taskConsistentRuleId)
@@ -40,6 +40,8 @@ namespace IRaCIS.Core.Application.Service
}
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AddOrUpdateTaskMedicalReviewRule(TaskMedicalReviewRuleAddOrEdit addOrEditTaskTaskMedicalReviewRule)
{
var verifyExp1 = new EntityVerifyExp<TaskMedicalReviewRule>()
@@ -56,6 +58,8 @@ namespace IRaCIS.Core.Application.Service
[HttpDelete("{taskMedicalReviewRuleId:guid}")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> DeleteTaskMedicalReviewRule(Guid taskMedicalReviewRuleId)
{
@@ -10,6 +10,7 @@ using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Infrastructure;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Application.Filter;
namespace IRaCIS.Core.Application.Service
{
@@ -111,6 +112,7 @@ namespace IRaCIS.Core.Application.Service
/// </summary>
/// <param name="command"></param>
/// <returns></returns>
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ManuallyGeneratedAndAssignedMedicalReview(ManuallyGeneratedAndAssignedMedicalReviewCommand command)
{
@@ -223,6 +225,8 @@ namespace IRaCIS.Core.Application.Service
/// <returns></returns>
[UnitOfWork]
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AssignMedicalReviewTask(AssignMedicalReviewTaskCommand command)
{
@@ -14,6 +14,7 @@ using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Infra.EFCore.Common;
using System.Linq.Expressions;
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Application.Filter;
namespace IRaCIS.Core.Application.Service.Allocation
{
@@ -112,6 +113,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// </summary>
/// <param name="command"></param>
/// <returns></returns>
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> BatchAssignDoctorToSubject(BatchAssignDoctorToSubjectCommand command)
{
//var inOrder = _trialRepository.Where(t => t.Id == command.TrialId).Select(t => t.IsReadingTaskViewInOrder).FirstOrDefault();
@@ -213,6 +215,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// <returns></returns>
/// <exception cref="BusinessValidationFailedException"></exception>
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> CancelSubjectAssignedDoctor(CancelSubjectDoctorCommand cancelCommand)
{
foreach (var command in cancelCommand.CancelList.Where(t => t.IsCancelAssign))
@@ -252,6 +255,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// <returns></returns>
[HttpPost]
[UnitOfWork]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AssignSubjectTaskToDoctor(AssignSubjectTaskToDoctorCommand assignSubjectTaskToDoctorCommand)
{
var visitTask = await _visitTaskRepository.FirstOrDefaultAsync(t => t.Id == assignSubjectTaskToDoctorCommand.Id);
@@ -377,6 +381,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// <returns></returns>
[HttpPost]
[UnitOfWork]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AssignSubjectDoctor(AssginSubjectDoctorCommand assginSubjectDoctorCommand)
{
var trialId = assginSubjectDoctorCommand.TrialId;
@@ -453,6 +458,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// </summary>
/// <returns></returns> 数量
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> CancelSubjectAssignDoctor(CancelSubjectAssignCommand cancelSubjectAssignCommand)
{
if (cancelSubjectAssignCommand.IsJudgeDoctor)
@@ -493,6 +499,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// <returns></returns>
[HttpPost]
[UnitOfWork]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ManualAssignDoctorApplyTask(AssignConfirmCommand assignConfirmCommand)
{
var trialId = assignConfirmCommand.TrialId;
@@ -1045,6 +1052,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// <returns></returns>
[HttpPost]
[UnitOfWork]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ApplyReReading(ApplyReReadingCommand applyReReadingCommand)
{
@@ -1261,6 +1270,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// <returns></returns>
[HttpPost]
[UnitOfWork]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> ConfirmReReading(ConfirmReReadingCommand agreeReReadingCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
{
@@ -1839,6 +1850,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// <returns></returns>
[HttpPut("{trialId:guid}/{taskId:guid}")]
[UnitOfWork]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> PMSetTaskBack(Guid trialId, Guid taskId)
{