@@ -5,7 +5,9 @@
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
@@ -18,6 +20,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
Task AddConvertedTask(Guid taskId);
|
||||
|
||||
/// <summary>
|
||||
/// 导出
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<FileResult> ExportTemplateAsync(ExportTemplateAsyncDto inDto);
|
||||
|
||||
Task BaseCritrionGenerateVisitTask(Guid trialId, Guid confirmedTrialReadingCriterionId, bool? isManualSelectVisit = null, List<Guid>? subjectVisitIdList = null);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
@@ -28,7 +29,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<ReadingJudgeInfo> _readingJudgeInfoRepository,
|
||||
IRepository<SubjectUser> _subjectUserRepository,
|
||||
IRepository<ReadModule> _readModuleRepository,
|
||||
|
||||
IRepository<CommonDocument> _commonDocumentRepository,
|
||||
IRepository<ReadingOncologyTaskInfo> _readingOncologyTaskInfoRepository,
|
||||
|
||||
IRepository<ReadingQuestionCriterionTrial> _trialReadingCriterionRepository,
|
||||
@@ -39,6 +40,26 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导出文件模板
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public async Task<FileResult> ExportTemplateAsync(ExportTemplateAsyncDto inDto)
|
||||
{
|
||||
return await ExcelExportHelper.ExportTemplateAsync(new ExportTemplateServiceDto()
|
||||
{
|
||||
Data=inDto.Data,
|
||||
commonDocumentRepository= _commonDocumentRepository,
|
||||
TemplateCode=inDto.TemplateCode,
|
||||
ExportFileName=inDto.ExportFileName,
|
||||
hostEnvironment=_hostEnvironment,
|
||||
IsEnglish=_userInfo.IsEn_Us,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//查询列表的时候,一致性核查通过未产生任务的 自动产生任务 如果是一致性核查,那么还会自动分配
|
||||
public async Task GenerateVisitTaskAsync(Guid trialId, List<Guid> subjectVisitIdList, bool isAssignSubjectToDoctor = false)
|
||||
{
|
||||
|
||||
@@ -196,6 +196,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public List<int> NotEq { get; set; } = new List<int>();
|
||||
}
|
||||
|
||||
|
||||
public class GetExportTemplateInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 阅片计算Dto
|
||||
/// </summary>
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
IRepository<TumorAssessment_IRECIST1Point1> _tumorAssessmentRepository,
|
||||
IGeneralCalculateService _generalCalculateService,
|
||||
IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository,
|
||||
IVisitTaskHelpeService _visitTaskHelpeService,
|
||||
ILogger<IRECIST1Point1CalculateService> _logger) : BaseService, ICriterionCalculateService
|
||||
{
|
||||
|
||||
@@ -560,6 +561,29 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取IVUS模板
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<FileResult> GetIVUSTemplate(GetExportTemplateInDto inDto)
|
||||
{
|
||||
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
|
||||
var values = new
|
||||
{
|
||||
SubjectID = taskinfo.SubjectId,
|
||||
TaskBlindName = taskinfo.TaskBlindName,
|
||||
};
|
||||
return await _visitTaskHelpeService.ExportTemplateAsync(new IRaCIS.Application.Contracts.ExportTemplateAsyncDto()
|
||||
{
|
||||
ExportFileName= "IVUS_Template",
|
||||
TemplateCode= StaticData.Export.IVUSTheMeasuredValueOfEachMatchedFragment,
|
||||
Data= values
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 计算斑块数据统计和PVA数据
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using MiniExcelLibs.Attributes;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@@ -125,6 +126,40 @@ namespace IRaCIS.Application.Contracts
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导出文件
|
||||
/// </summary>
|
||||
public class ExportTemplateAsyncDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 模板Code
|
||||
/// </summary>
|
||||
public string TemplateCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导出的文件名
|
||||
/// </summary>
|
||||
public string ExportFileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据
|
||||
/// </summary>
|
||||
public object Data { get; set; }
|
||||
}
|
||||
|
||||
public class ExportTemplateServiceDto : ExportTemplateAsyncDto
|
||||
{
|
||||
public IRepository<CommonDocument> commonDocumentRepository { get; set; }
|
||||
|
||||
public IWebHostEnvironment hostEnvironment { get; set; }
|
||||
|
||||
public bool IsEnglish { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class ExcelExportInfo : TrialSelectDTO
|
||||
{
|
||||
public string CurrentTime { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user