Compare commits
329 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 85f5c7104f | |||
| 32d2f1275d | |||
| e315112f8e | |||
| 70572dcedf | |||
| 4ccb4fb804 | |||
| f99ccb75cb | |||
| bc5ca69bdc | |||
| bbed277f8b | |||
| e2a84e0dd7 | |||
| 8af15bd755 | |||
| 038353f8f8 | |||
| 1db272caaf | |||
| b14f6709cf | |||
| 94d66b6342 | |||
| 05738c8f68 | |||
| b306e9f827 | |||
| 3f8a55f868 | |||
| 21c0fce31b | |||
| a724fa24fa | |||
| e423a5e9f0 | |||
| 24af6f3216 | |||
| df76375ad0 | |||
| 081ff7bbc1 | |||
| 84c158742d | |||
| 19896537a8 | |||
| dd03ab0009 | |||
| de5419739e | |||
| 446429e8bd | |||
| 9479c2bc62 | |||
| b700350db6 | |||
| bbcec53050 | |||
| 87920f58eb | |||
| c9b5606b67 | |||
| a8c530e40c | |||
| 9fd7289abc | |||
| 4889038765 | |||
| 9f39a211ce | |||
| 81257808d8 | |||
| 46d42ddf2a | |||
| 2ba162347e | |||
| 80706c407d | |||
| cbd1457699 | |||
| 4ccf836275 | |||
| a0193fc694 | |||
| 5e44f796dd | |||
| ac4e334642 | |||
| e70ee70f6b | |||
| 73c86666b4 | |||
| 13a942c6c5 | |||
| a445ba09c2 | |||
| d6275b4b46 | |||
| d8dbb94838 | |||
| b73adfebab | |||
| 42e857e59a | |||
| 4eccc7b96f | |||
| 891506824a | |||
| 8c64569623 | |||
| b3eb985f04 | |||
| d850da8e8f | |||
| 7a35ae9d4a | |||
| 669280368a | |||
| 875281adef | |||
| a71e7b00b6 | |||
| 23a5be01f2 | |||
| e519ace856 | |||
| 506d614a59 | |||
| 47c9aab1be | |||
| 28df4076d3 | |||
| fda0d6b9b0 | |||
| cdccd6f238 | |||
| 61446541e3 | |||
| 7e04240488 | |||
| dfb9bd2e67 | |||
| c040b332a4 | |||
| d7fd3ff4a1 | |||
| 86293b31da | |||
| 8ee6365829 | |||
| bc03f00186 | |||
| 7ca498c47f | |||
| 16ab27898b | |||
| f3f24e43e3 | |||
| fc8f522480 | |||
| 2021c1f4a9 | |||
| 81f0d108f5 | |||
| 6697dcb945 | |||
| 1d1d247953 | |||
| 273c25dfdc | |||
| 92fc9222db | |||
| a962b8843f | |||
| fe19c3b35e | |||
| f9c33e373a | |||
| 26f049b31e | |||
| 22afd356a6 | |||
| 4e2fc0d2d9 | |||
| 969341380d | |||
| 2e35733638 | |||
| 8e406fd8ca | |||
| ca1953a348 | |||
| 960d1f4116 | |||
| 7b1449189e | |||
| 6bb4167ac7 | |||
| 51b9aaa9b1 | |||
| 5183e30e41 | |||
| 6e0282ad18 | |||
| 3850be9ab8 | |||
| b757d71fef | |||
| 3cf60f3e9e | |||
| 602cfe43d0 | |||
| bdef193304 | |||
| 8e85078232 | |||
| 56af80a006 | |||
| 95f3cbb79f | |||
| 9ee7dc78f5 | |||
| 9421dda784 | |||
| e24c1dc0cf | |||
| c32b1131c9 | |||
| bcb3ace564 | |||
| 36c1f9e790 | |||
| cf45582a40 | |||
| 21136f1238 | |||
| 540de91485 | |||
| ff72c4aefc | |||
| f94d1caa79 | |||
| 621fab16a0 | |||
| 581ee62a5b | |||
| 8d9a824ac3 | |||
| 4357185ac7 | |||
| 10793c6a93 | |||
| 37100008eb | |||
| adc9b2635a | |||
| ffb8894608 | |||
| 62421988c4 | |||
| 96650ced2d | |||
| cdcd3154b4 | |||
| ef7f0ebc4a | |||
| c5eaf847cc | |||
| 739f610d4e | |||
| 5c8ccdf434 | |||
| e0b80b3316 | |||
| d4bbe47b81 | |||
| dc16cc2018 | |||
| 2f930ddca3 | |||
| e346593ebb | |||
| fab6c8c55a | |||
| 282e56e5fc | |||
| a600f11422 | |||
| 2db4a293ed | |||
| 8641a11b53 | |||
| 980248d899 | |||
| 372ee55241 | |||
| 799c579121 | |||
| 4841a9ac1e | |||
| 287dd5d0bf | |||
| 32e23ca0a2 | |||
| b7d7b8c815 | |||
| 96fd034c5a | |||
| 6118e0a4f8 | |||
| c00d1fb89c | |||
| 900f4dfb64 | |||
| 11f8c9ca56 | |||
| 026f63c730 | |||
| e322952ff4 | |||
| e762da2bf5 | |||
| 822a4331aa | |||
| 2b2ba2a551 | |||
| 317fbc2ea7 | |||
| 0cd9d666c1 | |||
| 187ea3b92f | |||
| d2beb399dd | |||
| 15623ab515 | |||
| f771a23c2a | |||
| f20b8708a3 | |||
| 536ed731ed | |||
| 5b10619460 | |||
| 311ac85419 | |||
| dba3351195 | |||
| 506d6504c7 | |||
| 1eede7832b | |||
| 5ec79bb61b | |||
| 548863845b | |||
| 2f73376ff6 | |||
| 9a8ee3a6aa | |||
| 28e367eb88 | |||
| 7d642b46c9 | |||
| 2be6757e23 | |||
| 4ca67212aa | |||
| 503f99ccbe | |||
| 93410b4075 | |||
| a96945201f | |||
| 35c495f8a8 | |||
| 9abd8e2c54 | |||
| b9a79f0658 | |||
| 83111d3338 | |||
| 92072d3640 | |||
| fd0ea313c2 | |||
| 79a15a08cc | |||
| 1af798fb04 | |||
| c19eb5bab7 | |||
| db693de576 | |||
| 651fa35018 | |||
| 36f1e9e8dd | |||
| 7e454467d1 | |||
| 978caf8e9c | |||
| 2bf4e5d8fd | |||
| dfb0c5a61c | |||
| 9d54fac8c5 | |||
| 5842590f6d | |||
| 06a60cac38 | |||
| dac5eb0d7d | |||
| 923edf166b | |||
| a0776e5462 | |||
| 9ac6d3df70 | |||
| a8a3104019 | |||
| 7cd476028a | |||
| fe96ff5924 | |||
| 890d349ee9 | |||
| 895eaa42c8 | |||
| 2e4457b56d | |||
| b30638fa82 | |||
| a3fac7bcb1 | |||
| 7228bdd9e9 | |||
| fa84171da4 | |||
| f4c3f685eb | |||
| db17d23360 | |||
| 76fe1e12d3 | |||
| d7f455c740 | |||
| d62d7172d0 | |||
| 9bfdb2f06a | |||
| d6436b01d4 | |||
| e848ee1972 | |||
| 2716b462b1 | |||
| 10f3db1ec2 | |||
| 0848a441b1 | |||
| 00c59958e6 | |||
| 9cc438a647 | |||
| 1053fdc8a8 | |||
| e1ee129f41 | |||
| dae0cab261 | |||
| 5871d054d3 | |||
| a69e8969a4 | |||
| dd05e26feb | |||
| 8cd8b7cf43 | |||
| 1d90aba7cd | |||
| 826aff3d36 | |||
| 718294f776 | |||
| 7a003eb490 | |||
| bcceb5d42d | |||
| b1802d7d79 | |||
| e14eeb4da3 | |||
| f726088cc9 | |||
| 4082850b7a | |||
| 641d61d242 | |||
| e2b67bb3f5 | |||
| 1f3e1ceb37 | |||
| 254e9508b6 | |||
| 631be6d7c7 | |||
| ca31e9a062 | |||
| 9fd7d9928a | |||
| 9362b2fb23 | |||
| 1735a4621e | |||
| 6ff332367d | |||
| e045302d38 | |||
| 88793cf011 | |||
| a4181f819b | |||
| 79aeb663c6 | |||
| 169301836a | |||
| 71bd67ba01 | |||
| 3e94dc6518 | |||
| 503322d57e | |||
| 0c9ffbf5e4 | |||
| fae7889995 | |||
| 532e514060 | |||
| b3a5047ba8 | |||
| 810e6ccb19 | |||
| 352e719fae | |||
| d8e0c73f56 | |||
| 46374be4c0 | |||
| 020c5280b3 | |||
| 4beba23f99 | |||
| 59f36cceb4 | |||
| d08b409f0e | |||
| 1612201101 | |||
| 924347361a | |||
| 061d212623 | |||
| af937b3f53 | |||
| 1faa72c5ea | |||
| db53e5a60b | |||
| 802e768bad | |||
| 67f17cffe0 | |||
| 70160cb937 | |||
| 6e22246555 | |||
| 7ed0258cfd | |||
| ddd06c8313 | |||
| d33b84c245 | |||
| 14cd5dd91c | |||
| 2b29ebc29b | |||
| 84b65ee122 | |||
| c3e9024a57 | |||
| d49b5663ba | |||
| e1386da5ae | |||
| b9f9af06f4 | |||
| 01a79e0612 | |||
| 3e69d72597 | |||
| f69c7af9d6 | |||
| ae03503d76 | |||
| 39eade67f0 | |||
| e6d7a0c0e0 | |||
| 98103451e9 | |||
| b64eed88cf | |||
| bafe61ae64 | |||
| 0579c4aeda | |||
| 7599e06b9d | |||
| 8e77d2e3ed | |||
| c2a129c56a | |||
| 111d5509bc | |||
| 7c9987f3de | |||
| f1471b6424 | |||
| 935369c05c | |||
| 2b03f382bd | |||
| 152a142d82 | |||
| f55ce703b0 | |||
| a08c8a0d64 | |||
| 76dd0c46ae | |||
| 1e8056f689 | |||
| 388dac5f8d | |||
| ec0a4aeef9 | |||
| 8bf0be9699 | |||
| 7707b339dc | |||
| 8eaa6606c4 |
@@ -0,0 +1,9 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<!-- 在这里定义所有项目共享的属性 -->
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<!-- 如果需要Nullable等全局设置,也可以加在这里 -->
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -43,7 +43,7 @@ namespace IRaCIS.Core.SCP.Filter
|
||||
else
|
||||
{
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["Project_ExceptionContactDeveloper"] + (context.Exception.InnerException is null ? (context.Exception.Message /*+ context.Exception.StackTrace*/)
|
||||
: (context.Exception.InnerException?.Message /*+ context.Exception.InnerException?.StackTrace*/)), ApiResponseCodeEnum.ProgramException));
|
||||
: (context.Exception.InnerException?.Message /*+ context.Exception.InnerException?.StackTrace*/)), ApiResponseCodeEnum.BackEndAnomaly));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,37 +1,35 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.11" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
||||
<PackageReference Include="AlibabaCloud.SDK.Sts20150401" Version="1.1.5" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="10.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.8" />
|
||||
<PackageReference Include="AlibabaCloud.SDK.Sts20150401" Version="1.2.0" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="11.0.0" />
|
||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.14.1" />
|
||||
<PackageReference Include="AWSSDK.S3" Version="4.0.21" />
|
||||
<PackageReference Include="AWSSDK.SecurityToken" Version="4.0.5.19" />
|
||||
<PackageReference Include="AWSSDK.S3" Version="4.0.24" />
|
||||
<PackageReference Include="AWSSDK.SecurityToken" Version="4.0.7" />
|
||||
|
||||
<PackageReference Include="DistributedLock.Core" Version="1.0.8" />
|
||||
<PackageReference Include="DistributedLock.SqlServer" Version="1.0.6" />
|
||||
<PackageReference Include="fo-dicom" Version="5.2.1" />
|
||||
<PackageReference Include="fo-dicom.Codecs" Version="5.16.1" />
|
||||
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.2.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.10" />
|
||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||
<PackageReference Include="Minio" Version="6.0.4" />
|
||||
<PackageReference Include="My.Extensions.Localization.Json" Version="3.3.0">
|
||||
<PackageReference Include="DistributedLock.Core" Version="1.0.9" />
|
||||
<PackageReference Include="DistributedLock.SqlServer" Version="1.0.7" />
|
||||
<PackageReference Include="fo-dicom" Version="5.2.6" />
|
||||
<PackageReference Include="fo-dicom.Codecs" Version="5.16.7" />
|
||||
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.2.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.8" />
|
||||
<PackageReference Include="AutoMapper" Version="14.0.0" />
|
||||
<PackageReference Include="Minio" Version="7.0.0" />
|
||||
<PackageReference Include="My.Extensions.Localization.Json" Version="4.0.0">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.2" />
|
||||
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="2.1.2" />
|
||||
<PackageReference Include="Serilog.Extensions.Hosting" Version="9.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.1" />
|
||||
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="2.9.0" />
|
||||
<PackageReference Include="Serilog.Extensions.Hosting" Version="10.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.2.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -56,7 +56,7 @@ var _configuration = builder.Configuration;
|
||||
builder.Services.AddHealthChecks();
|
||||
|
||||
//本地化
|
||||
builder.Services.AddJsonLocalization(options => options.ResourcesPath = "Resources");
|
||||
builder.Services.AddJsonLocalization(options => options.ResourcesPath = new[] { "Resources" });
|
||||
|
||||
|
||||
// 异常、参数统一验证过滤器、Json序列化配置、字符串参数绑型统一Trim()
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace IRaCIS.Core.SCP.Filter
|
||||
else
|
||||
{
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["Project_ExceptionContactDeveloper"] + (context.Exception.InnerException is null ? (context.Exception.Message /*+ context.Exception.StackTrace*/)
|
||||
: (context.Exception.InnerException?.Message /*+ context.Exception.InnerException?.StackTrace*/)), ApiResponseCodeEnum.ProgramException));
|
||||
: (context.Exception.InnerException?.Message /*+ context.Exception.InnerException?.StackTrace*/)), ApiResponseCodeEnum.BackEndAnomaly));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -10,17 +8,17 @@
|
||||
<PackageReference Include="AlibabaCloud.SDK.Sts20150401" Version="1.2.0" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="11.0.0" />
|
||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.14.1" />
|
||||
<PackageReference Include="AWSSDK.S3" Version="4.0.21" />
|
||||
<PackageReference Include="AWSSDK.SecurityToken" Version="4.0.5.19" />
|
||||
<PackageReference Include="AWSSDK.S3" Version="4.0.24" />
|
||||
<PackageReference Include="AWSSDK.SecurityToken" Version="4.0.7" />
|
||||
<PackageReference Include="DistributedLock.Core" Version="1.0.9" />
|
||||
<PackageReference Include="DistributedLock.SqlServer" Version="1.0.7" />
|
||||
<PackageReference Include="fo-dicom" Version="5.2.6" />
|
||||
<PackageReference Include="fo-dicom.Codecs" Version="5.16.7" />
|
||||
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.2.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.10" />
|
||||
<PackageReference Include="AutoMapper" Version="16.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.8" />
|
||||
<PackageReference Include="AutoMapper" Version="14.0.0" />
|
||||
<PackageReference Include="Minio" Version="7.0.0" />
|
||||
<PackageReference Include="My.Extensions.Localization.Json" Version="3.3.0">
|
||||
<PackageReference Include="My.Extensions.Localization.Json" Version="4.0.0">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.2" />
|
||||
@@ -28,7 +26,7 @@
|
||||
<PackageReference Include="Serilog.Extensions.Hosting" Version="10.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.7" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.2.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -13,7 +13,6 @@ using IRaCIS.Core.SCP.Service;
|
||||
using MassTransit;
|
||||
using MassTransit.NewIdProviders;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Panda.DynamicWebApi;
|
||||
using Serilog;
|
||||
using Serilog.Events;
|
||||
@@ -71,7 +70,7 @@ builder.Services.AddHostedService<FileSyncWorker>();
|
||||
builder.Services.AddHealthChecks();
|
||||
|
||||
//本地化
|
||||
builder.Services.AddJsonLocalization(options => options.ResourcesPath = "Resources");
|
||||
builder.Services.AddJsonLocalization(options => options.ResourcesPath = new[] { "Resources" });
|
||||
|
||||
|
||||
// 异常、参数统一验证过滤器、Json序列化配置、字符串参数绑型统一Trim()
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ObjectStoreService": {
|
||||
"ObjectStoreUse": "AliyunOSS",
|
||||
"IsOpenStoreSync": true,
|
||||
"ApiDeployRegion": "CN",
|
||||
"SyncConfigList": [
|
||||
{
|
||||
"Domain": "irc.test.rayplus.net",
|
||||
"Primary": "AliyunOSS",
|
||||
"Target": "AWS",
|
||||
"UploadRegion": "CN",
|
||||
"TargetRegion": "US",
|
||||
"IsOpenSync": false
|
||||
},
|
||||
{
|
||||
"Domain": "lili.uat.extimaging.com",
|
||||
"Primary": "AWS",
|
||||
"Target": "AliyunOSS",
|
||||
"UploadRegion": "US",
|
||||
"TargetRegion": "CN",
|
||||
"IsOpenSync": false
|
||||
}
|
||||
],
|
||||
"AliyunOSS": {
|
||||
"RegionId": "cn-shanghai",
|
||||
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||
"AccessKeyId": "LTAI5tRRZehUp2V9pyTPtAJm",
|
||||
"AccessKeySecret": "FLizxkHsMm4CGYHtkV8E3PNJJZU7oV",
|
||||
"RoleArn": "acs:ram::1899121822495495:role/dev-oss-access",
|
||||
"BucketName": "rayplus-irc-test-store",
|
||||
"ViewEndpoint": "https://rayplus-irc-test-store.oss-cn-shanghai.aliyuncs.com",
|
||||
"Region": "oss-cn-shanghai",
|
||||
"DurationSeconds": 7200
|
||||
},
|
||||
// AWS S3 对象存储服务的配置
|
||||
"AWS": {
|
||||
// AWS S3 的Region
|
||||
"Region": "us-east-1",
|
||||
// AWS S3 的内部访问端点
|
||||
"EndPoint": "s3.us-east-1.amazonaws.com",
|
||||
// 是否使用 SSL
|
||||
"UseSSL": true,
|
||||
// AWS S3 的角色 ARN
|
||||
"RoleArn": "arn:aws:iam::471112624751:role/uat_s3_access",
|
||||
// AWS S3 的访问密钥 ID
|
||||
"AccessKeyId": "AKIAW3MEAFJX7IPXISP4",
|
||||
// AWS S3 的访问密钥 Secret
|
||||
"SecretAccessKey": "Pgrg3le5jPxZQ7MR1yYNS30J0XRyJeKVyIIjElXc",
|
||||
// AWS S3 的Bucket名称
|
||||
"BucketName": "ei-med-s3-lili-uat-store",
|
||||
// AWS S3 的访问端点
|
||||
"ViewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com",
|
||||
// AWS S3 的持续数秒
|
||||
"DurationSeconds": 7200
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"RemoteNew": "Server=prod_mssql_standard,1433;Database=Prod_Rayplus;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||
"Hangfire": "Server=prod_mssql_standard,1433;Database=Prod_Rayplus_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
||||
},
|
||||
"DicomSCPServiceConfig": {
|
||||
"CalledAEList": [
|
||||
"STORESCP"
|
||||
],
|
||||
"ServerPort": 11112
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ObjectStoreService": {
|
||||
"ObjectStoreUse": "AliyunOSS",
|
||||
"IsOpenStoreSync": true,
|
||||
"ApiDeployRegion": "CN",
|
||||
"SyncConfigList": [
|
||||
{
|
||||
"Domain": "irc.test.rayplus.net",
|
||||
"Primary": "AliyunOSS",
|
||||
"Target": "AWS",
|
||||
"UploadRegion": "CN",
|
||||
"TargetRegion": "US",
|
||||
"IsOpenSync": false
|
||||
},
|
||||
{
|
||||
"Domain": "lili.uat.extimaging.com",
|
||||
"Primary": "AWS",
|
||||
"Target": "AliyunOSS",
|
||||
"UploadRegion": "US",
|
||||
"TargetRegion": "CN",
|
||||
"IsOpenSync": false
|
||||
}
|
||||
],
|
||||
"AliyunOSS": {
|
||||
"RegionId": "cn-shanghai",
|
||||
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||
"AccessKeyId": "LTAI5tRRZehUp2V9pyTPtAJm",
|
||||
"AccessKeySecret": "FLizxkHsMm4CGYHtkV8E3PNJJZU7oV",
|
||||
"RoleArn": "acs:ram::1899121822495495:role/dev-oss-access",
|
||||
"BucketName": "rayplus-irc-test-store",
|
||||
"ViewEndpoint": "https://rayplus-irc-test-store.oss-cn-shanghai.aliyuncs.com",
|
||||
"Region": "oss-cn-shanghai",
|
||||
"DurationSeconds": 7200
|
||||
},
|
||||
// AWS S3 对象存储服务的配置
|
||||
"AWS": {
|
||||
// AWS S3 的Region
|
||||
"Region": "us-east-1",
|
||||
// AWS S3 的内部访问端点
|
||||
"EndPoint": "s3.us-east-1.amazonaws.com",
|
||||
// 是否使用 SSL
|
||||
"UseSSL": true,
|
||||
// AWS S3 的角色 ARN
|
||||
"RoleArn": "arn:aws:iam::471112624751:role/uat_s3_access",
|
||||
// AWS S3 的访问密钥 ID
|
||||
"AccessKeyId": "AKIAW3MEAFJX7IPXISP4",
|
||||
// AWS S3 的访问密钥 Secret
|
||||
"SecretAccessKey": "Pgrg3le5jPxZQ7MR1yYNS30J0XRyJeKVyIIjElXc",
|
||||
// AWS S3 的Bucket名称
|
||||
"BucketName": "ei-med-s3-lili-uat-store",
|
||||
// AWS S3 的访问端点
|
||||
"ViewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com",
|
||||
// AWS S3 的持续数秒
|
||||
"DurationSeconds": 7200
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"RemoteNew": "Server=106.14.89.110,1435;Database=Test_Rayplus;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||
"Hangfire": "Server=106.14.89.110,1435;Database=Test_Rayplus_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||
},
|
||||
"DicomSCPServiceConfig": {
|
||||
"CalledAEList": [
|
||||
"STORESCP"
|
||||
],
|
||||
"ServerPort": 11112
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ObjectStoreService": {
|
||||
"ObjectStoreUse": "AliyunOSS",
|
||||
"IsOpenStoreSync": true,
|
||||
"ApiDeployRegion": "CN",
|
||||
"SyncConfigList": [
|
||||
{
|
||||
"Domain": "irc.uat.extimaging.com",
|
||||
"Primary": "AliyunOSS",
|
||||
"Target": "AWS",
|
||||
"UploadRegion": "CN",
|
||||
"TargetRegion": "US",
|
||||
"IsOpenSync": true
|
||||
},
|
||||
{
|
||||
"Domain": "lili.uat.extimaging.com",
|
||||
"Primary": "AWS",
|
||||
"Target": "AliyunOSS",
|
||||
"UploadRegion": "US",
|
||||
"TargetRegion": "CN",
|
||||
"IsOpenSync": true
|
||||
}
|
||||
],
|
||||
"AliyunOSS": {
|
||||
"RegionId": "cn-shanghai",
|
||||
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||
"AccessKeyId": "LTAI5tRRZehUp2V9pyTPtAJm",
|
||||
"AccessKeySecret": "FLizxkHsMm4CGYHtkV8E3PNJJZU7oV",
|
||||
"RoleArn": "acs:ram::1899121822495495:role/dev-oss-access",
|
||||
"BucketName": "zy-irc-test-store",
|
||||
"ViewEndpoint": "https://zy-irc-test-store.oss-cn-shanghai.aliyuncs.com",
|
||||
"Region": "oss-cn-shanghai",
|
||||
"DurationSeconds": 7200
|
||||
},
|
||||
// AWS S3 对象存储服务的配置
|
||||
"AWS": {
|
||||
// AWS S3 的Region
|
||||
"Region": "us-east-1",
|
||||
// AWS S3 的内部访问端点
|
||||
"EndPoint": "s3.us-east-1.amazonaws.com",
|
||||
// 是否使用 SSL
|
||||
"UseSSL": true,
|
||||
// AWS S3 的角色 ARN
|
||||
"RoleArn": "arn:aws:iam::471112624751:role/uat_s3_access",
|
||||
// AWS S3 的访问密钥 ID
|
||||
"AccessKeyId": "AKIAW3MEAFJX7IPXISP4",
|
||||
// AWS S3 的访问密钥 Secret
|
||||
"SecretAccessKey": "Pgrg3le5jPxZQ7MR1yYNS30J0XRyJeKVyIIjElXc",
|
||||
// AWS S3 的Bucket名称
|
||||
"BucketName": "ei-med-s3-lili-uat-store",
|
||||
// AWS S3 的访问端点
|
||||
"ViewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com",
|
||||
// AWS S3 的持续数秒
|
||||
"DurationSeconds": 7200
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"RemoteNew": "Server=101.132.253.119,1435;Database=Uat_HeAnShu;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||
"Hangfire": "Server101.132.253.119,1435;Database=Uat_HeAnShu_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||
},
|
||||
"DicomSCPServiceConfig": {
|
||||
"CalledAEList": [
|
||||
"STORESCP"
|
||||
],
|
||||
"ServerPort": 11112
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ObjectStoreService": {
|
||||
"ObjectStoreUse": "AliyunOSS",
|
||||
"IsOpenStoreSync": true,
|
||||
"ApiDeployRegion": "CN",
|
||||
"SyncConfigList": [
|
||||
{
|
||||
"Domain": "irc.uat.rayplus.net",
|
||||
"Primary": "AliyunOSS",
|
||||
"Target": "AWS",
|
||||
"UploadRegion": "CN",
|
||||
"TargetRegion": "US",
|
||||
"IsOpenSync": false
|
||||
},
|
||||
{
|
||||
"Domain": "lili.uat.extimaging.com",
|
||||
"Primary": "AWS",
|
||||
"Target": "AliyunOSS",
|
||||
"UploadRegion": "US",
|
||||
"TargetRegion": "CN",
|
||||
"IsOpenSync": false
|
||||
}
|
||||
],
|
||||
"AliyunOSS": {
|
||||
"RegionId": "cn-shanghai",
|
||||
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||
"AccessKeyId": "LTAI5tFUCCmz5TwghZHsj45Y",
|
||||
"AccessKeySecret": "8evrBy1fVfzJG25i67Jm0xqn9Xcw2T",
|
||||
"RoleArn": "acs:ram::1078130221702011:role/uat-oss-access",
|
||||
"BucketName": "rayplus-irc-uat-store",
|
||||
"ViewEndpoint": "https://rayplus-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
|
||||
"Region": "oss-cn-shanghai",
|
||||
"DurationSeconds": 7200
|
||||
},
|
||||
// AWS S3 对象存储服务的配置
|
||||
"AWS": {
|
||||
// AWS S3 的Region
|
||||
"Region": "us-east-1",
|
||||
// AWS S3 的内部访问端点
|
||||
"EndPoint": "s3.us-east-1.amazonaws.com",
|
||||
// 是否使用 SSL
|
||||
"UseSSL": true,
|
||||
// AWS S3 的角色 ARN
|
||||
"RoleArn": "arn:aws:iam::471112624751:role/uat_s3_access",
|
||||
// AWS S3 的访问密钥 ID
|
||||
"AccessKeyId": "AKIAW3MEAFJX7IPXISP4",
|
||||
// AWS S3 的访问密钥 Secret
|
||||
"SecretAccessKey": "Pgrg3le5jPxZQ7MR1yYNS30J0XRyJeKVyIIjElXc",
|
||||
// AWS S3 的Bucket名称
|
||||
"BucketName": "ei-med-s3-lili-uat-store",
|
||||
// AWS S3 的访问端点
|
||||
"ViewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com",
|
||||
// AWS S3 的持续数秒
|
||||
"DurationSeconds": 7200
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"RemoteNew": "Server=101.132.253.119,1435;Database=Uat_Rayplus;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||
"Hangfire": "Server101.132.253.119,1435;Database=Uat_Rayplus_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||
},
|
||||
"DicomSCPServiceConfig": {
|
||||
"CalledAEList": [
|
||||
"STORESCP"
|
||||
],
|
||||
"ServerPort": 11112
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,43 +1,21 @@
|
||||
using AlibabaCloud.SDK.Sts20150401;
|
||||
using Amazon.Auth.AccessControlPolicy;
|
||||
using Amazon.SecurityToken;
|
||||
using AutoMapper;
|
||||
using Azure.Core;
|
||||
using IdentityModel.Client;
|
||||
using IdentityModel.OidcClient;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Auth;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using MassTransit;
|
||||
using MassTransit.Futures.Contracts;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Org.BouncyCastle.Tls;
|
||||
using RestSharp;
|
||||
using RestSharp.Authenticators;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using ZiggyCreatures.Caching.Fusion;
|
||||
using AssumeRoleRequest = Amazon.SecurityToken.Model.AssumeRoleRequest;
|
||||
using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
||||
|
||||
namespace IRaCIS.Api.Controllers
|
||||
{
|
||||
|
||||
@@ -351,6 +351,23 @@ namespace IRaCIS.Core.API.Controllers
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交阅片裁判表单
|
||||
/// </summary>
|
||||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingImageTask/SubmitJudgeForm")]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
|
||||
public async Task<IResponseOutput> SubmitJudgeForm(DataInspectionDto<SetJudgeFormInDto> opt)
|
||||
{
|
||||
var singid = await _inspectionService.RecordSing(opt.SignInfo);
|
||||
var result = await _iReadingImageTaskService.SubmitJudgeForm(opt.Data);
|
||||
await _inspectionService.CompletedSign(singid, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 配置 基础逻辑信息并确认
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using AutoMapper;
|
||||
using ExcelDataReader;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.BusinessFilter;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.Dicom;
|
||||
using IRaCIS.Core.Application.Contracts.Dicom.DTO;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.MassTransit.Command;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
@@ -17,8 +15,6 @@ using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using MassTransit.Mediator;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
||||
@@ -27,21 +23,15 @@ using Microsoft.AspNetCore.StaticFiles;
|
||||
using Microsoft.AspNetCore.WebUtilities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.Net.Http.Headers;
|
||||
using MiniExcelLibs;
|
||||
using Newtonsoft.Json;
|
||||
using SharpCompress.Archives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Path = System.IO.Path;
|
||||
|
||||
namespace IRaCIS.Core.API.Controllers
|
||||
@@ -132,7 +122,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||
//处理压缩文件
|
||||
if (fileName.Contains(".Zip", StringComparison.OrdinalIgnoreCase) || fileName.Contains(".rar", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var archive = ArchiveFactory.Open(section.Body);
|
||||
var archive = ArchiveFactory.OpenArchive(section.Body);
|
||||
|
||||
foreach (var entry in archive.Entries)
|
||||
{
|
||||
@@ -213,7 +203,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||
//处理压缩文件
|
||||
if (fileName.Contains(".Zip", StringComparison.OrdinalIgnoreCase) || fileName.Contains(".rar", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var archive = ArchiveFactory.Open(section.Body);
|
||||
var archive = ArchiveFactory.OpenArchive(section.Body);
|
||||
|
||||
foreach (var entry in archive.Entries)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<UserSecretsId>354572d4-9e15-4099-807c-63a2d29ff9f2</UserSecretsId>
|
||||
<LangVersion>default</LangVersion>
|
||||
@@ -10,6 +9,7 @@
|
||||
<Company>上海展影医疗科技有限公司</Company>
|
||||
<Product>IRC影像系统 (EICS)</Product>
|
||||
<Copyright>上海展影医疗科技有限公司版权所有</Copyright>
|
||||
<NoWarn>$(NoWarn);NU1903</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@@ -69,22 +69,21 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.14" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.8" />
|
||||
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.15">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ConfigMapFileProvider" Version="2.0.1" />
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.20" />
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.23" />
|
||||
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
|
||||
<PackageReference Include="Hangfire.InMemory" Version="1.0.0" />
|
||||
<PackageReference Include="Hangfire.SqlServer" Version="1.8.20" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.10" />
|
||||
<PackageReference Include="Hangfire.SqlServer" Version="1.8.23" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.8" />
|
||||
<PackageReference Include="Serilog.Formatting.Compact" Version="3.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Email" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="9.0.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="10.2.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -213,6 +213,13 @@
|
||||
<param name="opt"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.SubmitJudgeForm(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.SetJudgeFormInDto})">
|
||||
<summary>
|
||||
提交阅片裁判表单
|
||||
</summary>
|
||||
<param name="opt"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.ConfigTrialBasicInfoConfirm(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Contracts.BasicTrialConfig})">
|
||||
<summary>
|
||||
配置 基础逻辑信息并确认
|
||||
@@ -378,6 +385,11 @@
|
||||
LowerCamelCaseJsonAttribute 可以设置类小写返回给前端
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Program">
|
||||
<summary>
|
||||
Auto-generated public partial Program class for top-level statement apps.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:ZhaoXi._001.NET5Demo.Practice.WebApi.Utility.Jwt.CustomHSJWTService">
|
||||
<summary>
|
||||
对称可逆加密
|
||||
@@ -413,5 +425,49 @@
|
||||
<param name="withPrivate"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.CreateDocumentationId(System.Type)">
|
||||
<summary>
|
||||
Generates a documentation comment ID for a type.
|
||||
Example: T:Namespace.Outer+Inner`1 becomes T:Namespace.Outer.Inner`1
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.CreateDocumentationId(System.Reflection.PropertyInfo)">
|
||||
<summary>
|
||||
Generates a documentation comment ID for a property.
|
||||
Example: P:Namespace.ContainingType.PropertyName or for an indexer P:Namespace.ContainingType.Item(System.Int32)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.CreateDocumentationId(System.Type,System.String)">
|
||||
<summary>
|
||||
Generates a documentation comment ID for a property given its container type and property name.
|
||||
Example: P:Namespace.ContainingType.PropertyName
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.CreateDocumentationId(System.Reflection.MethodInfo)">
|
||||
<summary>
|
||||
Generates a documentation comment ID for a method (or constructor).
|
||||
For example:
|
||||
M:Namespace.ContainingType.MethodName(ParamType1,ParamType2)~ReturnType
|
||||
M:Namespace.ContainingType.#ctor(ParamType)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.GetTypeDocId(System.Type,System.Boolean,System.Boolean)">
|
||||
<summary>
|
||||
Generates a documentation ID string for a type.
|
||||
This method handles nested types (replacing '+' with '.'),
|
||||
generic types, arrays, pointers, by-ref types, and generic parameters.
|
||||
The <paramref name="includeGenericArguments"/> flag controls whether
|
||||
constructed generic type arguments are emitted, while <paramref name="omitGenericArity"/>
|
||||
controls whether the generic arity marker (e.g. "`1") is appended.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.NormalizeDocId(System.String)">
|
||||
<summary>
|
||||
Normalizes a documentation comment ID to match the compiler-style format.
|
||||
Strips the return type suffix for ordinary methods but retains it for conversion operators.
|
||||
</summary>
|
||||
<param name="docId">The documentation comment ID to normalize.</param>
|
||||
<returns>The normalized documentation comment ID.</returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -4,30 +4,16 @@ using IRaCIS.Core.API.HostService;
|
||||
using IRaCIS.Core.Application.BusinessFilter;
|
||||
using IRaCIS.Core.Application.BusinessFilter.LegacyController.Database.Api;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.MassTransit.Consumer;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Application.Service.BusinessFilter;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using MassTransit;
|
||||
using MassTransit.NewIdProviders;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Newtonsoft.Json;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using UAParser;
|
||||
|
||||
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
|
||||
AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
|
||||
@@ -95,6 +81,8 @@ builder.Services.AddSingleton<FileSyncQueue>();
|
||||
builder.Services.AddHostedService<SyncFileRecoveryService>();
|
||||
builder.Services.AddHostedService<FileSyncWorker>();
|
||||
|
||||
builder.Services.AddSingleton(_ => Parser.GetDefault());
|
||||
|
||||
//minimal api 异常处理
|
||||
builder.Services.AddExceptionHandler<GlobalExceptionHandler>();
|
||||
//builder.Services.AddProblemDetails();
|
||||
@@ -103,7 +91,7 @@ builder.Services.AddExceptionHandler<GlobalExceptionHandler>();
|
||||
builder.Services.AddHealthChecks();
|
||||
builder.Services.AddSerilog();
|
||||
//本地化
|
||||
builder.Services.AddJsonLocalization(options => options.ResourcesPath = "Resources");
|
||||
builder.Services.AddJsonLocalization(options => options.ResourcesPath = new[] { "Resources" });
|
||||
|
||||
// 异常、参数统一验证过滤器、Json序列化配置、字符串参数绑型统一Trim()
|
||||
builder.Services.AddControllers(options =>
|
||||
@@ -286,6 +274,7 @@ try
|
||||
#region 运行环境 部署平台
|
||||
|
||||
Log.Logger.Warning($"当前环境:{enviromentName}");
|
||||
Log.Logger.Warning($".NET 运行时版本:{Environment.Version}");
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
|
||||
@@ -25,6 +25,24 @@
|
||||
},
|
||||
"applicationUrl": "http://0.0.0.0:6100"
|
||||
},
|
||||
"IRaCIS.Test_Rayplus": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Test_Rayplus",
|
||||
"ASPNETCORE_OpenSwagger": "true"
|
||||
},
|
||||
"applicationUrl": "http://0.0.0.0:6100"
|
||||
},
|
||||
"IRaCIS.Uat_Rayplus": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Uat_Rayplus",
|
||||
"ASPNETCORE_OpenSwagger": "true"
|
||||
},
|
||||
"applicationUrl": "http://0.0.0.0:6100"
|
||||
},
|
||||
"IRaCIS.Test_IRC_PGSQL": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Serilog;
|
||||
using System.Linq;
|
||||
using UAParser;
|
||||
|
||||
namespace IRaCIS.Core.API
|
||||
{
|
||||
@@ -17,11 +18,14 @@ namespace IRaCIS.Core.API
|
||||
{
|
||||
app.UseMiddleware<RequestResponseLoggingMiddleware>();
|
||||
|
||||
// 从 DI 容器中获取 Parser 实例
|
||||
var uaParser = app.ApplicationServices.GetRequiredService<Parser>();
|
||||
|
||||
app.UseSerilogRequestLogging(opts
|
||||
=>
|
||||
{
|
||||
|
||||
opts.MessageTemplate = "{FullName} {UserType} {UserIp} {Host} {RequestMethod} {RequestPath} {RequestBody} responded {StatusCode} in {Elapsed:0.0000} ms";
|
||||
opts.MessageTemplate = "{FullName} {UserType} {UserIp} {Host} {RequestMethod} {RequestPath}{QueryString} {RequestBody} {OS} {Browser} {DeviceType} responded {StatusCode} in {Elapsed:0.0000} ms";
|
||||
|
||||
opts.EnrichDiagnosticContext = (diagnosticContext, httpContext) =>
|
||||
{
|
||||
@@ -33,10 +37,9 @@ namespace IRaCIS.Core.API
|
||||
|
||||
|
||||
// Only set it if available. You're not sending sensitive data in a querystring right?!
|
||||
if (request.QueryString.HasValue)
|
||||
{
|
||||
diagnosticContext.Set("QueryString", request.QueryString.Value);
|
||||
}
|
||||
|
||||
diagnosticContext.Set("QueryString", request.QueryString.Value ?? "");
|
||||
|
||||
|
||||
diagnosticContext.Set("FullName", httpContext?.User?.FindFirst(JwtIRaCISClaimType.FullName)?.Value);
|
||||
|
||||
@@ -52,6 +55,38 @@ namespace IRaCIS.Core.API
|
||||
|
||||
diagnosticContext.Set("UserIp", clientIp);
|
||||
|
||||
|
||||
// ==================== 新增:解析 User-Agent ====================
|
||||
try
|
||||
{
|
||||
var userAgent = httpContext.Request.Headers["User-Agent"].ToString();
|
||||
|
||||
if (!string.IsNullOrEmpty(userAgent))
|
||||
{
|
||||
var clientInfo = uaParser.Parse(userAgent);
|
||||
|
||||
diagnosticContext.Set("OS", clientInfo.OS.ToString());
|
||||
diagnosticContext.Set("Browser", clientInfo.UA.ToString());
|
||||
//diagnosticContext.Set("DeviceType", clientInfo.Device.ToString());
|
||||
diagnosticContext.Set("DeviceType", userAgent.Contains("Mobile") ? "Mobile": "Desktop");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
diagnosticContext.Set("OS", "Unknown");
|
||||
diagnosticContext.Set("Browser", "Unknown");
|
||||
diagnosticContext.Set("DeviceType", "Unknown");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// 解析失败时记录异常,但不要影响主流程
|
||||
diagnosticContext.Set("OS", "ParseError");
|
||||
diagnosticContext.Set("Browser", "ParseError");
|
||||
diagnosticContext.Set("DeviceType", "ParseError");
|
||||
}
|
||||
// ==============================================================
|
||||
|
||||
#region 非必要不记录
|
||||
//diagnosticContext.Set("Protocol", request.Protocol);
|
||||
//diagnosticContext.Set("Scheme", request.Scheme);
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Microsoft.OpenApi;
|
||||
using Swashbuckle.AspNetCore.Filters;
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
using Swashbuckle.AspNetCore.SwaggerUI;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IRaCIS.Core.API;
|
||||
@@ -52,18 +44,21 @@ public static class SwaggerSetup
|
||||
services.AddSwaggerGen(options =>
|
||||
{
|
||||
|
||||
typeof(SwaggerVersion).GetFields(BindingFlags.Public | BindingFlags.Static).ToList()
|
||||
.ForEach(field =>
|
||||
{
|
||||
var description = field.GetCustomAttribute<DescriptionAttribute>()?.Description ?? field.Name;
|
||||
options.SwaggerDoc(field.Name, new Microsoft.OpenApi.Models.OpenApiInfo
|
||||
{
|
||||
Version = field.Name,
|
||||
Description = $"{field.Name} API",
|
||||
Title = description // 使用Description作为Title
|
||||
});
|
||||
});
|
||||
// 使用反射获取字段并动态创建 Swagger 文档
|
||||
typeof(SwaggerVersion).GetFields(BindingFlags.Public | BindingFlags.Static)
|
||||
.ToList()
|
||||
.ForEach(field =>
|
||||
{
|
||||
var description = field.GetCustomAttribute<DescriptionAttribute>()?.Description ?? field.Name;
|
||||
options.SwaggerDoc(field.Name, new OpenApiInfo
|
||||
{
|
||||
Version = field.Name,
|
||||
Description = $"{field.Name} API",
|
||||
Title = description // 使用 Description 作为 Title
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// 接口排序
|
||||
options.OrderActionsBy(o => o.GroupName);
|
||||
|
||||
|
||||
@@ -94,9 +94,9 @@
|
||||
"Imap": "imap.qiye.aliyun.com",
|
||||
"ImapPort": 993,
|
||||
"FromEmail": "irc@extimaging.com",
|
||||
"FromName": "IRC Imaging System",
|
||||
"FromName": "EIC Imaging System",
|
||||
"AuthorizationCode": "ExtImg@2022",
|
||||
"SiteUrl": "http://irc.extimaging.com/login",
|
||||
"SiteUrl": "http://irc.event.extimaging.com/login",
|
||||
|
||||
"PlatformName": "EICS",
|
||||
"PlatformNameCN": "展影云平台",
|
||||
@@ -117,7 +117,7 @@
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"DuplicationWindowMs": 500,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"RemoteNew": "Server=10.10.10.49,1434;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||
"Hangfire": "Server=10.10.10.49,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"
|
||||
//"RemoteNew": "Server=10.10.10.49,1434;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||
//"Hangfire": "Server=10.10.10.49,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"
|
||||
},
|
||||
"WeComNoticeConfig": {
|
||||
"IsOpenWeComNotice": true,
|
||||
@@ -94,7 +94,7 @@
|
||||
"Imap": "imap.qiye.aliyun.com",
|
||||
"ImapPort": 993,
|
||||
"FromEmail": "irc@extimaging.com",
|
||||
"FromName": "IRC Imaging System",
|
||||
"FromName": "EIC Imaging System",
|
||||
"AuthorizationCode": "ExtImg@2022",
|
||||
"SiteUrl": "http://irc.extimaging.com/login",
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"DuplicationWindowMs": 500,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"RemoteNew": "Server=prod_mssql_standard,1433;Database=Prod_Rayplus;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||
"Hangfire": "Server=prod_mssql_standard,1433;Database=Prod_Rayplus_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
||||
},
|
||||
"WeComNoticeConfig": {
|
||||
"IsOpenWeComNotice": true,
|
||||
"WebhookUrl": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=4355b98e-1e72-4678-8dfb-2fc6ad0bf449", //4355b98e-1e72-4678-8dfb-2fc6ad0bf449 //cdd97aab-d256-4f07-9145-a0a2b1555322
|
||||
"APINoticeUserList": [ "u", "wait..." ],
|
||||
"VueNoticeUserList": [ "wangxiaoshuang", "6b7717a31647293621b97b96f74e6f3d" ]
|
||||
},
|
||||
"ObjectStoreService": {
|
||||
|
||||
"ObjectStoreUse": "AliyunOSS",
|
||||
"IsOpenStoreSync": true,
|
||||
"ApiDeployRegion": "CN",
|
||||
"SyncConfigList": [
|
||||
{
|
||||
"Domain": "irc.uat.rayplus.net",
|
||||
"Primary": "AliyunOSS",
|
||||
"Target": "AWS",
|
||||
"UploadRegion": "CN",
|
||||
"TargetRegion": "US",
|
||||
"IsOpenSync": false
|
||||
},
|
||||
{
|
||||
"Domain": "lili.uat.extimaging.com",
|
||||
"Primary": "AWS",
|
||||
"Target": "AliyunOSS",
|
||||
"UploadRegion": "US",
|
||||
"TargetRegion": "CN",
|
||||
"IsOpenSync": false
|
||||
}
|
||||
],
|
||||
|
||||
"AliyunOSS": {
|
||||
"RegionId": "cn-shanghai",
|
||||
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||
"AccessKeyId": "LTAI5tNRTsqL6aWmHkDmTwoH",
|
||||
"AccessKeySecret": "7mtGz3qrYWI6JMMBZiLeC119VWicZH",
|
||||
"RoleArn": "acs:ram::1899121822495495:role/irc-oss-access",
|
||||
"BucketName": "rayplus-irc-store",
|
||||
"ViewEndpoint": "https://rayplus-irc-store.oss-cn-shanghai.aliyuncs.com",
|
||||
"Region": "oss-cn-shanghai",
|
||||
"DurationSeconds": 7200
|
||||
},
|
||||
|
||||
"MinIO": {
|
||||
"endPoint": "hir-oss.uat.extimaging.com",
|
||||
"port": "80",
|
||||
"useSSL": false,
|
||||
"viewEndpoint": "http://hir-oss.uat.extimaging.com/irc-uat",
|
||||
//"port": "443",
|
||||
//"useSSL": true,
|
||||
//"viewEndpoint": "https://hir-oss.uat.extimaging.com/irc-uat",
|
||||
"accessKey": "b9Ul0e98xPzt6PwRXA1Q",
|
||||
"secretKey": "DzMaU2L4OXl90uytwOmDXF2encN0Jf4Nxu2XkYqQ",
|
||||
"bucketName": "irc-uat"
|
||||
|
||||
},
|
||||
"AWS": {
|
||||
"Region": "us-east-1",
|
||||
"EndPoint": "s3.us-east-1.amazonaws.com",
|
||||
"UseSSL": true,
|
||||
"RoleArn": "arn:aws:iam::471112624751:role/uat_s3_access",
|
||||
"AccessKeyId": "AKIAW3MEAFJX7IPXISP4",
|
||||
"SecretAccessKey": "Pgrg3le5jPxZQ7MR1yYNS30J0XRyJeKVyIIjElXc",
|
||||
"BucketName": "ei-med-s3-lili-uat-store",
|
||||
"ViewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com/",
|
||||
"DurationSeconds": 7200
|
||||
}
|
||||
},
|
||||
|
||||
"BasicSystemConfig": {
|
||||
// 启用质控风险控制功能
|
||||
"QCRiskControl": true,
|
||||
"OpenUserComplexPassword": true,
|
||||
"OpenSignDocumentBeforeWork": true,
|
||||
|
||||
"OpenLoginLimit": true,
|
||||
"LoginMaxFailCount": 5,
|
||||
|
||||
"LoginFailLockMinutes": 30,
|
||||
"AutoLoginOutMinutes": 120,
|
||||
|
||||
"OpenLoginMFA": false,
|
||||
|
||||
"ContinuousReadingTimeMin": 120,
|
||||
"ReadingRestTimeMin": 10,
|
||||
|
||||
"IsNeedChangePassWord": true,
|
||||
"ChangePassWordDays": 90,
|
||||
// 模板类型 1 Elevate 2 Extensive
|
||||
"TemplateType": 2,
|
||||
//MFA免验证发送天数
|
||||
"UserMFAVerifyMinutes": 1440
|
||||
|
||||
},
|
||||
"SystemEmailSendConfig": {
|
||||
"Port": 465,
|
||||
"Host": "smtp.qiye.aliyun.com",
|
||||
"Imap": "imap.qiye.aliyun.com",
|
||||
"ImapPort": 993,
|
||||
"FromEmail": "irc@mail.rayplus.net",
|
||||
"FromName": "RayPlus Imaging System",
|
||||
"AuthorizationCode": "QWE1zxcv7632",
|
||||
"SiteUrl": "https://irc.rayplus.net/login",
|
||||
|
||||
"PlatformName": "RayPlus",
|
||||
"PlatformNameCN": "睿佳影像云平台",
|
||||
"SystemShortName": "RayPlus",
|
||||
"OrganizationName": "RayPlus",
|
||||
"OrganizationNameCN": "RayPlus",
|
||||
"CompanyName": "RayPlus",
|
||||
"CompanyNameCN": "睿佳(武汉)软件科技有限公司",
|
||||
"CompanyShortName": "RayPlus",
|
||||
"CompanyShortNameCN": "睿佳",
|
||||
"IsEnv_US": false,
|
||||
"EmailRegexStr": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
|
||||
"CronEmailDefaultCulture": "zh-CN"
|
||||
},
|
||||
|
||||
"SystemPacsConfig": {
|
||||
"Port": "11113",
|
||||
"IP": "47.117.165.18"
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,32 +1,28 @@
|
||||
{
|
||||
// 日志信息
|
||||
"Logging": {
|
||||
// 日志等级
|
||||
"LogLevel": {
|
||||
// 默认日志等级
|
||||
"Default": "Information",
|
||||
// 调试日志等级
|
||||
"Microsoft": "Warning",
|
||||
// ASP.NET Core 日志等级
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
// 数据库链接字符串
|
||||
"ConnectionStrings": {
|
||||
// 本地数据库链接字符串
|
||||
"RemoteNew": "Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||
// Hangfire 定时任务数据库链接字符串
|
||||
"Hangfire": "Server=106.14.89.110,1435;Database=Test_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||
},
|
||||
"WeComNoticeConfig": {
|
||||
"IsOpenWeComNotice": true,
|
||||
"WebhookUrl": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=4355b98e-1e72-4678-8dfb-2fc6ad0bf449", //4355b98e-1e72-4678-8dfb-2fc6ad0bf449 //cdd97aab-d256-4f07-9145-a0a2b1555322
|
||||
"APINoticeUserList": [ "u", "wait..." ],
|
||||
"VueNoticeUserList": [ "wangxiaoshuang", "6b7717a31647293621b97b96f74e6f3d" ]
|
||||
"WebhookUrl": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=4355b98e-1e72-4678-8dfb-2fc6ad0bf449",
|
||||
"APINoticeUserList": [
|
||||
"u",
|
||||
"wait..."
|
||||
],
|
||||
"VueNoticeUserList": [
|
||||
"wangxiaoshuang",
|
||||
"6b7717a31647293621b97b96f74e6f3d"
|
||||
]
|
||||
},
|
||||
// 对象存储服务配置
|
||||
"ObjectStoreService": {
|
||||
// 使用的对象存储服务类型
|
||||
"ObjectStoreUse": "AliyunOSS",
|
||||
"IsOpenStoreSync": true,
|
||||
"ApiDeployRegion": "CN",
|
||||
@@ -48,168 +44,89 @@
|
||||
"IsOpenSync": true
|
||||
}
|
||||
],
|
||||
// 阿里云对象存储服务的配置
|
||||
"AliyunOSS": {
|
||||
// 阿里云 OSS 的 Region ID
|
||||
"RegionId": "cn-shanghai",
|
||||
// 阿里云 OSS 的内部访问端点
|
||||
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||
// 阿里云 OSS 的外部访问端点
|
||||
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||
// 阿里云 OSS 的访问密钥 ID
|
||||
"AccessKeyId": "LTAI5tRRZehUp2V9pyTPtAJm",
|
||||
// 阿里云 OSS 的访问密钥 Secret
|
||||
"AccessKeySecret": "FLizxkHsMm4CGYHtkV8E3PNJJZU7oV",
|
||||
// 阿里云 OSS 的角色 ARN
|
||||
"RoleArn": "acs:ram::1899121822495495:role/dev-oss-access",
|
||||
// 阿里云 OSS 的Bucket名称
|
||||
"BucketName": "zy-irc-test-store",
|
||||
// 阿里云 OSS 的访问端点
|
||||
"ViewEndpoint": "https://zy-irc-test-dev-cache.oss-cn-shanghai.aliyuncs.com",
|
||||
// 阿里云 OSS 的预览端点
|
||||
"Region": "oss-cn-shanghai",
|
||||
// 阿里云 OSS 的临时访问凭证有效时间(秒)
|
||||
"DurationSeconds": 7200,
|
||||
// 阿里云 OSS 的预览端点
|
||||
"PreviewEndpoint": "https://test-oss.test.extimaging.com"
|
||||
},
|
||||
// MinIO 对象存储服务的配置
|
||||
"MinIO": {
|
||||
// MinIO 的访问端点
|
||||
"EndPoint": "hir-oss.test.extimaging.com",
|
||||
// MinIO 的端口
|
||||
"Port": "443",
|
||||
// 是否使用 SSL
|
||||
"UseSSL": true,
|
||||
// MinIO 的角色 ARN
|
||||
"AccessKey": "fbStsVYCIPKHQneeqMwD",
|
||||
// MinIO 的访问密钥
|
||||
"SecretKey": "TzgvyA3zGXMUnpilJNUlyMYHfosl1hBMl6lxPmjy",
|
||||
// MinIO 的BucketName
|
||||
"BucketName": "irc-test",
|
||||
// MinIO 的访问端点
|
||||
"ViewEndpoint": "https://hir-oss.test.extimaging.com/irc-test"
|
||||
},
|
||||
// AWS S3 对象存储服务的配置
|
||||
"AWS": {
|
||||
// AWS S3 的Region
|
||||
"Region": "us-east-1",
|
||||
// AWS S3 的内部访问端点
|
||||
"EndPoint": "s3.us-east-1.amazonaws.com",
|
||||
// 是否使用 SSL
|
||||
"UseSSL": true,
|
||||
// AWS S3 的角色 ARN
|
||||
"RoleArn": "arn:aws:iam::471112624751:role/uat_s3_access",
|
||||
// AWS S3 的访问密钥 ID
|
||||
"AccessKeyId": "AKIAW3MEAFJX7IPXISP4",
|
||||
// AWS S3 的访问密钥 Secret
|
||||
"SecretAccessKey": "Pgrg3le5jPxZQ7MR1yYNS30J0XRyJeKVyIIjElXc",
|
||||
// AWS S3 的Bucket名称
|
||||
"BucketName": "ei-med-s3-lili-uat-store",
|
||||
// AWS S3 的访问端点
|
||||
"ViewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com",
|
||||
// AWS S3 的持续数秒
|
||||
"DurationSeconds": 7200
|
||||
}
|
||||
},
|
||||
// 系统配置
|
||||
"BasicSystemConfig": {
|
||||
// 启用质控风险控制功能
|
||||
"QCRiskControl": true,
|
||||
// 打开用户复杂密码
|
||||
"OpenUserComplexPassword": false,
|
||||
// 是否在开始工作前强制签署电子知情同意书
|
||||
"OpenSignDocumentBeforeWork": false,
|
||||
// 是否启用登录失败次数限制(防暴力破解)
|
||||
"OpenLoginLimit": false,
|
||||
// 连续登录失败多少次后触发锁定
|
||||
"LoginMaxFailCount": 5,
|
||||
// 触发锁定后账号锁定时长(分钟)
|
||||
"LoginFailLockMinutes": 1,
|
||||
// 无操作自动登出的超时时间(分钟)
|
||||
"AutoLoginOutMinutes": 10,
|
||||
// 是否启用多因子登录认证(MFA)
|
||||
"OpenLoginMFA": false,
|
||||
// 连续阅片的最长工作时间(分钟),超时后强制休息
|
||||
"ContinuousReadingTimeMin": 120,
|
||||
// 强制休息时长(分钟)
|
||||
"ReadingRestTimeMin": 10,
|
||||
// 是否强制用户定期修改密码
|
||||
"IsNeedChangePassWord": true,
|
||||
// 密码有效期(天),到期后必须修改
|
||||
"ChangePassWordDays": 90,
|
||||
// 模板类型 1 Elevate(LiLi) 2 Extensive(展影)
|
||||
"TemplateType": 2,
|
||||
// 是否打开项目关联删除
|
||||
"OpenTrialRelationDelete": true,
|
||||
// 转换PDF服务配置
|
||||
"OpenTrialRelationDelete": false,
|
||||
"ThirdPdfUrl": "http://106.14.89.110:30088/api/v1/convert/file/pdf",
|
||||
//MFA免验证发送天数
|
||||
"UserMFAVerifyMinutes": 1440
|
||||
},
|
||||
// 邮件服务配置(用于系统通知、找回密码、错误报警等)
|
||||
"SystemEmailSendConfig": {
|
||||
|
||||
// 企业邮箱SMTP服务器地址
|
||||
"Host": "smtp.qiye.aliyun.com",
|
||||
// SMTP端口
|
||||
"Port": 465,
|
||||
|
||||
"Imap": "imap.qiye.aliyun.com",
|
||||
"ImapPort": 993,
|
||||
|
||||
// 发件人邮箱地址
|
||||
"FromEmail": "test@extimaging.com",
|
||||
// 发件人显示名称
|
||||
"FromName": "Test IRC Imaging System",
|
||||
// SMTP授权码
|
||||
"FromName": "Test EIC Imaging System",
|
||||
"AuthorizationCode": "SHzyyl2021",
|
||||
// 系统对外访问地址
|
||||
"SiteUrl": "http://irc.test.extimaging.com/login",
|
||||
|
||||
|
||||
// 系统简称 - 一致性核查使用
|
||||
"SystemShortName": "IRC",
|
||||
// 组织英文名称-添加用户默认值
|
||||
"OrganizationName": "ExtImaging",
|
||||
// 组织中文名称
|
||||
"OrganizationNameCN": "ExtImaging",
|
||||
|
||||
"PlatformName": "EICS",
|
||||
"PlatformNameCN": "展影云平台",
|
||||
// 公司英文全称
|
||||
"CompanyName": "Extensive Imaging",
|
||||
// 公司中文全称
|
||||
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||
// 公司英文简称
|
||||
"CompanyShortName": "Extensive Imaging",
|
||||
// 公司中文简称
|
||||
"CompanyShortNameCN": "展影医疗",
|
||||
|
||||
// 是否为国际版环境 方便前端区分,用于区分lili 还是irc 做一些事情
|
||||
"IsEnv_US": false,
|
||||
// 邮箱格式校验正则表达式
|
||||
"EmailRegexStr": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
|
||||
|
||||
//后端周期性邮件默认语言
|
||||
"CronEmailDefaultCulture": "zh-CN"
|
||||
},
|
||||
// PACS 连接配置
|
||||
"SystemPacsConfig": {
|
||||
// PACS服务器端口
|
||||
"Port": "11113",
|
||||
// PACS服务器IP地址
|
||||
"IP": "106.14.89.110"
|
||||
},
|
||||
// 重复请求配置
|
||||
"RequestDuplicationOptions": {
|
||||
// 是否启用重复请求检测
|
||||
"IsEnabled": true,
|
||||
// 重复请求时间窗口(毫秒)
|
||||
"DuplicationWindowMs": 200,
|
||||
// 缓存请求时间(秒)
|
||||
"DuplicationWindowMs": 500,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
}
|
||||
}
|
||||
"ExcludedPaths": []
|
||||
},
|
||||
"FrontWebConfig": "222"
|
||||
}
|
||||
@@ -97,7 +97,7 @@
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"DuplicationWindowMs": 500,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"RemoteNew": "Server=106.14.89.110,1435;Database=Test_Rayplus;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||
"Hangfire": "Server=106.14.89.110,1435;Database=Test_Rayplus_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||
},
|
||||
"WeComNoticeConfig": {
|
||||
"IsOpenWeComNotice": true,
|
||||
"WebhookUrl": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=4355b98e-1e72-4678-8dfb-2fc6ad0bf449", //4355b98e-1e72-4678-8dfb-2fc6ad0bf449 //cdd97aab-d256-4f07-9145-a0a2b1555322
|
||||
"APINoticeUserList": [ "u", "wait..." ],
|
||||
"VueNoticeUserList": [ "wangxiaoshuang", "6b7717a31647293621b97b96f74e6f3d" ]
|
||||
},
|
||||
"ObjectStoreService": {
|
||||
|
||||
"ObjectStoreUse": "AliyunOSS",
|
||||
"IsOpenStoreSync": true,
|
||||
"ApiDeployRegion": "CN",
|
||||
"SyncConfigList": [
|
||||
{
|
||||
"Domain": "irc.test.rayplus.net",
|
||||
"Primary": "AliyunOSS",
|
||||
"Target": "AWS",
|
||||
"UploadRegion": "CN",
|
||||
"TargetRegion": "US",
|
||||
"IsOpenSync": false
|
||||
},
|
||||
{
|
||||
"Domain": "lili.uat.extimaging.com",
|
||||
"Primary": "AWS",
|
||||
"Target": "AliyunOSS",
|
||||
"UploadRegion": "US",
|
||||
"TargetRegion": "CN",
|
||||
"IsOpenSync": false
|
||||
}
|
||||
],
|
||||
|
||||
"AliyunOSS": {
|
||||
"RegionId": "cn-shanghai",
|
||||
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||
"AccessKeyId": "LTAI5tRRZehUp2V9pyTPtAJm",
|
||||
"AccessKeySecret": "FLizxkHsMm4CGYHtkV8E3PNJJZU7oV",
|
||||
"RoleArn": "acs:ram::1899121822495495:role/dev-oss-access",
|
||||
"BucketName": "rayplus-irc-test-store",
|
||||
"ViewEndpoint": "https://rayplus-irc-test-store.oss-cn-shanghai.aliyuncs.com",
|
||||
"Region": "oss-cn-shanghai",
|
||||
"DurationSeconds": 7200
|
||||
},
|
||||
|
||||
"MinIO": {
|
||||
"endPoint": "hir-oss.uat.extimaging.com",
|
||||
"port": "80",
|
||||
"useSSL": false,
|
||||
"viewEndpoint": "http://hir-oss.uat.extimaging.com/irc-uat",
|
||||
//"port": "443",
|
||||
//"useSSL": true,
|
||||
//"viewEndpoint": "https://hir-oss.uat.extimaging.com/irc-uat",
|
||||
"accessKey": "b9Ul0e98xPzt6PwRXA1Q",
|
||||
"secretKey": "DzMaU2L4OXl90uytwOmDXF2encN0Jf4Nxu2XkYqQ",
|
||||
"bucketName": "irc-uat"
|
||||
|
||||
},
|
||||
"AWS": {
|
||||
"Region": "us-east-1",
|
||||
"EndPoint": "s3.us-east-1.amazonaws.com",
|
||||
"UseSSL": true,
|
||||
"RoleArn": "arn:aws:iam::471112624751:role/uat_s3_access",
|
||||
"AccessKeyId": "AKIAW3MEAFJX7IPXISP4",
|
||||
"SecretAccessKey": "Pgrg3le5jPxZQ7MR1yYNS30J0XRyJeKVyIIjElXc",
|
||||
"BucketName": "ei-med-s3-lili-uat-store",
|
||||
"ViewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com/",
|
||||
"DurationSeconds": 7200
|
||||
}
|
||||
},
|
||||
|
||||
"BasicSystemConfig": {
|
||||
// 启用质控风险控制功能
|
||||
"QCRiskControl": true,
|
||||
"OpenUserComplexPassword": true,
|
||||
"OpenSignDocumentBeforeWork": true,
|
||||
|
||||
"OpenLoginLimit": true,
|
||||
"LoginMaxFailCount": 5,
|
||||
|
||||
"LoginFailLockMinutes": 30,
|
||||
"AutoLoginOutMinutes": 120,
|
||||
|
||||
"OpenLoginMFA": false,
|
||||
|
||||
"ContinuousReadingTimeMin": 120,
|
||||
"ReadingRestTimeMin": 10,
|
||||
|
||||
"IsNeedChangePassWord": true,
|
||||
"ChangePassWordDays": 90,
|
||||
// 模板类型 1 Elevate 2 Extensive
|
||||
"TemplateType": 2,
|
||||
//MFA免验证发送天数
|
||||
"UserMFAVerifyMinutes": 1440
|
||||
|
||||
},
|
||||
"SystemEmailSendConfig": {
|
||||
"Port": 465,
|
||||
"Host": "smtp.qiye.aliyun.com",
|
||||
"Imap": "imap.qiye.aliyun.com",
|
||||
"ImapPort": 993,
|
||||
"FromEmail": "test_irc@mail.rayplus.net",
|
||||
"FromName": "Test RayPlus Imaging System",
|
||||
"AuthorizationCode": "QWE1zxcv7632",
|
||||
"SiteUrl": "https://irc.test.rayplus.net/login",
|
||||
|
||||
"PlatformName": "RayPlus",
|
||||
"PlatformNameCN": "睿佳影像云平台",
|
||||
"SystemShortName": "RayPlus",
|
||||
"OrganizationName": "RayPlus",
|
||||
"OrganizationNameCN": "RayPlus",
|
||||
"CompanyName": "RayPlus",
|
||||
"CompanyNameCN": "睿佳(武汉)软件科技有限公司",
|
||||
"CompanyShortName": "RayPlus",
|
||||
"CompanyShortNameCN": "睿佳",
|
||||
"IsEnv_US": false,
|
||||
"EmailRegexStr": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
|
||||
"CronEmailDefaultCulture": "zh-CN"
|
||||
},
|
||||
|
||||
"SystemPacsConfig": {
|
||||
"Port": "11113",
|
||||
"IP": "101.132.253.119"
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
@@ -122,7 +122,7 @@
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"DuplicationWindowMs": 500,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"DuplicationWindowMs": 500,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"DuplicationWindowMs": 500,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"RemoteNew": "Server=101.132.253.119,1435;Database=Uat_HeAnShu;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||
"Hangfire": "Server=101.132.253.119,1435;Database=Uat_HeAnShu_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||
},
|
||||
"WeComNoticeConfig": {
|
||||
"IsOpenWeComNotice": true,
|
||||
"WebhookUrl": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=4355b98e-1e72-4678-8dfb-2fc6ad0bf449", //4355b98e-1e72-4678-8dfb-2fc6ad0bf449 //cdd97aab-d256-4f07-9145-a0a2b1555322
|
||||
"APINoticeUserList": [ "u", "wait..." ],
|
||||
"VueNoticeUserList": [ "wangxiaoshuang", "6b7717a31647293621b97b96f74e6f3d" ]
|
||||
},
|
||||
"ObjectStoreService": {
|
||||
|
||||
"ObjectStoreUse": "AliyunOSS",
|
||||
"IsOpenStoreSync": true,
|
||||
"ApiDeployRegion": "CN",
|
||||
"SyncConfigList": [
|
||||
{
|
||||
"Domain": "irc.uat.rayplus.net",
|
||||
"Primary": "AliyunOSS",
|
||||
"Target": "AWS",
|
||||
"UploadRegion": "CN",
|
||||
"TargetRegion": "US",
|
||||
"IsOpenSync": false
|
||||
},
|
||||
{
|
||||
"Domain": "lili.uat.extimaging.com",
|
||||
"Primary": "AWS",
|
||||
"Target": "AliyunOSS",
|
||||
"UploadRegion": "US",
|
||||
"TargetRegion": "CN",
|
||||
"IsOpenSync": false
|
||||
}
|
||||
],
|
||||
|
||||
"AliyunOSS": {
|
||||
"RegionId": "cn-shanghai",
|
||||
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||
"AccessKeyId": "LTAI5tFUCCmz5TwghZHsj45Y",
|
||||
"AccessKeySecret": "8evrBy1fVfzJG25i67Jm0xqn9Xcw2T",
|
||||
"RoleArn": "acs:ram::1078130221702011:role/uat-oss-access",
|
||||
"BucketName": "heanshu-irc-uat-store",
|
||||
"ViewEndpoint": "https://heanshu-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
|
||||
"Region": "oss-cn-shanghai",
|
||||
"DurationSeconds": 7200
|
||||
},
|
||||
|
||||
"MinIO": {
|
||||
"endPoint": "hir-oss.uat.extimaging.com",
|
||||
"port": "80",
|
||||
"useSSL": false,
|
||||
"viewEndpoint": "http://hir-oss.uat.extimaging.com/irc-uat",
|
||||
//"port": "443",
|
||||
//"useSSL": true,
|
||||
//"viewEndpoint": "https://hir-oss.uat.extimaging.com/irc-uat",
|
||||
"accessKey": "b9Ul0e98xPzt6PwRXA1Q",
|
||||
"secretKey": "DzMaU2L4OXl90uytwOmDXF2encN0Jf4Nxu2XkYqQ",
|
||||
"bucketName": "irc-uat"
|
||||
|
||||
},
|
||||
"AWS": {
|
||||
"Region": "us-east-1",
|
||||
"EndPoint": "s3.us-east-1.amazonaws.com",
|
||||
"UseSSL": true,
|
||||
"RoleArn": "arn:aws:iam::471112624751:role/uat_s3_access",
|
||||
"AccessKeyId": "AKIAW3MEAFJX7IPXISP4",
|
||||
"SecretAccessKey": "Pgrg3le5jPxZQ7MR1yYNS30J0XRyJeKVyIIjElXc",
|
||||
"BucketName": "ei-med-s3-lili-uat-store",
|
||||
"ViewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com/",
|
||||
"DurationSeconds": 7200
|
||||
}
|
||||
},
|
||||
|
||||
"BasicSystemConfig": {
|
||||
// 启用质控风险控制功能
|
||||
"QCRiskControl": true,
|
||||
"OpenUserComplexPassword": true,
|
||||
"OpenSignDocumentBeforeWork": true,
|
||||
|
||||
"OpenLoginLimit": true,
|
||||
"LoginMaxFailCount": 5,
|
||||
|
||||
"LoginFailLockMinutes": 30,
|
||||
"AutoLoginOutMinutes": 120,
|
||||
|
||||
"OpenLoginMFA": false,
|
||||
|
||||
"ContinuousReadingTimeMin": 120,
|
||||
"ReadingRestTimeMin": 10,
|
||||
|
||||
"IsNeedChangePassWord": true,
|
||||
"ChangePassWordDays": 90,
|
||||
// 模板类型 1 Elevate 2 Extensive
|
||||
"TemplateType": 2,
|
||||
//MFA免验证发送天数
|
||||
"UserMFAVerifyMinutes": 1440
|
||||
|
||||
},
|
||||
"SystemEmailSendConfig": {
|
||||
//"Port": 465,
|
||||
//"Host": "smtp.qiye.163.com",
|
||||
//"Imap": "imap.qiye.163.com",
|
||||
//"ImapPort": 993,
|
||||
//"FromEmail": "service@heanshu.com",
|
||||
//"FromName": "Uat HeAnShu Imaging System",
|
||||
//"AuthorizationCode": "j#cAPU%XgvcHWn3N",
|
||||
//"SiteUrl": "https://irc.uat.heanshu.com",
|
||||
|
||||
"Port": 465,
|
||||
"Host": "smtp.qiye.aliyun.com",
|
||||
"Imap": "imap.qiye.aliyun.com",
|
||||
"ImapPort": 993,
|
||||
"FromEmail": "service@mail.rayplus.net",
|
||||
"FromName": "Uat HeAnShu Imaging System",
|
||||
"AuthorizationCode": "crefHpx3WtenFr6X",
|
||||
"SiteUrl": "https://irc.uat.heanshu.com",
|
||||
|
||||
"PlatformName": "HeAnShu",
|
||||
"PlatformNameCN": "禾安枢影像云平台",
|
||||
"SystemShortName": "HeAnShu",
|
||||
"OrganizationName": "HeAnShu",
|
||||
"OrganizationNameCN": "HeAnShu",
|
||||
"CompanyName": "HeAnShu",
|
||||
"CompanyNameCN": "禾安枢软件科技有限公司",
|
||||
"CompanyShortName": "HeAnShu",
|
||||
"CompanyShortNameCN": "禾安枢",
|
||||
"IsEnv_US": false,
|
||||
"EmailRegexStr": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
|
||||
"CronEmailDefaultCulture": "zh-CN"
|
||||
},
|
||||
|
||||
"SystemPacsConfig": {
|
||||
"Port": "11113",
|
||||
"IP": "101.132.253.119"
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
@@ -110,7 +110,7 @@
|
||||
"Imap": "imap.qiye.aliyun.com",
|
||||
"ImapPort": 993,
|
||||
"FromEmail": "uat@extimaging.com",
|
||||
"FromName": "Uat IRC Imaging System",
|
||||
"FromName": "Uat EIC Imaging System",
|
||||
"AuthorizationCode": "SHzyyl2021",
|
||||
"SiteUrl": "http://irc.uat.extimaging.com/login",
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"DuplicationWindowMs": 500,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"RemoteNew": "Server=101.132.253.119,1435;Database=Uat_Rayplus;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||
"Hangfire": "Server=101.132.253.119,1435;Database=Uat_Rayplus_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||
},
|
||||
"WeComNoticeConfig": {
|
||||
"IsOpenWeComNotice": true,
|
||||
"WebhookUrl": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=4355b98e-1e72-4678-8dfb-2fc6ad0bf449", //4355b98e-1e72-4678-8dfb-2fc6ad0bf449 //cdd97aab-d256-4f07-9145-a0a2b1555322
|
||||
"APINoticeUserList": [ "u", "wait..." ],
|
||||
"VueNoticeUserList": [ "wangxiaoshuang", "6b7717a31647293621b97b96f74e6f3d" ]
|
||||
},
|
||||
"ObjectStoreService": {
|
||||
|
||||
"ObjectStoreUse": "AliyunOSS",
|
||||
"IsOpenStoreSync": true,
|
||||
"ApiDeployRegion": "CN",
|
||||
"SyncConfigList": [
|
||||
{
|
||||
"Domain": "irc.uat.rayplus.net",
|
||||
"Primary": "AliyunOSS",
|
||||
"Target": "AWS",
|
||||
"UploadRegion": "CN",
|
||||
"TargetRegion": "US",
|
||||
"IsOpenSync": false
|
||||
},
|
||||
{
|
||||
"Domain": "lili.uat.extimaging.com",
|
||||
"Primary": "AWS",
|
||||
"Target": "AliyunOSS",
|
||||
"UploadRegion": "US",
|
||||
"TargetRegion": "CN",
|
||||
"IsOpenSync": false
|
||||
}
|
||||
],
|
||||
|
||||
"AliyunOSS": {
|
||||
"RegionId": "cn-shanghai",
|
||||
"InternalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||
"EndPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||
"AccessKeyId": "LTAI5tFUCCmz5TwghZHsj45Y",
|
||||
"AccessKeySecret": "8evrBy1fVfzJG25i67Jm0xqn9Xcw2T",
|
||||
"RoleArn": "acs:ram::1078130221702011:role/uat-oss-access",
|
||||
"BucketName": "rayplus-irc-uat-store",
|
||||
"ViewEndpoint": "https://rayplus-irc-uat-store.oss-cn-shanghai.aliyuncs.com",
|
||||
"Region": "oss-cn-shanghai",
|
||||
"DurationSeconds": 7200
|
||||
},
|
||||
|
||||
"MinIO": {
|
||||
"endPoint": "hir-oss.uat.extimaging.com",
|
||||
"port": "80",
|
||||
"useSSL": false,
|
||||
"viewEndpoint": "http://hir-oss.uat.extimaging.com/irc-uat",
|
||||
//"port": "443",
|
||||
//"useSSL": true,
|
||||
//"viewEndpoint": "https://hir-oss.uat.extimaging.com/irc-uat",
|
||||
"accessKey": "b9Ul0e98xPzt6PwRXA1Q",
|
||||
"secretKey": "DzMaU2L4OXl90uytwOmDXF2encN0Jf4Nxu2XkYqQ",
|
||||
"bucketName": "irc-uat"
|
||||
|
||||
},
|
||||
"AWS": {
|
||||
"Region": "us-east-1",
|
||||
"EndPoint": "s3.us-east-1.amazonaws.com",
|
||||
"UseSSL": true,
|
||||
"RoleArn": "arn:aws:iam::471112624751:role/uat_s3_access",
|
||||
"AccessKeyId": "AKIAW3MEAFJX7IPXISP4",
|
||||
"SecretAccessKey": "Pgrg3le5jPxZQ7MR1yYNS30J0XRyJeKVyIIjElXc",
|
||||
"BucketName": "ei-med-s3-lili-uat-store",
|
||||
"ViewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com/",
|
||||
"DurationSeconds": 7200
|
||||
}
|
||||
},
|
||||
|
||||
"BasicSystemConfig": {
|
||||
// 启用质控风险控制功能
|
||||
"QCRiskControl": true,
|
||||
"OpenUserComplexPassword": true,
|
||||
"OpenSignDocumentBeforeWork": true,
|
||||
|
||||
"OpenLoginLimit": true,
|
||||
"LoginMaxFailCount": 5,
|
||||
|
||||
"LoginFailLockMinutes": 30,
|
||||
"AutoLoginOutMinutes": 120,
|
||||
|
||||
"OpenLoginMFA": false,
|
||||
|
||||
"ContinuousReadingTimeMin": 120,
|
||||
"ReadingRestTimeMin": 10,
|
||||
|
||||
"IsNeedChangePassWord": true,
|
||||
"ChangePassWordDays": 90,
|
||||
// 模板类型 1 Elevate 2 Extensive
|
||||
"TemplateType": 2,
|
||||
//MFA免验证发送天数
|
||||
"UserMFAVerifyMinutes": 1440
|
||||
|
||||
},
|
||||
"SystemEmailSendConfig": {
|
||||
"Port": 465,
|
||||
"Host": "smtp.qiye.aliyun.com",
|
||||
"Imap": "imap.qiye.aliyun.com",
|
||||
"ImapPort": 993,
|
||||
"FromEmail": "uat@mail.rayplus.net",
|
||||
"FromName": "Uat RayPlus Imaging System",
|
||||
"AuthorizationCode": "QWE1zxcv7632",
|
||||
"SiteUrl": "https://irc.uat.rayplus.net/login",
|
||||
|
||||
"PlatformName": "RayPlus",
|
||||
"PlatformNameCN": "睿佳影像云平台",
|
||||
"SystemShortName": "RayPlus",
|
||||
"OrganizationName": "RayPlus",
|
||||
"OrganizationNameCN": "RayPlus",
|
||||
"CompanyName": "RayPlus",
|
||||
"CompanyNameCN": "睿佳(武汉)软件科技有限公司",
|
||||
"CompanyShortName": "RayPlus",
|
||||
"CompanyShortNameCN": "睿佳",
|
||||
"IsEnv_US": false,
|
||||
"EmailRegexStr": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
|
||||
"CronEmailDefaultCulture": "zh-CN"
|
||||
},
|
||||
|
||||
"SystemPacsConfig": {
|
||||
"Port": "11113",
|
||||
"IP": "101.132.253.119"
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
@@ -77,7 +77,7 @@
|
||||
},
|
||||
"RequestDuplicationOptions": {
|
||||
"IsEnabled": true,
|
||||
"DuplicationWindowMs": 200,
|
||||
"DuplicationWindowMs": 500,
|
||||
"CacheTimeSeconds": 5,
|
||||
"ExcludedPaths": [
|
||||
]
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ModelActionFilter(IStringLocalizer _localizer, IConfiguration _conf
|
||||
|
||||
|
||||
//---提供给接口的参数无效。
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["ModelAction_InvalidAPIParameter"] + JsonConvert.SerializeObject(validationErrors)));
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["ModelAction_InvalidAPIParameter"] + JsonConvert.SerializeObject(validationErrors), ApiResponseCodeEnum.BackEndAnomaly));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ProjectExceptionFilter(ILogger<ProjectExceptionFilter> _logger, ISt
|
||||
else
|
||||
{
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["Project_ExceptionContactDeveloper"] + (exception.InnerException is null ? (exception.Message)
|
||||
: (exception.Message + "Inner ExceptionMsg:" + exception.InnerException?.Message)), ApiResponseCodeEnum.ProgramException));
|
||||
: (exception.Message + "Inner ExceptionMsg:" + exception.InnerException?.Message)), ApiResponseCodeEnum.BackEndAnomaly));
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
+58
-10
@@ -8,6 +8,8 @@ namespace IRaCIS.Core.Application.BusinessFilter.LegacyController
|
||||
{
|
||||
using Database.Api;
|
||||
using DocumentFormat.OpenXml.InkML;
|
||||
using global::MassTransit;
|
||||
using IRaCIS.Core.Application.Helper.OtherTool;
|
||||
using IRaCIS.Core.Application.Service.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
@@ -17,6 +19,7 @@ namespace IRaCIS.Core.Application.BusinessFilter.LegacyController
|
||||
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
@@ -35,7 +38,7 @@ namespace IRaCIS.Core.Application.BusinessFilter.LegacyController
|
||||
/// </summary>
|
||||
/// <param name="logger">logger</param>
|
||||
/// <param name="accessor">loggerHelper</param>
|
||||
public class RequestDuplicationFilter(ILogger<RequestDuplicationFilter> logger, IHttpContextAccessor accessor, IUserInfo _userInfo, IStringLocalizer _localizer, IOptionsMonitor<RequestDuplicationOptions> RequestDuplicationOptionsMonitor) : ExceptionFilterAttribute, IAsyncActionFilter
|
||||
public class RequestDuplicationFilter(ILogger<RequestDuplicationFilter> logger, IHttpContextAccessor accessor, IUserInfo _userInfo, IStringLocalizer _localizer, IOptionsMonitor<RequestDuplicationOptions> RequestDuplicationOptionsMonitor, IConfiguration _config) : ExceptionFilterAttribute, IAsyncActionFilter
|
||||
{
|
||||
/// <summary>
|
||||
/// 传入的参数
|
||||
@@ -70,6 +73,10 @@ namespace IRaCIS.Core.Application.BusinessFilter.LegacyController
|
||||
{
|
||||
this.RequestDuplication();
|
||||
}
|
||||
catch (BusinessValidationFailedException)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
@@ -89,8 +96,12 @@ namespace IRaCIS.Core.Application.BusinessFilter.LegacyController
|
||||
{
|
||||
var requestPath = accessor?.HttpContext?.Request?.Path.ToString() ?? string.Empty;
|
||||
|
||||
var httpMethod = accessor?.HttpContext?.Request?.Method?.ToUpper() ?? string.Empty;
|
||||
|
||||
// 验证请求频繁情况
|
||||
if (
|
||||
!httpMethod.Equals("GET", StringComparison.OrdinalIgnoreCase) &&
|
||||
|
||||
!requestPath
|
||||
.Split("/", StringSplitOptions.RemoveEmptyEntries)
|
||||
.Any(segment => segment.StartsWith("get", StringComparison.OrdinalIgnoreCase)) &&
|
||||
@@ -106,17 +117,54 @@ namespace IRaCIS.Core.Application.BusinessFilter.LegacyController
|
||||
RequestTime = DateTime.Now
|
||||
};
|
||||
|
||||
IRCSystemInfo.RequestRecordList= IRCSystemInfo.RequestRecordList.Where(x => x.RequestTime >= DateTime.Now.AddSeconds(-RequestDuplicationOptionsMonitor.CurrentValue.CacheTimeSeconds)).ToList();
|
||||
|
||||
|
||||
var requestsTimes = IRCSystemInfo.RequestRecordList.Any(x=>
|
||||
x.RequestTime>= requestInfo.RequestTime.AddMilliseconds(-RequestDuplicationOptionsMonitor.CurrentValue.DuplicationWindowMs)&&
|
||||
x.RequestKey== requestInfo.RequestKey);
|
||||
if (requestsTimes)
|
||||
var isAdded = IRCSystemInfo.TryAddRequestRecord(
|
||||
requestInfo,
|
||||
RequestDuplicationOptionsMonitor.CurrentValue.CacheTimeSeconds,
|
||||
RequestDuplicationOptionsMonitor.CurrentValue.DuplicationWindowMs);
|
||||
if (!isAdded)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["RequestDuplicationFilter_RequestDuplication"], ApiResponseCodeEnum.BusinessValidationFailed);
|
||||
SendRequestDuplicationWeComNotice(requestPath);
|
||||
logger.LogError($"重复请求出现错误:{this.Intoparam}");
|
||||
throw new BusinessValidationFailedException(_localizer["RequestDuplicationFilter_RequestDuplication"], ApiResponseCodeEnum.NotRemind);
|
||||
}
|
||||
IRCSystemInfo.RequestRecordList.Add(requestInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private void SendRequestDuplicationWeComNotice(string requestPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool isOpenWeComNotice = _config.GetValue<bool>("WeComNoticeConfig:IsOpenWeComNotice");
|
||||
|
||||
if (isOpenWeComNotice)
|
||||
{
|
||||
string webhook = _config["WeComNoticeConfig:WebhookUrl"] ?? string.Empty;
|
||||
|
||||
var uri = new Uri(_config["SystemEmailSendConfig:SiteUrl"]);
|
||||
var baseUrl = uri.GetLeftPart(UriPartial.Authority);
|
||||
|
||||
var userList = _config.GetSection("WeComNoticeConfig:VueNoticeUserList").Get<string[]>();
|
||||
|
||||
var request = accessor?.HttpContext?.Request;
|
||||
|
||||
_ = WeComNotifier.SendAlertAsync(
|
||||
webhook: webhook,
|
||||
alert: new WeComAlert
|
||||
{
|
||||
Env = baseUrl,
|
||||
UserName = _userInfo.UserName.IsNotNullOrEmpty() ? $"{_userInfo.UserName}({_userInfo.UserTypeShortName})" : "匿名",
|
||||
Api = $"{request?.Method} {requestPath}",
|
||||
Message = "重复请求拦截",
|
||||
JsonData = this.Intoparam,
|
||||
Stack = string.Empty,
|
||||
AtUsers = userList ?? []
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.LogError($"重复请求过滤器里发送企业微信出现错误:{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public class GlobalExceptionHandler(IStringLocalizer _localizer, ILogger<GlobalE
|
||||
else
|
||||
{
|
||||
httpContext.Response.WriteAsJsonAsync(ResponseOutput.NotOk(_localizer["Project_ExceptionContactDeveloper"] + (exception.InnerException is null ? (exception.Message )
|
||||
: (exception.InnerException?.Message)), ApiResponseCodeEnum.ProgramException));
|
||||
: (exception.InnerException?.Message)), ApiResponseCodeEnum.BackEndAnomaly));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,6 +146,31 @@ public class RequestDuplicationOptions
|
||||
public static class IRCSystemInfo
|
||||
{
|
||||
public static List<RequestInfo> RequestRecordList { get; set; } = new List<RequestInfo>();
|
||||
|
||||
private static readonly object requestRecordLock = new object();
|
||||
|
||||
public static bool TryAddRequestRecord(RequestInfo requestInfo, int cacheTimeSeconds, int duplicationWindowMs)
|
||||
{
|
||||
lock (requestRecordLock)
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
RequestRecordList = RequestRecordList
|
||||
.Where(x => x.RequestTime >= now.AddSeconds(-cacheTimeSeconds))
|
||||
.ToList();
|
||||
|
||||
var isDuplicate = RequestRecordList.Any(x =>
|
||||
x.RequestTime >= requestInfo.RequestTime.AddMilliseconds(-duplicationWindowMs) &&
|
||||
x.RequestKey == requestInfo.RequestKey);
|
||||
|
||||
if (isDuplicate)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RequestRecordList.Add(requestInfo);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class RequestInfo
|
||||
@@ -236,4 +261,4 @@ public static class AppSettings
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ public static class CacheKeys
|
||||
//项目缓存
|
||||
public static string Trial(string trialIdStr) => $"TrialId:{trialIdStr}";
|
||||
|
||||
public static string TrialVisitTaskMaxCode(Guid trialId) => $"TrialVisitTaskMaxCode:{trialId}";
|
||||
|
||||
//检查编号递增锁
|
||||
public static string TrialStudyMaxCode(Guid trialId) => $"TrialStudyMaxCode:{trialId}";
|
||||
|
||||
|
||||
@@ -1,16 +1,8 @@
|
||||
using DocumentFormat.OpenXml.Office.CustomUI;
|
||||
using FellowOakDicom;
|
||||
using FellowOakDicom;
|
||||
using FellowOakDicom.Media;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using NPOI.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Helper
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,4 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using NPOI.XWPF.UserModel;
|
||||
using System.Globalization;
|
||||
using System.Globalization;
|
||||
using Xceed.Document.NET;
|
||||
using Xceed.Words.NET;
|
||||
|
||||
@@ -54,42 +52,42 @@ public static class WordTempleteHelper
|
||||
}
|
||||
|
||||
|
||||
public static void Npoi_GetInternationalTempleteStream(string filePath, Stream memoryStream)
|
||||
{
|
||||
//public static void Npoi_GetInternationalTempleteStream(string filePath, Stream memoryStream)
|
||||
//{
|
||||
|
||||
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||
// var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||
|
||||
using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
XWPFDocument doc = new XWPFDocument(fs);
|
||||
// using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
|
||||
// {
|
||||
// XWPFDocument doc = new XWPFDocument(fs);
|
||||
|
||||
// 查找包含指定书签的段落及其索引
|
||||
var bookmarkParagraph = doc.Paragraphs
|
||||
.FirstOrDefault(p => p.GetCTP().GetBookmarkStartList().Any(b => b.name == StaticData.CultureInfo.en_US_bookMark));
|
||||
// // 查找包含指定书签的段落及其索引
|
||||
// var bookmarkParagraph = doc.Paragraphs
|
||||
// .FirstOrDefault(p => p.GetCTP().GetBookmarkStartList().Any(b => b.name == StaticData.CultureInfo.en_US_bookMark));
|
||||
|
||||
if (bookmarkParagraph != null)
|
||||
{
|
||||
int bookmarkIndex = doc.Paragraphs.IndexOf(bookmarkParagraph);
|
||||
// if (bookmarkParagraph != null)
|
||||
// {
|
||||
// int bookmarkIndex = doc.Paragraphs.IndexOf(bookmarkParagraph);
|
||||
|
||||
if (isEn_US)
|
||||
{
|
||||
// 从书签所在段落开始,删除之前的所有段落
|
||||
for (int i = bookmarkIndex - 1; i >= 0; i--)
|
||||
{
|
||||
doc.RemoveBodyElement(i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 删除书签之后的所有段落
|
||||
for (int i = doc.Paragraphs.Count - 1; i >= bookmarkIndex; i--)
|
||||
{
|
||||
doc.RemoveBodyElement(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
doc.Write(memoryStream);
|
||||
}
|
||||
}
|
||||
// if (isEn_US)
|
||||
// {
|
||||
// // 从书签所在段落开始,删除之前的所有段落
|
||||
// for (int i = bookmarkIndex - 1; i >= 0; i--)
|
||||
// {
|
||||
// doc.RemoveBodyElement(i);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // 删除书签之后的所有段落
|
||||
// for (int i = doc.Paragraphs.Count - 1; i >= bookmarkIndex; i--)
|
||||
// {
|
||||
// doc.RemoveBodyElement(i);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// doc.Write(memoryStream);
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@@ -1080,12 +1080,15 @@ public static class DicomSortHelper
|
||||
IEnumerable<T> source,
|
||||
Func<T, string?> ippSelector,
|
||||
Func<T, string?> iopSelector,
|
||||
Func<T, int?> instanceNumberSelector)
|
||||
Func<T, int?> instanceNumberSelector,string seriesDescription)
|
||||
{
|
||||
var list = source.ToList();
|
||||
if (list.Count < 2)
|
||||
return list;
|
||||
|
||||
if(seriesDescription.Contains("Dixon", StringComparison.OrdinalIgnoreCase))
|
||||
return list.OrderBy(instanceNumberSelector).ToList();
|
||||
|
||||
var first = list[0];
|
||||
|
||||
var reference = ParseVector(ippSelector(first));
|
||||
|
||||
@@ -3,8 +3,11 @@ using FellowOakDicom.Imaging;
|
||||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.Formats.Jpeg;
|
||||
using SixLabors.ImageSharp.Processing;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using SixLabors.ImageSharp.Drawing.Processing;
|
||||
|
||||
|
||||
namespace IRaCIS.Core.Application.Helper;
|
||||
|
||||
public static class ImageHelper
|
||||
{
|
||||
@@ -28,7 +31,7 @@ public static class ImageHelper
|
||||
image.Save(fileStorePath, new JpegEncoder());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +63,36 @@ public static class ImageHelper
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static class ImageMaskHelper
|
||||
{
|
||||
public static async Task MaskAsync(Stream input, Stream output, IEnumerable<MaskRegion> regions)
|
||||
{
|
||||
// 确保输入流从起始位置读取
|
||||
if (input.CanSeek && input.Position != 0)
|
||||
{
|
||||
input.Position = 0;
|
||||
}
|
||||
|
||||
using var image = await Image.LoadAsync(input);
|
||||
|
||||
// 保存原始图片的编码格式
|
||||
var originalFormat = image.Metadata.DecodedImageFormat;
|
||||
|
||||
image.Mutate(ctx =>
|
||||
{
|
||||
foreach (var r in regions)
|
||||
{
|
||||
ctx.Fill(Color.Black, new Rectangle(r.X, r.Y, r.Width, r.Height));
|
||||
}
|
||||
});
|
||||
|
||||
// 使用原始格式保存,保持格式不变
|
||||
await image.SaveAsync(output, originalFormat);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Security;
|
||||
using System.Net;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using RestSharp;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
|
||||
namespace IRaCIS.Core.Application.Helper.OtherTool
|
||||
{
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>default</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
@@ -12,6 +10,7 @@
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<DocumentationFile>.\IRaCIS.Core.Application.xml</DocumentationFile>
|
||||
<NoWarn>1701;1702;1591</NoWarn>
|
||||
<NoWarn>$(NoWarn);NU1903</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
@@ -32,13 +31,14 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ClosedXML" Version="0.105.0" />
|
||||
<PackageReference Include="IdentityModel.OidcClient" Version="6.0.0" />
|
||||
<PackageReference Include="AlibabaCloud.SDK.Sts20150401" Version="1.2.0" />
|
||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.14.1" />
|
||||
<PackageReference Include="AWSSDK.S3" Version="4.0.21" />
|
||||
<PackageReference Include="AWSSDK.SecurityToken" Version="4.0.5.19" />
|
||||
<PackageReference Include="AWSSDK.S3" Version="4.0.24" />
|
||||
<PackageReference Include="AWSSDK.SecurityToken" Version="4.0.7" />
|
||||
<PackageReference Include="DocX" Version="5.0.0" />
|
||||
<PackageReference Include="FreeSpire.Doc" Version="12.2.0" />
|
||||
<PackageReference Include="FreeSpire.Doc" Version="14.4.0" />
|
||||
<PackageReference Include="ExcelDataReader" Version="3.8.0" />
|
||||
<PackageReference Include="ExcelDataReader.DataSet" Version="3.8.0" />
|
||||
<PackageReference Include="DistributedLock.Redis" Version="1.1.1" />
|
||||
@@ -47,23 +47,23 @@
|
||||
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.2.6" />
|
||||
<PackageReference Include="fo-dicom.Codecs" Version="5.16.7" />
|
||||
<PackageReference Include="IP2Region.Net" Version="3.0.2" />
|
||||
<PackageReference Include="MailKit" Version="4.15.1" />
|
||||
<PackageReference Include="MailKit" Version="4.17.0" />
|
||||
<PackageReference Include="Masa.Contrib.Service.MinimalAPIs" Version="1.1.0" />
|
||||
<PackageReference Include="MaxMind.GeoIP2" Version="5.4.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.10" />
|
||||
<PackageReference Include="MimeKit" Version="4.15.1" />
|
||||
<PackageReference Include="MiniExcel" Version="1.41.2" />
|
||||
<PackageReference Include="Minio" Version="6.0.3" />
|
||||
<PackageReference Include="MaxMind.GeoIP2" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.8" />
|
||||
<PackageReference Include="MimeKit" Version="4.17.0" />
|
||||
<PackageReference Include="MiniExcel" Version="1.44.1" />
|
||||
<PackageReference Include="Minio" Version="7.0.0" />
|
||||
<PackageReference Include="MiniWord" Version="0.9.2" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
|
||||
<PackageReference Include="My.Extensions.Localization.Json" Version="3.3.0">
|
||||
<PackageReference Include="My.Extensions.Localization.Json" Version="4.0.0">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NPOI" Version="2.7.4" />
|
||||
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.2" />
|
||||
<PackageReference Include="RestSharp" Version="114.0.0" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.2" />
|
||||
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.7" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="10.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<param name="next"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ExcelExportHelper.DataExportAsync(System.String,IRaCIS.Application.Contracts.ExcelExportInfo,System.String,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},Microsoft.AspNetCore.Hosting.IWebHostEnvironment,IRaCIS.Application.Interfaces.IDictionaryService,System.Type,System.Nullable{IRaCIS.Core.Domain.Share.CriterionType})">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ExcelExportHelper.DataExportAsync(System.String,IRaCIS.Application.Contracts.ExcelExportInfo,System.String,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},Microsoft.AspNetCore.Hosting.IWebHostEnvironment,IRaCIS.Application.Interfaces.IDictionaryService,System.Type,System.Nullable{IRaCIS.Core.Domain.Share.CriterionType},System.Collections.Generic.List{System.Int32})">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
@@ -59,17 +59,17 @@
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.ExcelExportHelper.DynamicColumnConfig.AutoColumnStartIndex">
|
||||
<summary>
|
||||
增加动态列开始索引 从0 开始算
|
||||
增加动态列开始索引 npoi从0开始 现在ClosedXML 从1开始
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.ExcelExportHelper.DynamicColumnConfig.AutoColumnTitleRowIndex">
|
||||
<summary>
|
||||
动态列开始的行index 从0开始
|
||||
动态列开始的行index npoi从0开始 现在ClosedXML 从1开始
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.ExcelExportHelper.DynamicColumnConfig.TempalteLastColumnIndex">
|
||||
<summary>
|
||||
模板列最后的索引
|
||||
模板列最后的索引 npoi从0开始 现在ClosedXML 从1开始
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.ExcelExportHelper.DynamicColumnConfig.ColumnIdNameList">
|
||||
@@ -102,20 +102,6 @@
|
||||
Excel Title Name
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ExcelExportHelper.CDISC_DataExport_Async(System.String,IRaCIS.Application.Contracts.ExcelExportInfo,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},Microsoft.AspNetCore.Hosting.IWebHostEnvironment,IRaCIS.Application.Interfaces.IDictionaryService,System.Type,System.Nullable{IRaCIS.Core.Domain.Share.CriterionType},IRaCIS.Core.Application.Service.ExcelExportHelper.DynamicColumnConfig)">
|
||||
<summary>
|
||||
暂时废弃--合并到上面
|
||||
</summary>
|
||||
<param name="code"></param>
|
||||
<param name="data"></param>
|
||||
<param name="_commonDocumentRepository"></param>
|
||||
<param name="_hostEnvironment"></param>
|
||||
<param name="_dictionaryService"></param>
|
||||
<param name="translateType"></param>
|
||||
<param name="criterionType"></param>
|
||||
<param name="dynamicColumnConfig"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ExcelExportHelper.ExportTemplateAsync(IRaCIS.Application.Contracts.ExportTemplateServiceDto)">
|
||||
<summary>
|
||||
导出文件模板
|
||||
@@ -351,6 +337,12 @@
|
||||
<param name="taskId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.VisitTaskHelpeService.GenerateTaskNo">
|
||||
<summary>
|
||||
从 NewId 的后 3 个字节(24 位)生成一个 6 位十六进制字符串
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.VisitTaskHelpeService.GetIsClinicalDataSignTest(System.Guid)">
|
||||
<summary>
|
||||
获取GetIsClinicalDataSignTest
|
||||
@@ -363,7 +355,7 @@
|
||||
访视读片任务
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Allocation.VisitTaskService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskAllocationRule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTaskReReading},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingClinicalData},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Segment},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Segmentation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SegmentBinding},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectCanceDoctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMarkBinding},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskInfluence},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer},Microsoft.Extensions.Logging.ILogger{IRaCIS.Core.Application.Service.Allocation.VisitTaskService},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.Allocation.VisitTaskService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskAllocationRule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTaskReReading},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingClinicalData},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitFilter},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Segment},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Segmentation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SegmentBinding},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectCanceDoctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMarkBinding},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskInfluence},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer},Microsoft.Extensions.Logging.ILogger{IRaCIS.Core.Application.Service.Allocation.VisitTaskService},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectCriteriaEvaluationVisitStudyFilter},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
访视读片任务
|
||||
</summary>
|
||||
@@ -587,6 +579,12 @@
|
||||
<param name="emailConfig"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.DeployConfigService.GetWebConfigInfo">
|
||||
<summary>
|
||||
获取前端配置
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.ResearchProgramNo">
|
||||
<summary>
|
||||
方案编号 STUDYID
|
||||
@@ -857,6 +855,20 @@
|
||||
裁决日期 CODTC
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetSiteSurveyEquipmentList_Export(IRaCIS.Core.Application.Contracts.SiteSurveyEquipmentQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},IRaCIS.Application.Interfaces.IDictionaryService)">
|
||||
<summary>
|
||||
获取中心设备信息
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetSiteSurveyInfoList_Export(IRaCIS.Core.Application.Contracts.SiteSurveyInfoQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},IRaCIS.Application.Interfaces.IDictionaryService)">
|
||||
<summary>
|
||||
调研表基本信息
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetTrialQCQuestionAnserList_Export(IRaCIS.Core.Application.Contracts.GetQCQuestionAnswerQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialQCQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialQCQuestion},IRaCIS.Application.Interfaces.IDictionaryService)">
|
||||
<summary>
|
||||
质控问题答案导出
|
||||
@@ -1453,6 +1465,14 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.ChangeTrialObjectNameList(System.Collections.Generic.Dictionary{System.String,System.Collections.Generic.List{IRaCIS.Application.Contracts.BasicDicSelect}},System.Nullable{System.Guid})">
|
||||
<summary>
|
||||
替换字典中的项目名称为试验对象名称 --New
|
||||
</summary>
|
||||
<param name="data"></param>
|
||||
<param name="trialId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.DictionaryService.GetBoolValueState(System.Boolean)">
|
||||
<summary>
|
||||
获取是和否
|
||||
@@ -1584,6 +1604,13 @@
|
||||
<param name="_attachmentrepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.FileUploadRecordService.AddOrUpdateCommonUploadRecord(IRaCIS.Core.Application.ViewModel.CommonUploadRecordAddOrEdit)">
|
||||
<summary>
|
||||
上传通用文件记录
|
||||
</summary>
|
||||
<param name="addOrEditCommonUploadRecord"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.FileUploadRecordService.GetSubjectUploadRecordList(IRaCIS.Core.Application.ViewModel.SubjectFileUploadRecordQuery)">
|
||||
<summary>
|
||||
按照 subject visit studyCode 三个维度进行分组的查询列表 (subject相关)
|
||||
@@ -1760,7 +1787,7 @@
|
||||
<param name="_trialRepository"></param>
|
||||
<param name="_oSSService"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialImageDownloadService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Application.Helper.IOSSService,Microsoft.AspNetCore.Hosting.IWebHostEnvironment,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance})">
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialImageDownloadService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Application.Helper.IOSSService,Microsoft.AspNetCore.Hosting.IWebHostEnvironment,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask})">
|
||||
<summary>
|
||||
项目影像后台下载,不打包
|
||||
</summary>
|
||||
@@ -2933,11 +2960,11 @@
|
||||
<param name="modality"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.DownloadImageSuccess(System.Guid)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.DownloadImageSuccess(IRaCIS.Core.Application.Contracts.DownloadImageSuccessCommand)">
|
||||
<summary>
|
||||
影像下载成功回调
|
||||
</summary>
|
||||
<param name="trialImageDownloadId"></param>
|
||||
<param name="incommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.GetTrialDownloadList(IRaCIS.Core.Application.Contracts.TrialIamgeDownQuery)">
|
||||
@@ -3081,7 +3108,7 @@
|
||||
SystemAnonymizationService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.SystemAnonymizationService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemAnonymization},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.SystemAnonymizationService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemAnonymization},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer,ZiggyCreatures.Caching.Fusion.IFusionCache)">
|
||||
<summary>
|
||||
SystemAnonymizationService
|
||||
</summary>
|
||||
@@ -3277,6 +3304,20 @@
|
||||
批次Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Inspection.InspectionService.getInspectionById(IRaCIS.Core.Application.Service.Inspection.DTO.InspectionDto)">
|
||||
<summary>
|
||||
根据Id获取稽查记录
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Inspection.InspectionService.SetJsonDetail(IRaCIS.Core.Application.Service.Inspection.DTO.InspectionDto)">
|
||||
<summary>
|
||||
设置稽查记录JsonDetail
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Inspection.InspectionService.SetTrialShowInspection(IRaCIS.Core.Application.Service.Inspection.DTO.SetTrialShowInspection)">
|
||||
<summary>
|
||||
设置项目稽查配置
|
||||
@@ -3713,29 +3754,6 @@
|
||||
<param name="code"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.MinimalApiService.FileToPDFService">
|
||||
<summary>
|
||||
上传文件转PDF 或者给url 这边下载然后转PDF
|
||||
|
||||
</summary>
|
||||
<param name="_hostEnvironment"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.MinimalApiService.FileToPDFService.#ctor(Microsoft.AspNetCore.Hosting.IWebHostEnvironment)">
|
||||
<summary>
|
||||
上传文件转PDF 或者给url 这边下载然后转PDF
|
||||
|
||||
</summary>
|
||||
<param name="_hostEnvironment"></param>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "T:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.#ctor(IRaCIS.Core.Domain.Share.IUserInfo,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Infra.EFCore.TestLength})" -->
|
||||
<member name="M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.TestEfcoreJson">
|
||||
<summary>
|
||||
测试efcore json 列支持情况
|
||||
https://devblogs.microsoft.com/dotnet/array-mapping-in-ef-core-8/
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.HIRActivateService.GetAuthorizationCodeInfo(System.String,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Application.Contracts.SystemHospitalOption})">
|
||||
<summary>
|
||||
获取授权码明文信息
|
||||
@@ -3898,6 +3916,15 @@
|
||||
The ID token, which can be used to verify the identity of the user.
|
||||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "T:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.#ctor(IRaCIS.Core.Domain.Share.IUserInfo,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Infra.EFCore.TestLength})" -->
|
||||
<member name="M:IRaCIS.Core.Application.Service.MinimalApiService.TestMinimalApiService.TestEfcoreJson">
|
||||
<summary>
|
||||
测试efcore json 列支持情况
|
||||
https://devblogs.microsoft.com/dotnet/array-mapping-in-ef-core-8/
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.QCCommon.VerifyIsCRCSubmmitAsync(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Domain.Share.IUserInfo,System.Nullable{System.Guid})">
|
||||
<summary>
|
||||
验证CRC 是否已提交 已提交 就不允许进行任何操作,如果是IQC 那么还验证是否是当前任务领取人
|
||||
@@ -4555,6 +4582,13 @@
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IVUSCalculateService.GetIVUSTemplatesZip(IRaCIS.Core.Application.Service.Reading.Dto.GetExportTemplateInDto)">
|
||||
<summary>
|
||||
获取当前分组、受试者、标准下所有有效任务的IVUS模板压缩包
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IVUSCalculateService.UploadIVUSTemplate">
|
||||
<summary>
|
||||
导入IVUS数据
|
||||
@@ -6214,6 +6248,13 @@
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.OCTCalculateService.GetOCTFCTTemplatesZip(IRaCIS.Core.Application.Service.Reading.Dto.GetExportTemplateInDto)">
|
||||
<summary>
|
||||
获取当前分组、受试者、标准下所有有效任务的OCT-FCT模板压缩包
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.OCTCalculateService.UploadOCTFCTTemplate">
|
||||
<summary>
|
||||
导入OCT-FCT数据
|
||||
@@ -9020,6 +9061,41 @@
|
||||
外弹力膜面积- 管腔面积
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.IVUSMeasuredValue.PlaqueRupture">
|
||||
<summary>
|
||||
斑块破裂
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TemplateData.TargetSegment">
|
||||
<summary>
|
||||
靶段
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TemplateData.TargetSegmentRemarks">
|
||||
<summary>
|
||||
靶段备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TemplateData.ROIAllLength">
|
||||
<summary>
|
||||
ROI段落总长度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TemplateData.PullbackFrameCount">
|
||||
<summary>
|
||||
回撤中的图像帧数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TemplateData.PlaqueType">
|
||||
<summary>
|
||||
斑块类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TemplateData.AdjustReason">
|
||||
<summary>
|
||||
访视点备注(如有)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTFCTUploadData.FrameNumber">
|
||||
<summary>
|
||||
帧数
|
||||
@@ -9070,6 +9146,16 @@
|
||||
脂质角度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTFCTUploadData.PlaqueRupture">
|
||||
<summary>
|
||||
斑块破裂
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTFCTUploadData.PlaqueHealing">
|
||||
<summary>
|
||||
斑块愈合
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTInfo.PlaqueNum">
|
||||
<summary>
|
||||
斑块编号
|
||||
@@ -9750,6 +9836,16 @@
|
||||
融合的病灶
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetMarkListInDto.VisitTaskId">
|
||||
<summary>
|
||||
任务Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.NoneDicomMarkInfo.MarkId">
|
||||
<summary>
|
||||
标记的唯一标识符
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCustomTagInDto.VisitTaskId">
|
||||
<summary>
|
||||
任务Id
|
||||
@@ -10200,6 +10296,11 @@
|
||||
问题分类
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetFilterTableQuestionInDto.QuestionClassify">
|
||||
<summary>
|
||||
问题分类
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SetOncologyQuestion.EvaluationResult">
|
||||
<summary>
|
||||
评估结果
|
||||
@@ -10435,6 +10536,21 @@
|
||||
默认SegmentName
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingTaskDto.JudgeModeEnum">
|
||||
<summary>
|
||||
仲裁模式
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingTaskDto.JudgeRuleEnum">
|
||||
<summary>
|
||||
裁判规则
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingTaskDto.ArbitrationRule">
|
||||
<summary>
|
||||
仲裁对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialConfirmCriterionListOutDto">
|
||||
<summary>
|
||||
返回对象
|
||||
@@ -10505,6 +10621,16 @@
|
||||
裁判结果的备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetJudgeFormOutDto.TriggerJudgeQuestionIds">
|
||||
<summary>
|
||||
本次生成裁判的触发问题(包含自动计算题追溯到的源问题)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JudgeFormQuestionDto.IsTriggerJudge">
|
||||
<summary>
|
||||
是否为本次生成裁判的触发问题
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GlobalVisitJudgeQuestion.ShowOrder">
|
||||
<summary>
|
||||
排序
|
||||
@@ -11880,6 +12006,41 @@
|
||||
阅片期名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.CopyTrialQuestionVisitJudgeRuleInDto.SourceVisitNum">
|
||||
<summary>
|
||||
来源访视
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.CopyTrialQuestionVisitJudgeRuleInDto.TargetVisitNum">
|
||||
<summary>
|
||||
目标访视
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TrialQuestionVisitJudgeRuleItemDto.Type">
|
||||
<summary>
|
||||
类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TrialQuestionVisitJudgeRuleItemDto.QuestionGenre">
|
||||
<summary>
|
||||
问题类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TrialQuestionVisitJudgeRuleItemDto.DictionaryCode">
|
||||
<summary>
|
||||
字典code
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TrialQuestionVisitJudgeRuleItemDto.Unit">
|
||||
<summary>
|
||||
单位
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TrialQuestionVisitJudgeRuleItemDto.AnswerCombination">
|
||||
<summary>
|
||||
答案组合
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateTumorAssessmentInDto.CriterionId">
|
||||
<summary>
|
||||
标准ID
|
||||
@@ -12241,6 +12402,21 @@
|
||||
仲裁规则
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialJudgyInfoOutDto.JudgeModeEnum">
|
||||
<summary>
|
||||
仲裁模式
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialJudgyInfoOutDto.JudgeRuleEnum">
|
||||
<summary>
|
||||
裁判规则
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialJudgyInfoOutDto.JudgeGenerateEnum">
|
||||
<summary>
|
||||
裁判任务生成
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.Service.Reading.Dto.NeedSynchronize.Need">
|
||||
<summary>
|
||||
需要
|
||||
@@ -12381,6 +12557,11 @@
|
||||
影像工具
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.AddDeleteTypeEnum">
|
||||
<summary>
|
||||
新增修改类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.ImageToolAttribute">
|
||||
<summary>
|
||||
影像工具属性
|
||||
@@ -13326,6 +13507,11 @@
|
||||
影像工具
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.AddDeleteTypeEnum">
|
||||
<summary>
|
||||
新增修改类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.ImageToolAttribute">
|
||||
<summary>
|
||||
影像工具属性
|
||||
@@ -14261,6 +14447,11 @@
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.SetTrialJudgeRuleInfo(IRaCIS.Core.Application.Service.Reading.Dto.SetTrialJudgeRuleInfoInDto)">
|
||||
<summary>
|
||||
编辑裁判规则配置
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.AddOrUpdateReadingQuestionCriterionTrial(IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionCriterionTrialInDto)">
|
||||
<summary>
|
||||
新增修改项目问题标准(项目)
|
||||
@@ -14362,11 +14553,34 @@
|
||||
阅片问题.标准
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ClinicalDataTrialSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ClinicalDataSystemSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CriterionNidusSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode},IRaCIS.Core.Application.Contracts.IReadingImageTaskService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingCriterionPage},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.OrganInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.PreviousPDF},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ClinicalDataTrialSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ClinicalDataSystemSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CriterionNidusSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemCriterionDictionaryCode},IRaCIS.Core.Application.Contracts.IReadingImageTaskService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingSystemCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingCriterionPage},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TumorAssessment_RECIST1Point1},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.OrganInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.PreviousPDF},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionVisitJudgeRule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitStage},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
阅片问题.标准
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetTrialQuestionVisitJudgeRule(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialQuestionVisitJudgeRuleInDto)">
|
||||
<summary>
|
||||
获取项目阅片标准各访视的裁判规则配置。
|
||||
未配置规则的访视问题也会返回,供前端直接进行配置。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.SetTrialQuestionVisitJudgeRule(IRaCIS.Core.Application.Service.Reading.Dto.SetTrialQuestionVisitJudgeRuleInDto)">
|
||||
<summary>
|
||||
编辑项目阅片标准各访视的裁判规则配置。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.CopyTrialQuestionVisitJudgeRule(IRaCIS.Core.Application.Service.Reading.Dto.CopyTrialQuestionVisitJudgeRuleInDto)">
|
||||
<summary>
|
||||
复制其他访视的项目阅片标准裁判规则配置。
|
||||
目标访视不适用的问题保留其已有的不适用规则,不参与复制。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.ApplyBaseLineTrialQuestionVisitJudgeRule(IRaCIS.Core.Application.Service.Reading.Dto.ApplyBaseLineTrialQuestionVisitJudgeRuleInDto)">
|
||||
<summary>
|
||||
将基线访视(VisitNum = 0)的裁判规则配置应用到其他所有访视。
|
||||
仅复制在基线和目标访视均适用的问题;目标访视不适用的问题保留其已有规则。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.SetTrialQuestionExportResult(IRaCIS.Core.Application.Service.Reading.Dto.SetTrialQuestionExportResultInDto)">
|
||||
<summary>
|
||||
设置项目问题导出
|
||||
@@ -14483,6 +14697,12 @@
|
||||
<param name="indto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.AddNAJudgeRule(IRaCIS.Core.Domain.Models.ReadingQuestionTrial)">
|
||||
<summary>
|
||||
添加问题的不适用规则
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetReadingQuestionTrialList(IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialViewInDto)">
|
||||
<summary>
|
||||
获取项目问题(项目)
|
||||
@@ -14736,11 +14956,18 @@
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMarkBinding},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserLog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Segmentation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SegmentBinding},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,IRaCIS.Core.Application.Service.IVisitTaskService,IRaCIS.Core.Application.Contracts.IReadingClinicalDataService,IRaCIS.Core.Application.Service.IReadingCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserFeedBack},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingCriterionPage},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskRelation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingJudgeInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.OrganInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.OrganTrialInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocument},IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoCalculateService,IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoWithoutPETCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CriterionKeyFileRead},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialCriterionKeyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Application.Service.IGeneralCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskStudy},IRaCIS.Core.Application.Service.ImageAndDoc.IDownloadAndUploadService,IRaCIS.Core.Application.Interfaces.ITrialEmailNoticeConfigService,AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer,ZiggyCreatures.Caching.Fusion.IFusionCache)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitStage},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingNoneDicomMarkBinding},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserLog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Segmentation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SegmentBinding},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,IRaCIS.Core.Application.Service.IVisitTaskService,IRaCIS.Core.Application.Contracts.IReadingClinicalDataService,IRaCIS.Core.Application.Service.IReadingCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserFeedBack},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingGlobalTaskInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingCriterionPage},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskRelation},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingJudgeInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.OrganInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeUserType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.OrganTrialInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocument},IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoCalculateService,IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoWithoutPETCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionMark},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTrialCriterionDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionVisitJudgeRule},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionSystem},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CriterionKeyFileRead},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialCriterionKeyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Application.Service.IGeneralCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskStudy},Microsoft.Extensions.Configuration.IConfiguration,IRaCIS.Core.Application.Service.ImageAndDoc.IDownloadAndUploadService,IRaCIS.Core.Application.Interfaces.ITrialEmailNoticeConfigService,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer,ZiggyCreatures.Caching.Fusion.IFusionCache)">
|
||||
<summary>
|
||||
IR影像阅片
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.Test(IRaCIS.Core.Application.Service.Reading.Dto.GetReportsChartSummaryInDto)">
|
||||
<summary>
|
||||
测试异常
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetReportsChartData(IRaCIS.Core.Application.Service.Reading.Dto.GetReportsChartDataInDto)">
|
||||
<summary>
|
||||
获取报告图表数据
|
||||
@@ -14828,6 +15055,20 @@
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetMarkList(IRaCIS.Core.Application.Service.Reading.Dto.GetMarkListInDto)">
|
||||
<summary>
|
||||
获取标记信息
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetNoneDicomMarkList(IRaCIS.Core.Application.Service.Reading.Dto.GetMarkListInDto)">
|
||||
<summary>
|
||||
获取非DICOM标记信息
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetManualList(IRaCIS.Core.Application.Service.Reading.Dto.GetManualListInDto)">
|
||||
<summary>
|
||||
获取手册
|
||||
@@ -14959,6 +15200,13 @@
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetFilterTableQuestion(IRaCIS.Core.Application.Service.Reading.Dto.GetFilterTableQuestionInDto)">
|
||||
<summary>
|
||||
获取单个表格问题及答案 过滤问题
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetCustomTableQuestionAnswer(IRaCIS.Core.Application.Service.Reading.Dto.GetCustomTableQuestionAnswerInDto)">
|
||||
<summary>
|
||||
获取自定义问题以及答案
|
||||
@@ -15131,6 +15379,13 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.PhasedGenerationJudge(System.Guid)">
|
||||
<summary>
|
||||
统一生成裁判任务
|
||||
</summary>
|
||||
<param name=""></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetTrialCriterionJudgeQuestionList(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialCriterionJudgeQuestionListInDto)">
|
||||
<summary>
|
||||
获取项目标准的裁判问题
|
||||
@@ -15145,6 +15400,35 @@
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetSingleVisitJudgeAnswer(IRaCIS.Core.Application.Service.Reading.Dto.GetSingleVisitJudgeAnswerInDto)">
|
||||
<summary>
|
||||
获取单访视裁判答案
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetJudgeForm(IRaCIS.Core.Application.Service.Reading.Dto.GetJudgeFormInDto)">
|
||||
<summary>
|
||||
获取裁判表单
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetTriggerJudgeQuestionIds(System.Collections.Generic.List{System.Guid},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingQuestionTrial},System.Decimal,IRaCIS.Core.Domain.Models.JudgeRule)">
|
||||
<summary>
|
||||
重新按当前访视的裁判规则计算实际触发裁判的问题。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.SetJudgeForm(IRaCIS.Core.Application.Service.Reading.Dto.SetJudgeFormInDto)">
|
||||
<summary>
|
||||
编辑裁判表单
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.SubmitJudgeForm(IRaCIS.Core.Application.Service.Reading.Dto.SetJudgeFormInDto)">
|
||||
<summary>
|
||||
提交裁判表单
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetJudgeReadingInfo(IRaCIS.Core.Application.Service.Reading.Dto.GetJudgeReadingInfo)">
|
||||
<summary>
|
||||
获取裁判阅片任务信息
|
||||
@@ -15178,7 +15462,31 @@
|
||||
<param name="visitTaskId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ComputeJudgeResult(System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.GroupTaskAnswerDto})">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ApplyVisitJudgeRules(System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TaskAnswerDto},IRaCIS.Core.Domain.Models.JudgeRule)">
|
||||
<summary>
|
||||
应用访视裁判规则 以及剔除排除的问题
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ApplyVisitJudgeRules(System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.GlobalQuestionInfo},System.Decimal,IRaCIS.Core.Domain.Models.JudgeRule)">
|
||||
<summary>
|
||||
应用访视裁判规则 以及剔除排除的问题
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.SendWeComNotifier(System.Guid,System.String)">
|
||||
<summary>
|
||||
发送微信通知
|
||||
</summary>
|
||||
<param name="visiTaskId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.SendAbnormalEmail(System.Guid,IRaCIS.Core.Domain.Share.EmailBusinessScenario)">
|
||||
<summary>
|
||||
发送邮件通知
|
||||
</summary>
|
||||
<param name="visiTaskId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ComputeJudgeResult(System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.GroupTaskAnswerDto},System.Guid,System.Collections.Generic.HashSet{System.Guid},System.Boolean)">
|
||||
<summary>
|
||||
计算返回的结果 为True表示不相等
|
||||
</summary>
|
||||
@@ -16063,6 +16371,12 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.DoctorWorkloadService.GetDoctorUserTrialReadingStat(IRaCIS.Application.Contracts.TrialReadingStatQuery)">
|
||||
<summary>
|
||||
获取项目阅片统计
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.DoctorWorkloadService.GetTrialEnrollmentWorkloadStats(IRaCIS.Application.Contracts.WorkLoadDoctorQueryDTO)">
|
||||
<summary>
|
||||
获取某个项目入组的医生工作量统计列表
|
||||
@@ -16156,6 +16470,66 @@
|
||||
访视数据模型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.TestService.GenerateIamgeInfo.PatientId">
|
||||
<summary>
|
||||
患者ID (0010,0020)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.TestService.GenerateIamgeInfo.PatientName">
|
||||
<summary>
|
||||
患者姓名 (0010,0010)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.TestService.GenerateIamgeInfo.StudyInstanceUID">
|
||||
<summary>
|
||||
研究实例UID (0020,000D)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.TestService.GenerateIamgeInfo.SeriesInstanceUID">
|
||||
<summary>
|
||||
序列实例UID (0020,000E)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.TestService.GenerateIamgeInfo.SOPInstanceUID">
|
||||
<summary>
|
||||
SOP实例UID (0008,0018)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.TestService.GenerateIamgeInfo.SeriesNumber">
|
||||
<summary>
|
||||
序列号 (0020,0011)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.TestService.GenerateIamgeInfo.InstanceNumber">
|
||||
<summary>
|
||||
实例号 (0020,0013)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.TestService.GenerateIamgeInfo.SeriesDescription">
|
||||
<summary>
|
||||
序列描述 (0008,103E)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.TestService.GenerateIamgeInfo.PixelSpacing">
|
||||
<summary>
|
||||
像素间距 (0028,0030)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TestService.GenerateNoisePixel(FellowOakDicom.DicomDataset,System.String,System.Int32)">
|
||||
<summary>
|
||||
生成随机噪声图
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TestService.FillNoiseRectangle(System.UInt16[],System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
噪声矩形
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TestService.GenerateAsync(System.String,System.String,System.String,System.Int32,System.Collections.Generic.List{IRaCIS.Core.Application.Service.TestService.GenerateIamgeInfo})">
|
||||
<summary>
|
||||
批量生成Series
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TestService.MaskImage">
|
||||
<summary>
|
||||
遮挡影像
|
||||
@@ -16248,7 +16622,7 @@
|
||||
<param name="logger">logger</param>
|
||||
<param name="accessor">loggerHelper</param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.BusinessFilter.LegacyController.Database.Api.RequestDuplicationFilter.#ctor(Microsoft.Extensions.Logging.ILogger{IRaCIS.Core.Application.BusinessFilter.LegacyController.Database.Api.RequestDuplicationFilter},Microsoft.AspNetCore.Http.IHttpContextAccessor,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.RequestDuplicationOptions})">
|
||||
<member name="M:IRaCIS.Core.Application.BusinessFilter.LegacyController.Database.Api.RequestDuplicationFilter.#ctor(Microsoft.Extensions.Logging.ILogger{IRaCIS.Core.Application.BusinessFilter.LegacyController.Database.Api.RequestDuplicationFilter},Microsoft.AspNetCore.Http.IHttpContextAccessor,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.RequestDuplicationOptions},Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
请求拦截 请求前后的操作
|
||||
</summary>
|
||||
@@ -16503,7 +16877,7 @@
|
||||
<param name="regions"></param>
|
||||
<param name="options"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Helper.DicomSortHelper.SortSlices``1(System.Collections.Generic.IEnumerable{``0},System.Func{``0,System.String},System.Func{``0,System.String},System.Func{``0,System.Nullable{System.Int32}})">
|
||||
<member name="M:IRaCIS.Core.Application.Helper.DicomSortHelper.SortSlices``1(System.Collections.Generic.IEnumerable{``0},System.Func{``0,System.String},System.Func{``0,System.String},System.Func{``0,System.Nullable{System.Int32}},System.String)">
|
||||
<summary>
|
||||
DICOM Slice 排序(IPP + IOP)
|
||||
自动 fallback InstanceNumber
|
||||
@@ -18777,11 +19151,24 @@
|
||||
NoneDicomStudyService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.NoneDicomStudyService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},Medallion.Threading.IDistributedLockProvider,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Application.Service.QCCommon,AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.NoneDicomStudyService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},Medallion.Threading.IDistributedLockProvider,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Application.Helper.IOSSService,IRaCIS.Core.Application.Service.QCCommon,AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
NoneDicomStudyService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.NoneDicomStudyService.NoneDicomStudyMaskImage(IRaCIS.Core.Application.Contracts.NoneDicomStudyMaskImageCommand)">
|
||||
<summary>
|
||||
标注遮盖影像 路径后面加了.MaskNoneDicom_ 就是遮盖的新路径
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.NoneDicomStudyService.NoneDicomStudyUndoMaskImage(IRaCIS.Core.Application.Contracts.NoneDicomStudyUndoMaskImageCommand)">
|
||||
<summary>
|
||||
撤销遮盖的影像,可以单张,也可以整个检查
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.NoneDicomStudyService.GetNoneDicomStudyFileList(System.Guid)">
|
||||
<summary>
|
||||
非Dicom检查 文件列表
|
||||
@@ -19239,7 +19626,7 @@
|
||||
TrialSiteSurveyService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.IdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSite},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VerificationCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserRole},Medallion.Threading.IDistributedLockProvider,IRaCIS.Core.Application.Auth.ITokenService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserType},IRaCIS.Core.Application.Service.IMailVerificationService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserLog},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SiteSurveyLog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteEquipmentSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.IdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSite},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VerificationCode},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserRole},Medallion.Threading.IDistributedLockProvider,IRaCIS.Core.Application.Auth.ITokenService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserType},IRaCIS.Core.Application.Service.IMailVerificationService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserLog},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
TrialSiteSurveyService
|
||||
</summary>
|
||||
@@ -19360,6 +19747,34 @@
|
||||
<param name="siteSurvyeSubmit"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.GetSiteSurveyLogList(IRaCIS.Core.Application.Contracts.SiteSurveyLogQuery)">
|
||||
<summary>
|
||||
获取中心调研日志
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.GetSiteSurveyEquipmentList(IRaCIS.Core.Application.Contracts.SiteSurveyEquipmentQuery)">
|
||||
<summary>
|
||||
获取中心设备信息
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.GetSiteSurveyInfoList(IRaCIS.Core.Application.Contracts.SiteSurveyInfoQuery)">
|
||||
<summary>
|
||||
调研表基本信息
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialSiteSurveyService.GetTrialIsSPMJoin(System.Guid)">
|
||||
<summary>
|
||||
SPM 是否参与流程
|
||||
</summary>
|
||||
<param name="trialId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.TrialSiteUserSurveyService">
|
||||
<summary>
|
||||
TrialSiteUserSurveyService
|
||||
@@ -20245,11 +20660,12 @@
|
||||
<param name="editTrialSiteCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.GetTrialSiteSelect(System.Guid)">
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.GetTrialSiteSelect(System.Guid,System.Nullable{System.Boolean})">
|
||||
<summary>
|
||||
获取项目下的 site 下拉框数据 CRC只看到他负责的
|
||||
</summary>
|
||||
<param name="trialId"></param>
|
||||
<param name="ignoreDisable"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.DeleteTrialSite(System.Guid)">
|
||||
@@ -20857,6 +21273,12 @@
|
||||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.ReplaceSubject">
|
||||
<summary>
|
||||
替换受试者
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.TrialReadingInfoSignVerify(IRaCIS.Core.Application.Contracts.TrialReadingInfoSignInDto)">
|
||||
<summary>
|
||||
阅片信息签名验证接口
|
||||
@@ -20865,6 +21287,33 @@
|
||||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.SetTrialLinkExpirationTime(IRaCIS.Core.Application.Contracts.TrialLinkExpirationTimeDto)">
|
||||
<summary>
|
||||
设置项目链接过期时间
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.GetTrialLinkExpirationTime(IRaCIS.Core.Application.Contracts.SetTrialLinkExpirationTimeDto)">
|
||||
<summary>
|
||||
获取项目链接过期时间
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.GetLinkLinkExpirationTime(IRaCIS.Core.Application.Contracts.VerifyLinkExpirationTimeDto)">
|
||||
<summary>
|
||||
获取时间是否过期 过期返回true 没有过期返回false
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.GetLinkVerificationCodeIsEffective(IRaCIS.Core.Application.Contracts.GetLinkVerificationCodeIsEffectiveDto)">
|
||||
<summary>
|
||||
获取是否Code是否有效 有效返回true 无效返回false
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.GetTrialConfirmCriterionList(IRaCIS.Core.Application.Contracts.GetTrialConfirmCriterionListInDto)">
|
||||
<summary>
|
||||
获取项目已经确认的标准
|
||||
@@ -21831,11 +22280,6 @@
|
||||
读片数量分类统计
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Application.Contracts.TrialExtraConfig.IsOpenLostVistRead">
|
||||
<summary>
|
||||
打开失访可读
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Application.Contracts.TrialConfigInfo.IsImageQualityControl">
|
||||
<summary>
|
||||
影像质控风险控制
|
||||
@@ -22090,5 +22534,49 @@
|
||||
<member name="M:IRaCIS.Application.Interfaces.ITrialEnrollmentService.ConfirmReviewer(System.Guid,System.Guid[],System.Int32)">
|
||||
<summary>入组流程-向CRO提交医生[Submit]</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.CreateDocumentationId(System.Type)">
|
||||
<summary>
|
||||
Generates a documentation comment ID for a type.
|
||||
Example: T:Namespace.Outer+Inner`1 becomes T:Namespace.Outer.Inner`1
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.CreateDocumentationId(System.Reflection.PropertyInfo)">
|
||||
<summary>
|
||||
Generates a documentation comment ID for a property.
|
||||
Example: P:Namespace.ContainingType.PropertyName or for an indexer P:Namespace.ContainingType.Item(System.Int32)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.CreateDocumentationId(System.Type,System.String)">
|
||||
<summary>
|
||||
Generates a documentation comment ID for a property given its container type and property name.
|
||||
Example: P:Namespace.ContainingType.PropertyName
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.CreateDocumentationId(System.Reflection.MethodInfo)">
|
||||
<summary>
|
||||
Generates a documentation comment ID for a method (or constructor).
|
||||
For example:
|
||||
M:Namespace.ContainingType.MethodName(ParamType1,ParamType2)~ReturnType
|
||||
M:Namespace.ContainingType.#ctor(ParamType)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.GetTypeDocId(System.Type,System.Boolean,System.Boolean)">
|
||||
<summary>
|
||||
Generates a documentation ID string for a type.
|
||||
This method handles nested types (replacing '+' with '.'),
|
||||
generic types, arrays, pointers, by-ref types, and generic parameters.
|
||||
The <paramref name="includeGenericArguments"/> flag controls whether
|
||||
constructed generic type arguments are emitted, while <paramref name="omitGenericArity"/>
|
||||
controls whether the generic arity marker (e.g. "`1") is appended.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.AspNetCore.OpenApi.Generated.DocumentationCommentIdHelper.NormalizeDocId(System.String)">
|
||||
<summary>
|
||||
Normalizes a documentation comment ID to match the compiler-style format.
|
||||
Strips the return type suffix for ordinary methods but retains it for conversion operators.
|
||||
</summary>
|
||||
<param name="docId">The documentation comment ID to normalize.</param>
|
||||
<returns>The normalized documentation comment ID.</returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace IRaCIS.Core.Application.MassTransit.Command
|
||||
|
||||
//[Required(ErrorMessage = "受试者筛选号不能为空")]
|
||||
//[ImporterHeader(Name = "Subject ID", AutoTrim = true)]
|
||||
[ExcelColumnName("Subject ID")]
|
||||
[ExcelColumnName("Participant ID")]
|
||||
public string SubjectCode { get; set; } = string.Empty;
|
||||
|
||||
//[Required(ErrorMessage = "访视名称不能为空")]
|
||||
|
||||
@@ -1,27 +1,9 @@
|
||||
using DocumentFormat.OpenXml.Office2013.Excel;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using DocumentFormat.OpenXml.Vml;
|
||||
using DocumentFormat.OpenXml.Wordprocessing;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.MassTransit.Command;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Domain;
|
||||
using IRaCIS.Core.Domain.BaseModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Components.Routing;
|
||||
using Microsoft.Extensions.Options;
|
||||
using MimeKit;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using NPOI.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.MassTransit.Consumer;
|
||||
|
||||
@@ -287,9 +269,45 @@ public class SiteSurverRejectedEventConsumer(
|
||||
|
||||
if (context.Message.IsHaveSPMOrCPM)
|
||||
{
|
||||
//PM 驳回到SPM
|
||||
if (siteSurveyInfo.State == TrialSiteSurveyEnum.CRCSubmitted)
|
||||
////PM 驳回到SPM
|
||||
//if (siteSurveyInfo.State == TrialSiteSurveyEnum.CRCSubmitted)
|
||||
//{
|
||||
|
||||
// var sPMOrCPMList = _trialUserRoleRepository.Where(t => t.TrialId == trialId && t.TrialUser.IsDeleted == false)
|
||||
// .Where(t => t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM)
|
||||
// .Select(t => new { t.UserRole.IdentityUser.EMail, t.UserRole.FullName, t.UserRole.UserTypeEnum, t.UserRole.IdentityUser.UserWorkLanguage }).ToList();
|
||||
|
||||
// var lan_SPMOrCPMList = sPMOrCPMList.Where(t => t.UserWorkLanguage == workLanguage);
|
||||
|
||||
// foreach (var user in lan_SPMOrCPMList)
|
||||
// {
|
||||
// messageToSend.To.Add(new MailboxAddress(user.FullName, user.EMail));
|
||||
// }
|
||||
|
||||
// toUserName = string.Join('、', lan_SPMOrCPMList.Select(t => t.FullName));
|
||||
|
||||
//}
|
||||
////SPM 驳回到CRC
|
||||
//else if (siteSurveyInfo.State == TrialSiteSurveyEnum.ToSubmit)
|
||||
//{
|
||||
// //使用中心国家语言 一致才发送
|
||||
// if ((siteInfo.Country == StaticData.SiteCountry.US && isEn_US) || (siteInfo.Country == StaticData.SiteCountry.CN && isEn_US == false))
|
||||
// {
|
||||
// messageToSend.To.Add(new MailboxAddress(toUserName, siteSurveyInfo.Email));
|
||||
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
// PM 驳回到CRC
|
||||
if (siteSurveyInfo.State == TrialSiteSurveyEnum.ToSubmit)
|
||||
{
|
||||
//使用中心国家语言 一致才发送
|
||||
if ((siteInfo.Country == StaticData.SiteCountry.US && isEn_US) || (siteInfo.Country == StaticData.SiteCountry.CN && isEn_US == false))
|
||||
{
|
||||
messageToSend.To.Add(new MailboxAddress(toUserName, siteSurveyInfo.Email));
|
||||
|
||||
}
|
||||
|
||||
var sPMOrCPMList = _trialUserRoleRepository.Where(t => t.TrialId == trialId && t.TrialUser.IsDeleted == false)
|
||||
.Where(t => t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM)
|
||||
@@ -299,24 +317,10 @@ public class SiteSurverRejectedEventConsumer(
|
||||
|
||||
foreach (var user in lan_SPMOrCPMList)
|
||||
{
|
||||
messageToSend.To.Add(new MailboxAddress(user.FullName, user.EMail));
|
||||
}
|
||||
|
||||
toUserName = string.Join('、', lan_SPMOrCPMList.Select(t => t.FullName));
|
||||
|
||||
}
|
||||
//SPM 驳回到CRC
|
||||
else if (siteSurveyInfo.State == TrialSiteSurveyEnum.ToSubmit)
|
||||
{
|
||||
//使用中心国家语言 一致才发送
|
||||
if ((siteInfo.Country == StaticData.SiteCountry.US && isEn_US) || (siteInfo.Country == StaticData.SiteCountry.CN && isEn_US == false))
|
||||
{
|
||||
messageToSend.To.Add(new MailboxAddress(toUserName, siteSurveyInfo.Email));
|
||||
|
||||
messageToSend.Cc.Add(new MailboxAddress(user.FullName, user.EMail));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -330,6 +334,11 @@ public class SiteSurverRejectedEventConsumer(
|
||||
}
|
||||
}
|
||||
|
||||
Uri uri = new Uri(_systemEmailConfig.SiteUrl);
|
||||
|
||||
// 获取 Scheme + Host(不包含路径)
|
||||
string baseUrl = uri.GetLeftPart(UriPartial.Authority);
|
||||
|
||||
//发件地址
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
|
||||
@@ -348,8 +357,9 @@ public class SiteSurverRejectedEventConsumer(
|
||||
siteInfo.TrialSiteCode, //中心编号
|
||||
siteInfo.TrialSiteAliasName,//中心名称
|
||||
siteSurveyInfo.LatestBackReason, //驳回原因
|
||||
_systemEmailConfig.SiteUrl, //链接
|
||||
(siteSurveyInfo.State == TrialSiteSurveyEnum.ToSubmit ? "inline - block" : "none")
|
||||
$"{baseUrl}/researchLogin?trialId={trialId}", //链接
|
||||
(siteSurveyInfo.State == TrialSiteSurveyEnum.ToSubmit ? "inline - block" : "none"),
|
||||
trialInfo.LinkVerificationCode.IsNullOrEmpty()? trialInfo.ResearchProgramNo: trialInfo.LinkVerificationCode
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Domain.BaseModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Domain.BaseModel;
|
||||
using MassTransit;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System.Globalization;
|
||||
|
||||
public class CultureInfoFilter<T> (IRepository<EventStoreRecord> _eventStoreRecordRepository) : IFilter<ConsumeContext<T>> where T : DomainEvent
|
||||
{
|
||||
|
||||
@@ -51,11 +51,13 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
|
||||
var systemDocQuery =
|
||||
from sysDoc in _systemDocumentRepository.AsQueryable(false)
|
||||
from identityUser in _identityUserRepository.AsQueryable(false).Where(t => t.UserRoleList.Where(t => t.IsUserRoleDisabled == false).Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId)))
|
||||
from identityUser in _identityUserRepository.AsQueryable(false).Where(t => t.Status == UserStateEnum.Enable).Where(t => t.UserRoleList.Where(t => t.IsUserRoleDisabled == false).Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId)))
|
||||
join confirmc in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = identityUser.Id, SystemDocumentId = sysDoc.Id } equals new { confirmc.ConfirmUserId, confirmc.SystemDocumentId } into cc
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
select new TriaAndSystemlSignDocView()
|
||||
{
|
||||
DocLanguageType=sysDoc.DocLanguageType,
|
||||
UserWorkLanguage=identityUser.UserWorkLanguage,
|
||||
IsSystemDoc = true,
|
||||
Id = sysDoc.Id,
|
||||
CreateTime = sysDoc.CreateTime,
|
||||
@@ -79,7 +81,9 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
};
|
||||
var datalist = await systemDocQuery.IgnoreQueryFilters().Where(t => t.IsDeleted == false && t.ConfirmTime == null)
|
||||
.ToListAsync();
|
||||
datalist = datalist.Where(x => x.SuggestFinishTime != null && x.SuggestFinishTime.Value.Date == DateTime.Now.Date)
|
||||
datalist = datalist
|
||||
.Where(x=>x.DocLanguageType == DocLanguageType.CN_US || (int)x.DocLanguageType == (int)x.UserWorkLanguage)
|
||||
.Where(x => x.SuggestFinishTime != null && x.SuggestFinishTime.Value.Date == DateTime.Now.Date)
|
||||
.Where(x => x.IsNeedSendEmial).ToList();
|
||||
var confirmUserIdList = datalist.Select(t => t.ConfirmUserId).Distinct().ToList();
|
||||
var userinfoList = await _identityUserRepository.Where(x => confirmUserIdList.Contains(x.Id)).ToListAsync();
|
||||
@@ -96,45 +100,42 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
var userWorkLanguageList = userinfoList.Select(x => x.UserWorkLanguage).Distinct().ToList();
|
||||
foreach (var workLanguage in userWorkLanguageList)
|
||||
{
|
||||
try
|
||||
var langUserInfoList = userinfoList.Where(x => x.UserWorkLanguage == workLanguage).ToList();
|
||||
if (!langUserInfoList.Any())
|
||||
{
|
||||
var langUserInfoList = userinfoList.Where(x => x.UserWorkLanguage == workLanguage).ToList();
|
||||
if (!langUserInfoList.Any())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var userIsEn_US = workLanguage == UserWorkLanguage.US;
|
||||
|
||||
var messageToSend = new MimeMessage();
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
|
||||
foreach (var userinfo in langUserInfoList)
|
||||
{
|
||||
messageToSend.To.Add(new MailboxAddress(userinfo.FullName, userinfo.EMail));
|
||||
}
|
||||
|
||||
var companyName = userIsEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
var userNames = langUserInfoList.Select(x => x.UserName).ToList();
|
||||
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
var topicStr = string.Format(input.topicStr, companyName);
|
||||
|
||||
var htmlBodyStr = string.Format(
|
||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr, workLanguage),
|
||||
string.Join(',', userNames),
|
||||
_systemEmailConfig.SiteUrl
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(emailConfig, messageToSend, emailConfigFunc, workLanguage);
|
||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||
continue;
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
var userIsEn_US = workLanguage == UserWorkLanguage.US;
|
||||
var companyName = userIsEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
|
||||
foreach (var userinfo in langUserInfoList)
|
||||
{
|
||||
try
|
||||
{
|
||||
var messageToSend = new MimeMessage();
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
messageToSend.To.Add(new MailboxAddress(userinfo.FullName, userinfo.EMail));
|
||||
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
var topicStr = string.Format(input.topicStr, companyName);
|
||||
|
||||
var htmlBodyStr = string.Format(
|
||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr, workLanguage),
|
||||
userinfo.FullName,
|
||||
_systemEmailConfig.SiteUrl
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(emailConfig, messageToSend, emailConfigFunc, workLanguage);
|
||||
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +172,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
Console.WriteLine($"只发送给新增的角色,角色数量: {context.Message.NewUserTypeIds.Count}");
|
||||
}
|
||||
// 构建查询
|
||||
IQueryable<UnionDocumentWithConfirmInfoView> systemDocQuery;
|
||||
IQueryable<TriaAndSystemlSignDocView> systemDocQuery;
|
||||
|
||||
if (context.Message.NewUserTypeIds != null && context.Message.NewUserTypeIds.Any())
|
||||
{
|
||||
@@ -183,8 +184,10 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
t.UserRoleList.Where(t => t.IsUserRoleDisabled == false)
|
||||
.Any(t => context.Message.NewUserTypeIds.Contains(t.UserTypeId) &&
|
||||
sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId)))
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
select new TriaAndSystemlSignDocView()
|
||||
{
|
||||
DocLanguageType = sysDoc.DocLanguageType,
|
||||
UserWorkLanguage = identityUser.UserWorkLanguage,
|
||||
IsSystemDoc = true,
|
||||
Id = sysDoc.Id,
|
||||
CreateTime = sysDoc.CreateTime,
|
||||
@@ -210,8 +213,10 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
.Where(t => t.Status == UserStateEnum.Enable &&
|
||||
t.UserRoleList.Where(t => t.IsUserRoleDisabled == false)
|
||||
.Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId)))
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
select new TriaAndSystemlSignDocView()
|
||||
{
|
||||
DocLanguageType = sysDoc.DocLanguageType,
|
||||
UserWorkLanguage = identityUser.UserWorkLanguage,
|
||||
IsSystemDoc = true,
|
||||
Id = sysDoc.Id,
|
||||
CreateTime = sysDoc.CreateTime,
|
||||
@@ -229,7 +234,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
};
|
||||
}
|
||||
var datalist = await systemDocQuery.IgnoreQueryFilters().Where(x => x.IsNeedSendEmial).ToListAsync();
|
||||
|
||||
datalist = datalist.Where(x => x.DocLanguageType == DocLanguageType.CN_US || (int)x.DocLanguageType == (int)x.UserWorkLanguage).ToList();
|
||||
var confirmUserIdList = datalist.Select(t => t.ConfirmUserId).Distinct().ToList();
|
||||
var userinfoList = await _identityUserRepository.Where(x => confirmUserIdList.Contains(x.Id)).ToListAsync();
|
||||
|
||||
@@ -240,29 +245,18 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
return;
|
||||
}
|
||||
|
||||
var userWorkLanguageList = userinfoList.Select(x => x.UserWorkLanguage).Distinct().ToList();
|
||||
foreach (var workLanguage in userWorkLanguageList)
|
||||
foreach (var userinfo in userinfoList)
|
||||
{
|
||||
var langUserInfoList = userinfoList.Where(x => x.UserWorkLanguage == workLanguage).ToList();
|
||||
if (!langUserInfoList.Any())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string msg = $"{langUserInfoList.Count}生效通知,";
|
||||
string msg = $"{userinfo.UserName}生效通知,";
|
||||
try
|
||||
{
|
||||
var messageToSend = new MimeMessage();
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
messageToSend.To.Add(new MailboxAddress(userinfo.FullName, userinfo.EMail));
|
||||
|
||||
foreach (var userinfo in langUserInfoList)
|
||||
{
|
||||
messageToSend.To.Add(new MailboxAddress(userinfo.FullName, userinfo.EMail));
|
||||
}
|
||||
|
||||
var workLanguage = userinfo.UserWorkLanguage;
|
||||
var userIsEn_US = workLanguage == UserWorkLanguage.US;
|
||||
var companyName = userIsEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
var userNames = langUserInfoList.Select(x => x.UserName).ToList();
|
||||
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
@@ -270,7 +264,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
|
||||
var htmlBodyStr = string.Format(
|
||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr, workLanguage),
|
||||
string.Join(',', userNames),
|
||||
userinfo.FullName,
|
||||
_systemEmailConfig.SiteUrl
|
||||
);
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using DocumentFormat.OpenXml;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.MassTransit.Consumer;
|
||||
@@ -10,16 +9,8 @@ using MassTransit;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using MimeKit;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using System.Reactive.Joins;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
{
|
||||
@@ -61,7 +52,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
|
||||
var trialDocQuery =
|
||||
from trialDoc in _trialDocumentRepository.AsQueryable(true)
|
||||
|
||||
join trial in _trialRepository.Where(x => x.IsDeleted == false) on trialDoc.TrialId equals trial.Id
|
||||
join trialIdentityUser in _trialIdentityUserRepository.Where(x => x.IsDeleted == false) on trialDoc.TrialId equals trialIdentityUser.TrialId
|
||||
join trialUserRole in _trialUserRoleRepository.Where(x => x.IsDeleted == false) on trialIdentityUser.Id equals trialUserRole.TrialUserId
|
||||
join identityUser in _identityUserRepository.AsQueryable(false).Where(u => u.Status == UserStateEnum.Enable)
|
||||
@@ -73,15 +64,18 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
where trialIdentityUser.TrialUserRoleList.Any(ur => !ur.IsDeleted && trialDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == ur.UserRole.UserTypeId))
|
||||
select new TrialSignDocView()
|
||||
select new TriaAndSystemlSignDocView()
|
||||
{
|
||||
|
||||
TrialCode = trialDoc.Trial.TrialCode,
|
||||
ResearchProgramNo = trialDoc.Trial.ResearchProgramNo,
|
||||
ExperimentName = trialDoc.Trial.ExperimentName,
|
||||
CurrentStaffTrainDays = trialDoc.CurrentStaffTrainDays,
|
||||
NewStaffTrainDays = trialDoc.NewStaffTrainDays,
|
||||
Id = trialDoc.Id,
|
||||
TrialId= trialDoc.TrialId,
|
||||
TrialType= trial.TrialType,
|
||||
IsTestUser= identityUser.IsTestUser,
|
||||
TrialId = trialDoc.TrialId,
|
||||
IsSystemDoc = false,
|
||||
CreateTime = trialDoc.CreateTime,
|
||||
FullFilePath = trialDoc.Path,
|
||||
@@ -103,7 +97,11 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
};
|
||||
var datalist = await trialDocQuery.IgnoreQueryFilters().Where(t => t.IsDeleted == false && t.ConfirmTime == null&&t.ConfirmTime==null)
|
||||
.ToListAsync();
|
||||
datalist = datalist.Where(x => x.SuggestFinishTime != null && x.SuggestFinishTime.Value.Date == DateTime.Now.Date)
|
||||
|
||||
|
||||
datalist = datalist
|
||||
.Where(x=>((x.TrialType== TrialType.OfficialTrial|| x.TrialType== TrialType.Training) && !x.IsTestUser) || (x.TrialType==TrialType.NoneOfficial &&x.IsTestUser))
|
||||
.Where(x => x.SuggestFinishTime != null && x.SuggestFinishTime.Value.Date == DateTime.Now.Date)
|
||||
.ToList();
|
||||
var confirmUserIdList = datalist.Select(t => t.ConfirmUserId).Distinct().ToList();
|
||||
var userinfoList = await _identityUserRepository.Where(x => confirmUserIdList.Contains(x.Id)).ToListAsync();
|
||||
@@ -125,54 +123,53 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
var groupedList = userWithTrialList.GroupBy(x => new { x.TrialId, x.User.UserWorkLanguage }).ToList();
|
||||
foreach (var groupItem in groupedList)
|
||||
{
|
||||
try
|
||||
var langUserInfoList = groupItem.Select(x => x.User).Distinct().ToList();
|
||||
if (!langUserInfoList.Any())
|
||||
{
|
||||
var langUserInfoList = groupItem.Select(x => x.User).Distinct().ToList();
|
||||
if (!langUserInfoList.Any())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Console.WriteLine($"发送定时过期提醒,数量:{langUserInfoList.Count}");
|
||||
|
||||
var trialInfo = await _trialRepository.Where(x => x.Id == groupItem.Key.TrialId).FirstOrDefaultAsync();
|
||||
if (trialInfo == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var workLanguage = groupItem.Key.UserWorkLanguage;
|
||||
var userIsEn_US = workLanguage == UserWorkLanguage.US;
|
||||
var messageToSend = new MimeMessage();
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
|
||||
foreach (var userinfo in langUserInfoList)
|
||||
{
|
||||
messageToSend.To.Add(new MailboxAddress(userinfo.FullName, userinfo.EMail));
|
||||
}
|
||||
|
||||
var companyName = userIsEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
var userNames = langUserInfoList.Select(x => x.UserName).ToList();
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
var topicStr = string.Format(input.topicStr, companyName);
|
||||
|
||||
var htmlBodyStr = string.Format(
|
||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr, workLanguage),
|
||||
string.Join(',', userNames),
|
||||
_systemEmailConfig.SiteUrl
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(emailConfig, messageToSend, emailConfigFunc, workLanguage);
|
||||
await SendEmailHelper.SendTrialEmailAsync(messageToSend, trialInfo);
|
||||
|
||||
continue;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
Console.WriteLine($"发送定时过期提醒,数量:{langUserInfoList.Count}");
|
||||
|
||||
var trialInfo = await _trialRepository.Where(x => x.Id == groupItem.Key.TrialId).FirstOrDefaultAsync();
|
||||
if (trialInfo == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var workLanguage = groupItem.Key.UserWorkLanguage;
|
||||
var userIsEn_US = workLanguage == UserWorkLanguage.US;
|
||||
var companyName = userIsEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
|
||||
foreach (var userinfo in langUserInfoList)
|
||||
{
|
||||
try
|
||||
{
|
||||
var messageToSend = new MimeMessage();
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
messageToSend.To.Add(new MailboxAddress(userinfo.FullName, userinfo.EMail));
|
||||
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
var topicStr = string.Format(input.topicStr, companyName);
|
||||
|
||||
var htmlBodyStr = string.Format(
|
||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr, workLanguage),
|
||||
userinfo.FullName,
|
||||
_systemEmailConfig.SiteUrl
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(emailConfig, messageToSend, emailConfigFunc, workLanguage);
|
||||
await SendEmailHelper.SendTrialEmailAsync(messageToSend, trialInfo);
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -213,20 +210,21 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
Console.WriteLine($"只发送给新增项目的角色,角色数量: {context.Message.NewUserTypeIds.Count}");
|
||||
}
|
||||
// 构建查询
|
||||
IQueryable<UnionDocumentWithConfirmInfoView> systemDocQuery;
|
||||
IQueryable<TriaAndSystemlSignDocView> trialDocQuery;
|
||||
|
||||
if (context.Message.NewUserTypeIds != null && context.Message.NewUserTypeIds.Any())
|
||||
{
|
||||
// 只查询新增角色的用户
|
||||
systemDocQuery =
|
||||
trialDocQuery =
|
||||
from trialDoc in _trialDocumentRepository.AsQueryable(false).Where(x => context.Message.Ids.Contains(x.Id))
|
||||
join trial in _trialRepository.Where(x => x.IsDeleted == false) on trialDoc.TrialId equals trial.Id
|
||||
join trialIdentityUser in _trialIdentityUserRepository.Where(x=>x.IsDeleted==false) on trialDoc.TrialId equals trialIdentityUser.TrialId
|
||||
join trialUserRole in _trialUserRoleRepository.Where(x => x.IsDeleted == false) on trialIdentityUser.Id equals trialUserRole.TrialUserId
|
||||
join identityUser in _identityUserRepository.AsQueryable(false).Where(u => u.Status == UserStateEnum.Enable)
|
||||
on trialIdentityUser.IdentityUserId equals identityUser.Id
|
||||
where trialIdentityUser.TrialUserRoleList.Any(ur => !ur.IsDeleted && context.Message.NewUserTypeIds.Contains(ur.UserRole.UserTypeId) && trialDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == ur.UserRole.UserTypeId))
|
||||
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
select new TriaAndSystemlSignDocView()
|
||||
{
|
||||
IsSystemDoc = true,
|
||||
Id = trialDoc.Id,
|
||||
@@ -234,6 +232,8 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
CreateTime = trialDoc.CreateTime,
|
||||
IsDeleted = trialDoc.IsDeleted,
|
||||
SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes,
|
||||
TrialType = trial.TrialType,
|
||||
IsTestUser = identityUser.IsTestUser,
|
||||
Name = trialDoc.Name,
|
||||
Path = trialDoc.Path,
|
||||
FileTypeId = trialDoc.FileTypeId,
|
||||
@@ -248,8 +248,9 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
else
|
||||
{
|
||||
// 查询所有相关角色的用户
|
||||
systemDocQuery =
|
||||
trialDocQuery =
|
||||
from trialDoc in _trialDocumentRepository.AsQueryable(false).Where(x => context.Message.Ids.Contains(x.Id))
|
||||
|
||||
join trialIdentityUser in _trialIdentityUserRepository.Where(x => x.IsDeleted == false) on trialDoc.TrialId equals trialIdentityUser.TrialId
|
||||
join trialUserRole in _trialUserRoleRepository.Where(x=>x.IsDeleted==false) on trialIdentityUser.Id equals trialUserRole.TrialUserId
|
||||
|
||||
@@ -259,7 +260,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
where trialIdentityUser.TrialUserRoleList.Any(ur => !ur.IsDeleted &&trialDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == ur.UserRole.UserTypeId))
|
||||
|
||||
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
select new TriaAndSystemlSignDocView()
|
||||
{
|
||||
IsSystemDoc = false,
|
||||
Id = trialDoc.Id,
|
||||
@@ -268,6 +269,8 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
CreateTime = trialDoc.CreateTime,
|
||||
IsDeleted = trialDoc.IsDeleted,
|
||||
SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes,
|
||||
TrialType = trial.TrialType,
|
||||
IsTestUser = identityUser.IsTestUser,
|
||||
Name = trialDoc.Name,
|
||||
Path = trialDoc.Path,
|
||||
FileTypeId = trialDoc.FileTypeId,
|
||||
@@ -280,7 +283,9 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
};
|
||||
}
|
||||
|
||||
var datalist = await systemDocQuery.IgnoreQueryFilters().ToListAsync();
|
||||
var datalist = await trialDocQuery.IgnoreQueryFilters().ToListAsync();
|
||||
datalist = datalist.Where(x => ((x.TrialType == TrialType.OfficialTrial || x.TrialType == TrialType.Training) && !x.IsTestUser) || (x.TrialType == TrialType.NoneOfficial && x.IsTestUser)).ToList();
|
||||
|
||||
|
||||
var confirmUserIdList = datalist.Select(t => t.ConfirmUserId).Distinct().ToList();
|
||||
var userinfoList = await _identityUserRepository.Where(x => confirmUserIdList.Contains(x.Id)).ToListAsync();
|
||||
@@ -297,37 +302,26 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
join u in userinfoList on ut.ConfirmUserId equals u.Id
|
||||
select new { ut.TrialId, User = u }).ToList();
|
||||
|
||||
var groupedList = userWithTrialList.GroupBy(x => new { x.TrialId, x.User.UserWorkLanguage }).ToList();
|
||||
foreach (var groupItem in groupedList)
|
||||
foreach (var userWithTrial in userWithTrialList)
|
||||
{
|
||||
var langUserInfoList = groupItem.Select(x => x.User).Distinct().ToList();
|
||||
if (!langUserInfoList.Any())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string msg = $"{langUserInfoList.Count}项目生效通知,";
|
||||
var userinfo = userWithTrial.User;
|
||||
string msg = $"{userinfo.UserName}项目生效通知,";
|
||||
try
|
||||
{
|
||||
var messageToSend = new MimeMessage();
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
messageToSend.To.Add(new MailboxAddress(userinfo.FullName, userinfo.EMail));
|
||||
|
||||
foreach (var userinfo in langUserInfoList)
|
||||
{
|
||||
messageToSend.To.Add(new MailboxAddress(userinfo.FullName, userinfo.EMail));
|
||||
}
|
||||
|
||||
var workLanguage = groupItem.Key.UserWorkLanguage;
|
||||
var workLanguage = userinfo.UserWorkLanguage;
|
||||
var userIsEn_US = workLanguage == UserWorkLanguage.US;
|
||||
var companyName = userIsEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||
var userNames = langUserInfoList.Select(x => x.UserName).ToList();
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
var topicStr = string.Format(input.topicStr, companyName);
|
||||
|
||||
var htmlBodyStr = string.Format(
|
||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr, workLanguage),
|
||||
string.Join(',', userNames),
|
||||
userinfo.FullName,
|
||||
_systemEmailConfig.SiteUrl
|
||||
);
|
||||
|
||||
@@ -335,7 +329,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
||||
};
|
||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(emailConfig, messageToSend, emailConfigFunc, workLanguage);
|
||||
|
||||
var trialInfo = await _trialRepository.Where(x => x.Id == groupItem.Key.TrialId).FirstOrDefaultAsync();
|
||||
var trialInfo = await _trialRepository.Where(x => x.Id == userWithTrial.TrialId).FirstOrDefaultAsync();
|
||||
if (trialInfo == null)
|
||||
{
|
||||
continue;
|
||||
|
||||
@@ -439,6 +439,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public string TaskName { get; set; } = String.Empty;
|
||||
|
||||
public string TaskBlindName { get; set; } = String.Empty;
|
||||
|
||||
public Guid? DoctorUserId { get; set; }
|
||||
|
||||
public ReadingCategory? ReadingCategory { get; set; }
|
||||
|
||||
@@ -124,6 +124,45 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
|
||||
|
||||
#region 获取随机编号
|
||||
/// <summary>
|
||||
/// 从 NewId 的后 3 个字节(24 位)生成一个 6 位十六进制字符串
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GenerateTaskNo()
|
||||
{
|
||||
var bytes = NewId.Next().ToByteArray();
|
||||
|
||||
uint value =
|
||||
BitConverter.ToUInt32(bytes, 0)
|
||||
^ BitConverter.ToUInt32(bytes, 4)
|
||||
^ BitConverter.ToUInt32(bytes, 8)
|
||||
^ BitConverter.ToUInt32(bytes, 12);
|
||||
|
||||
return (value & 0xFFFFFF).ToString("X6");
|
||||
}
|
||||
|
||||
private async Task<string> GetRandomTaskName(Guid trialId, List<string> existList)
|
||||
{
|
||||
var taskName = GenerateTaskNo();
|
||||
|
||||
while (existList.Any(t => t == taskName))
|
||||
{
|
||||
taskName = GenerateTaskNo();
|
||||
}
|
||||
|
||||
while (await _visitTaskRepository.AnyAsync(t => t.TaskBlindName == taskName && t.TrialId == trialId))
|
||||
{
|
||||
taskName = GenerateTaskNo();
|
||||
}
|
||||
|
||||
existList.Add(taskName);
|
||||
|
||||
return taskName;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
//基于标准签名 产生任务 (或者手动选择某些访视生成该标准的任务)
|
||||
public async Task BaseCritrionGenerateVisitTask(Guid trialId, Guid confirmedTrialReadingCriterionId, bool? isManualSelectVisit = null, List<Guid>? subjectVisitIdList = null)
|
||||
@@ -151,11 +190,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var dbMaxCode = _visitTaskRepository.Where(t => t.TrialId == trialId).Select(t => t.Code).DefaultIfEmpty().Max();
|
||||
|
||||
var cacheMaxCodeInt = _fusionCache.GetOrDefault<int>(CacheKeys.TrialStudyMaxCode(trialId));
|
||||
var cacheMaxCodeInt = _fusionCache.GetOrDefault<int>(CacheKeys.TrialVisitTaskMaxCode(trialId));
|
||||
|
||||
int currentMaxCodeInt = cacheMaxCodeInt > dbMaxCode ? cacheMaxCodeInt : dbMaxCode;
|
||||
|
||||
|
||||
var randomTaskBlindNameList = new List<string>();
|
||||
|
||||
foreach (var subjectGroup in needGenerateVisit.GroupBy(t => t.SubjectId).Select(g => new { SubjectId = g.Key, SubjectVisitList = g.ToList() }))
|
||||
{
|
||||
@@ -173,6 +212,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var blindTaskName = string.Empty;
|
||||
|
||||
var isRandom = false;
|
||||
|
||||
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||
{
|
||||
if (visitNumList.IndexOf(subjectVisit.VisitNum) == 0 && subjectVisit.VisitNum == 0)
|
||||
@@ -185,6 +226,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
}
|
||||
}
|
||||
else if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.Random)
|
||||
{
|
||||
blindTaskName = await GetRandomTaskName(trialId, randomTaskBlindNameList);
|
||||
|
||||
isRandom = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
blindTaskName = "Timepoint";
|
||||
@@ -258,12 +305,14 @@ namespace IRaCIS.Core.Application.Service
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
|
||||
|
||||
var blindTaskName2 = isRandom ? await GetRandomTaskName(trialId, randomTaskBlindNameList) : blindTaskName;
|
||||
|
||||
task2 = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
{
|
||||
TrialId = trialId,
|
||||
SubjectId = subjectVisit.SubjectId,
|
||||
IsUrgent = subjectVisit.IsUrgent,
|
||||
TaskBlindName = blindTaskName,
|
||||
TaskBlindName = blindTaskName2,
|
||||
TaskName = subjectVisit.VisitName,
|
||||
TaskUrgentType = taskUrgentType,
|
||||
IsCanEditUrgentState = isCanEditUrgentState,
|
||||
@@ -283,7 +332,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
}
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
|
||||
|
||||
|
||||
@@ -344,7 +393,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
|
||||
|
||||
|
||||
@@ -590,11 +639,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var dbMaxCode = _visitTaskRepository.Where(t => t.TrialId == trialId).Select(t => t.Code).DefaultIfEmpty().Max();
|
||||
|
||||
var cacheMaxCodeInt = _fusionCache.GetOrDefault<int>(CacheKeys.TrialStudyMaxCode(trialId));
|
||||
var cacheMaxCodeInt = _fusionCache.GetOrDefault<int>(CacheKeys.TrialVisitTaskMaxCode(trialId));
|
||||
|
||||
int currentMaxCodeInt = cacheMaxCodeInt > dbMaxCode ? cacheMaxCodeInt : dbMaxCode;
|
||||
|
||||
|
||||
var randomTaskBlindNameList = new List<string>();
|
||||
|
||||
|
||||
switch (generateTaskCommand.ReadingCategory)
|
||||
@@ -654,7 +703,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
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);
|
||||
|
||||
|
||||
var blindTaskName = string.Empty;
|
||||
var isFullRandom = false;
|
||||
|
||||
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||
{
|
||||
@@ -668,6 +719,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
}
|
||||
}
|
||||
else if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.Random)
|
||||
{
|
||||
blindTaskName = await GetRandomTaskName(trialId, randomTaskBlindNameList);
|
||||
isFullRandom = true;
|
||||
}
|
||||
//受试者随机
|
||||
else
|
||||
{
|
||||
blindTaskName = "Timepoint";
|
||||
@@ -710,6 +767,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt, nameof(VisitTask)),
|
||||
ReadingCategory = ReadingCategory.Visit,
|
||||
|
||||
|
||||
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
||||
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
||||
IsClinicalDataSign = isClinicalDataSign,
|
||||
@@ -721,11 +779,15 @@ namespace IRaCIS.Core.Application.Service
|
||||
if (!existCurrentVisitTaskList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2))
|
||||
{
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
|
||||
var blindTaskName2 = isFullRandom ? await GetRandomTaskName(trialId, randomTaskBlindNameList) : blindTaskName;
|
||||
|
||||
|
||||
task2 = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
{
|
||||
TrialId = trialId,
|
||||
SubjectId = subjectVisit.SubjectId,
|
||||
TaskBlindName = blindTaskName,
|
||||
TaskBlindName = blindTaskName2,
|
||||
TaskName = subjectVisit.VisitName,
|
||||
IsUrgent = subjectVisit.IsUrgent,
|
||||
|
||||
@@ -747,7 +809,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
|
||||
|
||||
#region 分配
|
||||
@@ -920,7 +982,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -992,7 +1054,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1069,7 +1131,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
|
||||
#region 分配
|
||||
|
||||
@@ -1197,7 +1259,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1277,6 +1339,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var reReadingVisitTask = generateTaskCommand.ReReadingTask;
|
||||
|
||||
|
||||
Guid? subjectVisitId = Guid.Empty;
|
||||
|
||||
if (reReadingVisitTask.SourceSubjectVisitId == null)
|
||||
@@ -1317,6 +1380,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
//&& t.TrialReadingCriterionId == reReadingVisitTask.TrialReadingCriterionId && t.TaskState == TaskState.Effect
|
||||
// && t.SourceSubjectVisitId == reReadingVisitTask.SourceSubjectVisitId && t.ArmEnum == reReadingVisitTask.ArmEnum && t.DoctorUserId == reReadingVisitTask.DoctorUserId).FirstOrDefault();
|
||||
|
||||
var isRandomReading = trialReadingCriterionConfigList.FirstOrDefault(t => t.TrialReadingCriterionId == reReadingVisitTask.TrialReadingCriterionId)?.IsReadingTaskViewInOrder == ReadingOrder.Random;
|
||||
|
||||
var taskBlindName = isRandomReading ? await GetRandomTaskName(trialId, randomTaskBlindNameList) : reReadingVisitTask.TaskBlindName;
|
||||
|
||||
|
||||
var newTask = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||
{
|
||||
@@ -1325,7 +1392,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
SubjectId = reReadingVisitTask.SubjectId,
|
||||
ArmEnum = reReadingVisitTask.ArmEnum,
|
||||
TaskName = reReadingVisitTask.TaskName,
|
||||
TaskBlindName = reReadingVisitTask.TaskBlindName,
|
||||
TaskBlindName = taskBlindName,
|
||||
|
||||
IsUrgent = reReadingVisitTask.IsAnalysisCreate ? false : subjectVisitUrgentInfo.IsUrgent,
|
||||
TaskUrgentType = reReadingVisitTask.IsAnalysisCreate ? null : taskUrgent,
|
||||
@@ -1355,6 +1422,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
// AllocateTime = DateTime.Now,
|
||||
//DoctorUserId = reReadingVisitTask.DoctorUserId,
|
||||
|
||||
IsIRImageDownloaded= reReadingVisitTask.IsIRImageDownloaded,
|
||||
});
|
||||
|
||||
generateTaskCommand.Action(newTask);
|
||||
@@ -1386,7 +1454,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
|
||||
//}
|
||||
|
||||
@@ -1491,7 +1559,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1538,7 +1606,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1548,6 +1616,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var subjectUser = await _subjectUserRepository.Where(x => x.SubjectId == firstTask.SubjectId && x.ArmEnum == Arm.JudgeArm && x.IsConfirmed && x.TrialReadingCriterionId == firstTask.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
var isRandom = trialReadingCriterionConfigList.FirstOrDefault(t => t.TrialReadingCriterionId == firstTask.TrialReadingCriterionId)?.IsReadingTaskViewInOrder == ReadingOrder.Random;
|
||||
|
||||
var blindName = isRandom ? await GetRandomTaskName(trialId, randomTaskBlindNameList) : firstTask.TaskBlindName;
|
||||
|
||||
VisitTask visitTask = new VisitTask()
|
||||
{
|
||||
ArmEnum = Arm.JudgeArm,
|
||||
@@ -1564,7 +1637,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
SouceReadModuleId = firstTask.SouceReadModuleId,
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
|
||||
TaskState = TaskState.Effect,
|
||||
TaskBlindName = firstTask.TaskBlindName,
|
||||
TaskBlindName = blindName,
|
||||
DoctorUserId = subjectUser == null ? null : subjectUser.DoctorUserId,
|
||||
TaskAllocationState = subjectUser == null ? TaskAllocationState.NotAllocate : TaskAllocationState.Allocated,
|
||||
AllocateTime = subjectUser == null ? null : DateTime.Now,
|
||||
@@ -1576,7 +1649,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
await _visitTaskRepository.AddAsync(visitTask);
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => generateTaskCommand.JudgeVisitTaskIdList.Contains(x.Id), x => new VisitTask()
|
||||
{
|
||||
@@ -1637,7 +1710,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
});
|
||||
|
||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1707,7 +1780,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
TrialId = originalTaskInfo.TrialId
|
||||
});
|
||||
|
||||
_fusionCache.Set<int>(CacheKeys.TrialStudyMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
_fusionCache.Set<int>(CacheKeys.TrialVisitTaskMaxCode(trialId), currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,11 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<ReadingNoneDicomMark> _readingNoneDicomMarkRepository,
|
||||
IRepository<ReadingNoneDicomMarkBinding> _readingNoneDicomMarkBindingRepository,
|
||||
IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository,
|
||||
//IRepository<ReadingCustomTag> _readingCustomTagRepository,
|
||||
//IRepository<ReadingCustomTag> _readingCustomTagRepository,
|
||||
IRepository<TaskStudy> _taskStudyRepository,
|
||||
IRepository<TaskSeries> _taskSeriesRepository,
|
||||
IRepository<TaskInstance> _taskInstanceRepository,
|
||||
IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository,
|
||||
IRepository<TaskInfluence> _taskInfluenceRepository,
|
||||
IRepository<TrialQCQuestionAnswer> _trialQCQuestionAnswerRepository,
|
||||
ILogger<VisitTaskService> _logger,
|
||||
@@ -91,6 +95,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
{
|
||||
TrialReadingCriterionId = t.Id,
|
||||
IsAutoCreate = t.IsAutoCreate,
|
||||
ReadingTool = t.ReadingTool,
|
||||
IsAdditionalAssessment = t.IsAdditionalAssessment,
|
||||
TrialReadingCriterionName = t.CriterionName,
|
||||
CriterionType = t.CriterionType,
|
||||
@@ -849,7 +854,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<ReReadingTaskView>> GetIRReReadingTaskList(VisitTaskQuery inQuery)
|
||||
public async Task<IResponseOutput<PageOutput<ReReadingTaskView>>> GetIRReReadingTaskList(VisitTaskQuery inQuery)
|
||||
{
|
||||
|
||||
var visitTaskQueryable = _visitTaskReReadingRepository
|
||||
@@ -873,6 +878,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialSiteCode), t => (t.OriginalReReadingTask.BlindTrialSiteCode.Contains(inQuery.TrialSiteCode!) && t.OriginalReReadingTask.IsAnalysisCreate) || (t.OriginalReReadingTask.Subject.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode!) && t.OriginalReReadingTask.IsAnalysisCreate == false))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.OriginalReReadingTask.TaskName.Contains(inQuery.TaskName) || t.NewReReadingTask.TaskBlindName.Contains(inQuery.TaskName))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskBlindName), t => t.NewReReadingTask.TaskBlindName.Contains(inQuery.TaskBlindName))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => (t.OriginalReReadingTask.Subject.Code.Contains(inQuery.SubjectCode) && t.OriginalReReadingTask.IsAnalysisCreate == false) || (t.OriginalReReadingTask.BlindSubjectCode.Contains(inQuery.SubjectCode) && t.OriginalReReadingTask.IsAnalysisCreate))
|
||||
.WhereIf(inQuery.BeginAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime > inQuery.BeginAllocateDate)
|
||||
.WhereIf(inQuery.EndAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime < inQuery.EndAllocateDate!.Value.AddDays(1))
|
||||
@@ -884,7 +890,11 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
|
||||
var pageList = await visitTaskQueryable.ToPagedListAsync(inQuery, defalutSortArray);
|
||||
|
||||
return pageList;
|
||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId)
|
||||
.Select(t => new { t.IsReadingTaskViewInOrder }).FirstNotNullAsync();
|
||||
|
||||
return ResponseOutput.Ok(pageList, criterionInfo);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1237,7 +1247,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<IRHaveReadView>> GetIRHaveReadTaskList(VisitTaskQuery inQuery)
|
||||
public async Task<IResponseOutput<PageOutput<IRHaveReadView>>> GetIRHaveReadTaskList(VisitTaskQuery inQuery)
|
||||
{
|
||||
|
||||
|
||||
@@ -1256,6 +1266,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
.WhereIf(inQuery.TaskState != null, t => t.TaskState == inQuery.TaskState)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialSiteCode), t => (t.BlindTrialSiteCode.Contains(inQuery.TrialSiteCode!) && t.IsAnalysisCreate) || (t.Subject.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode!) && t.IsAnalysisCreate == false))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.TaskName.Contains(inQuery.TaskName) || t.TaskBlindName.Contains(inQuery.TaskName))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskBlindName), t => t.TaskBlindName.Contains(inQuery.TaskBlindName))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => (t.Subject.Code.Contains(inQuery.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(inQuery.SubjectCode) && t.IsAnalysisCreate))
|
||||
.WhereIf(inQuery.BeginAllocateDate != null, t => t.AllocateTime > inQuery.BeginAllocateDate)
|
||||
.WhereIf(inQuery.EndAllocateDate != null, t => t.AllocateTime < inQuery.EndAllocateDate!.Value.AddDays(1))
|
||||
@@ -1265,7 +1276,10 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
|
||||
var pageList = await visitTaskQueryable.ToPagedListAsync(inQuery, defalutSortArray);
|
||||
|
||||
return pageList;
|
||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId)
|
||||
.Select(t => new { t.IsReadingTaskViewInOrder }).FirstNotNullAsync();
|
||||
|
||||
return ResponseOutput.Ok(pageList, criterionInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -2074,29 +2088,37 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
//申请表 设置新任务Id
|
||||
visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id;
|
||||
|
||||
//拷贝原始表单
|
||||
if (visitTaskReReadingAppply.IsCopyOrigenalForms && influenceTask.Id == origenalTask.Id)
|
||||
|
||||
if (origenalTask.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
if (origenalTask.ReadingCategory == ReadingCategory.Visit)
|
||||
CopyImages(newTask, influenceTask);
|
||||
|
||||
//拷贝原始表单
|
||||
if (visitTaskReReadingAppply.IsCopyOrigenalForms && influenceTask.Id == origenalTask.Id)
|
||||
{
|
||||
CopyForms(newTask, origenalTask);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//拷贝后续表单
|
||||
if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum)
|
||||
{
|
||||
if (origenalTask.ReadingCategory == ReadingCategory.Visit)
|
||||
//拷贝后续表单
|
||||
if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum)
|
||||
{
|
||||
newTask.IsCopyLesionAnswer = true;
|
||||
|
||||
//CopyForms(newTask, origenalTask);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (origenalTask.ReadingCategory == ReadingCategory.Judge)
|
||||
{
|
||||
//拷贝原始表单
|
||||
if (visitTaskReReadingAppply.IsCopyOrigenalForms && influenceTask.Id == origenalTask.Id)
|
||||
{
|
||||
CopyForms(newTask, origenalTask);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2178,6 +2200,9 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||
|
||||
|
||||
CopyImages(newTask, influenceTask);
|
||||
|
||||
|
||||
//裁判任务 需要进行特殊处理 在重阅逻辑里面处理
|
||||
|
||||
if (visitTaskReReadingAppply != null)
|
||||
@@ -2194,16 +2219,16 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
|
||||
}
|
||||
|
||||
//拷贝后续表单
|
||||
if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum)
|
||||
{
|
||||
if (origenalTask.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
newTask.IsCopyLesionAnswer = true;
|
||||
//CopyForms(newTask, origenalTask);
|
||||
////拷贝后续表单
|
||||
//if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum)
|
||||
//{
|
||||
// if (origenalTask.ReadingCategory == ReadingCategory.Visit)
|
||||
// {
|
||||
// newTask.IsCopyLesionAnswer = true;
|
||||
// //CopyForms(newTask, origenalTask);
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -2223,7 +2248,84 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
}
|
||||
}
|
||||
|
||||
private async Task CopyForms(VisitTask newTask, VisitTask origenalTask)
|
||||
|
||||
private void CopyImages(VisitTask newTask, VisitTask origenalTask)
|
||||
{
|
||||
//拷贝后处理绑定的的Dicom影像
|
||||
|
||||
var newTaskId = newTask.Id;
|
||||
|
||||
var taskStudyList = _taskStudyRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
|
||||
var taskSeriesList = _taskSeriesRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
var taskInstanceList = _taskInstanceRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
|
||||
|
||||
foreach (var taskStudy in taskStudyList)
|
||||
{
|
||||
var newStudyId = IdentifierHelper.CreateGuid(taskStudy.StudyInstanceUid, taskStudy.TrialId.ToString(), newTaskId.ToString());
|
||||
|
||||
var newStudy = taskStudy.Clone();
|
||||
newStudy.Id = newStudyId;
|
||||
newStudy.SeqId = NewId.NextSequentialGuid();
|
||||
newStudy.VisitTaskId = newTaskId;
|
||||
|
||||
_ = _taskStudyRepository.AddAsync(newStudy).Result;
|
||||
|
||||
var studySeriesList = taskSeriesList.Where(t => t.StudyId == taskStudy.Id).ToList();
|
||||
|
||||
foreach (var series in studySeriesList)
|
||||
{
|
||||
var newSeriesId = IdentifierHelper.CreateGuid(series.StudyInstanceUid, series.SeriesInstanceUid, series.TrialId.ToString(), newTaskId.ToString());
|
||||
|
||||
var newSeries = series.Clone();
|
||||
newSeries.Id = newSeriesId;
|
||||
newSeries.SeqId = NewId.NextSequentialGuid();
|
||||
newSeries.StudyId = newStudyId;
|
||||
newSeries.VisitTaskId = newTaskId;
|
||||
|
||||
|
||||
_ = _taskSeriesRepository.AddAsync(newSeries).Result;
|
||||
|
||||
|
||||
var studyInstanceList = taskInstanceList.Where(t => t.StudyId == taskStudy.Id && t.SeriesId == series.Id).ToList();
|
||||
|
||||
foreach (var instance in studyInstanceList)
|
||||
{
|
||||
var newInstanceId = IdentifierHelper.CreateGuid(newStudy.StudyInstanceUid, newSeries.SeriesInstanceUid, instance.SopInstanceUid, newStudy.TrialId.ToString(), newTaskId.ToString());
|
||||
|
||||
var newInstance = instance.Clone();
|
||||
|
||||
newInstance.Id = newInstanceId;
|
||||
newInstance.SeqId = NewId.NextSequentialGuid();
|
||||
newInstance.StudyId = newStudyId;
|
||||
newInstance.SeriesId = newSeriesId;
|
||||
newInstance.VisitTaskId = newTaskId;
|
||||
|
||||
Console.WriteLine($"StudyInstanceUid:{newStudy.StudyInstanceUid} SeriesInstanceUid:{newSeries.SeriesInstanceUid} SopInstanceUid: {instance.SopInstanceUid},newInstanceId:{newInstanceId} ");
|
||||
|
||||
_ = _taskInstanceRepository.AddAsync(newInstance).Result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//拷贝后处理的NoneDicom
|
||||
|
||||
var fileList = _noneDicomStudyFileRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
|
||||
foreach (var file in fileList)
|
||||
{
|
||||
var newFile = file.Clone();
|
||||
|
||||
newFile.Id = NewId.NextSequentialGuid();
|
||||
newFile.VisitTaskId = newTaskId;
|
||||
|
||||
_ = _noneDicomStudyFileRepository.AddAsync(newFile).Result;
|
||||
}
|
||||
}
|
||||
private void CopyForms(VisitTask newTask, VisitTask origenalTask)
|
||||
{
|
||||
newTask.IsCopyLesionAnswer = true;
|
||||
//自定义
|
||||
@@ -2239,7 +2341,9 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
//_ = _readingCustomTagRepository.AddRangeAsync(readingCustomTagList).Result;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var readingTaskQuestionAnswerList = _readingTaskQuestionAnswerRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
@@ -2301,7 +2405,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
|
||||
#region 分割
|
||||
Dictionary<Guid, Guid> segmentationRelationship = new Dictionary<Guid, Guid>() { };
|
||||
var segmentationList = _segmentationRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
var segmentationList = _segmentationRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
|
||||
foreach (var item in segmentationList)
|
||||
{
|
||||
@@ -2314,7 +2418,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
|
||||
|
||||
Dictionary<Guid, Guid> segmentRelationship = new Dictionary<Guid, Guid>() { };
|
||||
var segmentList = _segmentRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
var segmentList = _segmentRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
foreach (var item in segmentList)
|
||||
{
|
||||
var newSegmentationId = NewId.NextSequentialGuid();
|
||||
@@ -2327,7 +2431,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
item.VisitTaskId = newTask.Id;
|
||||
}
|
||||
|
||||
var segmentBindingList = _segmentBindingRepository.Where(x => x.VisitTaskId == origenalTask.Id).ToList();
|
||||
var segmentBindingList = _segmentBindingRepository.Where(x => x.VisitTaskId == origenalTask.Id).ToList();
|
||||
|
||||
foreach (var item in segmentBindingList)
|
||||
{
|
||||
@@ -2718,7 +2822,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
||||
|
||||
|
||||
// 处理阅片期的临床数据
|
||||
var readModuleIdList =await _readModuleRepository.Where(x => x.SubjectVisitId == sv.Id).Select(x => x.Id).ToListAsync();
|
||||
var readModuleIdList = await _readModuleRepository.Where(x => x.SubjectVisitId == sv.Id).Select(x => x.Id).ToListAsync();
|
||||
|
||||
|
||||
await _readingClinicalDataReposiotry.UpdatePartialFromQueryAsync(t => readModuleIdList.Contains(t.ReadingId), c => new ReadingClinicalData()
|
||||
|
||||
@@ -96,6 +96,8 @@ namespace IRaCIS.Application.Contracts
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
|
||||
public Guid? SystemReadingCriterionId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -157,6 +157,42 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public string EmailTopicCN { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 手动发送项目邮件请求参数
|
||||
/// </summary>
|
||||
public class ManualSendEmailCommand
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 收件人邮箱列表
|
||||
/// </summary>
|
||||
public List<EmailRecipientCommand> ToEmailList { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// 抄送人邮箱列表
|
||||
/// </summary>
|
||||
public List<EmailRecipientCommand> CcEmailList { get; set; } = new();
|
||||
|
||||
public string Subject { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 邮件 HTML 内容
|
||||
/// </summary>
|
||||
public string Content { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 邮件收件人信息
|
||||
/// </summary>
|
||||
public class EmailRecipientCommand
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public string EmailAddress { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
public class EmailNoticeConfigExportDto
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
// 生成时间 2026-03-10 06:15:31Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel;
|
||||
@@ -96,7 +95,22 @@ public class FileUploadRecordAddOrEdit
|
||||
public bool? IsSync { get; set; }
|
||||
}
|
||||
|
||||
public class CommonUploadRecordDto: CommonUploadRecordAddOrEdit
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class CommonUploadRecordAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public string FileType { get; set; }
|
||||
|
||||
public string FileName { get; set; }
|
||||
|
||||
public long FileSize { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
}
|
||||
public class SubjectFileUploadRecordQuery : PageInput
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
@@ -4,6 +4,7 @@ using Medallion.Threading;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json.Linq;
|
||||
@@ -16,7 +17,7 @@ using System.Threading.Tasks;
|
||||
namespace IRaCIS.Core.Application.Service.Common;
|
||||
|
||||
[ApiExplorerSettings(GroupName = "Common")]
|
||||
public class DeployConfigService(IMapper _mapper, IUserInfo _userInfo, IWebHostEnvironment _hostEnvironment, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService
|
||||
public class DeployConfigService(IMapper _mapper, IConfiguration _configuration, IDistributedLockProvider _distributedLockProvider, IUserInfo _userInfo, IWebHostEnvironment _hostEnvironment, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -26,7 +27,18 @@ public class DeployConfigService(IMapper _mapper, IUserInfo _userInfo, IWebHostE
|
||||
/// <returns></returns>
|
||||
public async Task<ServiceVerifyConfigOption> GetSystemBasicConfigInfo([FromServices] IOptionsMonitor<ServiceVerifyConfigOption> options)
|
||||
{
|
||||
return options.CurrentValue;
|
||||
//var config = _configuration.GetSection("BasicSystemConfig").Get<ServiceVerifyConfigOption>();
|
||||
//return config;
|
||||
|
||||
|
||||
var path = Path.Combine(_hostEnvironment.ContentRootPath, $"appsettings.{_hostEnvironment.EnvironmentName}.json");
|
||||
|
||||
var json = File.ReadAllText(path);
|
||||
|
||||
var obj = JObject.Parse(json);
|
||||
|
||||
return obj["BasicSystemConfig"]!.ToObject<ServiceVerifyConfigOption>()!;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -37,34 +49,45 @@ public class DeployConfigService(IMapper _mapper, IUserInfo _userInfo, IWebHostE
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> UpdateSystemBasicConfig(ServiceVerifyConfigOption basicSystemConfigOption)
|
||||
{
|
||||
var path = $"appsettings.{_hostEnvironment.EnvironmentName}.json";
|
||||
|
||||
string text = System.IO.File.ReadAllText(path);
|
||||
|
||||
// 修改
|
||||
JObject obj = JObject.Parse(text);
|
||||
// QCRiskControl 相关配置
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.QCRiskControl)] = basicSystemConfigOption.QCRiskControl;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.OpenUserComplexPassword)] = basicSystemConfigOption.OpenUserComplexPassword;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.OpenSignDocumentBeforeWork)] = basicSystemConfigOption.OpenSignDocumentBeforeWork;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.OpenTrialRelationDelete)] = basicSystemConfigOption.OpenTrialRelationDelete;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.OpenLoginLimit)] = basicSystemConfigOption.OpenLoginLimit;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.LoginMaxFailCount)] = basicSystemConfigOption.LoginMaxFailCount;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.LoginFailLockMinutes)] = basicSystemConfigOption.LoginFailLockMinutes;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.AutoLoginOutMinutes)] = basicSystemConfigOption.AutoLoginOutMinutes;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.OpenLoginMFA)] = basicSystemConfigOption.OpenLoginMFA;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.ContinuousReadingTimeMin)] = basicSystemConfigOption.ContinuousReadingTimeMin;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.ReadingRestTimeMin)] = basicSystemConfigOption.ReadingRestTimeMin;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.IsNeedChangePassWord)] = basicSystemConfigOption.IsNeedChangePassWord;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.ChangePassWordDays)] = basicSystemConfigOption.ChangePassWordDays;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.TemplateType)] = ((int)basicSystemConfigOption.TemplateType); // 枚举需要转换为字符串
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.ThirdPdfUrl)] = basicSystemConfigOption.ThirdPdfUrl;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.UserMFAVerifyMinutes)] = basicSystemConfigOption.UserMFAVerifyMinutes;
|
||||
//var path = $"appsettings.{_hostEnvironment.EnvironmentName}.json";
|
||||
var path = Path.Combine(_hostEnvironment.ContentRootPath, $"appsettings.{_hostEnvironment.EnvironmentName}.json");
|
||||
|
||||
|
||||
// 重新写入appsettings.json
|
||||
string result = obj.ToString();
|
||||
System.IO.File.WriteAllText(path, result);
|
||||
var @lock = _distributedLockProvider.CreateLock("WriteConfigFile");
|
||||
|
||||
|
||||
using (await @lock.AcquireAsync())
|
||||
{
|
||||
|
||||
|
||||
string text = System.IO.File.ReadAllText(path);
|
||||
|
||||
// 修改
|
||||
JObject obj = JObject.Parse(text);
|
||||
// QCRiskControl 相关配置
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.QCRiskControl)] = basicSystemConfigOption.QCRiskControl;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.OpenUserComplexPassword)] = basicSystemConfigOption.OpenUserComplexPassword;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.OpenSignDocumentBeforeWork)] = basicSystemConfigOption.OpenSignDocumentBeforeWork;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.OpenTrialRelationDelete)] = basicSystemConfigOption.OpenTrialRelationDelete;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.OpenLoginLimit)] = basicSystemConfigOption.OpenLoginLimit;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.LoginMaxFailCount)] = basicSystemConfigOption.LoginMaxFailCount;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.LoginFailLockMinutes)] = basicSystemConfigOption.LoginFailLockMinutes;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.AutoLoginOutMinutes)] = basicSystemConfigOption.AutoLoginOutMinutes;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.OpenLoginMFA)] = basicSystemConfigOption.OpenLoginMFA;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.ContinuousReadingTimeMin)] = basicSystemConfigOption.ContinuousReadingTimeMin;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.ReadingRestTimeMin)] = basicSystemConfigOption.ReadingRestTimeMin;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.IsNeedChangePassWord)] = basicSystemConfigOption.IsNeedChangePassWord;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.ChangePassWordDays)] = basicSystemConfigOption.ChangePassWordDays;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.TemplateType)] = ((int)basicSystemConfigOption.TemplateType); // 枚举需要转换为字符串
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.ThirdPdfUrl)] = basicSystemConfigOption.ThirdPdfUrl;
|
||||
obj["BasicSystemConfig"][nameof(ServiceVerifyConfigOption.UserMFAVerifyMinutes)] = basicSystemConfigOption.UserMFAVerifyMinutes;
|
||||
|
||||
|
||||
// 重新写入appsettings.json
|
||||
string result = obj.ToString();
|
||||
System.IO.File.WriteAllText(path, result);
|
||||
|
||||
}
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
@@ -77,7 +100,18 @@ public class DeployConfigService(IMapper _mapper, IUserInfo _userInfo, IWebHostE
|
||||
/// <returns></returns>
|
||||
public async Task<SystemEmailSendConfig> GetEmailConfigInfo([FromServices] IOptionsMonitor<SystemEmailSendConfig> options)
|
||||
{
|
||||
return options.CurrentValue;
|
||||
//两种方式都有问题
|
||||
//var config = _configuration.GetSection("BasicSystemConfig").Get<SystemEmailSendConfig>();
|
||||
//return config;
|
||||
//return options.CurrentValue;
|
||||
|
||||
var path = Path.Combine(_hostEnvironment.ContentRootPath, $"appsettings.{_hostEnvironment.EnvironmentName}.json");
|
||||
|
||||
var json = File.ReadAllText(path);
|
||||
|
||||
var obj = JObject.Parse(json);
|
||||
|
||||
return obj["SystemEmailSendConfig"]!.ToObject<SystemEmailSendConfig>()!;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,42 +123,105 @@ public class DeployConfigService(IMapper _mapper, IUserInfo _userInfo, IWebHostE
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> UpdateSystemEmailConfig(SystemEmailSendConfig emailConfig)
|
||||
{
|
||||
var path = $"appsettings.{_hostEnvironment.EnvironmentName}.json";
|
||||
var path = Path.Combine(_hostEnvironment.ContentRootPath, $"appsettings.{_hostEnvironment.EnvironmentName}.json");
|
||||
//var path = $"appsettings.{_hostEnvironment.EnvironmentName}.json";
|
||||
|
||||
string text = System.IO.File.ReadAllText(path);
|
||||
var @lock = _distributedLockProvider.CreateLock("WriteConfigFile");
|
||||
|
||||
// 修改
|
||||
JObject obj = JObject.Parse(text);
|
||||
|
||||
// SystemEmailSendConfig 相关配置
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.Port)] = emailConfig.Port;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.Host)] = emailConfig.Host;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.Imap)] = emailConfig.Imap;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.ImapPort)] = emailConfig.ImapPort;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.FromEmail)] = emailConfig.FromEmail;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.FromName)] = emailConfig.FromName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.AuthorizationCode)] = emailConfig.AuthorizationCode;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.SiteUrl)] = emailConfig.SiteUrl;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.PlatformName)] = emailConfig.PlatformName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.PlatformNameCN)] = emailConfig.PlatformNameCN;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.SystemShortName)] = emailConfig.SystemShortName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.OrganizationName)] = emailConfig.OrganizationName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.OrganizationNameCN)] = emailConfig.OrganizationNameCN;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.CompanyName)] = emailConfig.CompanyName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.CompanyNameCN)] = emailConfig.CompanyNameCN;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.CompanyShortName)] = emailConfig.CompanyShortName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.CompanyShortNameCN)] = emailConfig.CompanyShortNameCN;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.IsEnv_US)] = emailConfig.IsEnv_US;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.EmailRegexStr)] = emailConfig.EmailRegexStr;
|
||||
using (await @lock.AcquireAsync())
|
||||
{
|
||||
|
||||
|
||||
string text = System.IO.File.ReadAllText(path);
|
||||
|
||||
// 修改
|
||||
JObject obj = JObject.Parse(text);
|
||||
|
||||
// SystemEmailSendConfig 相关配置
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.Port)] = emailConfig.Port;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.Host)] = emailConfig.Host;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.Imap)] = emailConfig.Imap;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.ImapPort)] = emailConfig.ImapPort;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.FromEmail)] = emailConfig.FromEmail;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.FromName)] = emailConfig.FromName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.AuthorizationCode)] = emailConfig.AuthorizationCode;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.SiteUrl)] = emailConfig.SiteUrl;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.PlatformName)] = emailConfig.PlatformName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.PlatformNameCN)] = emailConfig.PlatformNameCN;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.SystemShortName)] = emailConfig.SystemShortName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.OrganizationName)] = emailConfig.OrganizationName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.OrganizationNameCN)] = emailConfig.OrganizationNameCN;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.CompanyName)] = emailConfig.CompanyName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.CompanyNameCN)] = emailConfig.CompanyNameCN;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.CompanyShortName)] = emailConfig.CompanyShortName;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.CompanyShortNameCN)] = emailConfig.CompanyShortNameCN;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.IsEnv_US)] = emailConfig.IsEnv_US;
|
||||
obj["SystemEmailSendConfig"][nameof(SystemEmailSendConfig.EmailRegexStr)] = emailConfig.EmailRegexStr;
|
||||
|
||||
|
||||
|
||||
// 重新写入appsettings.json
|
||||
string result = obj.ToString();
|
||||
System.IO.File.WriteAllText(path, result);
|
||||
// 重新写入appsettings.json
|
||||
string result = obj.ToString();
|
||||
System.IO.File.WriteAllText(path, result);
|
||||
|
||||
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取前端配置
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public async Task<string> GetWebConfigInfo()
|
||||
{
|
||||
|
||||
|
||||
var path = Path.Combine(_hostEnvironment.ContentRootPath, $"appsettings.{_hostEnvironment.EnvironmentName}.json");
|
||||
|
||||
var json = File.ReadAllText(path);
|
||||
|
||||
var obj = JObject.Parse(json);
|
||||
|
||||
return obj["FrontWebConfig"]!.ToString();
|
||||
}
|
||||
|
||||
|
||||
public class WebConfigCommand
|
||||
{
|
||||
public string ConfigStr { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public async Task<IResponseOutput> UpdateWebConfigInfo(WebConfigCommand incommand)
|
||||
{
|
||||
var path = Path.Combine(_hostEnvironment.ContentRootPath, $"appsettings.{_hostEnvironment.EnvironmentName}.json");
|
||||
//var path = $"appsettings.{_hostEnvironment.EnvironmentName}.json";
|
||||
|
||||
var @lock = _distributedLockProvider.CreateLock("WriteConfigFile");
|
||||
|
||||
using (await @lock.AcquireAsync())
|
||||
{
|
||||
string text = System.IO.File.ReadAllText(path);
|
||||
// 修改
|
||||
JObject obj = JObject.Parse(text);
|
||||
|
||||
// SystemEmailSendConfig 相关配置
|
||||
obj["FrontWebConfig"] = incommand.ConfigStr;
|
||||
|
||||
// 重新写入appsettings.json
|
||||
string result = obj.ToString();
|
||||
|
||||
System.IO.File.WriteAllText(path, result);
|
||||
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -452,14 +452,14 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
if (inDto.TrialReadingCriterionId == null && inDto.SystemReadingCriterionId == null)
|
||||
{
|
||||
return result;
|
||||
return await ChangeTrialObjectNameList(result,inDto.TrialId);
|
||||
}
|
||||
else if (inDto.TrialReadingCriterionId != null)
|
||||
{
|
||||
var trialCriterionType = await _readingQuestionCriterionTrial.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
|
||||
if (trialCriterionType == CriterionType.SelfDefine)
|
||||
{
|
||||
return result;
|
||||
return await ChangeTrialObjectNameList(result, inDto.TrialId);
|
||||
}
|
||||
|
||||
|
||||
@@ -505,7 +505,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
result[item.Key] = item.Value;
|
||||
}
|
||||
|
||||
return result;
|
||||
return await ChangeTrialObjectNameList(result, inDto.TrialId);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -548,12 +548,76 @@ namespace IRaCIS.Core.Application.Service
|
||||
result[item.Key] = item.Value;
|
||||
}
|
||||
|
||||
return result;
|
||||
return await ChangeTrialObjectNameList(result, inDto.TrialId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 替换字典中的项目名称为试验对象名称 --New
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <param name="trialId"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<Dictionary<string, List<BasicDicSelect>>> ChangeTrialObjectNameList(Dictionary<string, List<BasicDicSelect>> data,Guid? trialId)
|
||||
{
|
||||
if (!trialId.HasValue)
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
// 查询映射集合
|
||||
var trialObjectNameList = await _trialRepository
|
||||
.Where(x => x.Id == trialId)
|
||||
.Select(x => x.TrialObjectNameList)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
// 无映射数据直接返回
|
||||
if (trialObjectNameList == null || !trialObjectNameList.Any())
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
// 构建映射字典,过滤空名称,避免无效替换
|
||||
var replaceDict = trialObjectNameList
|
||||
.Where(m => !string.IsNullOrEmpty(m.Name))
|
||||
.ToDictionary(m => m.Name, m => m.TrialName);
|
||||
|
||||
// 遍历替换
|
||||
foreach (var (_, selectList) in data)
|
||||
{
|
||||
foreach (var selectItem in selectList)
|
||||
{
|
||||
// 替换Value,判null保护
|
||||
if (selectItem.Value != null)
|
||||
{
|
||||
string tempVal = selectItem.Value;
|
||||
foreach (var (oldStr, newStr) in replaceDict)
|
||||
{
|
||||
tempVal = tempVal.Replace(oldStr, newStr);
|
||||
}
|
||||
selectItem.Value = tempVal;
|
||||
}
|
||||
|
||||
// 替换中文名称ValueCN
|
||||
if (selectItem.ValueCN != null)
|
||||
{
|
||||
string tempCn = selectItem.ValueCN;
|
||||
foreach (var (oldStr, newStr) in replaceDict)
|
||||
{
|
||||
tempCn = tempCn.Replace(oldStr, newStr);
|
||||
}
|
||||
selectItem.ValueCN = tempCn;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
#region 稽查相关
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -4,19 +4,14 @@
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using MailKit;
|
||||
using MailKit.Net.Imap;
|
||||
using MailKit.Search;
|
||||
using MailKit.Security;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using MimeKit;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
@@ -27,11 +22,47 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
[ApiExplorerSettings(GroupName = "Common")]
|
||||
public class EmailNoticeConfigService(IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
||||
IRepository<EmailNoticeUserType> _emailNoticeUserTypeRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IEmailNoticeConfigService
|
||||
{
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目邮件配置手动发送邮件
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> ManualSendEmail(ManualSendEmailCommand inDto)
|
||||
{
|
||||
var trial = await _trialRepository.Where(t => t.Id == inDto.TrialId).FirstNotNullAsync();
|
||||
|
||||
var messageToSend = new MimeMessage
|
||||
{
|
||||
Subject = inDto.Subject
|
||||
};
|
||||
|
||||
messageToSend.From.Add(new MailboxAddress(trial.EmailFromName, trial.EmailFromEmail));
|
||||
|
||||
foreach (var recipient in inDto.ToEmailList.Where(t => !string.IsNullOrWhiteSpace(t.EmailAddress)))
|
||||
{
|
||||
messageToSend.To.Add(new MailboxAddress(recipient.Name, recipient.EmailAddress));
|
||||
}
|
||||
|
||||
foreach (var recipient in inDto.CcEmailList.Where(t => !string.IsNullOrWhiteSpace(t.EmailAddress)))
|
||||
{
|
||||
messageToSend.Cc.Add(new MailboxAddress(recipient.Name, recipient.EmailAddress));
|
||||
}
|
||||
|
||||
messageToSend.Body = new BodyBuilder
|
||||
{
|
||||
HtmlBody = inDto.Content
|
||||
}.ToMessageBody();
|
||||
|
||||
await SendEmailHelper.SendTrialEmailAsync(messageToSend, trial);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取邮件列表
|
||||
/// </summary>
|
||||
@@ -117,6 +148,31 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
return await emailNoticeConfigQueryable.ToPagedListAsync(inQuery);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取全部邮件列表
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<EmailNoticeConfigView>> GetAllEmailNoticeConfigList(EmailNoticeConfigQuery inQuery)
|
||||
{
|
||||
var emailNoticeConfigQueryable = _emailNoticeConfigrepository
|
||||
.WhereIf(inQuery.SystemLevel != null, t => t.SystemLevel == inQuery.SystemLevel)
|
||||
.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
|
||||
.WhereIf(inQuery.BusinessLevelEnum != null, t => t.BusinessLevelEnum == inQuery.BusinessLevelEnum)
|
||||
.WhereIf(inQuery.CriterionTypeEnum != null, t => t.CriterionTypeList.Any(t => t == inQuery.CriterionTypeEnum))
|
||||
.WhereIf(inQuery.BusinessModuleEnum != null, t => t.BusinessModuleEnum == inQuery.BusinessModuleEnum)
|
||||
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
||||
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
.WhereIf(inQuery.EmailUrgentEnum != null, t => t.EmailUrgentEnum == inQuery.EmailUrgentEnum)
|
||||
.WhereIf(inQuery.ToUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.ToUserType && t.EmailUserType == EmailUserType.To))
|
||||
.WhereIf(inQuery.CopyUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.CopyUserType && t.EmailUserType == EmailUserType.Copy))
|
||||
.ProjectTo<EmailNoticeConfigView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await emailNoticeConfigQueryable.ToPagedListAsync(inQuery);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新邮件主题中英文
|
||||
/// </summary>
|
||||
|
||||
@@ -1,27 +1,16 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using ClosedXML.Excel;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infra.EFCore.Migrations;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using NPOI.HPSF;
|
||||
using NPOI.POIFS.Properties;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using static IRaCIS.Core.Application.Service.ExcelExportHelper;
|
||||
@@ -52,6 +41,191 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IWebHostEnvironment _hostEnvironment) : BaseService
|
||||
{
|
||||
|
||||
|
||||
#region 中心调研导出
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetTrialSiteSurveyList_Export(TrialSiteSurveyQueryDTO inQuery,
|
||||
[FromServices] IRepository<TrialSiteSurvey> _trialSiteSurveyRepository,
|
||||
[FromServices] IDictionaryService _dictionaryService)
|
||||
{
|
||||
var trialSiteSurveyQueryable = _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters()
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId)
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserKeyInfo), t => t.UserName.Contains(inQuery.UserKeyInfo) || t.Phone.Contains(inQuery.UserKeyInfo) || t.Email.Contains(inQuery.UserKeyInfo))
|
||||
.WhereIf(inQuery.State != null, t => t.State == inQuery.State)
|
||||
.WhereIf(inQuery.UpdateTimeBegin != null, t => t.UpdateTime >= inQuery.UpdateTimeBegin)
|
||||
.WhereIf(inQuery.UpdateTimeEnd != null, t => t.UpdateTime <= inQuery.UpdateTimeEnd)
|
||||
|
||||
.ProjectTo<TrialSiteSurveyView>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us })
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.PreliminaryUserName), t => t.PreliminaryUser.RealName.Contains(inQuery.PreliminaryUserName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ReviewerUserName), t => t.ReviewerUser.RealName.Contains(inQuery.ReviewerUserName))
|
||||
;
|
||||
|
||||
//var defalutSortArray = new string[] { /*nameof(TrialSiteSurveyView.LanguageType) + " desc", nameof(TrialSiteSurveyView.ShowOrder)*/ };
|
||||
|
||||
|
||||
var list = await trialSiteSurveyQueryable.SortToListAsync(inQuery /*,defalutSortArray*/);
|
||||
|
||||
var exportInfo = new ExcelExportInfo();
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteSurvey_BasicInfo_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialSiteSurveyView));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取中心设备信息
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetSiteSurveyEquipmentList_Export(SiteSurveyEquipmentQuery inQuery,
|
||||
[FromServices] IRepository<TrialSiteEquipmentSurvey> _trialSiteEquipmentSurveyRepository,
|
||||
[FromServices] IRepository<TrialSiteSurvey> _trialSiteSurveyRepository,
|
||||
[FromServices] IDictionaryService _dictionaryService)
|
||||
{
|
||||
|
||||
|
||||
//找到该中心最新的调研记录
|
||||
var groupSelectIdQuery =
|
||||
_trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId)
|
||||
.GroupBy(t => t.TrialSiteId)
|
||||
.Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First());
|
||||
|
||||
|
||||
var query = _trialSiteEquipmentSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == inQuery.TrialId)
|
||||
.IgnoreQueryFilters().Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId))
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.TrialSiteSurvey.IsDeleted == inQuery.IsDeleted)
|
||||
.WhereIf(inQuery.State != null, t => t.TrialSiteSurvey.State == inQuery.State)
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteSurvey.TrialSiteId == inQuery.TrialSiteId)
|
||||
.WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode))
|
||||
.WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) ||
|
||||
t.TrialSiteSurvey.TrialSite.TrialSiteName.Contains(inQuery.TrialSiteName))
|
||||
.ProjectTo<SiteSurveyEquipmentDto>(_mapper.ConfigurationProvider);
|
||||
|
||||
var siteSurveryConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
|
||||
|
||||
var config = JsonConvert.DeserializeObject<TrialExtraConfig>(siteSurveryConfig) ?? new TrialExtraConfig();
|
||||
|
||||
|
||||
var fields = new List<(string FieldName, int excelIndex)>()
|
||||
{
|
||||
|
||||
("Parameters", 9),
|
||||
("ManufacturerType", 10),
|
||||
("ScannerType", 11),
|
||||
("MagneticFieldStrengthType", 12),
|
||||
("BodyCoilChannelCount", 13),
|
||||
("HasDedicatedPdfFatQuantificationSequence", 14),
|
||||
("PdfFatQuantificationSequenceType", 15),
|
||||
//("OtherSequenceSpecification", 15),
|
||||
("HasT2R2Correction", 16),
|
||||
("CanFullyExportPdfParameterMapsAndRawDicom", 17),
|
||||
("Note", 18),
|
||||
};
|
||||
|
||||
|
||||
var viewNameList = config.EquipmentControlFieldList.Where(t => t.IsView == true).Select(t => t.FiledName).ToList();
|
||||
|
||||
var columnsToDelete = fields.Where(f => !viewNameList.Any(t => f.FieldName == t)).Select(f => f.excelIndex).Distinct().OrderByDescending(i => i).ToList();
|
||||
|
||||
|
||||
//var defalutSortArray = new string[] { /*nameof(TrialSiteSurveyView.LanguageType) + " desc", nameof(TrialSiteSurveyView.ShowOrder)*/ };
|
||||
|
||||
|
||||
var list = await query.SortToListAsync(inQuery /*,defalutSortArray*/);
|
||||
|
||||
var exportInfo = new ExcelExportInfo();
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteSurvey_Equipment_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SiteSurveyEquipmentDto), removeExcelIndexList: columnsToDelete);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 调研表基本信息
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetSiteSurveyInfoList_Export(SiteSurveyInfoQuery inQuery,
|
||||
[FromServices] IRepository<TrialSiteSurvey> _trialSiteSurveyRepository,
|
||||
[FromServices] IDictionaryService _dictionaryService)
|
||||
{
|
||||
|
||||
//找到该中心最新的调研记录
|
||||
var groupSelectIdQuery =
|
||||
_trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId)
|
||||
.GroupBy(t => t.TrialSiteId)
|
||||
.Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First());
|
||||
|
||||
var query = _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters()
|
||||
.Where(t => groupSelectIdQuery.Contains(t.Id))
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted)
|
||||
.WhereIf(inQuery.State != null, t => t.State == inQuery.State)
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId)
|
||||
.WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode))
|
||||
.WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) ||
|
||||
t.TrialSite.TrialSiteName.Contains(inQuery.TrialSiteName))
|
||||
|
||||
.ProjectTo<TrialSiteSurveyView>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
var siteSurveryConfig = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
|
||||
|
||||
var config = JsonConvert.DeserializeObject<TrialExtraConfig>(siteSurveryConfig) ?? new TrialExtraConfig();
|
||||
|
||||
|
||||
var fields = new List<(string FieldName, int excelIndex)>()
|
||||
{
|
||||
|
||||
("AverageEngravingCycle", 8),
|
||||
("IsRoutineMRIPDEE", 9),
|
||||
("MRIPDFFScanTime", 10),
|
||||
("MRIPDFFLeadTime", 11),
|
||||
("MRIPDFFOther", 12),
|
||||
("IsAuthorizeRadiologistsParticipate", 13),
|
||||
("AssignFixedTechnologists", 14),
|
||||
("IsConfirmImagingTechnologist", 15),
|
||||
("NotConfirmReson", 16),
|
||||
("EfficacyEvaluatorType", 17),
|
||||
|
||||
("IsFollowStudyParameters", 18),
|
||||
("NotFollowReson", 19),
|
||||
("ISStrictManualBurnFlag", 20),
|
||||
("NotStrictManualBurnFlagReason",21)
|
||||
};
|
||||
|
||||
|
||||
//var viewNameList = config.NotShowFieldList;
|
||||
|
||||
var columnsToDelete = fields.Where(f => config.NotShowFieldList.Any(t => f.FieldName == t)).Select(f => f.excelIndex).Distinct().OrderByDescending(i => i).ToList();
|
||||
|
||||
|
||||
//var defalutSortArray = new string[] { /*nameof(TrialSiteSurveyView.LanguageType) + " desc", nameof(TrialSiteSurveyView.ShowOrder)*/ };
|
||||
|
||||
|
||||
var list = await query.SortToListAsync(inQuery /*,defalutSortArray*/);
|
||||
|
||||
var exportInfo = new ExcelExportInfo();
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteSurvey_Info_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialSiteSurveyView), removeExcelIndexList: columnsToDelete);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 质控问题答案导出
|
||||
/// </summary>
|
||||
@@ -153,9 +327,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
|
||||
var dynamicColumnConfig = new DynamicColumnConfig()
|
||||
{
|
||||
AutoColumnTitleRowIndex = 2,
|
||||
AutoColumnStartIndex = 7,
|
||||
TempalteLastColumnIndex = 6,
|
||||
AutoColumnTitleRowIndex = 3, //2
|
||||
AutoColumnStartIndex = 8, //7
|
||||
TempalteLastColumnIndex = 7, //6
|
||||
DynamicItemDicName = "TranslateDicName",
|
||||
DynamicItemValueName = "Answer",
|
||||
DynamicItemTitleName = "QuestionName",
|
||||
@@ -167,7 +341,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
};
|
||||
|
||||
|
||||
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(StaticData.Export.TrialQCResult_Export, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(QCQuestionResult_Export), dynamicColumnConfig: dynamicColumnConfig);
|
||||
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_ClosedXMLAsync(StaticData.Export.TrialQCResult_Export, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(QCQuestionResult_Export), dynamicColumnConfig: dynamicColumnConfig);
|
||||
|
||||
return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||
{
|
||||
@@ -1209,7 +1383,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
t.VisitTaskList.Where(t => t.TaskState == TaskState.Effect && t.TrialReadingCriterionId == dto.TrialReadingCriterionId && t.TaskAllocationState == TaskAllocationState.Allocated && t.IsAnalysisCreate == false && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() == (int)trialReadingCriterion.ReadingType ?
|
||||
ReadingStatusEnum.ReadCompleted : t.VisitTaskList.Where(t => t.TaskState == TaskState.Effect && t.TrialReadingCriterionId == dto.TrialReadingCriterionId && t.IsAnalysisCreate == false && t.ReadingCategory == ReadingCategory.Visit && t.TaskAllocationState == TaskAllocationState.Allocated).Count() == (int)trialReadingCriterion.ReadingType ? ReadingStatusEnum.ImageReading :
|
||||
t.ReadingStatus
|
||||
}).ToList(),
|
||||
}).OrderBy(t => t.VisitTaskNum).ToList(),
|
||||
|
||||
ModuleList = subject.ReadModuleList.Where(t => t.TrialReadingCriterionId == dto.TrialReadingCriterionId).Select(t => new SubjectProgressDto.MouduleProgress()
|
||||
{
|
||||
@@ -1239,55 +1413,60 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
|
||||
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(StaticData.Export.TrialSubjectProgressList_Export, exportInfo, /*"", */_commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SubjectProgressDto));
|
||||
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_ClosedXMLAsync(StaticData.Export.TrialSubjectProgressList_Export, exportInfo, /*"", */_commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SubjectProgressDto));
|
||||
|
||||
|
||||
// 使用NPOI 进行二次处理
|
||||
|
||||
var wb = new XSSFWorkbook(memoryStream);
|
||||
|
||||
var sheet = wb.GetSheetAt(0);
|
||||
// 使用 ClosedXML 进行二次处理
|
||||
using var workbook = new XLWorkbook(memoryStream);
|
||||
var worksheet = workbook.Worksheet(1); // 获取第一个工作表,索引从1开始
|
||||
|
||||
foreach (var subject in list)
|
||||
{
|
||||
var index = list.IndexOf(subject);
|
||||
var row = sheet.GetRow(index + 4);
|
||||
|
||||
// ClosedXML 行索引从1开始,原来 NPOI 从0开始,所以 +1
|
||||
var row = worksheet.Row(index + 4 + 1); // NPOI: index + 4, ClosedXML: +1 = index + 5
|
||||
|
||||
|
||||
foreach (var item in subject.TotalList)
|
||||
{
|
||||
//从第五列开始动态写
|
||||
var visitIndex = subject.TotalList.IndexOf(item) + 4;
|
||||
// 从第五列开始动态写(ClosedXML 列索引从1开始)
|
||||
var visitIndex = subject.TotalList.IndexOf(item) + 4 + 1; // NPOI: +4, ClosedXML: +1 = +5
|
||||
|
||||
var cell = row.CreateCell(visitIndex);
|
||||
var cell = row.Cell(visitIndex);
|
||||
|
||||
if (item.IsLostVisit == true)
|
||||
{
|
||||
cell.CellStyle = sheet.GetRow(1).GetCell(7).CellStyle;
|
||||
//cell.CellStyle = sheet.GetRow(1).GetCell(7).CellStyle;
|
||||
|
||||
// 复制样式 - ClosedXML 需要先获取源样式,然后应用到目标单元格
|
||||
var sourceCell = worksheet.Row(2).Cell(8); // 原 NPOI: GetRow(1).GetCell(7) -> +1 转换
|
||||
|
||||
cell.Style = sourceCell.Style;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (item.ReadingStatus)
|
||||
{
|
||||
case ReadingStatusEnum.ImageNotSubmit:
|
||||
|
||||
cell.CellStyle = sheet.GetRow(1).GetCell(1).CellStyle;
|
||||
cell.Style = worksheet.Row(2).Cell(2).Style; // NPOI: (1,1) -> ClosedXML: (2,2)
|
||||
|
||||
break;
|
||||
case ReadingStatusEnum.ImageQuality:
|
||||
cell.CellStyle = sheet.GetRow(1).GetCell(2).CellStyle;
|
||||
cell.Style = worksheet.Row(2).Cell(3).Style; // (1,2) -> (2,3)
|
||||
break;
|
||||
case ReadingStatusEnum.ConsistencyCheck:
|
||||
cell.CellStyle = sheet.GetRow(1).GetCell(3).CellStyle;
|
||||
cell.Style = worksheet.Row(2).Cell(4).Style; // (1,3) -> (2,4)
|
||||
break;
|
||||
case ReadingStatusEnum.TaskAllocate:
|
||||
cell.CellStyle = sheet.GetRow(1).GetCell(4).CellStyle;
|
||||
cell.Style = worksheet.Row(2).Cell(5).Style;// (1,4) -> (2,5)
|
||||
break;
|
||||
case ReadingStatusEnum.ImageReading:
|
||||
cell.CellStyle = sheet.GetRow(1).GetCell(5).CellStyle;
|
||||
cell.Style = worksheet.Row(2).Cell(6).Style;// (1,5) -> (2,6)
|
||||
break;
|
||||
case ReadingStatusEnum.ReadCompleted:
|
||||
cell.CellStyle = sheet.GetRow(1).GetCell(6).CellStyle;
|
||||
cell.Style = worksheet.Row(2).Cell(7).Style; // (1,6) -> (2,7)
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1297,12 +1476,13 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
|
||||
|
||||
|
||||
cell.SetCellValue(item.TaskName);
|
||||
cell.SetValue(item.TaskName);
|
||||
}
|
||||
}
|
||||
|
||||
// 保存到 MemoryStream
|
||||
var memoryStream2 = new MemoryStream();
|
||||
wb.Write(memoryStream2, true);
|
||||
workbook.SaveAs(memoryStream2);
|
||||
memoryStream2.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
return new FileStreamResult(memoryStream2, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||
@@ -2709,9 +2889,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
var dynamicColumnConfig = new DynamicColumnConfig()
|
||||
{
|
||||
//可读的列表名行索引,不是{{}} 模板行索引
|
||||
AutoColumnTitleRowIndex = 2,
|
||||
AutoColumnStartIndex = 5,
|
||||
TempalteLastColumnIndex = 4,
|
||||
AutoColumnTitleRowIndex = 3, //2
|
||||
AutoColumnStartIndex = 6, //5
|
||||
TempalteLastColumnIndex = 5, //4
|
||||
|
||||
DynamicItemDicName = "TranslateDicName",
|
||||
DynamicItemValueName = "QuestionValue",
|
||||
DynamicItemTitleName = "QuestionName",
|
||||
@@ -2722,7 +2903,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
};
|
||||
|
||||
|
||||
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(AnalysisDynamicCommonExport), criterion.CriterionType, dynamicColumnConfig);
|
||||
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_ClosedXMLAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(AnalysisDynamicCommonExport), criterion.CriterionType, dynamicColumnConfig);
|
||||
|
||||
return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||
{
|
||||
@@ -2768,11 +2949,11 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
if (criterion.CriterionType == CriterionType.OCT)
|
||||
{
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.OCT_ReadingLession_Export, ExportCatogory = ExportResult.OCT_ReadingLession_Export });
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.OCT_CDISC_Export, ExportCatogory = ExportResult.OCT_CDISC_Export });
|
||||
//list.Add(new ExportDocumentDes() { Code = StaticData.Export.OCT_CDISC_Export, ExportCatogory = ExportResult.OCT_CDISC_Export });
|
||||
}
|
||||
if (criterion.CriterionType == CriterionType.IVUS)
|
||||
{
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.IVUS_CDISC_Export, ExportCatogory = ExportResult.IVUS_CDISC_Export });
|
||||
//list.Add(new ExportDocumentDes() { Code = StaticData.Export.IVUS_CDISC_Export, ExportCatogory = ExportResult.IVUS_CDISC_Export });
|
||||
}
|
||||
if (criterion.CriterionGroup != CriterionGroup.Tumor /*&& criterion.CriterionType != CriterionType.OCT && criterion.CriterionType != CriterionType.IVUS*/)
|
||||
{
|
||||
@@ -2867,7 +3048,8 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
if (!criterion.IsArbitrationReading)
|
||||
{
|
||||
//仲裁阅片 才有裁判阅片明细表 同时要把模板里面的三列给去掉
|
||||
removeColumnIndexList = new List<int>() { 6, 7, 8 };
|
||||
//removeColumnIndexList = new List<int>() { 6, 7, 8 };
|
||||
removeColumnIndexList = new List<int>() { 7, 8, 9 };
|
||||
}
|
||||
|
||||
//阅片结果表 和阅片结果明细表 没有肿瘤学的时候需要移除肿瘤学三个字段
|
||||
@@ -2876,7 +3058,8 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
{
|
||||
if (inQuery.ReadingExportType == ExportResult.TableOfAssessmentResults || inQuery.ReadingExportType == ExportResult.DetailedTableOfAssessmentResults)
|
||||
{
|
||||
removeColumnIndexList = removeColumnIndexList.Union(new List<int>() { 9, 10, 11 }).ToList();
|
||||
//removeColumnIndexList = removeColumnIndexList.Union(new List<int>() { 9, 10, 11 }).ToList();
|
||||
removeColumnIndexList = removeColumnIndexList.Union(new List<int>() { 10, 11, 12 }).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2903,7 +3086,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
//阅片结果表
|
||||
export_Template = StaticData.Export.CommonReading_Export;
|
||||
}
|
||||
//斑块表
|
||||
//斑块表
|
||||
else if (inQuery.ReadingExportType == ExportResult.OCT_ReadingLession_Export)
|
||||
{
|
||||
//OCT
|
||||
@@ -2933,7 +3116,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
arbitrationRule = criterion.ArbitrationRule,
|
||||
trialReadingCriterionId = inQuery.TrialReadingCriterionId,
|
||||
isEn_Us = _userInfo.IsEn_Us
|
||||
}).ToListAsync();
|
||||
}).AsSplitQuery().ToListAsync();
|
||||
|
||||
}
|
||||
//肿瘤标准 病灶明细表 按照病灶级别 (OCT 暂时不删除,先看是否能覆盖)
|
||||
@@ -2952,7 +3135,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
arbitrationRule = criterion.ArbitrationRule,
|
||||
trialReadingCriterionId = inQuery.TrialReadingCriterionId,
|
||||
isEn_Us = _userInfo.IsEn_Us
|
||||
}).ToListAsync();
|
||||
}).AsSplitQuery().ToListAsync();
|
||||
|
||||
}
|
||||
// 非肿瘤标准 包括自定义,以及系统非肿瘤 会配置到表格层级 问题名称是 表格名称_表格子问题名
|
||||
@@ -2970,7 +3153,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
arbitrationRule = criterion.ArbitrationRule,
|
||||
trialReadingCriterionId = inQuery.TrialReadingCriterionId,
|
||||
isEn_Us = _userInfo.IsEn_Us
|
||||
}).ToListAsync();
|
||||
}).AsSplitQuery().ToListAsync();
|
||||
|
||||
}
|
||||
// CDISC 导出 只管到 外层问题层级 和阅片结果表是保持一致
|
||||
@@ -2988,7 +3171,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
arbitrationRule = criterion.ArbitrationRule,
|
||||
trialReadingCriterionId = inQuery.TrialReadingCriterionId,
|
||||
isEn_Us = _userInfo.IsEn_Us
|
||||
}).ToListAsync();
|
||||
}).AsSplitQuery().ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3000,7 +3183,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
arbitrationRule = criterion.ArbitrationRule,
|
||||
trialReadingCriterionId = inQuery.TrialReadingCriterionId,
|
||||
isEn_Us = _userInfo.IsEn_Us
|
||||
}).ToListAsync();
|
||||
}).AsSplitQuery().ToListAsync();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3170,7 +3353,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型", QuestionValue = lession.LessionType, TranslateDicName = "LesionType" });
|
||||
}
|
||||
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.QuestionName, OptionTypeEnum = t.OptionTypeEnum, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName ,Unit=t.Unit});
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.QuestionName, OptionTypeEnum = t.OptionTypeEnum, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, Unit = t.Unit });
|
||||
|
||||
//有三部分组成 外层问题+ 没有配置病灶编号和类型+ 动态的表格问题
|
||||
var dynamicLessionInfoList = item.QuestionAnswerList.Union(addLessionInfoList).Union(dynamicPartialLessionInfoList).ToList();
|
||||
@@ -3358,9 +3541,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
|
||||
dynamicColumnConfig = new DynamicColumnConfig()
|
||||
{
|
||||
AutoColumnTitleRowIndex = 2,
|
||||
AutoColumnStartIndex = 6,
|
||||
TempalteLastColumnIndex = 11,
|
||||
|
||||
AutoColumnTitleRowIndex = 3, //2
|
||||
AutoColumnStartIndex = 7, //6
|
||||
TempalteLastColumnIndex = 12,//11
|
||||
DynamicItemDicName = "TranslateDicName",
|
||||
DynamicItemValueName = "QuestionValue",
|
||||
DynamicItemTitleName = "QuestionName",
|
||||
@@ -3372,7 +3556,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
TranslateDicNameList = translateDicNameList
|
||||
};
|
||||
|
||||
if (export_Template == StaticData.Export.ReadingLession_Export || export_Template == StaticData.Export.CommonJudgeReadingDetail_Export || export_Template== StaticData.Export.OCT_ReadingLession_Export)
|
||||
if (export_Template == StaticData.Export.ReadingLession_Export || export_Template == StaticData.Export.CommonJudgeReadingDetail_Export || export_Template == StaticData.Export.OCT_ReadingLession_Export)
|
||||
{
|
||||
dynamicColumnConfig.TempalteLastColumnIndex = 8;
|
||||
}
|
||||
@@ -3391,7 +3575,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
var trialConfigTableQuestionList = _trialReadingTableQuestionRepository.Where(t => t.TrialId == trialId && t.TrialCriterionId == trialReadingCriterionId).Where(t => t.ExportResultStr.Contains(((int)inQuery.ReadingExportType).ToString()))
|
||||
.Select(t => new ExportQuestionBasicInfo()
|
||||
{
|
||||
QuestionId = t.Id,
|
||||
QuestionId = t.Id,
|
||||
TableName = _userInfo.IsEn_Us ? t.ReadingQuestionTrial.QuestionEnName : t.ReadingQuestionTrial.QuestionName,
|
||||
QuestionName = _userInfo.IsEn_Us ? t.QuestionEnName : t.QuestionName,
|
||||
CDISCCode = t.CDISCCode,
|
||||
@@ -3435,7 +3619,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
var dynamicLessionInfoList = new List<CommonQuesionInfo>();
|
||||
|
||||
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionId = t.TableQuesionId,OptionTypeEnum=t.OptionTypeEnum, QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode, Unit = t.Unit });
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionId = t.TableQuesionId, OptionTypeEnum = t.OptionTypeEnum, QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode, Unit = t.Unit });
|
||||
|
||||
//两部分组成 外层问题+ 动态的表格问题
|
||||
dynamicLessionInfoList = item.QuestionAnswerList.Union(dynamicPartialLessionInfoList).ToList();
|
||||
@@ -3458,9 +3642,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
|
||||
dynamicColumnConfig = new DynamicColumnConfig()
|
||||
{
|
||||
AutoColumnTitleRowIndex = 1,
|
||||
AutoColumnStartIndex = 6,
|
||||
TempalteLastColumnIndex = 10,
|
||||
AutoColumnTitleRowIndex = 2, //1
|
||||
AutoColumnStartIndex = 7, //6
|
||||
TempalteLastColumnIndex = 11, //10
|
||||
DynamicItemDicName = "TranslateDicName",
|
||||
DynamicItemValueName = "QuestionValue",
|
||||
DynamicItemTitleName = "QuestionName",
|
||||
@@ -3543,9 +3727,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
|
||||
dynamicColumnConfig = new DynamicColumnConfig()
|
||||
{
|
||||
AutoColumnTitleRowIndex = 1,
|
||||
AutoColumnStartIndex = 6,
|
||||
TempalteLastColumnIndex = 15,
|
||||
AutoColumnTitleRowIndex = 2, //1
|
||||
AutoColumnStartIndex = 7, //6
|
||||
TempalteLastColumnIndex = 16, //15
|
||||
DynamicItemDicName = "TranslateDicName",
|
||||
DynamicItemValueName = "QuestionValue",
|
||||
DynamicItemTitleName = "QuestionName",
|
||||
@@ -3578,9 +3762,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
|
||||
dynamicColumnConfig = new DynamicColumnConfig()
|
||||
{
|
||||
AutoColumnTitleRowIndex = 1,
|
||||
AutoColumnStartIndex = 6,
|
||||
TempalteLastColumnIndex = 10,
|
||||
AutoColumnTitleRowIndex = 2, //1
|
||||
AutoColumnStartIndex = 7, //6
|
||||
TempalteLastColumnIndex = 11, //10
|
||||
DynamicItemDicName = "TranslateDicName",
|
||||
DynamicItemValueName = "QuestionValue",
|
||||
DynamicItemTitleName = "QuestionName",
|
||||
@@ -3650,12 +3834,12 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
|
||||
if (inQuery.ReadingExportType == ExportResult.NoneTumorCDISC)
|
||||
{
|
||||
(memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig);
|
||||
(memoryStream, fileName) = await ExcelExportHelper.DataExport_ClosedXMLAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
(memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig);
|
||||
(memoryStream, fileName) = await ExcelExportHelper.DataExport_ClosedXMLAsync(export_Template, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MiniExcelLibs;
|
||||
using MiniExcelLibs.OpenXml;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Org.BouncyCastle.Asn1.X509;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Common;
|
||||
|
||||
|
||||
@@ -1,32 +1,9 @@
|
||||
using Amazon.Runtime.Internal.Transform;
|
||||
using DocumentFormat.OpenXml.Bibliography;
|
||||
using DocumentFormat.OpenXml.Office2010.CustomUI;
|
||||
using DocumentFormat.OpenXml.Office2021.DocumentTasks;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MailKit;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using NetTopologySuite.Triangulate.Tri;
|
||||
using NPOI.OpenXmlFormats.Spreadsheet;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using NPOI.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static IRaCIS.Core.Application.Service.ExcelExportHelper;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Common;
|
||||
|
||||
|
||||
@@ -24,11 +24,26 @@ namespace IRaCIS.Core.Application.Service;
|
||||
[ApiExplorerSettings(GroupName = "Common")]
|
||||
public class FileUploadRecordService(IRepository<FileUploadRecord> _fileUploadRecordRepository, IRepository<UploadFileSyncRecord> _uploadFileSyncRecordRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IOptionsMonitor<ObjectStoreServiceOptions> options,
|
||||
IRepository<CommonUploadRecord> _commonUploadRecordRepository,
|
||||
IFusionCache _fusionCache, IRepository<Trial> _trialRepository, FileSyncQueue _fileSyncQueue) : BaseService, IFileUploadRecordService
|
||||
{
|
||||
|
||||
ObjectStoreServiceOptions ObjectStoreServiceConfig = options.CurrentValue;
|
||||
|
||||
/// <summary>
|
||||
/// 上传通用文件记录
|
||||
/// </summary>
|
||||
/// <param name="addOrEditCommonUploadRecord"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> AddOrUpdateCommonUploadRecord(CommonUploadRecordAddOrEdit addOrEditCommonUploadRecord)
|
||||
{
|
||||
|
||||
var entity = await _commonUploadRecordRepository.InsertOrUpdateAsync(addOrEditCommonUploadRecord, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -222,7 +237,7 @@ public class FileUploadRecordService(IRepository<FileUploadRecord> _fileUploadRe
|
||||
{
|
||||
addOrEditFileUploadRecord.IsNeedSync = true;
|
||||
|
||||
addOrEditFileUploadRecord.Priority = addOrEditFileUploadRecord.Priority?? 0;
|
||||
addOrEditFileUploadRecord.Priority = addOrEditFileUploadRecord.Priority ?? 0;
|
||||
|
||||
addOrEditFileUploadRecord.IsSync = false;
|
||||
}
|
||||
|
||||
@@ -11,5 +11,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
Task<IResponseOutput> AddOrUpdateEmailNoticeConfig(EmailNoticeConfigAddOrEdit addOrEditEmailNoticeConfig);
|
||||
Task<IResponseOutput> DeleteEmailNoticeConfig(Guid emailNoticeConfigId);
|
||||
Task<PageOutput<EmailNoticeConfigView>> GetEmailNoticeConfigList(EmailNoticeConfigQuery queryEmailNoticeConfig);
|
||||
Task<IResponseOutput> ManualSendEmail(ManualSendEmailCommand inDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,44 +1,22 @@
|
||||
using Aliyun.OSS;
|
||||
using CommunityToolkit.HighPerformance;
|
||||
using DocumentFormat.OpenXml.EMMA;
|
||||
using DocumentFormat.OpenXml.Office.CustomUI;
|
||||
using DocumentFormat.OpenXml.Office2010.Excel;
|
||||
using DocumentFormat.OpenXml.Office2013.Drawing.ChartStyle;
|
||||
using FellowOakDicom;
|
||||
using FellowOakDicom.Imaging;
|
||||
using FellowOakDicom.Imaging.Render;
|
||||
using FellowOakDicom.IO.Buffer;
|
||||
using Hangfire.Common;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.MassTransit.Command;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Medallion.Threading;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MiniExcelLibs;
|
||||
using NPOI.Util;
|
||||
using Org.BouncyCastle.Utilities.Zlib;
|
||||
using SharpCompress.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using static IRaCIS.Core.Application.Service.TestService;
|
||||
using static IRaCIS.Core.Application.Service.TrialImageDownloadService;
|
||||
using static IRaCIS.Core.Domain.Share.StaticData;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
@@ -52,7 +30,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
public class TrialImageDownloadService(IRepository<Trial> _trialRepository, IRepository<SubjectVisit> _subjectVisitRepository, IOSSService _oSSService, IWebHostEnvironment _hostEnvironment,
|
||||
IRepository<DicomStudy> _studyRepository,
|
||||
IRepository<DicomSeries> _seriesRepository,
|
||||
IRepository<DicomInstance> _instanceRepository) : BaseService
|
||||
IRepository<DicomInstance> _instanceRepository,
|
||||
IRepository<TaskInstance> _taskInstanceRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository
|
||||
) : BaseService
|
||||
{
|
||||
|
||||
|
||||
@@ -63,7 +44,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
try
|
||||
{
|
||||
|
||||
#region 方式一 有的必须在内存中,不能用这种
|
||||
#region 方式一 有的多帧必须在内存中,不能用这种
|
||||
//await using var source = await sourceFactory();
|
||||
//// 如果你是从 stream 打开
|
||||
//var dicomFile = await DicomFile.OpenAsync(source);
|
||||
@@ -242,6 +223,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
var skipCount = 0;
|
||||
foreach (var downloadVisit in downloadVisits)
|
||||
{
|
||||
visitIndex++;
|
||||
var downloadInfo = _trialRepository.Where(t => t.Id == trialId).Select(t => new
|
||||
{
|
||||
t.ResearchProgramNo,
|
||||
@@ -347,7 +329,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
var dirDic = new Dictionary<string, string>();
|
||||
|
||||
var studyFolderName = $"{studyInfo.StudyCode}_{studyInfo.StudyTime:yyyy-MM-dd}_{string.Join('_', studyInfo.SeriesList.Select(t => t.Modality))}";
|
||||
var studyFolderName = $"{studyInfo.StudyCode}_{studyInfo.StudyTime:yyyy-MM-dd}_{string.Join('_', studyInfo.SeriesList.Select(t => t.Modality).Distinct())}";
|
||||
|
||||
#region DICOMDIR
|
||||
|
||||
@@ -467,7 +449,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var zipPath = Path.Combine(trialFolderPath, visitFolderName + ".zip");
|
||||
|
||||
Log.Logger.Warning($"[{visitIndex}] {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}开始打包下载访视:{visitFolderName}");
|
||||
Log.Logger.Warning($"[{visitIndex}] {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} 开始打包下载访视:{visitFolderName}");
|
||||
|
||||
try
|
||||
{
|
||||
@@ -475,14 +457,14 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
//Log.Logger.Warning($"zip exists={File.Exists(zipPath)} size={new FileInfo(zipPath).Length}");
|
||||
|
||||
Log.Logger.Warning($"[{visitIndex}] {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}访视打包下载完成:{visitFolderName}");
|
||||
Log.Logger.Warning($"[{visitIndex}] {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} 下载完成:{visitFolderName}");
|
||||
|
||||
DownloadLogger.Write(logFilePath, visitItem.SubjectCode, visitItem.VisitNum, visitItem.VisitName, "Success");
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Logger.Warning($"出现异常{ex}删除压缩包:{visitFolderName}");
|
||||
Log.Logger.Warning($"出现异常{ex}自动删除压缩包:{visitFolderName}");
|
||||
//如果有异常,删除失败的压缩包
|
||||
if (File.Exists(zipPath))
|
||||
{
|
||||
@@ -512,6 +494,325 @@ namespace IRaCIS.Core.Application.Service
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public async Task<IResponseOutput> DownloadExcelTrialTaskImageZIPStream(Guid trialId)
|
||||
{
|
||||
var trialInfo = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.ResearchProgramNo }).FirstOrDefault();
|
||||
|
||||
#region 设置目录
|
||||
|
||||
var rootFolder = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
||||
Directory.CreateDirectory(rootFolder);
|
||||
|
||||
// 获取无效字符(系统定义的)
|
||||
string invalidChars = new string(Path.GetInvalidFileNameChars()) + new string(Path.GetInvalidPathChars());
|
||||
|
||||
// 用正则表达式替换所有非法字符为下划线或空字符
|
||||
string pattern = $"[{Regex.Escape(invalidChars)}]";
|
||||
|
||||
var regexNo = Regex.Replace(trialInfo.ResearchProgramNo, pattern, "_");
|
||||
|
||||
// 创建一个临时文件夹来存放文件
|
||||
string trialFolderPath = Path.Combine(rootFolder, $"{regexNo}");//_{NewId.NextGuid()}
|
||||
Directory.CreateDirectory(trialFolderPath);
|
||||
|
||||
#endregion
|
||||
|
||||
var oldVisits = MiniExcel.Query<SubjectTaskExcel>(Path.Combine(rootFolder, "Old.xlsx")).ToList();
|
||||
|
||||
var downloadTasks = MiniExcel.Query<SubjectTaskExcel>(Path.Combine(rootFolder, "download.xlsx")).ToList().Where(t => t.SubjectCode.IsNotNullOrEmpty() && t.TaskName.IsNotNullOrEmpty() && t.TaskBlindName.IsNotNullOrEmpty()).ToList();
|
||||
|
||||
downloadTasks = downloadTasks.Where(t => !oldVisits.Any(old => old.SubjectCode == t.SubjectCode && old.TaskBlindName == t.TaskBlindName && old.TaskName.Trim().ToLower() == t.TaskName.Trim().ToLower())).ToList();
|
||||
|
||||
var visitIndex = 0;
|
||||
var skipCount = 0;
|
||||
foreach (var downloadTask in downloadTasks)
|
||||
{
|
||||
visitIndex++;
|
||||
var downloadInfo = _trialRepository.Where(t => t.Id == trialId).Select(t => new
|
||||
{
|
||||
t.ResearchProgramNo,
|
||||
t.TrialCode,
|
||||
|
||||
TaskList = t.VisitTaskList.Where(t => t.TaskState == TaskState.Effect && t.DoctorUser.UserName == downloadTask.UserName
|
||||
&& t.IsAnalysisCreate == false)
|
||||
.Where(t => t.TaskName.Trim() == downloadTask.TaskName.Trim()
|
||||
&& t.Subject.Code.Trim() == downloadTask.SubjectCode.Trim()
|
||||
&& t.TaskBlindName.Trim() == downloadTask.TaskBlindName.Trim()
|
||||
)
|
||||
.Select(vt => new
|
||||
{
|
||||
VisitTaskId = vt.Id,
|
||||
TrialSiteCode = vt.SourceSubjectVisit.TrialSite.TrialSiteCode,
|
||||
SubjectCode = vt.Subject.Code,
|
||||
UserName = vt.DoctorUser.UserName,
|
||||
vt.TaskName,
|
||||
vt.TaskBlindName,
|
||||
VisitName = vt.SourceSubjectVisit.VisitName,
|
||||
VisitNum = vt.SourceSubjectVisit.VisitNum,
|
||||
StudyList = vt.TaskStudyList.Select(u => new
|
||||
{
|
||||
StudyId = u.Id,
|
||||
u.PatientId,
|
||||
u.StudyTime,
|
||||
u.StudyCode,
|
||||
u.StudyInstanceUid,
|
||||
u.StudyDIRPath,
|
||||
|
||||
SeriesList = u.SeriesList.Select(z => new
|
||||
{
|
||||
z.Modality,
|
||||
|
||||
InstancePathList = z.InstanceList.Select(k => new
|
||||
{
|
||||
InstanceId = k.Id,
|
||||
k.Path,
|
||||
k.IsEncapsulated,
|
||||
k.NumberOfFrames,
|
||||
}).ToList()
|
||||
})
|
||||
|
||||
}).ToList(),
|
||||
|
||||
NoneDicomStudyList = vt.SourceSubjectVisit.NoneDicomStudyList.Where(t => t.IsReading && t.Modality != "OCT").Select(nd => new
|
||||
{
|
||||
nd.Modality,
|
||||
nd.StudyCode,
|
||||
nd.ImageDate,
|
||||
|
||||
FileList = nd.TaskNoneDicomFileList.Where(t => t.IsReading && t.VisitTaskId == vt.Id).Select(file => new
|
||||
{
|
||||
file.FileName,
|
||||
file.Path,
|
||||
file.FileType
|
||||
}).ToList()
|
||||
}).ToList()
|
||||
}).OrderBy(t => t.SubjectCode).ThenBy(t => t.VisitNum).ToList()
|
||||
|
||||
}).FirstOrDefault();
|
||||
|
||||
if (downloadInfo == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
#region 排除已经下载的
|
||||
|
||||
var logFilePath = Path.Combine(rootFolder, $"{trialId}_{regexNo}_download_log.csv");
|
||||
|
||||
if (File.Exists(logFilePath))
|
||||
{
|
||||
var existVisits = MiniExcel.Query<SubjectTaskExcel>(logFilePath, configuration: new MiniExcelLibs.Csv.CsvConfiguration()
|
||||
{
|
||||
StreamReaderFunc = (stream) => new StreamReader(stream, Encoding.GetEncoding("gb2312"))
|
||||
}).ToList();
|
||||
|
||||
if (existVisits.Any(old => old.TaskName == downloadTask.TaskName
|
||||
&& old.SubjectCode == downloadTask.SubjectCode
|
||||
&& old.TaskBlindName.Trim().ToLower() == downloadTask.TaskBlindName.Trim().ToLower()
|
||||
&& old.UserName.Trim().ToLower() == downloadTask.UserName.Trim().ToLower()
|
||||
))
|
||||
{
|
||||
Log.Logger.Warning($"[{visitIndex}] Excel显示已下载,跳过当前:{downloadTask.SubjectCode} {downloadTask.TaskName} {downloadTask.TaskBlindName} {downloadTask.UserName}");
|
||||
skipCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
foreach (var taskItem in downloadInfo.TaskList)
|
||||
{
|
||||
if (taskItem.StudyList.Count() == 0 && taskItem.NoneDicomStudyList.SelectMany(t=>t.FileList).Count() == 0)
|
||||
{
|
||||
Log.Logger.Warning($"[{visitIndex}]查询无检查,跳过当前访视:{downloadTask.SubjectCode} {downloadTask.TaskName} {downloadTask.TaskBlindName} {downloadTask.UserName}");
|
||||
skipCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
#region 导出访视
|
||||
|
||||
var zipItems = new List<ZipItem>();
|
||||
|
||||
var visitFolderName = $"{taskItem.SubjectCode}_{taskItem.TaskBlindName.Trim()}";
|
||||
|
||||
#region DICOM
|
||||
|
||||
foreach (var studyInfo in taskItem.StudyList)
|
||||
{
|
||||
var dirDic = new Dictionary<string, string>();
|
||||
|
||||
var studyFolderName = $"{studyInfo.StudyCode}_{studyInfo.StudyTime:yyyy-MM-dd}_{string.Join('_', studyInfo.SeriesList.Select(t => t.Modality).Distinct())}";
|
||||
|
||||
#region DICOMDIR
|
||||
|
||||
|
||||
if (!_taskInstanceRepository.Where(t => taskItem.VisitTaskId == t.VisitTaskId).Any(c => c.TransferSytaxUID == string.Empty))
|
||||
{
|
||||
var list = _visitTaskRepository.Where(t => t.Id == taskItem.VisitTaskId).SelectMany(t => t.TaskStudyList)
|
||||
.SelectMany(t => t.InstanceList.Where(t => t.StudyId == studyInfo.StudyId))
|
||||
.Select(t => new StudyDIRInfo()
|
||||
{
|
||||
|
||||
DicomStudyId = t.TaskStudy.Id,
|
||||
|
||||
PatientId = downloadInfo.TrialCode + "-" + t.TaskStudy.Subject.Code,
|
||||
PatientName = t.TaskStudy.PatientName,
|
||||
PatientBirthDate = t.TaskStudy.PatientBirthDate,
|
||||
PatientSex = t.TaskStudy.PatientSex,
|
||||
|
||||
StudyInstanceUid = t.StudyInstanceUid,
|
||||
StudyId = t.TaskStudy.StudyId,
|
||||
DicomStudyDate = t.TaskStudy.DicomStudyDate,
|
||||
DicomStudyTime = t.TaskStudy.DicomStudyTime,
|
||||
AccessionNumber = t.TaskStudy.AccessionNumber,
|
||||
|
||||
StudyDescription = t.TaskStudy.Description,
|
||||
|
||||
SeriesInstanceUid = t.TaskSeries.SeriesInstanceUid,
|
||||
Modality = t.TaskSeries.Modality,
|
||||
DicomSeriesDate = t.TaskSeries.DicomSeriesDate,
|
||||
DicomSeriesTime = t.TaskSeries.DicomSeriesTime,
|
||||
SeriesNumber = t.TaskSeries.SeriesNumber,
|
||||
SeriesDescription = t.TaskSeries.Description,
|
||||
|
||||
InstanceId = t.Id,
|
||||
SopInstanceUid = t.SopInstanceUid,
|
||||
SOPClassUID = t.SOPClassUID,
|
||||
InstanceNumber = t.InstanceNumber,
|
||||
MediaStorageSOPClassUID = t.MediaStorageSOPClassUID,
|
||||
MediaStorageSOPInstanceUID = t.MediaStorageSOPInstanceUID,
|
||||
TransferSytaxUID = t.TransferSytaxUID,
|
||||
|
||||
}).ToList();
|
||||
|
||||
foreach (var group in list.GroupBy(t => new { t.StudyInstanceUid, t.DicomStudyId }))
|
||||
{
|
||||
|
||||
using var ms = new MemoryStream();
|
||||
|
||||
await DicomDIRHelper.GenerateStudyDIR(group.ToList(), dirDic, outputStream: ms);
|
||||
|
||||
var dicomDirBytes = ms.ToArray();
|
||||
|
||||
zipItems.Add(new ZipItem
|
||||
{
|
||||
ZipEntryPath = $"{visitFolderName}/{studyFolderName}/DICOMDIR",
|
||||
|
||||
CustomWriter = async entryStream =>
|
||||
{
|
||||
await entryStream.WriteAsync(dicomDirBytes);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (var seriesInfo in studyInfo.SeriesList)
|
||||
{
|
||||
foreach (var instanceInfo in seriesInfo.InstancePathList)
|
||||
{
|
||||
zipItems.Add(new ZipItem
|
||||
{
|
||||
OssPath = instanceInfo.Path,
|
||||
|
||||
IsEncapsulated = instanceInfo.IsEncapsulated,
|
||||
|
||||
ZipEntryPath = $"{visitFolderName}/" + $"{studyFolderName}/" + $"IMAGE/" + $"{dirDic[instanceInfo.InstanceId.ToString()]}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region NoneDicom
|
||||
|
||||
foreach (var study in taskItem.NoneDicomStudyList)
|
||||
{
|
||||
var studyFolderName = $"{study.StudyCode}_" + $"{study.ImageDate:yyyy-MM-dd}_" + $"{study.Modality}";
|
||||
|
||||
foreach (var file in study.FileList)
|
||||
{
|
||||
zipItems.Add(new ZipItem
|
||||
{
|
||||
OssPath = HttpUtility.UrlDecode(file.Path),
|
||||
|
||||
ZipEntryPath = $"{visitFolderName}/" + $"{studyFolderName}/" + $"{Path.GetFileName(file.FileName)}"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region zip
|
||||
|
||||
|
||||
var zipPath = Path.Combine(trialFolderPath, visitFolderName + ".zip");
|
||||
|
||||
Log.Logger.Warning($"[{visitIndex}] {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} 开始打包下载访视:{visitFolderName}");
|
||||
|
||||
try
|
||||
{
|
||||
await CreateVisitZipAsync(zipPath, zipItems);
|
||||
|
||||
//Log.Logger.Warning($"zip exists={File.Exists(zipPath)} size={new FileInfo(zipPath).Length}");
|
||||
|
||||
Log.Logger.Warning($"[{visitIndex}] {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")} 下载完成:{visitFolderName}");
|
||||
|
||||
DownloadLogger.TaskWrite(logFilePath, taskItem.SubjectCode, taskItem.TaskName, taskItem.TaskBlindName, taskItem.UserName, "Success");
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Logger.Warning($"出现异常{ex}自动删除压缩包:{visitFolderName}");
|
||||
//如果有异常,删除失败的压缩包
|
||||
if (File.Exists(zipPath))
|
||||
{
|
||||
File.Delete(zipPath);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Logger.Error(ex, $"导出失败:{downloadTask.SubjectCode} {downloadTask.TaskName} {downloadTask.TaskBlindName} {downloadTask.UserName}");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -563,6 +864,53 @@ namespace IRaCIS.Core.Application.Service
|
||||
writer.WriteLine(line);
|
||||
}
|
||||
|
||||
|
||||
public static void TaskWrite(
|
||||
string logFilePath,
|
||||
string subjectCode,
|
||||
string taskName,
|
||||
string taskBlindName,
|
||||
string userName,
|
||||
string? message = null)
|
||||
{
|
||||
bool fileExists = File.Exists(logFilePath);
|
||||
|
||||
// 一次性打开文件流
|
||||
using var stream = new FileStream(
|
||||
logFilePath,
|
||||
FileMode.Append,
|
||||
FileAccess.Write,
|
||||
FileShare.ReadWrite);
|
||||
|
||||
// 首次创建时写入 BOM
|
||||
if (!fileExists)
|
||||
{
|
||||
var bom = new UTF8Encoding(true).GetPreamble();
|
||||
stream.Write(bom, 0, bom.Length);
|
||||
}
|
||||
|
||||
using var writer = new StreamWriter(stream, new UTF8Encoding(false));
|
||||
|
||||
// 写入表头
|
||||
if (!fileExists)
|
||||
{
|
||||
writer.WriteLine("Time,SubjectCode,TaskName,TaskBlindName,UserName,Message");
|
||||
}
|
||||
|
||||
// 写入数据
|
||||
string line = string.Join(",",
|
||||
[
|
||||
Escape(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")),
|
||||
subjectCode,
|
||||
taskName,
|
||||
taskBlindName,
|
||||
userName,
|
||||
Escape(message)
|
||||
]);
|
||||
|
||||
writer.WriteLine(line);
|
||||
}
|
||||
|
||||
private static string Escape(string? value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
|
||||
@@ -131,6 +131,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
CreateMap<FileUploadRecord, FileUploadRecordAddOrEdit>().ReverseMap();
|
||||
|
||||
|
||||
CreateMap<CommonUploadRecordAddOrEdit, CommonUploadRecord>().ReverseMap();
|
||||
|
||||
CreateMap<CommonUploadRecord, CommonUploadRecordDto>();
|
||||
|
||||
|
||||
CreateMap<UploadFileSyncRecord, UploadFileSyncRecordView>()
|
||||
.ForMember(d => d.FileName, u => u.MapFrom(s => s.FileUploadRecord.FileName))
|
||||
.ForMember(d => d.FileType, u => u.MapFrom(s => s.FileUploadRecord.FileType))
|
||||
|
||||
@@ -4,26 +4,10 @@
|
||||
// 生成时间 2025-03-27 06:13:33Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using AutoMapper.Execution;
|
||||
using System.Linq;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using DocumentFormat.OpenXml.Office2010.Excel;
|
||||
using MassTransit;
|
||||
using NPOI.POIFS.Properties;
|
||||
using Org.BouncyCastle.Crypto;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using static Microsoft.Extensions.Logging.EventSource.LoggingEventSource;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using EFCore.BulkExtensions;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
|
||||
|
||||
@@ -80,14 +80,18 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
}
|
||||
|
||||
public class TrialSignDocView : UnionDocumentWithConfirmInfoView
|
||||
public class TriaAndSystemlSignDocView : UnionDocumentWithConfirmInfoView
|
||||
{
|
||||
public string TrialCode { get; set; }
|
||||
public string ResearchProgramNo { get; set; }
|
||||
|
||||
public string ExperimentName { get; set; }
|
||||
|
||||
public TrialType TrialType { get; set; }
|
||||
|
||||
public bool IsTestUser { get; set; }
|
||||
|
||||
public UserWorkLanguage UserWorkLanguage { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -365,6 +369,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public DocLanguageType DocLanguageType { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -216,6 +216,8 @@ namespace IRaCIS.Core.Application.Services
|
||||
return ResponseOutput.Result(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 下线系统文档
|
||||
/// </summary>
|
||||
|
||||
@@ -5,18 +5,10 @@
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.MassTransit.Consumer;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using MassTransit.Mediator;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System.Linq;
|
||||
using System.Linq.Dynamic.Core;
|
||||
|
||||
namespace IRaCIS.Core.Application.Services
|
||||
@@ -161,7 +153,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialSignDocView>> GetTrialSignDocumentList(TrialDocQuery inQuery)
|
||||
public async Task<PageOutput<TriaAndSystemlSignDocView>> GetTrialSignDocumentList(TrialDocQuery inQuery)
|
||||
{
|
||||
var trialDocQueryable = from trialDoc in _trialDocumentRepository.Where(t => t.IsPublish)
|
||||
.WhereIf(inQuery.TrialId != null, t => t.TrialId == inQuery.TrialId)
|
||||
@@ -172,7 +164,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
new { trialUser.IdentityUserId, TrialDocumentId = trialDoc.Id } equals new { IdentityUserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc
|
||||
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
select new TrialSignDocView()
|
||||
select new TriaAndSystemlSignDocView()
|
||||
{
|
||||
TrialCode = trialDoc.Trial.TrialCode,
|
||||
ResearchProgramNo = trialDoc.Trial.ResearchProgramNo,
|
||||
|
||||
@@ -1551,14 +1551,23 @@ x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && x.Readi
|
||||
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
|
||||
.WhereIf(inQuery.IsDistinguishCriteria == true && trialConfig.IsEnrollementQualificationConfirm == true && trialConfig.IsPDProgressView == false, t => t.IsDistinguishCriteria == true && t.BusinessScenarioEnum == EmailBusinessScenario.EnrollConfirmed)
|
||||
.WhereIf(inQuery.IsDistinguishCriteria == true && trialConfig.IsEnrollementQualificationConfirm == false && trialConfig.IsPDProgressView == true, t => t.IsDistinguishCriteria == true && t.BusinessScenarioEnum == EmailBusinessScenario.PDConfirmed)
|
||||
.WhereIf(inQuery.IsDistinguishCriteria == true && trialConfig.IsEnrollementQualificationConfirm == true && trialConfig.IsPDProgressView == true, t => t.IsDistinguishCriteria == true)
|
||||
.WhereIf(inQuery.IsDistinguishCriteria == true && trialConfig.IsEnrollementQualificationConfirm == false && trialConfig.IsPDProgressView == false, t => t.IsDistinguishCriteria == true && (t.BusinessScenarioEnum != EmailBusinessScenario.EnrollConfirmed && t.BusinessScenarioEnum != EmailBusinessScenario.PDConfirmed))
|
||||
|
||||
.WhereIf(inQuery.BusinessModuleEnum != null, t => t.BusinessModuleEnum == inQuery.BusinessModuleEnum)
|
||||
.WhereIf(inQuery.EmailUrgentEnum != null, t => t.EmailUrgentEnum == inQuery.EmailUrgentEnum)
|
||||
.WhereIf(inQuery.ToUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.ToUserType && t.EmailUserType == EmailUserType.To))
|
||||
.WhereIf(inQuery.CopyUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.CopyUserType && t.EmailUserType == EmailUserType.Copy))
|
||||
.WhereIf(trialConfig.IsEnrollementQualificationConfirm == false, t => t.BusinessModuleEnum != BusinessModule.EligibilityVerification)
|
||||
.WhereIf(trialConfig.IsPDProgressView == false, t => t.BusinessModuleEnum != BusinessModule.PDVerification)
|
||||
|
||||
.WhereIf(trialConfig.IsEnrollementQualificationConfirm == false && trialConfig.IsPDProgressView == true, t => t.BusinessModuleEnum != BusinessModule.EligibilityVerification)
|
||||
.WhereIf(trialConfig.IsEnrollementQualificationConfirm == true && trialConfig.IsPDProgressView == false, t => t.BusinessModuleEnum != BusinessModule.PDVerification)
|
||||
|
||||
.WhereIf(trialConfig.IsPDProgressView == false && trialConfig.IsEnrollementQualificationConfirm == false, t => t.BusinessModuleEnum != BusinessModule.PDVerification
|
||||
&& t.BusinessModuleEnum != BusinessModule.EligibilityVerification)
|
||||
&& t.BusinessModuleEnum != BusinessModule.EligibilityVerification && t.BusinessModuleEnum != BusinessModule.Eligibility_PDVerification)
|
||||
|
||||
|
||||
.ProjectTo<TrialSelectEmailNoticeConfigView>(_mapper.ConfigurationProvider, new { trialId = inQuery.TrialId });
|
||||
|
||||
return await emailNoticeConfigQueryable.ToPagedListAsync(inQuery);
|
||||
|
||||
@@ -5,6 +5,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
||||
{
|
||||
public class SubjectImageUploadDTO
|
||||
{
|
||||
public bool? IsIRImageDownloaded { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Guid TrialSiteId { get; set; }
|
||||
|
||||
@@ -676,6 +676,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public class TaskNoneDicomStudyDTO : NoneDicomStudyBasicInfo
|
||||
{
|
||||
public bool? IsIRImageDownloaded { get; set; }
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public int UploadedFileCount { get; set; }
|
||||
@@ -749,6 +750,17 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public long? FileSize { get; set; }
|
||||
}
|
||||
|
||||
public class DownloadFileDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public string FileName { get; set; }
|
||||
|
||||
public string FileType { get; set; }
|
||||
}
|
||||
|
||||
public class DownloadNoneDicomStudyDto
|
||||
{
|
||||
public string Modality { get; set; }
|
||||
@@ -849,9 +861,13 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public List<TrialKeyPicturePath> QuestionMarkPictureList { get; set; }
|
||||
|
||||
public List<TrialKeyPicturePath> TableQuestionRowPictureList { get; set; }
|
||||
|
||||
public List<TrialKeyPicturePath> SegmentationFileList { get; set; }
|
||||
}
|
||||
public class TrialKeyPicturePath
|
||||
{
|
||||
public string SegmentationName { get; set; }
|
||||
|
||||
public string PicturePath { get; set; }
|
||||
|
||||
public string OtherPicturePath { get; set; }
|
||||
@@ -1058,6 +1074,13 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public string? Name { get; set; }
|
||||
}
|
||||
|
||||
public class DownloadImageSuccessCommand
|
||||
{
|
||||
public Guid TrialImageDownloadId { get; set; }
|
||||
|
||||
public List<Guid> VisitTaskIdList { get; set; }
|
||||
}
|
||||
|
||||
public class SubjectVisitTaskInfo
|
||||
{
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
@@ -1078,6 +1101,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public bool? IsUrgent { get; set; }
|
||||
|
||||
public int? State { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1107,6 +1132,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public int? NoneDicomStudyCount { get; set; }
|
||||
|
||||
public int? MarkNoneDicomStudyCount { get; set; }
|
||||
|
||||
public DateTime? LatestDownloadTime { get; set; }
|
||||
|
||||
public DateTime? LatestUploadTime { get; set; }
|
||||
}
|
||||
|
||||
public class SubjectVisitMarkStudyDto
|
||||
@@ -1160,6 +1189,20 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public List<MaskRegion> MaskRegionList { get; set; }
|
||||
|
||||
|
||||
}
|
||||
public class NoneDicomStudyMaskImageCommand
|
||||
{
|
||||
public Guid? NodicomStudyId { get; set; }
|
||||
public List<Guid>? NoneDicomStudyFileIdList { get; set; }
|
||||
public List<MaskRegion> MaskRegionList { get; set; }
|
||||
}
|
||||
|
||||
public class NoneDicomStudyUndoMaskImageCommand
|
||||
{
|
||||
public Guid? NodicomStudyId { get; set; }
|
||||
|
||||
public List<Guid>? NoneDicomStudyFileIdList { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class StudyUndoMaskImageCommand
|
||||
|
||||
@@ -1,31 +1,18 @@
|
||||
using DocumentFormat.OpenXml.EMMA;
|
||||
using FellowOakDicom;
|
||||
using FellowOakDicom.Media;
|
||||
using FellowOakDicom;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.Dicom.DTO;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Service.ImageAndDoc.DTO;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using MassTransit.Initializers;
|
||||
using MathNet.Numerics;
|
||||
using Medallion.Threading;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NetTopologySuite.Mathematics;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using ZiggyCreatures.Caching.Fusion;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
{
|
||||
@@ -71,8 +58,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
{
|
||||
//subject 随机阅片 或者无序 有上传 才处理任务编号
|
||||
if (_visitTaskRepository.Any(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId &&
|
||||
(t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.SubjectRandom ||
|
||||
(t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.Random && t.TrialReadingCriterion.ImageDownloadEnum != ReadingImageDownload.None))))
|
||||
(t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.SubjectRandom
|
||||
//||(t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.Random && t.TrialReadingCriterion.ImageDownloadEnum != ReadingImageDownload.None)
|
||||
)))
|
||||
{
|
||||
//找到 非一致性分析,未签名,状态正常的 并且任务名称是TimePoint的 任务
|
||||
var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.UserRoleId
|
||||
@@ -131,6 +119,12 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
|
||||
var subjectCode = string.Empty;
|
||||
var subjectId = inQuery.SubjectId;
|
||||
bool? isIRImageDownloaded = null;
|
||||
|
||||
if (inQuery.VisitTaskId != null)
|
||||
{
|
||||
isIRImageDownloaded = _visitTaskRepository.Where(t => t.Id == inQuery.VisitTaskId).Select(t => t.IsIRImageDownloaded).FirstOrDefault();
|
||||
}
|
||||
|
||||
if (criterionInfo.IsReadingTaskViewInOrder == ReadingOrder.Random)
|
||||
{
|
||||
@@ -224,7 +218,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
|
||||
var SVlist = await querySV.ToListAsync();
|
||||
|
||||
return ResponseOutput.Ok(SVlist, new { TrialModality = criterionInfo.Modalitys });
|
||||
return ResponseOutput.Ok(SVlist, new { TrialModality = criterionInfo.Modalitys, IsReadingTaskViewInOrder = criterionInfo.IsReadingTaskViewInOrder });
|
||||
|
||||
}
|
||||
else
|
||||
@@ -240,6 +234,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
.Select(u => new SubjectImageUploadDTO()
|
||||
{
|
||||
VisitTaskId = u.Id,
|
||||
IsIRImageDownloaded = u.IsIRImageDownloaded,
|
||||
|
||||
SubejctId = u.SubjectId,
|
||||
|
||||
@@ -337,7 +332,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
}
|
||||
|
||||
|
||||
return ResponseOutput.Ok(list, new { TrialModality = criterionInfo.Modalitys });
|
||||
return ResponseOutput.Ok(list, new { TrialModality = criterionInfo.Modalitys, IsReadingTaskViewInOrder = criterionInfo.IsReadingTaskViewInOrder, IsIRImageDownloaded = isIRImageDownloaded });
|
||||
}
|
||||
|
||||
|
||||
@@ -714,9 +709,12 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
|
||||
TaskSeries dicomSeries = await _taskSeriesRepository.FirstOrDefaultAsync(t => t.Id == seriesId);
|
||||
|
||||
var isNewSeries = false;
|
||||
//判断重复
|
||||
if (dicomSeries == null)
|
||||
{
|
||||
isNewSeries = true;
|
||||
|
||||
var series = _mapper.Map<TaskSeries>(seriesItem);
|
||||
|
||||
series.Id = seriesId;
|
||||
@@ -761,7 +759,10 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
|
||||
await _taskInstanceRepository.AddAsync(insntance);
|
||||
|
||||
dicomSeries.InstanceCount++;
|
||||
if (isNewSeries == false)
|
||||
{
|
||||
dicomSeries.InstanceCount++;
|
||||
}
|
||||
findStudy.InstanceCount++;
|
||||
}
|
||||
|
||||
@@ -911,6 +912,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
var subjectCode = inQuery.SubjectCode;
|
||||
var subjectId = inQuery.SubjectId;
|
||||
var doctorUserId = _userInfo.UserRoleId;
|
||||
bool? isIRImageDownloaded = null;
|
||||
|
||||
if (inQuery.VisitTaskId != null)
|
||||
{
|
||||
@@ -922,18 +924,20 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
SubjectCode = t.IsAnalysisCreate ? t.BlindSubjectCode : t.Subject.Code,
|
||||
SubjectId = t.SubjectId,
|
||||
t.DoctorUserId,
|
||||
t.IsAnalysisCreate
|
||||
t.IsAnalysisCreate,
|
||||
t.IsIRImageDownloaded,
|
||||
}).FirstNotNullAsync();
|
||||
|
||||
subjectId = taskInfo.SubjectId;
|
||||
subjectCode = taskInfo.SubjectCode;
|
||||
doctorUserId = (Guid)taskInfo.DoctorUserId!;
|
||||
isIRImageDownloaded = taskInfo.IsIRImageDownloaded;
|
||||
}
|
||||
|
||||
var info = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId)
|
||||
.Select(t => new { t.IsImageFilter, t.CriterionType, t.TrialId, t.CriterionModalitys, t.IsReadingTaskViewInOrder }).FirstNotNullAsync();
|
||||
|
||||
var config = await _subjectRepository.Where(t => t.Id == subjectId).Select(t => new { t.Trial.ImageFormatList, t.Trial.StudyNameList, t.Trial.IsShowStudyName }).FirstOrDefaultAsync();
|
||||
var config = await _subjectRepository.Where(t => t.Id == subjectId).Select(t => new { t.Trial.ImageFormatList, t.Trial.StudyNameList, t.Trial.IsShowStudyName, IsIRImageDownloaded = isIRImageDownloaded }).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
//靶段标注上传,查看访视级别,上传绑定访视级别
|
||||
@@ -998,7 +1002,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
|
||||
|
||||
|
||||
var list = _noneDicomStudyReposiotry.Where(t => t.SubjectId == subjectId && t.SubjectVisit.CheckState == CheckStateEnum.CVPassed)
|
||||
var list = _noneDicomStudyReposiotry.Where(t => t.IsReading)
|
||||
.Where(t => t.SubjectId == subjectId && t.SubjectVisit.CheckState == CheckStateEnum.CVPassed)
|
||||
.WhereIf(inQuery.SubjectVisitId != null, t => t.SubjectVisitId == inQuery.SubjectVisitId)
|
||||
//.WhereIf(info.IsImageFilter, t => ("|" + info.CriterionModalitys + "|").Contains("|" + t.Modality + "|"))
|
||||
.Select(u => new TaskNoneDicomStudyDTO()
|
||||
@@ -1027,12 +1032,13 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
|
||||
ReadingFileCount = u.NoneDicomFileList.Where(t => t.IsReading).Count(),
|
||||
|
||||
}).ToList();
|
||||
}).OrderBy(t => t.VisitName).ThenBy(t => t.Modality).ToList();
|
||||
|
||||
var noneDicomStudyIdList = list.Select(t => t.Id).ToList();
|
||||
var noneDicomStudyIdList = list.Where(t => !(t.Modality != "IVUS" && t.ReadingFileCount == 0)).Select(t => t.Id).ToList();
|
||||
|
||||
|
||||
var noneDicomStudyList = _noneDicomStudyFileReposiotry.Where(t => t.ImageLabelNoneDicomStudyId != null)
|
||||
var noneDicomStudyList = _noneDicomStudyFileReposiotry.Where(t => t.IsReading)
|
||||
.Where(t => t.ImageLabelNoneDicomStudyId != null)
|
||||
.Where(t => noneDicomStudyIdList.Contains((Guid)t.ImageLabelNoneDicomStudyId!))
|
||||
.Select(u => new NoneDicomFileInfo
|
||||
{
|
||||
@@ -1059,7 +1065,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
&& t.SourceSubjectVisit.CheckState == CheckStateEnum.CVPassed && t.DoctorUserId == doctorUserId && t.TaskState == TaskState.Effect)
|
||||
//满足 有序,或者随机只看到当前任务的dicom 非dicom检查
|
||||
.WhereIf(info.IsReadingTaskViewInOrder != ReadingOrder.SubjectRandom && inQuery.VisitTaskId != null, t => t.Id == inQuery.VisitTaskId)
|
||||
join ns in _noneDicomStudyReposiotry.Where(t => t.SubjectId == subjectId).WhereIf(info.IsImageFilter, t => ("|" + info.CriterionModalitys + "|").Contains("|" + t.Modality + "|"))
|
||||
join ns in _noneDicomStudyReposiotry.Where(t => t.SubjectId == subjectId).Where(t => t.IsReading).WhereIf(info.IsImageFilter, t => ("|" + info.CriterionModalitys + "|").Contains("|" + t.Modality + "|"))
|
||||
on u.SourceSubjectVisitId equals ns.SubjectVisitId
|
||||
|
||||
select new TaskNoneDicomStudyDTO()
|
||||
@@ -1071,6 +1077,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
ReadingTaskState = u.ReadingTaskState,
|
||||
SourceSubjectVisitId = u.SourceSubjectVisitId,
|
||||
VisitTaskId = u.Id,
|
||||
IsIRImageDownloaded = u.IsIRImageDownloaded,
|
||||
|
||||
Id = ns.Id,
|
||||
Description = ns.Description,
|
||||
@@ -1366,7 +1373,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
VisitName = item.VisitName,
|
||||
|
||||
//取dicom
|
||||
DicomStudyList = item.DicomStudyList,
|
||||
DicomStudyList = item.DicomStudyList.Where(t => t.ReadingSeriesCount > 0).ToList(),
|
||||
}).ToList();
|
||||
|
||||
var noneStudyList = list.Where(item => item.NoneDicomStudyList.Count > 0)
|
||||
@@ -1379,12 +1386,12 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
VisitName = item.VisitName,
|
||||
|
||||
//非dicom
|
||||
NoneDicomStudyList = item.NoneDicomStudyList,
|
||||
NoneDicomStudyList = item.NoneDicomStudyList.Where(t => t.ReadingFileCount > 0).ToList(),
|
||||
}).ToList();
|
||||
|
||||
|
||||
result.AddRange(dicomStudyList);
|
||||
result.AddRange(noneStudyList);
|
||||
result.AddRange(dicomStudyList.Where(t => t.DicomStudyList.Count > 0));
|
||||
result.AddRange(noneStudyList.Where(t => t.NoneDicomStudyList.Count > 0));
|
||||
#endregion
|
||||
|
||||
return ResponseOutput.Ok(result);
|
||||
@@ -1485,7 +1492,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
CriterionModalitys = item.CriterionModalitys,
|
||||
SourceSubjectVisitId = item.SourceSubjectVisitId,
|
||||
//取dicom
|
||||
DicomStudyList = item.DicomStudyList,
|
||||
DicomStudyList = item.DicomStudyList.Where(t => t.ReadingSeriesCount > 0).ToList(),
|
||||
}).ToList();
|
||||
|
||||
var noneStudyList = list.Where(item => item.NoneDicomStudyList.Count > 0)
|
||||
@@ -1500,12 +1507,12 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
CriterionModalitys = item.CriterionModalitys,
|
||||
SourceSubjectVisitId = item.SourceSubjectVisitId,
|
||||
//非dicom
|
||||
NoneDicomStudyList = item.NoneDicomStudyList,
|
||||
NoneDicomStudyList = item.NoneDicomStudyList.Where(t => t.ReadingFileCount > 0).ToList()
|
||||
}).ToList();
|
||||
|
||||
|
||||
result.AddRange(dicomStudyList);
|
||||
result.AddRange(noneStudyList);
|
||||
result.AddRange(dicomStudyList.Where(t => t.DicomStudyList.Count > 0));
|
||||
result.AddRange(noneStudyList.Where(t => t.NoneDicomStudyList.Count > 0));
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1885,12 +1892,19 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
/// <summary>
|
||||
/// 影像下载成功回调
|
||||
/// </summary>
|
||||
/// <param name="trialImageDownloadId"></param>
|
||||
/// <param name="incommand"></param>
|
||||
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> DownloadImageSuccess(Guid trialImageDownloadId)
|
||||
public async Task<IResponseOutput> DownloadImageSuccess(DownloadImageSuccessCommand incommand)
|
||||
{
|
||||
await _trialImageDownloadRepository.UpdatePartialFromQueryAsync(t => t.Id == trialImageDownloadId, u => new TrialImageDownload()
|
||||
await _trialImageDownloadRepository.UpdatePartialFromQueryAsync(t => t.Id == incommand.TrialImageDownloadId, u => new TrialImageDownload()
|
||||
{ DownloadEndTime = DateTime.Now, IsSuccess = true }, true);
|
||||
|
||||
if (incommand.VisitTaskIdList != null && incommand.VisitTaskIdList.Count > 0)
|
||||
{
|
||||
incommand.VisitTaskIdList = incommand.VisitTaskIdList.Distinct().ToList();
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => incommand.VisitTaskIdList.Contains(t.Id), u => new VisitTask() { IsIRImageDownloaded = true });
|
||||
}
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
@@ -2017,7 +2031,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
public async Task<List<Guid?>> GetTrialUnreadVisitList(Guid trialId)
|
||||
{
|
||||
|
||||
var subjectVisitList = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.SourceSubjectVisitId!=null).Select(t => t.SourceSubjectVisitId)
|
||||
var subjectVisitList = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.SourceSubjectVisitId != null).Select(t => t.SourceSubjectVisitId)
|
||||
.Distinct().ToListAsync();
|
||||
|
||||
return subjectVisitList;
|
||||
@@ -2067,6 +2081,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
|
||||
TableQuestionRowPictureList = t.LesionList.Select(c => new TrialKeyPicturePath { PicturePath = c.PicturePath, OtherPicturePath = c.OtherPicturePath }).ToList(),
|
||||
|
||||
SegmentationFileList = t.SegmentationList.Select(c => new TrialKeyPicturePath { PicturePath = c.SEGUrl, SegmentationName = c.SegmentationName, OtherPicturePath = string.Empty }).ToList(),
|
||||
|
||||
Id = t.Id,
|
||||
//裁判选择结果
|
||||
JudgeResultTaskId = t.JudgeVisitTask.JudgeResultTaskId,
|
||||
@@ -2446,18 +2462,42 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
SubjectCode = t.Code,
|
||||
IsUrgent = t.IsUrgent,
|
||||
|
||||
LatestDownloadTime = t.TrialImageDownloadList.Where(t => t.CreateUserRole.UserTypeEnum == UserTypeEnum.IndependentReviewer)
|
||||
.OrderByDescending(t => t.CreateTime).Select(t => (DateTime?)t.CreateTime).FirstOrDefault(),
|
||||
|
||||
LatestUploadTime = t.SubjectVisitList
|
||||
.Where(v => v.SubmitState == SubmitStateEnum.Submitted && v.CheckState == CheckStateEnum.CVPassed)
|
||||
.SelectMany(v => v.TaskStudyList)
|
||||
.Select(s => (DateTime?)s.CreateTime) // 假设字段名为 CreateTime,根据实际情况调整
|
||||
.Union(
|
||||
t.SubjectVisitList
|
||||
.Where(v => v.SubmitState == SubmitStateEnum.Submitted && v.CheckState == CheckStateEnum.CVPassed)
|
||||
.SelectMany(v => v.NoneDicomStudyList)
|
||||
.Where(n => n.ImageLabelNoneDicomFileList.Any())
|
||||
.Select(s => (DateTime?)s.CreateTime) // 假设字段名为 CreateTime,根据实际情况调整
|
||||
)
|
||||
.OrderByDescending(time => time)
|
||||
.FirstOrDefault(),
|
||||
|
||||
VisitCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.CheckState == CheckStateEnum.CVPassed).Count(),
|
||||
|
||||
MarkIVUSVisitCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.CheckState == CheckStateEnum.CVPassed).Count(t => t.NoneDicomStudyList.Where(t => t.Modality == "IVUS").SelectMany(c => c.ImageLabelNoneDicomFileList).Any()),
|
||||
|
||||
MarkOCTVisitCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.CheckState == CheckStateEnum.CVPassed).Count(t => t.NoneDicomStudyList.Where(t => t.Modality == "OCT").SelectMany(c => c.ImageLabelNoneDicomFileList).Any()),
|
||||
|
||||
DicomStudyCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.CheckState == CheckStateEnum.CVPassed).SelectMany(t => t.StudyList).Count(),
|
||||
//MarkDicomStudyCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted).SelectMany(t => t.TaskStudyList).Count(),
|
||||
//DicomStudyCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.CheckState == CheckStateEnum.CVPassed).SelectMany(t => t.StudyList).Count(),
|
||||
|
||||
NoneDicomStudyCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.CheckState == CheckStateEnum.CVPassed).SelectMany(t => t.NoneDicomStudyList).Count(),
|
||||
//MarkNoneDicomStudyCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted).SelectMany(t => t.NoneDicomStudyList).Where(t => t.ImageLabelNoneDicomFileList.Any()).Count(),
|
||||
}).ToPagedListAsync(inQuery);
|
||||
//MarkDicomStudyCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.CheckState == CheckStateEnum.CVPassed).SelectMany(t => t.TaskStudyList).Count(),
|
||||
|
||||
//NoneDicomStudyCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.CheckState == CheckStateEnum.CVPassed).SelectMany(t => t.NoneDicomStudyList).Count(),
|
||||
|
||||
//MarkNoneDicomStudyCount = t.SubjectVisitList.Where(t => t.SubmitState == SubmitStateEnum.Submitted && t.CheckState == CheckStateEnum.CVPassed).SelectMany(t => t.NoneDicomStudyList).Where(t => t.ImageLabelNoneDicomFileList.Any()).Count(),
|
||||
})
|
||||
.Where(t => t.VisitCount > 0)
|
||||
.WhereIf(inQuery.State == 0, t => t.LatestDownloadTime == null)//待处理
|
||||
.WhereIf(inQuery.State == 1, t => t.LatestDownloadTime != null && (2 * t.VisitCount) != (t.MarkIVUSVisitCount + t.MarkOCTVisitCount))//处理中
|
||||
.WhereIf(inQuery.State == 2, t => t.LatestDownloadTime != null && (2 * t.VisitCount) == (t.MarkIVUSVisitCount + t.MarkOCTVisitCount))//已完成
|
||||
.ToPagedListAsync(inQuery);
|
||||
|
||||
return ResponseOutput.Ok(list);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
{
|
||||
[ApiExplorerSettings(GroupName = "Image")]
|
||||
[AllowAnonymous]
|
||||
public class InstanceService(IRepository<DicomInstance> _instanceRepository,
|
||||
public class InstanceService(IRepository<DicomInstance> _instanceRepository, IRepository<DicomSeries> _seriesRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IWebHostEnvironment _hostEnvironment) : BaseService, IInstanceService
|
||||
{
|
||||
|
||||
@@ -29,12 +29,15 @@ namespace IRaCIS.Core.Application.Services
|
||||
.OrderBy(s => s.InstanceNumber).ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
||||
.ProjectTo<DicomInstanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
var des = _seriesRepository.Where(t => t.Id == seriesId).Select(t => t.Description).FirstOrDefault();
|
||||
|
||||
// ⭐ DICOM 空间排序(带兜底)
|
||||
var sorted = DicomSortHelper.SortSlices(
|
||||
list,
|
||||
x => x.ImagePositionPatient,
|
||||
x => x.ImageOrientationPatient,
|
||||
x => x.InstanceNumber
|
||||
x => x.InstanceNumber,
|
||||
des
|
||||
);
|
||||
|
||||
var seriesInfo = await _instanceRepository.Where(s => s.SeriesId == seriesId).Select(t => new
|
||||
|
||||
@@ -3,16 +3,12 @@
|
||||
// 生成时间 2021-12-06 10:54:55
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using DocumentFormat.OpenXml.EMMA;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Medallion.Threading;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using static ImageHelper;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
@@ -25,11 +21,176 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
IRepository<Trial> _trialRepository,
|
||||
IDistributedLockProvider _distributedLockProvider,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository, IOSSService _oSSService,
|
||||
QCCommon _qCCommon, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, INoneDicomStudyService
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 标注遮盖影像 路径后面加了.MaskNoneDicom_ 就是遮盖的新路径
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> NoneDicomStudyMaskImage(NoneDicomStudyMaskImageCommand inCommand)
|
||||
{
|
||||
if (inCommand.NodicomStudyId == null && inCommand.NoneDicomStudyFileIdList == null)
|
||||
{
|
||||
return ResponseOutput.NotOk("NodicomStudyId and NoneDicomStudyFileIdList can not both be null");
|
||||
}
|
||||
|
||||
|
||||
var idPathList = new List<DownloadFileDto>();
|
||||
|
||||
if (inCommand.NodicomStudyId == null && inCommand.NoneDicomStudyFileIdList != null)
|
||||
{
|
||||
idPathList = await _noneDicomStudyFileRepository.Where(t => inCommand.NoneDicomStudyFileIdList.Contains(t.Id)).ProjectTo<DownloadFileDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
idPathList = await _noneDicomStudyFileRepository.Where(t => inCommand.NodicomStudyId == t.NoneDicomStudyId).ProjectTo<DownloadFileDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
}
|
||||
|
||||
|
||||
var errorList = new List<DownloadFileDto>();
|
||||
|
||||
var okList = new List<DownloadFileDto>();
|
||||
|
||||
var batchId = Guid.NewGuid();
|
||||
|
||||
foreach (var item in idPathList)
|
||||
{
|
||||
var path = item.Path;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// 1. 下载文件
|
||||
using var inputStream = new MemoryStream();
|
||||
await (await _oSSService.GetStreamFromOSSAsync(path)).CopyToAsync(inputStream);
|
||||
inputStream.Position = 0;
|
||||
|
||||
// 2. 处理图片
|
||||
using var outputStream = new MemoryStream();
|
||||
await ImageMaskHelper.MaskAsync(inputStream, outputStream, inCommand.MaskRegionList);
|
||||
outputStream.Position = 0;
|
||||
|
||||
|
||||
|
||||
var prefix = path.Substring(1, path.LastIndexOf('/') - 1);
|
||||
|
||||
//每次都用一个新的名字
|
||||
var maskFileName = string.Empty;
|
||||
|
||||
if (path.Contains(".MaskNoneDicom_"))
|
||||
{
|
||||
//清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要
|
||||
await _oSSService.DeleteFromPrefix(path, true); //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要
|
||||
|
||||
//本身就是遮盖的图,那么就要要替换guid
|
||||
var length = Guid.Empty.ToString().Length + ".MaskNoneDicom_".Length;
|
||||
|
||||
var restorePath = item.Path[..^length];
|
||||
|
||||
maskFileName = $"{Path.GetFileName(restorePath)}.MaskNoneDicom_{batchId}";
|
||||
}
|
||||
else
|
||||
{
|
||||
//没有遮盖的,直接加上.批次_MaskDicom
|
||||
maskFileName = $"{Path.GetFileName(path)}.MaskNoneDicom_{batchId}";
|
||||
}
|
||||
|
||||
|
||||
await _oSSService.UploadToOSSAsync(outputStream, prefix, maskFileName, false);
|
||||
|
||||
var newPath = $"/{prefix}/{maskFileName}";
|
||||
|
||||
okList.Add(new DownloadFileDto() { Id = item.Id, Path = newPath });
|
||||
|
||||
await _noneDicomStudyFileRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new NoneDicomStudyFile() { Path = newPath, IsMasked = true });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
errorList.Add(new DownloadFileDto() { Id = item.Id, Path = path });
|
||||
|
||||
Log.Logger.Error(ex, $"NoneDicomStudyMaskImage Error for NoneDicomStudyFileIdList Path:{path} {ex.Message}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
await _noneDicomStudyFileRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok(new { OkList = okList, ErrorList = errorList });
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 撤销遮盖的影像,可以单张,也可以整个检查
|
||||
/// </summary>
|
||||
/// <param name="inCommand"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> NoneDicomStudyUndoMaskImage(NoneDicomStudyUndoMaskImageCommand inCommand)
|
||||
{
|
||||
if (inCommand.NodicomStudyId == null && inCommand.NoneDicomStudyFileIdList == null)
|
||||
{
|
||||
return ResponseOutput.NotOk("NodicomStudyId and NoneDicomStudyFileIdList can not both be null");
|
||||
}
|
||||
|
||||
|
||||
var idPathList = new List<DownloadFileDto>();
|
||||
|
||||
if (inCommand.NodicomStudyId == null && inCommand.NoneDicomStudyFileIdList != null)
|
||||
{
|
||||
idPathList = await _noneDicomStudyFileRepository.Where(t => inCommand.NoneDicomStudyFileIdList.Contains(t.Id)).ProjectTo<DownloadFileDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
idPathList = await _noneDicomStudyFileRepository.Where(t => inCommand.NodicomStudyId == t.NoneDicomStudyId).ProjectTo<DownloadFileDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
}
|
||||
|
||||
|
||||
var okList = new List<DownloadFileDto>();
|
||||
|
||||
foreach (var item in idPathList)
|
||||
{
|
||||
if (item.Path.Contains(".MaskNoneDicom_"))
|
||||
{
|
||||
await _oSSService.DeleteFromPrefix(item.Path, true);
|
||||
|
||||
var length = Guid.Empty.ToString().Length + ".MaskNoneDicom_".Length;
|
||||
var newPath = item.Path[..^length];
|
||||
|
||||
okList.Add(new DownloadFileDto() { Id = item.Id, Path = newPath });
|
||||
|
||||
await _noneDicomStudyFileRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new NoneDicomStudyFile() { Path = newPath, IsMasked = false });
|
||||
}
|
||||
|
||||
//if (item.Path.EndsWith("."))
|
||||
//{
|
||||
// await _oSSService.DeleteFromPrefix(item.Path, true);
|
||||
|
||||
// var newPath = item.Path[..^1];
|
||||
|
||||
// okList.Add(new InstanceIdPath() { Id = item.Id, Path = newPath });
|
||||
|
||||
// await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = false });
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
await _noneDicomStudyFileRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok(new { OkList = okList });
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IResponseOutput<List<NoneDicomStudyView>>> GetNoneDicomStudyList(
|
||||
|
||||
@@ -59,7 +59,8 @@ namespace IRaCIS.Core.Application.Services
|
||||
instances,
|
||||
x => x.ImagePositionPatient,
|
||||
x => x.ImageOrientationPatient,
|
||||
x => x.InstanceNumber
|
||||
x => x.InstanceNumber,
|
||||
series.Description
|
||||
);
|
||||
|
||||
series.InstanceInfoList = sorted.Select(k =>
|
||||
@@ -104,13 +105,24 @@ namespace IRaCIS.Core.Application.Services
|
||||
.WhereIf(isReading == true, t => t.IsReading == true)
|
||||
.OrderBy(t => t.SeriesId).ThenBy(t => t.InstanceNumber)
|
||||
.ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
||||
.Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath, t.IsReading, t.IsDeleted, t.FileSize ,t.IsMasked}).ToListAsync();//.GroupBy(u => u.SeriesId);
|
||||
.Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath, t.IsReading, t.IsDeleted, t.FileSize ,t.IsMasked, t.ImagePositionPatient, t.ImageOrientationPatient }).ToListAsync();//.GroupBy(u => u.SeriesId);
|
||||
|
||||
|
||||
foreach (var series in seriesList)
|
||||
{
|
||||
|
||||
series.InstanceInfoList = instanceList.Where(t => t.SeriesId == series.Id).OrderBy(t => t.InstanceNumber).Select(k =>
|
||||
var instances = instanceList.Where(x => x.SeriesId == series.Id);
|
||||
|
||||
// ⭐ DICOM 空间排序(带兜底)
|
||||
var sorted = DicomSortHelper.SortSlices(
|
||||
instances,
|
||||
x => x.ImagePositionPatient,
|
||||
x => x.ImageOrientationPatient,
|
||||
x => x.InstanceNumber,
|
||||
series.Description
|
||||
);
|
||||
|
||||
series.InstanceInfoList = sorted.Select(k =>
|
||||
new InstanceBasicInfo()
|
||||
{
|
||||
Id = k.Id,
|
||||
|
||||
@@ -2,24 +2,14 @@
|
||||
using FellowOakDicom.Imaging;
|
||||
using FellowOakDicom.IO.Buffer;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Service.ImageAndDoc.DTO;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MathNet.Numerics;
|
||||
using Medallion.Threading;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using NetTopologySuite.Algorithm;
|
||||
using SharpCompress.Common;
|
||||
using SkiaSharp;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using ZiggyCreatures.Caching.Fusion;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -13,7 +14,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
/// SystemAnonymizationService
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Image")]
|
||||
public class SystemAnonymizationService(IRepository<SystemAnonymization> _systemAnonymizationRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ISystemAnonymizationService
|
||||
public class SystemAnonymizationService(IRepository<SystemAnonymization> _systemAnonymizationRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, ISystemAnonymizationService
|
||||
{
|
||||
|
||||
|
||||
@@ -37,6 +38,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var entity = await _systemAnonymizationRepository.InsertOrUpdateAsync(addOrEditSystemAnonymization, true);
|
||||
|
||||
await _fusionCache.SetAsync(CacheKeys.SystemAnonymization, CacheHelper.GetSystemAnonymizationListAsync(_systemAnonymizationRepository), TimeSpan.FromDays(7));
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
|
||||
@@ -187,8 +187,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
CreateMap<DicomInstance, DownloadDicomInstanceDto>()
|
||||
.ForMember(d => d.InstanceId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
|
||||
CreateMap<NoneDicomStudyFile, DownloadFileDto>();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -449,6 +449,12 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||
public List<GetTrialShowInspectionOutDto> Children { get; set; }
|
||||
}
|
||||
|
||||
public class InspectionDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string? JsonDetail { get; set; }
|
||||
}
|
||||
|
||||
public class SetTrialShowInspection
|
||||
{
|
||||
|
||||
@@ -27,6 +27,39 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||
IRepository<FrontAuditConfig> _frontAuditConfigRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IInspectionService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id获取稽查记录
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> getInspectionById(InspectionDto inDto)
|
||||
{
|
||||
var dataInspection = await _dataInspectionRepository.Where(x=>x.Id==inDto.Id).Select(x=> new InspectionDto()
|
||||
{
|
||||
Id=x.Id,
|
||||
JsonDetail = x.JsonDetail,
|
||||
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
return ResponseOutput.Ok(dataInspection);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置稽查记录JsonDetail
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetJsonDetail(InspectionDto inDto)
|
||||
{
|
||||
await _dataInspectionRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.Id, u => new DataInspection() { JsonDetail = inDto.JsonDetail });
|
||||
|
||||
return ResponseOutput.Ok(inDto);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置项目稽查配置
|
||||
/// </summary>
|
||||
@@ -127,9 +160,9 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||
join trialSign in _trialSignRepository.Where().IgnoreQueryFilters() on data.SignId equals trialSign.Id into trialSigntemp
|
||||
from lefttrialSign in trialSigntemp.DefaultIfEmpty()
|
||||
join leftfrontAuditConfig in _frontAuditConfigRepository.Where().Where(x => x.ConfigType == "M" && x.Identification != null && x.IsEnable == true) on
|
||||
data.Identification.ToLower()
|
||||
data.Identification
|
||||
equals
|
||||
leftfrontAuditConfig.Identification.ToLower()
|
||||
leftfrontAuditConfig.Identification
|
||||
join moduleTypec in _dictionaryRepository.Where() on new { ModuleType = leftfrontAuditConfig.ModuleTypeId!.Value } equals new { ModuleType = moduleTypec.Id } into moduleTypectemp
|
||||
from leftmoduleTypec in moduleTypectemp.DefaultIfEmpty()
|
||||
join OptTypec in _dictionaryRepository.Where() on new { ModuleType = leftfrontAuditConfig.OptTypeId!.Value } equals new { ModuleType = OptTypec.Id } into optTypetemp
|
||||
|
||||
@@ -103,6 +103,8 @@ namespace IRaCIS.Application.Contracts
|
||||
public bool IsZhiZhun { get; set; }
|
||||
public bool IsFirstAdd { get; set; }
|
||||
|
||||
public bool IsNeedResetPwd { get; set; }
|
||||
|
||||
public bool NeedChangePassWord { get; set; } = false;
|
||||
|
||||
|
||||
|
||||
@@ -263,6 +263,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
IsFirstAdd = false,
|
||||
|
||||
IsNeedResetPwd = false,
|
||||
|
||||
EmailToken = String.Empty
|
||||
|
||||
}, true);
|
||||
@@ -301,7 +303,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
await _identityUserRepository.UpdatePartialFromQueryAsync(t => t.Id == identityUserId, u => new IdentityUser()
|
||||
{
|
||||
Password = MD5Helper.Md5(pwd),
|
||||
IsFirstAdd = true
|
||||
IsNeedResetPwd = true
|
||||
});
|
||||
|
||||
var userName = _identityUserRepository.Where(t => t.Id == identityUserId).Select(t => t.UserName).FirstOrDefault();
|
||||
@@ -449,9 +451,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var find = await _identityUserRepository.FindAsync(identityUserId);
|
||||
@@ -489,7 +491,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
Password = editPwModel.NewPassWord,
|
||||
LastChangePassWordTime = DateTime.Now,
|
||||
IsFirstAdd = false
|
||||
IsNeedResetPwd = false
|
||||
});
|
||||
|
||||
await _userPassWordLogRepository.AddAsync(new UserPassWordLog()
|
||||
@@ -1279,7 +1281,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
PermissionStr = t.UserTypeRole.PermissionStr,
|
||||
UserName = t.IdentityUser.UserName,
|
||||
UserTypeShortName = t.UserTypeRole.UserTypeShortName,
|
||||
UserWorkLanguage=t.IdentityUser.UserWorkLanguage
|
||||
UserWorkLanguage = t.IdentityUser.UserWorkLanguage
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = userTokenInfo.IdentityUserId, ActionUserName = $"{userTokenInfo.UserName}", ActionUserType = userTokenInfo.UserTypeShortName, OptType = UserOptType.LoginSelectRole }, true);
|
||||
|
||||
+1
-9
@@ -1,16 +1,8 @@
|
||||
using DocumentFormat.OpenXml.Office2016.Drawing.ChartDrawing;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Service.DTO;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NPOI.HPSF;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
@@ -1,137 +1,137 @@
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using RestSharp;
|
||||
using SharpCompress.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
//using IRaCIS.Core.Application.Helper;
|
||||
//using MassTransit;
|
||||
//using Microsoft.AspNetCore.Authorization;
|
||||
//using Microsoft.AspNetCore.Builder;
|
||||
//using Microsoft.AspNetCore.Hosting;
|
||||
//using Microsoft.AspNetCore.Http;
|
||||
//using Microsoft.AspNetCore.Mvc;
|
||||
//using Microsoft.AspNetCore.StaticFiles;
|
||||
//using RestSharp;
|
||||
//using SharpCompress.Common;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.MinimalApiService
|
||||
{
|
||||
/// <summary>
|
||||
/// 上传文件转PDF 或者给url 这边下载然后转PDF
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="_hostEnvironment"></param>
|
||||
[ApiExplorerSettings(GroupName = "Institution")]
|
||||
public class FileToPDFService(IWebHostEnvironment _hostEnvironment) : ServiceBase
|
||||
{
|
||||
//namespace IRaCIS.Core.Application.Service.MinimalApiService
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 上传文件转PDF 或者给url 这边下载然后转PDF
|
||||
// ///
|
||||
// /// </summary>
|
||||
// /// <param name="_hostEnvironment"></param>
|
||||
// [ApiExplorerSettings(GroupName = "Institution")]
|
||||
// public class FileToPDFService(IWebHostEnvironment _hostEnvironment) : ServiceBase
|
||||
// {
|
||||
|
||||
[AllowAnonymous]
|
||||
[RoutePattern(HttpMethod = "Post")]
|
||||
public async Task<IResult> UploadFileAsync([FromForm] IFormFile file)
|
||||
{
|
||||
var tempFileName = NewId.NextGuid() + file.FileName;
|
||||
var tempPDFName = Path.GetFileNameWithoutExtension(tempFileName) + ".pdf";
|
||||
// [AllowAnonymous]
|
||||
// [RoutePattern(HttpMethod = "Post")]
|
||||
// public async Task<IResult> UploadFileAsync([FromForm] IFormFile file)
|
||||
// {
|
||||
// var tempFileName = NewId.NextGuid() + file.FileName;
|
||||
// var tempPDFName = Path.GetFileNameWithoutExtension(tempFileName) + ".pdf";
|
||||
|
||||
|
||||
// 获取wwwroot目录
|
||||
var wwwRootPath = Path.Combine(FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment), "temp");
|
||||
// // 获取wwwroot目录
|
||||
// var wwwRootPath = Path.Combine(FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment), "temp");
|
||||
|
||||
// 检查wwwroot/temp目录是否存在,不存在则创建
|
||||
if (!Directory.Exists(wwwRootPath))
|
||||
{
|
||||
Directory.CreateDirectory(wwwRootPath);
|
||||
}
|
||||
// // 检查wwwroot/temp目录是否存在,不存在则创建
|
||||
// if (!Directory.Exists(wwwRootPath))
|
||||
// {
|
||||
// Directory.CreateDirectory(wwwRootPath);
|
||||
// }
|
||||
|
||||
// 文件保存路径
|
||||
var pdfFilePath = Path.Combine(wwwRootPath, tempPDFName);
|
||||
var tempFilePath = Path.Combine(wwwRootPath, tempFileName);
|
||||
// // 文件保存路径
|
||||
// var pdfFilePath = Path.Combine(wwwRootPath, tempPDFName);
|
||||
// var tempFilePath = Path.Combine(wwwRootPath, tempFileName);
|
||||
|
||||
|
||||
using var stream = File.OpenWrite(tempFilePath);
|
||||
await file.CopyToAsync(stream);
|
||||
// using var stream = File.OpenWrite(tempFilePath);
|
||||
// await file.CopyToAsync(stream);
|
||||
|
||||
FileConvertHelper.ConvertWordToPdf(tempFilePath, Path.GetDirectoryName(pdfFilePath));
|
||||
// FileConvertHelper.ConvertWordToPdf(tempFilePath, Path.GetDirectoryName(pdfFilePath));
|
||||
|
||||
var fileBytes = await File.ReadAllBytesAsync(pdfFilePath);
|
||||
// var fileBytes = await File.ReadAllBytesAsync(pdfFilePath);
|
||||
|
||||
// 清理临时上传的文件和pdf
|
||||
if (File.Exists(pdfFilePath))
|
||||
{
|
||||
File.Delete(pdfFilePath);
|
||||
}
|
||||
if (File.Exists(tempFilePath))
|
||||
{
|
||||
File.Delete(tempFilePath);
|
||||
}
|
||||
// // 清理临时上传的文件和pdf
|
||||
// if (File.Exists(pdfFilePath))
|
||||
// {
|
||||
// File.Delete(pdfFilePath);
|
||||
// }
|
||||
// if (File.Exists(tempFilePath))
|
||||
// {
|
||||
// File.Delete(tempFilePath);
|
||||
// }
|
||||
|
||||
new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(tempPDFName), out var contentType);
|
||||
// new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(tempPDFName), out var contentType);
|
||||
|
||||
return Results.File(fileBytes, contentType);
|
||||
// return Results.File(fileBytes, contentType);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
public async Task<IResult> GetPDFFileAsync(string fileUrl)
|
||||
{
|
||||
var tempFileName = NewId.NextGuid() + Path.GetFileName(fileUrl);
|
||||
var tempPDFName = Path.GetFileNameWithoutExtension(tempFileName) + ".pdf";
|
||||
// public async Task<IResult> GetPDFFileAsync(string fileUrl)
|
||||
// {
|
||||
// var tempFileName = NewId.NextGuid() + Path.GetFileName(fileUrl);
|
||||
// var tempPDFName = Path.GetFileNameWithoutExtension(tempFileName) + ".pdf";
|
||||
|
||||
|
||||
// 获取wwwroot目录
|
||||
var wwwRootPath = Path.Combine(FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment), "temp");
|
||||
// // 获取wwwroot目录
|
||||
// var wwwRootPath = Path.Combine(FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment), "temp");
|
||||
|
||||
// 检查wwwroot/temp目录是否存在,不存在则创建
|
||||
if (!Directory.Exists(wwwRootPath))
|
||||
{
|
||||
Directory.CreateDirectory(wwwRootPath);
|
||||
}
|
||||
// // 检查wwwroot/temp目录是否存在,不存在则创建
|
||||
// if (!Directory.Exists(wwwRootPath))
|
||||
// {
|
||||
// Directory.CreateDirectory(wwwRootPath);
|
||||
// }
|
||||
|
||||
// 文件保存路径
|
||||
var pdfFilePath = Path.Combine(wwwRootPath, tempPDFName);
|
||||
var tempFilePath = Path.Combine(wwwRootPath, tempFileName);
|
||||
// // 文件保存路径
|
||||
// var pdfFilePath = Path.Combine(wwwRootPath, tempPDFName);
|
||||
// var tempFilePath = Path.Combine(wwwRootPath, tempFileName);
|
||||
|
||||
|
||||
//请求url获取文件
|
||||
var client = new RestClient(fileUrl);
|
||||
// //请求url获取文件
|
||||
// var client = new RestClient(fileUrl);
|
||||
|
||||
var request = new RestRequest(fileUrl, Method.Get);
|
||||
// var request = new RestRequest(fileUrl, Method.Get);
|
||||
|
||||
var response = await client.ExecuteAsync(request);
|
||||
// var response = await client.ExecuteAsync(request);
|
||||
|
||||
// 检查响应是否成功
|
||||
if (response.IsSuccessful)
|
||||
{
|
||||
// 将响应内容写入到本地文件
|
||||
await File.WriteAllBytesAsync(tempFilePath, response.RawBytes);
|
||||
// // 检查响应是否成功
|
||||
// if (response.IsSuccessful)
|
||||
// {
|
||||
// // 将响应内容写入到本地文件
|
||||
// await File.WriteAllBytesAsync(tempFilePath, response.RawBytes);
|
||||
|
||||
FileConvertHelper.ConvertWordToPdf(tempFilePath, Path.GetDirectoryName(pdfFilePath));
|
||||
// FileConvertHelper.ConvertWordToPdf(tempFilePath, Path.GetDirectoryName(pdfFilePath));
|
||||
|
||||
var fileBytes = await File.ReadAllBytesAsync(pdfFilePath);
|
||||
// var fileBytes = await File.ReadAllBytesAsync(pdfFilePath);
|
||||
|
||||
// 清理临时上传的文件和pdf
|
||||
if (File.Exists(pdfFilePath))
|
||||
{
|
||||
File.Delete(pdfFilePath);
|
||||
}
|
||||
if (File.Exists(tempFilePath))
|
||||
{
|
||||
File.Delete(tempFilePath);
|
||||
}
|
||||
// // 清理临时上传的文件和pdf
|
||||
// if (File.Exists(pdfFilePath))
|
||||
// {
|
||||
// File.Delete(pdfFilePath);
|
||||
// }
|
||||
// if (File.Exists(tempFilePath))
|
||||
// {
|
||||
// File.Delete(tempFilePath);
|
||||
// }
|
||||
|
||||
new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(tempPDFName), out var contentType);
|
||||
// new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(tempPDFName), out var contentType);
|
||||
|
||||
return Results.File(fileBytes, contentType);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"下载文件失败: {response.ErrorMessage}");
|
||||
// return Results.File(fileBytes, contentType);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Console.WriteLine($"下载文件失败: {response.ErrorMessage}");
|
||||
|
||||
return Results.Problem("下载文件失败", statusCode: StatusCodes.Status500InternalServerError);
|
||||
// return Results.Problem("下载文件失败", statusCode: StatusCodes.Status500InternalServerError);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Azure.Core;
|
||||
using IdentityModel;
|
||||
using IdentityModel.Client;
|
||||
using IdentityModel.Client;
|
||||
using IRaCIS.Core.Application.Service.OAuth;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
@@ -8,18 +6,11 @@ using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Org.BouncyCastle.Utilities.Net;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using MassTransit.Initializers;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Options;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System.Linq;
|
||||
|
||||
namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
@@ -45,8 +40,10 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
public async Task<IResponseOutput<PageOutput<ImageBackViewModel>>> GetImageBackList(ImageBackQueryDto inQuery)
|
||||
{
|
||||
var svExpression = QCCommon.GetSubjectVisitImageBackRecordFilter(inQuery.VisitPlanArray);
|
||||
var isCRC = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA;
|
||||
|
||||
var query = _subjectVisitImageBackRecordReposiotry.Where(t => t.SubjectVisit.TrialId == inQuery.TrialId)
|
||||
.WhereIf(isCRC == true, t => t.SubjectVisit.Trial.TrialSiteUserList.Any(t => t.UserId == _userInfo.UserRoleId))
|
||||
.WhereIf(inQuery.TrialSiteId != null, t => t.SubjectVisit.TrialSiteId == inQuery.TrialSiteId)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.SubjectVisit.Subject.Code.Contains(inQuery.SubjectCode))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.VisitName), t => t.SubjectVisit.VisitName.Contains(inQuery.VisitName))
|
||||
@@ -458,6 +455,15 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
}
|
||||
|
||||
|
||||
var isFilterIVUSNoneDicom = false;
|
||||
//ivus-在访视的时候visitTaskId==null 需要过滤掉空检查 ,但是在靶段标注的查看访视级别的时候不能过滤
|
||||
if (_subjectVisitRepository.Where(t => t.Id == subjectVisitId).SelectMany(t => t.Trial.TrialReadingCriterionList)
|
||||
.Where(t => (t.CriterionType == CriterionType.IVUS || t.CriterionType == CriterionType.OCT) && t.IsConfirm).Distinct().Count() == 2
|
||||
)
|
||||
{
|
||||
isFilterIVUSNoneDicom = true;
|
||||
}
|
||||
|
||||
return new TrialVisitQADTO
|
||||
{
|
||||
IsSupportQCDownloadImage = isSupportQCImageDownload,
|
||||
@@ -470,7 +476,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
ExistsManual = (await _IReadingImageTaskService.GetManualList(new GetManualListInDto() { TrialId = sv.TrialId })).Count() > 0,
|
||||
SeriesList = temp.SeriesList,
|
||||
RelationInfo = await GetVisitQCSubjectInfo(subjectVisitId),
|
||||
NoneDicomStudyList = await _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId, ignoreQueryFilters: true).ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider).ToListAsync(),
|
||||
NoneDicomStudyList = await _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId, ignoreQueryFilters: true).Where(t => isFilterIVUSNoneDicom ? t.Modality != "IVUS" : true).ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider).ToListAsync(),
|
||||
SubjectClinicalData = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId)
|
||||
.ProjectTo<SubjectClinicalDataDto>(_mapper.ConfigurationProvider, new { subjectVisitId = subjectVisitId, token = _userInfo.UserToken }).FirstOrDefaultAsync()
|
||||
};
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper.EquivalencyExpression;
|
||||
using AutoMapper.EquivalencyExpression;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Application.MassTransit.Command;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Migrations;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System.Linq;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
@@ -238,6 +238,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
return this.Emm - this.Lumen;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 斑块破裂
|
||||
/// </summary>
|
||||
public string PlaqueRupture { get; set; }
|
||||
}
|
||||
|
||||
public class TemplateData
|
||||
@@ -245,6 +250,37 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public string TaskBlindName { get; set; }
|
||||
|
||||
public string SubjectID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 靶段
|
||||
/// </summary>
|
||||
public string TargetSegment { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 靶段备注
|
||||
/// </summary>
|
||||
public string TargetSegmentRemarks { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// ROI段落总长度
|
||||
/// </summary>
|
||||
public string ROIAllLength { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 回撤中的图像帧数
|
||||
/// </summary>
|
||||
public string PullbackFrameCount { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 斑块类型
|
||||
/// </summary>
|
||||
public string PlaqueType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 访视点备注(如有)
|
||||
/// </summary>
|
||||
public string AdjustReason { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
public class OCTFCTUploadData
|
||||
@@ -300,6 +336,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public decimal? LipidAngle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 斑块破裂
|
||||
/// </summary>
|
||||
public string PlaqueRupture { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 斑块愈合
|
||||
/// </summary>
|
||||
public string PlaqueHealing { get; set; }
|
||||
|
||||
|
||||
public decimal? Avg
|
||||
{
|
||||
|
||||
@@ -192,6 +192,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public class GetReadingReportEvaluationOutDto
|
||||
{
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
public object ReportCalculateResult { get; set; }
|
||||
|
||||
@@ -452,6 +453,58 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public List<AdditionalQuestionAnswer> AnswerList { get; set; } = new List<AdditionalQuestionAnswer>();
|
||||
}
|
||||
|
||||
public class GetMarkListInDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 任务Id
|
||||
/// </summary>
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class MarkListInfo
|
||||
{
|
||||
public string MeasureData { get; set; } = string.Empty;
|
||||
|
||||
public string PicturePath { get; set; } = string.Empty;
|
||||
|
||||
public Guid? InstanceId { get; set; }
|
||||
|
||||
public Guid? SeriesId { get; set; }
|
||||
public Guid? StudyId { get; set; }
|
||||
|
||||
public string MarkName { get; set; } = string.Empty;
|
||||
|
||||
public string StudyInstanceUid { get; set; }
|
||||
public string SopInstanceUid { get; set; }
|
||||
|
||||
public int NumberOfFrames { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class NoneDicomMarkInfo
|
||||
{
|
||||
|
||||
public Guid? StudyId { get; set; }
|
||||
|
||||
public Guid? NoneDicomFileId { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
public string PicturePath { get; set; } = string.Empty;
|
||||
public string MeasureData { get; set; } = string.Empty;
|
||||
|
||||
public string MarkTool { get; set; }
|
||||
|
||||
public string MarkName { get; set; }
|
||||
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 标记的唯一标识符
|
||||
/// </summary>
|
||||
public Guid? MarkId { get; set; }
|
||||
}
|
||||
|
||||
public class GetCustomTagInDto
|
||||
{
|
||||
/// <summary>
|
||||
@@ -544,6 +597,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public string Value { get; set; }
|
||||
|
||||
public string DictionaryCode { get; set; }
|
||||
|
||||
public bool IsHighlight { get; set; } = false;
|
||||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class ChartItem
|
||||
@@ -1489,6 +1546,20 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public QuestionClassify? QuestionClassify { get; set; }
|
||||
}
|
||||
|
||||
public class GetFilterTableQuestionInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题分类
|
||||
/// </summary>
|
||||
public QuestionClassify? QuestionClassify { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
public class GetHistoryGlobalInfoOutDto
|
||||
{
|
||||
@@ -2128,6 +2199,21 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public DefaultSegmentNameDto DefaultSegmentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仲裁模式
|
||||
/// </summary>
|
||||
public JudgeMode JudgeModeEnum { get; set; } = JudgeMode.SelectOne;
|
||||
|
||||
/// <summary>
|
||||
/// 裁判规则
|
||||
/// </summary>
|
||||
public JudgeRule JudgeRuleEnum { get; set; } = JudgeRule.Consistent;
|
||||
|
||||
/// <summary>
|
||||
/// 仲裁对象
|
||||
/// </summary>
|
||||
public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.Reading;
|
||||
|
||||
}
|
||||
|
||||
public class GetReadingImgInDto
|
||||
@@ -2366,6 +2452,102 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class GetSingleVisitJudgeAnswerInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class GetSingleVisitJudgeAnswerOutDto
|
||||
{
|
||||
public Guid R1VisitTaskId { get; set; }
|
||||
public Guid R2VisitTaskId { get; set; }
|
||||
public List<SingleVisitJudgeAnswerItemDto> QuestionList { get; set; } = new List<SingleVisitJudgeAnswerItemDto>();
|
||||
}
|
||||
|
||||
public class SingleVisitJudgeAnswerItemDto
|
||||
{
|
||||
public Guid ReadingQuestionId { get; set; }
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
public int ShowOrder { get; set; }
|
||||
public string R1Answer { get; set; } = string.Empty;
|
||||
public string R2Answer { get; set; } = string.Empty;
|
||||
public TableQuestionType? QuestionGenre { get; set; }
|
||||
public string DictionaryCode { get; set; } = string.Empty;
|
||||
public ValueUnit? Unit { get; set; }
|
||||
public string? CustomUnit { get; set; }
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
public JudgeReadingQuestionType QuestionType { get; set; } = JudgeReadingQuestionType.Question;
|
||||
}
|
||||
|
||||
public class GetJudgeFormInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class GetJudgeFormOutDto
|
||||
{
|
||||
public string JudgeResultRemark { get; set; } = string.Empty;
|
||||
public List<string> JudgeResultImagePathList { get; set; } = new List<string>();
|
||||
/// <summary>
|
||||
/// 本次生成裁判的触发问题(包含自动计算题追溯到的源问题)
|
||||
/// </summary>
|
||||
public List<Guid> TriggerJudgeQuestionIds { get; set; } = new List<Guid>();
|
||||
public List<JudgeFormQuestionDto> QuestionList { get; set; } = new List<JudgeFormQuestionDto>();
|
||||
}
|
||||
|
||||
public class JudgeFormQuestionDto
|
||||
{
|
||||
public Guid ReadingQuestionId { get; set; }
|
||||
/// <summary>
|
||||
/// 是否为本次生成裁判的触发问题
|
||||
/// </summary>
|
||||
public bool IsTriggerJudge { get; set; }
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
public ShowQuestion ShowQuestion { get; set; }
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
public int ShowOrder { get; set; }
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
public TableQuestionType? QuestionGenre { get; set; }
|
||||
public string DictionaryCode { get; set; } = string.Empty;
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
public DataSources DataSource { get; set; }
|
||||
public string? CustomUnit { get; set; }
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
public string ClassifyAlgorithms { get; set; }
|
||||
|
||||
public ClassifyType? ClassifyType { get; set; }
|
||||
|
||||
public Guid? ClassifyQuestionId { get; set; }
|
||||
|
||||
|
||||
public JudgeReadingQuestionType QuestionType { get; set; } = JudgeReadingQuestionType.Question;
|
||||
}
|
||||
|
||||
public class SetJudgeFormInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public string JudgeResultRemark { get; set; } = string.Empty;
|
||||
|
||||
public List<string> JudgeResultImagePathList { get; set; } = new List<string>();
|
||||
|
||||
public List<JudgeFormAnswerDto> QuestionList { get; set; } = new List<JudgeFormAnswerDto>();
|
||||
}
|
||||
|
||||
public class JudgeFormAnswerDto
|
||||
{
|
||||
public Guid ReadingQuestionId { get; set; }
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class JudgeReadingInfoDto
|
||||
{
|
||||
public string VisitName { get; set; }
|
||||
@@ -2837,12 +3019,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
}
|
||||
|
||||
|
||||
public class AnswerCombinationDto
|
||||
{
|
||||
public List<string> AnswerGroupA { get; set; }
|
||||
|
||||
public List<string> AnswerGroupB { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class TaskAnswerDto
|
||||
{
|
||||
|
||||
@@ -6,6 +6,104 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
|
||||
public class GetTrialQuestionVisitJudgeRuleInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public decimal VisitNum { get; set; }
|
||||
|
||||
public Guid? ReadingQuestionId { get; set; }
|
||||
}
|
||||
|
||||
public class SetTrialQuestionVisitJudgeRuleInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public decimal VisitNum { get; set; }
|
||||
|
||||
public List<TrialQuestionVisitJudgeRuleItemDto> QuestionList { get; set; } = new List<TrialQuestionVisitJudgeRuleItemDto>();
|
||||
}
|
||||
|
||||
public class CopyTrialQuestionVisitJudgeRuleInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 来源访视
|
||||
/// </summary>
|
||||
public decimal SourceVisitNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 目标访视
|
||||
/// </summary>
|
||||
public decimal TargetVisitNum { get; set; }
|
||||
}
|
||||
|
||||
public class ApplyBaseLineTrialQuestionVisitJudgeRuleInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
public class TrialQuestionVisitJudgeRuleItemDto
|
||||
{
|
||||
public Guid ReadingQuestionTrialId { get; set; }
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
public int ShowOrder { get; set; }
|
||||
public List<string> AnswerGroup { get; set; } = new List<string>();
|
||||
public JudgeTypeEnum JudgeType { get; set; }
|
||||
public decimal? JudgeDifferenceValue { get; set; }
|
||||
public JudgeDifferenceType JudgeDifferenceType { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
||||
public string PageName { get; set; }
|
||||
|
||||
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题类型
|
||||
/// </summary>
|
||||
public TableQuestionType? QuestionGenre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字典code
|
||||
/// </summary>
|
||||
public string DictionaryCode { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
public string CustomUnit { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 答案组合
|
||||
/// </summary>
|
||||
public List<AnswerCombinationDto> AnswerCombination { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class TumorAssessmentView : AddOrUpdateTumorAssessmentInDto
|
||||
{
|
||||
@@ -702,6 +800,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
public class SetTrialJudgeRuleInfoInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public JudgeMode JudgeModeEnum { get; set; } = JudgeMode.SelectOne;
|
||||
public JudgeRule JudgeRuleEnum { get; set; } = JudgeRule.Consistent;
|
||||
public JudgeGenerate JudgeGenerateEnum { get; set; } = JudgeGenerate.Instant;
|
||||
}
|
||||
|
||||
public class GetTrialJudgyInfoOutDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
@@ -717,6 +825,24 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// 仲裁规则
|
||||
/// </summary>
|
||||
public ArbitrationRule ArbitrationRule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仲裁模式
|
||||
/// </summary>
|
||||
public JudgeMode JudgeModeEnum { get; set; } = JudgeMode.SelectOne;
|
||||
|
||||
/// <summary>
|
||||
/// 裁判规则
|
||||
/// </summary>
|
||||
public JudgeRule JudgeRuleEnum { get; set; } = JudgeRule.Consistent;
|
||||
|
||||
/// <summary>
|
||||
/// 裁判任务生成
|
||||
/// </summary>
|
||||
public JudgeGenerate JudgeGenerateEnum { get; set; } = JudgeGenerate.Instant;
|
||||
|
||||
public bool IsSigned { get; set; } = false;
|
||||
|
||||
}
|
||||
|
||||
public enum NeedSynchronize
|
||||
@@ -1002,6 +1128,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ImageTool { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改类型
|
||||
/// </summary>
|
||||
public AddDeleteType AddDeleteTypeEnum { get; set; } = AddDeleteType.Arbitrium;
|
||||
|
||||
/// <summary>
|
||||
/// 影像工具属性
|
||||
/// </summary>
|
||||
@@ -1620,6 +1751,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public bool IsGetAll { get; set; } = false;
|
||||
|
||||
public bool IsGetJudge { get; set; } = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2483,6 +2616,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ImageTool { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改类型
|
||||
/// </summary>
|
||||
public AddDeleteType AddDeleteTypeEnum { get; set; } = AddDeleteType.Arbitrium;
|
||||
|
||||
/// <summary>
|
||||
/// 影像工具属性
|
||||
/// </summary>
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
Task TriggerJudgeQuestion(Guid visitTaskId);
|
||||
Task<IResponseOutput> SubmitVisitTaskQuestions(SubmitVisitTaskQuestionsInDto inDto);
|
||||
|
||||
Task<IResponseOutput> SubmitJudgeForm(SetJudgeFormInDto inDto);
|
||||
Task<IResponseOutput> SubmitJudgeVisitTaskResult(SaveJudgeVisitTaskResult inDto);
|
||||
|
||||
Task<GetOncologyReadingInfoOutDto> GetOncologyReadingInfo(GetOncologyReadingInfoInDto inDto);
|
||||
|
||||
+23
-21
@@ -1,16 +1,12 @@
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
@@ -250,9 +246,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
var visitTaskAnswer = await _readingTaskQuestionAnswerRepository.Where(x => taskIds.Contains(x.VisitTaskId) && x.ReadingQuestionTrial.IsJudgeQuestion).Select(x => new JudgeQuestionAnswerInfo
|
||||
{
|
||||
Answer = x.Answer,
|
||||
Unit=x.ReadingQuestionTrial.Unit,
|
||||
ValueType=x.ReadingQuestionTrial.ValueType,
|
||||
CustomUnit=x.ReadingQuestionTrial.CustomUnit,
|
||||
Unit = x.ReadingQuestionTrial.Unit,
|
||||
ValueType = x.ReadingQuestionTrial.ValueType,
|
||||
CustomUnit = x.ReadingQuestionTrial.CustomUnit,
|
||||
VisitTaskId = x.VisitTaskId,
|
||||
DictionaryCode = x.ReadingQuestionTrial.DictionaryCode,
|
||||
ShowOrder = x.ReadingQuestionTrial.ShowOrder,
|
||||
@@ -647,8 +643,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpPost]
|
||||
public async Task<string> TestGetJointMedicalReviewDialog(Guid id)
|
||||
{
|
||||
var dialog = await _readingMedicalReviewDialogRepository.Where(x => x.Id == id)
|
||||
.ProjectTo<GetMedicalReviewDialogOutDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||
var dialog = await _readingMedicalReviewDialogRepository.Where(x => x.Id == id)
|
||||
.ProjectTo<GetMedicalReviewDialogOutDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||
|
||||
|
||||
Dictionary<string, string> i18NKeys = new Dictionary<string, string>()
|
||||
@@ -665,11 +661,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
};
|
||||
|
||||
var i18Values = i18NKeys.Select(x => x.Value).ToList();
|
||||
var i18nList=await _internationalizationRepository.Where(x => i18Values.Contains(x.Code))
|
||||
.Select(x => new
|
||||
var i18nList = await _internationalizationRepository.Where(x => i18Values.Contains(x.Code))
|
||||
.Select(x => new
|
||||
{
|
||||
Code= x.Code,
|
||||
Value= _userInfo.IsEn_Us?x.Value:x.ValueCN
|
||||
Code = x.Code,
|
||||
Value = _userInfo.IsEn_Us ? x.Value : x.ValueCN
|
||||
}).ToListAsync();
|
||||
|
||||
List<string> dictionaryCodeList = new List<string>()
|
||||
@@ -680,16 +676,16 @@ namespace IRaCIS.Core.Application.Service
|
||||
"YesOrNo",
|
||||
};
|
||||
|
||||
var dictionadParents=await _dictionaryRepository.Where(x=> dictionaryCodeList.Contains(x.Parent.Code))
|
||||
var dictionadParents = await _dictionaryRepository.Where(x => dictionaryCodeList.Contains(x.Parent.Code))
|
||||
.Select(x => new
|
||||
{
|
||||
ParentCode = x.Parent.Code,
|
||||
Code=x.Code,
|
||||
Code = x.Code,
|
||||
Value = _userInfo.IsEn_Us ? x.Value : x.ValueCN
|
||||
}).ToListAsync();
|
||||
|
||||
JointMedicalReviewI18n i18N = new JointMedicalReviewI18n() { };
|
||||
foreach (var kv in i18NKeys)
|
||||
foreach (var kv in i18NKeys)
|
||||
{
|
||||
PropertyInfo? pi = i18N.GetType().GetProperty(kv.Key);
|
||||
if (pi != null && pi.CanWrite)
|
||||
@@ -710,7 +706,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
}
|
||||
|
||||
return await JointMedicalReviewDialog(dialog,i18N);
|
||||
return await JointMedicalReviewDialog(dialog, i18N);
|
||||
|
||||
|
||||
|
||||
@@ -914,7 +910,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpPost]
|
||||
public async Task<GetIRMedicalFeedbackListOutDto> GetNextIRMedicalFeedback(GetNextIRMedicalFeedbackInDto inDto)
|
||||
{
|
||||
var list = await GetIRMedicalFeedbackList(new GetIRMedicalFeedbackListInDto()
|
||||
var responseOutput = await GetIRMedicalFeedbackList(new GetIRMedicalFeedbackListInDto()
|
||||
{
|
||||
TrialId = inDto.TrialId,
|
||||
TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
||||
@@ -923,6 +919,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
PageSize = 99999,
|
||||
});
|
||||
|
||||
var list = responseOutput.Data;
|
||||
|
||||
var index = list.CurrentPageData.ToList().FindIndex(x => x.Id == inDto.TaskMedicalReviewId);
|
||||
|
||||
var result = new GetIRMedicalFeedbackListOutDto() { };
|
||||
@@ -953,12 +951,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<GetIRMedicalFeedbackListOutDto>> GetIRMedicalFeedbackList(GetIRMedicalFeedbackListInDto inDto)
|
||||
public async Task<IResponseOutput<PageOutput<GetIRMedicalFeedbackListOutDto>>> GetIRMedicalFeedbackList(GetIRMedicalFeedbackListInDto inDto)
|
||||
{
|
||||
var taskMedicalReviewquery = _taskMedicalReviewRepository.Where(x => x.TrialId == inDto.TrialId).Include(x => x.VisitTask)
|
||||
.Where(x => x.VisitTask.DoctorUserId == _userInfo.UserRoleId)
|
||||
.Where(x => x.IsHaveQuestion)
|
||||
.WhereIf(!inDto.TaskBlindName.IsNullOrEmpty(), x => x.VisitTask.TaskBlindName == inDto.TaskBlindName)
|
||||
.WhereIf(!inDto.TaskBlindName.IsNullOrEmpty(), x => x.VisitTask.TaskBlindName.Contains(inDto.TaskBlindName))
|
||||
.WhereIf(inDto.SubjectId != null, x => x.VisitTask.SubjectId == inDto.SubjectId!)
|
||||
.WhereIf(inDto.IsUrgent != null, x => x.VisitTask.IsUrgent == inDto.IsUrgent!)
|
||||
.WhereIf(inDto.AuditState != null, x => x.AuditState == inDto.AuditState!)
|
||||
@@ -1008,7 +1006,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var result = await taskMedicalReviewquery.ToPagedListAsync(inDto, nameof(GetIRMedicalFeedbackListOutDto.AuditState));
|
||||
|
||||
return result;
|
||||
var criterionInfo = await _readingQuestionCriterionTrial.Where(t => t.Id == inDto.TrialReadingCriterionId)
|
||||
.Select(t => new { t.IsReadingTaskViewInOrder }).FirstNotNullAsync();
|
||||
|
||||
return ResponseOutput.Ok(result, criterionInfo);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+51
-3
@@ -370,13 +370,62 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
TrialId = x.TrialId,
|
||||
IsReadingTaskViewInOrder = x.IsReadingTaskViewInOrder,
|
||||
ArbitrationRule = x.ArbitrationRule,
|
||||
IsArbitrationReading = x.IsArbitrationReading
|
||||
|
||||
IsArbitrationReading = x.IsArbitrationReading,
|
||||
JudgeModeEnum = x.JudgeModeEnum,
|
||||
JudgeRuleEnum = x.JudgeRuleEnum,
|
||||
JudgeGenerateEnum = x.JudgeGenerateEnum,
|
||||
IsSigned = x.IsSigned,
|
||||
}).FirstNotNullAsync();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑裁判规则配置
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetTrialJudgeRuleInfo(SetTrialJudgeRuleInfoInDto inDto)
|
||||
{
|
||||
if (inDto.JudgeRuleEnum == JudgeRule.Consistent)
|
||||
{
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId&& x.IsJudgeQuestion && x.LimitShow != LimitShow.AllShow))
|
||||
{
|
||||
|
||||
|
||||
var questionList = await _readingQuestionTrialRepository
|
||||
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId && x.IsJudgeQuestion && x.LimitShow != LimitShow.AllShow)
|
||||
.OrderBy(x => x.ShowOrder)
|
||||
.Select(x => new TrialQuestionVisitJudgeRuleItemDto
|
||||
{
|
||||
ReadingQuestionTrialId = x.Id,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
Type = x.Type,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
var questionName=string.Join(",", questionList.Select(x => x.QuestionName));
|
||||
|
||||
|
||||
//---当前标准裁判规则为一致性,但存在非全部显示的裁判问题,操作失败
|
||||
throw new BusinessValidationFailedException(_localizer["JudgeCanNotLimitShow", questionName]);
|
||||
}
|
||||
}
|
||||
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
||||
{
|
||||
JudgeModeEnum = inDto.JudgeModeEnum,
|
||||
JudgeRuleEnum = inDto.JudgeRuleEnum,
|
||||
JudgeGenerateEnum = inDto.JudgeGenerateEnum,
|
||||
});
|
||||
|
||||
return ResponseOutput.Ok(await _readingQuestionCriterionTrialRepository.SaveChangesAsync());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改项目问题标准(项目)
|
||||
/// </summary>
|
||||
@@ -482,7 +531,6 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
return ResponseOutput.Ok(result);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 项目阅片标准问题分页
|
||||
|
||||
+271
-2
@@ -1,3 +1,4 @@
|
||||
using DocumentFormat.OpenXml.Office.SpreadSheetML.Y2023.MsForms;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
@@ -33,10 +34,225 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<OrganInfo> _organInfoRepository,
|
||||
IRepository<ReadingTableQuestionSystem> _readingTableQuestionSystemRepository,
|
||||
IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer,
|
||||
IRepository<PreviousPDF> _previousPDFRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IReadingQuestionService
|
||||
IRepository<PreviousPDF> _previousPDFRepository,
|
||||
IRepository<ReadingQuestionVisitJudgeRule> _readingQuestionVisitJudgeRuleRepository,
|
||||
IRepository<VisitStage> _visitStageRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IReadingQuestionService
|
||||
|
||||
{
|
||||
|
||||
#region 项目访视裁判规则
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目阅片标准各访视的裁判规则配置。
|
||||
/// 未配置规则的访视问题也会返回,供前端直接进行配置。
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public async Task<List<TrialQuestionVisitJudgeRuleItemDto>> GetTrialQuestionVisitJudgeRule(GetTrialQuestionVisitJudgeRuleInDto inDto)
|
||||
{
|
||||
var questionList = await _readingQuestionTrialRepository
|
||||
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId && x.IsJudgeQuestion)
|
||||
.Where(x => x.LimitShow == LimitShow.AllShow
|
||||
|| (x.LimitShow == LimitShow.BaseLineShow && inDto.VisitNum == 0)
|
||||
|| (x.LimitShow == LimitShow.FollowShow && inDto.VisitNum != 0)
|
||||
|| (x.LimitShow == LimitShow.ExcludeSomeVisits && !x.ExcludeShowVisitList.Contains(inDto.VisitNum)))
|
||||
.WhereIf(inDto.ReadingQuestionId != null, x => x.Id == inDto.ReadingQuestionId)
|
||||
.OrderBy(x => x.ShowOrder)
|
||||
.Select(x => new TrialQuestionVisitJudgeRuleItemDto
|
||||
{
|
||||
ReadingQuestionTrialId = x.Id,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
Type = x.Type,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
var questionIds = questionList.Select(x => x.ReadingQuestionTrialId).ToList();
|
||||
var ruleList = await _readingQuestionVisitJudgeRuleRepository
|
||||
.Where(x => x.VisitNum == inDto.VisitNum && questionIds.Contains(x.ReadingQuestionId))
|
||||
.ToListAsync();
|
||||
|
||||
return questionList.Select(question =>
|
||||
{
|
||||
var rule = ruleList.FirstOrDefault(x => x.ReadingQuestionId == question.ReadingQuestionTrialId);
|
||||
return new TrialQuestionVisitJudgeRuleItemDto
|
||||
{
|
||||
ReadingQuestionTrialId = question.ReadingQuestionTrialId,
|
||||
QuestionName = question.QuestionName,
|
||||
ShowOrder = question.ShowOrder,
|
||||
Type = question.Type,
|
||||
PageName = question.PageName,
|
||||
TypeValue = question.TypeValue,
|
||||
QuestionGenre = question.QuestionGenre,
|
||||
DictionaryCode = question.DictionaryCode,
|
||||
Unit = question.Unit,
|
||||
CustomUnit = question.CustomUnit,
|
||||
AnswerGroup = rule?.AnswerGroup ?? new List<string>(),
|
||||
AnswerCombination = rule?.AnswerCombination ?? new List<AnswerCombinationDto>(),
|
||||
JudgeType = rule?.JudgeType ?? JudgeTypeEnum.None,
|
||||
JudgeDifferenceValue = rule?.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = rule?.JudgeDifferenceType ?? default,
|
||||
};
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑项目阅片标准各访视的裁判规则配置。
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetTrialQuestionVisitJudgeRule(SetTrialQuestionVisitJudgeRuleInDto inDto)
|
||||
{
|
||||
var questionIds = inDto.QuestionList.Select(x => x.ReadingQuestionTrialId).ToList();
|
||||
|
||||
await _readingQuestionVisitJudgeRuleRepository.BatchDeleteNoTrackingAsync(x =>
|
||||
x.VisitNum == inDto.VisitNum && questionIds.Contains(x.ReadingQuestionId));
|
||||
|
||||
var rules = inDto.QuestionList.Select(question => new ReadingQuestionVisitJudgeRule
|
||||
{
|
||||
Id = NewId.NextGuid(),
|
||||
ReadingQuestionId = question.ReadingQuestionTrialId,
|
||||
VisitNum = inDto.VisitNum,
|
||||
AnswerGroup = question.AnswerGroup ?? new List<string>(),
|
||||
AnswerCombination = question.AnswerCombination ?? new List<AnswerCombinationDto>(),
|
||||
JudgeType = question.JudgeType,
|
||||
JudgeDifferenceValue = question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
}).ToList();
|
||||
|
||||
if (rules.Count > 0)
|
||||
{
|
||||
await _readingQuestionVisitJudgeRuleRepository.AddRangeAsync(rules);
|
||||
}
|
||||
|
||||
return ResponseOutput.Result(await _readingQuestionVisitJudgeRuleRepository.SaveChangesAsync());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 复制其他访视的项目阅片标准裁判规则配置。
|
||||
/// 目标访视不适用的问题保留其已有的不适用规则,不参与复制。
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> CopyTrialQuestionVisitJudgeRule(CopyTrialQuestionVisitJudgeRuleInDto inDto)
|
||||
{
|
||||
var targetQuestionIds = await _readingQuestionTrialRepository
|
||||
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId && x.IsJudgeQuestion)
|
||||
.Where(x => x.LimitShow == LimitShow.AllShow
|
||||
|| (x.LimitShow == LimitShow.BaseLineShow && inDto.TargetVisitNum == 0)
|
||||
|| (x.LimitShow == LimitShow.FollowShow && inDto.TargetVisitNum != 0)
|
||||
|| (x.LimitShow == LimitShow.ExcludeSomeVisits && !x.ExcludeShowVisitList.Contains(inDto.TargetVisitNum)))
|
||||
.Select(x => x.Id)
|
||||
.ToListAsync();
|
||||
|
||||
if (targetQuestionIds.Count == 0)
|
||||
{
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
var sourceRules = await _readingQuestionVisitJudgeRuleRepository
|
||||
.Where(x => x.VisitNum == inDto.SourceVisitNum && targetQuestionIds.Contains(x.ReadingQuestionId))
|
||||
.ToListAsync();
|
||||
|
||||
await _readingQuestionVisitJudgeRuleRepository.BatchDeleteNoTrackingAsync(x =>
|
||||
x.VisitNum == inDto.TargetVisitNum && targetQuestionIds.Contains(x.ReadingQuestionId));
|
||||
|
||||
var targetRules = sourceRules.Select(rule => new ReadingQuestionVisitJudgeRule
|
||||
{
|
||||
Id = NewId.NextGuid(),
|
||||
ReadingQuestionId = rule.ReadingQuestionId,
|
||||
VisitNum = inDto.TargetVisitNum,
|
||||
AnswerGroup = rule.AnswerGroup,
|
||||
AnswerCombination = rule.AnswerCombination,
|
||||
JudgeType = rule.JudgeType,
|
||||
JudgeDifferenceValue = rule.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = rule.JudgeDifferenceType,
|
||||
}).ToList();
|
||||
|
||||
if (targetRules.Count > 0)
|
||||
{
|
||||
await _readingQuestionVisitJudgeRuleRepository.AddRangeAsync(targetRules);
|
||||
}
|
||||
|
||||
return ResponseOutput.Result(await _readingQuestionVisitJudgeRuleRepository.SaveChangesAsync());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将基线访视(VisitNum = 0)的裁判规则配置应用到其他所有访视。
|
||||
/// 仅复制在基线和目标访视均适用的问题;目标访视不适用的问题保留其已有规则。
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> ApplyBaseLineTrialQuestionVisitJudgeRule(ApplyBaseLineTrialQuestionVisitJudgeRuleInDto inDto)
|
||||
{
|
||||
var trialCriterion = await _readingQuestionCriterionTrialRepository
|
||||
.Where(x => x.Id == inDto.TrialReadingCriterionId)
|
||||
.FirstNotNullAsync();
|
||||
|
||||
var targetVisitNums = await _visitStageRepository
|
||||
.Where(x => x.TrialId == trialCriterion.TrialId && x.VisitNum != 0)
|
||||
.Select(x => x.VisitNum)
|
||||
.Distinct()
|
||||
.ToListAsync();
|
||||
|
||||
// 计划外访视不在 VisitStage 中,也应同步基线规则。
|
||||
targetVisitNums.Add(-1);
|
||||
targetVisitNums = targetVisitNums.Distinct().ToList();
|
||||
|
||||
var rulesToAdd = new List<ReadingQuestionVisitJudgeRule>();
|
||||
foreach (var targetVisitNum in targetVisitNums)
|
||||
{
|
||||
// 仅保留在基线和当前目标访视都显示的问题。
|
||||
var targetQuestionIds = await _readingQuestionTrialRepository
|
||||
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId && x.IsJudgeQuestion)
|
||||
.Where(x => x.LimitShow == LimitShow.AllShow
|
||||
|| (x.LimitShow == LimitShow.ExcludeSomeVisits
|
||||
&& !x.ExcludeShowVisitList.Contains(0)
|
||||
&& !x.ExcludeShowVisitList.Contains(targetVisitNum)))
|
||||
.Select(x => x.Id)
|
||||
.ToListAsync();
|
||||
|
||||
if (targetQuestionIds.Count == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var baseLineRules = await _readingQuestionVisitJudgeRuleRepository
|
||||
.Where(x => x.VisitNum == 0 && targetQuestionIds.Contains(x.ReadingQuestionId))
|
||||
.ToListAsync();
|
||||
|
||||
await _readingQuestionVisitJudgeRuleRepository.BatchDeleteNoTrackingAsync(x =>
|
||||
x.VisitNum == targetVisitNum && targetQuestionIds.Contains(x.ReadingQuestionId));
|
||||
|
||||
rulesToAdd.AddRange(baseLineRules.Select(rule => new ReadingQuestionVisitJudgeRule
|
||||
{
|
||||
Id = NewId.NextGuid(),
|
||||
ReadingQuestionId = rule.ReadingQuestionId,
|
||||
VisitNum = targetVisitNum,
|
||||
AnswerGroup = rule.AnswerGroup,
|
||||
AnswerCombination = rule.AnswerCombination,
|
||||
JudgeType = rule.JudgeType,
|
||||
JudgeDifferenceValue = rule.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = rule.JudgeDifferenceType,
|
||||
}));
|
||||
}
|
||||
|
||||
if (rulesToAdd.Count > 0)
|
||||
{
|
||||
await _readingQuestionVisitJudgeRuleRepository.AddRangeAsync(rulesToAdd);
|
||||
await _readingQuestionVisitJudgeRuleRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
return ResponseOutput.Result(true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取计算问题
|
||||
|
||||
@@ -570,7 +786,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
if (isArbitrationReading && (await _readingQuestionTrialRepository.AnyAsync(x => x.Id == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None)))
|
||||
{
|
||||
//---当前问题已经设置了裁判标准了,修改失败
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_JudgmentSet"]);
|
||||
// throw new BusinessValidationFailedException(_localizer["ReadingQuestion_JudgmentSet"]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -620,9 +836,61 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
|
||||
var entity = await _readingQuestionTrialRepository.InsertOrUpdateAsync(indto, true);
|
||||
await AddNAJudgeRule(entity);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加问题的不适用规则
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task AddNAJudgeRule(ReadingQuestionTrial entity)
|
||||
{
|
||||
List<decimal> visitNums = new List<decimal>();
|
||||
if (entity.IsJudgeQuestion)
|
||||
{
|
||||
var visitStageNums = await _visitStageRepository
|
||||
.Where(x => x.TrialId == entity.TrialId)
|
||||
.Select(x => x.VisitNum)
|
||||
.Distinct()
|
||||
.ToListAsync();
|
||||
|
||||
switch (entity.LimitShow)
|
||||
{
|
||||
case LimitShow.BaseLineShow:
|
||||
visitNums = visitStageNums.Where(x => x > 0).ToList();
|
||||
visitNums.Add(-1);
|
||||
break;
|
||||
case LimitShow.FollowShow:
|
||||
visitNums.Add(0);
|
||||
break;
|
||||
case LimitShow.ExcludeSomeVisits:
|
||||
visitNums = entity.ExcludeShowVisitList;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (visitNums.Count==0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
await _readingQuestionVisitJudgeRuleRepository.BatchDeleteNoTrackingAsync(x =>
|
||||
x.ReadingQuestionId == entity.Id && visitNums.Contains(x.VisitNum));
|
||||
|
||||
var rules = visitNums.Select(visitNum => new ReadingQuestionVisitJudgeRule
|
||||
{
|
||||
Id = NewId.NextGuid(),
|
||||
ReadingQuestionId = entity.Id,
|
||||
VisitNum = visitNum,
|
||||
JudgeType = JudgeTypeEnum.NotApplicable,
|
||||
}).ToList();
|
||||
|
||||
await _readingQuestionVisitJudgeRuleRepository.AddRangeAsync(rules);
|
||||
await _readingQuestionVisitJudgeRuleRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目问题(项目)
|
||||
/// </summary>
|
||||
@@ -687,6 +955,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
if (inDto.TrialReadingCriterionId != null)
|
||||
{
|
||||
return await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId)
|
||||
.WhereIf(inDto.IsGetJudge,x=>x.IsJudgeQuestion)
|
||||
.WhereIf(!inDto.IsGetAll, x => x.DataSource == DataSources.Automatic && x.Type == "number")
|
||||
.Select(x => new CalculateRelationDto()
|
||||
{
|
||||
|
||||
+162
-13
@@ -1,31 +1,21 @@
|
||||
using Amazon.Runtime.Internal.Transform;
|
||||
using DocumentFormat.OpenXml;
|
||||
using DocumentFormat.OpenXml.Drawing.Charts;
|
||||
using DocumentFormat.OpenXml.Office2019.Excel.ThreadedComments;
|
||||
using DocumentFormat.OpenXml;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Helper.OtherTool;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.ImageAndDoc;
|
||||
using IRaCIS.Core.Application.Service.OAuth;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.Service.ReadingCalculate.Interface;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using NPOI.POIFS.Properties;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using System.Linq;
|
||||
using ZiggyCreatures.Caching.Fusion;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
@@ -36,6 +26,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
public partial class ReadingImageTaskService(
|
||||
IRepository<NoneDicomStudy> _noneDicomStudyRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<VisitStage> _visitStageRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<TaskInstance> _taskInstanceRepository,
|
||||
IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository,
|
||||
@@ -61,6 +52,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<ReadModule> _readModuleRepository,
|
||||
IRepository<DicomInstance> _dicomInstanceRepository,
|
||||
IRepository<OrganInfo> _organInfoRepository,
|
||||
IRepository<TrialUserRole> _trialUserRoleRepository,
|
||||
IRepository<EmailNoticeUserType> _emailNoticeUserTypeRepository,
|
||||
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
||||
IRepository<OrganTrialInfo> _organTrialInfoRepository,
|
||||
IRepository<TrialDocument> _trialDocumentRepository,
|
||||
ILuganoCalculateService _luganoCalculateService,
|
||||
@@ -73,6 +67,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository,
|
||||
IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||
IRepository<ReadingQuestionVisitJudgeRule> _readingQuestionVisitJudgeRuleRepository,
|
||||
IRepository<ReadingQuestionSystem> _readingQuestionSystem,
|
||||
IRepository<CriterionKeyFileRead> _criterionKeyFileReadRepository,
|
||||
IRepository<TrialCriterionKeyFile> _trialCriterionKeyFileRepository,
|
||||
@@ -80,10 +75,27 @@ namespace IRaCIS.Core.Application.Service
|
||||
IGeneralCalculateService _generalCalculateService,
|
||||
IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository,
|
||||
IRepository<TaskStudy> _taskStudyRepository,
|
||||
IConfiguration _config,
|
||||
IDownloadAndUploadService _downloadAndUploadService,
|
||||
ITrialEmailNoticeConfigService _trialEmailNoticeConfigService,
|
||||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, IReadingImageTaskService
|
||||
{
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 测试异常
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> Test(GetReportsChartSummaryInDto inDto)
|
||||
{
|
||||
var a = 0;
|
||||
var v = 1 / a;
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取报告图表数据
|
||||
@@ -452,6 +464,81 @@ namespace IRaCIS.Core.Application.Service
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取标记信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<MarkListInfo>> GetMarkList(GetMarkListInDto inDto)
|
||||
{
|
||||
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId&&x.InstanceId!=null)
|
||||
.Select(x => new MarkListInfo() {
|
||||
|
||||
MeasureData = x.MeasureData,
|
||||
PicturePath = x.PicturePath,
|
||||
InstanceId = x.InstanceId,
|
||||
SeriesId = x.SeriesId,
|
||||
StudyId = x.StudyId,
|
||||
MarkName= x.OrderMarkName,
|
||||
SopInstanceUid = x.Instance.SopInstanceUid,
|
||||
StudyInstanceUid = x.Instance.StudyInstanceUid,
|
||||
NumberOfFrames= x.Instance.NumberOfFrames,
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
var rowMarkList=await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.InstanceId != null)
|
||||
.Select(x => new MarkListInfo()
|
||||
{
|
||||
|
||||
MeasureData = x.MeasureData,
|
||||
PicturePath = x.PicturePath,
|
||||
InstanceId = x.InstanceId,
|
||||
SeriesId = x.SeriesId,
|
||||
StudyId = x.StudyId,
|
||||
MarkName = x.RowMark,
|
||||
SopInstanceUid = x.Instance.SopInstanceUid,
|
||||
StudyInstanceUid = x.Instance.StudyInstanceUid,
|
||||
NumberOfFrames = x.Instance.NumberOfFrames,
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
return questionMarkList.Union(rowMarkList).OrderBy(x=>x.MarkName).ToList();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取非DICOM标记信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<NoneDicomMarkInfo>> GetNoneDicomMarkList(GetMarkListInDto inDto)
|
||||
{
|
||||
var markList = await _readingNoneDicomMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Include(x => x.NoneDicomStudyFile)
|
||||
.Select(x => new NoneDicomMarkInfo()
|
||||
{
|
||||
StudyId = x.StudyId,
|
||||
NoneDicomFileId = x.NoneDicomFileId,
|
||||
Path = x.Path,
|
||||
PicturePath = x.PicturePath,
|
||||
MeasureData = x.MeasureData,
|
||||
MarkTool = x.MarkTool,
|
||||
MarkName = x.OrderMarkName,
|
||||
FileName = x.NoneDicomStudyFile==null? string.Empty: x.NoneDicomStudyFile.FileName,
|
||||
MarkId = x.MarkId,
|
||||
}).ToListAsync();
|
||||
|
||||
return markList.OrderBy(x => x.MarkName).ToList();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取手册
|
||||
/// </summary>
|
||||
@@ -1330,6 +1417,38 @@ namespace IRaCIS.Core.Application.Service
|
||||
}); ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单个表格问题及答案 过滤问题
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> GetFilterTableQuestion(GetFilterTableQuestionInDto inDto)
|
||||
{
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository
|
||||
.ProjectTo<ReadingTableQuestionAnswerInfo>(_mapper.ConfigurationProvider)
|
||||
.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
|
||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
var organIds = tableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
var organList = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync();
|
||||
var questionPage = await GetReadingTableQuestion(
|
||||
new GetReadingTableQuestionOrAnswerInDto()
|
||||
{
|
||||
TrialReadingCriterionId = taskinfo.TrialReadingCriterionId,
|
||||
TaskId = inDto.VisitTaskId,
|
||||
TableAnswers = tableAnswers,
|
||||
TableAnsweRowInfos = tableAnsweRowInfos,
|
||||
OrganInfos = organList,
|
||||
QuestionClassify = inDto.QuestionClassify,
|
||||
});
|
||||
|
||||
|
||||
var result = questionPage.SinglePage.SelectMany(x => x.Childrens).Where(x => x.Id == inDto.QuestionId).FirstOrDefault();
|
||||
|
||||
return ResponseOutput.Ok(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取自定义问题以及答案
|
||||
/// </summary>
|
||||
@@ -3363,6 +3482,29 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||
{
|
||||
// 验证一个问题不能有多个答案
|
||||
bool hasDuplicate = await _readingTaskQuestionAnswerRepository
|
||||
.Where(x => x.VisitTaskId == inDto.VisitTaskId)
|
||||
.GroupBy(x => x.ReadingQuestionTrialId)
|
||||
.AnyAsync(g => g.Count() > 1);
|
||||
|
||||
if (hasDuplicate)
|
||||
{
|
||||
try
|
||||
{
|
||||
_ = SendWeComNotifier(inDto.VisitTaskId, "阅片问题答案有重复");
|
||||
_ = SendAbnormalEmail(inDto.VisitTaskId, EmailBusinessScenario.RepeatedVisitAnswers);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_VisitAnswerRepeated"]);
|
||||
}
|
||||
|
||||
|
||||
//验证后处理影像必须传
|
||||
if (_visitTaskRepository.Any(t => t.Id == inDto.VisitTaskId && t.TrialReadingCriterion.ImageUploadEnum != ReadingImageUpload.None))
|
||||
{
|
||||
@@ -3794,6 +3936,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
x.ReadingToolList,
|
||||
x.CircleRadius,
|
||||
x.DefaultSegmentName,
|
||||
x.JudgeGenerateEnum,
|
||||
x.JudgeModeEnum,
|
||||
x.JudgeRuleEnum,
|
||||
x.ArbitrationRule,
|
||||
}).FirstNotNullAsync();
|
||||
|
||||
task.IsReadingShowPreviousResults = criterionInfo.IsReadingShowPreviousResults;
|
||||
@@ -3857,6 +4003,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
task.IsViewStudyPart = visitTaskInfo.ReadingCategory == ReadingCategory.Judge || visitTaskInfo.IsViewStudyPart;
|
||||
task.IsReadKeyFile = await _criterionKeyFileReadRepository.AnyAsync(x => x.IdentityUserId == _userInfo.IdentityUserId && x.TrialCriterionId == task.TrialReadingCriterionId);
|
||||
task.IsHaveKeyFile = await _trialCriterionKeyFileRepository.AnyAsync(x => x.TrialCriterionId == task.TrialReadingCriterionId);
|
||||
task.JudgeModeEnum = criterionInfo.JudgeModeEnum;
|
||||
task.JudgeRuleEnum = criterionInfo.JudgeRuleEnum;
|
||||
task.ArbitrationRule = criterionInfo.ArbitrationRule;
|
||||
// 添加默认答案
|
||||
if (inDto.VisitTaskId == null && visitTaskInfo.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||
{
|
||||
|
||||
+696
-32
@@ -1,5 +1,9 @@
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Helper.OtherTool;
|
||||
using IRaCIS.Core.Application.MassTransit.Consumer;
|
||||
using IRaCIS.Core.Application.MassTransit.Consumer.Dto;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
@@ -7,7 +11,10 @@ using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MimeKit;
|
||||
using Newtonsoft.Json;
|
||||
using System.Linq.Dynamic.Core;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
@@ -17,6 +24,29 @@ namespace IRaCIS.Core.Application.Service
|
||||
/// </summary>
|
||||
public partial class ReadingImageTaskService : BaseService, IReadingImageTaskService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 统一生成裁判任务
|
||||
/// </summary>
|
||||
/// <param name=""></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task PhasedGenerationJudge(Guid trialReadingCriterionId)
|
||||
{
|
||||
var visitTaskList = await _visitTaskRepository.Where(x =>
|
||||
x.TrialReadingCriterionId == trialReadingCriterionId
|
||||
&& (x.ReadingCategory == ReadingCategory.Visit||x.ReadingCategory == ReadingCategory.Global)
|
||||
&&x.ReadingTaskState == ReadingTaskState.HaveSigned
|
||||
&&x.TaskState==TaskState.Effect
|
||||
&&!x.IsCalculatedJudge
|
||||
).ToListAsync();
|
||||
|
||||
foreach (var item in visitTaskList)
|
||||
{
|
||||
await TriggerJudgeQuestion(item.Id);
|
||||
}
|
||||
}
|
||||
|
||||
#region 配置裁判问题相关
|
||||
|
||||
/// <summary>
|
||||
@@ -85,6 +115,337 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
#region 获取裁判阅片任务信息
|
||||
|
||||
/// <summary>
|
||||
/// 获取单访视裁判答案
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<GetSingleVisitJudgeAnswerOutDto> GetSingleVisitJudgeAnswer(GetSingleVisitJudgeAnswerInDto inDto)
|
||||
{
|
||||
var judgeDataInfo = await _readingJudgeInfoRepository
|
||||
.Where(x => x.JudgeTaskId == inDto.VisitTaskId)
|
||||
.FirstNotNullAsync();
|
||||
|
||||
var taskIds = new List<Guid> { judgeDataInfo.TaskIdOne, judgeDataInfo.TaskIdTwo };
|
||||
var readingTasks = await _visitTaskRepository
|
||||
.Where(x => taskIds.Contains(x.Id))
|
||||
.Select(x => new
|
||||
{
|
||||
x.Id,
|
||||
x.ArmEnum,
|
||||
x.TrialReadingCriterionId,
|
||||
x.VisitTaskNum,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
var r1Task = readingTasks.First(x => x.ArmEnum == Arm.DoubleReadingArm1);
|
||||
var r2Task = readingTasks.First(x => x.ArmEnum == Arm.DoubleReadingArm2);
|
||||
|
||||
var judgeRule = await _readingQuestionCriterionTrialRepository
|
||||
.Where(x => x.Id == r1Task.TrialReadingCriterionId)
|
||||
.Select(x => x.JudgeRuleEnum)
|
||||
.FirstNotNullAsync();
|
||||
|
||||
var displayQuestions = await GetJudgeDisplayQuestions(r1Task.TrialReadingCriterionId, r1Task.VisitTaskNum, judgeRule, false);
|
||||
var judgeAnswers = displayQuestions
|
||||
.Select(x => new SingleVisitJudgeAnswerItemDto
|
||||
{
|
||||
ReadingQuestionId = x.Id,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
Type = x.Type,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ValueType = x.ValueType,
|
||||
})
|
||||
.ToList();
|
||||
|
||||
var displayQuestionIds = judgeAnswers.Select(x => x.ReadingQuestionId).ToList();
|
||||
var answerList = await _readingTaskQuestionAnswerRepository
|
||||
.Where(x => taskIds.Contains(x.VisitTaskId) && displayQuestionIds.Contains(x.ReadingQuestionTrialId))
|
||||
.Select(x => new
|
||||
{
|
||||
x.VisitTaskId,
|
||||
x.ReadingQuestionTrialId,
|
||||
x.Answer,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
judgeAnswers.ForEach(question =>
|
||||
{
|
||||
question.R1Answer = answerList.FirstOrDefault(x => x.VisitTaskId == r1Task.Id && x.ReadingQuestionTrialId == question.ReadingQuestionId)?.Answer ?? string.Empty;
|
||||
question.R2Answer = answerList.FirstOrDefault(x => x.VisitTaskId == r2Task.Id && x.ReadingQuestionTrialId == question.ReadingQuestionId)?.Answer ?? string.Empty;
|
||||
});
|
||||
|
||||
return new GetSingleVisitJudgeAnswerOutDto
|
||||
{
|
||||
R1VisitTaskId = r1Task.Id,
|
||||
R2VisitTaskId = r2Task.Id,
|
||||
QuestionList = judgeAnswers,
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取裁判表单
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public async Task<GetJudgeFormOutDto> GetJudgeForm(GetJudgeFormInDto inDto)
|
||||
{
|
||||
|
||||
var judgeDataInfo = await _readingJudgeInfoRepository
|
||||
.Where(x => x.JudgeTaskId == inDto.VisitTaskId)
|
||||
.FirstNotNullAsync();
|
||||
|
||||
var taskIds = new List<Guid> { judgeDataInfo.TaskIdOne, judgeDataInfo.TaskIdTwo };
|
||||
|
||||
var readingTask = await _visitTaskRepository
|
||||
.Where(x => taskIds.Contains(x.Id))
|
||||
.Select(x => new
|
||||
{
|
||||
x.Id,
|
||||
x.ArmEnum,
|
||||
x.TrialReadingCriterionId,
|
||||
x.VisitTaskNum,
|
||||
})
|
||||
.FirstNotNullAsync();
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
var judgeRule = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => x.JudgeRuleEnum).FirstNotNullAsync();
|
||||
var questionList = await GetJudgeDisplayQuestions(taskInfo.TrialReadingCriterionId, readingTask.VisitTaskNum, judgeRule, true);
|
||||
var questionIds = questionList.Select(x => x.Id).ToList();
|
||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && questionIds.Contains(x.ReadingQuestionTrialId)).ToListAsync();
|
||||
var triggerJudgeQuestionIds = await GetTriggerJudgeQuestionIds(taskIds, questionList, readingTask.VisitTaskNum, judgeRule);
|
||||
|
||||
// 自动计算题本身触发裁判时,同时标记其所有源问题(包含多层计算依赖)。
|
||||
var calculateQuestions = await _readingQuestionTrialRepository
|
||||
.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId)
|
||||
.ToListAsync();
|
||||
var calculateQuestionMap = calculateQuestions.ToDictionary(x => x.Id);
|
||||
var pendingQuestionIds = new Queue<Guid>(triggerJudgeQuestionIds);
|
||||
while (pendingQuestionIds.Count > 0)
|
||||
{
|
||||
var questionId = pendingQuestionIds.Dequeue();
|
||||
if (!calculateQuestionMap.TryGetValue(questionId, out var question))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (var calculateQuestionId in question.CalculateQuestionList
|
||||
.Where(x => !x.IsTable && x.QuestionId.HasValue)
|
||||
.Select(x => x.QuestionId!.Value))
|
||||
{
|
||||
if (triggerJudgeQuestionIds.Add(calculateQuestionId))
|
||||
{
|
||||
pendingQuestionIds.Enqueue(calculateQuestionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new GetJudgeFormOutDto
|
||||
{
|
||||
JudgeResultRemark = taskInfo.JudgeResultRemark,
|
||||
JudgeResultImagePathList = taskInfo.JudgeResultImagePathList,
|
||||
TriggerJudgeQuestionIds = triggerJudgeQuestionIds.ToList(),
|
||||
QuestionList = questionList.Select(x => new JudgeFormQuestionDto
|
||||
{
|
||||
ReadingQuestionId = x.Id,
|
||||
IsTriggerJudge = triggerJudgeQuestionIds.Contains(x.Id),
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
Type = x.Type,
|
||||
ShowQuestion = x.ShowQuestion,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
Answer = answers.FirstOrDefault(answer => answer.ReadingQuestionTrialId == x.Id)?.Answer ?? string.Empty,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Unit = x.Unit,
|
||||
DataSource = x.DataSource,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ValueType = x.ValueType,
|
||||
|
||||
|
||||
ClassifyQuestionId = x.ClassifyQuestionId,
|
||||
ClassifyAlgorithms = x.ClassifyAlgorithms,
|
||||
ClassifyType = x.ClassifyType
|
||||
}).ToList(),
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重新按当前访视的裁判规则计算实际触发裁判的问题。
|
||||
/// </summary>
|
||||
private async Task<HashSet<Guid>> GetTriggerJudgeQuestionIds(List<Guid> taskIds, List<ReadingQuestionTrial> questionList, decimal visitTaskNum, JudgeRule judgeRule)
|
||||
{
|
||||
var questionIds = questionList.Select(x => x.Id).ToList();
|
||||
var questionAnswers = await (from answer in _readingTaskQuestionAnswerRepository.Where(x => taskIds.Contains(x.VisitTaskId) && questionIds.Contains(x.ReadingQuestionTrialId))
|
||||
join question in _readingQuestionTrialRepository.Where(x => questionIds.Contains(x.Id)) on answer.ReadingQuestionTrialId equals question.Id
|
||||
select new TaskAnswerDto
|
||||
{
|
||||
Answer = answer.Answer,
|
||||
AnswerGroup = question.AnswerGroup,
|
||||
AnswerCombination = question.AnswerCombination,
|
||||
JudgeType = question.JudgeType,
|
||||
JudgeDifferenceValue = question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
QuestionId = question.Id,
|
||||
VisitTaskId = answer.VisitTaskId,
|
||||
VisitTaskNum = visitTaskNum,
|
||||
}).ToListAsync();
|
||||
|
||||
await ApplyVisitJudgeRules(questionAnswers, judgeRule);
|
||||
var groupTasks = questionAnswers.GroupBy(x => new { x.JudgeDifferenceValue, x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination })
|
||||
.Select(x => new GroupTaskAnswerDto
|
||||
{
|
||||
QuestionId = x.Key.QuestionId,
|
||||
AnswerGroup = x.Key.AnswerGroup,
|
||||
AnswerCombination = x.Key.AnswerCombination,
|
||||
JudgeType = x.Key.JudgeType,
|
||||
JudgeDifferenceValue = x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
|
||||
var triggerJudgeQuestionIds = new HashSet<Guid>();
|
||||
ComputeJudgeResult(groupTasks, Guid.Empty, triggerJudgeQuestionIds, false);
|
||||
return triggerJudgeQuestionIds;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑裁判表单
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetJudgeForm(SetJudgeFormInDto inDto)
|
||||
{
|
||||
|
||||
await SaveJudgeForm(inDto);
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
||||
{
|
||||
JudgeResultRemark = inDto.JudgeResultRemark,
|
||||
JudgeResultImagePath = string.Join(',', inDto.JudgeResultImagePathList),
|
||||
|
||||
});
|
||||
|
||||
return ResponseOutput.Result(await _readingTaskQuestionAnswerRepository.SaveChangesAsync());
|
||||
}
|
||||
|
||||
|
||||
private async Task SaveJudgeForm(SetJudgeFormInDto inDto)
|
||||
{
|
||||
|
||||
|
||||
var judgeDataInfo = await _readingJudgeInfoRepository
|
||||
.Where(x => x.JudgeTaskId == inDto.VisitTaskId)
|
||||
.FirstNotNullAsync();
|
||||
|
||||
var taskIds = new List<Guid> { judgeDataInfo.TaskIdOne, judgeDataInfo.TaskIdTwo };
|
||||
|
||||
var readingTask = await _visitTaskRepository
|
||||
.Where(x => taskIds.Contains(x.Id))
|
||||
.Select(x => new
|
||||
{
|
||||
x.Id,
|
||||
x.ArmEnum,
|
||||
x.TrialReadingCriterionId,
|
||||
x.VisitTaskNum,
|
||||
})
|
||||
.FirstNotNullAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
var judgeRule = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => x.JudgeRuleEnum).FirstNotNullAsync();
|
||||
var displayQuestionIds = (await GetJudgeDisplayQuestions(taskInfo.TrialReadingCriterionId, readingTask.VisitTaskNum, judgeRule, true)).Select(x => x.Id).ToList();
|
||||
var submittedQuestionIds = inDto.QuestionList.Select(x => x.ReadingQuestionId).ToList();
|
||||
|
||||
|
||||
await _readingTaskQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && submittedQuestionIds.Contains(x.ReadingQuestionTrialId));
|
||||
if (inDto.QuestionList.Count > 0)
|
||||
{
|
||||
await _readingTaskQuestionAnswerRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingTaskQuestionAnswer
|
||||
{
|
||||
ReadingQuestionTrialId = x.ReadingQuestionId,
|
||||
ReadingQuestionCriterionTrialId = taskInfo.TrialReadingCriterionId,
|
||||
TrialId = taskInfo.TrialId,
|
||||
SubjectId = taskInfo.SubjectId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
Answer = x.Answer,
|
||||
}).ToList());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交裁判表单
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SubmitJudgeForm(SetJudgeFormInDto inDto)
|
||||
{
|
||||
|
||||
await SaveJudgeForm(inDto);
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
||||
{
|
||||
JudgeResultRemark = inDto.JudgeResultRemark,
|
||||
ReadingTaskState = ReadingTaskState.HaveSigned,
|
||||
SignTime=DateTime.Now,
|
||||
JudgeResultImagePath = string.Join(',', inDto.JudgeResultImagePathList),
|
||||
|
||||
});
|
||||
await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
|
||||
|
||||
await SignatureAfter(inDto.VisitTaskId);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
private async Task<List<ReadingQuestionTrial>> GetJudgeDisplayQuestions(Guid trialReadingCriterionId, decimal visitNum, JudgeRule judgeRule,bool isGetShowQuestion)
|
||||
{
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.IsJudgeQuestion)
|
||||
.WhereIf(!isGetShowQuestion,x=>x.ShowQuestion!= ShowQuestion.Hide)
|
||||
.WhereIf(visitNum == 0, x => x.LimitShow != LimitShow.FollowShow)
|
||||
.WhereIf(visitNum != 0, x => x.LimitShow != LimitShow.BaseLineShow)
|
||||
.Where(x=>!(x.LimitShow==LimitShow.ExcludeSomeVisits&&x.ExcludeShowVisitList.Contains(visitNum)))
|
||||
.ToListAsync();
|
||||
|
||||
|
||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == trialReadingCriterionId).FirstNotNullAsync();
|
||||
var questionIds = questionList.Select(x => x.Id).ToList();
|
||||
var visitJudgeRules=new List<ReadingQuestionVisitJudgeRule>();
|
||||
if (judgeRule == JudgeRule.Difference)
|
||||
{
|
||||
if (await _visitStageRepository.AnyAsync(x => x.TrialId == trialCriterion.TrialId && x.VisitNum == visitNum))
|
||||
{
|
||||
visitJudgeRules = await _readingQuestionVisitJudgeRuleRepository.Where(x => questionIds.Contains(x.ReadingQuestionId) && x.VisitNum == visitNum).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
visitJudgeRules = await _readingQuestionVisitJudgeRuleRepository.Where(x => questionIds.Contains(x.ReadingQuestionId) && x.VisitNum == -1).ToListAsync();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
visitJudgeRules = questionList.Select(x => new ReadingQuestionVisitJudgeRule()
|
||||
{
|
||||
ReadingQuestionId = x.Id,
|
||||
AnswerCombination = JsonConvert.DeserializeObject<List<AnswerCombinationDto>>(x.AnswerCombination.IsNullOrEmpty() ? "[]" : x.AnswerCombination),
|
||||
AnswerGroup = JsonConvert.DeserializeObject<List<string>>(x.AnswerGroup.IsNullOrEmpty() ? "[]" : x.AnswerGroup),
|
||||
JudgeDifferenceType = x.JudgeDifferenceType,
|
||||
JudgeType = x.JudgeType,
|
||||
JudgeDifferenceValue = x.JudgeDifferenceValue,
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
|
||||
return questionList
|
||||
.Where(x => visitJudgeRules.FirstOrDefault(rule => rule.ReadingQuestionId == x.Id && rule.VisitNum == -1)?.JudgeType != JudgeTypeEnum.NotApplicable)
|
||||
.OrderBy(x=>x.ShowOrder)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取裁判阅片任务信息
|
||||
/// </summary>
|
||||
@@ -470,8 +831,15 @@ namespace IRaCIS.Core.Application.Service
|
||||
});
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
|
||||
await SignatureAfter(inDto.VisitTaskId);
|
||||
|
||||
return ResponseOutput.Ok(result);
|
||||
}
|
||||
|
||||
private async Task SignatureAfter(Guid visitTaskId)
|
||||
{
|
||||
// 需要判断是否添加肿瘤学任务
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.JudgeVisitTaskId == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.JudgeVisitTaskId == visitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
|
||||
if (taskInfo.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
@@ -508,11 +876,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
// 创建任务关联关系
|
||||
await this.CreateTaskRelated(inDto.VisitTaskId);
|
||||
await this.CreateTaskRelated(visitTaskId);
|
||||
|
||||
await SafeMailHelper.Run(async () => await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(inDto.VisitTaskId));
|
||||
|
||||
return ResponseOutput.Ok(result);
|
||||
await SafeMailHelper.Run(async () => await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(visitTaskId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -554,6 +920,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
List<Guid> visitTaskids = new List<Guid>();
|
||||
|
||||
var visitTask = await _visitTaskRepository.Where(x => x.Id == visitTaskId).AsNoTracking().FirstNotNullAsync();
|
||||
// 计算过 就不计算了
|
||||
if(visitTask.IsCalculatedJudge)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 是否是组件一致性
|
||||
var isGroupAnalysis = false;
|
||||
@@ -618,12 +989,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
x.ArbitrationRule,
|
||||
x.IsGlobalReading,
|
||||
x.IsReadingPeriod,
|
||||
x.JudgeRuleEnum,
|
||||
}).FirstNotNullAsync();
|
||||
|
||||
var noteEqual = false;
|
||||
|
||||
// 判断项目是否设置了裁判
|
||||
if (criterionInfo.IsArbitrationReading)
|
||||
if (criterionInfo.IsArbitrationReading&& !visitTask.IsCalculatedJudge)
|
||||
{
|
||||
// 判断数量是否为2 是否仲裁
|
||||
if (visitTaskids.Count == 2)
|
||||
@@ -661,6 +1033,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
VisitTaskId = questionAnswer.VisitTaskId,
|
||||
};
|
||||
var globalVisitAnswerlist = await globalVisitQuestionQuery.ToListAsync();
|
||||
await ApplyVisitJudgeRules(globalVisitAnswerlist, criterionInfo.JudgeRuleEnum);
|
||||
|
||||
var taskNums = globalVisitAnswerlist.Select(x => x.VisitTaskNum).Distinct().OrderBy(x => x).ToList();
|
||||
|
||||
@@ -676,7 +1049,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(groupTasks);
|
||||
noteEqual = noteEqual || ComputeJudgeResult(groupTasks, visitTask.Id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -691,11 +1064,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
AnswerCombination = question.AnswerCombination,
|
||||
JudgeType = question.JudgeType,
|
||||
QuestionId = question.Id,
|
||||
JudgeDifferenceValue = question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
VisitTaskId = questionAnswet.VisitTaskId,
|
||||
};
|
||||
JudgeDifferenceValue = question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
VisitTaskId = questionAnswet.VisitTaskId,
|
||||
VisitTaskNum = questionAnswet.VisitTask.VisitTaskNum,
|
||||
};
|
||||
var questionAnswerlist = await query.ToListAsync();
|
||||
await ApplyVisitJudgeRules(questionAnswerlist, criterionInfo.JudgeRuleEnum);
|
||||
|
||||
// 将答案进行分组
|
||||
List<GroupTaskAnswerDto> groupTasks = questionAnswerlist.GroupBy(x => new { x.JudgeDifferenceValue, x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
@@ -708,7 +1083,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = ComputeJudgeResult(groupTasks);
|
||||
noteEqual = ComputeJudgeResult(groupTasks, visitTask.Id);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -743,6 +1118,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
else
|
||||
{
|
||||
await ApplyVisitJudgeRules(item.AfterQuestionList, item.VisitNum, criterionInfo.JudgeRuleEnum);
|
||||
await ApplyVisitJudgeRules(twoItem.AfterQuestionList, twoItem.VisitNum, criterionInfo.JudgeRuleEnum);
|
||||
var newlist = item.AfterQuestionList.Where(x => x.QuestionId != null && x.IsJudgeQuestion).ToList().Union(
|
||||
twoItem.AfterQuestionList.Where(x => x.QuestionId != null && x.IsJudgeQuestion).ToList()
|
||||
).ToList();
|
||||
@@ -757,7 +1134,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
JudgeDifferenceValue = x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks);
|
||||
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks, visitTask.Id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -765,6 +1143,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
break;
|
||||
}
|
||||
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => visitTaskids.Contains(x.Id), x => new VisitTask()
|
||||
{
|
||||
IsCalculatedJudge = true
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -804,6 +1187,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
};
|
||||
|
||||
var visitTaskQuestions = await query.ToListAsync();
|
||||
await ApplyVisitJudgeRules(visitTaskQuestions, lastTask.VisitNum, criterionInfo.JudgeRuleEnum);
|
||||
await ApplyVisitJudgeRules(lastTask.AfterQuestionList, lastTask.VisitNum, criterionInfo.JudgeRuleEnum);
|
||||
|
||||
var newlist = visitTaskQuestions.Where(x => x.QuestionId != null).ToList().Union(
|
||||
lastTask.AfterQuestionList.Where(x => x.QuestionId != null).ToList()
|
||||
@@ -819,14 +1204,20 @@ namespace IRaCIS.Core.Application.Service
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks);
|
||||
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks, visitTask.Id);
|
||||
}
|
||||
|
||||
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x =>x.Id ==visitTask.Id, x => new VisitTask()
|
||||
{
|
||||
IsCalculatedJudge = true
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -921,33 +1312,300 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 应用访视裁判规则 以及剔除排除的问题
|
||||
/// </summary>
|
||||
private async Task ApplyVisitJudgeRules(List<TaskAnswerDto> answerList, JudgeRule judgeRule)
|
||||
{
|
||||
if (answerList.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var questionIds = answerList.Select(x => x.QuestionId).Distinct().ToList();
|
||||
//var questions = await _readingQuestionTrialRepository.Where(x => questionIds.Contains(x.Id)&&x.LimitShow == LimitShow.ExcludeSomeVisits).Select(x => new
|
||||
//{
|
||||
// x.Id,
|
||||
// x.ExcludeShowVisitList,
|
||||
//}).ToListAsync();
|
||||
//var excludedQuestionIds = answerList
|
||||
// .Where(x => questions.FirstOrDefault(question => question.Id == x.QuestionId)?.ExcludeShowVisitList.Contains(x.VisitTaskNum) == true)
|
||||
// .Select(x => x.QuestionId)
|
||||
// .Distinct()
|
||||
// .ToList();
|
||||
//answerList.RemoveAll(x => excludedQuestionIds.Contains(x.QuestionId));
|
||||
|
||||
if (judgeRule != JudgeRule.Difference || answerList.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
questionIds = answerList.Select(x => x.QuestionId).Distinct().ToList();
|
||||
var visitNums = answerList.Select(x => x.VisitTaskNum).Distinct().ToList();
|
||||
var visitRules = await _readingQuestionVisitJudgeRuleRepository
|
||||
.Where(x => questionIds.Contains(x.ReadingQuestionId) && (visitNums.Contains(x.VisitNum) || x.VisitNum == -1))
|
||||
.ToListAsync();
|
||||
|
||||
answerList.ForEach(answer =>
|
||||
{
|
||||
var rule = visitRules.FirstOrDefault(x => x.ReadingQuestionId == answer.QuestionId && x.VisitNum == answer.VisitTaskNum)
|
||||
?? visitRules.FirstOrDefault(x => x.ReadingQuestionId == answer.QuestionId && x.VisitNum == -1);
|
||||
if (rule != null)
|
||||
{
|
||||
answer.AnswerGroup = JsonConvert.SerializeObject(rule.AnswerGroup);
|
||||
answer.AnswerCombination = JsonConvert.SerializeObject(rule.AnswerCombination);
|
||||
answer.JudgeType = rule.JudgeType;
|
||||
answer.JudgeDifferenceValue = rule.JudgeDifferenceValue;
|
||||
answer.JudgeDifferenceType = rule.JudgeDifferenceType;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 应用访视裁判规则 以及剔除排除的问题
|
||||
/// </summary>
|
||||
private async Task ApplyVisitJudgeRules(List<GlobalQuestionInfo> questionList, decimal visitNum, JudgeRule judgeRule)
|
||||
{
|
||||
if (questionList.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var questionIds = questionList.Where(x => x.QuestionId != null).Select(x => x.QuestionId!.Value).Distinct().ToList();
|
||||
#region 这里是排除访视 但这里其实不用去除 因为就不会有答案
|
||||
|
||||
//var excludedQuestionIds = await _readingQuestionTrialRepository
|
||||
// .Where(x => questionIds.Contains(x.Id) && x.ExcludeShowVisitList.Contains(visitNum))
|
||||
// .Select(x => x.Id)
|
||||
// .ToListAsync();
|
||||
//questionList.RemoveAll(x => x.QuestionId != null && excludedQuestionIds.Contains(x.QuestionId.Value));
|
||||
#endregion
|
||||
|
||||
|
||||
if (judgeRule != JudgeRule.Difference || questionList.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
questionIds = questionList.Where(x => x.QuestionId != null).Select(x => x.QuestionId!.Value).Distinct().ToList();
|
||||
var visitRules = await _readingQuestionVisitJudgeRuleRepository
|
||||
.Where(x => questionIds.Contains(x.ReadingQuestionId) && (x.VisitNum == visitNum || x.VisitNum == -1))
|
||||
.ToListAsync();
|
||||
|
||||
questionList.ForEach(question =>
|
||||
{
|
||||
if (question.QuestionId == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var rule = visitRules.FirstOrDefault(x => x.ReadingQuestionId == question.QuestionId && x.VisitNum == visitNum)
|
||||
?? visitRules.FirstOrDefault(x => x.ReadingQuestionId == question.QuestionId && x.VisitNum == -1);
|
||||
if (rule != null)
|
||||
{
|
||||
question.AnswerGroup = JsonConvert.SerializeObject(rule.AnswerGroup);
|
||||
question.AnswerCombination = JsonConvert.SerializeObject(rule.AnswerCombination);
|
||||
question.JudgeType = rule.JudgeType;
|
||||
question.JudgeDifferenceValue = rule.JudgeDifferenceValue;
|
||||
question.JudgeDifferenceType = rule.JudgeDifferenceType;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 发送微信通知
|
||||
/// </summary>
|
||||
/// <param name="visiTaskId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task SendWeComNotifier(Guid visiTaskId,string msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool isOpenWeComNotice = _config.GetValue<bool>("WeComNoticeConfig:IsOpenWeComNotice");
|
||||
|
||||
if (isOpenWeComNotice)
|
||||
{
|
||||
string webhook = _config["WeComNoticeConfig:WebhookUrl"] ?? string.Empty;
|
||||
|
||||
var uri = new Uri(_config["SystemEmailSendConfig:SiteUrl"]);
|
||||
var baseUrl = uri.GetLeftPart(UriPartial.Authority);
|
||||
|
||||
var userList = _config.GetSection("WeComNoticeConfig:APINoticeUserList").Get<string[]>();
|
||||
|
||||
var visitTask = _visitTaskRepository.Where(x => x.Id == visiTaskId).Include(x=>x.Subject).Include(x=>x.Trial).Include(x=>x.SourceSubjectVisit).FirstOrDefault();
|
||||
|
||||
|
||||
// 🔔 异步告警(不要阻塞请求)
|
||||
_ = WeComNotifier.SendAlertAsync(
|
||||
webhook: webhook,
|
||||
alert: new WeComAlert
|
||||
{
|
||||
Env = baseUrl,
|
||||
UserName = msg,
|
||||
Api = "",
|
||||
Message = $"异常信息:{msg}, 项目方案号:{visitTask.Trial.ResearchProgramNo}, 试验参与者:{visitTask.Subject.Code}, 访视:{visitTask.SourceSubjectVisit.VisitName}, 任务名称:{visitTask.TaskName}, 任务Id:{visiTaskId}",
|
||||
Stack = string.Empty,
|
||||
AtUsers = userList ?? []
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Logger.Error($"MassTransit里发送企业微信出现错误:{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送邮件通知
|
||||
/// </summary>
|
||||
/// <param name="visiTaskId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task SendAbnormalEmail(Guid visiTaskId, EmailBusinessScenario type)
|
||||
{
|
||||
|
||||
|
||||
var emailNotice = _emailNoticeConfigrepository.Where(x => x.BusinessScenarioEnum == type).FirstOrDefault();
|
||||
|
||||
var taskinfo= _visitTaskRepository.Where(x => x.Id == visiTaskId).Include(x => x.Trial).Include(x => x.Subject).Include(x => x.SourceSubjectVisit).FirstOrDefault();
|
||||
if (taskinfo == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 根据不同场景获取不同角色的用户
|
||||
var trialUser = _trialUserRoleRepository.Where(x => x.TrialId == taskinfo.TrialId && !x.TrialUser.IsDeleted).Include(x => x.UserRole).Select(x => x.UserRole)
|
||||
.Select(x => new SendEmailUserDto()
|
||||
{
|
||||
UserTypeEnum = x.UserTypeEnum,
|
||||
FullName = x.FullName,
|
||||
UserWorkLanguage = x.IdentityUser.UserWorkLanguage,
|
||||
EMail = x.EMail,
|
||||
})
|
||||
.ToList();
|
||||
|
||||
// 根据场景确定收件人
|
||||
List<SendEmailUserDto> toUserList = new List<SendEmailUserDto>();
|
||||
List<SendEmailUserDto> ccUserList = new List<SendEmailUserDto>();
|
||||
|
||||
var emailNoticeUserList = _emailNoticeUserTypeRepository.Where(x => x.EmailNoticeConfigId == emailNotice.Id).ToList();
|
||||
|
||||
var toList = emailNoticeUserList.Where(x => x.EmailUserType == EmailUserType.To).Select(x => x.UserType).ToList();
|
||||
|
||||
toUserList = trialUser.Where(x => toList.Contains(x.UserTypeEnum)).ToList();
|
||||
|
||||
var ccList = emailNoticeUserList.Where(x => x.EmailUserType == EmailUserType.Copy).Select(x => x.UserType).ToList();
|
||||
|
||||
ccUserList = trialUser.Where(x => ccList.Contains(x.UserTypeEnum)).ToList();
|
||||
|
||||
|
||||
// 如果没有收件人,则不发送邮件
|
||||
if (toUserList.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var userWorkLanguageList = toUserList.Select(x => x.UserWorkLanguage).Distinct().ToList();
|
||||
|
||||
foreach (var workLanguage in userWorkLanguageList)
|
||||
{
|
||||
var userinfoList = toUserList.Where(x => x.UserWorkLanguage == workLanguage).ToList();
|
||||
var messageToSend = new MimeMessage();
|
||||
// 发件地址
|
||||
messageToSend.From.Add(new MailboxAddress(taskinfo.Trial.EmailFromName, taskinfo.Trial.EmailFromEmail));
|
||||
|
||||
foreach (var userinfo in userinfoList)
|
||||
{
|
||||
messageToSend.To.Add(new MailboxAddress(userinfo.FullName, userinfo.EMail));
|
||||
}
|
||||
|
||||
// 添加抄送
|
||||
foreach (var ccUser in ccUserList)
|
||||
{
|
||||
messageToSend.Cc.Add(new MailboxAddress(ccUser.FullName, ccUser.EMail));
|
||||
}
|
||||
|
||||
var userNames = userinfoList.Select(x => x.FullName).ToList();
|
||||
|
||||
// 格式化邮件内容
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
{
|
||||
var topicStr = string.Format(input.topicStr, taskinfo.Trial.ResearchProgramNo, taskinfo.Subject.Code,taskinfo.SourceSubjectVisit.VisitName);
|
||||
var htmlBodyStr = string.Format(
|
||||
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr, workLanguage),
|
||||
string.Join(',', userNames), // 用户名 {0}
|
||||
taskinfo.Trial.ExperimentName, // 项目 {1}
|
||||
taskinfo.Subject.Code, // 受试者编号 {2}
|
||||
taskinfo.SourceSubjectVisit.VisitName, // 访视名称 {3}
|
||||
type== EmailBusinessScenario.JudgeExceptio ? _systemEmailConfig.SiteUrl: taskinfo.TaskName, // 任务名称 {4}
|
||||
taskinfo.Id.ToString(), // 任务Id {5}
|
||||
_systemEmailConfig.SiteUrl // 链接 {6}
|
||||
);
|
||||
|
||||
return (topicStr, htmlBodyStr);
|
||||
};
|
||||
|
||||
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(emailNotice, messageToSend, emailConfigFunc, workLanguage);
|
||||
|
||||
await SendEmailHelper.SendTrialEmailAsync(messageToSend, taskinfo.Trial);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 计算返回的结果 为True表示不相等
|
||||
/// </summary>
|
||||
/// <param name="groupTasks"></param>
|
||||
/// <returns></returns>
|
||||
private bool ComputeJudgeResult(List<GroupTaskAnswerDto> groupTasks)
|
||||
private bool ComputeJudgeResult(List<GroupTaskAnswerDto> groupTasks, Guid visiTaskId, HashSet<Guid>? triggerJudgeQuestionIds = null, bool notifyException = true)
|
||||
{
|
||||
var noteEqual = false;
|
||||
foreach (var item in groupTasks)
|
||||
{
|
||||
if (item.JudgeType == JudgeTypeEnum.NotApplicable || item.JudgeType == JudgeTypeEnum.None)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// 裁判问题可以不必填
|
||||
if(item.TaskAnswerList.Count()==0)
|
||||
{
|
||||
if (notifyException)
|
||||
{
|
||||
try
|
||||
{
|
||||
_ = SendWeComNotifier(visiTaskId, "两个阅片任务的答案等于0");
|
||||
_ = SendAbnormalEmail(visiTaskId, EmailBusinessScenario.JudgeExceptio);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (item.TaskAnswerList.Count() != 2)
|
||||
{
|
||||
noteEqual = true;
|
||||
break;
|
||||
}
|
||||
else if (noteEqual)
|
||||
{
|
||||
if (notifyException)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 发送微信通知
|
||||
_ = SendWeComNotifier(visiTaskId, "两个阅片任务的答案不等于2");
|
||||
_ = SendAbnormalEmail(visiTaskId, EmailBusinessScenario.JudgeExceptio);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
var isTriggerJudge = false;
|
||||
var taskAnswer1 = item.TaskAnswerList[0];
|
||||
var taskAnswer2 = item.TaskAnswerList[1];
|
||||
if (taskAnswer1 != taskAnswer2)
|
||||
@@ -956,7 +1614,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
switch (item.JudgeType)
|
||||
{
|
||||
case JudgeTypeEnum.AnswerDisaffinity:
|
||||
noteEqual = true;
|
||||
isTriggerJudge = true;
|
||||
break;
|
||||
case JudgeTypeEnum.AnswerGroup:
|
||||
var answerGroupList = JsonConvert.DeserializeObject<List<string>>(item.AnswerGroup).Select(x => new AnswerGroup()
|
||||
@@ -969,7 +1627,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
var unionList = itemAnswerGroupsitem1.Intersect(itemAnswerGroupsitem2).ToList();
|
||||
if (unionList.Count < 1)
|
||||
{
|
||||
noteEqual = true;
|
||||
isTriggerJudge = true;
|
||||
}
|
||||
break;
|
||||
case JudgeTypeEnum.AnswerCombination:
|
||||
@@ -978,11 +1636,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
if (x.AnswerGroupA.Contains(taskAnswer1) && x.AnswerGroupB.Contains(taskAnswer2))
|
||||
{
|
||||
noteEqual = true;
|
||||
isTriggerJudge = true;
|
||||
}
|
||||
if (x.AnswerGroupB.Contains(taskAnswer1) && x.AnswerGroupA.Contains(taskAnswer2))
|
||||
{
|
||||
noteEqual = true;
|
||||
isTriggerJudge = true;
|
||||
}
|
||||
});
|
||||
break;
|
||||
@@ -992,21 +1650,21 @@ namespace IRaCIS.Core.Application.Service
|
||||
// 已经判断不相等了 所以只可能有一个为Null
|
||||
if (answer1 == null || answer2 == null)
|
||||
{
|
||||
noteEqual = true;
|
||||
isTriggerJudge = true;
|
||||
}
|
||||
var deffaultValue = Math.Abs(taskAnswer1.IsNullOrEmptyReturn0() - taskAnswer2.IsNullOrEmptyReturn0());
|
||||
if (item.JudgeDifferenceType == JudgeDifferenceType.Greater)
|
||||
{
|
||||
if (deffaultValue > item.JudgeDifferenceValue)
|
||||
{
|
||||
noteEqual = true;
|
||||
isTriggerJudge = true;
|
||||
}
|
||||
}
|
||||
else if (item.JudgeDifferenceType == JudgeDifferenceType.AboveOrEqual)
|
||||
{
|
||||
if (deffaultValue >= item.JudgeDifferenceValue)
|
||||
{
|
||||
noteEqual = true;
|
||||
isTriggerJudge = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1016,24 +1674,24 @@ namespace IRaCIS.Core.Application.Service
|
||||
// 已经判断不相等了 所以只可能有一个为Null
|
||||
if (answer1P == null || answer2P == null)
|
||||
{
|
||||
noteEqual = true;
|
||||
isTriggerJudge = true;
|
||||
}
|
||||
var value1 = taskAnswer1.IsNullOrEmptyReturn0();
|
||||
var value2 = taskAnswer2.IsNullOrEmptyReturn0();
|
||||
if (value1 == 0 || value2 == 0)
|
||||
{
|
||||
noteEqual = true;
|
||||
isTriggerJudge = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var absoluteValue = (Math.Abs(value1 - value2) * 100) / (value1 < value2 ? value1 : value2);
|
||||
if (item.JudgeDifferenceType == JudgeDifferenceType.Greater)
|
||||
{
|
||||
noteEqual = absoluteValue > item.JudgeDifferenceValue;
|
||||
isTriggerJudge = absoluteValue > item.JudgeDifferenceValue;
|
||||
}
|
||||
else if (item.JudgeDifferenceType == JudgeDifferenceType.AboveOrEqual)
|
||||
{
|
||||
noteEqual = absoluteValue >= item.JudgeDifferenceValue;
|
||||
isTriggerJudge = absoluteValue >= item.JudgeDifferenceValue;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1041,6 +1699,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isTriggerJudge)
|
||||
{
|
||||
noteEqual = true;
|
||||
triggerJudgeQuestionIds?.Add(item.QuestionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user