Compare commits
No commits in common. "d27b4af793dd23a44bc0f5532585c3bb5626acf1" and "609742c914205bb2fced280101748bbe6088c037" have entirely different histories.
d27b4af793
...
609742c914
|
@ -2197,12 +2197,6 @@
|
|||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.GeneralCalculateService.GetDataTableFromUpload(Microsoft.AspNetCore.Http.IFormFile)">
|
||||
<summary>
|
||||
从上传文件中获取Datatable
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.GeneralCalculateService.LogRecord(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto,System.String,IRaCIS.Core.Domain.Share.LesionType)">
|
||||
<summary>
|
||||
添加计算错误日志
|
||||
|
@ -4786,13 +4780,6 @@
|
|||
<param name="lesionType"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.IGeneralCalculateService.GetDataTableFromUpload(Microsoft.AspNetCore.Http.IFormFile)">
|
||||
<summary>
|
||||
从上传文件中获取Datatable
|
||||
</summary>
|
||||
<param name="file"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.IReadingCalculateService.CalculateTask(IRaCIS.Core.Application.Service.Reading.Dto.CalculateTaskInDto)">
|
||||
<summary>
|
||||
自动计算 并修改值
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MiniExcelLibs;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
|
@ -49,41 +46,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 从上传文件中获取Datatable
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<DataTable> GetDataTableFromUpload(IFormFile file)
|
||||
{
|
||||
DataTable result = new DataTable();
|
||||
var fileFolder = "Upload\\";
|
||||
if (!Directory.Exists(fileFolder))
|
||||
{
|
||||
Directory.CreateDirectory(fileFolder);
|
||||
}
|
||||
|
||||
var fileName = DateTime.Now.ToString("yyyyMMddHHmmss") +
|
||||
Path.GetExtension(file.FileName);
|
||||
var filePath = Path.Combine(fileFolder, fileName);
|
||||
try
|
||||
{
|
||||
using (var stream = new FileStream(filePath, FileMode.Create))
|
||||
{
|
||||
file.CopyTo(stream);
|
||||
stream.Position = 0;
|
||||
result = stream.QueryAsDataTable(useHeaderRow: false);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
File.Delete(filePath);
|
||||
}
|
||||
|
||||
File.Delete(filePath);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加计算错误日志
|
||||
/// </summary>
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MiniExcelLibs;
|
||||
using System.Data;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
{
|
||||
|
@ -48,8 +45,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取Service
|
||||
/// </summary>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using DocumentFormat.OpenXml.Presentation;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
|
@ -8,7 +7,6 @@ using Microsoft.AspNetCore.Http;
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using MiniExcelLibs;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
{
|
||||
|
@ -578,7 +576,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
var values = new
|
||||
{
|
||||
SubjectID = taskinfo.BlindSubjectCode.IsNullOrEmpty()? taskinfo.Subject.Code: taskinfo.BlindSubjectCode,
|
||||
SubjectID = taskinfo.BlindSubjectCode.IsNotNullOrEmpty()? taskinfo.Subject.Code: taskinfo.BlindSubjectCode,
|
||||
TaskBlindName = taskinfo.TaskBlindName,
|
||||
};
|
||||
return await _visitTaskHelpeService.ExportTemplateAsync(new IRaCIS.Application.Contracts.ExportTemplateAsyncDto()
|
||||
|
@ -597,9 +595,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
public async Task UploadIVUSTemplate()
|
||||
{
|
||||
var request = httpContext.HttpContext!.Request;
|
||||
var file = request.Form.Files[0];
|
||||
var File = request.Form.Files[0];
|
||||
Guid visitTaskId = Guid.Parse(request.Form["VisitTaskId"]);
|
||||
var dataTable = _generalCalculateService.GetDataTableFromUpload(file);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Data;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
@ -38,12 +36,5 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="lesionType"></param>
|
||||
/// <returns></returns>
|
||||
Task LogRecord(ReadingCalculateDto inDto, string lesionName, LesionType lesionType);
|
||||
|
||||
/// <summary>
|
||||
/// 从上传文件中获取Datatable
|
||||
/// </summary>
|
||||
/// <param name="file"></param>
|
||||
/// <returns></returns>
|
||||
Task<DataTable> GetDataTableFromUpload(IFormFile file);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Data;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
@ -56,7 +54,5 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <returns></returns>
|
||||
Task<object> GetReadingCalculationData(GetReadingCalculationDataInDto inDto);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue