修改工作量和阅片人权限
parent
3928960a4e
commit
fe7be9b169
|
@ -12,7 +12,7 @@ namespace IRaCIS.Core.Application.Auth
|
||||||
{
|
{
|
||||||
public const string PM_APM = "PM_APM";
|
public const string PM_APM = "PM_APM";
|
||||||
|
|
||||||
public const string PM_APM_CRC = "PM_APMAndCRC";
|
public const string PM_APM_CRC = "PM_APM_CRC";
|
||||||
|
|
||||||
public const string CRC_IQC = "CRC_IQC";
|
public const string CRC_IQC = "CRC_IQC";
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ namespace IRaCIS.Core.Application.Auth
|
||||||
|
|
||||||
public const string IQC = "IQC";
|
public const string IQC = "IQC";
|
||||||
|
|
||||||
|
public const string PM_APM_SPM_CPM = "PM_APM_SPM_CPM";
|
||||||
|
|
||||||
public const string PM_APM_CRC_QC = "PM_APM_CRC_QC";
|
public const string PM_APM_CRC_QC = "PM_APM_CRC_QC";
|
||||||
|
|
||||||
public const string SPM_CPM = "SPMAndCPM";
|
public const string SPM_CPM = "SPMAndCPM";
|
||||||
|
|
|
@ -27,6 +27,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
|
[Authorize(Policy = IRaCISPolicy.CRC)]
|
||||||
public async Task<IResponseOutput<string>> AddOrUpdateSV(SubjectVisitCommand svCommand)
|
public async Task<IResponseOutput<string>> AddOrUpdateSV(SubjectVisitCommand svCommand)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,8 @@ using IRaCIS.Core.Domain.Share;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using IRaCIS.Core.Application.Auth;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -50,6 +52,7 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost("{trialId}")]
|
[HttpPost("{trialId}")]
|
||||||
|
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
|
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||||
public async Task<IResponseOutput> UploadReviewerAckSOW(Guid trialId,
|
public async Task<IResponseOutput> UploadReviewerAckSOW(Guid trialId,
|
||||||
ReviewerAckDTO attachmentViewModel)
|
ReviewerAckDTO attachmentViewModel)
|
||||||
{
|
{
|
||||||
|
@ -79,6 +82,7 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpDelete, Route("{trialId}/{doctorId}/{attachmentId}")]
|
[HttpDelete, Route("{trialId}/{doctorId}/{attachmentId}")]
|
||||||
|
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
|
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||||
public async Task<IResponseOutput> DeleteReviewerAckSOW(Guid trialId, Guid doctorId, Guid attachmentId)
|
public async Task<IResponseOutput> DeleteReviewerAckSOW(Guid trialId, Guid doctorId, Guid attachmentId)
|
||||||
{
|
{
|
||||||
var success1 = await _attachmentRepository.BatchDeleteNoTrackingAsync(a => a.Id == attachmentId);
|
var success1 = await _attachmentRepository.BatchDeleteNoTrackingAsync(a => a.Id == attachmentId);
|
||||||
|
@ -96,6 +100,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("{trialId}/{doctorId}/{type}")]
|
[HttpPost("{trialId}/{doctorId}/{type}")]
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
|
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||||
public async Task<IResponseOutput> UpdateReviewerReadingType(Guid trialId, Guid doctorId, int type)
|
public async Task<IResponseOutput> UpdateReviewerReadingType(Guid trialId, Guid doctorId, int type)
|
||||||
{
|
{
|
||||||
var success2 = await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.DoctorId == doctorId, u =>
|
var success2 = await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.DoctorId == doctorId, u =>
|
||||||
|
@ -490,6 +495,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加或更新工作量
|
/// 添加或更新工作量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||||
public async Task<IResponseOutput> AddOrUpdateWorkload(WorkloadCommand workLoadAddOrUpdateModel,
|
public async Task<IResponseOutput> AddOrUpdateWorkload(WorkloadCommand workLoadAddOrUpdateModel,
|
||||||
Guid userId)
|
Guid userId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,8 @@ using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Application.Service.WorkLoad.DTO;
|
using IRaCIS.Core.Application.Service.WorkLoad.DTO;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using IRaCIS.Core.Application.Auth;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -124,6 +126,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
[HttpPost("{trialId:guid}")]
|
[HttpPost("{trialId:guid}")]
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
|
[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM)]
|
||||||
public async Task<IResponseOutput> SelectReviewers(Guid trialId, Guid[] doctorIdArray)
|
public async Task<IResponseOutput> SelectReviewers(Guid trialId, Guid[] doctorIdArray)
|
||||||
{
|
{
|
||||||
var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId);
|
var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId);
|
||||||
|
@ -177,6 +180,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
[HttpPost("{trialId:guid}/{commitState:int}")]
|
[HttpPost("{trialId:guid}/{commitState:int}")]
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
|
[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM)]
|
||||||
public async Task<IResponseOutput> SubmitReviewer(Guid trialId, Guid[] doctorIdArray, int commitState)
|
public async Task<IResponseOutput> SubmitReviewer(Guid trialId, Guid[] doctorIdArray, int commitState)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -256,6 +260,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
[HttpPost("{trialId:guid}/{auditState:int}")]
|
[HttpPost("{trialId:guid}/{auditState:int}")]
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
|
[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM)]
|
||||||
public async Task<IResponseOutput> ApproveReviewer(Guid trialId, Guid[] doctorIdArray, int auditState)
|
public async Task<IResponseOutput> ApproveReviewer(Guid trialId, Guid[] doctorIdArray, int auditState)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -341,6 +346,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
[HttpPost("{trialId:guid}/{confirmState:int}")]
|
[HttpPost("{trialId:guid}/{confirmState:int}")]
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
|
[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM)]
|
||||||
public async Task<IResponseOutput> ConfirmReviewer(Guid trialId, Guid[] doctorIdArray, int confirmState)
|
public async Task<IResponseOutput> ConfirmReviewer(Guid trialId, Guid[] doctorIdArray, int confirmState)
|
||||||
{
|
{
|
||||||
//var trial = _trialRepository.FirstOrDefault(t => t.Id == trialId);
|
//var trial = _trialRepository.FirstOrDefault(t => t.Id == trialId);
|
||||||
|
@ -413,6 +419,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("{trialId:guid}/{doctorId:guid}/{optType:int}")]
|
[HttpPost("{trialId:guid}/{doctorId:guid}/{optType:int}")]
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
|
[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM)]
|
||||||
public async Task<IResponseOutput> EnrollBackOrOut(Guid trialId, Guid doctorId, int optType, DateTime? outEnrollTime)
|
public async Task<IResponseOutput> EnrollBackOrOut(Guid trialId, Guid doctorId, int optType, DateTime? outEnrollTime)
|
||||||
{
|
{
|
||||||
var intoGroupItem = await _enrollRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.DoctorId == doctorId);
|
var intoGroupItem = await _enrollRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.DoctorId == doctorId);
|
||||||
|
|
Loading…
Reference in New Issue