diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index 721ecda37..ff9524601 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -35,6 +35,7 @@ namespace IRaCIS.Core.API.Controllers private readonly ITrialConfigService _trialConfigService; private readonly ISubjectService _subjectService; private readonly ISubjectVisitService _subjectVisitService; + private readonly IQCOperationService _qCOperationService; private readonly IVisitPlanService _visitPlanService; private readonly IInspectionService _inspectionService; private readonly IRepository _dataInspectionRepository; @@ -50,22 +51,26 @@ namespace IRaCIS.Core.API.Controllers ITrialConfigService _trialConfigService, ISubjectService _subjectService, ISubjectVisitService subjectVisitService, + IQCOperationService qCOperationService, IVisitPlanService visitPlanService ) { - _repository = repository; - _mapper = mapper; - _userInfo = userInfo; + this._repository = repository; + this._mapper = mapper; + this._userInfo = userInfo; this._inspectionService = sinspectionService; this._trialDocumentService = trialDocumentService; this._qCListService = _qCListService; this._trialConfigService = _trialConfigService; this._subjectService = _subjectService; - _subjectVisitService = subjectVisitService; + this._subjectVisitService = subjectVisitService; + this._qCOperationService = qCOperationService; this._visitPlanService = visitPlanService; this._dataInspectionRepository = dataInspectionRepository; } + + /// /// 获取稽查数据 /// @@ -76,6 +81,45 @@ namespace IRaCIS.Core.API.Controllers return await _inspectionService.GetInspectionData(dto); } + + #region Qc + + + /// + /// 调整影像状态 + /// + /// + /// + [HttpPost, Route("Inspection/QCOperation/UpdateSubjectAndSVInfo")] + [UnitOfWork] + public async Task UpdateSubjectAndSVInfo(DataInspectionDto opt) + { + var fun = _qCOperationService.UpdateSubjectAndSVInfo; + return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); + } + + + /// + /// 删除影像 + /// + /// + /// + [HttpPost, Route("Inspection/QCOperation/deleteStudyList")] + [UnitOfWork] + public async Task deleteStudyList(DataInspectionDto opt) + { + var fun = await _qCOperationService.DeleteStudyList(opt.OptCommand.ids, opt.OptCommand.subjectVisitId, opt.OptCommand.trialId); + if (!fun.IsSuccess) + { + return ResponseOutput.NotOk(fun.ErrorMessage); + } + return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo,null, fun); + } + + + #endregion + + #region 访视计划 /// /// 新增或添加访视计划 diff --git a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs index 98e853d58..bac0a0e00 100644 --- a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs +++ b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs @@ -183,6 +183,15 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO public SignDTO SignInfo { get; set; } = new SignDTO() { }; } + #region Qc + public class DeleteStudyList + { + public Guid[] ids { get; set; } + public Guid subjectVisitId { get; set; } + public Guid trialId { get; set; } + } + #endregion + #region 受试者 public class InsSubjectCommand : InspectionBase, IInspectionDTO, ISignDTO {