对接修改
This commit is contained in:
@@ -98,6 +98,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
[HttpDelete("{trialId:guid}/{id:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> DeleteSubject(Guid id)
|
||||
{
|
||||
|
||||
@@ -106,12 +107,11 @@ namespace IRaCIS.Application.Services
|
||||
return ResponseOutput.NotOk("This subject has executed a visit with uploading study images,and couldn't be deleted.");
|
||||
}
|
||||
|
||||
await _subjectRepository.DeleteFromQueryAsync(u => u.Id == id);
|
||||
await _subjectVisitRepository.DeleteFromQueryAsync(u => u.SubjectId == id);
|
||||
await _subjectRepository.SoftDeleteFromQueryAsync(u => u.Id == id);
|
||||
await _subjectVisitRepository.SoftDeleteFromQueryAsync(u => u.SubjectId == id);
|
||||
|
||||
var isSuccess = await _subjectRepository.SaveChangesAsync();
|
||||
|
||||
|
||||
return ResponseOutput.Result(isSuccess);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using IRaCIS.Core.Infrastructure.ExpressionExtend;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
@@ -23,22 +22,16 @@ namespace IRaCIS.Application.Services
|
||||
private readonly IRepository<VisitStage> _visitStageRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<VisitPlanInfluenceStat> _influnceStatRepository;
|
||||
private readonly IRepository<VisitPlanInfluenceStudy> _influnceRepository;
|
||||
private readonly IInspectionService _inspectionService;
|
||||
|
||||
public VisitPlanService(IRepository<VisitStage> visitStageRepository, IRepository<Trial> trialRepository, IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<VisitPlanInfluenceStat> influnceStatRepository,
|
||||
IRepository<VisitPlanInfluenceStudy> visitPlanInfluenceStudy,
|
||||
|
||||
IInspectionService inspectionService)
|
||||
IRepository<VisitPlanInfluenceStudy> visitPlanInfluenceStudy)
|
||||
{
|
||||
_visitStageRepository = visitStageRepository;
|
||||
_trialRepository = trialRepository;
|
||||
this._subjectVisitRepository = subjectVisitRepository;
|
||||
this._influnceStatRepository = influnceStatRepository;
|
||||
this._influnceRepository = visitPlanInfluenceStudy;
|
||||
this._inspectionService = inspectionService;
|
||||
}
|
||||
|
||||
|
||||
@@ -355,7 +348,7 @@ namespace IRaCIS.Application.Services
|
||||
//访视计划 整体状态变更为 确认
|
||||
await _visitStageRepository.BatchUpdateNoTrackingAsync(u => u.TrialId == trialId, t => new VisitStage() { IsConfirmed = true, IsHaveFirstConfirmed = true });
|
||||
|
||||
await _repository.SaveChangesAsync();
|
||||
await _visitStageRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
}
|
||||
@@ -389,6 +382,8 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary> 删除项目计划某一项 废弃 </summary>
|
||||
[HttpDelete("{id:guid}/{trialId:guid}")]
|
||||
[TrialAudit(AuditType.TrialAudit, AuditOptType.DeleteTrialVisitPlanItem)]
|
||||
|
||||
Reference in New Issue
Block a user