This commit is contained in:
he
2022-11-08 11:09:49 +08:00
parent 030703019e
commit fbc2c6bd28
6 changed files with 85 additions and 3 deletions
@@ -71,6 +71,55 @@ namespace IRaCIS.Core.Application.Service.RC
return ResponseOutput.Ok();
}
/// <summary>
/// 设置系统全局阅片阅片信息
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> SetSystemGlobalInfo(SetSystemGlobalInfoInDto inDto)
{
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.SystemCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess);
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryIds.Select(x => new ReadingCriterionDictionary
{
CriterionId = inDto.SystemCriterionId,
DictionaryId = x,
IsSystemCriterion = true,
ParentCode = ReadingCommon.CriterionDictionary.GlobalAssess
}));
await _readingQuestionCriterionSystemRepository.UpdatePartialFromQueryAsync(inDto.SystemCriterionId, x => new ReadingQuestionCriterionSystem()
{
IsMustGlobalReading = inDto.IsMustGlobalReading
});
var result = await _readingQuestionCriterionTrialRepository.SaveChangesAsync();
return ResponseOutput.Ok(result);
}
/// <summary>
/// 获取系统全局阅片信息
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<GetSystemGlobalInfoOutDto> GetSystemGlobalInfo(GetSystemOncologyInfoInDto inDto)
{
GetSystemGlobalInfoOutDto result = new GetSystemGlobalInfoOutDto()
{
IsMustGlobalReading = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == inDto.SystemCriterionId).Select(x => x.IsMustGlobalReading).FirstOrDefaultAsync(),
DictionaryList = await _readingCriterionDictionaryRepository.AsQueryable().Where(x => x.CriterionId == inDto.SystemCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess)
.ProjectTo<CriterionDictionaryInfo>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync()
};
return result;
}
/// <summary>
/// 获取系统肿瘤信息
/// </summary>