拷贝表单
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
he 2025-03-20 17:37:18 +08:00
parent 447d3fc36f
commit b7c9abca02
4 changed files with 46 additions and 16 deletions

View File

@ -1850,6 +1850,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public bool ExistsManual { get; set; }
public bool IsBaseLine { get; set; }
public ReadingCategory ReadingCategory { get; set; }
public decimal VisitNum { get; set; }

View File

@ -86,7 +86,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid NewSystemCriterionId { get; set; }
public bool IsCopyQuestion { get; set; }
//public bool IsCopyQuestion { get; set; }
}
public class EditCriterionDictionaryInDto

View File

@ -22,8 +22,9 @@ namespace IRaCIS.Core.Application.Service
IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository,
IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository,
IRepository<Dictionary> _dictionaryRepository,
IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository,
IReadingImageTaskService _iReadingImageTaskService,
IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository,
IRepository<ReadingSystemCriterionDictionary> _readingSystemCriterionDictionaryRepository,
IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository,
IRepository<ReadingCriterionPage> _readingCriterionPageRepository,
IRepository<Trial> _trialRepository,
@ -939,8 +940,7 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task<IResponseOutput> CopySystemCriterionData(CopySystemCriterionDataInDto inDto)
{
if (inDto.IsCopyQuestion)
{
var newSystemQuestionList = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.SourceSystemCriterionId)
.ProjectTo<ReadingQuestionSystemData>(_mapper.ConfigurationProvider).ToListAsync();
newSystemQuestionList.ForEach(x =>
@ -993,22 +993,49 @@ namespace IRaCIS.Core.Application.Service
}
await _readingTableQuestionSystemRepository.BatchDeleteNoTrackingAsync(x => x.SystemCriterionId == inDto.NewSystemCriterionId);
await _readingTableQuestionSystemRepository.AddRangeAsync(needAddTableDatas);
#endregion
#endregion
}
else
#region 器官
var organData = await _organInfoRepository.Where(x => x.SystemCriterionId == inDto.SourceSystemCriterionId).ToListAsync();
organData.ForEach(x =>
{
var organData = await _organInfoRepository.Where(x => x.SystemCriterionId == inDto.SourceSystemCriterionId).ToListAsync();
x.Id = NewId.NextGuid();
x.SystemCriterionId = inDto.NewSystemCriterionId;
});
await _organInfoRepository.BatchDeleteNoTrackingAsync(x => x.SystemCriterionId == inDto.NewSystemCriterionId);
await _organInfoRepository.AddRangeAsync(organData);
#endregion
#region 字典Code
var dictionaryCodes = await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SourceSystemCriterionId).ToListAsync();
dictionaryCodes.ForEach(x =>
{
x.Id = NewId.NextGuid();
x.SystemCriterionId = inDto.NewSystemCriterionId;
});
await _systemCriterionDictionaryCodeRepository.BatchDeleteNoTrackingAsync(x => x.SystemCriterionId == inDto.NewSystemCriterionId);
await _systemCriterionDictionaryCodeRepository.AddRangeAsync(dictionaryCodes);
#endregion
#region 字典
var criterionDictionaries = await _readingSystemCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.SourceSystemCriterionId).ToListAsync();
criterionDictionaries.ForEach(x =>
{
x.Id = NewId.NextGuid();
x.CriterionId = inDto.NewSystemCriterionId;
});
await _readingSystemCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.NewSystemCriterionId);
await _readingSystemCriterionDictionaryRepository.AddRangeAsync(criterionDictionaries);
#endregion
organData.ForEach(x =>
{
x.Id = NewId.NextGuid();
x.SystemCriterionId = inDto.NewSystemCriterionId;
});
await _organInfoRepository.BatchDeleteNoTrackingAsync(x => x.SystemCriterionId == inDto.NewSystemCriterionId);
await _organInfoRepository.AddRangeAsync(organData);
}

View File

@ -3171,6 +3171,7 @@ namespace IRaCIS.Core.Application.Service
task.ExistsManual = (await GetManualList(new GetManualListInDto() { TrialId = visitTaskInfo.TrialId })).Count > 0;
task.ReadingTaskState = visitTaskInfo.ReadingTaskState;
task.IsShowStudyName= trialInfo.IsShowStudyName;
task.IsBaseLine = isBaseLine;
task.IsExistUnprocessedFeedback = await _userFeedBackRepository.AnyAsync(x => x.VisitTaskId == task.VisitTaskId && x.State == 0);
// 添加默认答案
if (inDto.VisitTaskId == null && visitTaskInfo.ReadingTaskState != ReadingTaskState.HaveSigned)