Uat_Study
parent
91a8f855d6
commit
b149922cc2
|
@ -8,6 +8,7 @@ using IRaCIS.Application.Interfaces;
|
|||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Image.QA;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
|
@ -31,6 +32,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
private readonly IQCListService _qCListService;
|
||||
private readonly ITrialConfigService _trialConfigService;
|
||||
private readonly ISubjectService _subjectService;
|
||||
private readonly ISubjectVisitService _subjectVisitService;
|
||||
private readonly IInspectionService _inspectionService;
|
||||
private readonly IRepository<DataInspection> _dataInspectionRepository;
|
||||
private delegate Task<IResponseOutput> executionFun(dynamic data);
|
||||
|
@ -42,8 +44,10 @@ namespace IRaCIS.Core.API.Controllers
|
|||
IRepository<DataInspection> dataInspectionRepository,
|
||||
IQCListService _qCListService,
|
||||
IInspectionService sinspectionService,
|
||||
ITrialConfigService _trialConfigService,
|
||||
ISubjectService _subjectService)
|
||||
ITrialConfigService _trialConfigService,
|
||||
ISubjectService _subjectService,
|
||||
ISubjectVisitService subjectVisitService
|
||||
)
|
||||
{
|
||||
_repository = repository;
|
||||
_mapper = mapper;
|
||||
|
@ -53,6 +57,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
this._qCListService = _qCListService;
|
||||
this._trialConfigService = _trialConfigService;
|
||||
this._subjectService = _subjectService;
|
||||
_subjectVisitService = subjectVisitService;
|
||||
this._dataInspectionRepository = dataInspectionRepository;
|
||||
}
|
||||
|
||||
|
@ -66,19 +71,27 @@ namespace IRaCIS.Core.API.Controllers
|
|||
return await _inspectionService.GetInspectionData(dto);
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 用户 签名某个文档 签署文件
|
||||
///// </summary>
|
||||
///// <param name="opt"></param>
|
||||
///// <returns></returns>
|
||||
//[HttpPost, Route("Inspection/trialDocument/userConfirm")]
|
||||
//[UnitOfWork]
|
||||
//public async Task<IResponseOutput> UserConfirm(TrialDocumentConfirmDTO opt)
|
||||
//{
|
||||
// var fun = _trialDocumentService.UserConfirm;
|
||||
// return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
|
||||
//}
|
||||
|
||||
#region 访视
|
||||
|
||||
[HttpPost, Route("Inspection/subjectVisit/addOrUpdateSV")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> AddOrUpdateSV(DataInspectionDto<SubjectVisitCommand> opt)
|
||||
{
|
||||
//opt.AuditInfo.SubjectCode = opt.OptCommand.Code;
|
||||
var fun = await _subjectVisitService.AddOrUpdateSV(opt.OptCommand);
|
||||
opt.AuditInfo.SubjectId = Guid.Parse(fun.Data);
|
||||
var statusdata = new
|
||||
{
|
||||
Status = 1,
|
||||
//OutEnrollmentTime = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
//VisitOverTime = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
Reason = string.Empty,
|
||||
};
|
||||
|
||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun, statusdata);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region setting
|
||||
///// <summary>
|
||||
|
@ -138,11 +151,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||
{
|
||||
|
||||
opt.AuditInfo.SubjectCode = opt.OptCommand.Code;
|
||||
|
||||
var fun = await _subjectService.AddOrUpdateSubject(opt.OptCommand);
|
||||
|
||||
opt.AuditInfo.SubjectId = Guid.Parse(fun.Data);
|
||||
|
||||
var statusdata = new {
|
||||
Status = 1,
|
||||
//OutEnrollmentTime = DateTime.Now.ToString("yyyy-MM-dd"),
|
||||
|
|
|
@ -123,6 +123,11 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||
#endregion
|
||||
|
||||
|
||||
public class DataInspectionDto<T> : InspectionBase, IInspectionDTO, ISignDTO
|
||||
{
|
||||
public T OptCommand { get; set; }
|
||||
}
|
||||
|
||||
#region 受试者
|
||||
public class InsSubjectCommand : InspectionBase, IInspectionDTO, ISignDTO
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace IRaCIS.Core.Application.Interfaces
|
|||
{
|
||||
public interface ISubjectVisitService
|
||||
{
|
||||
Task<IResponseOutput> AddOrUpdateSV(SubjectVisitCommand svCommand);
|
||||
Task<IResponseOutput<string>> AddOrUpdateSV(SubjectVisitCommand svCommand);
|
||||
Task<IResponseOutput> DeleteSV(Guid id);
|
||||
Task<List<VisitStudyDTO>> GetVisitStudyList(Guid trialId, Guid sujectVisitId, int isReading);
|
||||
Task<IResponseOutput> SetSVExecuted(Guid subjectVisitId);
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> AddOrUpdateSV(SubjectVisitCommand svCommand)
|
||||
public async Task<IResponseOutput<string>> AddOrUpdateSV(SubjectVisitCommand svCommand)
|
||||
{
|
||||
|
||||
var verifyExp1 = new EntityVerifyExp<SubjectVisit>()
|
||||
|
@ -178,7 +178,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
return ResponseOutput.Ok(needDealEntity.Id.ToString());
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue