diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.csproj b/IRaCIS.Core.API/IRaCIS.Core.API.csproj index 8c2833bae..739349a2b 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.csproj +++ b/IRaCIS.Core.API/IRaCIS.Core.API.csproj @@ -69,14 +69,14 @@ true - + - + - + - + diff --git a/IRaCIS.Core.API/Progranm.cs b/IRaCIS.Core.API/Progranm.cs index 8798ea688..641d973d7 100644 --- a/IRaCIS.Core.API/Progranm.cs +++ b/IRaCIS.Core.API/Progranm.cs @@ -27,6 +27,8 @@ using LogDashboard; using OfficeOpenXml.Utils; using FellowOakDicom.Network; using IRaCIS.Core.Application.Service.ImageAndDoc; +using IP2Region.Net.Abstractions; +using IP2Region.Net.XDB; #region 获取环境变量 @@ -160,7 +162,7 @@ builder.Services.AddSignalR(); builder.Services.AddSingleton(); - +builder.Services.AddSingleton(new Searcher(CachePolicy.Content, Path.Combine(AppContext.BaseDirectory, StaticData.Folder.Resources, "ip2region.xdb"))); #region 历史废弃配置 diff --git a/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs b/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs index f22e4d2f6..1f4ca4079 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs @@ -50,8 +50,8 @@ namespace IRaCIS.Core.API //triggerOptions.AddTrigger(); triggerOptions.AddTrigger(); triggerOptions.AddTrigger(); - + triggerOptions.AddTrigger(); diff --git a/IRaCIS.Core.API/appsettings.json b/IRaCIS.Core.API/appsettings.json index 06cd245d9..b6d0f4125 100644 --- a/IRaCIS.Core.API/appsettings.json +++ b/IRaCIS.Core.API/appsettings.json @@ -1,6 +1,6 @@ { "JwtSetting": { - "SecurityKey": "SecurityKey_SHzyyl@2021", + "SecurityKey": "ShangHaiZhanYing_SecurityKey_SHzyyl@2021", "Issuer": "Extimaging", "Audience": "EICS", "TokenExpireDays": "7" diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj index ee724b4d6..4cfb38047 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj @@ -65,18 +65,19 @@ - + - - + + + true @@ -85,24 +86,30 @@ true - + - - + + - + true - - - - - + + + + + + + + Always + + + diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 06db1393e..a20e5aae7 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -5612,6 +5612,11 @@ 是否是转变的任务(转为IRECIST) + + + 裁判百分比或绝对值的相差值 + + 问题类型 @@ -5717,6 +5722,16 @@ 标准 + + + 裁判百分比或绝对值的相差值 + + + + + 裁判百分比或绝对值的相差值 + + 问题类型 @@ -5827,6 +5842,16 @@ + + + 裁判百分比或绝对值的相差值 + + + + + 裁判百分比或绝对值的相差值 + + diff --git a/IRaCIS.Core.Application/Resources/ip2region.xdb b/IRaCIS.Core.Application/Resources/ip2region.xdb new file mode 100644 index 000000000..7052c0571 Binary files /dev/null and b/IRaCIS.Core.Application/Resources/ip2region.xdb differ diff --git a/IRaCIS.Core.Application/Triggers/UserLogTrigger.cs b/IRaCIS.Core.Application/Triggers/UserLogTrigger.cs new file mode 100644 index 000000000..5af3216ab --- /dev/null +++ b/IRaCIS.Core.Application/Triggers/UserLogTrigger.cs @@ -0,0 +1,39 @@ +using EntityFrameworkCore.Triggered; +using IP2Region.Net.Abstractions; +using Microsoft.Extensions.Localization; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IRaCIS.Core.Application.Triggers +{ + public class UserLogTrigger : IBeforeSaveTrigger + { + public ISearcher _searcher; + + public ILogger _logger; + public UserLogTrigger(ISearcher searcher,ILogger logger) + { + _searcher = searcher; + } + + //国家|区域|省份|城市|ISP 缺省的地域信息默认是0 + //0|0|0|内网IP|内网IP + public async Task BeforeSave(ITriggerContext context, CancellationToken cancellationToken) + { + var userLog = context.Entity; + + if (context.ChangeType == ChangeType.Added) + { + + var dd = _searcher.Search(userLog.IP); + + _logger.LogWarning(dd); + + } + } + } +}