修改导表,日志记录
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
542ead68a7
commit
a3f635894b
|
@ -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,6 +176,10 @@ public static class ExcelExportHelper
|
|||
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
|
||||
{
|
||||
var row = sheet.GetRow(rowIndex);
|
||||
|
||||
if (row != null)
|
||||
{
|
||||
|
||||
var colums = row.LastCellNum;
|
||||
|
||||
for (int colIndex = 0; colIndex < colums; colIndex++)
|
||||
|
@ -195,6 +199,8 @@ public static class ExcelExportHelper
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
using (var memoryStream2 = new MemoryStream())
|
||||
|
@ -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,6 +432,9 @@ public static class ExcelExportHelper
|
|||
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
|
||||
{
|
||||
var row = sheet.GetRow(rowIndex);
|
||||
if (row != null)
|
||||
{
|
||||
|
||||
var colums = row.LastCellNum;
|
||||
|
||||
for (int colIndex = 0; colIndex < colums; colIndex++)
|
||||
|
@ -446,6 +455,7 @@ public static class ExcelExportHelper
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dynamicColumnConfig != null)
|
||||
{
|
||||
|
|
|
@ -884,6 +884,16 @@
|
|||
<param name="_trialRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetTrialDownloadList_Export(IRaCIS.Core.Application.Contracts.TrialIamgeDownQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialImageDownload},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
<summary>
|
||||
影像下载记录表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<param name="_trialImageDownloadRepository"></param>
|
||||
<param name="_dictionaryService"></param>
|
||||
<param name="_trialRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetInternationalizationList_Export(IRaCIS.Core.Application.ViewModel.InternationalizationQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Internationalization},IRaCIS.Application.Interfaces.IDictionaryService)">
|
||||
<summary>
|
||||
国际化导出
|
||||
|
@ -891,6 +901,15 @@
|
|||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetEmailNoticeConfigList_Export(IRaCIS.Core.Application.Contracts.EmailNoticeConfigQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},IRaCIS.Application.Interfaces.IDictionaryService)">
|
||||
<summary>
|
||||
邮件导出
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<param name="_emailNoticeConfigrepository"></param>
|
||||
<param name="_dictionaryService"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetAnalysisTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
<summary>
|
||||
一致性分析结果导出 7 8 分别是自身 和组件一致性
|
||||
|
|
|
@ -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
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 影像下载记录表
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <param name="_trialImageDownloadRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetTrialDownloadList_Export(TrialIamgeDownQuery inQuery,
|
||||
[FromServices] IRepository<TrialImageDownload> _trialImageDownloadRepository,
|
||||
[FromServices] IDictionaryService _dictionaryService,
|
||||
[FromServices] IRepository<Trial> _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<TrialImageDownloadExportDto>(_mapper.ConfigurationProvider);
|
||||
|
||||
var list = await query.SortToListAsync(inQuery);
|
||||
|
||||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_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));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1255,6 +1293,39 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 邮件导出
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <param name="_emailNoticeConfigrepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetEmailNoticeConfigList_Export(EmailNoticeConfigQuery inQuery,
|
||||
[FromServices] IRepository<EmailNoticeConfig> _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<EmailNoticeConfigExportDto>(_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 导表公用
|
||||
|
@ -1330,12 +1401,26 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//两个人都做了
|
||||
if (resultExceptJudgeList.Count(t => t.VisitTaskNum == item.VisitTaskNum && t.SubjectCode == item.SubjectCode) == 2)
|
||||
{
|
||||
//如果没有产生裁判,默认选择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)
|
||||
|
@ -1399,12 +1506,28 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//没有产生裁判 有可能一个人没做完,也有可能做完了没产生裁判
|
||||
//两个人都做了
|
||||
if (resultExceptJudgeList.Count(t => t.VisitTaskNum == visitItem.VisitTaskNum && t.SubjectCode == visitItem.SubjectCode) == 2)
|
||||
{
|
||||
//不存在裁判 将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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -34,7 +34,11 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
{
|
||||
var user = context.Entity;
|
||||
|
||||
if (context.ChangeType == ChangeType.Added)
|
||||
{
|
||||
await _userLogReposiotry.AddAsync(new UserLog() { OptType = UserOptType.AddUser, OptUserId = user.Id, LoginUserId = _userInfo.Id, IP = _userInfo.IP });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue