删除项目计划废除代码
parent
5cec657a9d
commit
2d8d2f8f36
|
@ -487,28 +487,7 @@ namespace IRaCIS.Application.Services
|
||||||
u.EnrollStatus >= (int)EnrollStatus.DoctorReading).Select(u => u.DoctorId).Distinct().ToListAsync();
|
u.EnrollStatus >= (int)EnrollStatus.DoctorReading).Select(u => u.DoctorId).Distinct().ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("{trialId:guid}/{confirmOrCancel:bool}")]
|
|
||||||
[TrialAudit(AuditType.TrialAudit, AuditOptType.ConfirmTrialVisitPlan)]
|
|
||||||
[TypeFilter(typeof(TrialResourceFilter))]
|
|
||||||
public async Task<IResponseOutput> ConfirmTrialVisitPlan(Guid trialId, bool confirmOrCancel = true)
|
|
||||||
{
|
|
||||||
|
|
||||||
//取消的时候要做验证 确认的话,前端操作多次也没关系
|
|
||||||
if (!confirmOrCancel)
|
|
||||||
{
|
|
||||||
if (await _repository.AnyAsync<Subject>(t => t.TrialId == trialId))
|
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk("VisitPlan has been generated for some subjects,can not revert editable state");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
await _trialRepository.BatchUpdateNoTrackingAsync(u => u.Id == trialId, t => new Trial() { VisitPlanConfirmed = confirmOrCancel });
|
|
||||||
|
|
||||||
await _repository.BatchUpdateAsync<VisitStage>(u => u.Id == trialId, t => new VisitStage() { IsConfirmed = true });
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#region 医生用户接口
|
#region 医生用户接口
|
||||||
|
|
Loading…
Reference in New Issue