修改拦截
parent
6fcd163988
commit
225cd8c949
|
@ -51,6 +51,7 @@ namespace IRaCIS.Core.API.Controllers.Special
|
|||
/// <returns>新记录Id</returns>
|
||||
[HttpPost, Route("trial/addOrUpdateTrial")]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput<Trial>> AddOrUpdateTrial(TrialCommand param)
|
||||
{
|
||||
var userId = Guid.Parse(User.FindFirst("id").Value);
|
||||
|
|
|
@ -112,6 +112,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingImageTask/SubmitOncologyReadingInfo")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SetOncologyReadingInfo(DataInspectionDto<SubmitOncologyReadingInfoInDto> opt)
|
||||
{
|
||||
|
@ -127,6 +129,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingImageTask/SubmitDicomVisitTask")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SubmitDicomVisitTask(DataInspectionDto<SubmitDicomVisitTaskInDto> opt)
|
||||
{
|
||||
|
@ -144,6 +148,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingImageTask/SubmitGlobalReadingInfo")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SubmitGlobalReadingInfo(DataInspectionDto<SubmitGlobalReadingInfoInDto> opt)
|
||||
{
|
||||
|
@ -161,6 +167,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/configTrialBasicInfo/TrialReadingInfoSign")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> TrialReadingInfoSign(DataInspectionDto<TrialReadingInfoSignInDto> opt)
|
||||
{
|
||||
|
@ -178,6 +186,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingMedicalReview/FinishMedicalReview")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> FinishMedicalReview(DataInspectionDto<FinishMedicalReviewInDto> opt)
|
||||
{
|
||||
|
@ -193,6 +203,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingMedicineQuestion/ConfirmReadingMedicineQuestion")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> ConfirmReadingMedicineQuestion(DataInspectionDto<ConfirmReadingMedicineQuestionInDto> opt)
|
||||
{
|
||||
|
@ -209,6 +221,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingImageTask/SubmitVisitTaskQuestions")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SubmitVisitTaskQuestions(DataInspectionDto<SubmitVisitTaskQuestionsInDto> opt)
|
||||
{
|
||||
|
@ -225,6 +239,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingImageTask/SubmitJudgeVisitTaskResult")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SubmitJudgeVisitTaskResult(DataInspectionDto<SaveJudgeVisitTaskResult> opt)
|
||||
{
|
||||
|
@ -318,6 +334,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/QCOperation/CRCRequestToQC")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> CRCRequestToQC(DataInspectionDto<CRCRequestToQCCommand> opt)
|
||||
{
|
||||
|
@ -332,6 +349,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// 设置QC 通过或者不通过 7:QC failed 8:QC passed
|
||||
/// </summary>
|
||||
[HttpPost, Route("Inspection/QCOperation/QCPassedOrFailed")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> QCPassedOrFailed(DataInspectionDto<QCPassedOrFailedDto> opt)
|
||||
{
|
||||
|
@ -345,6 +363,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// 一致性核查 回退 对话记录不清除 只允许PM回退
|
||||
/// </summary>
|
||||
[HttpPost, Route("Inspection/QCOperation/CheckBack")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> CheckBack(DataInspectionDto<IDDto> opt)
|
||||
{
|
||||
|
@ -361,7 +380,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadClinicalData/ReadClinicalDataSign")]
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> ReadClinicalDataSign(DataInspectionDto<ReadingClinicalDataSignIndto> opt)
|
||||
{
|
||||
|
@ -376,6 +395,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// CRC 设置已经重传完成
|
||||
/// </summary>
|
||||
[HttpPost, Route("Inspection/QCOperation/SetReuploadFinished")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SetReuploadFinished(DataInspectionDto<CRCReuploadFinishedCommand> opt)
|
||||
{
|
||||
|
@ -391,6 +411,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/TrialConfig/updateTrialState")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> UpdateTrialState(DataInspectionDto<UpdateTrialStateDto> opt)
|
||||
{
|
||||
|
@ -424,6 +445,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/VisitTask/ConfirmReReading")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[UnitOfWork]
|
||||
|
||||
public async Task<IResponseOutput> ConfirmReReading(DataInspectionDto<ConfirmReReadingCommand> opt , [FromServices] IVisitTaskHelpeService _visitTaskCommonService,[FromServices] IVisitTaskService _visitTaskService)
|
||||
|
|
|
@ -137,54 +137,54 @@ namespace IRaCIS.Core.API.Controllers
|
|||
public virtual async Task DicomFileUploadAsync(Func<string, Stream, int, Task> filePathFunc, string boundary)
|
||||
{
|
||||
|
||||
var fileCount = 0;
|
||||
var fileCount = 0;
|
||||
|
||||
var reader = new MultipartReader(boundary, HttpContext.Request.Body);
|
||||
var reader = new MultipartReader(boundary, HttpContext.Request.Body);
|
||||
|
||||
var section = await reader.ReadNextSectionAsync();
|
||||
var section = await reader.ReadNextSectionAsync();
|
||||
|
||||
while (section != null)
|
||||
while (section != null)
|
||||
{
|
||||
var hasContentDispositionHeader = ContentDispositionHeaderValue.TryParse(section.ContentDisposition, out var contentDisposition);
|
||||
|
||||
if (hasContentDispositionHeader)
|
||||
{
|
||||
var hasContentDispositionHeader = ContentDispositionHeaderValue.TryParse(section.ContentDisposition, out var contentDisposition);
|
||||
|
||||
if (hasContentDispositionHeader)
|
||||
var fileName = contentDisposition.FileName.Value ?? String.Empty;
|
||||
|
||||
string mediaType = section.ContentType ?? String.Empty;
|
||||
|
||||
|
||||
//处理压缩文件
|
||||
if (fileName.Contains(".Zip", StringComparison.OrdinalIgnoreCase) || fileName.Contains(".rar", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var archive = ArchiveFactory.Open(section.Body);
|
||||
|
||||
var fileName = contentDisposition.FileName.Value ?? String.Empty;
|
||||
|
||||
string mediaType = section.ContentType ?? String.Empty;
|
||||
|
||||
|
||||
//处理压缩文件
|
||||
if (fileName.Contains(".Zip", StringComparison.OrdinalIgnoreCase) || fileName.Contains(".rar", StringComparison.OrdinalIgnoreCase))
|
||||
foreach (var entry in archive.Entries)
|
||||
{
|
||||
var archive = ArchiveFactory.Open(section.Body);
|
||||
|
||||
foreach (var entry in archive.Entries)
|
||||
{
|
||||
if (!entry.IsDirectory)
|
||||
{
|
||||
++fileCount;
|
||||
|
||||
await filePathFunc(entry.Key, entry.OpenEntryStream(), fileCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
//普通单个文件
|
||||
else
|
||||
{
|
||||
if (mediaType.Contains("octet-stream") || mediaType.Contains("dicom"))
|
||||
if (!entry.IsDirectory)
|
||||
{
|
||||
++fileCount;
|
||||
|
||||
await filePathFunc(fileName, section.Body, fileCount);
|
||||
await filePathFunc(entry.Key, entry.OpenEntryStream(), fileCount);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
section = await reader.ReadNextSectionAsync();
|
||||
//普通单个文件
|
||||
else
|
||||
{
|
||||
if (mediaType.Contains("octet-stream") || mediaType.Contains("dicom"))
|
||||
{
|
||||
++fileCount;
|
||||
|
||||
await filePathFunc(fileName, section.Body, fileCount);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
section = await reader.ReadNextSectionAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
[HttpPost, Route("Study/ArchiveStudy")]
|
||||
[DisableFormValueModelBinding]
|
||||
[DisableRequestSizeLimit]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> ArchiveStudyNew(/*[FromForm] ArchiveStudyCommand archiveStudyCommand,*/ Guid trialId, Guid subjectVisitId, string studyInstanceUid, Guid? abandonStudyId,
|
||||
[FromServices] ILogger<UploadDownLoadController> _logger,
|
||||
[FromServices] IEasyCachingProvider _provider,
|
||||
|
@ -240,7 +240,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
{
|
||||
|
||||
|
||||
if (_provider.Get<List<SystemAnonymization>>(StaticData.Anonymize.Anonymize_AddFixedFiled).Value==null )
|
||||
if (_provider.Get<List<SystemAnonymization>>(StaticData.Anonymize.Anonymize_AddFixedFiled).Value == null)
|
||||
{
|
||||
await _mediator.Send(new AnonymizeCacheRequest());
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
var startTime = DateTime.Now;
|
||||
|
||||
if (_provider.Exists($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}" ))
|
||||
if (_provider.Exists($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}"))
|
||||
{
|
||||
return ResponseOutput.NotOk("当前已有人正在上传和归档该检查!");
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
else
|
||||
{
|
||||
studyMonitor.IsSuccess = false;
|
||||
studyMonitor.Note = JsonConvert.SerializeObject(archiveResult);
|
||||
studyMonitor.Note = JsonConvert.SerializeObject(archiveResult);
|
||||
}
|
||||
|
||||
|
||||
|
@ -415,6 +415,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
[HttpPost("ClinicalData/UploadVisitClinicalData/{trialId:guid}/{subjectVisitId:guid}")]
|
||||
[DisableRequestSizeLimit]
|
||||
[Authorize(Policy = IRaCISPolicy.CRC)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
public async Task<IResponseOutput> UploadVisitClinicalData(Guid subjectVisitId)
|
||||
{
|
||||
await QCCommon.VerifyIsCRCSubmmitAsync(_repository, _userInfo, subjectVisitId);
|
||||
|
@ -451,6 +453,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <returns></returns>
|
||||
[HttpPost("ClinicalData/UploadClinicalTemplate")]
|
||||
[DisableRequestSizeLimit]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
|
||||
public async Task<IResponseOutput<List<FileDto>>> UploadClinicalTemplate(Guid? trialId)
|
||||
{
|
||||
|
@ -489,6 +493,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <returns></returns>
|
||||
[HttpPost("ClinicalData/UploadClinicalData/{trialId:guid}/{subjectId:guid}/{readingId:guid}")]
|
||||
[DisableRequestSizeLimit]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
public async Task<IResponseOutput<List<FileDto>>> UploadReadClinicalData(Guid trialId, Guid subjectId, Guid readingId)
|
||||
{
|
||||
var filerelativePath = string.Empty;
|
||||
|
@ -523,7 +529,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="visitTaskId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("VisitTask/UploadReadingAnswerImage/{trialId:guid}/{visitTaskId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput<FileDto>> UploadReadingAnswerImage(Guid trialId, Guid visitTaskId)
|
||||
{
|
||||
|
||||
|
@ -548,7 +554,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="visitTaskId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("VisitTask/UploadJudgeTaskImage/{trialId:guid}/{visitTaskId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput<FileDto>> UploadJudgeTaskImage(Guid trialId, Guid visitTaskId)
|
||||
{
|
||||
|
||||
|
@ -576,7 +582,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="taskMedicalReviewId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("TaskMedicalReview/UploadMedicalReviewImage/{trialId:guid}/{taskMedicalReviewId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput<FileDto>> UploadMedicalReviewImage(Guid trialId, Guid taskMedicalReviewId)
|
||||
{
|
||||
string path = string.Empty;
|
||||
|
@ -615,7 +621,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
//[DisableRequestSizeLimit]
|
||||
[RequestSizeLimit(1_073_741_824)]
|
||||
[HttpPost("NoneDicomStudy/UploadNoneDicomFile/{trialId:guid}/{subjectVisitId:guid}/{noneDicomStudyId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.CRC)]
|
||||
public async Task<IResponseOutput> UploadNoneDicomFile(IFormCollection formCollection, Guid subjectVisitId, Guid noneDicomStudyId, [FromServices] IRepository<NoneDicomStudy> _noneDicomStudyRepository)
|
||||
{
|
||||
|
@ -676,7 +682,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="trialId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("QCOperation/UploadVisitCheckExcel/{trialId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> UploadVisitCheckExcel(Guid trialId)
|
||||
{
|
||||
|
@ -953,7 +959,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
public async Task<IResponseOutput<UploadFileInfoDTO>> DownloadOfficialResume(int language, Guid[] doctorIds)
|
||||
{
|
||||
|
||||
var path = await _fileService.CreateDoctorsAllAttachmentZip(doctorIds);
|
||||
var path = await _fileService.CreateDoctorsAllAttachmentZip(doctorIds);
|
||||
return ResponseOutput.Ok(new UploadFileInfoDTO
|
||||
{
|
||||
FilePath = await _fileService.CreateOfficialResumeZip(language, doctorIds),
|
||||
|
@ -982,7 +988,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
|
||||
[HttpPost, Route("enroll/downloadResume/{trialId:guid}/{language}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[AllowAnonymous]
|
||||
public async Task<IResponseOutput<string>> DownloadResume(int language, Guid trialId, Guid[] doctorIdArray)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
||||
|
|
|
@ -48,6 +48,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public string RealName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public Guid UserTypeId { get; set; }
|
||||
public string UserTypeShortName { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
|
|
@ -157,6 +157,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
ConfirmTime = confirm.ConfirmTime,
|
||||
RealName = user.LastName + " / " + user.FirstName,
|
||||
UserName = user.UserName,
|
||||
UserTypeId = user.UserTypeId,
|
||||
UserTypeShortName = user.UserTypeRole.UserTypeShortName
|
||||
};
|
||||
|
||||
|
|
|
@ -160,6 +160,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
ConfirmTime = confirm.ConfirmTime,
|
||||
RealName = trialUser.User.FullName,
|
||||
UserName = trialUser.User.UserName,
|
||||
UserTypeId = trialUser.User.UserTypeId,
|
||||
UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName
|
||||
};
|
||||
|
||||
|
@ -190,6 +191,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
ConfirmTime = confirm.ConfirmTime,
|
||||
RealName = trialUser.User.FullName,
|
||||
UserName = trialUser.User.UserName,
|
||||
UserTypeId = trialUser.User.UserTypeId,
|
||||
UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName
|
||||
|
||||
};
|
||||
|
@ -296,6 +298,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
ConfirmTime = confirm.ConfirmTime,
|
||||
RealName = trialUser.User.FullName,
|
||||
UserName = trialUser.User.UserName,
|
||||
UserTypeId = trialUser.User.UserTypeId,
|
||||
UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName,
|
||||
|
||||
FullFilePath = trialDocumentNeedConfirmedUserType.TrialDocument.Path
|
||||
|
@ -329,6 +332,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
ConfirmTime = confirm.ConfirmTime,
|
||||
RealName = trialUser.User.FullName,
|
||||
UserName = trialUser.User.UserName,
|
||||
UserTypeId = trialUser.User.UserTypeId,
|
||||
UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName,
|
||||
|
||||
FullFilePath = needConfirmEdUserType.SystemDocument.Path
|
||||
|
@ -336,7 +340,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var unionQuery = trialDocQuery.Union(systemDocQuery)
|
||||
.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
|
||||
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId);
|
||||
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
|
||||
.WhereIf(querySystemDocument.UserTypeId != null, t => t.UserTypeId == querySystemDocument.UserTypeId);
|
||||
|
||||
var result = await unionQuery.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||
|
||||
|
@ -539,6 +544,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
/// 用户 签名某个文档 可能是系统的,也可能是项目的
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> UserConfirm(UserConfirmCommand userConfirmCommand)
|
||||
{
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ using IRaCIS.Core.Application.Helper;
|
|||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
@ -755,7 +756,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
return await trialEmailNoticeConfigQueryable.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialEmailNoticeConfig(TrialEmailNoticeConfigAddOrEdit addOrEditTrialEmailNoticeConfig)
|
||||
{
|
||||
await TestEmailConfigAsync(addOrEditTrialEmailNoticeConfig);
|
||||
|
@ -822,7 +823,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
}
|
||||
|
||||
|
||||
private async Task TestEmailConfigAsync(TrialEmailNoticeConfigAddOrEdit config)
|
||||
{
|
||||
var toUserList = await _repository.Where<TrialUser>(t => t.TrialId == config.TrialId && config.ToUserTypeList.Contains(t.User.UserTypeEnum)).Select(t => new { t.User.EMail, t.User.FullName }).ToListAsync();
|
||||
|
@ -885,7 +885,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
}
|
||||
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[HttpDelete("{trialEmailNoticeConfigId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialEmailNoticeConfig(Guid trialEmailNoticeConfigId)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -221,6 +221,7 @@ namespace IRaCIS.Core.Application
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> SetGlobalReadingInfo(SetGlobalReadingInfoInDto inDto)
|
||||
{
|
||||
|
||||
|
@ -306,6 +307,7 @@ namespace IRaCIS.Core.Application
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> SetOncologySet(SetOncologySetInDto inDto)
|
||||
{
|
||||
|
||||
|
@ -407,12 +409,13 @@ namespace IRaCIS.Core.Application
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置项目阅片标准
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> SetTrialReadingCriterion(SetTrialReadingCriterionInDto inDto)
|
||||
{
|
||||
if (inDto.IsSignSave)
|
||||
|
@ -448,6 +451,7 @@ namespace IRaCIS.Core.Application
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> SetCriterionReadingInfo(SetCriterionReadingInfoInDto inDto)
|
||||
{
|
||||
ArbitrationRule arbitration = ArbitrationRule.NA;
|
||||
|
@ -653,7 +657,7 @@ namespace IRaCIS.Core.Application
|
|||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> ConfigTrialBasicInfo(BasicTrialConfig trialConfig)
|
||||
{
|
||||
await VerifyOnlyInOngoingOrInitialIzingOptAsync(trialConfig.TrialId);
|
||||
|
@ -677,7 +681,7 @@ namespace IRaCIS.Core.Application
|
|||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> ConfigTrialProcessInfo(TrialProcessConfig trialConfig)
|
||||
{
|
||||
if (!await _trialRepository.Where(t => t.Id == trialConfig.TrialId).IgnoreQueryFilters().AnyAsync(t => t.TrialStatusStr == StaticData.TrialState.TrialInitializing))
|
||||
|
@ -751,6 +755,7 @@ namespace IRaCIS.Core.Application
|
|||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> ConfigTrialUrgentInfo(TrialUrgentConfig trialConfig)
|
||||
{
|
||||
|
||||
|
@ -798,6 +803,7 @@ namespace IRaCIS.Core.Application
|
|||
[HttpPut("{trialId:guid}/{trialStatusStr}/{reason?}")]
|
||||
[UnitOfWork]
|
||||
[Authorize(Policy = IRaCISPolicy.PM)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> UpdateTrialState(Guid trialId, string trialStatusStr, string? reason)
|
||||
{
|
||||
|
||||
|
@ -870,6 +876,7 @@ namespace IRaCIS.Core.Application
|
|||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}/{isAbandon:bool}")]
|
||||
[Authorize(Policy = IRaCISPolicy.PM)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> AbandonTrial(Guid trialId, /*Guid? signId,*/ bool isAbandon)
|
||||
{
|
||||
|
||||
|
@ -905,6 +912,7 @@ namespace IRaCIS.Core.Application
|
|||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> ConfigTrialTaskInfo(TrialTaskConfig trialConfig)
|
||||
{
|
||||
var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.TrialId)).IfNullThrowException();
|
||||
|
@ -922,6 +930,7 @@ namespace IRaCIS.Core.Application
|
|||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "BeforeOngoingCantOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> ConfigTrialReadingTaskViewRule(TrialReadingTaskViewConfig trialConfig)
|
||||
{
|
||||
var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.TrialId)).IfNullThrowException();
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace IRaCIS.Application.Services
|
|||
// 最开始过滤site已经选择的用户 现在又改回去。。。
|
||||
|
||||
var query = _trialUseRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
|
||||
.Where(t => t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator|| t.User.UserTypeEnum == UserTypeEnum.CRA)
|
||||
.Where(t => t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.User.UserTypeEnum == UserTypeEnum.CRA)
|
||||
.WhereIf(param.UserTypeId != null, t => t.User.UserTypeId == param.UserTypeId)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserRealName), t => (t.User.FullName).Contains(param.UserRealName))
|
||||
.ProjectTo<AssginSiteCRCListDTO>(_mapper.ConfigurationProvider, new { siteId = param.SiteId });
|
||||
|
@ -110,15 +110,15 @@ namespace IRaCIS.Application.Services
|
|||
//之前已经选择的用户 不放在列表中,现在又要改回去 废弃
|
||||
var query = _repository.Where<User>(t => t.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||
|
||||
//正式或者培训的项目不能允许测试用户
|
||||
.WhereIf( trialType==TrialType.OfficialTrial||trialType==TrialType.Training, t => t.IsTestUser==false)
|
||||
//正式或者培训的项目不能允许测试用户
|
||||
.WhereIf(trialType == TrialType.OfficialTrial || trialType == TrialType.Training, t => t.IsTestUser == false)
|
||||
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(trialUserQuery.UserRealName), t => (t.FullName).Contains(trialUserQuery.UserRealName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(trialUserQuery.UserName), t => t.UserName.Contains(trialUserQuery.UserName))
|
||||
//.WhereIf(!string.IsNullOrWhiteSpace(trialUserQuery.OrganizationName), t => t.OrganizationName.Contains(trialUserQuery.OrganizationName))
|
||||
//.WhereIf(!string.IsNullOrWhiteSpace(trialUserQuery.OrganizationName), t => t.OrganizationName.Contains(trialUserQuery.OrganizationName))
|
||||
.WhereIf(trialUserQuery.UserTypeEnum != null, t => t.UserTypeEnum == trialUserQuery.UserTypeEnum)
|
||||
//.WhereIf(_userInfo.IsAdmin, t => t.UserTypeRole.Type == UserTypeGroup.TrialUser)
|
||||
//.WhereIf(!_userInfo.IsAdmin, t => t.UserTypeRole.Type == UserTypeGroup.TrialUser || t.UserTypeEnum != UserTypeEnum.ProjectManager)
|
||||
//.WhereIf(_userInfo.IsAdmin, t => t.UserTypeRole.Type == UserTypeGroup.TrialUser)
|
||||
//.WhereIf(!_userInfo.IsAdmin, t => t.UserTypeRole.Type == UserTypeGroup.TrialUser || t.UserTypeEnum != UserTypeEnum.ProjectManager)
|
||||
.ProjectTo<TrialUserScreeningDTO>(_mapper.ConfigurationProvider, new { trialId = trialUserQuery.TrialId });
|
||||
|
||||
return await query.ToPagedListAsync(trialUserQuery.PageIndex,
|
||||
|
@ -134,11 +134,11 @@ namespace IRaCIS.Application.Services
|
|||
/// <returns></returns>
|
||||
//[TrialAudit(AuditType.TrialAudit, AuditOptType.AddTrialStaff)]
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> AddTrialUsers(TrialUserAddCommand[] userTrialCommands)
|
||||
{
|
||||
|
||||
|
||||
var addArray = _mapper.Map<TrialUser[]>(userTrialCommands);
|
||||
|
||||
var trialUsers = await _trialUseRepository.AddRangeAsync(addArray);
|
||||
|
@ -156,7 +156,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[HttpPut]
|
||||
public async Task<IResponseOutput> UpdateTrialUser(UpdateTrialUserCommand updateTrialUserCommand)
|
||||
|
@ -193,7 +193,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <summary> 项目参与人员退出 其中IQC退出 回去释放工作量 </summary>
|
||||
//[TrialAudit(AuditType.TrialAudit, AuditOptType.DeleteTrailStaff)]
|
||||
[HttpDelete, Route("{id:guid}/{trialId:guid}/{isDelete:bool}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[UnitOfWork]
|
||||
[Obsolete]
|
||||
public async Task<IResponseOutput> DeleteMaintenanceUser(Guid id, bool isDelete)
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
data.TrialSiteUserList = await query.ToListAsync();
|
||||
|
||||
|
||||
|
||||
|
||||
var exportInfo = data;
|
||||
|
||||
|
@ -115,12 +115,12 @@ namespace IRaCIS.Core.Application.Services
|
|||
var no = 1;
|
||||
exportInfo.TrialSiteUserList.ForEach(t => t.No = no++);
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteUserSummary_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment);
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteUserSummary_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -183,7 +183,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
var query = _trialSiteUserRepository.Where(t => t.TrialId == trialId && t.SiteId == siteId).IgnoreQueryFilters()
|
||||
.ProjectTo<UserTrialDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
return await query.ToListAsync();
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> AddTrialSites(List<TrialSiteCommand> trialSites)
|
||||
{
|
||||
var addArray = _mapper.Map<List<TrialSite>>(trialSites);
|
||||
|
@ -286,7 +286,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
/// <summary> 批量添加Site下 CRC的负责人 </summary>
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> AssignSiteCRC(List<AssginSiteCRCCommand> trialSiteCRCList)
|
||||
{
|
||||
|
@ -300,13 +300,13 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
/// <summary> 删除CRC人员</summary>
|
||||
[HttpDelete, Route("{id:guid}/{trialId:guid}/{isDelete:bool}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> DeleteSiteCRC(Guid id, bool isDelete)
|
||||
{
|
||||
|
||||
|
||||
await _trialSiteUserRepository.UpdatePartialFromQueryAsync(t=>t.Id==id, u => new TrialSiteUser(){ IsDeleted = isDelete, DeletedTime = isDelete ? DateTime.Now : null },true,true);
|
||||
await _trialSiteUserRepository.UpdatePartialFromQueryAsync(t => t.Id == id, u => new TrialSiteUser() { IsDeleted = isDelete, DeletedTime = isDelete ? DateTime.Now : null }, true, true);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
@ -330,24 +330,24 @@ namespace IRaCIS.Core.Application.Services
|
|||
}
|
||||
|
||||
|
||||
public async Task<IEnumerable<string>> GetTrialSiteCodeSelect(Guid trialId,bool isIncludeVirtualSite=true)
|
||||
public async Task<IEnumerable<string>> GetTrialSiteCodeSelect(Guid trialId, bool isIncludeVirtualSite = true)
|
||||
{
|
||||
//CRC只看到他负责的
|
||||
|
||||
var list = await _trialSiteRepository.Where(t => t.TrialId == trialId)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Select(t=> t.TrialSiteCode).ToListAsync();
|
||||
.Select(t => t.TrialSiteCode).ToListAsync();
|
||||
|
||||
var virtualList = await _repository.Where<VisitTask>(t => t.IsSelfAnalysis==true && t.TrialId==trialId).Select(t => t.BlindTrialSiteCode).Distinct().ToListAsync();
|
||||
var virtualList = await _repository.Where<VisitTask>(t => t.IsSelfAnalysis == true && t.TrialId == trialId).Select(t => t.BlindTrialSiteCode).Distinct().ToListAsync();
|
||||
|
||||
return isIncludeVirtualSite? list.Concat(virtualList): list;
|
||||
return isIncludeVirtualSite ? list.Concat(virtualList) : list;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>删除 项目 下某一site </summary>
|
||||
[HttpDelete("{id:guid}/{trialId:guid}")]
|
||||
[TrialAudit(AuditType.TrialAudit, AuditOptType.DeleteTrialSite)]
|
||||
[TypeFilter(typeof(TrialResourceFilter),Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Obsolete]
|
||||
public async Task<IResponseOutput> DeleteTrialSite(Guid id)
|
||||
{
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace IRaCIS.Application.Services
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> UpdateVisitBlindName(VisitBlindNameCommand command)
|
||||
{
|
||||
|
||||
|
@ -105,6 +105,7 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> AddOrUpdateVisitStage(VisitPlanCommand visitPlan)
|
||||
{
|
||||
|
||||
|
@ -207,6 +208,7 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost("{trialId:guid}")]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt" })]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> ConfirmTrialVisitPlan(Guid trialId)
|
||||
{
|
||||
if (!await _trialRepository.AnyAsync(t => t.Id == trialId && (t.TrialStatusStr == StaticData.TrialState.TrialInitializing || t.TrialStatusStr == StaticData.TrialState.TrialOngoing)))
|
||||
|
|
Loading…
Reference in New Issue