修改访视计划
parent
64d9a5dd13
commit
bf69a6949e
|
@ -637,25 +637,25 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region 访视计划
|
#region 访视计划
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 新增或添加访视计划
|
///// 新增或添加访视计划
|
||||||
/// </summary>
|
///// </summary>
|
||||||
/// <param name="opt"></param>
|
///// <param name="opt"></param>
|
||||||
/// <returns></returns>
|
///// <returns></returns>
|
||||||
[HttpPost, Route("Inspection/VisitPlan/AddOrUpdateVisitStage")]
|
//[HttpPost, Route("Inspection/VisitPlan/AddOrUpdateVisitStage")]
|
||||||
[UnitOfWork]
|
//[UnitOfWork]
|
||||||
public async Task<IResponseOutput> AddOrUpdateVisitStage(DataInspectionDto<VisitPlanCommand> opt)
|
//public async Task<IResponseOutput> AddOrUpdateVisitStage(DataInspectionDto<VisitPlanCommand> opt)
|
||||||
{
|
//{
|
||||||
var fun = await _visitPlanService.AddOrUpdateVisitStage(opt.OptCommand);
|
// var fun = await _visitPlanService.AddOrUpdateVisitStage(opt.OptCommand);
|
||||||
if (!fun.IsSuccess)
|
// if (!fun.IsSuccess)
|
||||||
{
|
// {
|
||||||
return ResponseOutput.NotOk(fun.ErrorMessage);
|
// return ResponseOutput.NotOk(fun.ErrorMessage);
|
||||||
}
|
// }
|
||||||
opt.AuditInfo.VisitStageId = fun.Data.Id;
|
// opt.AuditInfo.VisitStageId = fun.Data.Id;
|
||||||
opt.OptCommand.Id = fun.Data.Id;
|
// opt.OptCommand.Id = fun.Data.Id;
|
||||||
opt.AuditInfo.BlindName = fun.Data.BlindName;
|
// opt.AuditInfo.BlindName = fun.Data.BlindName;
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
// return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun);
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -878,23 +878,23 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 保存并确认访视计划
|
///// 保存并确认访视计划
|
||||||
/// </summary>
|
///// </summary>
|
||||||
/// <param name="opt"></param>
|
///// <param name="opt"></param>
|
||||||
/// <returns></returns>
|
///// <returns></returns>
|
||||||
[HttpPost, Route("Inspection/VisitPlan/SaveConfirmTrialVisitPlan")]
|
//[HttpPost, Route("Inspection/VisitPlan/SaveConfirmTrialVisitPlan")]
|
||||||
[UnitOfWork]
|
//[UnitOfWork]
|
||||||
public async Task<IResponseOutput> SaveConfirmTrialVisitPlan(DataInspectionDto<VisitPlanCommand> opt)
|
//public async Task<IResponseOutput> SaveConfirmTrialVisitPlan(DataInspectionDto<VisitPlanCommand> opt)
|
||||||
{
|
//{
|
||||||
var update = await _visitPlanService.AddOrUpdateVisitStage(opt.OptCommand);
|
// var update = await _visitPlanService.AddOrUpdateVisitStage(opt.OptCommand);
|
||||||
if (!update.IsSuccess)
|
// if (!update.IsSuccess)
|
||||||
{
|
// {
|
||||||
return ResponseOutput.NotOk(update.ErrorMessage);
|
// return ResponseOutput.NotOk(update.ErrorMessage);
|
||||||
}
|
// }
|
||||||
var fun = _visitPlanService.ConfirmTrialVisitPlan;
|
// var fun = _visitPlanService.ConfirmTrialVisitPlan;
|
||||||
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
// return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
|
||||||
}
|
//}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#region 受试者
|
#region 受试者
|
||||||
|
|
|
@ -282,13 +282,6 @@
|
||||||
<param name="opt"></param>
|
<param name="opt"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.AddOrUpdateVisitStage(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Application.Contracts.VisitPlanCommand})">
|
|
||||||
<summary>
|
|
||||||
新增或添加访视计划
|
|
||||||
</summary>
|
|
||||||
<param name="opt"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.DeleteVisitStage(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Contracts.IDDto})">
|
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.DeleteVisitStage(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Contracts.IDDto})">
|
||||||
<summary>
|
<summary>
|
||||||
删除访视计划对象
|
删除访视计划对象
|
||||||
|
@ -358,13 +351,6 @@
|
||||||
<param name="opt"></param>
|
<param name="opt"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.SaveConfirmTrialVisitPlan(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Application.Contracts.VisitPlanCommand})">
|
|
||||||
<summary>
|
|
||||||
保存并确认访视计划
|
|
||||||
</summary>
|
|
||||||
<param name="opt"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.AddOrUpdateSubject(IRaCIS.Core.Application.Service.Inspection.DTO.InsSubjectCommand)">
|
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.AddOrUpdateSubject(IRaCIS.Core.Application.Service.Inspection.DTO.InsSubjectCommand)">
|
||||||
<summary>
|
<summary>
|
||||||
添加或更新受试者信息[New]
|
添加或更新受试者信息[New]
|
||||||
|
|
|
@ -2563,7 +2563,7 @@
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.VisitPlanService.AddOrUpdateVisitStage(IRaCIS.Application.Contracts.VisitPlanCommand)">
|
<member name="M:IRaCIS.Application.Services.VisitPlanService.AddOrUpdateVisitStage(IRaCIS.Application.Contracts.VisitPlanCommand)">
|
||||||
<summary> 添加或更新访视计划某项[New]</summary>
|
<summary> 添加或更新访视计划某项</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.VisitPlanService.DeleteVisitStage(System.Guid)">
|
<member name="M:IRaCIS.Application.Services.VisitPlanService.DeleteVisitStage(System.Guid)">
|
||||||
<summary> 删除项目计划某一项 废弃 </summary>
|
<summary> 删除项目计划某一项 废弃 </summary>
|
||||||
|
|
|
@ -162,7 +162,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[HttpDelete("{trialId:guid}/{previousHistoryId:guid}")]
|
[HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{previousHistoryId:guid}")]
|
||||||
public async Task<IResponseOutput> DeletePreviousHistory(Guid previousHistoryId)
|
public async Task<IResponseOutput> DeletePreviousHistory(Guid previousHistoryId)
|
||||||
{
|
{
|
||||||
await _previousHistoryRepository.DeleteFromQueryAsync(t => t.Id == previousHistoryId,true);
|
await _previousHistoryRepository.DeleteFromQueryAsync(t => t.Id == previousHistoryId,true);
|
||||||
|
@ -187,7 +187,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[HttpDelete("{trialId:guid}/{previousOtherId:guid}")]
|
[HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{previousOtherId:guid}")]
|
||||||
public async Task<IResponseOutput> DeletePreviousOther(Guid previousOtherId)
|
public async Task<IResponseOutput> DeletePreviousOther(Guid previousOtherId)
|
||||||
{
|
{
|
||||||
await _previousOtherRepository.DeleteFromQueryAsync(t => t.Id == previousOtherId,true);
|
await _previousOtherRepository.DeleteFromQueryAsync(t => t.Id == previousOtherId,true);
|
||||||
|
@ -212,7 +212,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[HttpDelete("{trialId:guid}/{previousSurgeryId:guid}")]
|
[HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{previousSurgeryId:guid}")]
|
||||||
public async Task<IResponseOutput> DeletePreviousSurgery(Guid previousSurgeryId)
|
public async Task<IResponseOutput> DeletePreviousSurgery(Guid previousSurgeryId)
|
||||||
{
|
{
|
||||||
var success = await _previousSurgeryRepository.DeleteFromQueryAsync(t => t.Id == previousSurgeryId,true);
|
var success = await _previousSurgeryRepository.DeleteFromQueryAsync(t => t.Id == previousSurgeryId,true);
|
||||||
|
@ -237,7 +237,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpDelete("{trialId:guid}/{previousPDFId:guid}")]
|
[HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{previousPDFId:guid}")]
|
||||||
public async Task<IResponseOutput> DeletePreviousPDF(Guid previousPDFId)
|
public async Task<IResponseOutput> DeletePreviousPDF(Guid previousPDFId)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
[HttpDelete("{trialId:guid}/{noneDicomStudyId:guid}")]
|
[HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{noneDicomStudyId:guid}")]
|
||||||
public async Task<IResponseOutput> DeleteNoneDicomStudy(Guid noneDicomStudyId)
|
public async Task<IResponseOutput> DeleteNoneDicomStudy(Guid noneDicomStudyId)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -137,7 +137,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[HttpDelete("{trialId:guid}/{noneDicomStudyFileId:guid}")]
|
[HttpDelete("{trialId:guid}/{subjectVisitId:guid}/{noneDicomStudyFileId:guid}")]
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
public async Task<IResponseOutput> DeleteNoneDicomStudyFile(Guid noneDicomStudyFileId)
|
public async Task<IResponseOutput> DeleteNoneDicomStudyFile(Guid noneDicomStudyFileId)
|
||||||
{
|
{
|
||||||
//var subjectVisitId = await _noneDicomStudyFileRepository.Where(t => t.Id == noneDicomStudyFileId).Select(t => t.NoneDicomStudy.SubjectVisitId).FirstOrDefaultAsync();
|
//var subjectVisitId = await _noneDicomStudyFileRepository.Where(t => t.Id == noneDicomStudyFileId).Select(t => t.NoneDicomStudy.SubjectVisitId).FirstOrDefaultAsync();
|
||||||
|
@ -176,7 +177,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
//[DisableRequestSizeLimit]
|
//[DisableRequestSizeLimit]
|
||||||
[RequestSizeLimit(1_073_741_824)]
|
[RequestSizeLimit(1_073_741_824)]
|
||||||
[HttpPost("{noneDicomStudyId:guid}/{subjectVisitId:guid}")]
|
[HttpPost("{trialId:guid}/{subjectVisitId:guid}/{noneDicomStudyId:guid}")]
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter))]
|
||||||
public async Task<IResponseOutput> UploadNoneDicomFile(IFormCollection formCollection, Guid subjectVisitId, Guid noneDicomStudyId)
|
public async Task<IResponseOutput> UploadNoneDicomFile(IFormCollection formCollection, Guid subjectVisitId, Guid noneDicomStudyId)
|
||||||
{
|
{
|
||||||
var rootPath = Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\')).IfNullThrowException().FullName;
|
var rootPath = Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\')).IfNullThrowException().FullName;
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace IRaCIS.Application.Interfaces
|
||||||
{
|
{
|
||||||
public interface IVisitPlanService
|
public interface IVisitPlanService
|
||||||
{
|
{
|
||||||
Task<IResponseOutput<VisitStage>> AddOrUpdateVisitStage(VisitPlanCommand visitPlan);
|
Task<IResponseOutput> AddOrUpdateVisitStage(VisitPlanCommand visitPlan);
|
||||||
Task<IResponseOutput> ConfirmTrialVisitPlan(Guid trialId);
|
Task<IResponseOutput> ConfirmTrialVisitPlan(Guid trialId);
|
||||||
Task<IResponseOutput> DeleteVisitStage(Guid id);
|
Task<IResponseOutput> DeleteVisitStage(Guid id);
|
||||||
Task<IActionResult> DownloadInflunceStudyList(Guid visitPlanInfluenceStatId);
|
Task<IActionResult> DownloadInflunceStudyList(Guid visitPlanInfluenceStatId);
|
||||||
|
|
|
@ -8,11 +8,8 @@ using IRaCIS.Core.Application.MediatR.CommandAndQueries;
|
||||||
using Magicodes.ExporterAndImporter.Core;
|
using Magicodes.ExporterAndImporter.Core;
|
||||||
using Magicodes.ExporterAndImporter.Excel;
|
using Magicodes.ExporterAndImporter.Excel;
|
||||||
using Magicodes.ExporterAndImporter.Excel.AspNetCore;
|
using Magicodes.ExporterAndImporter.Excel.AspNetCore;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using IRaCIS.Core.Domain.Common;
|
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -25,7 +22,6 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<VisitPlanInfluenceStudy> _influnceRepository;
|
private readonly IRepository<VisitPlanInfluenceStudy> _influnceRepository;
|
||||||
|
|
||||||
public VisitPlanService(IRepository<VisitStage> visitStageRepository, IRepository<Trial> trialRepository, IRepository<SubjectVisit> subjectVisitRepository,
|
public VisitPlanService(IRepository<VisitStage> visitStageRepository, IRepository<Trial> trialRepository, IRepository<SubjectVisit> subjectVisitRepository,
|
||||||
IRepository<VisitPlanInfluenceStat> influnceStatRepository,
|
|
||||||
IRepository<VisitPlanInfluenceStudy> visitPlanInfluenceStudy)
|
IRepository<VisitPlanInfluenceStudy> visitPlanInfluenceStudy)
|
||||||
{
|
{
|
||||||
_visitStageRepository = visitStageRepository;
|
_visitStageRepository = visitStageRepository;
|
||||||
|
@ -37,6 +33,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
///暂时不用
|
///暂时不用
|
||||||
/// <summary> 获取项目访视计划</summary>
|
/// <summary> 获取项目访视计划</summary>
|
||||||
|
[HttpPost]
|
||||||
public async Task<PageOutput<VisitStageDTO>> GetTrialVisitStageList(VisitPlanQueryDTO param)
|
public async Task<PageOutput<VisitStageDTO>> GetTrialVisitStageList(VisitPlanQueryDTO param)
|
||||||
{
|
{
|
||||||
var visitStageQuery = _visitStageRepository.AsQueryable(true).Where(u => u.TrialId == param.TrialId)
|
var visitStageQuery = _visitStageRepository.AsQueryable(true).Where(u => u.TrialId == param.TrialId)
|
||||||
|
@ -82,10 +79,10 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary> 添加或更新访视计划某项[New]</summary>
|
/// <summary> 添加或更新访视计划某项</summary>
|
||||||
[HttpPost]
|
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput<VisitStage>> AddOrUpdateVisitStage(VisitPlanCommand visitPlan)
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> AddOrUpdateVisitStage(VisitPlanCommand visitPlan)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!await _trialRepository.Where(t => t.Id == visitPlan.TrialId).IgnoreQueryFilters().AnyAsync(t => t.TrialStatusStr == StaticData.TrialOngoing || t.TrialStatusStr == StaticData.TrialInitializing))
|
if (!await _trialRepository.Where(t => t.Id == visitPlan.TrialId).IgnoreQueryFilters().AnyAsync(t => t.TrialStatusStr == StaticData.TrialOngoing || t.TrialStatusStr == StaticData.TrialInitializing))
|
||||||
|
@ -149,7 +146,7 @@ namespace IRaCIS.Application.Services
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(visitPlanItem);
|
return ResponseOutput.Ok(visitPlanItem.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
else//update
|
else//update
|
||||||
|
@ -201,7 +198,7 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(stage);
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -213,7 +210,6 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
[HttpPost("{trialId:guid}")]
|
[HttpPost("{trialId:guid}")]
|
||||||
[TrialAudit(AuditType.TrialAudit, AuditOptType.ConfirmTrialVisitPlan)]
|
|
||||||
|
|
||||||
public async Task<IResponseOutput> ConfirmTrialVisitPlan(Guid trialId)
|
public async Task<IResponseOutput> ConfirmTrialVisitPlan(Guid trialId)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue