修改警告4

Uat_Study
hang 2023-11-30 17:44:47 +08:00
parent 82fc9bfc75
commit 35ef014391
12 changed files with 33 additions and 32 deletions

View File

@ -52,7 +52,8 @@ public static class ExcelExportHelper
var translateDataList = await _dictionaryService.GetBasicDataSelect(needTranslatePropertyList.Select(t => t.DicParentCode).Distinct().ToArray());
var dic = JsonConvert.DeserializeObject<IDictionary<string, object>>(data.ToJsonNotIgnoreNull());
var dic = (JsonConvert.DeserializeObject<IDictionary<string, object>>(data.ToJsonNotIgnoreNull())).IfNullThrowException();
foreach (var key in dic.Keys)
{
@ -232,7 +233,7 @@ public static class ExcelExportHelper
var translateDataList = await _dictionaryService.GetBasicDataSelect(needTranslatePropertyList.Select(t => t.DicParentCode).Distinct().ToArray());
var dic = JsonConvert.DeserializeObject<IDictionary<string, object>>(data.ToJsonNotIgnoreNull());
var dic = (JsonConvert.DeserializeObject<IDictionary<string, object>>(data.ToJsonNotIgnoreNull())).IfNullThrowException();
foreach (var key in dic.Keys)
{

View File

@ -542,7 +542,7 @@ namespace IRaCIS.Core.Application.Service
sendEmailConfig.HtmlBodyStr = htmlBodyStr.Replace(EmailNamePlaceholder, string.Join(isEn_us ? ", " : "、", toUserList.Select(t => t.FullName).ToList()));
}
if (toUserList.Count() == 0)
if (toUserList.Count == 0)
{
//---没有收件人,无法发送邮件
throw new BusinessValidationFailedException(_localizer["TrialEmailN_NoRecipient"]);

View File

@ -380,7 +380,7 @@ namespace IRaCIS.Core.Application.Service
//自动发送
if (sendEmailConfig != null)
if (sendEmailConfig != null && trialEmailConfig !=null)
{
#region 不同标准 不同项目配置 发送邮件的时机 处理具体逻辑
@ -470,7 +470,7 @@ namespace IRaCIS.Core.Application.Service
//双人 产生裁判,并且裁判完成 发
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
{
var judgeResultId = taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().JudgeResultTaskId.Value;
var judgeResultId = taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First()!.JudgeResultTaskId!.Value;
answer = await TranslatePdStateAsync(judgeResultId, ReadingCategory.Visit, taskInfo.CriterionType);
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Select(t => t.Id).ToList(), minUserIdList);
@ -516,7 +516,7 @@ namespace IRaCIS.Core.Application.Service
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Global).Count() == 2)
{
var judgeResultId = taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().JudgeResultTaskId.Value;
var judgeResultId = taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).First().JudgeResultTaskId!.Value;
answer = await TranslatePdStateAsync(judgeResultId, ReadingCategory.Global, taskInfo.CriterionType);
isNeedSend = await DealMedicalReviewTasKGenerateAndIsSendAsync(taskInfo.TrialId, isHandSend, answer, taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Select(t => t.Id).ToList(), minUserIdList);
@ -961,7 +961,7 @@ namespace IRaCIS.Core.Application.Service
{
var task = taskList.FirstOrDefault(t => t.ReadingCategory == ReadingCategory.Visit);
var filePath = await BaseBusinessScenarioSendEmailAsync(task.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
var filePath = await BaseBusinessScenarioSendEmailAsync(task!.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
}
@ -970,7 +970,7 @@ namespace IRaCIS.Core.Application.Service
{
var task = taskList.FirstOrDefault(t => t.ReadingCategory == ReadingCategory.Judge);
var filePath = await BaseBusinessScenarioSendEmailAsync(task.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
var filePath = await BaseBusinessScenarioSendEmailAsync(task!.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
}
@ -1007,7 +1007,7 @@ namespace IRaCIS.Core.Application.Service
{
var task = taskList.FirstOrDefault(t => t.ReadingCategory == ReadingCategory.Global);
var filePath = await BaseBusinessScenarioSendEmailAsync(task.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
var filePath = await BaseBusinessScenarioSendEmailAsync(task!.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
}
@ -1016,7 +1016,7 @@ namespace IRaCIS.Core.Application.Service
{
var task = taskList.FirstOrDefault(t => t.ReadingCategory == ReadingCategory.Judge);
var filePath = await BaseBusinessScenarioSendEmailAsync(task.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
var filePath = await BaseBusinessScenarioSendEmailAsync(task!.Id, true, EmailStoreSendMode.OnlyStoreLocalNotSentEmail, string.Empty);
return ResponseOutput.Ok(new { RelativePath = filePath, TaskName = task.TaskName, VisitTaskId = task.Id });
}

View File

@ -197,7 +197,7 @@ namespace IRaCIS.Core.Application.Service
//找到上一条Id
var currentInspection = await _dataInspectionRepository.Where(t => t.Id == id).Select(t => new { t.GeneralId, t.ObjectRelationParentId, t.CreateTime }).FirstOrDefaultAsync();
var currentInspection = await _dataInspectionRepository.Where(t => t.Id == id).Select(t => new { t.GeneralId, t.ObjectRelationParentId, t.CreateTime }).FirstNotNullAsync();
var beforeId = await _dataInspectionRepository.Where(x => x.GeneralId == currentInspection.GeneralId && x.CreateTime <= currentInspection.CreateTime && x.Id != id).OrderByDescending(x => x.CreateTime).Select(t => t.Id)
.FirstOrDefaultAsync();

View File

@ -84,9 +84,9 @@ namespace IRaCIS.Core.Application.Service.Inspection
data.Identification.ToLower()
equals
leftfrontAuditConfig.Identification.ToLower()
join moduleTypec in _repository.GetQueryable<Dictionary>() on new { ModuleType = leftfrontAuditConfig.ModuleTypeId.Value } equals new { ModuleType = moduleTypec.Id } into moduleTypectemp
join moduleTypec in _repository.GetQueryable<Dictionary>() on new { ModuleType = leftfrontAuditConfig.ModuleTypeId!.Value } equals new { ModuleType = moduleTypec.Id } into moduleTypectemp
from leftmoduleTypec in moduleTypectemp.DefaultIfEmpty()
join OptTypec in _repository.GetQueryable<Dictionary>() on new { ModuleType = leftfrontAuditConfig.OptTypeId.Value } equals new { ModuleType = OptTypec.Id } into optTypetemp
join OptTypec in _repository.GetQueryable<Dictionary>() on new { ModuleType = leftfrontAuditConfig.OptTypeId!.Value } equals new { ModuleType = OptTypec.Id } into optTypetemp
from leftOptType in optTypetemp.DefaultIfEmpty()
select new GetDataInspectionOutDto()

View File

@ -111,7 +111,7 @@ namespace IRaCIS.Application.Services
entity.ReadingClinicalDataState = ReadingClinicalDataStatus.HaveUploaded;
entity.IsBlind = null;
entity.IsComplete = null;
entity.FileCount = entity.ReadingClinicalDataPDFList.Count();
entity.FileCount = entity.ReadingClinicalDataPDFList.Count;
await _readingClinicalDataRepository.AddAsync(entity, true);
var success = await _readingClinicalDataRepository.SaveChangesAsync();
return ResponseOutput.Ok(entity.Id);
@ -511,7 +511,7 @@ namespace IRaCIS.Application.Services
inDto.UploadRole = UploadRole.PM;
}
ReadModule readModule = null;
ReadModule? readModule = null;
if (inDto.IsVisit == false)
{
readModule = await _readModuleRepository.Where(x => x.Id == inDto.ReadingId).FirstOrDefaultAsync();
@ -536,7 +536,7 @@ namespace IRaCIS.Application.Services
.WhereIf(inDto.IsVisit && inDto.IsBaseLine, x => x.ClinicalDataLevel == ClinicalLevel.Subject || x.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
.WhereIf(inDto.IsVisit && !inDto.IsBaseLine, x => x.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
.WhereIf(!inDto.IsVisit, x => x.ClinicalDataLevel == ClinicalLevel.ImageRead || x.ClinicalDataLevel == ClinicalLevel.OncologyRead)
.WhereIf(readModule != null, x => x.ClinicalDataLevel == keyValuePairs[readModule.ModuleType])
.WhereIf(readModule != null, x => x.ClinicalDataLevel == keyValuePairs[readModule!.ModuleType])
.WhereIf(inDto.TrialReadingCriterionId!=null,x=>x.TrialClinicalDataSetCriteriaList.Any(y=>y.TrialReadingCriterionId== inDto.TrialReadingCriterionId))
//.WhereIf(criterion!=null,x=>x.CriterionEnumListStr.Contains($"|{(int)criterion.CriterionType}|"))
.Select(x => new GetTrialClinicalDataSelectOutDto()
@ -658,7 +658,7 @@ namespace IRaCIS.Application.Services
return (result, new
{
IsCanAddClinicalData = clinicalDataList.Count() > 0,
IsCanAddClinicalData = clinicalDataList.Count > 0,
});
}
@ -717,7 +717,7 @@ namespace IRaCIS.Application.Services
CheckDate = y.CheckDate,
ClinicalFormId = y.Id
}).ToList();
x.FileCount = x.ClinicalFromList.Count();
x.FileCount = x.ClinicalFromList.Count;
});
@ -891,7 +891,7 @@ namespace IRaCIS.Application.Services
CheckDate = y.CheckDate,
ClinicalFormId = y.Id
}).ToList();
x.FileCount = x.ClinicalFromList.Count();
x.FileCount = x.ClinicalFromList.Count;
});
// 这里处理CRC上传 阅片期的临床数据

View File

@ -59,7 +59,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inDto.CriterionTypeEnum != null, x => x.CriterionTypeEnum==inDto.CriterionTypeEnum)
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.CriterionTypeEnum== criterionEnum || x.IsGeneral==true)
.WhereIf(inDto.IsGeneral != null, x => x.IsGeneral == inDto.IsGeneral)
.WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType.Value)
.WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType!.Value)
.ProjectTo<ReadingMedicineSystemQuestionView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, new string[2] { "LanguageType desc", "ShowOrder asc" });

View File

@ -876,7 +876,7 @@ namespace IRaCIS.Application.Services
{
var question = x.Clone();
question.ReadingQuestionCriterionSystemId = inDto.ToSystemCriterionId;
question.Id = questionRelation[question.Id.Value];
question.Id = questionRelation[question.Id!.Value];
if (question.ParentId != null)
{
question.ParentId = questionRelation[question.ParentId ?? default(Guid)];

View File

@ -1111,7 +1111,7 @@ namespace IRaCIS.Application.Services
var firstData = newPageQusetionList.FirstOrDefault();
var page = new TrialReadQuestionData()
{
PageName = firstData.PageName,
PageName = firstData!.PageName,
IsPage = true,
IsPublicPage = firstData.IsPublicPage,
};
@ -1126,8 +1126,8 @@ namespace IRaCIS.Application.Services
groupList.Add(page);
}
result.PublicPage = groupList.Where(x => x.IsPublicPage.Value).ToList();
result.MultiPage = groupList.Where(x => !x.IsPublicPage.Value).ToList();
result.PublicPage = groupList.Where(x => x.IsPublicPage!.Value).ToList();
result.MultiPage = groupList.Where(x => !x.IsPublicPage!.Value).ToList();
}
else
{
@ -2291,7 +2291,7 @@ namespace IRaCIS.Application.Services
VisitNum = x.VisitTaskNum,
TrialReadingCriterionId = x.TrialReadingCriterionId,
}).FirstOrDefaultAsync();
}).FirstNotNullAsync();
}
else if (inDto.SubjectId != null && trialReadingCriterion.IsReadingTaskViewInOrder)
@ -2299,7 +2299,7 @@ namespace IRaCIS.Application.Services
var subjectTaskList = (await _visitTaskService.GetOrderReadingIQueryable(new GetOrderReadingIQueryableInDto()
{
TrialId = inDto.TrialId,
TrialReadingCriterionId = trialReadingCriterionId.Value,
TrialReadingCriterionId = trialReadingCriterionId!.Value,
Page = new PageInput()
{
PageIndex = 1,

View File

@ -85,7 +85,7 @@ namespace IRaCIS.Application.Services
var firstData = newPageQusetionList.FirstOrDefault();
var page = new GetTrialReadingQuestionOutDto()
{
PageName = firstData.PageName,
PageName = firstData!.PageName,
IsPage = true,
IsPublicPage = firstData.IsPublicPage,
};
@ -100,8 +100,8 @@ namespace IRaCIS.Application.Services
groupList.Add(page);
}
result.PublicPage = groupList.Where(x => x.IsPublicPage.Value).ToList();
result.MultiPage = groupList.Where(x => !x.IsPublicPage.Value).ToList();
result.PublicPage = groupList.Where(x => x.IsPublicPage!.Value).ToList();
result.MultiPage = groupList.Where(x => !x.IsPublicPage!.Value).ToList();
}
else
{

View File

@ -149,7 +149,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
result.LesionCountList = tableAnsweRowInfos.GroupBy(x => x.LesionType).Select(x => new LesionDto
{
LesionType = x.Key.Value,
LesionType = x.Key!.Value,
Count = x.ToList().Count()
}).ToList();
@ -1775,7 +1775,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{
VisitTaskId = x.VisitTaskId,
Answer = x.Answer,
QuestionType = x.ReadingQuestionTrial.QuestionType.Value
QuestionType = x.ReadingQuestionTrial.QuestionType!.Value
}).ToListAsync();
compareTaskList.ForEach(y =>

View File

@ -370,7 +370,7 @@ namespace IRaCIS.Core.Application.Services
{
item.SeriesInstanceUid = string.Empty;
item.InstanceList = thisRowinfo.Where(y => y.InstanceId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(y => y.InstanceId.Value).Distinct().ToList();
item.InstanceList = thisRowinfo.Where(y => y.InstanceId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(y => y.InstanceId!.Value).Distinct().ToList();
var tempInstanceList = await _repository.Where<DicomInstance>(t => item.InstanceList.Contains(t.Id)).OrderBy(t => t.InstanceNumber)
.Select(t => new TempInstance