IRC_NewDev
he 2023-07-21 14:20:45 +08:00
parent 0d8091b41a
commit 975adba203
1 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,7 @@ using IRaCIS.Core.Application.Service;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Infrastructure;
using IRaCIS.Core.Application.Filter;
using IRaCIS.Core.Domain.Models;
namespace IRaCIS.Application.Services
{
@ -118,6 +119,13 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task<bool> ChangeCutOffVisit(ChangeCutOffVisitInDto inDto)
{
if (await _readModuleRepository.AnyAsync(x => x.Id == inDto.Id && x.IsCRCConfirm))
{
//---CRC已经确认临床数据 不允许编辑
throw new BusinessValidationFailedException(_localizer["ReadModule_CRCConfirmCanNtoEdit"]);
}
await _readModuleRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new ReadModule() {
SubjectVisitId=inDto.SubjectVisitIdId,
ModuleName=inDto.Name,