屏蔽swager 报错接口
parent
01a79e0612
commit
b9f9af06f4
|
|
@ -3699,29 +3699,6 @@
|
|||
<param name="code"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.MinimalApiService.FileToPDFService">
|
||||
<summary>
|
||||
上传文件转PDF 或者给url 这边下载然后转PDF
|
||||
|
||||
</summary>
|
||||
<param name="_hostEnvironment"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.MinimalApiService.FileToPDFService.#ctor(Microsoft.AspNetCore.Hosting.IWebHostEnvironment)">
|
||||
<summary>
|
||||
上传文件转PDF 或者给url 这边下载然后转PDF
|
||||
|
||||
</summary>
|
||||
<param name="_hostEnvironment"></param>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "T:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.#ctor(IRaCIS.Core.Domain.Share.IUserInfo,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Infra.EFCore.TestLength})" -->
|
||||
<member name="M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.TestEfcoreJson">
|
||||
<summary>
|
||||
测试efcore json 列支持情况
|
||||
https://devblogs.microsoft.com/dotnet/array-mapping-in-ef-core-8/
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.HIRActivateService.GetAuthorizationCodeInfo(System.String,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Application.Contracts.SystemHospitalOption})">
|
||||
<summary>
|
||||
获取授权码明文信息
|
||||
|
|
@ -3884,6 +3861,15 @@
|
|||
The ID token, which can be used to verify the identity of the user.
|
||||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "T:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.#ctor(IRaCIS.Core.Domain.Share.IUserInfo,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Infra.EFCore.TestLength})" -->
|
||||
<member name="M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.TestEfcoreJson">
|
||||
<summary>
|
||||
测试efcore json 列支持情况
|
||||
https://devblogs.microsoft.com/dotnet/array-mapping-in-ef-core-8/
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.QCCommon.VerifyIsCRCSubmmitAsync(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Domain.Share.IUserInfo,System.Nullable{System.Guid})">
|
||||
<summary>
|
||||
验证CRC 是否已提交 已提交 就不允许进行任何操作,如果是IQC 那么还验证是否是当前任务领取人
|
||||
|
|
@ -9741,6 +9727,11 @@
|
|||
任务Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.NoneDicomMarkInfo.MarkId">
|
||||
<summary>
|
||||
标记的唯一标识符
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCustomTagInDto.VisitTaskId">
|
||||
<summary>
|
||||
任务Id
|
||||
|
|
@ -14836,6 +14827,13 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetNoneDicomMarkList(IRaCIS.Core.Application.Service.Reading.Dto.GetMarkListInDto)">
|
||||
<summary>
|
||||
获取非DICOM标记信息
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetManualList(IRaCIS.Core.Application.Service.Reading.Dto.GetManualListInDto)">
|
||||
<summary>
|
||||
获取手册
|
||||
|
|
@ -17510,17 +17508,17 @@
|
|||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Question">
|
||||
<summary>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
质疑
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Consistency">
|
||||
<summary>
|
||||
һ<EFBFBD><EFBFBD><EFBFBD>Ժ˲<EFBFBD>
|
||||
一致性核查
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto">
|
||||
<summary>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
复制
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
|
||||
|
|
|
|||
|
|
@ -1,137 +1,137 @@
|
|||
using IRaCIS.Core.Application.Helper;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using RestSharp;
|
||||
using SharpCompress.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
//using IRaCIS.Core.Application.Helper;
|
||||
//using MassTransit;
|
||||
//using Microsoft.AspNetCore.Authorization;
|
||||
//using Microsoft.AspNetCore.Builder;
|
||||
//using Microsoft.AspNetCore.Hosting;
|
||||
//using Microsoft.AspNetCore.Http;
|
||||
//using Microsoft.AspNetCore.Mvc;
|
||||
//using Microsoft.AspNetCore.StaticFiles;
|
||||
//using RestSharp;
|
||||
//using SharpCompress.Common;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.MinimalApiService
|
||||
{
|
||||
/// <summary>
|
||||
/// 上传文件转PDF 或者给url 这边下载然后转PDF
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="_hostEnvironment"></param>
|
||||
[ApiExplorerSettings(GroupName = "Institution")]
|
||||
public class FileToPDFService(IWebHostEnvironment _hostEnvironment) : ServiceBase
|
||||
{
|
||||
//namespace IRaCIS.Core.Application.Service.MinimalApiService
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 上传文件转PDF 或者给url 这边下载然后转PDF
|
||||
// ///
|
||||
// /// </summary>
|
||||
// /// <param name="_hostEnvironment"></param>
|
||||
// [ApiExplorerSettings(GroupName = "Institution")]
|
||||
// public class FileToPDFService(IWebHostEnvironment _hostEnvironment) : ServiceBase
|
||||
// {
|
||||
|
||||
[AllowAnonymous]
|
||||
[RoutePattern(HttpMethod = "Post")]
|
||||
public async Task<IResult> UploadFileAsync([FromForm] IFormFile file)
|
||||
{
|
||||
var tempFileName = NewId.NextGuid() + file.FileName;
|
||||
var tempPDFName = Path.GetFileNameWithoutExtension(tempFileName) + ".pdf";
|
||||
// [AllowAnonymous]
|
||||
// [RoutePattern(HttpMethod = "Post")]
|
||||
// public async Task<IResult> UploadFileAsync([FromForm] IFormFile file)
|
||||
// {
|
||||
// var tempFileName = NewId.NextGuid() + file.FileName;
|
||||
// var tempPDFName = Path.GetFileNameWithoutExtension(tempFileName) + ".pdf";
|
||||
|
||||
|
||||
// 获取wwwroot目录
|
||||
var wwwRootPath = Path.Combine(FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment), "temp");
|
||||
// // 获取wwwroot目录
|
||||
// var wwwRootPath = Path.Combine(FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment), "temp");
|
||||
|
||||
// 检查wwwroot/temp目录是否存在,不存在则创建
|
||||
if (!Directory.Exists(wwwRootPath))
|
||||
{
|
||||
Directory.CreateDirectory(wwwRootPath);
|
||||
}
|
||||
// // 检查wwwroot/temp目录是否存在,不存在则创建
|
||||
// if (!Directory.Exists(wwwRootPath))
|
||||
// {
|
||||
// Directory.CreateDirectory(wwwRootPath);
|
||||
// }
|
||||
|
||||
// 文件保存路径
|
||||
var pdfFilePath = Path.Combine(wwwRootPath, tempPDFName);
|
||||
var tempFilePath = Path.Combine(wwwRootPath, tempFileName);
|
||||
// // 文件保存路径
|
||||
// var pdfFilePath = Path.Combine(wwwRootPath, tempPDFName);
|
||||
// var tempFilePath = Path.Combine(wwwRootPath, tempFileName);
|
||||
|
||||
|
||||
using var stream = File.OpenWrite(tempFilePath);
|
||||
await file.CopyToAsync(stream);
|
||||
// using var stream = File.OpenWrite(tempFilePath);
|
||||
// await file.CopyToAsync(stream);
|
||||
|
||||
FileConvertHelper.ConvertWordToPdf(tempFilePath, Path.GetDirectoryName(pdfFilePath));
|
||||
// FileConvertHelper.ConvertWordToPdf(tempFilePath, Path.GetDirectoryName(pdfFilePath));
|
||||
|
||||
var fileBytes = await File.ReadAllBytesAsync(pdfFilePath);
|
||||
// var fileBytes = await File.ReadAllBytesAsync(pdfFilePath);
|
||||
|
||||
// 清理临时上传的文件和pdf
|
||||
if (File.Exists(pdfFilePath))
|
||||
{
|
||||
File.Delete(pdfFilePath);
|
||||
}
|
||||
if (File.Exists(tempFilePath))
|
||||
{
|
||||
File.Delete(tempFilePath);
|
||||
}
|
||||
// // 清理临时上传的文件和pdf
|
||||
// if (File.Exists(pdfFilePath))
|
||||
// {
|
||||
// File.Delete(pdfFilePath);
|
||||
// }
|
||||
// if (File.Exists(tempFilePath))
|
||||
// {
|
||||
// File.Delete(tempFilePath);
|
||||
// }
|
||||
|
||||
new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(tempPDFName), out var contentType);
|
||||
// new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(tempPDFName), out var contentType);
|
||||
|
||||
return Results.File(fileBytes, contentType);
|
||||
// return Results.File(fileBytes, contentType);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
public async Task<IResult> GetPDFFileAsync(string fileUrl)
|
||||
{
|
||||
var tempFileName = NewId.NextGuid() + Path.GetFileName(fileUrl);
|
||||
var tempPDFName = Path.GetFileNameWithoutExtension(tempFileName) + ".pdf";
|
||||
// public async Task<IResult> GetPDFFileAsync(string fileUrl)
|
||||
// {
|
||||
// var tempFileName = NewId.NextGuid() + Path.GetFileName(fileUrl);
|
||||
// var tempPDFName = Path.GetFileNameWithoutExtension(tempFileName) + ".pdf";
|
||||
|
||||
|
||||
// 获取wwwroot目录
|
||||
var wwwRootPath = Path.Combine(FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment), "temp");
|
||||
// // 获取wwwroot目录
|
||||
// var wwwRootPath = Path.Combine(FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment), "temp");
|
||||
|
||||
// 检查wwwroot/temp目录是否存在,不存在则创建
|
||||
if (!Directory.Exists(wwwRootPath))
|
||||
{
|
||||
Directory.CreateDirectory(wwwRootPath);
|
||||
}
|
||||
// // 检查wwwroot/temp目录是否存在,不存在则创建
|
||||
// if (!Directory.Exists(wwwRootPath))
|
||||
// {
|
||||
// Directory.CreateDirectory(wwwRootPath);
|
||||
// }
|
||||
|
||||
// 文件保存路径
|
||||
var pdfFilePath = Path.Combine(wwwRootPath, tempPDFName);
|
||||
var tempFilePath = Path.Combine(wwwRootPath, tempFileName);
|
||||
// // 文件保存路径
|
||||
// var pdfFilePath = Path.Combine(wwwRootPath, tempPDFName);
|
||||
// var tempFilePath = Path.Combine(wwwRootPath, tempFileName);
|
||||
|
||||
|
||||
//请求url获取文件
|
||||
var client = new RestClient(fileUrl);
|
||||
// //请求url获取文件
|
||||
// var client = new RestClient(fileUrl);
|
||||
|
||||
var request = new RestRequest(fileUrl, Method.Get);
|
||||
// var request = new RestRequest(fileUrl, Method.Get);
|
||||
|
||||
var response = await client.ExecuteAsync(request);
|
||||
// var response = await client.ExecuteAsync(request);
|
||||
|
||||
// 检查响应是否成功
|
||||
if (response.IsSuccessful)
|
||||
{
|
||||
// 将响应内容写入到本地文件
|
||||
await File.WriteAllBytesAsync(tempFilePath, response.RawBytes);
|
||||
// // 检查响应是否成功
|
||||
// if (response.IsSuccessful)
|
||||
// {
|
||||
// // 将响应内容写入到本地文件
|
||||
// await File.WriteAllBytesAsync(tempFilePath, response.RawBytes);
|
||||
|
||||
FileConvertHelper.ConvertWordToPdf(tempFilePath, Path.GetDirectoryName(pdfFilePath));
|
||||
// FileConvertHelper.ConvertWordToPdf(tempFilePath, Path.GetDirectoryName(pdfFilePath));
|
||||
|
||||
var fileBytes = await File.ReadAllBytesAsync(pdfFilePath);
|
||||
// var fileBytes = await File.ReadAllBytesAsync(pdfFilePath);
|
||||
|
||||
// 清理临时上传的文件和pdf
|
||||
if (File.Exists(pdfFilePath))
|
||||
{
|
||||
File.Delete(pdfFilePath);
|
||||
}
|
||||
if (File.Exists(tempFilePath))
|
||||
{
|
||||
File.Delete(tempFilePath);
|
||||
}
|
||||
// // 清理临时上传的文件和pdf
|
||||
// if (File.Exists(pdfFilePath))
|
||||
// {
|
||||
// File.Delete(pdfFilePath);
|
||||
// }
|
||||
// if (File.Exists(tempFilePath))
|
||||
// {
|
||||
// File.Delete(tempFilePath);
|
||||
// }
|
||||
|
||||
new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(tempPDFName), out var contentType);
|
||||
// new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(tempPDFName), out var contentType);
|
||||
|
||||
return Results.File(fileBytes, contentType);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"下载文件失败: {response.ErrorMessage}");
|
||||
// return Results.File(fileBytes, contentType);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Console.WriteLine($"下载文件失败: {response.ErrorMessage}");
|
||||
|
||||
return Results.Problem("下载文件失败", statusCode: StatusCodes.Status500InternalServerError);
|
||||
// return Results.Problem("下载文件失败", statusCode: StatusCodes.Status500InternalServerError);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<DicomSeries> _dicomSeriesRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialBodyPart> _trialBodyPartRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IOSSService _IOSSService,
|
||||
IDistributedLockProvider _distributedLockProvider,
|
||||
ILogger<TestService> _logger, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService
|
||||
|
|
@ -56,6 +57,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
public static int IntValue = 100;
|
||||
|
||||
|
||||
|
||||
public class ModelVerifyCommand
|
||||
{
|
||||
public int? IntNUllValue { get; set; }
|
||||
|
|
@ -294,8 +296,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
//创建一个模型验证的方法
|
||||
[AllowAnonymous]
|
||||
[HttpPost("{email}")]
|
||||
public async Task<IResponseOutput> PostModelVerify(ModelVerifyCommand modelVerify)
|
||||
public async Task<IResponseOutput> PostModelVerify(/*ModelVerifyCommand modelVerify,*/ Guid subjectVisitId)
|
||||
{
|
||||
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).Include(x => x.CurrentActionUser).FirstNotNullAsync();
|
||||
|
||||
var subjectVisit2 = await (_subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).Include(x => x.CurrentActionUser)).FirstNotNullAsync();
|
||||
|
||||
var webhook = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=cdd97aab-d256-4f07-9145-a0a2b1555322";
|
||||
//await WeComNotifier.SendErrorAsync(webhook, "http://irc.test.extimaging.com/login", new Exception("测试异常"), new[] { "ZhouHang" });
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue