添加接口
This commit is contained in:
@@ -10,17 +10,17 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
public interface IQCOperationService
|
||||
{
|
||||
Task<IResponseOutput> CheckBack(Guid subjectVisitId, Guid signId);
|
||||
Task<IResponseOutput> CheckBack(Guid subjectVisitId);
|
||||
Task<IResponseOutput> SetNeedReupload(Guid trialId, Guid signId, Guid qcChallengeId);
|
||||
Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, Guid signId, [FromRoute] AuditStateEnum auditState);
|
||||
Task<IResponseOutput> SetCheckPass(Guid subjectVisitId,Guid signId);
|
||||
Task<IResponseOutput> SetCheckPass(Guid subjectVisitId);
|
||||
|
||||
|
||||
|
||||
|
||||
Task<IResponseOutput<CheckChallengeDialog>> AddCheckChallengeReply(CheckChallengeDialogCommand checkDialogCommand);
|
||||
Task<IResponseOutput> AddOrUpdateQCChallenge(QCChallengeCommand qaQuestionCommand, Guid trialId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType);
|
||||
Task<IResponseOutput> AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType, [FromServices] IServiceProvider serviceProvider);
|
||||
Task<IResponseOutput> AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType);
|
||||
Task<IResponseOutput> AddQCChallengeReply(QADialogCommand qaDialogCommand);
|
||||
Task<IResponseOutput> CloseCheckChallenge(Guid subjectVisitId);
|
||||
Task<IResponseOutput> CloseQCChallenge(Guid qcChallengeId, Guid subjectVisitId, [FromRoute] QCChallengeCloseEnum closeEnum, [FromRoute] string closeReason);
|
||||
|
||||
@@ -31,11 +31,13 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
private readonly DicomFileStoreHelper _dicomFileStoreHelper;
|
||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IServiceProvider serviceProvider;
|
||||
private readonly IInspectionService _sinspectionService;
|
||||
private object _locker = new object();
|
||||
|
||||
public QCOperationService(DicomFileStoreHelper dicomFileStoreHelper, IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<Trial> trialRepository,
|
||||
IServiceProvider serviceProvider,
|
||||
IInspectionService sinspectionService,
|
||||
IRepository<DicomStudy> _trialRepository
|
||||
)
|
||||
@@ -43,6 +45,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
_dicomFileStoreHelper = dicomFileStoreHelper;
|
||||
_subjectVisitRepository = subjectVisitRepository;
|
||||
this._trialRepository = trialRepository;
|
||||
this.serviceProvider = serviceProvider;
|
||||
this._sinspectionService = sinspectionService;
|
||||
}
|
||||
|
||||
@@ -400,7 +403,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}/{signId:guid}/{subjectVisitId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> SetCheckPass(Guid subjectVisitId, Guid signId)
|
||||
public async Task<IResponseOutput> SetCheckPass(Guid subjectVisitId)
|
||||
{
|
||||
if (_userInfo.UserTypeEnumInt != (int)UserTypeEnum.ProjectManager)
|
||||
{
|
||||
@@ -429,9 +432,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
await _repository.SaveChangesAsync();
|
||||
|
||||
var signSuccess = await _repository.UpdateFromQueryAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
|
||||
//var signSuccess = await _repository.UpdateFromQueryAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
|
||||
|
||||
return ResponseOutput.Result(signSuccess);
|
||||
return ResponseOutput.Result(true);
|
||||
|
||||
}
|
||||
|
||||
@@ -465,7 +468,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}/{signId:guid}/{subjectVisitId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> CheckBack(Guid subjectVisitId, Guid signId)
|
||||
public async Task<IResponseOutput> CheckBack(Guid subjectVisitId)
|
||||
{
|
||||
if (_userInfo.UserTypeEnumInt != (int)UserTypeEnum.ProjectManager)
|
||||
{
|
||||
@@ -521,9 +524,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
var success = await _repository.SaveChangesAsync();
|
||||
|
||||
var signSuccess = await _repository.UpdateFromQueryAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
|
||||
// var signSuccess = await _repository.UpdateFromQueryAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
|
||||
|
||||
return ResponseOutput.Result(signSuccess && success);
|
||||
return ResponseOutput.Result( success);
|
||||
|
||||
}
|
||||
|
||||
@@ -734,7 +737,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
/// </summary>
|
||||
[HttpPost("{trialId:guid}/{subjectVisitId:guid}/{trialQCProcess:int}/{currentQCType:int}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType, [FromServices] IServiceProvider serviceProvider)
|
||||
public async Task<IResponseOutput> AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType)
|
||||
{
|
||||
//验证是否能操作
|
||||
var verifyResult = await VerifyQCCanOpt(subjectVisitId);
|
||||
|
||||
Reference in New Issue
Block a user