Merge branch 'Test.IRC' of http://192.168.3.69:2000/XCKJ/irc-netcore-api into Test.IRC
commit
5d6a44912e
|
@ -36,7 +36,7 @@
|
|||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Staging"
|
||||
},
|
||||
"applicationUrl": "http://localhost:6200"
|
||||
"applicationUrl": "http://localhost:6100"
|
||||
},
|
||||
"IRaCIS.Production": {
|
||||
"commandName": "Project",
|
||||
|
|
|
@ -179,6 +179,7 @@ namespace IRaCIS.Core.API
|
|||
//不需要 token 访问的静态文件 wwwroot css, JavaScript, and images don't require authentication.
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseMiddleware<MultiDiskStaticFilesMiddleware>();
|
||||
|
||||
//LogDashboard
|
||||
app.UseLogDashboard("/LogDashboard");
|
||||
|
@ -186,8 +187,7 @@ namespace IRaCIS.Core.API
|
|||
//hangfire
|
||||
app.UseHangfireConfig(env);
|
||||
|
||||
////暂时废弃
|
||||
//app.UseHttpReports();
|
||||
|
||||
|
||||
////限流 中间件
|
||||
//app.UseIpRateLimiting();
|
||||
|
@ -204,7 +204,6 @@ namespace IRaCIS.Core.API
|
|||
}
|
||||
Console.WriteLine("当前环境: " + env.EnvironmentName);
|
||||
|
||||
//app.UseMiddleware<AuthMiddleware>();
|
||||
|
||||
// 特殊异常处理 比如 404
|
||||
app.UseStatusCodePagesWithReExecute("/Error/{0}");
|
||||
|
@ -221,15 +220,13 @@ namespace IRaCIS.Core.API
|
|||
app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
|
||||
|
||||
//app.UseIRacisHostStaticFileStore(env);
|
||||
app.UseMiddleware<MultiDiskStaticFilesMiddleware>();
|
||||
|
||||
|
||||
|
||||
|
||||
app.UseAuthentication();
|
||||
//app.UseJwtBearerQueryString();
|
||||
app.UseAuthorization();
|
||||
|
||||
////文件伺服 必须带Token 访问
|
||||
////app.UseIRacisHostStaticFileStore(env);
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
using IRaCIS.Core.Application.Helper;
|
||||
using Azure;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
using Microsoft.Extensions.FileProviders.Physical;
|
||||
|
@ -11,6 +14,7 @@ using Microsoft.Extensions.Hosting.Internal;
|
|||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.VisualBasic;
|
||||
using Newtonsoft.Json;
|
||||
using SharpCompress.Common;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
@ -147,6 +151,12 @@ namespace IRaCIS.Core.API
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 如果没有找到文件,返回404
|
||||
context.Response.StatusCode = 404;
|
||||
context.Response.ContentType = "application/json";
|
||||
|
||||
await context.Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk("File not found")));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -23,11 +23,15 @@ namespace IRaCIS.Core.Application.Services
|
|||
/// <summary> 指定资源Id,获取Dicom序列所属的实例信息列表 </summary>
|
||||
/// <param name="seriesId"> Dicom序列的Id </param>
|
||||
[HttpGet("{seriesId:guid}")]
|
||||
public async Task<IEnumerable<DicomInstanceDTO>> List(Guid seriesId)
|
||||
public async Task<IResponseOutput<List<DicomInstanceDTO>>> List(Guid seriesId)
|
||||
{
|
||||
return await _instanceRepository.Where(s => s.SeriesId == seriesId).OrderBy(s => s.InstanceNumber).
|
||||
var list = await _instanceRepository.Where(s => s.SeriesId == seriesId).OrderBy(s => s.InstanceNumber).
|
||||
ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
||||
.ProjectTo<DicomInstanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
var imageResizePath = await _instanceRepository.Where(s => s.SeriesId == seriesId).Select(t => t.DicomSerie.ImageResizePath).FirstOrDefaultAsync();
|
||||
|
||||
return ResponseOutput.Ok(list, new { ImageResizePath = imageResizePath });
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
public interface IInstanceService
|
||||
{
|
||||
Task<FileContentResult> Content(Guid instanceId);
|
||||
Task<IEnumerable<DicomInstanceDTO>> List(Guid seriesId);
|
||||
Task<IResponseOutput<List<DicomInstanceDTO>>> List(Guid seriesId);
|
||||
IEnumerable<Guid> List(Guid seriesId, string tpCode, bool? key);
|
||||
Task<FileContentResult> Preview(Guid instanceId);
|
||||
}
|
||||
|
|
|
@ -710,6 +710,7 @@ namespace IRaCIS.Application.Services
|
|||
#region 访视任务 - Dicom 阅片 表格问题相关查询
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取DIcom阅片问题答案
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue