This commit is contained in:
he
2023-07-18 16:35:31 +08:00
parent 47a4403cbe
commit ef8220c236
4 changed files with 24 additions and 3 deletions
@@ -515,6 +515,11 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task<PageOutput<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
{
if (inDto.ReadModuleId != null)
{
var readModule = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync();
inDto.TrialReadingCriterionId = readModule.TrialReadingCriterionId;
}
var query = _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
.WhereIf(inDto.ReadModuleId != null, x => x.Id == inDto.ReadModuleId)
.WhereIf(inDto.IsCRCConfirm != null, x => x.IsCRCConfirm == inDto.IsCRCConfirm)
@@ -819,7 +824,7 @@ namespace IRaCIS.Core.Application.Service
var presentData = dataList.Where(x => x.ReadModuleId == inDto.ReadModuleId).First();
if (dataList.Any(x => x.IsPMConfirm && x.LatestScanDate > presentData.LatestScanDate && x.ReadingSetType == presentData.ReadingSetType))
if (dataList.Any(x => x.IsCRCConfirm && x.LatestScanDate > presentData.LatestScanDate && x.ReadingSetType == presentData.ReadingSetType))
{
throw new BusinessValidationFailedException("当前数据并非最后一条确认信息,无法取消!");
}