diff --git a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs
index 0435c3dc6..65aabea98 100644
--- a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs
+++ b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs
@@ -165,7 +165,7 @@ public static class ExcelExportHelper
}
//中文替换项目术语
- if (isEn_US == false && data.TrialObjectNameList.Count > 0)
+ if (data.TrialObjectNameList.Count > 0)
{
var replaceObjectList = data.TrialObjectNameList;
@@ -176,24 +176,30 @@ public static class ExcelExportHelper
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
{
var row = sheet.GetRow(rowIndex);
- var colums = row.LastCellNum;
- for (int colIndex = 0; colIndex < colums; colIndex++)
+ if (row != null)
{
- var cell = row.GetCell(colIndex);
- // 只处理字符串类型的单元格
- if (cell != null)
+ var colums = row.LastCellNum;
+
+ for (int colIndex = 0; colIndex < colums; colIndex++)
{
- var cellValue = cell.StringCellValue;
+ var cell = row.GetCell(colIndex);
- var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
- if (find != null)
+ // 只处理字符串类型的单元格
+ if (cell != null)
{
- cell.SetCellValue(find.TrialName);
+ var cellValue = cell.StringCellValue;
+
+ var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
+ if (find != null)
+ {
+ cell.SetCellValue(find.TrialName);
+ }
}
}
}
+
}
}
@@ -415,7 +421,7 @@ public static class ExcelExportHelper
}
//中文替换项目术语
- if (isEn_US == false && data.TrialObjectNameList.Count > 0)
+ if (data.TrialObjectNameList.Count > 0)
{
var replaceObjectList = data.TrialObjectNameList;
@@ -426,21 +432,25 @@ public static class ExcelExportHelper
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
{
var row = sheet.GetRow(rowIndex);
- var colums = row.LastCellNum;
-
- for (int colIndex = 0; colIndex < colums; colIndex++)
+ if (row != null)
{
- var cell = row.GetCell(colIndex);
- // 只处理字符串类型的单元格
- if (cell != null)
+ var colums = row.LastCellNum;
+
+ for (int colIndex = 0; colIndex < colums; colIndex++)
{
- var cellValue = cell.StringCellValue;
+ var cell = row.GetCell(colIndex);
- var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
- if (find != null)
+ // 只处理字符串类型的单元格
+ if (cell != null)
{
- cell.SetCellValue(find.TrialName);
+ var cellValue = cell.StringCellValue;
+
+ var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
+ if (find != null)
+ {
+ cell.SetCellValue(find.TrialName);
+ }
}
}
}
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 696a146bd..1744842ac 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -884,6 +884,16 @@
+
+
+ 影像下载记录表
+
+
+
+
+
+
+
国际化导出
@@ -891,6 +901,15 @@
+
+
+ 邮件导出
+
+
+
+
+
+
一致性分析结果导出 7 8 分别是自身 和组件一致性
diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
index b4b48272b..6ccdc8402 100644
--- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
+++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
@@ -230,7 +230,7 @@ namespace IRaCIS.Core.Application.Service.Common
ExperimentName = t.ExperimentName,
TrialCode = t.TrialCode,
CreateTime = t.CreateTime,
- Sponsor = t.Sponsor,
+ Sponsor = _userInfo.IsEn_Us ? t.Sponsor : t.Sponsor,
TrialStatusStr = t.TrialStatusStr,
ExpetiedTaskCount = isPM ? t.VisitTaskList.Where(t => t.IsUrgent).Count() : 0,
@@ -1213,6 +1213,44 @@ namespace IRaCIS.Core.Application.Service.Common
}
+ ///
+ /// 影像下载记录表
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task GetTrialDownloadList_Export(TrialIamgeDownQuery inQuery,
+ [FromServices] IRepository _trialImageDownloadRepository,
+ [FromServices] IDictionaryService _dictionaryService,
+ [FromServices] IRepository _trialRepository)
+ {
+ var query = _trialImageDownloadRepository.Where(t => t.TrialId == inQuery.TrialId)
+ .WhereIf(inQuery.SubjectCode.IsNotNullOrEmpty(), t => t.SubjectCode.Contains(inQuery.SubjectCode))
+ .WhereIf(inQuery.IP.IsNotNullOrEmpty(), t => t.IP.Contains(inQuery.IP))
+ .WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.CreateUser.UserName.Contains(inQuery.Name) || t.CreateUser.FullName.Contains(inQuery.Name))
+ .WhereIf(inQuery.ImageType != null, t => t.ImageType == inQuery.ImageType)
+ .WhereIf(inQuery.UserType != null, t => t.CreateUser.UserTypeEnum == inQuery.UserType)
+ .WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess)
+ .WhereIf(inQuery.DownloadStartTime != null, t => t.DownloadStartTime >= inQuery.DownloadStartTime)
+ .WhereIf(inQuery.DownloadEndTime != null, t => t.DownloadEndTime <= inQuery.DownloadEndTime)
+
+ .ProjectTo(_mapper.ConfigurationProvider);
+
+ var list = await query.SortToListAsync(inQuery);
+
+
+ var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
+
+ exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
+ exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
+
+
+ return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialImageDownloadList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialImageDownloadExportDto));
+
+ }
@@ -1252,10 +1290,43 @@ namespace IRaCIS.Core.Application.Service.Common
}
-
+ ///
+ /// 邮件导出
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task GetEmailNoticeConfigList_Export(EmailNoticeConfigQuery inQuery,
+ [FromServices] IRepository _emailNoticeConfigrepository,
+ [FromServices] IDictionaryService _dictionaryService)
+ {
+ var emailNoticeConfigQueryable = _emailNoticeConfigrepository
+ //.WhereIf(inQuery.SystemLevel == null, t => t.SystemLevel == SysEmailLevel.not_sys)
+ //.WhereIf(inQuery.SystemLevel != null, t => t.SystemLevel == inQuery.SystemLevel)
+ //.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
+ .WhereIf(inQuery.CriterionTypeEnum != null, t => t.CriterionTypeEnum == inQuery.CriterionTypeEnum)
+ .WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
+ .WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
+ .WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
+ .ProjectTo(_mapper.ConfigurationProvider);
+
+ var list = await emailNoticeConfigQueryable.SortToListAsync(inQuery);
+
+ var exportInfo = new ExcelExportInfo();
+
+ exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
+ exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
+
+
+ return await ExcelExportHelper.DataExportAsync(StaticData.Export.EmailNoticeConfig_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(EmailNoticeConfigExportDto));
+
+ }
+
#region 导表公用
@@ -1331,11 +1402,25 @@ namespace IRaCIS.Core.Application.Service.Common
}
else
{
- //如果没有产生裁判,默认选择R1
- if (item.ArmEnum == Arm.DoubleReadingArm1)
+ //两个人都做了
+ if (resultExceptJudgeList.Count(t => t.VisitTaskNum == item.VisitTaskNum && t.SubjectCode == item.SubjectCode) == 2)
{
- item.IsJudgeSelect = true;
+ //如果没有产生裁判,默认选择R1
+ if (item.ArmEnum == Arm.DoubleReadingArm1)
+ {
+ item.IsJudgeSelect = true;
+ }
+ else
+ {
+ item.IsJudgeSelect = false;
+ }
}
+ else
+ {
+ item.IsJudgeSelect = null;
+ item.IsTrigerJudge = null;
+ }
+
}
}
@@ -1353,17 +1438,26 @@ namespace IRaCIS.Core.Application.Service.Common
var maxFinishedJudge = judegeList.Where(t => t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault();
- var maxNotFinishedJudge = judegeList.Where(t => t.ReadingTaskState != ReadingTaskState.HaveSigned).FirstOrDefault();
+ var maxNotFinishedJudge = judegeList.Where(t => t.ReadingTaskState != ReadingTaskState.HaveSigned).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault();
- //仅有一个未完成的全局裁判,那么都是null
+
+ //n个裁判任务都未完成
if (maxFinishedJudge == null && maxNotFinishedJudge != null)
{
if (visitItem.VisitTaskNum < maxNotFinishedJudge.VisitTaskNum)
{
visitItem.IsJudgeSelect = null;
}
+ else
+ {
+ //大于当前未完成的全局裁判 后续 肯定是未知的
+ visitItem.IsTrigerJudge = null;
+ visitItem.IsJudgeSelect = null;
+ }
+
+
}
- //全局裁判都完成了,那么以最后一次裁判选择的为准
+ //n个全局裁判都完成了,那么以最后一次裁判选择的为准
else if (maxFinishedJudge != null && maxNotFinishedJudge == null)
{
if (visitItem.ArmEnum == maxFinishedJudge.JudgeArmEnum && visitItem.VisitTaskNum < maxFinishedJudge.VisitTaskNum)
@@ -1376,14 +1470,27 @@ namespace IRaCIS.Core.Application.Service.Common
{
visitItem.IsJudgeSelect = false;
}
+ else
+ {
+ //裁判都完成的后续 没有其他裁判任务 肯定也是未知的
+ visitItem.IsTrigerJudge = null;
+ visitItem.IsJudgeSelect = null;
+ }
}
else
{
//两个都不为null 肯定是不同的裁判
- //在完成裁判之后的,和未完成裁判之前的
- if (/*visitItem.VisitTaskNum < maxNotFinishedJudge.VisitTaskNum &&*/ visitItem.VisitTaskNum > maxFinishedJudge.VisitTaskNum)
+ //在未完成裁判之后的
+ if (visitItem.VisitTaskNum > maxNotFinishedJudge.VisitTaskNum)
{
+ visitItem.IsTrigerJudge = null;
+ visitItem.IsJudgeSelect = null;
+ }
+ //完成裁判之后的 ,和未完成裁判之前的
+ else if (visitItem.VisitTaskNum < maxNotFinishedJudge.VisitTaskNum && visitItem.VisitTaskNum > maxFinishedJudge.VisitTaskNum)
+ {
+ visitItem.IsTrigerJudge = true;
visitItem.IsJudgeSelect = null;
}
else if (visitItem.ArmEnum == maxFinishedJudge.JudgeArmEnum && visitItem.VisitTaskNum < maxFinishedJudge.VisitTaskNum)
@@ -1400,11 +1507,27 @@ namespace IRaCIS.Core.Application.Service.Common
}
else
{
- //不存在裁判 将R1设置
- if (visitItem.ArmEnum == Arm.DoubleReadingArm1)
+ //没有产生裁判 有可能一个人没做完,也有可能做完了没产生裁判
+ //两个人都做了
+ if (resultExceptJudgeList.Count(t => t.VisitTaskNum == visitItem.VisitTaskNum && t.SubjectCode == visitItem.SubjectCode) == 2)
{
- visitItem.IsJudgeSelect = true;
+ //不存在裁判 将R1设置
+ if (visitItem.ArmEnum == Arm.DoubleReadingArm1)
+ {
+ visitItem.IsJudgeSelect = true;
+ }
+ else
+ {
+ visitItem.IsJudgeSelect = false;
+ }
}
+ else
+ {
+ visitItem.IsJudgeSelect = null;
+ visitItem.IsTrigerJudge = null;
+ }
+
+
}
}
}
@@ -1671,7 +1794,7 @@ namespace IRaCIS.Core.Application.Service.Common
- list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonJudgeReadingDetail_Export, ExportCatogory = ExportResult.DetailedTableOfAdjudicationResults });
+ //list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonJudgeReadingDetail_Export, ExportCatogory = ExportResult.DetailedTableOfAdjudicationResults });
if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB
@@ -1681,29 +1804,29 @@ namespace IRaCIS.Core.Application.Service.Common
list.Add(new ExportDocumentDes() { Code = StaticData.Export.ReadingLession_Export, ExportCatogory = ExportResult.DetailedTableOfLesions });
}
- if (criterion.CriterionType == CriterionType.OCT)
- {
- list.Add(new ExportDocumentDes() { Code = StaticData.Export.OCT_ReadingLession_Export, ExportCatogory = ExportResult.OCT_ReadingLession_Export });
- }
+ //if (criterion.CriterionType == CriterionType.OCT)
+ //{
+ // list.Add(new ExportDocumentDes() { Code = StaticData.Export.OCT_ReadingLession_Export, ExportCatogory = ExportResult.OCT_ReadingLession_Export });
+ //}
- switch (criterion.ArbitrationRule)
- {
- case ArbitrationRule.None:
- break;
+ //switch (criterion.ArbitrationRule)
+ //{
+ // case ArbitrationRule.None:
+ // break;
- case ArbitrationRule.Visit:
- list.Add(new ExportDocumentDes() { Code = StaticData.Export.VisitJudgeRatio_Export, ExportCatogory = ExportResult.VisitJudgeRatio_Export });
+ // case ArbitrationRule.Visit:
+ // list.Add(new ExportDocumentDes() { Code = StaticData.Export.VisitJudgeRatio_Export, ExportCatogory = ExportResult.VisitJudgeRatio_Export });
- break;
- case ArbitrationRule.Reading:
- list.Add(new ExportDocumentDes() { Code = StaticData.Export.ReadingPeriodJudgeRatio_Export, ExportCatogory = ExportResult.ReadingPeriodJudgeRatio_Export });
+ // break;
+ // case ArbitrationRule.Reading:
+ // list.Add(new ExportDocumentDes() { Code = StaticData.Export.ReadingPeriodJudgeRatio_Export, ExportCatogory = ExportResult.ReadingPeriodJudgeRatio_Export });
- break;
- case ArbitrationRule.NA:
- break;
- default:
- break;
- }
+ // break;
+ // case ArbitrationRule.NA:
+ // break;
+ // default:
+ // break;
+ //}
//if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB)
diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs
index 340dfaf8d..5a044557f 100644
--- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs
+++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs
@@ -1184,8 +1184,8 @@ namespace IRaCIS.Core.Application.Contracts
//在当前访视触发裁判,或者在截止日期小于等于当前访视的阅片期触发裁判
- [DictionaryTranslateAttribute("YesOrNo")]
- public bool IsTrigerJudge { get; set; }
+ [DictionaryTranslateAttribute("YesOrNoAudit")]
+ public bool? IsTrigerJudge { get; set; }
//(如果是访视点裁判,则仅在所选阅片人对应访视 显示;如果是阅片期裁判,则在所选阅片人 阅片期内的所有访视 显示此原因)
public string JudgeNote { get; set; } = string.Empty;
diff --git a/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs b/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs
index e80a06385..9f325a308 100644
--- a/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs
+++ b/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs
@@ -34,7 +34,11 @@ namespace IRaCIS.Core.Application.Triggers
{
var user = context.Entity;
- await _userLogReposiotry.AddAsync(new UserLog() { OptType = UserOptType.AddUser, OptUserId = user.Id, LoginUserId = _userInfo.Id, IP = _userInfo.IP });
+ if (context.ChangeType == ChangeType.Added)
+ {
+ await _userLogReposiotry.AddAsync(new UserLog() { OptType = UserOptType.AddUser, OptUserId = user.Id, LoginUserId = _userInfo.Id, IP = _userInfo.IP });
+ }
+
}
}
}