Compare commits
189 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5660d2e83b | |||
| 5e3e242981 | |||
| 65c31fb457 | |||
| 0f891075cc | |||
| 6d898367e4 | |||
| 003e63b7fb | |||
| 73c9e15976 | |||
| 1dc1d673dd | |||
| 46818d9a02 | |||
| d6a585c6cc | |||
| c54fcf920c | |||
| 467c7f77f5 | |||
| 3c51287178 | |||
| 9d8fdcfa12 | |||
| fadd8a7f79 | |||
| f2afb7ab1a | |||
| b52d8785bb | |||
| 70846525bf | |||
| abe77916a3 | |||
| 660846a0d8 | |||
| 8dec77f30a | |||
| 5812c8f939 | |||
| 1c673e11ac | |||
| bf54bcfd9b | |||
| 33a0b8f11f | |||
| 61ffdabc51 | |||
| 2f224047bc | |||
| 2747fa82e3 | |||
| 5dd80c91cf | |||
| 495e602599 | |||
| 545ddd4ec9 | |||
| 9fff53f137 | |||
| 1d38fc0879 | |||
| 48f44b8920 | |||
| e365818ef5 | |||
| c2bb3010cc | |||
| 4ca8003d24 | |||
| 6a212926e0 | |||
| dae5c0440f | |||
| 6b1d083faa | |||
| c8510bea2a | |||
| a00e84018a | |||
| 3435806020 | |||
| 27f0a0fcfa | |||
| 1f4bb0128a | |||
| e686b6b7d4 | |||
| b74d46b425 | |||
| aa08628b72 | |||
| d4b2c48916 | |||
| 152846cfd5 | |||
| 48ef1c8605 | |||
| de72cdb61a | |||
| 4c17101e27 | |||
| 0c1b3b0175 | |||
| 45b51d9bfa | |||
| 127916f03e | |||
| f94e9c98f9 | |||
| e52523f1fa | |||
| 2d36f75660 | |||
| a541423de5 | |||
| 8e98d1710b | |||
| 7b53756753 | |||
| e20d7982f4 | |||
| ff8604f44a | |||
| aaddd8e26f | |||
| 5e7fd398f2 | |||
| 53cc5f129f | |||
| 881e67d3e2 | |||
| 2c385aba12 | |||
| b53616addc | |||
| ff3796b7a0 | |||
| 9aa061e093 | |||
| 9524a31fe6 | |||
| 9c4f2dcf6b | |||
| c70120bcaa | |||
| ea693b3ffc | |||
| 62ec7d91a9 | |||
| 01b6799a31 | |||
| 52f3a88e36 | |||
| 35687c01ec | |||
| ed01407382 | |||
| 3dbe92a667 | |||
| 127ae75b5b | |||
| 3d90eaf32c | |||
| 4bbfacd7de | |||
| 5bb0f30c77 | |||
| b179a2fa49 | |||
| 3d0f0b0f52 | |||
| c11f4a5dc7 | |||
| dcb9d7b7fc | |||
| 87a39fa264 | |||
| 24f64e9d59 | |||
| d7f380fc73 | |||
| a37a1a6b95 | |||
| 33c3fc158f | |||
| 3a6afd6958 | |||
| 378f4e13fb | |||
| f4d7e30b5d | |||
| 088be2f1a5 | |||
| 56cab93554 | |||
| 17734753c8 | |||
| 36fa5e1d73 | |||
| abc364835c | |||
| 061625e474 | |||
| 0888577cde | |||
| 906bf18971 | |||
| 4398afe298 | |||
| 7c14e9e7a3 | |||
| b6798a3466 | |||
| 867c7b1752 | |||
| 0ef8f62a58 | |||
| 03f1f9f157 | |||
| a5e257a2f1 | |||
| f550750e30 | |||
| 6865c7f4a1 | |||
| 9d2bb15ffd | |||
| 336b14a4ce | |||
| 344e8f50ae | |||
| ba0b7f33bc | |||
| 49bc2e1762 | |||
| d3ec067224 | |||
| 267d0494d3 | |||
| 172f6bc29f | |||
| 4f93db928f | |||
| c10ee98076 | |||
| 0820cffd9d | |||
| 7f90d64064 | |||
| c4c98910e8 | |||
| 06f1ca232e | |||
| 90320c2b12 | |||
| f5885f612a | |||
| af74059945 | |||
| 42948185f9 | |||
| 6329778123 | |||
| eadf8f5266 | |||
| c4a0e47a84 | |||
| f9661e3b72 | |||
| 1715d4d056 | |||
| 40fae42a9e | |||
| 19e55c1185 | |||
| 6443a46abb | |||
| 8fb2e4b7f4 | |||
| 0be25fa16a | |||
| 8743c028a3 | |||
| 7174fd056a | |||
| cd188691f6 | |||
| c9586e7320 | |||
| c35da39ba6 | |||
| e2639b8055 | |||
| 558ed48874 | |||
| e38a3e5f53 | |||
| 1175696590 | |||
| 95862906a4 | |||
| 44cc8d883d | |||
| 4c607302f3 | |||
| a37ccac097 | |||
| b8c460e252 | |||
| 4df35ef8c0 | |||
| 397ac4a154 | |||
| 3e6854053d | |||
| e155301b60 | |||
| 197c315f07 | |||
| 5654125091 | |||
| 3768c22aed | |||
| beb43a785e | |||
| 34e10ac41e | |||
| 8e26edabba | |||
| d6cda6337b | |||
| 5b1638ab42 | |||
| 3537ccf3cd | |||
| d15a9945de | |||
| 61fa371fd4 | |||
| 05802ae91c | |||
| b4df799a37 | |||
| 6553bd70c5 | |||
| f3d0c6f28c | |||
| 09e35513b0 | |||
| 381e25cda1 | |||
| c763c174d5 | |||
| d4f3239844 | |||
| 806e9528f0 | |||
| aa59d9ecca | |||
| 1226af6376 | |||
| 596ecba13f | |||
| 57290d6a4b | |||
| 52251d420f | |||
| 95e365fe4f | |||
| 4f37f2fa0a | |||
| 716b7833b0 |
@@ -0,0 +1,30 @@
|
|||||||
|
**/.classpath
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
LICENSE
|
||||||
|
README.md
|
||||||
|
!**/.gitignore
|
||||||
|
!.git/HEAD
|
||||||
|
!.git/config
|
||||||
|
!.git/packed-refs
|
||||||
|
!.git/refs/heads/**
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Autofac.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Serilog;
|
|
||||||
using MediatR;
|
|
||||||
using IRaCIS.Core.Application.MediatR.Handlers;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using MassTransit;
|
|
||||||
using MassTransit.NewIdProviders;
|
|
||||||
using System.IO;
|
|
||||||
using IRaCIS.Core.Domain.Share;
|
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
|
||||||
using IRaCIS.Core.Application.Helper;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.API
|
|
||||||
{
|
|
||||||
public class Program1
|
|
||||||
{
|
|
||||||
public readonly string environment;
|
|
||||||
public static async Task Main(string[] args)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//以配置文件为准,否则 从url中取环境值(服务以命令行传递参数启动,配置文件配置了就不需要传递环境参数)
|
|
||||||
var config = new ConfigurationBuilder()
|
|
||||||
.AddEnvironmentVariables()
|
|
||||||
.Build();
|
|
||||||
|
|
||||||
var enviromentName = config["ASPNETCORE_ENVIRONMENT"];
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(enviromentName))
|
|
||||||
{
|
|
||||||
|
|
||||||
var index = Array.IndexOf(args, "--env");
|
|
||||||
enviromentName = index > -1
|
|
||||||
? args[index + 1]
|
|
||||||
: "Development";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Dicom 浏览
|
|
||||||
//ImageManager.SetImplementation(WinFormsImageManager.Instance);
|
|
||||||
|
|
||||||
var host = CreateHostBuilder(args)
|
|
||||||
.UseEnvironment(enviromentName) //命令行传入环境
|
|
||||||
.ConfigureAppConfiguration((hostContext, config) =>
|
|
||||||
{
|
|
||||||
|
|
||||||
//Console.WriteLine(hostContext.HostingEnvironment.EnvironmentName);
|
|
||||||
config.AddJsonFile("appsettings.json", false, true)
|
|
||||||
.AddJsonFile($"appsettings.{enviromentName}.json", false, true);
|
|
||||||
})
|
|
||||||
.Build();
|
|
||||||
|
|
||||||
//// Serilog
|
|
||||||
SerilogExtension.AddSerilogSetup(enviromentName, host.Services);
|
|
||||||
|
|
||||||
Log.Logger.Warning($"当前环境:{enviromentName}");
|
|
||||||
|
|
||||||
|
|
||||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
|
||||||
{
|
|
||||||
Log.Logger.Warning($"当前部署平台环境:windows");
|
|
||||||
}
|
|
||||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
|
||||||
{
|
|
||||||
Log.Logger.Warning($"当前部署平台环境:linux");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Log.Logger.Warning($"当前部署平台环境:OSX or FreeBSD");
|
|
||||||
}
|
|
||||||
|
|
||||||
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
|
|
||||||
|
|
||||||
|
|
||||||
host.Run();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
|
|
||||||
Log.Logger.Error(e.InnerException is null ? e.Message + e.StackTrace : e.InnerException?.Message + e.InnerException?.StackTrace);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
|
||||||
Host.CreateDefaultBuilder(args)
|
|
||||||
.UseWindowsService()
|
|
||||||
.ConfigureWebHostDefaults(webBuilder =>
|
|
||||||
{
|
|
||||||
webBuilder.ConfigureKestrel((context, options) =>
|
|
||||||
{
|
|
||||||
//设置应用服务器Kestrel请求体最大为1GB // if don't set default value is: 30 MB
|
|
||||||
options.Limits.MaxRequestBodySize = long.MaxValue;
|
|
||||||
options.Limits.KeepAliveTimeout = TimeSpan.FromMinutes(30);
|
|
||||||
options.Limits.RequestHeadersTimeout = TimeSpan.FromMinutes(20);
|
|
||||||
|
|
||||||
});
|
|
||||||
//webBuilder.UseSerilog();//在宿主机启动的时候配置serilog,与微软ILogger进行整合
|
|
||||||
webBuilder.UseStartup<Startup>();
|
|
||||||
}).UseSerilog()
|
|
||||||
.UseServiceProviderFactory(new AutofacServiceProviderFactory());
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,251 +0,0 @@
|
|||||||
using Autofac;
|
|
||||||
using Microsoft.AspNetCore.Builder;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
|
||||||
using System;
|
|
||||||
using IRaCIS.Core.Application.Filter;
|
|
||||||
using LogDashboard;
|
|
||||||
using MediatR;
|
|
||||||
using IRaCIS.Core.Application.MediatR.Handlers;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using AspNetCoreRateLimit;
|
|
||||||
using Microsoft.AspNetCore.HttpOverrides;
|
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
|
||||||
using System.Globalization;
|
|
||||||
using Microsoft.AspNetCore.Localization;
|
|
||||||
using Localization;
|
|
||||||
using Magicodes.ExporterAndImporter.Core.Filters;
|
|
||||||
using IRaCIS.Core.Application.MediatR.CommandAndQueries;
|
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
|
||||||
using Invio.Extensions.Authentication.JwtBearer;
|
|
||||||
using Microsoft.AspNetCore.SignalR;
|
|
||||||
using IRaCIS.Core.Domain.Share;
|
|
||||||
using Microsoft.AspNetCore.StaticFiles;
|
|
||||||
using IRaCIS.Core.Application.Helper;
|
|
||||||
using IRaCIS.Application.Services.BackGroundJob;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.API
|
|
||||||
{
|
|
||||||
public class Startup
|
|
||||||
{
|
|
||||||
public Startup(IConfiguration configuration)
|
|
||||||
{
|
|
||||||
_configuration = configuration;
|
|
||||||
}
|
|
||||||
public ILogger<Startup> _logger { get; }
|
|
||||||
|
|
||||||
public IConfiguration _configuration { get; }
|
|
||||||
|
|
||||||
//// ConfigureContainer is where you can register things directly
|
|
||||||
//// with Autofac. This runs after ConfigureServices so the things
|
|
||||||
//// here will override registrations made in ConfigureServices.
|
|
||||||
//// Don't build the container; that gets done for you by the factory.
|
|
||||||
// for castle
|
|
||||||
public void ConfigureContainer(ContainerBuilder containerBuilder)
|
|
||||||
{
|
|
||||||
containerBuilder.RegisterModule<AutofacModuleSetup>();
|
|
||||||
|
|
||||||
#region Test
|
|
||||||
//containerBuilder.RegisterType<ClinicalDataService>().PropertiesAutowired().InstancePerLifetimeScope();//注册仓储
|
|
||||||
|
|
||||||
//var container = containerBuilder.Build();
|
|
||||||
|
|
||||||
//// Now you can resolve services using Autofac. For example,
|
|
||||||
//// this line will execute the lambda expression registered
|
|
||||||
//// to the IConfigReader service.
|
|
||||||
//using (var scope = container.BeginLifetimeScope())
|
|
||||||
//{
|
|
||||||
// var reader = scope.Resolve<BaseService>();
|
|
||||||
|
|
||||||
// var test = scope.Resolve<ClinicalDataService>();
|
|
||||||
// var test2 = scope.Resolve<IClinicalDataService>();
|
|
||||||
|
|
||||||
// var test3 = scope.Resolve<IEFUnitOfWork<IRaCISDBContext>>();
|
|
||||||
//}
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to add services to the container.
|
|
||||||
public void ConfigureServices(IServiceCollection services)
|
|
||||||
{
|
|
||||||
//健康检查
|
|
||||||
services.AddHealthChecks();
|
|
||||||
//本地化
|
|
||||||
services.AddJsonLocalization(options => options.ResourcesPath = "Resources");
|
|
||||||
|
|
||||||
// 异常、参数统一验证过滤器、Json序列化配置、字符串参数绑型统一Trim()
|
|
||||||
services.AddControllers(options =>
|
|
||||||
{
|
|
||||||
//options.Filters.Add<LogActionFilter>();
|
|
||||||
options.Filters.Add<ModelActionFilter>();
|
|
||||||
options.Filters.Add<ProjectExceptionFilter>();
|
|
||||||
options.Filters.Add<UnitOfWorkFilter>();
|
|
||||||
|
|
||||||
if (_configuration.GetSection("BasicSystemConfig").GetValue<bool>("OpenLoginLimit"))
|
|
||||||
{
|
|
||||||
options.Filters.Add<LimitUserRequestAuthorization>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
.AddNewtonsoftJsonSetup(); // NewtonsoftJson 序列化 处理
|
|
||||||
|
|
||||||
services.AddOptions().Configure<SystemEmailSendConfig>( _configuration.GetSection("SystemEmailSendConfig"));
|
|
||||||
services.AddOptions().Configure<ServiceVerifyConfigOption>(_configuration.GetSection("BasicSystemConfig"));
|
|
||||||
services.AddOptions().Configure<AliyunOSSOptions>(_configuration.GetSection("AliyunOSS"));
|
|
||||||
services.AddOptions().Configure<ObjectStoreServiceOptions>(_configuration.GetSection("ObjectStoreService"));
|
|
||||||
|
|
||||||
|
|
||||||
//动态WebApi + UnifiedApiResultFilter 省掉控制器代码
|
|
||||||
services.AddDynamicWebApiSetup();
|
|
||||||
//AutoMapper
|
|
||||||
services.AddAutoMapperSetup();
|
|
||||||
//EF ORM QueryWithNoLock
|
|
||||||
services.AddEFSetup(_configuration);
|
|
||||||
//Http 响应压缩
|
|
||||||
services.AddResponseCompressionSetup();
|
|
||||||
//Swagger Api 文档
|
|
||||||
services.AddSwaggerSetup();
|
|
||||||
//JWT Token 验证
|
|
||||||
services.AddJWTAuthSetup(_configuration);
|
|
||||||
|
|
||||||
|
|
||||||
// MediatR 进程内消息 事件解耦 从程序集中 注册命令和handler对应关系
|
|
||||||
services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining<ConsistencyVerificationHandler>());
|
|
||||||
// EasyCaching 缓存
|
|
||||||
services.AddEasyCachingSetup(_configuration);
|
|
||||||
|
|
||||||
//services.AddDistributedMemoryCache();
|
|
||||||
|
|
||||||
// hangfire 定时任务框架 有界面,更友好~
|
|
||||||
services.AddhangfireSetup(_configuration);
|
|
||||||
|
|
||||||
|
|
||||||
// 保护上传文件
|
|
||||||
//services.AddStaticFileAuthorizationSetup();
|
|
||||||
|
|
||||||
|
|
||||||
////HttpReports 暂时废弃
|
|
||||||
//services.AddHttpReports().AddHttpTransport();
|
|
||||||
//Serilog 日志可视化 LogDashboard日志
|
|
||||||
services.AddLogDashboardSetup();
|
|
||||||
//上传限制 配置
|
|
||||||
services.Configure<FormOptions>(options =>
|
|
||||||
{
|
|
||||||
options.MultipartBodyLengthLimit = int.MaxValue;
|
|
||||||
options.ValueCountLimit = int.MaxValue;
|
|
||||||
options.ValueLengthLimit = int.MaxValue;
|
|
||||||
});
|
|
||||||
//IP 限流 可设置白名单 或者黑名单
|
|
||||||
//services.AddIpPolicyRateLimitSetup(_configuration);
|
|
||||||
// 用户类型 策略授权
|
|
||||||
//services.AddAuthorizationPolicySetup(_configuration);
|
|
||||||
|
|
||||||
services.AddJsonConfigSetup(_configuration);
|
|
||||||
//转发头设置 获取真实IP
|
|
||||||
services.Configure<ForwardedHeadersOptions>(options =>
|
|
||||||
{
|
|
||||||
options.ForwardedHeaders =
|
|
||||||
ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
|
|
||||||
});
|
|
||||||
//Dicom影像渲染图片 跨平台
|
|
||||||
services.AddDicomSetup();
|
|
||||||
|
|
||||||
// 实时应用
|
|
||||||
services.AddSignalR();
|
|
||||||
|
|
||||||
|
|
||||||
services.AddSingleton<IUserIdProvider, IRaCISUserIdProvider>();
|
|
||||||
|
|
||||||
//services.AddSingleton<IImportResultFilter, ImportResultFilteTest>();
|
|
||||||
|
|
||||||
services.AddMemoryCache();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
|
||||||
public async void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
//本地化
|
|
||||||
app.UseLocalization();
|
|
||||||
|
|
||||||
app.UseForwardedHeaders();
|
|
||||||
|
|
||||||
//响应压缩
|
|
||||||
app.UseResponseCompression();
|
|
||||||
|
|
||||||
//app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
|
|
||||||
|
|
||||||
//不需要 token 访问的静态文件 wwwroot css, JavaScript, and images don't require authentication.
|
|
||||||
app.UseStaticFiles();
|
|
||||||
|
|
||||||
app.UseMiddleware<MultiDiskStaticFilesMiddleware>();
|
|
||||||
|
|
||||||
//LogDashboard
|
|
||||||
app.UseLogDashboard("/LogDashboard");
|
|
||||||
|
|
||||||
//hangfire
|
|
||||||
app.UseHangfireConfig(env);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////限流 中间件
|
|
||||||
//app.UseIpRateLimiting();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (env.IsDevelopment())
|
|
||||||
{
|
|
||||||
app.UseDeveloperExceptionPage();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//app.UseHsts();
|
|
||||||
}
|
|
||||||
Console.WriteLine("当前环境: " + env.EnvironmentName);
|
|
||||||
|
|
||||||
|
|
||||||
// 特殊异常处理 比如 404
|
|
||||||
app.UseStatusCodePagesWithReExecute("/Error/{0}");
|
|
||||||
|
|
||||||
SwaggerSetup.Configure(app, env);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////serilog 记录请求的用户信息
|
|
||||||
app.UseSerilogConfig(env);
|
|
||||||
|
|
||||||
app.UseRouting();
|
|
||||||
|
|
||||||
app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
|
|
||||||
|
|
||||||
//app.UseIRacisHostStaticFileStore(env);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
app.UseAuthentication();
|
|
||||||
app.UseAuthorization();
|
|
||||||
|
|
||||||
|
|
||||||
app.UseEndpoints(endpoints =>
|
|
||||||
{
|
|
||||||
endpoints.MapControllers();
|
|
||||||
|
|
||||||
endpoints.MapHub<UploadHub>("/UploadHub");
|
|
||||||
|
|
||||||
endpoints.MapHealthChecks("/health");
|
|
||||||
});
|
|
||||||
|
|
||||||
var hangfireJobService = app.ApplicationServices.GetRequiredService<IIRaCISHangfireJob>();
|
|
||||||
|
|
||||||
await hangfireJobService.InitHangfireJobTaskAsync();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -28,6 +28,8 @@ using Aliyun.Acs.Core.Auth.Sts;
|
|||||||
using Aliyun.Acs.Core;
|
using Aliyun.Acs.Core;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
||||||
|
|
||||||
namespace IRaCIS.Api.Controllers
|
namespace IRaCIS.Api.Controllers
|
||||||
{
|
{
|
||||||
@@ -54,6 +56,7 @@ namespace IRaCIS.Api.Controllers
|
|||||||
|
|
||||||
public async Task<IResponseOutput<DoctorDetailDTO>> GetDoctorDetail([FromServices] IAttachmentService attachmentService, [FromServices] IDoctorService _doctorService,
|
public async Task<IResponseOutput<DoctorDetailDTO>> GetDoctorDetail([FromServices] IAttachmentService attachmentService, [FromServices] IDoctorService _doctorService,
|
||||||
[FromServices] IEducationService _educationService, [FromServices] ITrialExperienceService _trialExperienceService,
|
[FromServices] IEducationService _educationService, [FromServices] ITrialExperienceService _trialExperienceService,
|
||||||
|
|
||||||
[FromServices] IResearchPublicationService _researchPublicationService, [FromServices] IVacationService _vacationService, Guid doctorId)
|
[FromServices] IResearchPublicationService _researchPublicationService, [FromServices] IVacationService _vacationService, Guid doctorId)
|
||||||
{
|
{
|
||||||
var education = await _educationService.GetEducation(doctorId);
|
var education = await _educationService.GetEducation(doctorId);
|
||||||
@@ -94,7 +97,10 @@ namespace IRaCIS.Api.Controllers
|
|||||||
[HttpPost, Route("user/login")]
|
[HttpPost, Route("user/login")]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<IResponseOutput<LoginReturnDTO>> Login(UserLoginDTO loginUser, [FromServices] IEasyCachingProvider provider, [FromServices] IUserService _userService,
|
public async Task<IResponseOutput<LoginReturnDTO>> Login(UserLoginDTO loginUser, [FromServices] IEasyCachingProvider provider, [FromServices] IUserService _userService,
|
||||||
[FromServices] ITokenService _tokenService, [FromServices] IConfiguration configuration)
|
[FromServices] ITokenService _tokenService,
|
||||||
|
|
||||||
|
[FromServices] IReadingImageTaskService readingImageTaskService,
|
||||||
|
[FromServices] IConfiguration configuration)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -180,7 +186,8 @@ namespace IRaCIS.Api.Controllers
|
|||||||
|
|
||||||
var userId = returnModel.Data.BasicInfo.Id.ToString();
|
var userId = returnModel.Data.BasicInfo.Id.ToString();
|
||||||
//provider.Set(userId, userId, TimeSpan.FromMinutes(AppSettings.LoginExpiredTimeSpan));
|
//provider.Set(userId, userId, TimeSpan.FromMinutes(AppSettings.LoginExpiredTimeSpan));
|
||||||
|
// 验证阅片休息时间
|
||||||
|
await readingImageTaskService.ResetReadingRestTime(returnModel.Data.BasicInfo.Id);
|
||||||
await provider.SetAsync(userId.ToString(), returnModel.Data.JWTStr, TimeSpan.FromDays(7));
|
await provider.SetAsync(userId.ToString(), returnModel.Data.JWTStr, TimeSpan.FromDays(7));
|
||||||
return returnModel;
|
return returnModel;
|
||||||
}
|
}
|
||||||
@@ -216,7 +223,7 @@ namespace IRaCIS.Api.Controllers
|
|||||||
|
|
||||||
var ossOptions = serviceOption.AliyunOSS;
|
var ossOptions = serviceOption.AliyunOSS;
|
||||||
|
|
||||||
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse = serviceOption.ObjectStoreUse, MinIO = serviceOption.MinIO ,AliyunOSS= serviceOption.AliyunOSS });
|
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse = serviceOption.ObjectStoreUse, MinIO = serviceOption.MinIO ,AliyunOSS= serviceOption.AliyunOSS,AWS=serviceOption.AWS });
|
||||||
|
|
||||||
#region 临时token 屏蔽
|
#region 临时token 屏蔽
|
||||||
//IClientProfile profile = DefaultProfile.GetProfile(ossOptions.RegionId, ossOptions.AccessKeyId, ossOptions.AccessKeySecret);
|
//IClientProfile profile = DefaultProfile.GetProfile(ossOptions.RegionId, ossOptions.AccessKeyId, ossOptions.AccessKeySecret);
|
||||||
@@ -259,11 +266,11 @@ namespace IRaCIS.Api.Controllers
|
|||||||
}
|
}
|
||||||
else if(Enum.TryParse<ObjectStoreUse>(serviceOption.ObjectStoreUse, out var parsedValue) && parsedValue == ObjectStoreUse.MinIO)
|
else if(Enum.TryParse<ObjectStoreUse>(serviceOption.ObjectStoreUse, out var parsedValue) && parsedValue == ObjectStoreUse.MinIO)
|
||||||
{
|
{
|
||||||
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse=serviceOption.ObjectStoreUse,MinIO=serviceOption.MinIO});
|
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse=serviceOption.ObjectStoreUse,MinIO=serviceOption.MinIO, AWS = serviceOption.AWS });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse = serviceOption.ObjectStoreUse, MinIO = serviceOption.MinIO });
|
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse = serviceOption.ObjectStoreUse, MinIO = serviceOption.MinIO, AWS = serviceOption.AWS });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -566,7 +566,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
templateFileStream.Seek(0, SeekOrigin.Begin);
|
templateFileStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
|
||||||
var ossRelativePath = oSSService.UploadToOSS(fileStream, "InspectionUpload/Check", realFileName);
|
var ossRelativePath = await oSSService.UploadToOSSAsync(fileStream, "InspectionUpload/Check", realFileName);
|
||||||
|
|
||||||
await _repository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId });
|
await _repository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId });
|
||||||
|
|
||||||
@@ -997,7 +997,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_TemplateUploadData"));
|
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_TemplateUploadData"));
|
||||||
}
|
}
|
||||||
|
|
||||||
var ossRelativePath = oSSService.UploadToOSS(fileStream, "InspectionUpload/SiteSurvey", realFileName);
|
var ossRelativePath = await oSSService.UploadToOSSAsync(fileStream, "InspectionUpload/SiteSurvey", realFileName);
|
||||||
|
|
||||||
await _inspectionFileRepository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId });
|
await _inspectionFileRepository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId });
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<SignAssembly>false</SignAssembly>
|
<SignAssembly>false</SignAssembly>
|
||||||
<UserSecretsId>354572d4-9e15-4099-807c-63a2d29ff9f2</UserSecretsId>
|
<UserSecretsId>354572d4-9e15-4099-807c-63a2d29ff9f2</UserSecretsId>
|
||||||
<LangVersion>default</LangVersion>
|
<LangVersion>default</LangVersion>
|
||||||
@@ -69,12 +69,12 @@
|
|||||||
<PackageReference Include="EasyCaching.Serialization.MessagePack" Version="1.9.2">
|
<PackageReference Include="EasyCaching.Serialization.MessagePack" Version="1.9.2">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.6" />
|
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.7" />
|
||||||
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
|
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
|
||||||
<PackageReference Include="Hangfire.SqlServer" Version="1.8.6" />
|
<PackageReference Include="Hangfire.SqlServer" Version="1.8.7" />
|
||||||
<PackageReference Include="Invio.Extensions.Authentication.JwtBearer" Version="2.0.1" />
|
<PackageReference Include="Invio.Extensions.Authentication.JwtBearer" Version="2.0.1" />
|
||||||
<PackageReference Include="LogDashboard" Version="1.4.8" />
|
<PackageReference Include="LogDashboard" Version="1.4.8" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.10" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
|
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
|
||||||
|
|||||||
@@ -4,6 +4,34 @@
|
|||||||
<name>IRaCIS.Core.API</name>
|
<name>IRaCIS.Core.API</name>
|
||||||
</assembly>
|
</assembly>
|
||||||
<members>
|
<members>
|
||||||
|
<member name="M:EasyCaching.Demo.Interceptors.Controllers.ErrorController.Error(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
主要处理 前端404等错误 全局业务异常已统一处理了,非业务错误会来到这里
|
||||||
|
</summary>
|
||||||
|
<param name="code"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:IRaCIS.Api.Controllers.ExtraController">
|
||||||
|
<summary>
|
||||||
|
医生基本信息 、工作信息 专业信息、审核状态
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Api.Controllers.ExtraController.GetDoctorDetail(IRaCIS.Application.Interfaces.IAttachmentService,IRaCIS.Application.Interfaces.IDoctorService,IRaCIS.Application.Interfaces.IEducationService,IRaCIS.Application.Interfaces.ITrialExperienceService,IRaCIS.Application.Interfaces.IResearchPublicationService,IRaCIS.Application.Interfaces.IVacationService,System.Guid)">
|
||||||
|
<summary>
|
||||||
|
获取医生详情
|
||||||
|
</summary>
|
||||||
|
<param name="attachmentService"></param>
|
||||||
|
<param name="_doctorService"></param>
|
||||||
|
<param name="_educationService"></param>
|
||||||
|
<param name="_trialExperienceService"></param>
|
||||||
|
<param name="_researchPublicationService"></param>
|
||||||
|
<param name="_vacationService"></param>
|
||||||
|
<param name="doctorId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Api.Controllers.ExtraController.Login(IRaCIS.Application.Contracts.UserLoginDTO,EasyCaching.Core.IEasyCachingProvider,IRaCIS.Application.Services.IUserService,IRaCIS.Core.Application.Auth.ITokenService,IRaCIS.Core.Application.Contracts.IReadingImageTaskService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||||
|
<summary> 系统用户登录接口[New] </summary>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.API.Controllers.Special.FinancialChangeController.AddOrUpdateTrialInspection(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Application.Contracts.TrialCommand})">
|
<member name="M:IRaCIS.Core.API.Controllers.Special.FinancialChangeController.AddOrUpdateTrialInspection(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Application.Contracts.TrialCommand})">
|
||||||
<summary> 添加实验项目-返回新增Id[AUTH]</summary>
|
<summary> 添加实验项目-返回新增Id[AUTH]</summary>
|
||||||
<returns>新记录Id</returns>
|
<returns>新记录Id</returns>
|
||||||
@@ -345,27 +373,6 @@
|
|||||||
<param name="memberSerialization">序列化成员</param>
|
<param name="memberSerialization">序列化成员</param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Api.Controllers.ExtraController">
|
|
||||||
<summary>
|
|
||||||
医生基本信息 、工作信息 专业信息、审核状态
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Api.Controllers.ExtraController.GetDoctorDetail(IRaCIS.Application.Interfaces.IAttachmentService,IRaCIS.Application.Interfaces.IDoctorService,IRaCIS.Application.Interfaces.IEducationService,IRaCIS.Application.Interfaces.ITrialExperienceService,IRaCIS.Application.Interfaces.IResearchPublicationService,IRaCIS.Application.Interfaces.IVacationService,System.Guid)">
|
|
||||||
<summary>
|
|
||||||
获取医生详情
|
|
||||||
</summary>
|
|
||||||
<param name="attachmentService"></param>
|
|
||||||
<param name="_doctorService"></param>
|
|
||||||
<param name="_educationService"></param>
|
|
||||||
<param name="_trialExperienceService"></param>
|
|
||||||
<param name="_researchPublicationService"></param>
|
|
||||||
<param name="_vacationService"></param>
|
|
||||||
<param name="doctorId"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Api.Controllers.ExtraController.Login(IRaCIS.Application.Contracts.UserLoginDTO,EasyCaching.Core.IEasyCachingProvider,IRaCIS.Application.Services.IUserService,IRaCIS.Core.Application.Auth.ITokenService,Microsoft.Extensions.Configuration.IConfiguration)">
|
|
||||||
<summary> 系统用户登录接口[New] </summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.WX.CoreApi.Auth.AuthMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext)">
|
<member name="M:IRaCIS.WX.CoreApi.Auth.AuthMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext)">
|
||||||
<summary>
|
<summary>
|
||||||
为了前端 一段时间无操作,需要重新登陆
|
为了前端 一段时间无操作,需要重新登陆
|
||||||
@@ -373,13 +380,6 @@
|
|||||||
<param name="httpContext"></param>
|
<param name="httpContext"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:EasyCaching.Demo.Interceptors.Controllers.ErrorController.Error(System.Int32)">
|
|
||||||
<summary>
|
|
||||||
主要处理 前端404等错误 全局业务异常已统一处理了,非业务错误会来到这里
|
|
||||||
</summary>
|
|
||||||
<param name="code"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:ZhaoXi._001.NET5Demo.Practice.WebApi.Utility.Jwt.CustomHSJWTService">
|
<member name="T:ZhaoXi._001.NET5Demo.Practice.WebApi.Utility.Jwt.CustomHSJWTService">
|
||||||
<summary>
|
<summary>
|
||||||
对称可逆加密
|
对称可逆加密
|
||||||
|
|||||||
@@ -74,16 +74,10 @@ if (urlsIndex > -1)
|
|||||||
|
|
||||||
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
|
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
|
||||||
|
|
||||||
|
builder.Configuration.AddJsonFile("appsettings.json", false, true)
|
||||||
|
.AddJsonFile($"appsettings.{enviromentName}.json", false, true);
|
||||||
|
|
||||||
builder.Host
|
builder.Host
|
||||||
.ConfigureAppConfiguration((hostContext, config) =>
|
|
||||||
{
|
|
||||||
|
|
||||||
//Console.WriteLine(hostContext.HostingEnvironment.EnvironmentName);
|
|
||||||
config.AddJsonFile("appsettings.json", false, true)
|
|
||||||
.AddJsonFile($"appsettings.{enviromentName}.json", false, true);
|
|
||||||
})
|
|
||||||
.UseServiceProviderFactory(new AutofacServiceProviderFactory())
|
.UseServiceProviderFactory(new AutofacServiceProviderFactory())
|
||||||
.ConfigureContainer<ContainerBuilder>(containerBuilder =>
|
.ConfigureContainer<ContainerBuilder>(containerBuilder =>
|
||||||
{
|
{
|
||||||
@@ -247,15 +241,11 @@ app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
|
|||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
|
app.MapControllers();
|
||||||
|
|
||||||
app.UseEndpoints(endpoints =>
|
app.MapHub<UploadHub>("/UploadHub");
|
||||||
{
|
app.MapHealthChecks("/health");
|
||||||
endpoints.MapControllers();
|
|
||||||
|
|
||||||
endpoints.MapHub<UploadHub>("/UploadHub");
|
|
||||||
|
|
||||||
endpoints.MapHealthChecks("/health");
|
|
||||||
});
|
|
||||||
|
|
||||||
// Serilog
|
// Serilog
|
||||||
SerilogExtension.AddSerilogSetup(enviromentName, app.Services);
|
SerilogExtension.AddSerilogSetup(enviromentName, app.Services);
|
||||||
|
|||||||
@@ -52,7 +52,15 @@
|
|||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Prod_IRC"
|
"ASPNETCORE_ENVIRONMENT": "Prod_IRC"
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:6300"
|
"applicationUrl": "http://localhost:6100"
|
||||||
|
},
|
||||||
|
"IRaCIS.US_IRC": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "US_IRC"
|
||||||
|
},
|
||||||
|
"applicationUrl": "http://localhost:6100"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace IRaCIS.Core.API
|
|||||||
app.UseSerilogRequestLogging(opts
|
app.UseSerilogRequestLogging(opts
|
||||||
=>
|
=>
|
||||||
{
|
{
|
||||||
opts.MessageTemplate = "{TokenUserRealName} {TokenUserType} {ClientIp} {RequestIP} {Host} {Protocol} {RequestMethod} {RequestPath} {RequestBody} responded {StatusCode} in {Elapsed:0.0000} ms";
|
opts.MessageTemplate = "{TokenUserRealName} {TokenUserTypeShortName} {ClientIp} {LocalIP} {Host} {Protocol} {RequestMethod} {RequestPath} {RequestBody} responded {StatusCode} in {Elapsed:0.0000} ms";
|
||||||
opts.EnrichDiagnosticContext = SerilogHelper.EnrichFromRequest;
|
opts.EnrichDiagnosticContext = SerilogHelper.EnrichFromRequest;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using System;
|
using System;
|
||||||
@@ -20,7 +21,7 @@ namespace IRaCIS.Core.API
|
|||||||
diagnosticContext.Set("Host", request.Host);
|
diagnosticContext.Set("Host", request.Host);
|
||||||
|
|
||||||
//这种获取的Ip不准 配置服务才行
|
//这种获取的Ip不准 配置服务才行
|
||||||
diagnosticContext.Set("RequestIP", httpContext.Connection.RemoteIpAddress.ToString());
|
//diagnosticContext.Set("RequestIP", httpContext.Connection.RemoteIpAddress.ToString());
|
||||||
|
|
||||||
//这种方式可以,但是serilog提供了 就不用了
|
//这种方式可以,但是serilog提供了 就不用了
|
||||||
//diagnosticContext.Set("TestIP", httpContext.GetUserIp());
|
//diagnosticContext.Set("TestIP", httpContext.GetUserIp());
|
||||||
@@ -41,9 +42,9 @@ namespace IRaCIS.Core.API
|
|||||||
// Set the content-type of the Response at this point
|
// Set the content-type of the Response at this point
|
||||||
diagnosticContext.Set("ContentType", httpContext.Response.ContentType);
|
diagnosticContext.Set("ContentType", httpContext.Response.ContentType);
|
||||||
|
|
||||||
diagnosticContext.Set("TokenUserRealName", httpContext?.User?.FindFirst("realName")?.Value);
|
diagnosticContext.Set("TokenUserRealName", httpContext?.User?.FindFirst(JwtIRaCISClaimType.RealName)?.Value);
|
||||||
|
|
||||||
diagnosticContext.Set("TokenUserType", httpContext?.User?.FindFirst("userTypeEnumName")?.Value);
|
diagnosticContext.Set("TokenUserTypeShortName", httpContext?.User?.FindFirst(JwtIRaCISClaimType.UserTypeShortName)?.Value);
|
||||||
|
|
||||||
// Retrieve the IEndpointFeature selected for the request
|
// Retrieve the IEndpointFeature selected for the request
|
||||||
var endpoint = httpContext.GetEndpoint();
|
var endpoint = httpContext.GetEndpoint();
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace IRaCIS.Core.API
|
|||||||
public IStringLocalizer _localizer;
|
public IStringLocalizer _localizer;
|
||||||
public ApiResponseHandler(IOptionsMonitor<AuthenticationSchemeOptions> options,
|
public ApiResponseHandler(IOptionsMonitor<AuthenticationSchemeOptions> options,
|
||||||
IStringLocalizer localizer,
|
IStringLocalizer localizer,
|
||||||
ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock)
|
ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
|
||||||
{
|
{
|
||||||
_localizer = localizer;
|
_localizer = localizer;
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ namespace IRaCIS.Core.API
|
|||||||
triggerOptions.AddTrigger<TableQuestionRowTrigger>();
|
triggerOptions.AddTrigger<TableQuestionRowTrigger>();
|
||||||
//triggerOptions.AddTrigger<AddlTrialUserTrigger>();
|
//triggerOptions.AddTrigger<AddlTrialUserTrigger>();
|
||||||
triggerOptions.AddTrigger<VisitTaskIsFrontTaskNeedSignButNotSignTrigger>();
|
triggerOptions.AddTrigger<VisitTaskIsFrontTaskNeedSignButNotSignTrigger>();
|
||||||
|
triggerOptions.AddTrigger<VisitTaskIbeforeTrigger>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,29 +21,31 @@ namespace IRaCIS.Core.API
|
|||||||
.MinimumLevel.Override("Hangfire", LogEventLevel.Warning)
|
.MinimumLevel.Override("Hangfire", LogEventLevel.Warning)
|
||||||
.MinimumLevel.Override("System.Net.Http.HttpClient.HttpReports", LogEventLevel.Warning)
|
.MinimumLevel.Override("System.Net.Http.HttpClient.HttpReports", LogEventLevel.Warning)
|
||||||
.Enrich.WithClientIp()
|
.Enrich.WithClientIp()
|
||||||
|
|
||||||
.Enrich.FromLogContext()
|
.Enrich.FromLogContext()
|
||||||
|
.Filter.ByExcluding(logEvent =>logEvent.Properties.ContainsKey("RequestPath") && logEvent.Properties["RequestPath"].ToString().Contains("/health"))
|
||||||
|
|
||||||
//控制台 方便调试 问题 我们显示记录日志 时 获取上下文的ip 和用户名 用户类型
|
//控制台 方便调试 问题 我们显示记录日志 时 获取上下文的ip 和用户名 用户类型
|
||||||
.WriteTo.Console(restrictedToMinimumLevel: LogEventLevel.Warning,
|
.WriteTo.Console(restrictedToMinimumLevel: LogEventLevel.Warning,
|
||||||
outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3} ] {LocalIP} {ClientIp} {TokenUserRealName} {TokenUserType} {Message:lj} {Properties:j}{NewLine} {Exception}")
|
outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {SourceContext:l} || {Message} || {Exception} ||end {NewLine}")
|
||||||
|
|
||||||
.WriteTo.File($"{AppContext.BaseDirectory}Serilogs/.log", rollingInterval: RollingInterval.Day,
|
.WriteTo.File($"{AppContext.BaseDirectory}Serilogs/.log", rollingInterval: RollingInterval.Day,
|
||||||
outputTemplate: "{Timestamp:HH:mm:ss} || {Level} || {SourceContext:l} || {Message} ||{Exception} ||end {NewLine}");
|
outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {SourceContext:l} || {Message} || {Exception} ||end {NewLine}");
|
||||||
|
|
||||||
//.WriteTo.MSSqlServer("Data Source=DESKTOP-4TU9A6M;Initial Catalog=CoreFrame;User ID=sa;Password=123456", "logs", autoCreateSqlTable: true, restrictedToMinimumLevel: LogEventLevel.Information)//从左至右四个参数分别是数据库连接字符串、表名、如果表不存在是否创建、最低等级。Serilog会默认创建一些列。
|
//.WriteTo.MSSqlServer("Data Source=DESKTOP-4TU9A6M;Initial Catalog=CoreFrame;User ID=sa;Password=123456", "logs", autoCreateSqlTable: true, restrictedToMinimumLevel: LogEventLevel.Information)//从左至右四个参数分别是数据库连接字符串、表名、如果表不存在是否创建、最低等级。Serilog会默认创建一些列。
|
||||||
|
|
||||||
if (environment == "Production")
|
//if (environment == "Production")
|
||||||
{
|
//{
|
||||||
config.WriteTo.Email(new EmailConnectionInfo()
|
// config.WriteTo.Email(new EmailConnectionInfo()
|
||||||
{
|
// {
|
||||||
EmailSubject = "系统警告,请速速查看!",//邮件标题
|
// EmailSubject = "系统警告,请速速查看!",//邮件标题
|
||||||
FromEmail = "test@extimaging.com",//发件人邮箱
|
// FromEmail = "test@extimaging.com",//发件人邮箱
|
||||||
MailServer = "smtp.qiye.aliyun.com",//smtp服务器地址
|
// MailServer = "smtp.qiye.aliyun.com",//smtp服务器地址
|
||||||
NetworkCredentials = new NetworkCredential("test@extimaging.com", "SHzyyl2021"),//两个参数分别是发件人邮箱与客户端授权码
|
// NetworkCredentials = new NetworkCredential("test@extimaging.com", "SHzyyl2021"),//两个参数分别是发件人邮箱与客户端授权码
|
||||||
Port = 465,//端口号
|
// Port = 465,//端口号
|
||||||
ToEmail = "872297557@qq.com"//收件人
|
// ToEmail = "872297557@qq.com"//收件人
|
||||||
}, restrictedToMinimumLevel: LogEventLevel.Error,
|
// }, restrictedToMinimumLevel: LogEventLevel.Error,
|
||||||
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [ {Level} {ClientIp} {ClientAgent} {TokenUserRealName} {TokenUserType} ] || [path: {RequestPath} arguments: {RequestBody}] {SourceContext:l} || {Message} || {Exception} ||end {NewLine})");
|
// outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [ {Level} {ClientIp} {ClientAgent} {TokenUserRealName} {TokenUserType} ] || [path: {RequestPath} arguments: {RequestBody}] {SourceContext:l} || {Message} || {Exception} ||end {NewLine})");
|
||||||
}
|
//}
|
||||||
|
|
||||||
//扩展方法 获取上下文的ip 用户名 用户类型
|
//扩展方法 获取上下文的ip 用户名 用户类型
|
||||||
Log.Logger = config.Enrich.WithHttpContextInfo(serviceProvider).CreateLogger();
|
Log.Logger = config.Enrich.WithHttpContextInfo(serviceProvider).CreateLogger();
|
||||||
|
|||||||
@@ -7,8 +7,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"RemoteNew": "Server=101.132.193.237,1434;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
// "RemoteNew": "Server=47.117.165.18,1434;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||||
"Hangfire": "Server=101.132.193.237,1434;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
// "Hangfire": "Server=47.117.165.18,1434;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
||||||
|
"RemoteNew": "Server=prod_mssql_standard,1433;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||||
|
"Hangfire": "Server=prod_mssql_standard,1433;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
||||||
},
|
},
|
||||||
"ObjectStoreService": {
|
"ObjectStoreService": {
|
||||||
"ObjectStoreUse": "AliyunOSS",
|
"ObjectStoreUse": "AliyunOSS",
|
||||||
@@ -51,6 +53,4 @@
|
|||||||
"AuthorizationCode": "ExtImg@2022",
|
"AuthorizationCode": "ExtImg@2022",
|
||||||
"SiteUrl": "http://irc.extimaging.com/login"
|
"SiteUrl": "http://irc.extimaging.com/login"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
"AliyunOSS": {
|
"AliyunOSS": {
|
||||||
"regionId": "cn-shanghai",
|
"regionId": "cn-shanghai",
|
||||||
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"endPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
"bucketName": "zy-irc-test-store",
|
"bucketName": "zy-irc-test-store",
|
||||||
@@ -28,12 +28,22 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"MinIO": {
|
"MinIO": {
|
||||||
"endpoint": "http://192.168.3.68",
|
"endPoint": "192.168.3.68",
|
||||||
"port": "8001",
|
"port": "8001",
|
||||||
"useSSL": false,
|
"useSSL": false,
|
||||||
"accessKey": "IDFkwEpWej0b4DtiuThL",
|
"accessKey": "IDFkwEpWej0b4DtiuThL",
|
||||||
"secretKey": "Lhuu83yMhVwu7c1SnjvGY6lq74jzpYqifK6Qtj4h",
|
"secretKey": "Lhuu83yMhVwu7c1SnjvGY6lq74jzpYqifK6Qtj4h",
|
||||||
"bucketName": "test"
|
"bucketName": "test",
|
||||||
|
"viewEndpoint": "http://192.168.3.68:8001/test/"
|
||||||
|
},
|
||||||
|
|
||||||
|
"AWS": {
|
||||||
|
"endPoint": "s3.us-east-1.amazonaws.com",
|
||||||
|
"useSSL": true,
|
||||||
|
"accessKey": "AKIAZQ3DRSOHFPJJ6FEU",
|
||||||
|
"secretKey": "l+yjtvV7Z4jiwm/7xCYv30UeUj/SvuqqYzAwjJHf",
|
||||||
|
"bucketName": "ei-irc-test-store",
|
||||||
|
"viewEndpoint": "https://ei-irc-test-store.s3.amazonaws.com/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft": "Warning",
|
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"RemoteNew": "Server=47.90.161.85,1433\\MSSQLSERVER;Database=IRaCIS_Demo_US;User ID=sa;Password=zhanying2021;TrustServerCertificate=true",
|
|
||||||
"Hangfire": "Server=47.90.161.85,1433\\MSSQLSERVER;Database=Hangfire.IRaCIS_Demo_US;User ID=sa;Password=zhanying2021;TrustServerCertificate=true"
|
|
||||||
|
|
||||||
},
|
|
||||||
"BasicSystemConfig": {
|
|
||||||
|
|
||||||
"OpenUserComplexPassword": false,
|
|
||||||
|
|
||||||
"OpenSignDocumentBeforeWork": false,
|
|
||||||
|
|
||||||
"OpenTrialRelationDelete": true,
|
|
||||||
|
|
||||||
"OpenLoginLimit": false,
|
|
||||||
|
|
||||||
"LoginMaxFailCount": 5,
|
|
||||||
|
|
||||||
"LoginFailLockMinutes": 30
|
|
||||||
},
|
|
||||||
|
|
||||||
"SystemEmailSendConfig": {
|
|
||||||
"Port": 465,
|
|
||||||
"Host": "smtp.qiye.aliyun.com",
|
|
||||||
"FromEmail": "test@extimaging.com",
|
|
||||||
"FromName": "Test_IRC",
|
|
||||||
"AuthorizationCode": "SHzyyl2021"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"RemoteNew": "Server=us-mssql-service,1433;Database=Prod_US_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
"Hangfire": "Server=us-mssql-service,1433;Database=Prod_US_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
|
||||||
|
//"RemoteNew": "Server=44.218.11.19,1435;Database=Prod_US_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
//"Hangfire": "Server=44.218.11.19,1435;Database=Prod_US_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ObjectStoreService": {
|
||||||
|
|
||||||
|
"ObjectStoreUse": "AWS",
|
||||||
|
|
||||||
|
"AliyunOSS": {
|
||||||
|
"regionId": "cn-shanghai",
|
||||||
|
"endPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
|
"bucketName": "zy-irc-test-store",
|
||||||
|
"roleArn": "acs:ram::1899121822495495:role/oss-upload",
|
||||||
|
"viewEndpoint": "https://zy-irc-test-store.oss-cn-shanghai.aliyuncs.com",
|
||||||
|
"region": "oss-cn-shanghai"
|
||||||
|
},
|
||||||
|
|
||||||
|
"MinIO": {
|
||||||
|
"endPoint": "192.168.3.68",
|
||||||
|
"port": "8001",
|
||||||
|
"useSSL": false,
|
||||||
|
"accessKey": "IDFkwEpWej0b4DtiuThL",
|
||||||
|
"secretKey": "Lhuu83yMhVwu7c1SnjvGY6lq74jzpYqifK6Qtj4h",
|
||||||
|
"bucketName": "test",
|
||||||
|
"viewEndpoint": "http://192.168.3.68:8001/test/"
|
||||||
|
},
|
||||||
|
|
||||||
|
"AWS": {
|
||||||
|
"endPoint": "s3.us-east-1.amazonaws.com",
|
||||||
|
"useSSL": true,
|
||||||
|
"accessKey": "AKIAZQ3DRSOHFPJJ6FEU",
|
||||||
|
"secretKey": "l+yjtvV7Z4jiwm/7xCYv30UeUj/SvuqqYzAwjJHf",
|
||||||
|
"bucketName": "ei-irc-test-store",
|
||||||
|
"viewEndpoint": "https://ei-irc-test-store.s3.amazonaws.com/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BasicSystemConfig": {
|
||||||
|
|
||||||
|
"OpenUserComplexPassword": false,
|
||||||
|
|
||||||
|
"OpenSignDocumentBeforeWork": false,
|
||||||
|
|
||||||
|
"OpenTrialRelationDelete": true,
|
||||||
|
|
||||||
|
"OpenLoginLimit": false,
|
||||||
|
|
||||||
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
|
"LoginFailLockMinutes": 30
|
||||||
|
},
|
||||||
|
|
||||||
|
"SystemEmailSendConfig": {
|
||||||
|
"Port": 465,
|
||||||
|
"Host": "smtp.qiye.aliyun.com",
|
||||||
|
"FromEmail": "test@extimaging.com",
|
||||||
|
"FromName": "Test_IRC",
|
||||||
|
"AuthorizationCode": "SHzyyl2021"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!/Best Regards</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best Regards</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!/Best Regards</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best Regards</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!/Best Regards</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best Regards</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!/Best Regards</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best Regards</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!/Best Regards</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best Regards</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!/Best Regards</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best Regards</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!/Best Regards</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best Regards</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!/Best Regards</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best Regards</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best Regards</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ public static class ExcelExportHelper
|
|||||||
IgnoreTemplateParameterMissing = true,
|
IgnoreTemplateParameterMissing = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
await MiniExcel.SaveAsByTemplateAsync(memoryStream, tplPath, translateData, config);
|
await MiniExcel.SaveAsByTemplateAsync(memoryStream, templateStream.ToArray(), translateData, config);
|
||||||
|
|
||||||
memoryStream.Seek(0, SeekOrigin.Begin);
|
memoryStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ using IRaCIS.Core.Application.Contracts;
|
|||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using Minio.DataModel.Args;
|
||||||
|
using Minio;
|
||||||
using NPOI.HPSF;
|
using NPOI.HPSF;
|
||||||
using SharpCompress.Common;
|
using SharpCompress.Common;
|
||||||
using System;
|
using System;
|
||||||
@@ -13,17 +15,24 @@ using System.Linq;
|
|||||||
using System.Security.AccessControl;
|
using System.Security.AccessControl;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using SkiaSharp;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Helper
|
namespace IRaCIS.Core.Application.Helper
|
||||||
{
|
{
|
||||||
public class MinIOOptions
|
public class MinIOOptions : AWSOptions
|
||||||
{
|
{
|
||||||
public string endpoint { get; set; }
|
public int port { get; set; }
|
||||||
public string port { get; set; }
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AWSOptions
|
||||||
|
{
|
||||||
|
public string endPoint { get; set; }
|
||||||
public bool useSSL { get; set; }
|
public bool useSSL { get; set; }
|
||||||
public string accessKey { get; set; }
|
public string accessKey { get; set; }
|
||||||
public string secretKey { get; set; }
|
public string secretKey { get; set; }
|
||||||
public string bucketName { get; set; }
|
public string bucketName { get; set; }
|
||||||
|
public string viewEndpoint { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AliyunOSSOptions
|
public class AliyunOSSOptions
|
||||||
@@ -48,6 +57,8 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
public AliyunOSSOptions AliyunOSS { get; set; }
|
public AliyunOSSOptions AliyunOSS { get; set; }
|
||||||
public MinIOOptions MinIO { get; set; }
|
public MinIOOptions MinIO { get; set; }
|
||||||
|
|
||||||
|
public AWSOptions AWS { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ObjectStoreDTO
|
public class ObjectStoreDTO
|
||||||
@@ -58,6 +69,8 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
|
|
||||||
public MinIOOptions MinIO { get; set; }
|
public MinIOOptions MinIO { get; set; }
|
||||||
|
|
||||||
|
public AWSOptions AWS { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AliyunOSSTempToken
|
public class AliyunOSSTempToken
|
||||||
@@ -81,39 +94,26 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
AWS = 2,
|
AWS = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface IOSSService
|
public interface IOSSService
|
||||||
{
|
{
|
||||||
public string UploadToOSS(Stream fileStream, string oosFolderPath, string fileRealName);
|
public Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName);
|
||||||
public string UploadToOSS(string localFilePath, string oosFolderPath);
|
public Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath);
|
||||||
|
|
||||||
public void DownLoadFromOSS(string ossRelativePath, string localFilePath);
|
public Task DownLoadFromOSSAsync(string ossRelativePath, string localFilePath);
|
||||||
|
|
||||||
public AliyunOSSOptions _OSSConfig { get; set; }
|
public ObjectStoreServiceOptions ObjectStoreServiceOptions { get; set; }
|
||||||
|
|
||||||
public OssClient _ossClient { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class OSSService : IOSSService
|
public class OSSService : IOSSService
|
||||||
{
|
{
|
||||||
|
public ObjectStoreServiceOptions ObjectStoreServiceOptions { get; set; }
|
||||||
public AliyunOSSOptions _OSSConfig { get; set; }
|
|
||||||
|
|
||||||
public OssClient _ossClient { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public OSSService(IOptionsMonitor<ObjectStoreServiceOptions> options)
|
public OSSService(IOptionsMonitor<ObjectStoreServiceOptions> options)
|
||||||
{
|
{
|
||||||
var ossOptions = options.CurrentValue;
|
ObjectStoreServiceOptions = options.CurrentValue;
|
||||||
|
|
||||||
_OSSConfig = ossOptions.AliyunOSS;
|
|
||||||
|
|
||||||
_ossClient = new OssClient(_OSSConfig.endPoint, _OSSConfig.accessKeyId, _OSSConfig.accessKeySecret);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -123,14 +123,13 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
/// <param name="oosFolderPath"></param>
|
/// <param name="oosFolderPath"></param>
|
||||||
/// <param name="fileRealName"></param>
|
/// <param name="fileRealName"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
public async Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName)
|
||||||
public string UploadToOSS(Stream fileStream, string oosFolderPath,string fileRealName)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
var ossRelativePath = oosFolderPath + "/" + fileRealName;
|
|
||||||
|
|
||||||
try
|
var ossRelativePath = $"{oosFolderPath}/{Guid.NewGuid()}_{fileRealName}";
|
||||||
{
|
//var ossRelativePath = oosFolderPath + "/" + fileRealName;
|
||||||
|
|
||||||
using (var memoryStream = new MemoryStream())
|
using (var memoryStream = new MemoryStream())
|
||||||
{
|
{
|
||||||
fileStream.Seek(0, SeekOrigin.Begin);
|
fileStream.Seek(0, SeekOrigin.Begin);
|
||||||
@@ -139,19 +138,65 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
|
|
||||||
memoryStream.Seek(0, SeekOrigin.Begin);
|
memoryStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
|
||||||
|
if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS")
|
||||||
|
{
|
||||||
|
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
|
||||||
|
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 上传文件
|
// 上传文件
|
||||||
var result = _ossClient.PutObject(_OSSConfig.bucketName, ossRelativePath, memoryStream);
|
var result = _ossClient.PutObject(aliConfig.bucketName, ossRelativePath, memoryStream);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO")
|
||||||
|
{
|
||||||
|
var minIOConfig = ObjectStoreServiceOptions.MinIO;
|
||||||
|
|
||||||
|
|
||||||
|
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.endPoint}:{minIOConfig.port}")
|
||||||
|
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
var putObjectArgs = new PutObjectArgs()
|
||||||
|
.WithBucket(minIOConfig.bucketName)
|
||||||
|
.WithObject(ossRelativePath)
|
||||||
|
.WithStreamData(memoryStream)
|
||||||
|
.WithObjectSize(memoryStream.Length);
|
||||||
|
|
||||||
|
await minioClient.PutObjectAsync(putObjectArgs);
|
||||||
|
}
|
||||||
|
else if (ObjectStoreServiceOptions.ObjectStoreUse == "AWS")
|
||||||
|
{
|
||||||
|
var minIOConfig = ObjectStoreServiceOptions.AWS;
|
||||||
|
|
||||||
|
|
||||||
|
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.endPoint}")
|
||||||
|
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
var putObjectArgs = new PutObjectArgs()
|
||||||
|
.WithBucket(minIOConfig.bucketName)
|
||||||
|
.WithObject(ossRelativePath)
|
||||||
|
.WithStreamData(memoryStream)
|
||||||
|
.WithObjectSize(memoryStream.Length);
|
||||||
|
|
||||||
|
await minioClient.PutObjectAsync(putObjectArgs);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("未定义的存储介质类型");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return "/" + ossRelativePath;
|
return "/" + ossRelativePath;
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
throw new BusinessValidationFailedException("oss上传失败" + ex.Message);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
/// oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
||||||
@@ -160,32 +205,81 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
/// <param name="oosFolderPath"></param>
|
/// <param name="oosFolderPath"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
public string UploadToOSS(string localFilePath, string oosFolderPath)
|
public async Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath)
|
||||||
{
|
{
|
||||||
var localFileName = Path.GetFileName(localFilePath);
|
var localFileName = Path.GetFileName(localFilePath);
|
||||||
|
|
||||||
var ossRelativePath = oosFolderPath + "/" + localFileName;
|
var ossRelativePath = $"{oosFolderPath}/{Guid.NewGuid()}_{localFileName}";
|
||||||
|
|
||||||
|
//var ossRelativePath = oosFolderPath + "/" + localFileName;
|
||||||
|
|
||||||
|
|
||||||
try
|
if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS")
|
||||||
{
|
{
|
||||||
|
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
|
||||||
|
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
// 上传文件
|
// 上传文件
|
||||||
var result = _ossClient.PutObject(_OSSConfig.bucketName, ossRelativePath, localFilePath);
|
var result = _ossClient.PutObject(aliConfig.bucketName, ossRelativePath, localFilePath);
|
||||||
|
|
||||||
return ossRelativePath;
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO")
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("oss上传失败" + ex.Message);
|
var minIOConfig = ObjectStoreServiceOptions.MinIO;
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DownLoadFromOSS(string ossRelativePath, string localFilePath)
|
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.endPoint}:{minIOConfig.port}")
|
||||||
|
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
var putObjectArgs = new PutObjectArgs()
|
||||||
|
.WithBucket(minIOConfig.bucketName)
|
||||||
|
.WithObject(ossRelativePath)
|
||||||
|
.WithFileName(localFilePath);
|
||||||
|
|
||||||
|
await minioClient.PutObjectAsync(putObjectArgs);
|
||||||
|
}
|
||||||
|
else if (ObjectStoreServiceOptions.ObjectStoreUse == "AWS")
|
||||||
{
|
{
|
||||||
|
var minIOConfig = ObjectStoreServiceOptions.AWS;
|
||||||
|
|
||||||
|
|
||||||
|
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.endPoint}")
|
||||||
|
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
var putObjectArgs = new PutObjectArgs()
|
||||||
|
.WithBucket(minIOConfig.bucketName)
|
||||||
|
.WithObject(ossRelativePath)
|
||||||
|
.WithFileName(localFilePath);
|
||||||
|
|
||||||
|
await minioClient.PutObjectAsync(putObjectArgs);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("未定义的存储介质类型");
|
||||||
|
}
|
||||||
|
return "/" + ossRelativePath;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task DownLoadFromOSSAsync(string ossRelativePath, string localFilePath)
|
||||||
|
{
|
||||||
|
|
||||||
|
ossRelativePath = ossRelativePath.TrimStart('/');
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var result = _ossClient.GetObject(_OSSConfig.bucketName, ossRelativePath);
|
|
||||||
|
|
||||||
|
if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS")
|
||||||
|
{
|
||||||
|
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
|
||||||
|
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
|
// 上传文件
|
||||||
|
var result = _ossClient.GetObject(aliConfig.bucketName, ossRelativePath);
|
||||||
|
|
||||||
// 将下载的文件流保存到本地文件
|
// 将下载的文件流保存到本地文件
|
||||||
using (var fs = File.OpenWrite(localFilePath))
|
using (var fs = File.OpenWrite(localFilePath))
|
||||||
@@ -193,6 +287,43 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
result.Content.CopyTo(fs);
|
result.Content.CopyTo(fs);
|
||||||
fs.Close();
|
fs.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO")
|
||||||
|
{
|
||||||
|
var minIOConfig = ObjectStoreServiceOptions.MinIO;
|
||||||
|
|
||||||
|
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.endPoint}:{minIOConfig.port}")
|
||||||
|
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
var getObjectArgs = new GetObjectArgs()
|
||||||
|
.WithBucket(minIOConfig.bucketName)
|
||||||
|
.WithObject(ossRelativePath)
|
||||||
|
.WithFile(localFilePath);
|
||||||
|
|
||||||
|
await minioClient.GetObjectAsync(getObjectArgs);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (ObjectStoreServiceOptions.ObjectStoreUse == "AWS")
|
||||||
|
{
|
||||||
|
var minIOConfig = ObjectStoreServiceOptions.AWS;
|
||||||
|
|
||||||
|
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.endPoint}")
|
||||||
|
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
var getObjectArgs = new GetObjectArgs()
|
||||||
|
.WithBucket(minIOConfig.bucketName)
|
||||||
|
.WithObject(ossRelativePath)
|
||||||
|
.WithFile(localFilePath);
|
||||||
|
|
||||||
|
await minioClient.GetObjectAsync(getObjectArgs);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("未定义的存储介质类型");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -201,6 +332,9 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<LangVersion>default</LangVersion>
|
<LangVersion>default</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
||||||
<PackageReference Include="FreeSpire.Doc" Version="11.6.0" />
|
<PackageReference Include="FreeSpire.Doc" Version="11.6.0" />
|
||||||
<PackageReference Include="Hangfire.Core" Version="1.8.6" />
|
<PackageReference Include="Hangfire.Core" Version="1.8.7" />
|
||||||
<PackageReference Include="BeetleX.BNR" Version="1.0.1" />
|
<PackageReference Include="BeetleX.BNR" Version="1.0.1" />
|
||||||
<PackageReference Include="Castle.Core.AsyncInterceptor" Version="2.1.0" />
|
<PackageReference Include="Castle.Core.AsyncInterceptor" Version="2.1.0" />
|
||||||
<PackageReference Include="EasyCaching.Redis" Version="1.9.2" />
|
<PackageReference Include="EasyCaching.Redis" Version="1.9.2" />
|
||||||
@@ -74,8 +74,8 @@
|
|||||||
<PackageReference Include="ExcelDataReader.DataSet" Version="3.6.0" />
|
<PackageReference Include="ExcelDataReader.DataSet" Version="3.6.0" />
|
||||||
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
|
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
|
||||||
<PackageReference Include="DistributedLock.SqlServer" Version="1.0.3" />
|
<PackageReference Include="DistributedLock.SqlServer" Version="1.0.3" />
|
||||||
<PackageReference Include="fo-dicom" Version="5.1.1" />
|
<PackageReference Include="fo-dicom" Version="5.1.2" />
|
||||||
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.1.0" />
|
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.1.2" />
|
||||||
<PackageReference Include="fo-dicom.Codecs" Version="5.11.0" />
|
<PackageReference Include="fo-dicom.Codecs" Version="5.11.0" />
|
||||||
<PackageReference Include="Magicodes.IE.Core" Version="2.7.4.5" />
|
<PackageReference Include="Magicodes.IE.Core" Version="2.7.4.5" />
|
||||||
<PackageReference Include="Magicodes.IE.Csv" Version="2.7.4.5">
|
<PackageReference Include="Magicodes.IE.Csv" Version="2.7.4.5">
|
||||||
@@ -88,15 +88,15 @@
|
|||||||
<PackageReference Include="MailKit" Version="4.3.0" />
|
<PackageReference Include="MailKit" Version="4.3.0" />
|
||||||
<PackageReference Include="MediatR" Version="12.2.0" />
|
<PackageReference Include="MediatR" Version="12.2.0" />
|
||||||
<PackageReference Include="MimeKit" Version="4.3.0" />
|
<PackageReference Include="MimeKit" Version="4.3.0" />
|
||||||
<PackageReference Include="MiniExcel" Version="1.31.2" />
|
<PackageReference Include="MiniExcel" Version="1.31.3" />
|
||||||
<PackageReference Include="Minio" Version="6.0.1" />
|
<PackageReference Include="Minio" Version="6.0.1" />
|
||||||
<PackageReference Include="MiniWord" Version="0.7.0" />
|
<PackageReference Include="MiniWord" Version="0.7.0" />
|
||||||
<PackageReference Include="My.Extensions.Localization.Json" Version="3.0.0">
|
<PackageReference Include="My.Extensions.Localization.Json" Version="3.2.0">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NPOI" Version="2.6.2" />
|
<PackageReference Include="NPOI" Version="2.6.2" />
|
||||||
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.1" />
|
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.1" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.0" />
|
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.2" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.12" />
|
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.12" />
|
||||||
<PackageReference Include="WinSCP" Version="6.1.2" />
|
<PackageReference Include="WinSCP" Version="6.1.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<param name="type"></param>
|
<param name="type"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Helper.OSSService.UploadToOSS(System.IO.Stream,System.String,System.String)">
|
<member name="M:IRaCIS.Core.Application.Helper.OSSService.UploadToOSSAsync(System.IO.Stream,System.String,System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
||||||
</summary>
|
</summary>
|
||||||
@@ -92,9 +92,8 @@
|
|||||||
<param name="oosFolderPath"></param>
|
<param name="oosFolderPath"></param>
|
||||||
<param name="fileRealName"></param>
|
<param name="fileRealName"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Helper.OSSService.UploadToOSS(System.String,System.String)">
|
<member name="M:IRaCIS.Core.Application.Helper.OSSService.UploadToOSSAsync(System.String,System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
oosFolderPath 不要 "/ "开头 应该: TempFolder/ChildFolder
|
||||||
</summary>
|
</summary>
|
||||||
@@ -684,6 +683,32 @@
|
|||||||
InternationalizationService
|
InternationalizationService
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.InternationalizationService.GetFrontInternationalizationList">
|
||||||
|
<summary>
|
||||||
|
前端国际化内容接口
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.InternationalizationService.BatchAddOrUpdateFrontInternationalization(System.Collections.Generic.List{IRaCIS.Core.Application.ViewModel.BatchInternationalizationDto})">
|
||||||
|
<summary>
|
||||||
|
前端批量提交,后端判断不存在就添加,存在就更新
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.InternationalizationService.BatchAddInternationalization(IRaCIS.Core.Application.ViewModel.BatchAddInternationalization)">
|
||||||
|
<summary>
|
||||||
|
后端之前批量添加接口
|
||||||
|
</summary>
|
||||||
|
<param name="batchAdd"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.InternationalizationService.AddOrUpdateInternationalization(IRaCIS.Core.Application.ViewModel.InternationalizationAddOrEdit)">
|
||||||
|
<summary>
|
||||||
|
前后端添加的时候,区分了,前端判断重复多了多了一个路由 路由+标识唯一
|
||||||
|
</summary>
|
||||||
|
<param name="addOrEditInternationalization"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.PublishLogService">
|
<member name="T:IRaCIS.Core.Application.Service.PublishLogService">
|
||||||
<summary>
|
<summary>
|
||||||
PublishLogService
|
PublishLogService
|
||||||
@@ -997,6 +1022,11 @@
|
|||||||
阅读片人
|
阅读片人
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Inspection.DTO.GetDataInspectionDto.RoleName">
|
||||||
|
<summary>
|
||||||
|
角色
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Inspection.DTO.GetDataInspectionDto.IsSign">
|
<member name="P:IRaCIS.Core.Application.Service.Inspection.DTO.GetDataInspectionDto.IsSign">
|
||||||
<summary>
|
<summary>
|
||||||
是否有签名
|
是否有签名
|
||||||
@@ -1734,6 +1764,19 @@
|
|||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.CalculateTargetLesionStatus(IRaCIS.Core.Application.ViewModel.CalculateTargetLesionStatusInDto)">
|
||||||
|
<summary>
|
||||||
|
计算靶病灶状态
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetSplitPPdSum(IRaCIS.Core.Application.ViewModel.GetSplitPPdInDto)">
|
||||||
|
<summary>
|
||||||
|
获取分裂病灶的PPd之和 不包括当前的主病灶
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.AddTaskLesionAnswerFromLastTask(IRaCIS.Core.Application.ViewModel.AddTaskLesionAnswerFromLastTaskInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.AddTaskLesionAnswerFromLastTask(IRaCIS.Core.Application.ViewModel.AddTaskLesionAnswerFromLastTaskInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
将上一次的访视病灶添加到这一次
|
将上一次的访视病灶添加到这一次
|
||||||
@@ -1938,6 +1981,19 @@
|
|||||||
<param name="spleenLength"></param>
|
<param name="spleenLength"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetLowSpleenLength(IRaCIS.Core.Domain.Models.VisitTask)">
|
||||||
|
<summary>
|
||||||
|
获取最低垂直径
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetSplenicVerify(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
获取脾脏验证
|
||||||
|
</summary>
|
||||||
|
<param name="visitTaskId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetSplenicEvaluation(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetSplenicEvaluation(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取脾脏评估
|
获取脾脏评估
|
||||||
@@ -1952,6 +2008,13 @@
|
|||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetPET5PSRemark(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||||
|
<summary>
|
||||||
|
获取PET5PS评分备注
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetUptakeChange(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetUptakeChange(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||||
<summary>
|
<summary>
|
||||||
与基线相比摄取值变化
|
与基线相比摄取值变化
|
||||||
@@ -6652,6 +6715,11 @@
|
|||||||
限制编辑
|
限制编辑
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.LimitShow">
|
||||||
|
<summary>
|
||||||
|
限制显示
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.MaxAnswerLength">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.MaxAnswerLength">
|
||||||
<summary>
|
<summary>
|
||||||
最大答案长度
|
最大答案长度
|
||||||
@@ -6740,6 +6808,11 @@
|
|||||||
限制编辑
|
限制编辑
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.LimitShow">
|
||||||
|
<summary>
|
||||||
|
限制显示
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.MaxAnswerLength">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.MaxAnswerLength">
|
||||||
<summary>
|
<summary>
|
||||||
最大答案长度
|
最大答案长度
|
||||||
@@ -7103,6 +7176,11 @@
|
|||||||
限制编辑
|
限制编辑
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.LimitShow">
|
||||||
|
<summary>
|
||||||
|
限制显示
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.MaxAnswerLength">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.MaxAnswerLength">
|
||||||
<summary>
|
<summary>
|
||||||
最大答案长度
|
最大答案长度
|
||||||
@@ -7163,6 +7241,11 @@
|
|||||||
限制编辑
|
限制编辑
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.LimitShow">
|
||||||
|
<summary>
|
||||||
|
限制显示
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.MaxAnswerLength">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.MaxAnswerLength">
|
||||||
<summary>
|
<summary>
|
||||||
最大答案长度
|
最大答案长度
|
||||||
@@ -7508,6 +7591,11 @@
|
|||||||
限制编辑
|
限制编辑
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.LimitShow">
|
||||||
|
<summary>
|
||||||
|
限制显示
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.MaxAnswerLength">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.MaxAnswerLength">
|
||||||
<summary>
|
<summary>
|
||||||
最大答案长度
|
最大答案长度
|
||||||
@@ -7853,6 +7941,11 @@
|
|||||||
限制编辑
|
限制编辑
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.LimitShow">
|
||||||
|
<summary>
|
||||||
|
限制显示
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.MaxAnswerLength">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.MaxAnswerLength">
|
||||||
<summary>
|
<summary>
|
||||||
最大答案长度
|
最大答案长度
|
||||||
@@ -12007,6 +12100,27 @@
|
|||||||
因为可能先一致性核查通过,生成其他标准的任务了,新签名的标准也需要产生任务
|
因为可能先一致性核查通过,生成其他标准的任务了,新签名的标准也需要产生任务
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Triggers.VisitTaskIbeforeTrigger.AfterSave(EntityFrameworkCore.Triggered.ITriggerContext{IRaCIS.Core.Domain.Models.VisitTask},System.Threading.CancellationToken)">
|
||||||
|
<summary>
|
||||||
|
因为维护状态先后顺序导致 裁判任务关联的 任务上的JudgeVisitTaskId==nulll 在这里需要重新设置下
|
||||||
|
|
||||||
|
比如: 申请裁判任务重阅,事务里面本来设置了任务上的裁判id,但是因为下面的逻辑,导致设置的值又被清理了,只能重新设置下
|
||||||
|
</summary>
|
||||||
|
<param name="context"></param>
|
||||||
|
<param name="cancellationToken"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Triggers.VisitTaskIbeforeTrigger.BeforeSave(EntityFrameworkCore.Triggered.ITriggerContext{IRaCIS.Core.Domain.Models.VisitTask},System.Threading.CancellationToken)">
|
||||||
|
<summary>
|
||||||
|
比如 两个任务产生了裁判,然后其中一个人申请了重阅,影响了裁判,需要清理之前任务的上裁判id
|
||||||
|
|
||||||
|
|
||||||
|
因为申请重阅,退回,里面分有序,无序,情况太多,所以不在那块逻辑修改,不然得加多个地方处理,在这里统一处理
|
||||||
|
</summary>
|
||||||
|
<param name="context"></param>
|
||||||
|
<param name="cancellationToken"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Triggers.VisitTaskIsFrontTaskNeedSignButNotSignTrigger">
|
<member name="T:IRaCIS.Core.Application.Triggers.VisitTaskIsFrontTaskNeedSignButNotSignTrigger">
|
||||||
<summary>
|
<summary>
|
||||||
维护 IsFrontTaskNeedSignButNotSign 字段 另外附加评估结果
|
维护 IsFrontTaskNeedSignButNotSign 字段 另外附加评估结果
|
||||||
@@ -13289,7 +13403,7 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SplitLesion(IRaCIS.Core.Application.Service.Reading.Dto.SplitLesionInDto)">
|
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SplitLesion(IRaCIS.Core.Application.Service.Reading.Dto.SplitLesionInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
拆分病灶
|
拆分病灶 分裂病灶
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
@@ -13362,6 +13476,12 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.ResetReadingRestTime(System.Nullable{System.Guid})">
|
||||||
|
<summary>
|
||||||
|
重置阅片时间 登录和解锁调用
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SubmitTaskChangeState(System.Guid)">
|
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SubmitTaskChangeState(System.Guid)">
|
||||||
<summary>
|
<summary>
|
||||||
签名提交任务修改状态
|
签名提交任务修改状态
|
||||||
@@ -13901,18 +14021,18 @@
|
|||||||
<param name="outEnrollTime"></param>
|
<param name="outEnrollTime"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.TestService.OldLocalImageResizeJpg(IRaCIS.Core.Application.Helper.IOSSService,IRaCIS.Core.Infra.EFCore.IRepository,Microsoft.AspNetCore.Hosting.IWebHostEnvironment)">
|
|
||||||
<summary>
|
|
||||||
维护OSS 影像数据
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.TestService.ModifyClinicalDataTable">
|
<member name="M:IRaCIS.Application.Services.TestService.ModifyClinicalDataTable">
|
||||||
<summary>
|
<summary>
|
||||||
维护临床数据 --一定要在同步表前同步数据才行
|
维护临床数据 --一定要在同步表前同步数据才行
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.TestService.OldLocalImageResizeJpg(IRaCIS.Core.Application.Helper.IOSSService,IRaCIS.Core.Infra.EFCore.IRepository,Microsoft.AspNetCore.Hosting.IWebHostEnvironment)">
|
||||||
|
<summary>
|
||||||
|
维护OSS 影像数据
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Application.Contracts.DoctorSearchDTO">
|
<member name="T:IRaCIS.Application.Contracts.DoctorSearchDTO">
|
||||||
<summary>
|
<summary>
|
||||||
Reviewer 列表查询参数
|
Reviewer 列表查询参数
|
||||||
|
|||||||
@@ -104,6 +104,12 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
public Guid? SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
|
public Guid? MedicalManagerUserId { get; set; }
|
||||||
|
|
||||||
|
public DateTime? BeginSignTime { get; set; }
|
||||||
|
public AuditAdvice? AuditAdviceEnum { get; set; }
|
||||||
|
|
||||||
|
public DateTime? EndSignTime { get; set; }
|
||||||
|
|
||||||
public bool IsGetBeRead { get; set; } = false;
|
public bool IsGetBeRead { get; set; } = false;
|
||||||
|
|
||||||
@@ -126,6 +132,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public ReadingTaskState? ReadingTaskState { get; set; }
|
public ReadingTaskState? ReadingTaskState { get; set; }
|
||||||
|
|
||||||
public Guid? TrialReadingCriterionId { get; set; }
|
public Guid? TrialReadingCriterionId { get; set; }
|
||||||
|
|
||||||
|
public MedicalReviewDoctorUserIdea? DoctorUserIdeaEnum { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -299,11 +299,12 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int UrgentCount { get; set; }
|
||||||
|
|
||||||
|
// public int UrgentCount => UnReadCanReadTaskList.Count(t => t.IsUrgent);
|
||||||
|
|
||||||
public int UrgentCount => UnReadCanReadTaskList.Count(t => t.IsUrgent);
|
public List<IRUnreadTaskView> UnReadCanReadTaskList { get; set; } = new List<IRUnreadTaskView>();
|
||||||
|
// public List<IRUnreadTaskView> UnReadCanReadTaskList => UnReadTaskList.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)).ToList();
|
||||||
public List<IRUnreadTaskView> UnReadCanReadTaskList => UnReadTaskList.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)).ToList();
|
|
||||||
|
|
||||||
public List<IRUnreadTaskView> UnReadTaskList { get; set; } = new List<IRUnreadTaskView>();
|
public List<IRUnreadTaskView> UnReadTaskList { get; set; } = new List<IRUnreadTaskView>();
|
||||||
}
|
}
|
||||||
@@ -369,6 +370,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Guid? SiteId { get; set; }
|
public Guid? SiteId { get; set; }
|
||||||
|
|
||||||
public Guid? SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
@@ -391,6 +393,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
public DateTime? EndAllocateDate { get; set; }
|
public DateTime? EndAllocateDate { get; set; }
|
||||||
|
|
||||||
|
public DateTime? BeginSignTime { get; set; }
|
||||||
|
|
||||||
|
public DateTime? EndSignTime { get; set; }
|
||||||
|
|
||||||
public Guid? RootReReadingTaskId { get; set; }
|
public Guid? RootReReadingTaskId { get; set; }
|
||||||
|
|
||||||
public string? TaskCode { get; set; }
|
public string? TaskCode { get; set; }
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId)
|
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId)
|
||||||
.WhereIf(inQuery.SiteId != null, t => t.VisitTask.Subject.SiteId == inQuery.SiteId)
|
.WhereIf(inQuery.SiteId != null, t => t.VisitTask.Subject.SiteId == inQuery.SiteId)
|
||||||
|
.WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
|
||||||
.WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
|
.WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode))
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.VisitTask.TaskName.Contains(inQuery.TaskName) || t.VisitTask.TaskBlindName.Contains(inQuery.TaskName))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.VisitTask.TaskName.Contains(inQuery.TaskName) || t.VisitTask.TaskBlindName.Contains(inQuery.TaskName))
|
||||||
@@ -64,7 +65,12 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
||||||
.WhereIf(inQuery.TaskState != null, t => t.VisitTask.TaskState == inQuery.TaskState)
|
.WhereIf(inQuery.TaskState != null, t => t.VisitTask.TaskState == inQuery.TaskState)
|
||||||
.WhereIf(inQuery.AuditState != null, t => t.AuditState == inQuery.AuditState)
|
.WhereIf(inQuery.AuditState != null, t => t.AuditState == inQuery.AuditState)
|
||||||
|
.WhereIf(inQuery.MedicalManagerUserId != null, t => t.MedicalManagerUserId == inQuery.MedicalManagerUserId)
|
||||||
|
.WhereIf(inQuery.BeginSignTime != null, t => t.VisitTask.SignTime > inQuery.BeginSignTime)
|
||||||
|
.WhereIf(inQuery.EndSignTime != null, t => t.VisitTask.SignTime < inQuery.EndSignTime!.Value.AddDays(1))
|
||||||
|
.WhereIf(inQuery.AuditAdviceEnum != null, t => t.AuditAdviceEnum == inQuery.AuditAdviceEnum)
|
||||||
|
|
||||||
|
.WhereIf(inQuery.DoctorUserIdeaEnum != null, t => t.DoctorUserIdeaEnum == inQuery.DoctorUserIdeaEnum)
|
||||||
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||||
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
@@ -196,6 +202,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.WhereIf(inQuery.Id != null, t => t.Id != inQuery.Id)
|
.WhereIf(inQuery.Id != null, t => t.Id != inQuery.Id)
|
||||||
.WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent)
|
.WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent)
|
||||||
.WhereIf(inQuery.AuditState != null, t => t.AuditState == inQuery.AuditState)
|
.WhereIf(inQuery.AuditState != null, t => t.AuditState == inQuery.AuditState)
|
||||||
|
.WhereIf(inQuery.DoctorUserIdeaEnum != null, t => t.DoctorUserIdeaEnum == inQuery.DoctorUserIdeaEnum)
|
||||||
.WhereIf(inQuery.TaskState != null, t => t.VisitTask.TaskState == inQuery.TaskState)
|
.WhereIf(inQuery.TaskState != null, t => t.VisitTask.TaskState == inQuery.TaskState)
|
||||||
.WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId)
|
.WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId)
|
||||||
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository;
|
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository;
|
||||||
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
||||||
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
||||||
|
private readonly IRepository<ReadingOncologyTaskInfo> _readingOncologyTaskInfoRepository;
|
||||||
private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
||||||
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
||||||
private readonly IMapper _mapper;
|
private readonly IMapper _mapper;
|
||||||
@@ -60,6 +61,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
||||||
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
|
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
|
||||||
IRepository<ReadingTableQuestionAnswer> readingTableQuestionAnswerRepository,
|
IRepository<ReadingTableQuestionAnswer> readingTableQuestionAnswerRepository,
|
||||||
|
IRepository<ReadingOncologyTaskInfo> ReadingOncologyTaskInfoRepository,
|
||||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
||||||
IRepository<ReadingJudgeInfo> readingJudgeInfoRepository,
|
IRepository<ReadingJudgeInfo> readingJudgeInfoRepository,
|
||||||
@@ -76,6 +78,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
||||||
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
||||||
this._readingTableQuestionAnswerRepository = readingTableQuestionAnswerRepository;
|
this._readingTableQuestionAnswerRepository = readingTableQuestionAnswerRepository;
|
||||||
|
_readingOncologyTaskInfoRepository = ReadingOncologyTaskInfoRepository;
|
||||||
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
||||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||||
_provider = provider;
|
_provider = provider;
|
||||||
@@ -663,6 +666,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var isNeedClinicalDataSign = IsNeedClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList);
|
var isNeedClinicalDataSign = IsNeedClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList);
|
||||||
var isClinicalDataSign = IsClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList, subjectVisit.Id, trialId);
|
var isClinicalDataSign = IsClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList, subjectVisit.Id, trialId);
|
||||||
|
|
||||||
|
var isFrontTaskNeedSignButNotSign = await _visitTaskRepository.AnyAsync(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.VisitTaskNum < subjectVisit.VisitNum && t.IsNeedClinicalDataSign == true && t.IsClinicalDataSign == false);
|
||||||
|
|
||||||
if (visitNumList.IndexOf(subjectVisit.VisitNum) == 0)
|
if (visitNumList.IndexOf(subjectVisit.VisitNum) == 0)
|
||||||
{
|
{
|
||||||
@@ -689,7 +693,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
var existCurrentVisitTaskList = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId
|
var existCurrentVisitTaskList = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId
|
||||||
&& t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect
|
&& t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect
|
||||||
&& t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.SourceSubjectVisitId == subjectVisit.Id).ToList();
|
/* && t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null*/ && t.SourceSubjectVisitId == subjectVisit.Id).ToList();
|
||||||
|
|
||||||
VisitTask? task1 = null;
|
VisitTask? task1 = null;
|
||||||
VisitTask? task2 = null;
|
VisitTask? task2 = null;
|
||||||
@@ -719,7 +723,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
||||||
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
||||||
IsClinicalDataSign = isClinicalDataSign
|
IsClinicalDataSign = isClinicalDataSign,
|
||||||
|
IsFrontTaskNeedSignButNotSign = isFrontTaskNeedSignButNotSign
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -746,7 +751,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
||||||
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
||||||
IsClinicalDataSign = isClinicalDataSign
|
IsClinicalDataSign = isClinicalDataSign,
|
||||||
|
IsFrontTaskNeedSignButNotSign = isFrontTaskNeedSignButNotSign
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1068,7 +1074,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
||||||
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
||||||
IsClinicalDataSign = isClinicalDataSign
|
IsClinicalDataSign = isClinicalDataSign,
|
||||||
|
IsFrontTaskNeedSignButNotSign= isFrontTaskNeedSignButNotSign
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1602,10 +1609,11 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var oncologySubjectUser = await _subjectUserRepository.Where(x => x.SubjectId == item.SubjectId && x.ArmEnum == Arm.TumorArm && x.IsConfirmed && x.TrialReadingCriterionId == originalTaskInfo.TrialReadingCriterionId).FirstOrDefaultAsync();
|
var oncologySubjectUser = await _subjectUserRepository.Where(x => x.SubjectId == item.SubjectId && x.ArmEnum == Arm.TumorArm && x.IsConfirmed && x.TrialReadingCriterionId == originalTaskInfo.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
item.VisitNum = await _readModuleRepository.Where(x => x.Id == item.ReadModuleId).Select(x => x.SubjectVisit.VisitNum).FirstOrDefaultAsync();
|
item.VisitNum = await _readModuleRepository.Where(x => x.Id == item.ReadModuleId).Select(x => x.SubjectVisit.VisitNum).FirstOrDefaultAsync();
|
||||||
|
var id= NewId.NextGuid();
|
||||||
|
|
||||||
var singleTask = await _visitTaskRepository.AddAsync(new VisitTask()
|
var singleTask = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||||
{
|
{
|
||||||
|
Id= id,
|
||||||
TrialId = trialId,
|
TrialId = trialId,
|
||||||
SubjectId = item.SubjectId,
|
SubjectId = item.SubjectId,
|
||||||
IsUrgent = originalTaskInfo.IsUrgent,
|
IsUrgent = originalTaskInfo.IsUrgent,
|
||||||
@@ -1637,6 +1645,22 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||||
|
|
||||||
|
// 生成肿瘤学需要 肿瘤学阅片结果中基线,统一显示为NA
|
||||||
|
// 找到基线任务ID
|
||||||
|
var baseLineTaskId = await _visitTaskRepository.Where(x => x.TaskState == TaskState.Effect
|
||||||
|
&& x.ArmEnum == originalTaskInfo.ArmEnum && x.VisitTaskNum == 0
|
||||||
|
&& x.SubjectId== originalTaskInfo.SubjectId
|
||||||
|
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && x.TrialReadingCriterionId == originalTaskInfo.TrialReadingCriterionId).Select(x => x.Id).FirstNotNullAsync();
|
||||||
|
await _readingOncologyTaskInfoRepository.AddAsync(new ReadingOncologyTaskInfo()
|
||||||
|
{
|
||||||
|
EvaluationResult = "-1",
|
||||||
|
EvaluationReason=string.Empty,
|
||||||
|
OncologyTaskId = id,
|
||||||
|
VisitTaskId = baseLineTaskId,
|
||||||
|
SubjectId = originalTaskInfo.SubjectId,
|
||||||
|
TrialId = originalTaskInfo.TrialId
|
||||||
|
});
|
||||||
|
|
||||||
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -758,6 +758,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => (t.Subject.Code.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => (t.Subject.Code.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate))
|
||||||
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
|
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
|
||||||
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
|
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
|
||||||
|
.WhereIf(queryVisitTask.BeginSignTime != null, t => t.SignTime > queryVisitTask.BeginSignTime)
|
||||||
|
.WhereIf(queryVisitTask.EndSignTime != null, t => t.SignTime < queryVisitTask.EndSignTime!.Value.AddDays(1))
|
||||||
.ProjectTo<ReadingTaskView>(_mapper.ConfigurationProvider);
|
.ProjectTo<ReadingTaskView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId), nameof(VisitTask.VisitTaskNum) };
|
var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId), nameof(VisitTask.VisitTaskNum) };
|
||||||
@@ -835,10 +837,11 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
.Where(t => t.RequestReReadingType == RequestReReadingType.DocotorApply)
|
.Where(t => t.RequestReReadingType == RequestReReadingType.DocotorApply)
|
||||||
.Where(t => t.OriginalReReadingTask.DoctorUserId == _userInfo.Id)
|
.Where(t => t.OriginalReReadingTask.DoctorUserId == _userInfo.Id)
|
||||||
.Where(t => t.OriginalReReadingTask.TrialId == queryVisitTask.TrialId)
|
.Where(t => t.OriginalReReadingTask.TrialId == queryVisitTask.TrialId)
|
||||||
|
.WhereIf(queryVisitTask.RequestReReadingResultEnum != null, t => t.RequestReReadingResultEnum == queryVisitTask.RequestReReadingResultEnum)
|
||||||
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
|
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskCode), t => t.OriginalReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!) || t.RootReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskCode), t => t.OriginalReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!) || t.RootReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!))
|
||||||
.WhereIf(queryVisitTask.TaskState != null, t => t.OriginalReReadingTask.TaskState == queryVisitTask.TaskState)
|
.WhereIf(queryVisitTask.TaskState != null, t => t.OriginalReReadingTask.TaskState == queryVisitTask.TaskState)
|
||||||
|
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.OriginalReReadingTask.ReadingCategory == queryVisitTask.ReadingCategory)
|
||||||
.WhereIf(queryVisitTask.ReReadingApplyState != null, t => t.OriginalReReadingTask.ReReadingApplyState == queryVisitTask.ReReadingApplyState)
|
.WhereIf(queryVisitTask.ReReadingApplyState != null, t => t.OriginalReReadingTask.ReReadingApplyState == queryVisitTask.ReReadingApplyState)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.OriginalReReadingTask.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.SiteId != null, t => t.OriginalReReadingTask.Subject.SiteId == queryVisitTask.SiteId)
|
||||||
.WhereIf(queryVisitTask.SubjectId != null, t => t.OriginalReReadingTask.SubjectId == queryVisitTask.SubjectId)
|
.WhereIf(queryVisitTask.SubjectId != null, t => t.OriginalReReadingTask.SubjectId == queryVisitTask.SubjectId)
|
||||||
@@ -1074,7 +1077,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
{
|
{
|
||||||
var trialReadingCriterionId = inDto.TrialReadingCriterionId;
|
var trialReadingCriterionId = inDto.TrialReadingCriterionId;
|
||||||
|
|
||||||
//Expression<Func<VisitTask, bool>> visitTaskLambda = x => x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId == inDto.TrialReadingCriterionId;
|
|
||||||
|
|
||||||
var critrion = await _trialReadingCriterionRepository.FindAsync(trialReadingCriterionId);
|
var critrion = await _trialReadingCriterionRepository.FindAsync(trialReadingCriterionId);
|
||||||
|
|
||||||
@@ -1086,7 +1088,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
.WhereIf(critrion.IsAutoCreate == false, t => !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum))
|
.WhereIf(critrion.IsAutoCreate == false, t => !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum))
|
||||||
|
|
||||||
// 前序 不存在 未一致性核查未通过的
|
// 前序 不存在 未一致性核查未通过的
|
||||||
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum >= sv.VisitNum))
|
||||||
//.WhereIf(critrion.IsAutoCreate == false, t => t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(t => t.IsGeneratedTask == false) ?
|
//.WhereIf(critrion.IsAutoCreate == false, t => t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(t => t.IsGeneratedTask == false) ?
|
||||||
//t.VisitTaskNum <= t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsGeneratedTask == false).Min(t => t.SubjectVisit.VisitNum) : true)
|
//t.VisitTaskNum <= t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsGeneratedTask == false).Min(t => t.SubjectVisit.VisitNum) : true)
|
||||||
//.Where(t => t.Subject.SubjectVisitList.Any(t => t.CheckState != CheckStateEnum.CVPassed) ? t.VisitTaskNum <= t.Subject.SubjectVisitList.Where(t => t.CheckState != CheckStateEnum.CVPassed).Min(t => t.VisitNum) : true)
|
//.Where(t => t.Subject.SubjectVisitList.Any(t => t.CheckState != CheckStateEnum.CVPassed) ? t.VisitTaskNum <= t.Subject.SubjectVisitList.Where(t => t.CheckState != CheckStateEnum.CVPassed).Min(t => t.VisitNum) : true)
|
||||||
@@ -1115,6 +1117,32 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
).Count(),
|
).Count(),
|
||||||
|
|
||||||
|
|
||||||
|
UnReadCanReadTaskList= x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||||
|
.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
|
||||||
|
.OrderBy(x => x.VisitTaskNum)
|
||||||
|
.Select(u => new IRUnreadTaskView()
|
||||||
|
{
|
||||||
|
Id = u.Id,
|
||||||
|
IsUrgent = u.IsUrgent,
|
||||||
|
VisitNum = u.VisitTaskNum,
|
||||||
|
TaskBlindName = u.TaskBlindName,
|
||||||
|
VisistId = u.SourceSubjectVisitId,
|
||||||
|
SuggesteFinishedTime = u.SuggesteFinishedTime,
|
||||||
|
ReadingCategory = u.ReadingCategory,
|
||||||
|
IsAnalysisCreate = u.IsAnalysisCreate,
|
||||||
|
ArmEnum = u.ArmEnum,
|
||||||
|
TrialReadingCriterionId = u.TrialReadingCriterionId,
|
||||||
|
IsNeedClinicalDataSign = u.IsNeedClinicalDataSign,
|
||||||
|
IsClinicalDataSign = u.IsClinicalDataSign,
|
||||||
|
IsFrontTaskNeedSignButNotSign = u.IsFrontTaskNeedSignButNotSign
|
||||||
|
})
|
||||||
|
.ToList(),
|
||||||
|
|
||||||
|
|
||||||
|
UrgentCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||||
|
.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
|
||||||
|
.Where(x=>x.IsUrgent).Count(),
|
||||||
|
|
||||||
//已读任务量
|
//已读任务量
|
||||||
HaveReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
|
HaveReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
|
||||||
|
|
||||||
@@ -2253,7 +2281,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
#region 方式二
|
#region 方式二
|
||||||
|
|
||||||
var origenalTask = influenceTaskList.Where(t => t.Id == task.Id).FirstOrDefault();
|
|
||||||
|
//pm退回的时候,影响的任务里不一定有该任务id 双重 分配了一个人,退回的时候,选择的是未分配的
|
||||||
|
|
||||||
|
//var origenalTask = influenceTaskList.Where(t => t.Id == task.Id).FirstOrDefault();
|
||||||
|
|
||||||
|
var origenalTask = await _visitTaskRepository.FindAsync(task.Id);
|
||||||
|
|
||||||
|
|
||||||
foreach (var influenceTask in influenceTaskList)
|
foreach (var influenceTask in influenceTaskList)
|
||||||
{
|
{
|
||||||
@@ -2312,7 +2346,9 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
await SetMedicalReviewInvalidAsync(currentVisitList);
|
await SetMedicalReviewInvalidAsync(currentVisitList);
|
||||||
|
|
||||||
var origenalTask = currentVisitList.Where(t => t.Id == task.Id).First();
|
//var origenalTask = currentVisitList.Where(t => t.Id == task.Id).First();
|
||||||
|
|
||||||
|
var origenalTask = await _visitTaskRepository.FindAsync(task.Id);
|
||||||
|
|
||||||
foreach (var influenceTask in currentVisitList)
|
foreach (var influenceTask in currentVisitList)
|
||||||
{
|
{
|
||||||
@@ -2667,7 +2703,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
//throw new BusinessValidationFailedException("仅允许PM 同意 IR 申请的任务");
|
//throw new BusinessValidationFailedException("仅允许PM 同意 IR 申请的任务");
|
||||||
}
|
}
|
||||||
//PM 影响所有阅片人 仅仅针对访视 SPM CPM 掉用
|
//PM 影响所有阅片人 仅仅针对访视 SPM CPM 调用
|
||||||
|
|
||||||
else if (((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.ProjectManager) && filterObj.IsAnalysisCreate == false && filterObj.ReadingCategory == ReadingCategory.Visit)
|
else if (((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.ProjectManager) && filterObj.IsAnalysisCreate == false && filterObj.ReadingCategory == ReadingCategory.Visit)
|
||||||
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId == null))
|
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId == null))
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public string Value { get; set; } = string.Empty;
|
public string Value { get; set; } = string.Empty;
|
||||||
public string ValueCN { get; set; } = string.Empty;
|
public string ValueCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string FrontType { get; set; } = string.Empty;
|
||||||
|
|
||||||
public int InternationalizationType { get; set; }
|
public int InternationalizationType { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,19 +57,23 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class BatchAddInternationalizationDto
|
public class BatchInternationalizationDto
|
||||||
{
|
{
|
||||||
public string Description { get; set; } = string.Empty;
|
public string Description { get; set; } = string.Empty;
|
||||||
public string Code { get; set; } = string.Empty;
|
public string Code { get; set; } = string.Empty;
|
||||||
public string Value { get; set; } = string.Empty;
|
public string Value { get; set; } = string.Empty;
|
||||||
|
public string FrontType { get; set; } = string.Empty;
|
||||||
public string ValueCN { get; set; } = string.Empty;
|
public string ValueCN { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class InternationalizationSimpleDto
|
public class BatchAddInternationalizationDto : BatchInternationalizationDto
|
||||||
{
|
{
|
||||||
public string Code { get; set; } = string.Empty;
|
|
||||||
public string Value { get; set; } = string.Empty;
|
}
|
||||||
public string ValueCN { get; set; } = string.Empty;
|
|
||||||
|
public class InternationalizationSimpleDto: BatchInternationalizationDto
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ using IRaCIS.Core.Application.Interfaces;
|
|||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
|
using EasyCaching.Core;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using OfficeOpenXml.FormulaParsing.Utilities;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
@@ -19,30 +22,79 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
[ApiExplorerSettings(GroupName = "Common")]
|
[ApiExplorerSettings(GroupName = "Common")]
|
||||||
public class InternationalizationService : BaseService, IInternationalizationService
|
public class InternationalizationService : BaseService, IInternationalizationService
|
||||||
{
|
{
|
||||||
|
private readonly IEasyCachingProvider _provider;
|
||||||
private readonly IRepository<Internationalization> _internationalizationRepository;
|
private readonly IRepository<Internationalization> _internationalizationRepository;
|
||||||
|
|
||||||
public InternationalizationService(IRepository<Internationalization> internationalizationRepository)
|
public InternationalizationService(IRepository<Internationalization> internationalizationRepository, IEasyCachingProvider provider)
|
||||||
{
|
{
|
||||||
_internationalizationRepository = internationalizationRepository;
|
_internationalizationRepository = internationalizationRepository;
|
||||||
|
_provider = provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 前端国际化内容接口
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
|
[HttpGet]
|
||||||
public async Task<List<InternationalizationSimpleDto>> GetFrontInternationalizationList()
|
public async Task<IEnumerable<InternationalizationSimpleDto>> GetFrontInternationalizationList()
|
||||||
{
|
{
|
||||||
|
var cacheList= _provider.Get<List<InternationalizationSimpleDto>>(StaticData.InternationalData.Front).Value;
|
||||||
|
|
||||||
|
if(cacheList != null && cacheList.Count!=0)
|
||||||
|
{
|
||||||
|
return cacheList;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
var list = await _internationalizationRepository.Where(t => t.InternationalizationType == 0).Select(t => new InternationalizationSimpleDto()
|
var list = await _internationalizationRepository.Where(t => t.InternationalizationType == 0).Select(t => new InternationalizationSimpleDto()
|
||||||
{
|
{
|
||||||
Code = t.Code,
|
Code = t.Code,
|
||||||
Value = t.Value,
|
Value = t.Value,
|
||||||
ValueCN = t.ValueCN
|
ValueCN = t.ValueCN,
|
||||||
|
FrontType = t.FrontType,
|
||||||
|
Description = t.Description,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
|
_provider.Set<List<InternationalizationSimpleDto>>(StaticData.InternationalData.Front, list, TimeSpan.FromDays(1));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 前端批量提交,后端判断不存在就添加,存在就更新
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[AllowAnonymous]
|
||||||
|
public async Task<IResponseOutput> BatchAddOrUpdateFrontInternationalization(List<BatchInternationalizationDto> batchList)
|
||||||
|
{
|
||||||
|
foreach (var item in batchList)
|
||||||
|
{
|
||||||
|
var find = await _internationalizationRepository.FirstOrDefaultAsync(t => t.Code == item.Code && t.Description == item.Description && t.InternationalizationType == 0);
|
||||||
|
|
||||||
|
if (find != null)
|
||||||
|
{
|
||||||
|
_mapper.Map(item, find);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var mapItem = _mapper.Map<Internationalization>(item);
|
||||||
|
mapItem.InternationalizationType = 0;
|
||||||
|
mapItem.State = 1;
|
||||||
|
|
||||||
|
await _internationalizationRepository.AddAsync(mapItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await _internationalizationRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
//清理缓存
|
||||||
|
_provider.Set<List<InternationalizationSimpleDto>>(StaticData.InternationalData.Front, new List<InternationalizationSimpleDto>(), TimeSpan.FromDays(1));
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<PageOutput<InternationalizationView>> GetInternationalizationList(InternationalizationQuery inQuery)
|
public async Task<PageOutput<InternationalizationView>> GetInternationalizationList(InternationalizationQuery inQuery)
|
||||||
{
|
{
|
||||||
@@ -63,6 +115,11 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 后端之前批量添加接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="batchAdd"></param>
|
||||||
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> BatchAddInternationalization(BatchAddInternationalization batchAdd)
|
public async Task<IResponseOutput> BatchAddInternationalization(BatchAddInternationalization batchAdd)
|
||||||
{
|
{
|
||||||
@@ -92,17 +149,34 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 前后端添加的时候,区分了,前端判断重复多了多了一个路由 路由+标识唯一
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="addOrEditInternationalization"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public async Task<IResponseOutput> AddOrUpdateInternationalization(InternationalizationAddOrEdit addOrEditInternationalization)
|
public async Task<IResponseOutput> AddOrUpdateInternationalization(InternationalizationAddOrEdit addOrEditInternationalization)
|
||||||
{
|
{
|
||||||
|
var internationalizationType = addOrEditInternationalization.InternationalizationType;
|
||||||
|
|
||||||
|
//后端验证标识重复与否
|
||||||
var verifyExp1 = new EntityVerifyExp<Internationalization>()
|
var verifyExp1 = new EntityVerifyExp<Internationalization>()
|
||||||
{
|
{
|
||||||
VerifyExp = t => t.Code == addOrEditInternationalization.Code && t.InternationalizationType == addOrEditInternationalization.InternationalizationType,
|
VerifyExp = t => t.Code == addOrEditInternationalization.Code && t.InternationalizationType == addOrEditInternationalization.InternationalizationType,
|
||||||
|
|
||||||
VerifyMsg = $"该类型已有{addOrEditInternationalization.Code}名称的国际化标识",
|
VerifyMsg = $"该类型已有{addOrEditInternationalization.Code}名称的国际化标识",
|
||||||
IsVerify = true
|
IsVerify = internationalizationType == 1
|
||||||
};
|
};
|
||||||
|
|
||||||
var entity = await _internationalizationRepository.InsertOrUpdateAsync(addOrEditInternationalization, true, verifyExp1);
|
//前端验证标识重复与否
|
||||||
|
var verifyExp2 = new EntityVerifyExp<Internationalization>()
|
||||||
|
{
|
||||||
|
VerifyExp = t => t.Code == addOrEditInternationalization.Code && t.InternationalizationType == addOrEditInternationalization.InternationalizationType && t.Description == addOrEditInternationalization.Description,
|
||||||
|
|
||||||
|
VerifyMsg = $"该类型已有{addOrEditInternationalization.Description}下的{addOrEditInternationalization.Code}名称的国际化标识",
|
||||||
|
IsVerify = internationalizationType == 0
|
||||||
|
};
|
||||||
|
|
||||||
|
var entity = await _internationalizationRepository.InsertOrUpdateAsync(addOrEditInternationalization, true, verifyExp1, verifyExp2);
|
||||||
|
|
||||||
if (addOrEditInternationalization.InternationalizationType == 1)
|
if (addOrEditInternationalization.InternationalizationType == 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -248,6 +248,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(templateInfo,
|
builder.HtmlBody = string.Format(templateInfo,
|
||||||
|
"",
|
||||||
//---您正在参与展影医疗IRC项目
|
//---您正在参与展影医疗IRC项目
|
||||||
_localizer["Mail_IRCProject"],
|
_localizer["Mail_IRCProject"],
|
||||||
verificationCode
|
verificationCode
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<Internationalization, InternationalizationView>();
|
CreateMap<Internationalization, InternationalizationView>();
|
||||||
CreateMap<Internationalization, InternationalizationAddOrEdit>().ReverseMap();
|
CreateMap<Internationalization, InternationalizationAddOrEdit>().ReverseMap();
|
||||||
|
|
||||||
|
CreateMap<Internationalization, BatchInternationalizationDto>().ReverseMap();
|
||||||
|
|
||||||
|
|
||||||
CreateMap<BatchAddInternationalizationDto, InternationalizationAddOrEdit>();
|
CreateMap<BatchAddInternationalizationDto, InternationalizationAddOrEdit>();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace IRaCIS.Application.Services
|
|||||||
return ResponseOutput.NotOk(_localizer["Doctor_DupEmail"], new DoctorBasicInfoCommand());
|
return ResponseOutput.NotOk(_localizer["Doctor_DupEmail"], new DoctorBasicInfoCommand());
|
||||||
}
|
}
|
||||||
|
|
||||||
doctor.Code = (await _doctorRepository.MaxAsync(t => t.Code)) + 1;
|
doctor.Code = await _doctorRepository.Select(t => t.Code).DefaultIfEmpty().MaxAsync() + 1;
|
||||||
|
|
||||||
doctor.ReviewerCode = AppSettings.GetCodeStr(doctor.Code, nameof(Doctor));
|
doctor.ReviewerCode = AppSettings.GetCodeStr(doctor.Code, nameof(Doctor));
|
||||||
|
|
||||||
@@ -432,11 +432,11 @@ namespace IRaCIS.Application.Services
|
|||||||
//判断 合作协议、正式简历 是否有。如果没有,显示提示信息,并且不能保存
|
//判断 合作协议、正式简历 是否有。如果没有,显示提示信息,并且不能保存
|
||||||
var attachmentList = await _attachmentRepository.Where(u => u.DoctorId == auditResumeParam.Id)
|
var attachmentList = await _attachmentRepository.Where(u => u.DoctorId == auditResumeParam.Id)
|
||||||
.Select(u => u.Type).ToListAsync();
|
.Select(u => u.Type).ToListAsync();
|
||||||
if (auditResumeParam.ResumeStatus == ResumeStatusEnum.Pass && ((!attachmentList.Contains("Resume")) || (!attachmentList.Contains("Consultant Agreement"))))
|
//if (auditResumeParam.ResumeStatus == ResumeStatusEnum.Pass && ((!attachmentList.Contains("Resume")) || (!attachmentList.Contains("Consultant Agreement"))))
|
||||||
{
|
//{
|
||||||
//---Resume & Consultant Agreement must be upload
|
// //---Resume & Consultant Agreement must be upload
|
||||||
return ResponseOutput.NotOk(_localizer["Doctor_RequiredDocumentsError"]);
|
// return ResponseOutput.NotOk(_localizer["Doctor_RequiredDocumentsError"]);
|
||||||
}
|
//}
|
||||||
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == auditResumeParam.Id, u => new Doctor()
|
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == auditResumeParam.Id, u => new Doctor()
|
||||||
{
|
{
|
||||||
CooperateStatus = auditResumeParam.CooperateStatus,
|
CooperateStatus = auditResumeParam.CooperateStatus,
|
||||||
|
|||||||
@@ -147,12 +147,12 @@ namespace IRaCIS.Application.Services
|
|||||||
var successs = await _repository.BatchUpdateAsync<Doctor>(o => o.Id == updateGCPExperienceParam.Id, u => new Doctor()
|
var successs = await _repository.BatchUpdateAsync<Doctor>(o => o.Id == updateGCPExperienceParam.Id, u => new Doctor()
|
||||||
{
|
{
|
||||||
GCP = updateGCPExperienceParam.GCP,
|
GCP = updateGCPExperienceParam.GCP,
|
||||||
GCPId = updateGCPExperienceParam.GCP==0&&updateGCPExperienceParam.GCPId==null?Guid.Empty: updateGCPExperienceParam.GCPId!.Value
|
GCPId = (updateGCPExperienceParam.GCP==0||updateGCPExperienceParam.GCPId==null)?Guid.Empty: updateGCPExperienceParam.GCPId!.Value
|
||||||
});
|
});
|
||||||
|
|
||||||
if (updateGCPExperienceParam.GCP == 0 && updateGCPExperienceParam.GCPId != null)
|
if (updateGCPExperienceParam.GCP == 0 )
|
||||||
{
|
{
|
||||||
await _repository.BatchDeleteAsync<Attachment>(a => a.Id == updateGCPExperienceParam.GCPId);
|
await _repository.BatchDeleteAsync<Attachment>(a => a.DoctorId == updateGCPExperienceParam.Id && a.Type=="GCP");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResponseOutput.Result(successs, updateGCPExperienceParam.GCPId.ToString());
|
return ResponseOutput.Result(successs, updateGCPExperienceParam.GCPId.ToString());
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
CreateMap<Doctor, SpecialtyDTO>()
|
CreateMap<Doctor, SpecialtyDTO>()
|
||||||
.ForMember(o => o.Speciality, t => t.MapFrom(u => u.Speciality.Value))
|
.ForMember(o => o.Speciality, t => t.MapFrom(u => u.Speciality.Value))
|
||||||
|
.ForMember(o => o.SpecialityCN, t => t.MapFrom(u => u.Speciality.ValueCN))
|
||||||
.ForMember(o => o.DictionaryList, t => t.MapFrom(u => u.DoctorDicRelationList.Where(t => t.KeyName == StaticData.ReadingType || t.KeyName == StaticData.Subspeciality).Select(t => t.Dictionary).OrderBy(t => t.ShowOrder)));
|
.ForMember(o => o.DictionaryList, t => t.MapFrom(u => u.DoctorDicRelationList.Where(t => t.KeyName == StaticData.ReadingType || t.KeyName == StaticData.Subspeciality).Select(t => t.Dictionary).OrderBy(t => t.ShowOrder)));
|
||||||
CreateMap<SpecialtyCommand, Doctor>();
|
CreateMap<SpecialtyCommand, Doctor>();
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public Guid? ConfirmUserId { get; set; }
|
public Guid? ConfirmUserId { get; set; }
|
||||||
|
|
||||||
public bool IsConfirmed => ConfirmTime is not null;
|
public bool IsConfirmed { get; set; }
|
||||||
|
|
||||||
public string UserName { get; set; } = string.Empty;
|
public string UserName { get; set; } = string.Empty;
|
||||||
|
|
||||||
@@ -144,6 +144,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public Guid? UserTypeId { get; set; }
|
public Guid? UserTypeId { get; set; }
|
||||||
public Guid? UserId { get; set; }
|
public Guid? UserId { get; set; }
|
||||||
|
|
||||||
|
public bool? IsConfirmed { get; set; }
|
||||||
|
|
||||||
|
public bool? IsDeleted { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
///<summary> SystemDocumentAddOrEdit 列表查询参数模型</summary>
|
///<summary> SystemDocumentAddOrEdit 列表查询参数模型</summary>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
///<summary>TrialDocumentQuery 列表查询参数模型</summary>
|
///<summary>TrialDocumentQuery 列表查询参数模型</summary>
|
||||||
public class TrialDocumentQuery : PageInput
|
public class TrialDocumentQuery : PageInput
|
||||||
{
|
{
|
||||||
|
public bool? IsDeleted { get; set; }
|
||||||
public Guid? FileTypeId { get; set; }
|
public Guid? FileTypeId { get; set; }
|
||||||
|
|
||||||
public string Name { get; set; } = String.Empty;
|
public string Name { get; set; } = String.Empty;
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.Include(t => t.TrialEmailNoticeUserList).Include(t => t.TrialEmailBlackUserList).FirstOrDefaultAsync();
|
.Include(t => t.TrialEmailNoticeUserList).Include(t => t.TrialEmailBlackUserList).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
if (trialEmailConfig == null || trialEmailConfig.IsAutoSend == false)
|
if (trialEmailConfig == null || trialEmailConfig.IsAutoSend == false || trialEmailConfig.IsEnable==false)
|
||||||
{
|
{
|
||||||
return (null,null);
|
return (null,null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
var trialDocumentQueryable = _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == queryTrialDocument.TrialId)
|
var trialDocumentQueryable = _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == queryTrialDocument.TrialId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryTrialDocument.Name), t => t.Name.Contains(queryTrialDocument.Name))
|
.WhereIf(!string.IsNullOrEmpty(queryTrialDocument.Name), t => t.Name.Contains(queryTrialDocument.Name))
|
||||||
.WhereIf(queryTrialDocument.FileTypeId != null, t => t.FileTypeId == queryTrialDocument.FileTypeId)
|
.WhereIf(queryTrialDocument.FileTypeId != null, t => t.FileTypeId == queryTrialDocument.FileTypeId)
|
||||||
|
.WhereIf(queryTrialDocument.IsDeleted != null, t => t.IsDeleted == queryTrialDocument.IsDeleted)
|
||||||
.ProjectTo<TrialDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, isEn_Us = _userInfo.IsEn_Us });
|
.ProjectTo<TrialDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, isEn_Us = _userInfo.IsEn_Us });
|
||||||
|
|
||||||
return await trialDocumentQueryable.ToPagedListAsync(queryTrialDocument.PageIndex, queryTrialDocument.PageSize, queryTrialDocument.SortField, queryTrialDocument.Asc);
|
return await trialDocumentQueryable.ToPagedListAsync(queryTrialDocument.PageIndex, queryTrialDocument.PageSize, queryTrialDocument.SortField, queryTrialDocument.Asc);
|
||||||
@@ -359,6 +360,7 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
FileTypeId = trialDocumentNeedConfirmedUserType.TrialDocument.FileTypeId,
|
FileTypeId = trialDocumentNeedConfirmedUserType.TrialDocument.FileTypeId,
|
||||||
FileType = _userInfo.IsEn_Us ? trialDocumentNeedConfirmedUserType.TrialDocument.FileType.Value : trialDocumentNeedConfirmedUserType.TrialDocument.FileType.ValueCN,
|
FileType = _userInfo.IsEn_Us ? trialDocumentNeedConfirmedUserType.TrialDocument.FileType.Value : trialDocumentNeedConfirmedUserType.TrialDocument.FileType.ValueCN,
|
||||||
UpdateTime = trialDocumentNeedConfirmedUserType.TrialDocument.UpdateTime,
|
UpdateTime = trialDocumentNeedConfirmedUserType.TrialDocument.UpdateTime,
|
||||||
|
IsConfirmed= confirm.ConfirmTime!=null,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -394,7 +396,7 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
FileType = _userInfo.IsEn_Us ? needConfirmEdUserType.SystemDocument.FileType.Value : needConfirmEdUserType.SystemDocument.FileType.ValueCN,
|
FileType = _userInfo.IsEn_Us ? needConfirmEdUserType.SystemDocument.FileType.Value : needConfirmEdUserType.SystemDocument.FileType.ValueCN,
|
||||||
FileTypeId = needConfirmEdUserType.SystemDocument.FileTypeId,
|
FileTypeId = needConfirmEdUserType.SystemDocument.FileTypeId,
|
||||||
UpdateTime = needConfirmEdUserType.SystemDocument.UpdateTime,
|
UpdateTime = needConfirmEdUserType.SystemDocument.UpdateTime,
|
||||||
|
IsConfirmed = confirm.ConfirmTime != null,
|
||||||
|
|
||||||
ConfirmUserId = confirm.ConfirmUserId,
|
ConfirmUserId = confirm.ConfirmUserId,
|
||||||
ConfirmTime = confirm.ConfirmTime,
|
ConfirmTime = confirm.ConfirmTime,
|
||||||
@@ -409,6 +411,8 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
var unionQuery = trialDocQuery.Union(systemDocQuery)
|
var unionQuery = trialDocQuery.Union(systemDocQuery)
|
||||||
.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
|
.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
|
||||||
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
|
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
|
||||||
|
.WhereIf(querySystemDocument.IsConfirmed != null, t => t.IsConfirmed == querySystemDocument.IsConfirmed)
|
||||||
|
.WhereIf(querySystemDocument.IsDeleted != null, t => t.IsDeleted == querySystemDocument.IsDeleted)
|
||||||
.WhereIf(querySystemDocument.UserTypeId != null, t => t.UserTypeId == querySystemDocument.UserTypeId);
|
.WhereIf(querySystemDocument.UserTypeId != null, t => t.UserTypeId == querySystemDocument.UserTypeId);
|
||||||
|
|
||||||
var result = await unionQuery.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
var result = await unionQuery.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public class DicomTrialSiteSubjectInfo
|
public class DicomTrialSiteSubjectInfo
|
||||||
{
|
{
|
||||||
public string TrialSiteCode { get; set; } = string.Empty;
|
public string TrialSiteCode { get; set; } = string.Empty;
|
||||||
public string SiteCode { get; set; } = string.Empty;
|
public string TrialSiteAliasName { get; set; } = string.Empty;
|
||||||
public string SiteName { get; set; } = string.Empty;
|
|
||||||
public string SubjectCode { get; set; } = string.Empty;
|
public string SubjectCode { get; set; } = string.Empty;
|
||||||
public int? SubjectAge { get; set; }
|
public int? SubjectAge { get; set; }
|
||||||
public string SubjectSex { get; set; } = string.Empty;
|
public string SubjectSex { get; set; } = string.Empty;
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
//[JsonIgnore]
|
//[JsonIgnore]
|
||||||
//public int NoneDicomCode { get; set; }
|
//public int NoneDicomCode { get; set; }
|
||||||
|
|
||||||
|
public string RecordPath { get; set; } = string.Empty;
|
||||||
public bool IsDicom { get; set; }
|
public bool IsDicom { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,6 +176,13 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public Guid? VisitTaskId { get; set; }
|
public Guid? VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
public bool? IsDicom { get; set; }
|
||||||
|
|
||||||
|
public string? Uploader { get; set; }
|
||||||
|
|
||||||
|
public bool? IsSuccess { get; set; }
|
||||||
|
|
||||||
|
public string? StudyCode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -215,6 +223,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public int FailedFileCount { get; set; }
|
public int FailedFileCount { get; set; }
|
||||||
|
|
||||||
|
public string RecordPath { get; set; } = string.Empty;
|
||||||
|
|
||||||
public AddOrUpdateStudyDto Study { get; set; }
|
public AddOrUpdateStudyDto Study { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IResponseOutput DicomUploadInProgress(Guid trialId, string studyInstanceUid)
|
public IResponseOutput DicomUploadInProgress(Guid trialId, string studyInstanceUid)
|
||||||
{
|
{
|
||||||
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
|
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(15));
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
||||||
@@ -151,7 +151,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
studyMonitor.UploadFinishedTime = DateTime.Now;
|
studyMonitor.UploadFinishedTime = DateTime.Now;
|
||||||
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
||||||
studyMonitor.FailedFileCount = incommand.FailedFileCount;
|
studyMonitor.FailedFileCount = incommand.FailedFileCount;
|
||||||
studyMonitor.IsSuccess = true;
|
studyMonitor.IsSuccess = incommand.FailedFileCount==0;
|
||||||
|
studyMonitor.RecordPath=incommand.RecordPath;
|
||||||
|
|
||||||
//上传
|
//上传
|
||||||
if (studyMonitor.IsDicomReUpload == false)
|
if (studyMonitor.IsDicomReUpload == false)
|
||||||
@@ -209,6 +210,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
series.SubjectId = incommand.SubjectId;
|
series.SubjectId = incommand.SubjectId;
|
||||||
series.SubjectVisitId = incommand.SubjectVisitId;
|
series.SubjectVisitId = incommand.SubjectVisitId;
|
||||||
|
|
||||||
|
//前端传递的数量不准,上传的时候,把失败的也加进来了,以实际数组的数字为准
|
||||||
|
series.InstanceCount = seriesItem.InstanceList.Count;
|
||||||
|
|
||||||
await _dicomSeriesRepository.AddAsync(series);
|
await _dicomSeriesRepository.AddAsync(series);
|
||||||
|
|
||||||
foreach (var instanceItem in seriesItem.InstanceList)
|
foreach (var instanceItem in seriesItem.InstanceList)
|
||||||
@@ -241,6 +245,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
|
|
||||||
var study = await _dicomstudyRepository.FirstOrDefaultAsync(t => t.Id == studyId);
|
var study = await _dicomstudyRepository.FirstOrDefaultAsync(t => t.Id == studyId);
|
||||||
|
|
||||||
|
//重传的时候也要赋值检查Id
|
||||||
|
studyMonitor.StudyId = study.Id;
|
||||||
|
studyMonitor.StudyCode = study.StudyCode;
|
||||||
|
|
||||||
//特殊处理逻辑
|
//特殊处理逻辑
|
||||||
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Union(study.Modalities.Split("、", StringSplitOptions.RemoveEmptyEntries)).Distinct());
|
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Union(study.Modalities.Split("、", StringSplitOptions.RemoveEmptyEntries)).Distinct());
|
||||||
@@ -333,8 +340,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<PageOutput<UnionStudyViewModel>> GetDicomAndNoneDicomStudyList(StudyQuery studyQuery)
|
public async Task<PageOutput<UnionStudyViewModel>> GetDicomAndNoneDicomStudyList(StudyQuery studyQuery)
|
||||||
{
|
{
|
||||||
@@ -457,6 +462,10 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
.WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
|
.WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
|
||||||
.WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
|
.WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
|
||||||
.WhereIf(studyQuery.SiteId != null, t => t.SiteId == studyQuery.SiteId)
|
.WhereIf(studyQuery.SiteId != null, t => t.SiteId == studyQuery.SiteId)
|
||||||
|
.WhereIf(studyQuery.IsDicom != null, t => t.IsDicom == studyQuery.IsDicom )
|
||||||
|
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.Uploader), t => t.Uploader.UserName.Contains(studyQuery.Uploader))
|
||||||
|
.WhereIf(studyQuery.IsSuccess != null, t => t.IsSuccess == studyQuery.IsSuccess)
|
||||||
|
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.StudyCode), t => t.StudyCode.Contains(studyQuery.StudyCode))
|
||||||
.Select(t => new UnionStudyMonitorModel()
|
.Select(t => new UnionStudyMonitorModel()
|
||||||
{
|
{
|
||||||
TrialId = t.TrialId,
|
TrialId = t.TrialId,
|
||||||
@@ -489,7 +498,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
ArchiveFinishedTime = t.ArchiveFinishedTime,
|
ArchiveFinishedTime = t.ArchiveFinishedTime,
|
||||||
|
|
||||||
|
|
||||||
|
RecordPath=t.RecordPath,
|
||||||
|
|
||||||
IsDicomReUpload = t.IsDicomReUpload,
|
IsDicomReUpload = t.IsDicomReUpload,
|
||||||
StudyId = t.Id,
|
StudyId = t.Id,
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
||||||
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.Uploader.LastName + " / " + u.Uploader.FirstName))
|
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.Uploader.LastName + " / " + u.Uploader.FirstName))
|
||||||
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id))
|
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id))
|
||||||
|
.ForMember(o => o.IsHaveUploadFailed, t => t.MapFrom(u => u.DicomStudyMonitorList.Any(t=>t.FailedFileCount>0)))
|
||||||
.ForMember(o => o.Modalities, t => t.MapFrom(u => string.Join('、', u.SeriesList.Select(t => t.Modality).Distinct()) ));
|
.ForMember(o => o.Modalities, t => t.MapFrom(u => string.Join('、', u.SeriesList.Select(t => t.Modality).Distinct()) ));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||||||
public T Data { get; set; }
|
public T Data { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public SignDTO SignInfo { get; set; }
|
public SignDTO? SignInfo { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -485,6 +485,11 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string ReaderUser { get; set; } = string.Empty;
|
public string ReaderUser { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色
|
||||||
|
/// </summary>
|
||||||
|
public string RoleName { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否有签名
|
/// 是否有签名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||||||
|
|
||||||
|
|
||||||
.WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo))
|
.WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo))
|
||||||
|
.WhereIf(!dto.RoleName.IsNullOrEmpty(), x => x.RoleName.Contains(dto.RoleName))
|
||||||
//.WhereIf(dto.VisitPlanInfo != null&& dto.VisitPlanInfo!=(decimal) 1.11, x => x.VisitNum == dto.VisitPlanInfo)
|
//.WhereIf(dto.VisitPlanInfo != null&& dto.VisitPlanInfo!=(decimal) 1.11, x => x.VisitNum == dto.VisitPlanInfo)
|
||||||
//.WhereIf(dto.VisitPlanInfo != (decimal)1.11,x=>x.InPlan!=null&& x.InPlan==false)
|
//.WhereIf(dto.VisitPlanInfo != (decimal)1.11,x=>x.InPlan!=null&& x.InPlan==false)
|
||||||
.WhereIf(dto.StartTime != null, x => x.CreateTime >= dto.StartTime)
|
.WhereIf(dto.StartTime != null, x => x.CreateTime >= dto.StartTime)
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
siteCommand.Code = await _siteRepository.Select(t => t.Code).DefaultIfEmpty().MaxAsync() + 1;
|
siteCommand.Code = await _siteRepository.Select(t => t.Code).DefaultIfEmpty().MaxAsync() + 1;
|
||||||
|
|
||||||
siteCommand.SiteCode = AppSettings.GetCodeStr(siteCommand.Code, nameof(User));
|
siteCommand.SiteCode = AppSettings.GetCodeStr(siteCommand.Code, nameof(Site));
|
||||||
}
|
}
|
||||||
|
|
||||||
var site = await _siteRepository.InsertOrUpdateAsync(siteCommand, true, exp);
|
var site = await _siteRepository.InsertOrUpdateAsync(siteCommand, true, exp);
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ using static IRaCIS.Core.Domain.Share.StaticData;
|
|||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using Medallion.Threading;
|
using Medallion.Threading;
|
||||||
using EasyCaching.Core;
|
using EasyCaching.Core;
|
||||||
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
@@ -28,7 +30,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
private readonly IDistributedLockProvider _distributedLockProvider;
|
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||||
private readonly IEasyCachingProvider _cache;
|
private readonly IEasyCachingProvider _cache;
|
||||||
|
private readonly IReadingImageTaskService _readingImageTaskService;
|
||||||
private readonly IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig;
|
private readonly IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig;
|
||||||
|
|
||||||
|
|
||||||
@@ -38,6 +40,7 @@ namespace IRaCIS.Application.Services
|
|||||||
IRepository<VerificationCode> verificationCodeRepository,
|
IRepository<VerificationCode> verificationCodeRepository,
|
||||||
IRepository<Doctor> doctorRepository,
|
IRepository<Doctor> doctorRepository,
|
||||||
IEasyCachingProvider cache,
|
IEasyCachingProvider cache,
|
||||||
|
IReadingImageTaskService readingImageTaskService,
|
||||||
IRepository<TrialUser> userTrialRepository,
|
IRepository<TrialUser> userTrialRepository,
|
||||||
IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig,
|
IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig,
|
||||||
IRepository<UserLog> userLogRepository
|
IRepository<UserLog> userLogRepository
|
||||||
@@ -48,6 +51,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
_verifyConfig = verifyConfig;
|
_verifyConfig = verifyConfig;
|
||||||
_cache = cache;
|
_cache = cache;
|
||||||
|
this._readingImageTaskService = readingImageTaskService;
|
||||||
_userRepository = userRepository;
|
_userRepository = userRepository;
|
||||||
_mailVerificationService = mailVerificationService;
|
_mailVerificationService = mailVerificationService;
|
||||||
_verificationCodeRepository = verificationCodeRepository;
|
_verificationCodeRepository = verificationCodeRepository;
|
||||||
@@ -689,6 +693,8 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
// 登录 清除缓存
|
// 登录 清除缓存
|
||||||
_cache.Remove(userLoginReturnModel.BasicInfo.Id.ToString());
|
_cache.Remove(userLoginReturnModel.BasicInfo.Id.ToString());
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(userLoginReturnModel);
|
return ResponseOutput.Ok(userLoginReturnModel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||||||
|
|
||||||
public string ModalityForEdit { get; set; } = string.Empty;
|
public string ModalityForEdit { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool IsHaveUploadFailed { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class QASeriesInfoDto
|
public class QASeriesInfoDto
|
||||||
|
|||||||
@@ -1095,6 +1095,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public int? Age { get; set; }
|
public int? Age { get; set; }
|
||||||
public string Sex { get; set; } = string.Empty;
|
public string Sex { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool IsHaveUploadFailed { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1116,6 +1118,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public bool? IsOverTime { get; set; }
|
public bool? IsOverTime { get; set; }
|
||||||
public Guid? CreateUserId { get; set; }
|
public Guid? CreateUserId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class QCCRCChallengeViewModel
|
public class QCCRCChallengeViewModel
|
||||||
@@ -1379,6 +1382,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public DateTime? SubmitTime { get; set; }
|
public DateTime? SubmitTime { get; set; }
|
||||||
|
|
||||||
|
public string SubmitUserName { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public string SubmitUserRealName { get; set; } = String.Empty;
|
||||||
|
|
||||||
public string CurrentActionUserName { get; set; } = String.Empty;
|
public string CurrentActionUserName { get; set; } = String.Empty;
|
||||||
public string PreliminaryAuditUserName { get; set; } = String.Empty;
|
public string PreliminaryAuditUserName { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
|||||||
@@ -925,7 +925,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
return new GetNextIQCQualityOutDto() { };
|
return new GetNextIQCQualityOutDto() { };
|
||||||
break;
|
break;
|
||||||
case TrialQCProcess.SingleAudit:
|
case TrialQCProcess.SingleAudit:
|
||||||
visitList = await _subjectVisitRepository.Where(x => x.SubmitState != SubmitStateEnum.None && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))).Include(x => x.Subject).ToListAsync();
|
visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))).Include(x => x.Subject).ToListAsync();
|
||||||
|
|
||||||
subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId).OrderBy(x=>x.VisitNum).FirstOrDefault();
|
subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId).OrderBy(x=>x.VisitNum).FirstOrDefault();
|
||||||
if(subjectVisit!=null)
|
if(subjectVisit!=null)
|
||||||
@@ -952,7 +952,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
break;
|
break;
|
||||||
case TrialQCProcess.DoubleAudit:
|
case TrialQCProcess.DoubleAudit:
|
||||||
|
|
||||||
visitList = await _subjectVisitRepository.Where(x => x.SubmitState != SubmitStateEnum.None && x.TrialId == inDto.TrialId &&
|
visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId &&
|
||||||
((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id)))
|
((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id)))
|
||||||
).Include(x => x.Subject).ToListAsync();
|
).Include(x => x.Subject).ToListAsync();
|
||||||
if (subjectVisit != null)
|
if (subjectVisit != null)
|
||||||
|
|||||||
@@ -364,6 +364,10 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(d => d.QCProcessEnum, u => u.MapFrom(s => s.Trial.QCProcessEnum))
|
.ForMember(d => d.QCProcessEnum, u => u.MapFrom(s => s.Trial.QCProcessEnum))
|
||||||
.ForMember(d => d.SubjectStatus, u => u.MapFrom(s => s.Subject.Status))
|
.ForMember(d => d.SubjectStatus, u => u.MapFrom(s => s.Subject.Status))
|
||||||
.ForMember(d => d.StudyCount, u => u.MapFrom(s => s.StudyList.Count()))
|
.ForMember(d => d.StudyCount, u => u.MapFrom(s => s.StudyList.Count()))
|
||||||
|
|
||||||
|
.ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.UserName))
|
||||||
|
.ForMember(d => d.SubmitUserRealName, u => u.MapFrom(s => s.SubmitUser.FullName))
|
||||||
|
|
||||||
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(s => s.CurrentActionUser.UserName))
|
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(s => s.CurrentActionUser.UserName))
|
||||||
.ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.PreliminaryAuditUser.UserName))
|
.ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.PreliminaryAuditUser.UserName))
|
||||||
.ForMember(d => d.ReviewAuditUserName, u => u.MapFrom(s => s.ReviewAuditUser.UserName))
|
.ForMember(d => d.ReviewAuditUserName, u => u.MapFrom(s => s.ReviewAuditUser.UserName))
|
||||||
@@ -391,6 +395,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count > 0)
|
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count > 0)
|
||||||
|| t.PreviousSurgeryList.Any()))
|
|| t.PreviousSurgeryList.Any()))
|
||||||
|
|
||||||
|
.ForMember(d => d.IsHaveUploadFailed, u => u.MapFrom(t => t.StudyList.SelectMany(c=>c.DicomStudyMonitorList).Any(h => h.FailedFileCount>0) ))
|
||||||
|
|
||||||
//.ForMember(d => d.VisitName, u => u.MapFrom(t =>t.InPlan? t.VisitStage.VisitName : t.VisitName))
|
//.ForMember(d => d.VisitName, u => u.MapFrom(t =>t.InPlan? t.VisitStage.VisitName : t.VisitName))
|
||||||
//.ForMember(d => d.VisitNum, u => u.MapFrom(t => t.InPlan ? t.VisitStage.VisitNum : t.VisitNum))
|
//.ForMember(d => d.VisitNum, u => u.MapFrom(t => t.InPlan ? t.VisitStage.VisitNum : t.VisitNum))
|
||||||
//.ForMember(d => d.VisitDay, u => u.MapFrom(t => t.InPlan ? t.VisitStage.VisitDay : t.VisitDay))
|
//.ForMember(d => d.VisitDay, u => u.MapFrom(t => t.InPlan ? t.VisitStage.VisitDay : t.VisitDay))
|
||||||
|
|||||||
@@ -356,6 +356,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制显示
|
||||||
|
/// </summary>
|
||||||
|
public LimitShow LimitShow { get; set; } = LimitShow.AllShow;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最大答案长度
|
/// 最大答案长度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -475,6 +480,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制显示
|
||||||
|
/// </summary>
|
||||||
|
public LimitShow LimitShow { get; set; } = LimitShow.AllShow;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最大答案长度
|
/// 最大答案长度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1040,6 +1050,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制显示
|
||||||
|
/// </summary>
|
||||||
|
public LimitShow LimitShow { get; set; } = LimitShow.AllShow;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最大答案长度
|
/// 最大答案长度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1111,6 +1126,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制显示
|
||||||
|
/// </summary>
|
||||||
|
public LimitShow LimitShow { get; set; } = LimitShow.AllShow;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最大答案长度
|
/// 最大答案长度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1623,6 +1643,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制显示
|
||||||
|
/// </summary>
|
||||||
|
public LimitShow LimitShow { get; set; } = LimitShow.AllShow;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最大答案长度
|
/// 最大答案长度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2002,6 +2027,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制显示
|
||||||
|
/// </summary>
|
||||||
|
public LimitShow LimitShow { get; set; } = LimitShow.AllShow;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最大答案长度
|
/// 最大答案长度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -36,5 +36,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
Task AddOncologyTask(Guid oncologModuleId);
|
Task AddOncologyTask(Guid oncologModuleId);
|
||||||
|
|
||||||
Task<List<GetManualListOutDto>> GetManualList(GetManualListInDto inDto);
|
Task<List<GetManualListOutDto>> GetManualList(GetManualListInDto inDto);
|
||||||
|
|
||||||
|
Task ResetReadingRestTime(Guid? userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+116
-46
@@ -16,6 +16,7 @@ using Microsoft.Extensions.Caching.Memory;
|
|||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using DocumentFormat.OpenXml.Drawing;
|
using DocumentFormat.OpenXml.Drawing;
|
||||||
using EasyCaching.Core;
|
using EasyCaching.Core;
|
||||||
|
using DocumentFormat.OpenXml.Drawing.Charts;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
@@ -764,6 +765,16 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).ProjectTo<VisitTaskDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).ProjectTo<VisitTaskDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||||
|
|
||||||
|
if (taskinfo.VisitTaskNum == 0)
|
||||||
|
{
|
||||||
|
questions = questions.Where(x => x.LimitShow == LimitShow.AllShow || x.LimitShow == LimitShow.BaseLineShow).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
questions = questions.Where(x => x.LimitShow == LimitShow.AllShow || x.LimitShow == LimitShow.FollowShow).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
questions.ForEach(x =>
|
questions.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.CrterionDictionaryGroup = ReadingCommon.GetCrterionDictionaryGroup(taskinfo.IsConvertedTask);
|
x.CrterionDictionaryGroup = ReadingCommon.GetCrterionDictionaryGroup(taskinfo.IsConvertedTask);
|
||||||
@@ -841,10 +852,7 @@ namespace IRaCIS.Application.Services
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<List<GetTableAnswerRowInfoOutDto>> GetTableAnswerRowInfoList(GetTableAnswerRowInfoInDto inDto)
|
public async Task<List<GetTableAnswerRowInfoOutDto>> GetTableAnswerRowInfoList(GetTableAnswerRowInfoInDto inDto)
|
||||||
{
|
{
|
||||||
await _readingCalculateService.AddTaskLesionAnswerFromLastTask(new AddTaskLesionAnswerFromLastTaskInDto()
|
|
||||||
{
|
|
||||||
VisitTaskId = inDto.VisitTaskId
|
|
||||||
});
|
|
||||||
var result = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId)
|
var result = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId)
|
||||||
.WhereIf(inDto.QuestionId != null, x => x.QuestionId == inDto.QuestionId)
|
.WhereIf(inDto.QuestionId != null, x => x.QuestionId == inDto.QuestionId)
|
||||||
.ProjectTo<GetTableAnswerRowInfoOutDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex)
|
.ProjectTo<GetTableAnswerRowInfoOutDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex)
|
||||||
@@ -937,11 +945,14 @@ namespace IRaCIS.Application.Services
|
|||||||
result.TaskNum = visitTaskInfo.VisitTaskNum;
|
result.TaskNum = visitTaskInfo.VisitTaskNum;
|
||||||
result.QuestionMarkInfoList=await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ProjectTo<QuestionMarkInfo>(_mapper.ConfigurationProvider)
|
result.QuestionMarkInfoList=await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ProjectTo<QuestionMarkInfo>(_mapper.ConfigurationProvider)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
var spleenLength = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.SpleenLength).Select(x => x.Answer).FirstOrDefaultAsync();
|
||||||
|
|
||||||
return (result, new
|
return (result, new
|
||||||
{
|
{
|
||||||
readingTaskState = visitTaskInfo.ReadingTaskState,
|
readingTaskState = visitTaskInfo.ReadingTaskState,
|
||||||
FormType = criterionInfo.FormType,
|
FormType = criterionInfo.FormType,
|
||||||
TaskNum = visitTaskInfo.VisitTaskNum,
|
TaskNum = visitTaskInfo.VisitTaskNum,
|
||||||
|
SpleenLength= spleenLength,
|
||||||
|
|
||||||
}); ;
|
}); ;
|
||||||
}
|
}
|
||||||
@@ -1010,6 +1021,16 @@ namespace IRaCIS.Application.Services
|
|||||||
if (inDto.TaskId != null)
|
if (inDto.TaskId != null)
|
||||||
{
|
{
|
||||||
taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.TaskId).ProjectTo<VisitTaskDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.TaskId).ProjectTo<VisitTaskDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||||
|
if (taskInfo.VisitTaskNum == 0)
|
||||||
|
{
|
||||||
|
qusetionList = qusetionList.Where(x => x.LimitShow == LimitShow.AllShow || x.LimitShow == LimitShow.BaseLineShow).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qusetionList = qusetionList.Where(x => x.LimitShow == LimitShow.AllShow || x.LimitShow == LimitShow.FollowShow).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
qusetionList.ForEach(x =>
|
qusetionList.ForEach(x =>
|
||||||
{
|
{
|
||||||
@@ -1377,7 +1398,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 拆分病灶
|
/// 拆分病灶 分裂病灶
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
@@ -1423,6 +1444,11 @@ namespace IRaCIS.Application.Services
|
|||||||
});
|
});
|
||||||
await _readingTableAnswerRowInfoRepository.AddAsync(rowAnswer);
|
await _readingTableAnswerRowInfoRepository.AddAsync(rowAnswer);
|
||||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
|
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
|
||||||
|
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.RowId, x => new ReadingTableAnswerRowInfo()
|
||||||
|
{
|
||||||
|
SplitOrMergeType = SplitOrMergeType.SplitMain
|
||||||
|
});
|
||||||
|
|
||||||
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1586,7 +1612,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
var markquestionId = inDto.Answers.Select(y => y.Id).ToList();
|
var markquestionId = inDto.QuestionMarkInfoList.Select(y => y.QuestionId).ToList();
|
||||||
await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId&& markquestionId.Contains(x.QuestionId));
|
await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId&& markquestionId.Contains(x.QuestionId));
|
||||||
var datetime = DateTime.Now;
|
var datetime = DateTime.Now;
|
||||||
|
|
||||||
@@ -2155,11 +2181,6 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
|
||||||
{
|
|
||||||
ReadingTaskState = ReadingTaskState.Reading,
|
|
||||||
|
|
||||||
});
|
|
||||||
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
||||||
await this._readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
await this._readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
||||||
{
|
{
|
||||||
@@ -2548,6 +2569,15 @@ namespace IRaCIS.Application.Services
|
|||||||
task.IsNeedReadClinicalData = clinicalDataList.Where(x => x.ClinicalDataLevel != ClinicalLevel.Subject).Count() > 0;
|
task.IsNeedReadClinicalData = clinicalDataList.Where(x => x.ClinicalDataLevel != ClinicalLevel.Subject).Count() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (visitTaskInfo.ReadingTaskState == ReadingTaskState.WaitReading)
|
||||||
|
{
|
||||||
|
await _readingCalculateService.AddTaskLesionAnswerFromLastTask(new AddTaskLesionAnswerFromLastTaskInDto()
|
||||||
|
{
|
||||||
|
VisitTaskId = task.VisitTaskId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 如果已经签名 就不需要再读了
|
// 如果已经签名 就不需要再读了
|
||||||
task.IsNeedReadClinicalData = visitTaskInfo.ReadingTaskState == ReadingTaskState.HaveSigned ? false : task.IsNeedReadClinicalData;
|
task.IsNeedReadClinicalData = visitTaskInfo.ReadingTaskState == ReadingTaskState.HaveSigned ? false : task.IsNeedReadClinicalData;
|
||||||
task.DigitPlaces = criterionInfo.DigitPlaces;
|
task.DigitPlaces = criterionInfo.DigitPlaces;
|
||||||
@@ -2559,6 +2589,12 @@ namespace IRaCIS.Application.Services
|
|||||||
task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode;
|
task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode;
|
||||||
task.ExistsManual = (await GetManualList(new GetManualListInDto() { TrialId = visitTaskInfo.TrialId })).Count > 0;
|
task.ExistsManual = (await GetManualList(new GetManualListInDto() { TrialId = visitTaskInfo.TrialId })).Count > 0;
|
||||||
task.ReadingTaskState = visitTaskInfo.ReadingTaskState;
|
task.ReadingTaskState = visitTaskInfo.ReadingTaskState;
|
||||||
|
// 添加默认答案
|
||||||
|
if (inDto.VisitTaskId == null && visitTaskInfo.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||||
|
{
|
||||||
|
await AddDefaultValueToTask(task.VisitTaskId);
|
||||||
|
|
||||||
|
}
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2569,54 +2605,88 @@ namespace IRaCIS.Application.Services
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task VerifyReadingRestTime()
|
public async Task VerifyReadingRestTime()
|
||||||
{
|
{
|
||||||
var cacheKey = _userInfo.Id.ToString()+ "RestTime";
|
var userTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt;
|
||||||
|
if (userTypeEnum != UserTypeEnum.IndependentReviewer)
|
||||||
|
|
||||||
var value = _provider.Get<string>(cacheKey).Value;
|
|
||||||
if (value == null)
|
|
||||||
{
|
{
|
||||||
_provider.Set(cacheKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(5));
|
return;
|
||||||
// _cache.Set(cacheKey, DateTime.Now.ToString(), TimeSpan.FromHours(5));
|
}
|
||||||
|
var startReadingTimeKey = _userInfo.Id.ToString()+ "StartReadingTime";
|
||||||
|
var startRestTimeKey = _userInfo.Id.ToString() + "StartRestTime";
|
||||||
|
|
||||||
|
int readingMinute = 120; // 为60整数
|
||||||
|
int restMinute = 10; //
|
||||||
|
var startReadingTime = _provider.Get<string>(startReadingTimeKey).Value;
|
||||||
|
var startRestTime = _provider.Get<string>(startRestTimeKey).Value;
|
||||||
|
if (startReadingTime == null && startRestTime == null)
|
||||||
|
{
|
||||||
|
_provider.Set(startReadingTimeKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||||
|
}
|
||||||
|
else if (startRestTime != null)
|
||||||
|
{
|
||||||
|
var cacheStartRestTime = DateTime.Parse(startRestTime!.ToString());
|
||||||
|
int timespanMin = (DateTime.Now - cacheStartRestTime).Minutes;
|
||||||
|
if (timespanMin <= restMinute)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute/60m, restMinute]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// 休息时间>10分钟 删除休息时间的缓存 记录开始阅片时间
|
||||||
|
_provider.Remove(startRestTimeKey);
|
||||||
|
_provider.Set(startReadingTimeKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// 如果开始阅片时间 不为空
|
||||||
|
else if (startReadingTime != null)
|
||||||
|
{
|
||||||
#region 两小时
|
#region 两小时
|
||||||
var cacheDate = DateTime.Parse(value.ToString());
|
var cacheDate = DateTime.Parse(startReadingTime!.ToString());
|
||||||
int timespanMin = (DateTime.Now - cacheDate).Minutes;
|
int timespanMin = (DateTime.Now - cacheDate).Minutes;
|
||||||
if (timespanMin > 120 && timespanMin < 140)
|
if (timespanMin > readingMinute)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", 2, 20]);
|
|
||||||
|
_provider.Remove(startReadingTimeKey);
|
||||||
|
_provider.Set(startRestTimeKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute / 60m, restMinute]);
|
||||||
}
|
}
|
||||||
else if (timespanMin > 140)
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重置阅片时间 登录和解锁调用
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task ResetReadingRestTime(Guid? userID)
|
||||||
{
|
{
|
||||||
cacheDate = cacheDate.AddMinutes((Math.Floor((double)(timespanMin / 140))) * 140);
|
if(userID == null)
|
||||||
_provider.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5));
|
{
|
||||||
// _cache.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5));
|
userID = _userInfo.Id;
|
||||||
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 测试用的5分钟
|
|
||||||
//var cacheDate = DateTime.Parse(value.ToString());
|
|
||||||
//int timespanMin = (DateTime.Now - cacheDate).Minutes;
|
|
||||||
//if (timespanMin >= 5 && timespanMin <= 10)
|
|
||||||
//{
|
|
||||||
// throw new BusinessValidationFailedException("您已连续阅片2个小时,请休息20分钟后,再继续阅片。");
|
|
||||||
//}
|
|
||||||
//else if (timespanMin > 10)
|
|
||||||
//{
|
|
||||||
// cacheDate = cacheDate.AddMinutes((Math.Floor((double)(timespanMin / 10))) * 10);
|
|
||||||
// _cache.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5));
|
|
||||||
|
|
||||||
//}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var startReadingTimeKey = userID.ToString() + "StartReadingTime";
|
||||||
|
var startRestTimeKey = userID.ToString() + "StartRestTime";
|
||||||
|
//int readingMinute = 120; // 为60整数
|
||||||
|
int restMinute = 10; //
|
||||||
|
|
||||||
|
var startReadingTime = _provider.Get<string>(startReadingTimeKey).Value;
|
||||||
|
var startRestTime = _provider.Get<string>(startRestTimeKey).Value;
|
||||||
|
if (startRestTime != null)
|
||||||
|
{
|
||||||
|
var cacheStartRestTime = DateTime.Parse(startRestTime!.ToString());
|
||||||
|
int timespanMin = (DateTime.Now - cacheStartRestTime).Minutes;
|
||||||
|
if (timespanMin > restMinute)
|
||||||
|
{
|
||||||
|
_provider.Remove(startRestTimeKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (startReadingTime != null)
|
||||||
|
{
|
||||||
|
_provider.Set(startReadingTimeKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -55,11 +55,6 @@ namespace IRaCIS.Application.Services
|
|||||||
TrialId = inDto.TrialId
|
TrialId = inDto.TrialId
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
|
||||||
{
|
|
||||||
ReadingTaskState = ReadingTaskState.Reading,
|
|
||||||
|
|
||||||
});
|
|
||||||
await _readingTaskQuestionAnswerRepository.AddRangeAsync(readingTaskAnswerList);
|
await _readingTaskQuestionAnswerRepository.AddRangeAsync(readingTaskAnswerList);
|
||||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
|
|||||||
+61
-7
@@ -149,16 +149,56 @@ namespace IRaCIS.Application.Services
|
|||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
var oncologyReadingQuestions = await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == inDto.VisitTaskId).ToListAsync();
|
var oncologyReadingQuestions = await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == inDto.VisitTaskId).ToListAsync();
|
||||||
|
// 上一次肿瘤学阅片
|
||||||
|
|
||||||
|
var lastOncologyTask = await _visitTaskRepository.Where(x =>
|
||||||
|
x.ReadingCategory == ReadingCategory.Oncology
|
||||||
|
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||||
|
&& x.TaskState == TaskState.Effect
|
||||||
|
&& x.ReadingTaskState == ReadingTaskState.HaveSigned
|
||||||
|
&& x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||||
|
&& x.VisitTaskNum < taskInfo.VisitTaskNum
|
||||||
|
).OrderByDescending(x => x.VisitTaskNum).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
List<ReadingOncologyTaskInfo> lastOncologyAnswerList= new List<ReadingOncologyTaskInfo>();
|
||||||
|
|
||||||
|
if (lastOncologyTask != null&& taskInfo.TaskState==TaskState.Effect&&taskInfo.ReadingTaskState!=ReadingTaskState.HaveSigned)
|
||||||
|
{
|
||||||
|
lastOncologyAnswerList= await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == lastOncologyTask.Id).ToListAsync();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
oncologyVisits.ForEach(x =>
|
oncologyVisits.ForEach(x =>
|
||||||
{
|
{
|
||||||
var oncologyData = oncologyReadingQuestions.Where(y => y.VisitTaskId == x.VisitTaskId).FirstOrDefault();
|
var oncologyData = oncologyReadingQuestions.Where(y => y.VisitTaskId == x.VisitTaskId).FirstOrDefault();
|
||||||
|
var lastOncologyData = lastOncologyAnswerList.Where(y => y.VisitTaskId == x.VisitTaskId).FirstOrDefault();
|
||||||
|
|
||||||
if (oncologyData != null)
|
var evaluationResult = string.Empty;
|
||||||
|
var evaluationReason = string.Empty;
|
||||||
|
if (oncologyData != null && !oncologyData.EvaluationResult.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
x.EvaluationResult = oncologyData.EvaluationResult;
|
evaluationResult = oncologyData.EvaluationResult;
|
||||||
x.EvaluationReason = oncologyData.EvaluationReason;
|
|
||||||
}
|
}
|
||||||
|
else if (lastOncologyData != null && !lastOncologyData.EvaluationResult.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
evaluationResult = lastOncologyData.EvaluationResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (oncologyData != null && !oncologyData.EvaluationReason.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
evaluationReason = oncologyData.EvaluationReason;
|
||||||
|
}
|
||||||
|
else if (lastOncologyData != null && !lastOncologyData.EvaluationReason.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
evaluationReason = lastOncologyData.EvaluationReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
x.EvaluationResult = evaluationResult;
|
||||||
|
x.EvaluationReason = evaluationReason;
|
||||||
|
|
||||||
x.QuestionList = globalTaskReadingInfo.TaskList.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(x => x.GlobalAnswerType == GlobalAnswerType.Question)
|
x.QuestionList = globalTaskReadingInfo.TaskList.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(x => x.GlobalAnswerType == GlobalAnswerType.Question)
|
||||||
.Select(y => new OncologyQuestion
|
.Select(y => new OncologyQuestion
|
||||||
{
|
{
|
||||||
@@ -229,7 +269,6 @@ namespace IRaCIS.Application.Services
|
|||||||
// 这里先保存 签名的时候 会统一创建关系
|
// 这里先保存 签名的时候 会统一创建关系
|
||||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == inDto.OncologyTaskId, u => new VisitTask()
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == inDto.OncologyTaskId, u => new VisitTask()
|
||||||
{
|
{
|
||||||
ReadingTaskState = ReadingTaskState.Reading,
|
|
||||||
RelatedVisitTaskIds = relatedVisitTaskIds
|
RelatedVisitTaskIds = relatedVisitTaskIds
|
||||||
}) ;
|
}) ;
|
||||||
|
|
||||||
@@ -293,7 +332,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
finishReading = true;
|
finishReading = true;
|
||||||
}
|
}
|
||||||
else if (judgeVisitTaskId != null && (await _visitTaskRepository.AnyAsync(x => x.Id == judgeVisitTaskId.Value && x.ReadingTaskState == ReadingTaskState.HaveSigned)))
|
else if (judgeVisitTaskId != null && (await _visitTaskRepository.AnyAsync(x => x.Id == judgeVisitTaskId.Value&&x.JudgeResultTaskId!=null && x.ReadingTaskState == ReadingTaskState.HaveSigned)))
|
||||||
{
|
{
|
||||||
finishReading = true;
|
finishReading = true;
|
||||||
}
|
}
|
||||||
@@ -326,9 +365,24 @@ namespace IRaCIS.Application.Services
|
|||||||
ReadingCategory = ReadingCategory.Oncology,
|
ReadingCategory = ReadingCategory.Oncology,
|
||||||
});
|
});
|
||||||
|
|
||||||
var originalVisitId = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModuleId && x.TaskState == TaskState.Effect && x.ReadingCategory == ReadingCategory.Global
|
var originalVisit = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModuleId && x.TaskState == TaskState.Effect && x.ReadingCategory == ReadingCategory.Global
|
||||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && !x.IsAnalysisCreate && x.TrialReadingCriterionId == readModuleInfo.TrialReadingCriterionId
|
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && !x.IsAnalysisCreate && x.TrialReadingCriterionId == readModuleInfo.TrialReadingCriterionId
|
||||||
).Select(x => x.Id).FirstOrDefaultAsync();
|
).OrderByDescending(x => x.VisitTaskNum).ThenBy(x => x.ArmEnum).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var originalVisitId = default(Guid);
|
||||||
|
|
||||||
|
if (originalVisit.JudgeVisitTaskId != null)
|
||||||
|
{
|
||||||
|
originalVisitId = (await _visitTaskRepository.Where(x => x.Id == originalVisit.JudgeVisitTaskId).Select(x => x.JudgeResultTaskId).FirstOrDefaultAsync()) ?? originalVisit.Id;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
originalVisitId = originalVisit.Id;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
||||||
{
|
{
|
||||||
OriginalVisitId= originalVisitId,
|
OriginalVisitId= originalVisitId,
|
||||||
|
|||||||
@@ -12,6 +12,31 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public Guid VisitTaskId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class CalculateTargetLesionStatusInDto
|
||||||
|
{
|
||||||
|
public Guid VisitTaskId { get; set;}
|
||||||
|
|
||||||
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
|
public decimal RowNumber { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetSplitPPdOutDto
|
||||||
|
{
|
||||||
|
public Guid RowId { get; set; }
|
||||||
|
|
||||||
|
public string RowIndex { get; set; }
|
||||||
|
|
||||||
|
public decimal AllPPD { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetSplitPPdInDto
|
||||||
|
{
|
||||||
|
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class ReadingTaskQuestionAnswerDto : ReadingTaskQuestionAnswer
|
public class ReadingTaskQuestionAnswerDto : ReadingTaskQuestionAnswer
|
||||||
{
|
{
|
||||||
public QuestionType QuestionType { get; set; }
|
public QuestionType QuestionType { get; set; }
|
||||||
|
|||||||
+13
-14
@@ -127,35 +127,34 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
{
|
{
|
||||||
var service = await this.GetService(inDto.VisitTaskId);
|
var service = await this.GetService(inDto.VisitTaskId);
|
||||||
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
var result = new AddTaskLesionAnswerFromLastTaskOutDto();
|
||||||
|
var readingTaskState = visitTaskInfo.ReadingTaskState;
|
||||||
if (service != null && visitTaskInfo.SourceSubjectVisitId != null)
|
if (service != null && visitTaskInfo.SourceSubjectVisitId != null)
|
||||||
{
|
{
|
||||||
var readingTaskState = visitTaskInfo.ReadingTaskState;
|
|
||||||
var result = new AddTaskLesionAnswerFromLastTaskOutDto();
|
|
||||||
|
|
||||||
if (readingTaskState == ReadingTaskState.WaitReading)
|
if (readingTaskState == ReadingTaskState.WaitReading)
|
||||||
|
{
|
||||||
|
if (visitTaskInfo.ReadingCategory == ReadingCategory.Visit)
|
||||||
{
|
{
|
||||||
result = await service.AddTaskLesionAnswerFromLastTask(inDto);
|
result = await service.AddTaskLesionAnswerFromLastTask(inDto);
|
||||||
await service.CalculateTask(new CalculateTaskInDto()
|
await service.CalculateTask(new CalculateTaskInDto()
|
||||||
{
|
{
|
||||||
IsChangeOtherTask = false,
|
IsChangeOtherTask = false,
|
||||||
VisitTaskId = inDto.VisitTaskId,
|
VisitTaskId = inDto.VisitTaskId,
|
||||||
ComputationTrigger=ComputationTrigger.Report,
|
ComputationTrigger = ComputationTrigger.Report,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.VisitTaskId, x => new VisitTask()
|
}
|
||||||
|
}
|
||||||
|
if (readingTaskState == ReadingTaskState.WaitReading)
|
||||||
|
{
|
||||||
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
||||||
{
|
{
|
||||||
ReadingTaskState = ReadingTaskState.Reading,
|
ReadingTaskState = ReadingTaskState.Reading,
|
||||||
|
},true);
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return new AddTaskLesionAnswerFromLastTaskOutDto();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ using Microsoft.Extensions.Caching.Memory;
|
|||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using System.Reflection.Metadata.Ecma335;
|
using System.Reflection.Metadata.Ecma335;
|
||||||
|
using System.Linq;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using DocumentFormat.OpenXml.Drawing.Charts;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
{
|
{
|
||||||
@@ -402,7 +405,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
if (lowPddTaskid != default(Guid))
|
if (lowPddTaskid != default(Guid))
|
||||||
{
|
{
|
||||||
|
|
||||||
var lowPPDAnswerList = await _readingTableQuestionAnswerRepository.Where(x =>x.VisitTaskId== lowPddTaskid
|
var lowPPDAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == lowPddTaskid
|
||||||
&& x.QuestionId == inDto.QuestionId
|
&& x.QuestionId == inDto.QuestionId
|
||||||
&& x.RowIndex == inDto.RowIndex).Include(x => x.ReadingTableQuestionTrial)
|
&& x.RowIndex == inDto.RowIndex).Include(x => x.ReadingTableQuestionTrial)
|
||||||
.Select(x => new
|
.Select(x => new
|
||||||
@@ -445,7 +448,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
var calculateDto = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
|
var calculateDto = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
|
||||||
return new GetReportVerifyOutDto()
|
return new GetReportVerifyOutDto()
|
||||||
{
|
{
|
||||||
TumorEvaluate = calculateDto.QuestionInfo.Where(x=>x.QuestionType==QuestionType.ImgOncology).Select(x=>x.Answer).FirstOrDefault(),
|
TumorEvaluate = calculateDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.ImgOncology).Select(x => x.Answer).FirstOrDefault(),
|
||||||
IsExistDisease = await this.GetReportIsExistDisease(inDto.VisitTaskId),
|
IsExistDisease = await this.GetReportIsExistDisease(inDto.VisitTaskId),
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -513,6 +516,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
// PET 5PS评分
|
// PET 5PS评分
|
||||||
new ReadingCalculateData (){QuestionType=QuestionType.PET5PS,GetStringFun=GetPET5PS,ComputationTrigger=ComputationTrigger.Lesion},
|
new ReadingCalculateData (){QuestionType=QuestionType.PET5PS,GetStringFun=GetPET5PS,ComputationTrigger=ComputationTrigger.Lesion},
|
||||||
|
|
||||||
|
// 修改PET 5PS评分备注
|
||||||
|
new ReadingCalculateData (){QuestionType=QuestionType.PSScoreRemarks,GetStringFun=GetPET5PSRemark,ComputationTrigger=ComputationTrigger.Lesion},
|
||||||
|
|
||||||
////与基线相比摄取值变化
|
////与基线相比摄取值变化
|
||||||
//new ReadingCalculateData (){QuestionType=QuestionType.UptakeChange,GetStringFun=GetUptakeChange,ComputationTrigger=ComputationTrigger.Lesion},
|
//new ReadingCalculateData (){QuestionType=QuestionType.UptakeChange,GetStringFun=GetUptakeChange,ComputationTrigger=ComputationTrigger.Lesion},
|
||||||
|
|
||||||
@@ -671,7 +677,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
|
|
||||||
if (valueOfTypes.Contains(item.ValueType))
|
if (valueOfTypes.Contains(item.ValueType))
|
||||||
{
|
{
|
||||||
item.Answer = decimal.Round(decimal.Parse(item.Answer ?? "0"), inDto.DigitPlaces).ToString("F"+ inDto.DigitPlaces.ToString());
|
item.Answer = decimal.Round(decimal.Parse(item.Answer ?? "0"), inDto.DigitPlaces).ToString("F" + inDto.DigitPlaces.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
@@ -761,6 +767,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
|
||||||
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Answer == string.Empty || x.Answer == null)
|
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Answer == string.Empty || x.Answer == null)
|
||||||
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
||||||
)
|
)
|
||||||
@@ -817,17 +826,221 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', stateIsNullList)] + ",";
|
errorMassage += _localizer["ReadingCalculate_NoMarkerEmpty", string.Join(',', stateIsNullList)] + ",";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断是否有pet
|
||||||
|
if (await _readingTaskQuestionAnswerRepository.AnyAsync(x => x.ReadingQuestionTrial.QuestionType == QuestionType.ExistPET && x.VisitTaskId == inDto.VisitTaskId && x.Answer == ReadingYesOrNo.Yes.GetEnumInt()))
|
||||||
|
{
|
||||||
|
|
||||||
|
List<QuestionType?> required = new List<QuestionType?>() {
|
||||||
|
QuestionType.LiverSUVmax,
|
||||||
|
QuestionType.MediastinumSUVmax,
|
||||||
|
QuestionType.SUVmax,
|
||||||
|
QuestionType.SUVmaxLesion,
|
||||||
|
QuestionType.PET5PS,
|
||||||
|
};
|
||||||
|
if (taskinfo.VisitTaskNum != 0m)
|
||||||
|
{
|
||||||
|
required.Add(QuestionType.UptakeChange);
|
||||||
|
required.Add(QuestionType.EvidenceFocalFDG);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((await _readingTaskQuestionAnswerRepository.CountAsync(x => required.Contains(x.ReadingQuestionTrial.QuestionType) && x.VisitTaskId == inDto.VisitTaskId && x.Answer != string.Empty)) != required.Count())
|
||||||
|
{
|
||||||
|
if (taskinfo.VisitTaskNum != 0m)
|
||||||
|
{
|
||||||
|
errorMassage += _localizer["ReadingCalculate_LuganoPetVerification"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMassage += _localizer["ReadingCalculate_LuganoBaseLinePetVerification"];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (errorMassage != string.Empty)
|
if (errorMassage != string.Empty)
|
||||||
{
|
{
|
||||||
errorMassage = _localizer["ReadingCalculate_Questionable"] + errorMassage;
|
//errorMassage = errorMassage;
|
||||||
throw new BusinessValidationFailedException(errorMassage);
|
throw new BusinessValidationFailedException(errorMassage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计算靶病灶状态
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task CalculateTargetLesionStatus(CalculateTargetLesionStatusInDto inDto)
|
||||||
|
{
|
||||||
|
if (inDto.RowNumber % 1 != 0)
|
||||||
|
{
|
||||||
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
// 找到靶病灶问题
|
||||||
|
var targetQuestion = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.LesionType == LesionType.TargetLesion).FirstOrDefaultAsync();
|
||||||
|
if(targetQuestion!=null)
|
||||||
|
{
|
||||||
|
// 找到状态问题
|
||||||
|
var stateQuestion = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == targetQuestion.Id && x.QuestionMark == QuestionMark.State).FirstOrDefaultAsync();
|
||||||
|
if (stateQuestion != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
// 找到主病灶的状态
|
||||||
|
var state =await _readingTableQuestionAnswerRepository.Where(x=>x.VisitTaskId==inDto.VisitTaskId&&x.RowIndex== (int)Math.Floor(inDto.RowNumber)&&x.TableQuestionId== stateQuestion.Id).Select(x=>x.Answer).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
// 长径
|
||||||
|
var majorAxis = (await _readingTableQuestionAnswerRepository.Where(x =>
|
||||||
|
x.VisitTaskId == inDto.VisitTaskId &&
|
||||||
|
x.RowIndex == (int)Math.Floor(inDto.RowNumber) &&
|
||||||
|
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.MajorAxis &&
|
||||||
|
x.QuestionId== targetQuestion.Id
|
||||||
|
).Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0();
|
||||||
|
|
||||||
|
// 短径
|
||||||
|
var shortAxis = (await _readingTableQuestionAnswerRepository.Where(x =>
|
||||||
|
x.VisitTaskId == inDto.VisitTaskId &&
|
||||||
|
x.RowIndex == (int)Math.Floor(inDto.RowNumber) &&
|
||||||
|
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.ShortAxis &&
|
||||||
|
x.QuestionId == targetQuestion.Id
|
||||||
|
).Select(x => x.Answer).FirstOrDefaultAsync()).IsNullOrEmptyReturn0();
|
||||||
|
|
||||||
|
// 找到ppd问题
|
||||||
|
var ppdQuestion = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == targetQuestion.Id && x.QuestionMark == QuestionMark.PPD).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
if(ppdQuestion!=null)
|
||||||
|
{
|
||||||
|
var ppdAnswerList= await _readingTableQuestionAnswerRepository.Where(x =>
|
||||||
|
x.VisitTaskId == inDto.VisitTaskId &&
|
||||||
|
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.PPD &&
|
||||||
|
x.QuestionId == targetQuestion.Id &&
|
||||||
|
x.RowIndex >= (int)Math.Floor(inDto.RowNumber) && x.RowIndex < ((int)Math.Floor(inDto.RowNumber) + 1)
|
||||||
|
).Select(x => x.Answer).ToListAsync();
|
||||||
|
|
||||||
|
var allPPd = ppdAnswerList.Select(x => x.IsNullOrEmptyReturn0()).Sum();
|
||||||
|
|
||||||
|
// 是否符合疾病进展
|
||||||
|
var accord = false;
|
||||||
|
|
||||||
|
var lowPPDInfo = await GetLowPPDInfo(new GetPPDInfoInDto()
|
||||||
|
{
|
||||||
|
RowIndex = (int)Math.Floor(inDto.RowNumber),
|
||||||
|
VisitTaskId = inDto.VisitTaskId,
|
||||||
|
QuestionId = inDto.QuestionId,
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (lowPPDInfo.NadirPPD != 0)
|
||||||
|
{
|
||||||
|
//15mm < 当前靶病灶LDi≤20mm &&
|
||||||
|
//&& 相比最低点PPD增加百分比 ≥50% &&
|
||||||
|
//(相比PPD最低点LDi增加值 ≥5 mm
|
||||||
|
//or相比PPD最低点SDi增加值≥5 mm)
|
||||||
|
if (15 < majorAxis && majorAxis <= 20 &&
|
||||||
|
(allPPd - lowPPDInfo.NadirPPD) * 100 / lowPPDInfo.NadirPPD >= 50 &&
|
||||||
|
(majorAxis - lowPPDInfo.LowPPDLDi >= 5 ||
|
||||||
|
shortAxis - lowPPDInfo.LowPPDSDi >= 5)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
accord = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//当前靶病灶LDi>20 mm
|
||||||
|
//相比最低点PPD增加百分比 ≥50%
|
||||||
|
// (相比PPD最低点LDi增加值 ≥10 mm
|
||||||
|
// 或者相比PPD最低点SDi增加值Sdi ≥10 mm)
|
||||||
|
if ( majorAxis > 20 &&
|
||||||
|
(allPPd - lowPPDInfo.NadirPPD) * 100 / lowPPDInfo.NadirPPD >= 50 &&
|
||||||
|
(majorAxis - lowPPDInfo.LowPPDLDi >= 10 ||
|
||||||
|
shortAxis - lowPPDInfo.LowPPDSDi >= 10)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
accord = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 符合疾病进展
|
||||||
|
if (accord)
|
||||||
|
{
|
||||||
|
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x =>
|
||||||
|
x.VisitTaskId == inDto.VisitTaskId &&
|
||||||
|
x.RowIndex == (int)Math.Floor(inDto.RowNumber) &&
|
||||||
|
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State &&
|
||||||
|
x.QuestionId == targetQuestion.Id, x => new ReadingTableQuestionAnswer()
|
||||||
|
{
|
||||||
|
Answer = TargetState.DiseaseProgression.GetEnumInt()
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if (state == TargetState.DiseaseProgression.GetEnumInt())
|
||||||
|
{
|
||||||
|
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x =>
|
||||||
|
x.VisitTaskId == inDto.VisitTaskId &&
|
||||||
|
x.RowIndex == (int)Math.Floor(inDto.RowNumber) &&
|
||||||
|
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State &&
|
||||||
|
x.QuestionId == targetQuestion.Id, x => new ReadingTableQuestionAnswer()
|
||||||
|
{
|
||||||
|
Answer = TargetState.Exist.GetEnumInt()
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取分裂病灶的PPd之和 不包括当前的主病灶
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetSplitPPdOutDto>> GetSplitPPdSum(GetSplitPPdInDto inDto)
|
||||||
|
{
|
||||||
|
List<GetSplitPPdOutDto> result = new List<GetSplitPPdOutDto>();
|
||||||
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
var targetQuestion = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.LesionType == LesionType.TargetLesion).FirstOrDefaultAsync();
|
||||||
|
if (targetQuestion != null)
|
||||||
|
{
|
||||||
|
var ppdAnswerList = await _readingTableQuestionAnswerRepository.Where(x =>
|
||||||
|
x.VisitTaskId == inDto.VisitTaskId &&
|
||||||
|
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.PPD &&
|
||||||
|
x.QuestionId == targetQuestion.Id)
|
||||||
|
.Select(x => new {
|
||||||
|
x.RowId,
|
||||||
|
x.RowIndex,
|
||||||
|
x.Answer
|
||||||
|
}).ToListAsync();
|
||||||
|
var answerList = ppdAnswerList.Select(x => new {
|
||||||
|
x.RowId,
|
||||||
|
x.RowIndex,
|
||||||
|
Answer = x.Answer.IsNullOrEmptyReturn0()
|
||||||
|
}).ToList();
|
||||||
|
var maxRowIndex = answerList.MaxOrDefault(x => x.RowIndex);
|
||||||
|
for (int i = 1; i < maxRowIndex; i++)
|
||||||
|
{
|
||||||
|
result.Add(new GetSplitPPdOutDto()
|
||||||
|
{
|
||||||
|
RowId = answerList.Where(x => x.RowIndex == i).Select(x => x.RowId).FirstOrDefault(),
|
||||||
|
RowIndex = answerList.Where(x => x.RowIndex == i).Select(x => x.RowIndex).FirstOrDefault().ToString(),
|
||||||
|
AllPPD = answerList.Where(x => x.RowIndex > i && x.RowIndex < (i + 1)).Sum(x => x.Answer),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
#region 将上一次的访视病灶添加到这一次
|
#region 将上一次的访视病灶添加到这一次
|
||||||
|
|
||||||
@@ -1744,31 +1957,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region 最低
|
var lowSpleenLength = await this.GetLowSpleenLength(taskinfo);
|
||||||
var visitTaskIds = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
|
|
||||||
x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId &&
|
|
||||||
x.IsAnalysisCreate == taskinfo.IsAnalysisCreate &&
|
|
||||||
x.DoctorUserId == taskinfo.DoctorUserId &&
|
|
||||||
x.IsSelfAnalysis == taskinfo.IsSelfAnalysis &&
|
|
||||||
x.SubjectId == taskinfo.SubjectId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ArmEnum == taskinfo.ArmEnum
|
|
||||||
&& x.VisitTaskNum < taskinfo.VisitTaskNum && x.TaskState == TaskState.Effect
|
|
||||||
).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).ToListAsync();
|
|
||||||
|
|
||||||
var questionId = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.QuestionType == QuestionType.SpleenLength).Select(x => x.Id).FirstNotNullAsync();
|
|
||||||
var answerList = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)
|
|
||||||
&& x.ReadingQuestionTrialId == questionId )
|
|
||||||
.Select(x => new
|
|
||||||
{
|
|
||||||
x.Answer,
|
|
||||||
x.VisitTaskId,
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
var lowSpleenLength = answerList.Select(x => new
|
|
||||||
{
|
|
||||||
Answer = x.Answer.IsNullOrEmptyReturn0(),
|
|
||||||
x.VisitTaskId
|
|
||||||
}).OrderBy(x => x.Answer).Select(x=>x.Answer).FirstOrDefault();
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
var result = SpleenAssessment.Stabilization;
|
var result = SpleenAssessment.Stabilization;
|
||||||
@@ -1818,8 +2007,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
result = SpleenAssessment.Normal;
|
result = SpleenAssessment.Normal;
|
||||||
}
|
}
|
||||||
//1、基线期 状态为“肿大”
|
//1、基线期 状态为“肿大”
|
||||||
//与基线相比脾肿大增加的百分比 < 50%
|
//与基线相比脾肿大增加的百分比 < -50%
|
||||||
else if (baseLineState.EqEnum(SpleenAssessment.Swelling) && percentage < 50)
|
else if (baseLineState.EqEnum(SpleenAssessment.Swelling) && percentage < -50)
|
||||||
{
|
{
|
||||||
result = SpleenAssessment.Remission;
|
result = SpleenAssessment.Remission;
|
||||||
}
|
}
|
||||||
@@ -1831,6 +2020,77 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取最低垂直径
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private async Task<decimal> GetLowSpleenLength(VisitTask taskinfo)
|
||||||
|
{
|
||||||
|
var visitTaskIds = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
|
||||||
|
x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId &&
|
||||||
|
x.IsAnalysisCreate == taskinfo.IsAnalysisCreate &&
|
||||||
|
x.DoctorUserId == taskinfo.DoctorUserId &&
|
||||||
|
x.IsSelfAnalysis == taskinfo.IsSelfAnalysis &&
|
||||||
|
x.SubjectId == taskinfo.SubjectId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ArmEnum == taskinfo.ArmEnum
|
||||||
|
&& x.VisitTaskNum < taskinfo.VisitTaskNum && x.TaskState == TaskState.Effect
|
||||||
|
).OrderByDescending(x => x.VisitTaskNum).Select(x => x.Id).ToListAsync();
|
||||||
|
|
||||||
|
var questionId = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.QuestionType == QuestionType.SpleenLength).Select(x => x.Id).FirstNotNullAsync();
|
||||||
|
var answerList = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)
|
||||||
|
&& x.ReadingQuestionTrialId == questionId)
|
||||||
|
.Select(x => new
|
||||||
|
{
|
||||||
|
x.Answer,
|
||||||
|
x.VisitTaskId,
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
var lowSpleenLength = answerList.Select(x => new
|
||||||
|
{
|
||||||
|
Answer = x.Answer.IsNullOrEmptyReturn0(),
|
||||||
|
x.VisitTaskId
|
||||||
|
}).OrderBy(x => x.Answer).Select(x => x.Answer).FirstOrDefault();
|
||||||
|
|
||||||
|
return lowSpleenLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取脾脏验证
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="visitTaskId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<object> GetSplenicVerify(Guid visitTaskId)
|
||||||
|
{
|
||||||
|
|
||||||
|
ReadingCalculateDto inDto = await _generalCalculateService.GetReadingCalculateDto(visitTaskId);
|
||||||
|
|
||||||
|
// 基线垂直径
|
||||||
|
var baseLineSpleenLength = await GetBaseLineSpleenLength(inDto);
|
||||||
|
|
||||||
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var baseLineTaskId = await GetBaseLineTaskId(inDto);
|
||||||
|
|
||||||
|
// 最低垂直经
|
||||||
|
var lowSpleenLength= await this.GetLowSpleenLength(taskinfo);
|
||||||
|
|
||||||
|
// 基线状态
|
||||||
|
var baseLineState = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == baseLineTaskId && x.ReadingQuestionTrial.QuestionType == QuestionType.SplenicStatus).Select(x => x.Answer).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
return new
|
||||||
|
{
|
||||||
|
|
||||||
|
//基线垂直径
|
||||||
|
BaseLineSpleenLength = baseLineSpleenLength,
|
||||||
|
// 最低垂直经
|
||||||
|
LowSpleenLength = lowSpleenLength,
|
||||||
|
// 基线状态
|
||||||
|
BaseLineState = baseLineState,
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#region 获取脾脏评估
|
#region 获取脾脏评估
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1922,7 +2182,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
//{
|
//{
|
||||||
// return SpleenAssessment.Stabilization.GetEnumInt();
|
// return SpleenAssessment.Stabilization.GetEnumInt();
|
||||||
//}
|
//}
|
||||||
Console.WriteLine("计算了PET5PS,当前接口" + _userInfo.RequestUrl);
|
|
||||||
if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.ExistPET && x.Answer == ReadingYesOrNo.No.GetEnumInt()))
|
if (inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.ExistPET && x.Answer == ReadingYesOrNo.No.GetEnumInt()))
|
||||||
{
|
{
|
||||||
return PET5PSScore.NE.GetEnumInt();
|
return PET5PSScore.NE.GetEnumInt();
|
||||||
@@ -1954,34 +2214,50 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 本访视病灶的 max SUVmax(所有病灶中最大的)> 2 * 肝脏血池SUVmax
|
// 本访视病灶的 max SUVmax(所有病灶中最大的)> 2 * 肝脏血池SUVmax
|
||||||
else if (maxSUVmax >2* LiverSUVmax)
|
else if (maxSUVmax >2* LiverSUVmax&& LiverSUVmax != 0m)
|
||||||
{
|
{
|
||||||
result = PET5PSScore.Five;
|
result = PET5PSScore.Five;
|
||||||
}
|
}
|
||||||
//本访视病灶的SUVmax(所有病灶中最大的)>肝脏血池SUVmax
|
//本访视病灶的SUVmax(所有病灶中最大的)>肝脏血池SUVmax
|
||||||
else if (maxSUVmax > LiverSUVmax)
|
else if (maxSUVmax > LiverSUVmax && LiverSUVmax != 0)
|
||||||
{
|
{
|
||||||
result = PET5PSScore.Four;
|
result = PET5PSScore.Four;
|
||||||
}
|
}
|
||||||
//纵隔血池SUVmax<本访视点病灶的max SUVmax(所有病灶中最大的)≤1*肝脏血池SUVmax
|
//纵隔血池SUVmax<本访视点病灶的max SUVmax(所有病灶中最大的)≤1*肝脏血池SUVmax
|
||||||
else if (MediastinumSUVmax < maxSUVmax&& maxSUVmax <= LiverSUVmax)
|
else if (MediastinumSUVmax < maxSUVmax&& maxSUVmax <= LiverSUVmax&& MediastinumSUVmax != 0)
|
||||||
{
|
{
|
||||||
result = PET5PSScore.Three;
|
result = PET5PSScore.Three;
|
||||||
}
|
}
|
||||||
//本访视点病灶的SUVmax(所有病灶中最大的)<纵隔血池SUVmax
|
//本访视点病灶的SUVmax(所有病灶中最大的)<纵隔血池SUVmax
|
||||||
else if (maxSUVmax < MediastinumSUVmax)
|
else if (maxSUVmax < MediastinumSUVmax && maxSUVmax != 0)
|
||||||
{
|
{
|
||||||
result = PET5PSScore.Two;
|
result = PET5PSScore.Two;
|
||||||
}
|
}
|
||||||
//无需标记,自主选择
|
//无需标记,自主选择
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("计算了PET5PS,当前接口" + _userInfo.RequestUrl + "当前结果");
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Console.WriteLine("计算了PET5PS,当前接口" + _userInfo.RequestUrl+"当前结果"+ result.GetEnumInt());
|
||||||
return result.GetEnumInt();
|
return result.GetEnumInt();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 修改PET 5PS评分备注
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取PET5PS评分备注
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<string> GetPET5PSRemark(ReadingCalculateDto inDto)
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 与基线相比摄取值变化
|
#region 与基线相比摄取值变化
|
||||||
|
|
||||||
|
|||||||
@@ -355,6 +355,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public DateTime? UpdateTimeBegin { get; set; }
|
public DateTime? UpdateTimeBegin { get; set; }
|
||||||
|
|
||||||
public DateTime? UpdateTimeEnd { get; set; }
|
public DateTime? UpdateTimeEnd { get; set; }
|
||||||
|
|
||||||
|
public string? PreliminaryUserName { get; set; }
|
||||||
|
|
||||||
|
public string? ReviewerUserName { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CopyTrialSiteSurveyDTO
|
public class CopyTrialSiteSurveyDTO
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
[DictionaryTranslateAttribute("YesOrNo")]
|
[DictionaryTranslateAttribute("YesOrNo")]
|
||||||
public bool IsGenerateAccount { get; set; }
|
public bool IsGenerateAccount { get; set; }
|
||||||
|
|
||||||
|
[DictionaryTranslateAttribute("SiteSurvey_UserRoles")]
|
||||||
public int TrialRoleCode { get; set; }
|
public int TrialRoleCode { get; set; }
|
||||||
|
|
||||||
public string OrganizationName { get; set; } = string.Empty;
|
public string OrganizationName { get; set; } = string.Empty;
|
||||||
|
|||||||
@@ -108,6 +108,14 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
}
|
}
|
||||||
else //验证码正确 并且 没有超时
|
else //验证码正确 并且 没有超时
|
||||||
{
|
{
|
||||||
|
var dockerInfo=await _repository.Where<Doctor>(t=>t.EMail==inDto.EmailOrPhone||t.Phone==inDto.EmailOrPhone).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
if (dockerInfo != null)
|
||||||
|
{
|
||||||
|
result.DoctorId = dockerInfo.Id;
|
||||||
|
result.ReviewStatus = dockerInfo.ReviewStatus;
|
||||||
|
}
|
||||||
|
|
||||||
result.Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo()));
|
result.Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -452,7 +460,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
.WhereIf(surveyQueryDTO.UpdateTimeBegin != null, t => t.UpdateTime >= surveyQueryDTO.UpdateTimeBegin)
|
.WhereIf(surveyQueryDTO.UpdateTimeBegin != null, t => t.UpdateTime >= surveyQueryDTO.UpdateTimeBegin)
|
||||||
.WhereIf(surveyQueryDTO.UpdateTimeEnd != null, t => t.UpdateTime <= surveyQueryDTO.UpdateTimeEnd)
|
.WhereIf(surveyQueryDTO.UpdateTimeEnd != null, t => t.UpdateTime <= surveyQueryDTO.UpdateTimeEnd)
|
||||||
|
|
||||||
.ProjectTo<TrialSiteSurveyView>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us });
|
.ProjectTo<TrialSiteSurveyView>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us })
|
||||||
|
.WhereIf(!string.IsNullOrWhiteSpace(surveyQueryDTO.PreliminaryUserName), t => t.PreliminaryUser.RealName.Contains(surveyQueryDTO.PreliminaryUserName))
|
||||||
|
.WhereIf(!string.IsNullOrWhiteSpace(surveyQueryDTO.ReviewerUserName), t => t.ReviewerUser.RealName.Contains(surveyQueryDTO.ReviewerUserName))
|
||||||
|
;
|
||||||
|
|
||||||
return await trialSiteSurveyQueryable.ToPagedListAsync(surveyQueryDTO.PageIndex, surveyQueryDTO.PageSize, surveyQueryDTO.SortField, surveyQueryDTO.Asc);
|
return await trialSiteSurveyQueryable.ToPagedListAsync(surveyQueryDTO.PageIndex, surveyQueryDTO.PageSize, surveyQueryDTO.SortField, surveyQueryDTO.Asc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
|
|
||||||
|
|
||||||
var siteQueryable = _siteRepository.AsQueryable(true)
|
var siteQueryable = _siteRepository.AsQueryable(true)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName) || t.SiteNameCN.Contains(searchModel.SiteName))
|
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName) || t.SiteNameCN.Contains(searchModel.SiteName) || t.AliasName.Contains(searchModel.SiteName))
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.AliasName), t => t.AliasName.Contains(searchModel.AliasName))
|
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.AliasName), t => t.AliasName.Contains(searchModel.AliasName))
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.City), t => t.City.Contains(searchModel.City))
|
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.City), t => t.City.Contains(searchModel.City))
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.Country), t => t.Country.Contains(searchModel.Country))
|
.WhereIf(!string.IsNullOrWhiteSpace(searchModel.Country), t => t.Country.Contains(searchModel.Country))
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ namespace IRaCIS.Application.Contracts
|
|||||||
|
|
||||||
public string LatestBlindName { get; set; } = string.Empty;
|
public string LatestBlindName { get; set; } = string.Empty;
|
||||||
|
|
||||||
public bool IsMissingImages => MissingSubmmitCount > 0;
|
public bool IsMissingImages { get; set; }
|
||||||
|
|
||||||
public Guid LatestSubmitSubjectVisitId { get; set; }
|
public Guid LatestSubmitSubjectVisitId { get; set; }
|
||||||
|
|
||||||
@@ -149,6 +149,8 @@ namespace IRaCIS.Application.Contracts
|
|||||||
|
|
||||||
public string Sex { get; set; } = string.Empty;
|
public string Sex { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
public bool? IsMissingImages { get; set; }
|
||||||
public Guid? SiteId { get; set; }
|
public Guid? SiteId { get; set; }
|
||||||
public SubjectStatus? Status { get; set; }
|
public SubjectStatus? Status { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,10 +121,12 @@ namespace IRaCIS.Application.Services
|
|||||||
.WhereIf(!string.IsNullOrWhiteSpace(param.Name), t => t.ShortName.Contains(param.Name))
|
.WhereIf(!string.IsNullOrWhiteSpace(param.Name), t => t.ShortName.Contains(param.Name))
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(param.Sex), t => t.Sex.Contains(param.Sex))
|
.WhereIf(!string.IsNullOrWhiteSpace(param.Sex), t => t.Sex.Contains(param.Sex))
|
||||||
.WhereIf(param.Status != null, t => t.Status == param.Status)
|
.WhereIf(param.Status != null, t => t.Status == param.Status)
|
||||||
|
|
||||||
.WhereIf(param.SiteId != null, t => t.SiteId == param.SiteId)
|
.WhereIf(param.SiteId != null, t => t.SiteId == param.SiteId)
|
||||||
// CRC 只负责他管理site的受试者
|
// CRC 只负责他管理site的受试者
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||||
.ProjectTo<SubjectQueryView>(_mapper.ConfigurationProvider);
|
.ProjectTo<SubjectQueryView>(_mapper.ConfigurationProvider)
|
||||||
|
.WhereIf(param.IsMissingImages != null, t => t.IsMissingImages == param.IsMissingImages);
|
||||||
|
|
||||||
|
|
||||||
var pageList = await subjectQuery.ToPagedListAsync(param.PageIndex, param.PageSize, param.SortField == string.Empty ? "Code" : param.SortField, param.Asc);
|
var pageList = await subjectQuery.ToPagedListAsync(param.PageIndex, param.PageSize, param.SortField == string.Empty ? "Code" : param.SortField, param.Asc);
|
||||||
|
|||||||
@@ -534,12 +534,22 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
foreach (var item in noDicomStudyList)
|
foreach (var item in noDicomStudyList)
|
||||||
{
|
{
|
||||||
var nodicom = noDicomList.Where(x => x.Id == item.StudyId).First();
|
var nodicom = noDicomList.Where(x => x.Id == item.StudyId).First();
|
||||||
|
|
||||||
|
var instanceCount = await _noneDicomStudyFileRepository.Where(x => x.NoneDicomStudyId == item.StudyId).CountAsync();
|
||||||
|
|
||||||
|
if (instanceCount == 0)
|
||||||
|
{
|
||||||
|
item.SeriesList = new List<DicomSeriesDTO>();
|
||||||
|
item.SeriesCount = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
item.SeriesList = new List<DicomSeriesDTO>()
|
item.SeriesList = new List<DicomSeriesDTO>()
|
||||||
{
|
{
|
||||||
new DicomSeriesDTO (){
|
new DicomSeriesDTO (){
|
||||||
IsDicom=false,
|
IsDicom=false,
|
||||||
Id=item.StudyId,
|
Id=item.StudyId,
|
||||||
InstanceCount=await _noneDicomStudyFileRepository.Where(x=>x.NoneDicomStudyId==item.StudyId).CountAsync(),
|
InstanceCount=instanceCount,
|
||||||
Modality=item.Modalities,
|
Modality=item.Modalities,
|
||||||
StudyId=item.StudyId,
|
StudyId=item.StudyId,
|
||||||
TrialId=nodicom.TrialId,
|
TrialId=nodicom.TrialId,
|
||||||
@@ -553,6 +563,8 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (studyList == null || studyList.Count == 0)
|
if (studyList == null || studyList.Count == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<VisitStage, VisitStageDTO>();
|
CreateMap<VisitStage, VisitStageDTO>();
|
||||||
|
|
||||||
CreateMap<Subject, SubjectQueryView>()
|
CreateMap<Subject, SubjectQueryView>()
|
||||||
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.TrialSite.Site.SiteName))
|
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.TrialSite.TrialSiteAliasName))
|
||||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
||||||
.ForMember(d => d.LatestBlindName, u => u.MapFrom(s => s.LatestSubjectVisit.BlindName))
|
.ForMember(d => d.LatestBlindName, u => u.MapFrom(s => s.LatestSubjectVisit.BlindName))
|
||||||
.ForMember(d => d.LatestVisitName, u => u.MapFrom(s => s.LatestSubjectVisit.VisitName))
|
.ForMember(d => d.LatestVisitName, u => u.MapFrom(s => s.LatestSubjectVisit.VisitName))
|
||||||
@@ -66,6 +66,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
.ForMember(d => d.MissingSubmmitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.VisitNum <s.LatestSubjectVisit.VisitNum && t.SubmitState != SubmitStateEnum.Submitted && t.IsLostVisit == false)))
|
.ForMember(d => d.MissingSubmmitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.VisitNum <s.LatestSubjectVisit.VisitNum && t.SubmitState != SubmitStateEnum.Submitted && t.IsLostVisit == false)))
|
||||||
|
.ForMember(d => d.IsMissingImages, u => u.MapFrom(s => s.SubjectVisitList.Any(t => t.VisitNum < s.LatestSubjectVisit.VisitNum && t.SubmitState != SubmitStateEnum.Submitted && t.IsLostVisit == false)))
|
||||||
.ForMember(d => d.InPlanVisitSubmmitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.SubmitState == SubmitStateEnum.Submitted && t.InPlan == true)))
|
.ForMember(d => d.InPlanVisitSubmmitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.SubmitState == SubmitStateEnum.Submitted && t.InPlan == true)))
|
||||||
.ForMember(d => d.LostVisitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.IsLostVisit)))
|
.ForMember(d => d.LostVisitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.IsLostVisit)))
|
||||||
.ForMember(d => d.InPlanVisitSubmmitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.SubmitState == SubmitStateEnum.Submitted && t.InPlan == true)))
|
.ForMember(d => d.InPlanVisitSubmmitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.SubmitState == SubmitStateEnum.Submitted && t.InPlan == true)))
|
||||||
@@ -88,8 +89,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
CreateMap<SubjectVisit, DicomTrialSiteSubjectInfo>().IncludeMembers(t=>t.Trial)
|
CreateMap<SubjectVisit, DicomTrialSiteSubjectInfo>().IncludeMembers(t=>t.Trial)
|
||||||
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Site.SiteName))
|
.ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.TrialSite.TrialSiteAliasName))
|
||||||
.ForMember(d => d.SiteCode, u => u.MapFrom(s => s.Site.SiteCode))
|
|
||||||
.ForMember(d => d.SubjectVisitId, u => u.MapFrom(s => s.Id))
|
.ForMember(d => d.SubjectVisitId, u => u.MapFrom(s => s.Id))
|
||||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
||||||
.ForMember(d => d.TrialCode, u => u.MapFrom(s => s.Trial.TrialCode))
|
.ForMember(d => d.TrialCode, u => u.MapFrom(s => s.Trial.TrialCode))
|
||||||
|
|||||||
@@ -17,11 +17,14 @@ using Microsoft.Extensions.Logging;
|
|||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using MiniExcelLibs;
|
using MiniExcelLibs;
|
||||||
using Minio;
|
using Minio;
|
||||||
|
using Minio.DataModel.Args;
|
||||||
using NPOI.HPSF;
|
using NPOI.HPSF;
|
||||||
using NPOI.POIFS.Crypt;
|
using NPOI.POIFS.Crypt;
|
||||||
|
using SharpCompress.Common;
|
||||||
using Spire.Doc;
|
using Spire.Doc;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using System.Reflection.Metadata;
|
using System.Reflection.Metadata;
|
||||||
|
using System.Security.AccessControl;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
@@ -66,80 +69,6 @@ namespace IRaCIS.Application.Services
|
|||||||
//_cache = cache;
|
//_cache = cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 维护OSS 影像数据
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
[AllowAnonymous]
|
|
||||||
[UnitOfWork]
|
|
||||||
public async Task<IResponseOutput> OldLocalImageResizeJpg([FromServices] IOSSService oSSService, [FromServices] IRepository _repository, [FromServices] IWebHostEnvironment _hostEnvironment)
|
|
||||||
{
|
|
||||||
|
|
||||||
var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
|
||||||
|
|
||||||
var studyList = _repository.Where<DicomStudy>(t => t.SeriesList.Any(t => t.ImageResizePath.Length < 10)).Select(t => new { t.TrialId, t.SiteId, t.SubjectId, t.SubjectVisitId, t.Id }).ToList();
|
|
||||||
|
|
||||||
foreach (var studyitem in studyList)
|
|
||||||
{
|
|
||||||
|
|
||||||
var relativePath = $"{studyitem.TrialId}/{studyitem.SiteId}/{studyitem.SubjectId}/{studyitem.SubjectVisitId}/{StaticData.Folder.DicomFolder}/{studyitem.Id}/";
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string nextMarker = null;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
// 使用 prefix 模拟目录结构,设置 MaxKeys 和 NextMarker
|
|
||||||
var objectListing = oSSService._ossClient.ListObjects(new ListObjectsRequest(oSSService._OSSConfig.bucketName)
|
|
||||||
{
|
|
||||||
Prefix = relativePath,
|
|
||||||
MaxKeys = 1000,
|
|
||||||
Marker = nextMarker
|
|
||||||
});
|
|
||||||
|
|
||||||
var jpgInfoList = objectListing.ObjectSummaries
|
|
||||||
.Where(summary => summary.Key.EndsWith(".jpg"))
|
|
||||||
.Select(summary =>
|
|
||||||
{
|
|
||||||
string fileName = summary.Key.Split('/').Last(); // 提取文件夹名
|
|
||||||
return new
|
|
||||||
{
|
|
||||||
|
|
||||||
Key = summary.Key,
|
|
||||||
InstanceId = Guid.TryParse(
|
|
||||||
fileName.Split('.')[0],
|
|
||||||
out Guid instanceId)
|
|
||||||
? instanceId
|
|
||||||
: Guid.Empty
|
|
||||||
};
|
|
||||||
})
|
|
||||||
.Where(info => info.InstanceId != Guid.Empty)
|
|
||||||
.ToList();
|
|
||||||
|
|
||||||
foreach (var jpg in jpgInfoList)
|
|
||||||
{
|
|
||||||
var seriesId = _repository.Where<DicomInstance>(t => t.Id == jpg.InstanceId).Select(t => t.SeriesId).FirstOrDefault();
|
|
||||||
|
|
||||||
await _repository.BatchUpdateAsync<DicomSeries>(t => t.Id == seriesId, t => new DicomSeries() { ImageResizePath = "/" + jpg.Key });
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置 NextMarker 以获取下一页的数据
|
|
||||||
nextMarker = objectListing.NextMarker;
|
|
||||||
|
|
||||||
} while (!string.IsNullOrEmpty(nextMarker));
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"Error: {ex.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
await _repository.SaveChangesAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public async Task<IResponseOutput> TestEFcore8()
|
public async Task<IResponseOutput> TestEFcore8()
|
||||||
@@ -157,20 +86,14 @@ namespace IRaCIS.Application.Services
|
|||||||
// 设置 Ne
|
// 设置 Ne
|
||||||
|
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<IResponseOutput> TestMinIO([FromServices] IOptionsMonitor<ObjectStoreServiceOptions> options)
|
public async Task<IResponseOutput> TestMinIO([FromServices] IOSSService oSSService)
|
||||||
{
|
{
|
||||||
|
|
||||||
var minIO = options.CurrentValue.MinIO;
|
await oSSService.UploadToOSSAsync("C:\\Users\\Administrator\\Desktop\\TrialSiteUserImportTemplate.xlsx", "myfolder");
|
||||||
|
|
||||||
|
await oSSService.DownLoadFromOSSAsync("/myfolder/TrialSiteUserImportTemplate.xlsx", "C:\\Users\\Administrator\\Desktop\\aws.xlsx");
|
||||||
|
|
||||||
var minioClient = new MinioClient().WithEndpoint($"{minIO.endpoint}:{minIO.port}")
|
return ResponseOutput.Ok();
|
||||||
.WithCredentials(minIO.accessKey, minIO.secretKey)
|
|
||||||
.Build();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//ResponseOutput.Ok(options)
|
|
||||||
return await Task.FromResult<IResponseOutput>(ResponseOutput.Ok(options));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
@@ -202,7 +125,9 @@ namespace IRaCIS.Application.Services
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var rows = await MiniExcel.QueryAsync<InternationalizationAddOrEdit>(@"C:\Users\Administrator\Desktop\Export\vue.xlsx");
|
var rows = await MiniExcel.QueryAsync<InternationalizationAddOrEdit>(@"C:\Users\Administrator\Desktop\i18n-new.xlsx");
|
||||||
|
|
||||||
|
rows = rows.Where(t => !string.IsNullOrEmpty(t.Code)).ToList();
|
||||||
|
|
||||||
foreach (var row in rows)
|
foreach (var row in rows)
|
||||||
{
|
{
|
||||||
@@ -301,24 +226,6 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static Dictionary<string, string> _replacePatterns = new Dictionary<string, string>()
|
|
||||||
{
|
|
||||||
{ "test", "Atlanta Knight" },
|
|
||||||
{ "GAME_TIME", "7:30pm" },
|
|
||||||
{ "GAME_NUMBER", "161" },
|
|
||||||
{ "DATE", "October 18 2018" },
|
|
||||||
};
|
|
||||||
|
|
||||||
private static string ReplaceFunc(string findStr)
|
|
||||||
{
|
|
||||||
if (_replacePatterns.ContainsKey(findStr))
|
|
||||||
{
|
|
||||||
return _replacePatterns[findStr];
|
|
||||||
}
|
|
||||||
return findStr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task testwwwww([FromServices] IWebHostEnvironment env)
|
public async Task testwwwww([FromServices] IWebHostEnvironment env)
|
||||||
{
|
{
|
||||||
@@ -424,11 +331,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public string PostData(TestModel testModelList)
|
#region 历史维护
|
||||||
{
|
|
||||||
return String.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 维护临床数据 --一定要在同步表前同步数据才行
|
/// 维护临床数据 --一定要在同步表前同步数据才行
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -468,6 +371,89 @@ namespace IRaCIS.Application.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 维护OSS 影像数据
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[AllowAnonymous]
|
||||||
|
[UnitOfWork]
|
||||||
|
public async Task<IResponseOutput> OldLocalImageResizeJpg([FromServices] IOSSService oSSService, [FromServices] IRepository _repository, [FromServices] IWebHostEnvironment _hostEnvironment)
|
||||||
|
{
|
||||||
|
|
||||||
|
var aliConfig = oSSService.ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
|
var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
||||||
|
|
||||||
|
var studyList = _repository.Where<DicomStudy>(t => t.SeriesList.Any(t => t.ImageResizePath.Length < 10)).Select(t => new { t.TrialId, t.SiteId, t.SubjectId, t.SubjectVisitId, t.Id }).ToList();
|
||||||
|
|
||||||
|
foreach (var studyitem in studyList)
|
||||||
|
{
|
||||||
|
|
||||||
|
var relativePath = $"{studyitem.TrialId}/{studyitem.SiteId}/{studyitem.SubjectId}/{studyitem.SubjectVisitId}/{StaticData.Folder.DicomFolder}/{studyitem.Id}/";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string nextMarker = null;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
// 使用 prefix 模拟目录结构,设置 MaxKeys 和 NextMarker
|
||||||
|
var objectListing = _ossClient.ListObjects(new ListObjectsRequest(aliConfig.bucketName)
|
||||||
|
{
|
||||||
|
Prefix = relativePath,
|
||||||
|
MaxKeys = 1000,
|
||||||
|
Marker = nextMarker
|
||||||
|
});
|
||||||
|
|
||||||
|
var jpgInfoList = objectListing.ObjectSummaries
|
||||||
|
.Where(summary => summary.Key.EndsWith(".jpg"))
|
||||||
|
.Select(summary =>
|
||||||
|
{
|
||||||
|
string fileName = summary.Key.Split('/').Last(); // 提取文件夹名
|
||||||
|
return new
|
||||||
|
{
|
||||||
|
|
||||||
|
Key = summary.Key,
|
||||||
|
InstanceId = Guid.TryParse(
|
||||||
|
fileName.Split('.')[0],
|
||||||
|
out Guid instanceId)
|
||||||
|
? instanceId
|
||||||
|
: Guid.Empty
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.Where(info => info.InstanceId != Guid.Empty)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
foreach (var jpg in jpgInfoList)
|
||||||
|
{
|
||||||
|
var seriesId = _repository.Where<DicomInstance>(t => t.Id == jpg.InstanceId).Select(t => t.SeriesId).FirstOrDefault();
|
||||||
|
|
||||||
|
await _repository.BatchUpdateAsync<DicomSeries>(t => t.Id == seriesId, t => new DicomSeries() { ImageResizePath = "/" + jpg.Key });
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置 NextMarker 以获取下一页的数据
|
||||||
|
nextMarker = objectListing.NextMarker;
|
||||||
|
|
||||||
|
} while (!string.IsNullOrEmpty(nextMarker));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Error: {ex.Message}");
|
||||||
|
}
|
||||||
|
|
||||||
|
await _repository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TestModel
|
public class TestModel
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
//using AutoMapper;
|
|
||||||
//using EasyCaching.Core;
|
|
||||||
//using EntityFrameworkCore.Triggered;
|
|
||||||
//using IRaCIS.Core.Application.Service;
|
|
||||||
//using IRaCIS.Core.Application.ViewModel;
|
|
||||||
//using IRaCIS.Core.Domain.Share;
|
|
||||||
//using IRaCIS.Core.Infrastructure;
|
|
||||||
//using System.Linq.Expressions;
|
|
||||||
|
|
||||||
//namespace IRaCIS.Core.Application.Triggers
|
|
||||||
//{
|
|
||||||
|
|
||||||
// public class VisitTaskIAfterSignTrigger : IAfterSaveTrigger<VisitTask>
|
|
||||||
// {
|
|
||||||
|
|
||||||
// private readonly IRepository<VisitTask> _visitTaskRepository;
|
|
||||||
|
|
||||||
|
|
||||||
// public VisitTaskIAfterSignTrigger(
|
|
||||||
|
|
||||||
// IRepository<VisitTask> visitTaskRepository)
|
|
||||||
// {
|
|
||||||
|
|
||||||
// _visitTaskRepository = visitTaskRepository;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// //添加任务的时候 如果需要签名 并且已经签名了 那么要维护该标准 该Subject IsFrontTaskNeedSignButNotSign字段
|
|
||||||
// public async Task AfterSave(ITriggerContext<VisitTask> context, CancellationToken cancellationToken)
|
|
||||||
// {
|
|
||||||
// var visitTask = context.Entity;
|
|
||||||
|
|
||||||
|
|
||||||
// if(visitTask.SignTime!=null && visitTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
|
||||||
// {
|
|
||||||
// switch (visitTask.ReadingCategory)
|
|
||||||
// {
|
|
||||||
// case ReadingCategory.Visit:
|
|
||||||
|
|
||||||
// break;
|
|
||||||
// case ReadingCategory.Global:
|
|
||||||
|
|
||||||
// break;
|
|
||||||
// case ReadingCategory.Judge:
|
|
||||||
|
|
||||||
// break;
|
|
||||||
// case ReadingCategory.Oncology:
|
|
||||||
|
|
||||||
// break;
|
|
||||||
|
|
||||||
// default:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using EasyCaching.Core;
|
||||||
|
using EntityFrameworkCore.Triggered;
|
||||||
|
using IRaCIS.Core.Application.Service;
|
||||||
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using IRaCIS.Core.Infrastructure;
|
||||||
|
using System.Linq.Expressions;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Triggers
|
||||||
|
{
|
||||||
|
|
||||||
|
public class VisitTaskIbeforeTrigger : IBeforeSaveTrigger<VisitTask>, IAfterSaveTrigger<VisitTask>
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
|
private readonly IRepository<ReadingJudgeInfo> _readingJudgeInfoRepository;
|
||||||
|
|
||||||
|
public VisitTaskIbeforeTrigger(
|
||||||
|
|
||||||
|
IRepository<VisitTask> visitTaskRepository, IRepository<ReadingJudgeInfo> readingJudgeInfoRepository)
|
||||||
|
{
|
||||||
|
|
||||||
|
_visitTaskRepository = visitTaskRepository;
|
||||||
|
_readingJudgeInfoRepository = readingJudgeInfoRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 因为维护状态先后顺序导致 裁判任务关联的 任务上的JudgeVisitTaskId==nulll 在这里需要重新设置下
|
||||||
|
///
|
||||||
|
/// 比如: 申请裁判任务重阅,事务里面本来设置了任务上的裁判id,但是因为下面的逻辑,导致设置的值又被清理了,只能重新设置下
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task AfterSave(ITriggerContext<VisitTask> context, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var visitTask = context.Entity;
|
||||||
|
//裁判任务维护,当裁判任务受到影响的时候,需要清理任务上关联的裁判任务id
|
||||||
|
if (context.ChangeType == ChangeType.Added && visitTask.ReadingCategory == ReadingCategory.Judge && visitTask.TaskState == TaskState.Effect)
|
||||||
|
{
|
||||||
|
|
||||||
|
var find = _readingJudgeInfoRepository.Where(t => t.JudgeTaskId == visitTask.Id).FirstOrDefault();
|
||||||
|
|
||||||
|
if (find != null)
|
||||||
|
{
|
||||||
|
var ids = new Guid[] { find.TaskIdOne, find.TaskIdTwo };
|
||||||
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => ids.Contains(t.Id), u => new VisitTask() { JudgeVisitTaskId = visitTask.Id });
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 比如 两个任务产生了裁判,然后其中一个人申请了重阅,影响了裁判,需要清理之前任务的上裁判id
|
||||||
|
///
|
||||||
|
///
|
||||||
|
/// 因为申请重阅,退回,里面分有序,无序,情况太多,所以不在那块逻辑修改,不然得加多个地方处理,在这里统一处理
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task BeforeSave(ITriggerContext<VisitTask> context, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var visitTask = context.Entity;
|
||||||
|
//裁判任务维护,当裁判任务受到影响的时候,需要清理任务上关联的裁判任务id
|
||||||
|
if (context.ChangeType == ChangeType.Modified)
|
||||||
|
{
|
||||||
|
if (visitTask.ReadingCategory == ReadingCategory.Judge && (visitTask.TaskState == TaskState.Adbandon || visitTask.TaskState == TaskState.HaveReturned))
|
||||||
|
{
|
||||||
|
var find = _readingJudgeInfoRepository.Where(t => t.JudgeTaskId == visitTask.Id).FirstOrDefault();
|
||||||
|
|
||||||
|
if (find != null)
|
||||||
|
{
|
||||||
|
var ids = new Guid[] { find.TaskIdOne, find.TaskIdTwo };
|
||||||
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => ids.Contains(t.Id), u => new VisitTask() { JudgeVisitTaskId = null });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -100,20 +100,9 @@ namespace IRaCIS.Core.Application.Triggers
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
else if (context.ChangeType == ChangeType.Modified)
|
|
||||||
{
|
|
||||||
if (visitTask.ReadingCategory == ReadingCategory.Judge && (visitTask.TaskState == TaskState.Adbandon || visitTask.TaskState == TaskState.HaveReturned))
|
|
||||||
{
|
|
||||||
var find = _readingJudgeInfoRepository.Where(t => t.JudgeTaskId == visitTask.Id).FirstOrDefault();
|
|
||||||
|
|
||||||
if (find != null)
|
|
||||||
{
|
|
||||||
var ids = new Guid[] { find.TaskIdOne, find.TaskIdTwo };
|
|
||||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => ids.Contains(t.Id), u => new VisitTask() { JudgeVisitTaskId = null });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 附加评估 暂时废弃
|
#region 附加评估 暂时废弃
|
||||||
// //从未签名状态 改为签名状态时 判断是否进行了附加评估,将附加评估的结果冗余
|
// //从未签名状态 改为签名状态时 判断是否进行了附加评估,将附加评估的结果冗余
|
||||||
// if (context.ChangeType == ChangeType.Modified && visitTask.ReadingTaskState == ReadingTaskState.HaveSigned && context.UnmodifiedEntity.ReadingTaskState != ReadingTaskState.HaveSigned)
|
// if (context.ChangeType == ChangeType.Modified && visitTask.ReadingTaskState == ReadingTaskState.HaveSigned && context.UnmodifiedEntity.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||||
|
|||||||
+3
-3
@@ -92,10 +92,10 @@ namespace IRaCIS.Core.Application.MediatR.CommandAndQueries
|
|||||||
|
|
||||||
|
|
||||||
//[Required(ErrorMessage = "检查日期不能为空")]
|
//[Required(ErrorMessage = "检查日期不能为空")]
|
||||||
[CanConvertToTime(ErrorMessage = "Does not conform to Stusy Date format")]
|
[CanConvertToTime(ErrorMessage = "Does not conform to Study Date format")]
|
||||||
|
|
||||||
[ImporterHeader(Name = "Stusy Date", AutoTrim = true)]
|
[ImporterHeader(Name = "Study Date", AutoTrim = true)]
|
||||||
[ExcelColumnName("Stusy Date")]
|
[ExcelColumnName("Study Date")]
|
||||||
public string StudyDate { get; set; } = string.Empty;
|
public string StudyDate { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
@@ -638,7 +638,6 @@ namespace IRaCIS.Core.Domain.Share
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public enum SplitOrMergeType
|
public enum SplitOrMergeType
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 分裂
|
/// 分裂
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -647,7 +646,13 @@ namespace IRaCIS.Core.Domain.Share
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 合并
|
/// 合并
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Merge = 1
|
Merge = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分裂主病灶
|
||||||
|
/// </summary>
|
||||||
|
SplitMain = 2,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -2244,6 +2249,16 @@ public enum SUVChangeVSBaseline
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
EvidenceFocalFDG = 57,
|
EvidenceFocalFDG = 57,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改脾脏状态备注
|
||||||
|
/// </summary>
|
||||||
|
SplenicStatusRemarks = 58,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改PET 5PS评分备注
|
||||||
|
/// </summary>
|
||||||
|
PSScoreRemarks = 59,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2403,6 +2418,30 @@ public enum PET5PSScore
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示限制
|
||||||
|
/// </summary>
|
||||||
|
public enum LimitShow
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 全都显示
|
||||||
|
/// </summary>
|
||||||
|
AllShow = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 基线显示
|
||||||
|
/// </summary>
|
||||||
|
BaseLineShow = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 随访显示
|
||||||
|
/// </summary>
|
||||||
|
FollowShow = 2,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 限制编辑
|
/// 限制编辑
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -33,16 +33,18 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
public int State { get; set; }
|
public int State { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string Description { get; set; }
|
public string Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string Code { get; set; }
|
public string Code { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string Value { get; set; }
|
public string Value { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string ValueCN { get; set; }
|
public string ValueCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
public int InternationalizationType { get; set; }
|
public int InternationalizationType { get; set; }
|
||||||
|
|
||||||
|
public string FrontType { get; set; }=string.Empty;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="EntityFrameworkCore.Projectables.Abstractions" Version="2.3.0" />
|
<PackageReference Include="EntityFrameworkCore.Projectables.Abstractions" Version="3.0.4" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
||||||
|
|||||||
@@ -85,7 +85,9 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
|
|
||||||
public bool IsSuccess { get; set; }
|
public bool IsSuccess { get; set; }
|
||||||
|
|
||||||
public string Note = string.Empty;
|
public string Note { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string RecordPath { get; set; }=string.Empty;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -182,6 +182,10 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制显示
|
||||||
|
/// </summary>
|
||||||
|
public LimitShow LimitShow { get; set; } = LimitShow.AllShow;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数据来源
|
/// 数据来源
|
||||||
|
|||||||
@@ -231,6 +231,11 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 限制显示
|
||||||
|
/// </summary>
|
||||||
|
public LimitShow LimitShow { get; set; } = LimitShow.AllShow;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自定义计算标记
|
/// 自定义计算标记
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -176,7 +176,10 @@ public static class StaticData
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static class InternationalData
|
||||||
|
{
|
||||||
|
public const string Front = "Front";
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 匿名化配置 key
|
/// 匿名化配置 key
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
@@ -19,10 +19,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="EFCore.BulkExtensions" Version="7.1.6" />
|
<PackageReference Include="EFCore.BulkExtensions" Version="8.0.1" />
|
||||||
<PackageReference Include="EntityFrameworkCore.Triggered" Version="3.2.2" />
|
<PackageReference Include="EntityFrameworkCore.Triggered" Version="3.2.2" />
|
||||||
<PackageReference Include="EntityFrameworkCore.Projectables" Version="2.3.0" />
|
<PackageReference Include="EntityFrameworkCore.Projectables" Version="3.0.4" />
|
||||||
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="6.0.3.2" />
|
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
|
||||||
<PackageReference Include="NewId" Version="4.0.1" />
|
<PackageReference Include="NewId" Version="4.0.1" />
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||||||
{
|
{
|
||||||
if (deleteFilter == null) throw new ArgumentNullException(nameof(deleteFilter));
|
if (deleteFilter == null) throw new ArgumentNullException(nameof(deleteFilter));
|
||||||
|
|
||||||
return await _dbContext.Set<T>().IgnoreQueryFilters().Where(deleteFilter).BatchDeleteAsync() > 0;
|
return await _dbContext.Set<T>().IgnoreQueryFilters().Where(deleteFilter).ExecuteDeleteAsync() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
<PackageReference Include="AutoMapper" Version="12.0.1" />
|
<PackageReference Include="AutoMapper" Version="12.0.1" />
|
||||||
<PackageReference Include="AutoMapper.Collection.EntityFrameworkCore" Version="9.0.0" />
|
<PackageReference Include="AutoMapper.Collection.EntityFrameworkCore" Version="9.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.34.2" />
|
<PackageReference Include="SharpCompress" Version="0.35.0" />
|
||||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.7" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.7" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -60,8 +60,16 @@ namespace IRaCIS.Core.Infrastructure.Extention
|
|||||||
string propertyName = property.Name;
|
string propertyName = property.Name;
|
||||||
object propertyValue = property.GetValue(obj);
|
object propertyValue = property.GetValue(obj);
|
||||||
|
|
||||||
|
// 如果属性的类型是枚举,将其值保留为整数
|
||||||
|
if (property.PropertyType.IsEnum)
|
||||||
|
{
|
||||||
|
dictionary.Add(propertyName, (int)propertyValue);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
dictionary.Add(propertyName, propertyValue);
|
dictionary.Add(propertyName, propertyValue);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return dictionary;
|
return dictionary;
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user