Merge branch 'Test_IRC_Net8' into Uat_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
2eb85b6b71
|
@ -126,16 +126,22 @@ builder.Services.Configure<ForwardedHeadersOptions>(options =>
|
|||
ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
|
||||
});
|
||||
|
||||
|
||||
builder.Services.AddFellowOakDicom().AddTranscoderManager<NativeTranscoderManager>()
|
||||
//.AddTranscoderManager<FellowOakDicom.Imaging.NativeCodec.NativeTranscoderManager>()
|
||||
.AddImageManager<ImageSharpImageManager>();
|
||||
|
||||
|
||||
//Dicom影像渲染图片 跨平台
|
||||
//builder.Services.AddDicomSetup();
|
||||
new DicomSetupBuilder()
|
||||
.RegisterServices(s =>
|
||||
s.AddFellowOakDicom()
|
||||
.AddTranscoderManager<NativeTranscoderManager>()
|
||||
//.AddTranscoderManager<FellowOakDicom.Imaging.NativeCodec.NativeTranscoderManager>()
|
||||
.AddImageManager<ImageSharpImageManager>())
|
||||
.SkipValidation()
|
||||
.Build();
|
||||
//new DicomSetupBuilder()
|
||||
// .RegisterServices(s =>
|
||||
// s.AddFellowOakDicom()
|
||||
// .AddTranscoderManager<NativeTranscoderManager>()
|
||||
// //.AddTranscoderManager<FellowOakDicom.Imaging.NativeCodec.NativeTranscoderManager>()
|
||||
// .AddImageManager<ImageSharpImageManager>())
|
||||
// .SkipValidation()
|
||||
// .Build();
|
||||
|
||||
|
||||
|
||||
|
@ -211,6 +217,8 @@ else
|
|||
|
||||
#endregion
|
||||
|
||||
DicomSetupBuilder.UseServiceProvider(app.Services);
|
||||
|
||||
var logger = app.Services.GetService<Microsoft.Extensions.Logging.ILogger<Program>>();
|
||||
|
||||
var server = DicomServerFactory.Create<CStoreSCPService>(_configuration.GetSection("DicomSCPServiceConfig").GetValue<int>("ServerPort"), userState: app.Services,logger: logger);
|
||||
|
|
|
@ -76,9 +76,10 @@ namespace IRaCIS.Core.SCP.Service
|
|||
};
|
||||
|
||||
|
||||
public CStoreSCPService(INetworkStream stream, Encoding fallbackEncoding, Microsoft.Extensions.Logging.ILogger log, DicomServiceDependencies dependencies)
|
||||
public CStoreSCPService(INetworkStream stream, Encoding fallbackEncoding, Microsoft.Extensions.Logging.ILogger log, DicomServiceDependencies dependencies, IServiceProvider injectServiceProvider)
|
||||
: base(stream, fallbackEncoding, log, dependencies)
|
||||
{
|
||||
_serviceProvider = injectServiceProvider.CreateScope().ServiceProvider;
|
||||
}
|
||||
|
||||
|
||||
|
@ -92,9 +93,7 @@ namespace IRaCIS.Core.SCP.Service
|
|||
|
||||
Log.Logger.Warning($"接收到来自{association.CallingAE}的连接");
|
||||
|
||||
_serviceProvider = (IServiceProvider)this.UserState;
|
||||
|
||||
|
||||
//_serviceProvider = (IServiceProvider)this.UserState;
|
||||
|
||||
var _trialDicomAERepository = _serviceProvider.GetService<IRepository<TrialDicomAE>>();
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ using RestSharp;
|
|||
using RestSharp.Authenticators;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
|
@ -185,7 +186,7 @@ namespace IRaCIS.Api.Controllers
|
|||
|
||||
[HttpGet("User/UserRedirect")]
|
||||
[AllowAnonymous]
|
||||
public async Task<IActionResult> UserRedirect([FromServices] IRepository<IdentityUser> _useRepository, string url, [FromServices] ILogger<ExtraController> _logger)
|
||||
public async Task<IActionResult> UserRedirect([FromServices] IRepository<IdentityUser> _useRepository, string url, [FromServices] ILogger<ExtraController> _logger, [FromServices] ITokenService _tokenService)
|
||||
{
|
||||
|
||||
var decodeUrl = System.Web.HttpUtility.UrlDecode(url);
|
||||
|
@ -200,10 +201,22 @@ namespace IRaCIS.Api.Controllers
|
|||
|
||||
var errorUrl = domainStrList[0] + "//" + domainStrList[2] + "/error";
|
||||
|
||||
|
||||
if (!await _useRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd))
|
||||
if (lang == "zh")
|
||||
{
|
||||
decodeUrl = errorUrl + $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(lang == "zh" ? "您的初始化链接已过期" : "Error!The initialization link has expired.")} ";
|
||||
CultureInfo.CurrentCulture = new CultureInfo(StaticData.CultureInfo.zh_CN);
|
||||
CultureInfo.CurrentUICulture = new CultureInfo(StaticData.CultureInfo.zh_CN);
|
||||
}
|
||||
else
|
||||
{
|
||||
CultureInfo.CurrentCulture = new CultureInfo(StaticData.CultureInfo.en_US);
|
||||
CultureInfo.CurrentUICulture = new CultureInfo(StaticData.CultureInfo.en_US);
|
||||
}
|
||||
|
||||
var isExpire = _tokenService.IsTokenExpired(token);
|
||||
|
||||
if (!await _useRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd) || isExpire)
|
||||
{
|
||||
decodeUrl = errorUrl + $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(I18n.T("UserRedirect_InitializationLinkExpire"))} ";
|
||||
}
|
||||
|
||||
return Redirect(decodeUrl);
|
||||
|
|
|
@ -37,6 +37,11 @@ var config = new ConfigurationBuilder()
|
|||
|
||||
var enviromentName = config["ASPNETCORE_ENVIRONMENT"];
|
||||
|
||||
var openSwaggerStr = config["ASPNETCORE_OpenSwagger"];
|
||||
|
||||
var isOpenSwagger= openSwaggerStr == null&& openSwaggerStr?.ToLower()=="true";
|
||||
|
||||
|
||||
if (string.IsNullOrWhiteSpace(enviromentName))
|
||||
{
|
||||
|
||||
|
@ -111,8 +116,13 @@ builder.Services.AddAutoMapperSetup();
|
|||
builder.Services.AddEFSetup(_configuration, enviromentName);
|
||||
//Http 响应压缩
|
||||
builder.Services.AddResponseCompressionSetup();
|
||||
//Swagger Api 文档
|
||||
builder.Services.AddSwaggerSetup();
|
||||
|
||||
if (isOpenSwagger)
|
||||
{
|
||||
//Swagger Api 文档
|
||||
builder.Services.AddSwaggerSetup();
|
||||
}
|
||||
|
||||
//JWT Token 验证
|
||||
builder.Services.AddJWTAuthSetup(_configuration);
|
||||
|
||||
|
@ -217,7 +227,12 @@ app.UseLogDashboard("/LogDashboard");
|
|||
app.UseHangfireConfig(env);
|
||||
|
||||
// Swagger
|
||||
SwaggerSetup.Configure(app, env);
|
||||
|
||||
if (isOpenSwagger)
|
||||
{
|
||||
SwaggerSetup.Configure(app, env);
|
||||
}
|
||||
|
||||
|
||||
//serilog 记录请求的用户信息
|
||||
app.UseSerilogConfig(env);
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Test_IRC"
|
||||
"ASPNETCORE_ENVIRONMENT": "Test_IRC",
|
||||
"ASPNETCORE_OpenSwagger": "true"
|
||||
},
|
||||
"applicationUrl": "http://localhost:6100"
|
||||
},
|
||||
|
|
|
@ -16,6 +16,9 @@ namespace IRaCIS.Core.API;
|
|||
|
||||
public enum SwaggerVersion
|
||||
{
|
||||
[Description("文件记录")]
|
||||
FileRecord = -1,
|
||||
|
||||
[Description("医生模块")]
|
||||
Reviewer = 1,
|
||||
[Description("项目模块")]
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
"FromName": "irc",
|
||||
"AuthorizationCode": "ExtImg@2022",
|
||||
"SiteUrl": "http://irc.extimaging.com/login",
|
||||
"SystemShortName": "IRC",
|
||||
"OrganizationName": "Extlmaging",
|
||||
"OrganizationNameCN": "Extlmaging",
|
||||
"CompanyName": "Extensive Imaging",
|
||||
|
|
|
@ -23,9 +23,11 @@
|
|||
"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",
|
||||
//"ViewEndpoint": "https://zy-irc-test-store.oss-cn-shanghai.aliyuncs.com",
|
||||
"ViewEndpoint": "https://zy-irc-test-dev-cache.oss-cn-shanghai.aliyuncs.com",
|
||||
"Region": "oss-cn-shanghai",
|
||||
"DurationSeconds": 7200
|
||||
"DurationSeconds": 7200,
|
||||
"PreviewEndpoint": "https://test-oss.test.extimaging.com"
|
||||
},
|
||||
"MinIO": {
|
||||
"EndPoint": "hir-oss.test.extimaging.com",
|
||||
|
@ -81,6 +83,7 @@
|
|||
"AuthorizationCode": "SHzyyl2021",
|
||||
"SiteUrl": "http://irc.test.extimaging.com/login",
|
||||
|
||||
"SystemShortName": "IRC",
|
||||
"OrganizationName": "Extlmaging",
|
||||
"OrganizationNameCN": "Extlmaging",
|
||||
"CompanyName": "Extensive Imaging",
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
"FromName": "LiLi",
|
||||
"AuthorizationCode": "Q#669869497420ul",
|
||||
|
||||
"SystemShortName": "LiLi",
|
||||
"OrganizationName": "Elevate Imaging",
|
||||
"OrganizationNameCN": "Elevate Imaging",
|
||||
"CompanyName": "Elevate Imaging Inc.",
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
"FromName": "LiLi",
|
||||
"AuthorizationCode": "Q#669869497420ul",
|
||||
|
||||
"SystemShortName": "LiLi",
|
||||
"OrganizationName": "Elevate Imaging",
|
||||
"OrganizationNameCN": "Elevate Imaging",
|
||||
"CompanyName": "Elevate Imaging Inc.",
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
"FromName": "LiLi",
|
||||
"AuthorizationCode": "Q#669869497420ul",
|
||||
|
||||
"SystemShortName": "LiLi",
|
||||
"OrganizationName": "Elevate Imaging",
|
||||
"OrganizationNameCN": "Elevate Imaging",
|
||||
"CompanyName": "Elevate Imaging Inc.",
|
||||
|
|
|
@ -80,6 +80,8 @@
|
|||
"FromName": "UAT_IRC",
|
||||
"AuthorizationCode": "SHzyyl2021",
|
||||
"SiteUrl": "http://irc.uat.extimaging.com/login",
|
||||
|
||||
"SystemShortName": "IRC",
|
||||
"OrganizationName": "Extlmaging",
|
||||
"OrganizationNameCN": "Extlmaging",
|
||||
"CompanyName": "Extensive Imaging",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"SecurityKey": "ShangHaiZhanYing_SecurityKey_SHzyyl@2021",
|
||||
"Issuer": "Extimaging",
|
||||
"Audience": "EICS",
|
||||
"TokenExpireDays": "7"
|
||||
"TokenExpireMinute": "10080"//7天
|
||||
},
|
||||
"IpRateLimiting": {
|
||||
"EnableEndpointRateLimiting": true,
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace IRaCIS.Core.Application.Auth
|
|||
/// <summary>
|
||||
/// 过期时间
|
||||
/// </summary>
|
||||
public int TokenExpireDays { get; set; }
|
||||
public int TokenExpireMinute { get; set; }
|
||||
|
||||
//public Dictionary<string, object> Claims { get; set; }
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ namespace IRaCIS.Core.Application.Auth
|
|||
public interface ITokenService
|
||||
{
|
||||
string GetToken(UserTokenInfo user);
|
||||
|
||||
bool IsTokenExpired(string token);
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,13 +49,27 @@ namespace IRaCIS.Core.Application.Auth
|
|||
signingCredentials: _jwtSetting.Credentials,
|
||||
claims: claims,
|
||||
notBefore: DateTime.Now,
|
||||
expires: DateTime.Now.AddDays(_jwtSetting.TokenExpireDays)
|
||||
expires: DateTime.Now.AddMinutes(_jwtSetting.TokenExpireMinute)
|
||||
);
|
||||
|
||||
string jwtToken = new JwtSecurityTokenHandler().WriteToken(token);
|
||||
return jwtToken;
|
||||
|
||||
}
|
||||
|
||||
public bool IsTokenExpired(string token)
|
||||
{
|
||||
var handler = new JwtSecurityTokenHandler();
|
||||
try
|
||||
{
|
||||
var jwtToken = handler.ReadJwtToken(token);
|
||||
return jwtToken.ValidTo < DateTime.UtcNow;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return true; // 无效 Token 也视为已过期
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -62,9 +62,9 @@ public class TrialGlobalLimitActionFilter(IFusionCache _fusionCache, IUserInfo _
|
|||
var index = context.HttpContext.Request.RouteValues.Keys.ToList().IndexOf("trialId");
|
||||
trialIdStr = context.HttpContext.Request.RouteValues.Values.ToList()[index] as string;
|
||||
}
|
||||
else if (context.HttpContext.Request.Headers["Referer"].ToString().Contains("trialId"))
|
||||
else if (context.HttpContext.Request.Headers["self-Referer"].ToString().Contains("trialId"))
|
||||
{
|
||||
var headerStr = context.HttpContext.Request.Headers["Referer"].ToString();
|
||||
var headerStr = context.HttpContext.Request.Headers["self-Referer"].ToString();
|
||||
|
||||
var trialIdIndex = headerStr.IndexOf("trialId");
|
||||
|
||||
|
|
|
@ -71,9 +71,9 @@ public class TrialGlobalLimitEndpointFilter(IFusionCache _fusionCache, IUserInfo
|
|||
var index = context.HttpContext.Request.RouteValues.Keys.ToList().IndexOf("trialId");
|
||||
trialIdStr = context.HttpContext.Request.RouteValues.Values.ToList()[index] as string;
|
||||
}
|
||||
else if (context.HttpContext.Request.Headers["Referer"].ToString().Contains("trialId"))
|
||||
else if (context.HttpContext.Request.Headers["self-Referer"].ToString().Contains("trialId"))
|
||||
{
|
||||
var headerStr = context.HttpContext.Request.Headers["Referer"].ToString();
|
||||
var headerStr = context.HttpContext.Request.Headers["self-Referer"].ToString();
|
||||
|
||||
var trialIdIndex = headerStr.IndexOf("trialId");
|
||||
|
||||
|
|
|
@ -51,6 +51,8 @@ public class SystemEmailSendConfig
|
|||
|
||||
public string SiteUrl { get; set; } = string.Empty;
|
||||
|
||||
public string SystemShortName { get; set; } = string.Empty;
|
||||
|
||||
public string OrganizationName { get; set; } = string.Empty;
|
||||
public string OrganizationNameCN { get; set; } = string.Empty;
|
||||
|
||||
|
|
|
@ -300,6 +300,17 @@ public static class ExcelExportHelper
|
|||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is not ColumItem other) return false;
|
||||
return Id == other.Id && Name == other.Name;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(Id, Name);
|
||||
}
|
||||
}
|
||||
|
||||
public List<string> ColumnIdList => ColumnIdNameList == null ? new List<string>() : ColumnIdNameList.Select(t => t.Id.ToString()).ToList();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using AlibabaCloud.SDK.Sts20150401;
|
||||
using Aliyun.OSS;
|
||||
using Aliyun.OSS.Common;
|
||||
using Amazon;
|
||||
using Amazon.Runtime;
|
||||
using Amazon.S3;
|
||||
|
@ -9,9 +10,12 @@ using Amazon.SecurityToken.Model;
|
|||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Infrastructure.NewtonsoftJson;
|
||||
using MassTransit;
|
||||
using MassTransit.Caching.Internals;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Minio;
|
||||
using Minio.DataModel;
|
||||
using Minio.DataModel.Args;
|
||||
using Minio.Exceptions;
|
||||
using System.Reactive.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
@ -59,7 +63,7 @@ public class AliyunOSSOptions
|
|||
|
||||
public int DurationSeconds { get; set; }
|
||||
|
||||
|
||||
public string PreviewEndpoint { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
@ -105,6 +109,7 @@ public class AliyunOSSTempToken
|
|||
public string SecurityToken { get; set; }
|
||||
public DateTime Expiration { get; set; }
|
||||
|
||||
public string PreviewEndpoint { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
@ -143,11 +148,17 @@ public interface IOSSService
|
|||
|
||||
public Task<string> GetSignedUrl(string ossRelativePath);
|
||||
|
||||
public Task DeleteFromPrefix(string prefix);
|
||||
public Task DeleteFromPrefix(string prefix, bool isCache = false);
|
||||
|
||||
public Task DeleteObjects(List<string> objectKeys);
|
||||
|
||||
List<string> GetRootFolderNames();
|
||||
|
||||
public ObjectStoreDTO GetObjectStoreTempToken();
|
||||
|
||||
public Task MoveObject(string sourcePath, string destPath, bool overwrite = true);
|
||||
|
||||
public Task<long> GetObjectSizeAsync(string sourcePath);
|
||||
}
|
||||
|
||||
|
||||
|
@ -528,6 +539,185 @@ public class OSSService : IOSSService
|
|||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 移动OSS文件到新路径
|
||||
/// </summary>
|
||||
/// <param name="sourcePath">原文件路径(格式:bucket/key)</param>
|
||||
/// <param name="destPath">新文件路径(格式:bucket/key)</param>
|
||||
/// <param name="overwrite">是否覆盖已存在的目标文件(默认true)</param>
|
||||
public async Task MoveObject(string sourcePath, string destPath, bool overwrite = true)
|
||||
{
|
||||
GetObjectStoreTempToken();
|
||||
|
||||
switch (ObjectStoreServiceOptions.ObjectStoreUse)
|
||||
{
|
||||
case "AliyunOSS":
|
||||
#region 阿里云
|
||||
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||
var client = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint, AliyunOSSTempToken.AccessKeyId, AliyunOSSTempToken.AccessKeySecret, AliyunOSSTempToken.SecurityToken);
|
||||
if (sourcePath.StartsWith("/"))
|
||||
{
|
||||
sourcePath = sourcePath.Substring(1);
|
||||
}
|
||||
|
||||
|
||||
if (destPath.StartsWith("/"))
|
||||
{
|
||||
destPath = destPath.Substring(1);
|
||||
}
|
||||
|
||||
var sourceBucket = aliConfig.BucketName;
|
||||
var sourceKey = sourcePath;
|
||||
|
||||
var destBucket = aliConfig.BucketName;
|
||||
|
||||
var destKey = destPath;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
// 检查目标是否存在(当不允许覆盖时)
|
||||
if (!overwrite && client.DoesObjectExist(destBucket, destKey))
|
||||
{
|
||||
throw new InvalidOperationException("File Exist");
|
||||
}
|
||||
|
||||
|
||||
//var copyRequest = new Aliyun.OSS.CopyObjectRequest(sourceBucket, sourceKey, sourceBucket, destKey);
|
||||
//var result = client.CopyObject(copyRequest);
|
||||
|
||||
//// 2. 删除原文件(可选,根据是否需要保留原文件)
|
||||
//client.DeleteObject(sourceBucket, sourceKey);
|
||||
|
||||
// 执行复制
|
||||
var copyRequestAli = new Aliyun.OSS.CopyObjectRequest(
|
||||
sourceBucket, sourceKey,
|
||||
destBucket, destKey);
|
||||
|
||||
// 保持原文件元数据
|
||||
copyRequestAli.NewObjectMetadata = new ObjectMetadata
|
||||
{
|
||||
ContentType = client.GetObjectMetadata(sourceBucket, sourceKey).ContentType
|
||||
};
|
||||
|
||||
var result = client.CopyObject(copyRequestAli);
|
||||
|
||||
// 删除原文件(仅在复制成功后)
|
||||
client.DeleteObject(sourceBucket, sourceKey);
|
||||
}
|
||||
catch (OssException ex)
|
||||
{
|
||||
throw new Exception($"[{ex.ErrorCode}] {ex.Message}", ex);
|
||||
}
|
||||
#endregion
|
||||
|
||||
break;
|
||||
case "MinIO":
|
||||
#region MinIO
|
||||
var minIOConfig = ObjectStoreServiceOptions.MinIO;
|
||||
var minioClient = new MinioClient()
|
||||
.WithEndpoint($"{minIOConfig.EndPoint}:{minIOConfig.Port}")
|
||||
.WithCredentials(minIOConfig.AccessKeyId, minIOConfig.SecretAccessKey)
|
||||
.WithSSL(minIOConfig.UseSSL)
|
||||
.Build();
|
||||
|
||||
// 定义源路径和目标路径
|
||||
string destinationKey = "b路径/文件名";
|
||||
|
||||
try
|
||||
{
|
||||
// 1. 复制文件到新路径[2,5](@ref)
|
||||
using (var memoryStream = new MemoryStream())
|
||||
{
|
||||
// 下载源文件流
|
||||
await minioClient.GetObjectAsync(new GetObjectArgs()
|
||||
.WithBucket(minIOConfig.BucketName)
|
||||
.WithObject(sourcePath)
|
||||
.WithCallbackStream(stream => stream.CopyTo(memoryStream)));
|
||||
|
||||
memoryStream.Position = 0; // 重置流位置
|
||||
|
||||
// 上传到新路径
|
||||
await minioClient.PutObjectAsync(new PutObjectArgs()
|
||||
.WithBucket(minIOConfig.BucketName)
|
||||
.WithObject(destinationKey)
|
||||
.WithStreamData(memoryStream)
|
||||
.WithObjectSize(memoryStream.Length));
|
||||
}
|
||||
|
||||
// 2. 删除原文件[1,6](@ref)
|
||||
await minioClient.RemoveObjectAsync(new RemoveObjectArgs()
|
||||
.WithBucket(minIOConfig.BucketName)
|
||||
.WithObject(sourcePath));
|
||||
}
|
||||
catch (MinioException ex)
|
||||
{
|
||||
// 处理异常(例如:记录日志或抛出)
|
||||
throw new Exception();
|
||||
}
|
||||
#endregion
|
||||
|
||||
break;
|
||||
case "AWS":
|
||||
#region AWS
|
||||
var awsConfig = ObjectStoreServiceOptions.AWS;
|
||||
|
||||
var credentials = new SessionAWSCredentials(
|
||||
AWSTempToken.AccessKeyId,
|
||||
AWSTempToken.SecretAccessKey,
|
||||
AWSTempToken.SessionToken
|
||||
);
|
||||
|
||||
var clientConfig = new AmazonS3Config
|
||||
{
|
||||
RegionEndpoint = RegionEndpoint.USEast1,
|
||||
UseHttp = true,
|
||||
};
|
||||
|
||||
var amazonS3Client = new AmazonS3Client(credentials, clientConfig);
|
||||
|
||||
// 定义原路径和目标路径
|
||||
|
||||
|
||||
// 1. 复制对象到新路径
|
||||
var copyRequest = new Amazon.S3.Model.CopyObjectRequest
|
||||
{
|
||||
SourceBucket = awsConfig.BucketName,
|
||||
SourceKey = sourcePath,
|
||||
DestinationBucket = awsConfig.BucketName,
|
||||
DestinationKey = destPath
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
// 执行复制操作
|
||||
await amazonS3Client.CopyObjectAsync(copyRequest);
|
||||
|
||||
// 2. 删除原对象
|
||||
var deleteRequest = new Amazon.S3.Model.DeleteObjectRequest
|
||||
{
|
||||
BucketName = awsConfig.BucketName,
|
||||
Key = sourcePath
|
||||
};
|
||||
await amazonS3Client.DeleteObjectAsync(deleteRequest);
|
||||
|
||||
|
||||
}
|
||||
catch (AmazonS3Exception ex)
|
||||
{
|
||||
Console.WriteLine($"ERROR: {ex.Message}");
|
||||
// 可根据异常类型细化处理(如文件不存在、权限问题等)
|
||||
}
|
||||
#endregion
|
||||
break;
|
||||
default:
|
||||
throw new BusinessValidationFailedException("ERROR");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有根目录名称
|
||||
/// </summary>
|
||||
|
@ -550,9 +740,9 @@ public class OSSService : IOSSService
|
|||
do
|
||||
{
|
||||
// 列出根目录下的对象和文件夹
|
||||
objectListing = _ossClient.ListObjects(new Aliyun.OSS.ListObjectsRequest(aliConfig.BucketName)
|
||||
objectListing = _ossClient.ListObjects(new Aliyun.OSS.ListObjectsRequest(aliConfig.BucketName)
|
||||
{
|
||||
|
||||
|
||||
MaxKeys = 1000,
|
||||
Marker = nextMarker,
|
||||
Delimiter = "/" // 使用分隔符来模拟文件夹
|
||||
|
@ -582,7 +772,7 @@ public class OSSService : IOSSService
|
|||
/// </summary>
|
||||
/// <param name="prefix"></param>
|
||||
/// <returns></returns>
|
||||
public async Task DeleteFromPrefix(string prefix)
|
||||
public async Task DeleteFromPrefix(string prefix, bool isCache = false)
|
||||
{
|
||||
GetObjectStoreTempToken();
|
||||
|
||||
|
@ -592,6 +782,21 @@ public class OSSService : IOSSService
|
|||
|
||||
var _ossClient = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint, AliyunOSSTempToken.AccessKeyId, AliyunOSSTempToken.AccessKeySecret, AliyunOSSTempToken.SecurityToken);
|
||||
|
||||
var bucketName = string.Empty;
|
||||
|
||||
if (isCache)
|
||||
{
|
||||
Uri uri = new Uri(aliConfig.ViewEndpoint);
|
||||
string host = uri.Host; // 获取 "zy-irc-test-dev-cache.oss-cn-shanghai.aliyuncs.com"
|
||||
string[] parts = host.Split('.');
|
||||
bucketName = parts[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
bucketName = aliConfig.BucketName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -600,7 +805,7 @@ public class OSSService : IOSSService
|
|||
do
|
||||
{
|
||||
// 使用 prefix 模拟目录结构,设置 MaxKeys 和 NextMarker
|
||||
objectListing = _ossClient.ListObjects(new Aliyun.OSS.ListObjectsRequest(aliConfig.BucketName)
|
||||
objectListing = _ossClient.ListObjects(new Aliyun.OSS.ListObjectsRequest(bucketName)
|
||||
{
|
||||
Prefix = prefix,
|
||||
MaxKeys = 1000,
|
||||
|
@ -612,7 +817,7 @@ public class OSSService : IOSSService
|
|||
// 删除获取到的文件
|
||||
if (keys.Count > 0)
|
||||
{
|
||||
_ossClient.DeleteObjects(new Aliyun.OSS.DeleteObjectsRequest(aliConfig.BucketName, keys, false));
|
||||
_ossClient.DeleteObjects(new Aliyun.OSS.DeleteObjectsRequest(bucketName, keys, false));
|
||||
}
|
||||
|
||||
// 设置 NextMarker 以获取下一页的数据
|
||||
|
@ -669,7 +874,6 @@ public class OSSService : IOSSService
|
|||
|
||||
var awsConfig = ObjectStoreServiceOptions.AWS;
|
||||
|
||||
|
||||
// 提供awsAccessKeyId和awsSecretAccessKey构造凭证
|
||||
var credentials = new SessionAWSCredentials(AWSTempToken.AccessKeyId, AWSTempToken.SecretAccessKey, AWSTempToken.SessionToken);
|
||||
|
||||
|
@ -721,6 +925,159 @@ public class OSSService : IOSSService
|
|||
}
|
||||
}
|
||||
|
||||
public async Task DeleteObjects(List<string> objectKeys)
|
||||
{
|
||||
GetObjectStoreTempToken();
|
||||
|
||||
if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS")
|
||||
{
|
||||
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||
|
||||
var _ossClient = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint, AliyunOSSTempToken.AccessKeyId, AliyunOSSTempToken.AccessKeySecret, AliyunOSSTempToken.SecurityToken);
|
||||
|
||||
if (objectKeys.Count > 0)
|
||||
{
|
||||
var result = _ossClient.DeleteObjects(new Aliyun.OSS.DeleteObjectsRequest(aliConfig.BucketName, objectKeys, false));
|
||||
|
||||
}
|
||||
}
|
||||
else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO")
|
||||
{
|
||||
var minIOConfig = ObjectStoreServiceOptions.MinIO;
|
||||
|
||||
|
||||
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.EndPoint}:{minIOConfig.Port}")
|
||||
.WithCredentials(minIOConfig.AccessKeyId, minIOConfig.SecretAccessKey).WithSSL(minIOConfig.UseSSL)
|
||||
.Build();
|
||||
|
||||
|
||||
if (objectKeys.Count > 0)
|
||||
{
|
||||
var objArgs = new RemoveObjectsArgs()
|
||||
.WithBucket(minIOConfig.BucketName)
|
||||
.WithObjects(objectKeys);
|
||||
|
||||
// 删除对象
|
||||
await minioClient.RemoveObjectsAsync(objArgs);
|
||||
}
|
||||
}
|
||||
else if (ObjectStoreServiceOptions.ObjectStoreUse == "AWS")
|
||||
{
|
||||
|
||||
var awsConfig = ObjectStoreServiceOptions.AWS;
|
||||
|
||||
|
||||
// 提供awsAccessKeyId和awsSecretAccessKey构造凭证
|
||||
var credentials = new SessionAWSCredentials(AWSTempToken.AccessKeyId, AWSTempToken.SecretAccessKey, AWSTempToken.SessionToken);
|
||||
|
||||
//提供awsEndPoint(域名)进行访问配置
|
||||
var clientConfig = new AmazonS3Config
|
||||
{
|
||||
RegionEndpoint = RegionEndpoint.USEast1,
|
||||
UseHttp = true,
|
||||
};
|
||||
|
||||
var amazonS3Client = new AmazonS3Client(credentials, clientConfig);
|
||||
|
||||
if (objectKeys.Count > 0)
|
||||
{
|
||||
// 准备删除请求
|
||||
var deleteObjectsRequest = new Amazon.S3.Model.DeleteObjectsRequest
|
||||
{
|
||||
BucketName = awsConfig.BucketName,
|
||||
Objects = objectKeys.Select(t => new KeyVersion() { Key = t }).ToList()
|
||||
};
|
||||
|
||||
|
||||
// 批量删除对象
|
||||
var deleteObjectsResponse = await amazonS3Client.DeleteObjectsAsync(deleteObjectsRequest);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("未定义的存储介质类型");
|
||||
}
|
||||
}
|
||||
|
||||
private bool isFirstCall = true;
|
||||
public async Task<long> GetObjectSizeAsync(string sourcePath)
|
||||
{
|
||||
if (isFirstCall)
|
||||
{
|
||||
GetObjectStoreTempToken();
|
||||
isFirstCall = false;
|
||||
}
|
||||
|
||||
|
||||
var objectkey = sourcePath.Trim('/');
|
||||
|
||||
if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS")
|
||||
{
|
||||
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||
|
||||
var _ossClient = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint, AliyunOSSTempToken.AccessKeyId, AliyunOSSTempToken.AccessKeySecret, AliyunOSSTempToken.SecurityToken);
|
||||
|
||||
var metadata = _ossClient.GetObjectMetadata(aliConfig.BucketName, objectkey);
|
||||
|
||||
long fileSize = metadata.ContentLength; // 文件大小(字节)
|
||||
|
||||
return fileSize;
|
||||
}
|
||||
else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO")
|
||||
{
|
||||
var minIOConfig = ObjectStoreServiceOptions.MinIO;
|
||||
|
||||
|
||||
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.EndPoint}:{minIOConfig.Port}")
|
||||
.WithCredentials(minIOConfig.AccessKeyId, minIOConfig.SecretAccessKey).WithSSL(minIOConfig.UseSSL)
|
||||
.Build();
|
||||
|
||||
|
||||
var stat = await minioClient.StatObjectAsync(new Minio.DataModel.Args.StatObjectArgs()
|
||||
.WithBucket(minIOConfig.BucketName)
|
||||
.WithObject(objectkey));
|
||||
|
||||
return stat.Size; // 文件大小(字节)
|
||||
}
|
||||
else if (ObjectStoreServiceOptions.ObjectStoreUse == "AWS")
|
||||
{
|
||||
|
||||
var awsConfig = ObjectStoreServiceOptions.AWS;
|
||||
|
||||
|
||||
// 提供awsAccessKeyId和awsSecretAccessKey构造凭证
|
||||
var credentials = new SessionAWSCredentials(AWSTempToken.AccessKeyId, AWSTempToken.SecretAccessKey, AWSTempToken.SessionToken);
|
||||
|
||||
//提供awsEndPoint(域名)进行访问配置
|
||||
var clientConfig = new AmazonS3Config
|
||||
{
|
||||
RegionEndpoint = RegionEndpoint.USEast1,
|
||||
UseHttp = true,
|
||||
};
|
||||
|
||||
var request = new Amazon.S3.Model.GetObjectMetadataRequest
|
||||
{
|
||||
BucketName = awsConfig.BucketName,
|
||||
Key = objectkey
|
||||
};
|
||||
|
||||
var amazonS3Client = new AmazonS3Client(credentials, clientConfig);
|
||||
|
||||
var response = await amazonS3Client.GetObjectMetadataAsync(request);
|
||||
|
||||
long fileSize = response.ContentLength; // 文件大小(字节)
|
||||
|
||||
return fileSize;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("未定义的存储介质类型");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ObjectStoreDTO GetObjectStoreTempToken()
|
||||
{
|
||||
|
@ -764,6 +1121,7 @@ public class OSSService : IOSSService
|
|||
BucketName = ossOptions.BucketName,
|
||||
EndPoint = ossOptions.EndPoint,
|
||||
ViewEndpoint = ossOptions.ViewEndpoint,
|
||||
PreviewEndpoint = ossOptions.PreviewEndpoint
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
令牌密码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Auth.JwtSetting.TokenExpireDays">
|
||||
<member name="P:IRaCIS.Core.Application.Auth.JwtSetting.TokenExpireMinute">
|
||||
<summary>
|
||||
过期时间
|
||||
</summary>
|
||||
|
@ -933,7 +933,7 @@
|
|||
<param name="trialReadingCriterionId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetCommonEvaluationList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetCommonEvaluationList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
<summary>
|
||||
阅片结果表、阅片结果明细,评估病灶明细表, 裁判明细表导出,条件通过 ReadingExportType ( 1,2,3,4)区分
|
||||
</summary>
|
||||
|
@ -1006,7 +1006,7 @@
|
|||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.InternationalizationService.BatchAddOrUpdateFrontInternationalization(System.Collections.Generic.List{IRaCIS.Core.Application.ViewModel.BatchInternationalizationDto})">
|
||||
<summary>
|
||||
前端批量提交,后端判断不存在就添加,存在就更新
|
||||
前端批量提交,后端查询判断不存在就添加,存在就更新 (这里提交接口也能提交后端的标识,对后端标识进行更新)
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
|
@ -1054,7 +1054,7 @@
|
|||
医生文档关联关系维护
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.AttachmentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Attachment},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.AttachmentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Attachment},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Dictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Enroll},IRaCIS.Core.Application.Helper.IOSSService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Doctor},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
医生文档关联关系维护
|
||||
</summary>
|
||||
|
@ -1089,6 +1089,48 @@
|
|||
<param name="doctorId">医生Id</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.AttachmentService.GetTrialAttachments(IRaCIS.Application.Contracts.GetTrialAttachmentsInDto)">
|
||||
<summary>
|
||||
获取项目医生附件
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.AttachmentService.GetTrialDoctorList(IRaCIS.Application.Contracts.GetTrialDoctorSelectInDto)">
|
||||
<summary>
|
||||
获取医生列表
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.AttachmentService.SetAuthorizedView(IRaCIS.Application.Contracts.SetAttachmentAuthorizedView)">
|
||||
<summary>
|
||||
修改稽查状态
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.AttachmentService.DeleteAttachment(IRaCIS.Application.Contracts.DeleteAttachment)">
|
||||
<summary>
|
||||
删除
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.AttachmentService.SaveTrialAttachments(System.Collections.Generic.IEnumerable{IRaCIS.Application.Contracts.AttachmentDTO})">
|
||||
<summary>
|
||||
上传项目医生
|
||||
</summary>
|
||||
<param name="attachmentList"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.AttachmentService.UpdateTrialAttachments(IRaCIS.Application.Contracts.AttachmentDTO)">
|
||||
<summary>
|
||||
更新医生资质
|
||||
</summary>
|
||||
<param name="attachment"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.AttachmentService.SaveAttachments(System.Collections.Generic.IEnumerable{IRaCIS.Application.Contracts.AttachmentDTO})">
|
||||
<summary>
|
||||
保存多个附件
|
||||
|
@ -1137,6 +1179,13 @@
|
|||
获取项目下医生入组状态列表[Confirmation]
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.DoctorListService.GetTrialDoctorList(IRaCIS.Application.Contracts.GetTrialDoctorListInDto)">
|
||||
<summary>
|
||||
获取项目下医生列表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.DoctorService.AddOrUpdateDoctorBasicInfo(IRaCIS.Application.Contracts.DoctorBasicInfoCommand)">
|
||||
<summary>
|
||||
添加/更新 医生基本信息 BasicInfo
|
||||
|
@ -1334,6 +1383,24 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.SysFileTypeService">
|
||||
<summary>
|
||||
系统文件类型
|
||||
</summary>
|
||||
<param name="_sysFileTypeRepository"></param>
|
||||
<param name="_mapper"></param>
|
||||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.SysFileTypeService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SysFileType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialFileType},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
系统文件类型
|
||||
</summary>
|
||||
<param name="_sysFileTypeRepository"></param>
|
||||
<param name="_mapper"></param>
|
||||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.TrialEmailNoticeConfigService">
|
||||
<summary>
|
||||
TrialEmailNoticeConfigService
|
||||
|
@ -1423,6 +1490,197 @@
|
|||
<param name="batchAddList"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.TrialFileTypeService">
|
||||
<summary>
|
||||
项目文件类型
|
||||
</summary>
|
||||
<param name="_trialFileTypeRepository"></param>
|
||||
<param name="_mapper"></param>
|
||||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFileTypeService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialFileType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SysFileType},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
项目文件类型
|
||||
</summary>
|
||||
<param name="_trialFileTypeRepository"></param>
|
||||
<param name="_mapper"></param>
|
||||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFileTypeService.GetTrialFileTypeSelectList(IRaCIS.Core.Application.ViewModel.TrialFileTypeSelectQuery)">
|
||||
<summary>
|
||||
获取项目文件类型下拉框
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFileTypeService.CopySystemFileTypeToTrial(IRaCIS.Core.Application.ViewModel.CopySystemFileTypeToTrialInDto)">
|
||||
<summary>
|
||||
复制系统数据到项目
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFileTypeService.GetTrialFileTypeData(IRaCIS.Core.Application.ViewModel.GetTrialFileTypeDataInDto)">
|
||||
<summary>
|
||||
获取项目文件类型数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFileTypeService.SetAuthorizedView(IRaCIS.Core.Application.ViewModel.SetAuthorizedViewInDto)">
|
||||
<summary>
|
||||
修改授权状态
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFileTypeService.UploadTrialFileTypeFile(IRaCIS.Core.Application.ViewModel.UploadTrialFileTypeFileInDto)">
|
||||
<summary>
|
||||
上传同意入项记录
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFileTypeService.GetTrialFileTypeFile(IRaCIS.Core.Application.ViewModel.GetTrialFileTypeFileInDto)">
|
||||
<summary>
|
||||
获取入项记录
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFileTypeService.DeleteTrialTypeFile(System.Guid)">
|
||||
<summary>
|
||||
删除入项记录
|
||||
</summary>
|
||||
<param name="trialFileTypeId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.TrialFinalRecordService">
|
||||
<summary>
|
||||
项目定稿记录
|
||||
</summary>
|
||||
<param name="_trialFinalRecordRepository"></param>
|
||||
<param name="_mapper"></param>
|
||||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFinalRecordService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialFinalRecord},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialFile},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
项目定稿记录
|
||||
</summary>
|
||||
<param name="_trialFinalRecordRepository"></param>
|
||||
<param name="_mapper"></param>
|
||||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFinalRecordService.AddOrUpdateTrialFinalRecord(IRaCIS.Core.Application.ViewModel.TrialFinalRecordAddOrEdit)">
|
||||
<summary>
|
||||
新增或者修改文档
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFinalRecordService.AuthorizedTrialFinalRecord(IRaCIS.Core.Application.ViewModel.AuthorizedTrialFinalRecordInDto)">
|
||||
<summary>
|
||||
授权文档
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFinalRecordService.DeleteTrialFinalRecord(System.Guid)">
|
||||
<summary>
|
||||
删除文档
|
||||
</summary>
|
||||
<param name="trialFinalRecordId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.TrialNormalRecordService">
|
||||
<summary>
|
||||
项目-一般文件记录
|
||||
</summary>
|
||||
<param name="_trialNormalRecordRepository"></param>
|
||||
<param name="_mapper"></param>
|
||||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialNormalRecordService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialNormalRecord},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialFile},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
项目-一般文件记录
|
||||
</summary>
|
||||
<param name="_trialNormalRecordRepository"></param>
|
||||
<param name="_mapper"></param>
|
||||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialNormalRecordService.BatchAddTrialNormalRecord(IRaCIS.Core.Application.ViewModel.BatchAddTrialNormalRecordInDto)">
|
||||
<summary>
|
||||
批量新增一般文件记录
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialNormalRecordService.AuthorizedTTrialNormalRecord(IRaCIS.Core.Application.ViewModel.AuthorizedTrialFinalRecordInDto)">
|
||||
<summary>
|
||||
授权文档
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialNormalRecordService.DeleteTrialNormalRecordList(IRaCIS.Core.Application.ViewModel.DeleteTrialNormalRecordListInDto)">
|
||||
<summary>
|
||||
批量删除一般文件记录
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.TrialTrianingRecordService">
|
||||
<summary>
|
||||
项目-培训记录
|
||||
</summary>
|
||||
<param name="_trialTrianingRecordRepository"></param>
|
||||
<param name="_mapper"></param>
|
||||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialTrianingRecordService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialTrianingRecord},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialFile},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
项目-培训记录
|
||||
</summary>
|
||||
<param name="_trialTrianingRecordRepository"></param>
|
||||
<param name="_mapper"></param>
|
||||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialTrianingRecordService.GetTrialTrianingRecordList(IRaCIS.Core.Application.ViewModel.TrialTrianingRecordQuery)">
|
||||
<summary>
|
||||
获取培训记录列表
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialTrianingRecordService.BatchAddTrialTrianingRecord(IRaCIS.Core.Application.ViewModel.BatchAddTTrianingRecordInDto)">
|
||||
<summary>
|
||||
批量新增培训记录
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialTrianingRecordService.AuthorizedTrialTrianingRecord(IRaCIS.Core.Application.ViewModel.AuthorizedTrialFinalRecordInDto)">
|
||||
<summary>
|
||||
授权文档
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialTrianingRecordService.DeleteTrialTrianingRecordList(IRaCIS.Core.Application.ViewModel.DeleteTrialNormalRecordListInDto)">
|
||||
<summary>
|
||||
批量删除培训记录
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.CalculateService.GetFinalConfirmedWorkloadAndPayPriceList(IRaCIS.Application.Contracts.CalculateDoctorAndMonthDTO)">
|
||||
<summary>
|
||||
获取某个月下的某些医生最终确认的工作量,用于计算月度费用
|
||||
|
@ -2294,14 +2552,6 @@
|
|||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.UserService.Login(System.String,System.String)">
|
||||
<summary>
|
||||
用户登陆
|
||||
</summary>
|
||||
<param name="userName"></param>
|
||||
<param name="password"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.UserService.GetUserLoginRoleList(IRaCIS.Application.Contracts.IRCLoginDto,IRaCIS.Core.Application.Auth.ITokenService,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
账号验证,获取账号角色信息 获取临时token
|
||||
|
@ -6002,6 +6252,16 @@
|
|||
文件路径
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetAddOrEdit.EnFileName">
|
||||
<summary>
|
||||
英文模板文件名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetAddOrEdit.EnPath">
|
||||
<summary>
|
||||
英文文件路径
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataSystemSetAddOrEdit.IsApply">
|
||||
<summary>
|
||||
是否应用
|
||||
|
@ -6052,6 +6312,16 @@
|
|||
文件路径
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataSystemSetAddOrEdit.EnFileName">
|
||||
<summary>
|
||||
英文模板文件名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataSystemSetAddOrEdit.EnPath">
|
||||
<summary>
|
||||
英文文件路径
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetView.CreateUserId">
|
||||
<summary>
|
||||
创建人
|
||||
|
@ -8057,6 +8327,11 @@
|
|||
任务类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetRelatedVisitTaskOutDto.IsExistUnprocessedFeedback">
|
||||
<summary>
|
||||
是否存在未处理的反馈
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetRelatedVisitTaskOutDto.IsConvertedTask">
|
||||
<summary>
|
||||
是否是转变的任务(转为IRECIST)
|
||||
|
@ -8192,6 +8467,16 @@
|
|||
任务展示访视 读片任务显示是否顺序
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingTaskDto.IsShowStudyName">
|
||||
<summary>
|
||||
是否显示检查名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingTaskDto.IsExistUnprocessedFeedback">
|
||||
<summary>
|
||||
是否存在未处理的反馈
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingTaskDto.IsConvertedTask">
|
||||
<summary>
|
||||
是否是转变的任务(转为IRECIST)
|
||||
|
@ -11779,7 +12064,7 @@
|
|||
阅片问题.标准
|
||||
</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.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.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)">
|
||||
<summary>
|
||||
阅片问题.标准
|
||||
</summary>
|
||||
|
@ -12061,7 +12346,7 @@
|
|||
<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.UserLog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo},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},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.TrialDocument},IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingCustomTag},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.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.Trial},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.UserLog},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingOncologyTaskInfo},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.TrialDocument},IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoCalculateService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingCustomTag},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.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)">
|
||||
<summary>
|
||||
IR影像阅片
|
||||
</summary>
|
||||
|
@ -12495,6 +12780,27 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.AddNoneDicomMark(IRaCIS.Core.Application.Service.Reading.Dto.AddNoneDicomMarkInDto)">
|
||||
<summary>
|
||||
添加非Dicom标记
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetNoneDicomMarkListOutDto(IRaCIS.Core.Application.Service.Reading.Dto.GetNoneDicomMarkListInDtoDto)">
|
||||
<summary>
|
||||
获取非Dicom标记
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.DeleteTrialFileType(System.Guid)">
|
||||
<summary>
|
||||
删除非Dicom标记
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.SaveVisitTaskQuestions(IRaCIS.Core.Application.Service.Reading.Dto.SubmitVisitTaskQuestionsInDto)">
|
||||
<summary>
|
||||
保存任务问题
|
||||
|
@ -13217,25 +13523,12 @@
|
|||
<param name="_readingConsistentClinicalDataRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TestService.UserMutiAccount(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.IdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserPassWordLog})">
|
||||
<member name="M:IRaCIS.Core.Application.Service.TestService.DealTialFileSie(IRaCIS.Core.Application.Helper.IOSSService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingClinicalDataPDF})">
|
||||
<summary>
|
||||
用户多账号,初次维护数据
|
||||
非dicom 临床数据
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TestService.UserTrialUser(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole})">
|
||||
<summary>
|
||||
项目用户 维护数据
|
||||
</summary>
|
||||
<param name="_trialIdentityUserRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TestService.ExternalTrialUser(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialExternalUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole})">
|
||||
<summary>
|
||||
外部人员 中心调研人员维护
|
||||
</summary>
|
||||
<param name="_trialIdentityUserRepository"></param>
|
||||
<param name="_trialUserRoleReposiotry"></param>
|
||||
<param name="_identityUserRepository"></param>
|
||||
<param name="_trialUserRoleRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TestService.ModifyClinicalDataTable">
|
||||
|
@ -13344,13 +13637,21 @@
|
|||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Helper.OSSService.MoveObject(System.String,System.String,System.Boolean)">
|
||||
<summary>
|
||||
移动OSS文件到新路径
|
||||
</summary>
|
||||
<param name="sourcePath">原文件路径(格式:bucket/key)</param>
|
||||
<param name="destPath">新文件路径(格式:bucket/key)</param>
|
||||
<param name="overwrite">是否覆盖已存在的目标文件(默认true)</param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Helper.OSSService.GetRootFolderNames">
|
||||
<summary>
|
||||
获取所有根目录名称
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Helper.OSSService.DeleteFromPrefix(System.String)">
|
||||
<member name="M:IRaCIS.Core.Application.Helper.OSSService.DeleteFromPrefix(System.String,System.Boolean)">
|
||||
<summary>
|
||||
删除某个目录的文件
|
||||
</summary>
|
||||
|
@ -13425,7 +13726,7 @@
|
|||
返回
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.ConsistencyCheckConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomStudy},IRaCIS.Core.Domain.Share.IUserInfo,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSite},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudy},AutoMapper.IMapper,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.ConsistencyCheckConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomStudy},IRaCIS.Core.Domain.Share.IUserInfo,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSite},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudy},AutoMapper.IMapper,Microsoft.Extensions.Localization.IStringLocalizer,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
构造函数注入
|
||||
</summary>
|
||||
|
@ -13774,11 +14075,21 @@
|
|||
是否是一致性分析产生
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.IRUnReadSubjectView.IsExistUnprocessedFeedback">
|
||||
<summary>
|
||||
是否存在未处理的反馈
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.IRUnreadTaskView.IsAnalysisCreate">
|
||||
<summary>
|
||||
是否是一致性分析产生
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.IRUnreadTaskView.IsExistUnprocessedFeedback">
|
||||
<summary>
|
||||
是否存在未处理的反馈
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.IRUnReadOutDto.UnReadTaskCount">
|
||||
<summary>
|
||||
未完成阅片量
|
||||
|
@ -13997,6 +14308,11 @@
|
|||
<member name="T:IRaCIS.Core.Application.ViewModel.PublishLogAddOrEdit">
|
||||
<summary> PublishLogAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.SysFileTypeAddOrEdit.ShowOrder">
|
||||
<summary>
|
||||
显示顺序
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.TrialEmailNoticeConfigView">
|
||||
<summary> TrialEmailNoticeConfigView 列表视图模型 </summary>
|
||||
</member>
|
||||
|
@ -14054,6 +14370,41 @@
|
|||
<member name="T:IRaCIS.Core.Application.ViewModel.TrialEmailNoticeConfigAddOrEdit">
|
||||
<summary> TrialEmailNoticeConfigAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.UploadTrialFileTypeFileInDto.FileRecord">
|
||||
<summary>
|
||||
文件
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.GetTrialFileTypeDataInDto.IsEnable">
|
||||
<summary>
|
||||
是否启用
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.TrialFileTypeAddOrEdit.ShowOrder">
|
||||
<summary>
|
||||
显示顺序
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.TrialFinalRecordAddOrEdit.PDFFileRecord">
|
||||
<summary>
|
||||
定稿PDF
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.TrialFinalRecordAddOrEdit.WordFileRecord">
|
||||
<summary>
|
||||
定稿Word
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.TrialFinalRecordAddOrEdit.SignFileRecord">
|
||||
<summary>
|
||||
签名页
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.TrialFinalRecordAddOrEdit.HistoryFileRecord">
|
||||
<summary>
|
||||
历史记录
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemAnonymizationView">
|
||||
<summary> SystemAnonymizationView 列表视图模型 </summary>
|
||||
</member>
|
||||
|
@ -15063,6 +15414,26 @@
|
|||
<member name="T:IRaCIS.Core.Application.Contracts.SystemDocumentQuery">
|
||||
<summary>SystemDocumentQuery 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.DocumentTrialUnionQuery.IsDeleted">
|
||||
<summary>
|
||||
课时状态
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.DocumentTrialUnionQuery.UserName">
|
||||
<summary>
|
||||
用户名
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.DocumentTrialUnionQuery.StartConfirmTime">
|
||||
<summary>
|
||||
开始时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.DocumentTrialUnionQuery.EndConfirmTime">
|
||||
<summary>
|
||||
结束时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.SystemDocumentAddOrEdit">
|
||||
<summary> SystemDocumentAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
|
@ -15149,15 +15520,6 @@
|
|||
<member name="T:IRaCIS.Core.Application.Contracts.NoneDicomStudyFileView">
|
||||
<summary> NoneDicomStudyFileView 列表视图模型 </summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.NoneDicomStudyFileQuery">
|
||||
<summary>NoneDicomStudyFileQuery 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.NoneDicomStudyFileQuery.Path">
|
||||
<summary> Path</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.NoneDicomStudyFileQuery.FileName">
|
||||
<summary> FileName</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.NoneDicomStudyFileAddOrEdit">
|
||||
<summary> NoneDicomStudyFileAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
|
@ -15310,6 +15672,11 @@
|
|||
关闭一致性质疑Dto
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.GetNextIQCQualityOutDto.IsReceived">
|
||||
<summary>
|
||||
是否领取了
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TaskMedicalReviewExportDto.MedicalDialogCloseEnum">
|
||||
<summary>
|
||||
医学审核对话关闭原因
|
||||
|
@ -15685,6 +16052,21 @@
|
|||
跨项目复制
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.BasicTrialConfig.IsShowStudyName">
|
||||
<summary>
|
||||
是否显示检查名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.BasicTrialConfig.StudyNameList">
|
||||
<summary>
|
||||
检查名称列表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialProcessConfig.ImageFormatList">
|
||||
<summary>
|
||||
图像格式
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialProcessConfig.ClinicalInformationTransmissionEnum">
|
||||
<summary>
|
||||
临床信息传输 1:系统录入2:系统录入+PDF 0:无
|
||||
|
@ -16631,6 +17013,16 @@
|
|||
<param name="state"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.SetNodicomStudyState(System.Guid,System.Guid,System.Nullable{System.Guid},System.Int32)">
|
||||
<summary>
|
||||
1、设置为不读片,2 设置为读片(取消 先前设置为不读片) 4 设置为删除(数据库记录软删除) 5 恢复为未删除
|
||||
</summary>
|
||||
<param name="subjectVisitId"></param>
|
||||
<param name="noneDicomStudyId"></param>
|
||||
<param name="noneDicomStudyFileId"></param>
|
||||
<param name="state"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.UpdateModality(IRaCIS.Core.Application.Contracts.DTO.UpdateModalityCommand)">
|
||||
<summary>
|
||||
type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型
|
||||
|
@ -17149,6 +17541,13 @@
|
|||
<param name="optionsMonitor"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.UpdateTrialStudyNameList(IRaCIS.Application.Contracts.UpdateTrialStudyNameListInDto)">
|
||||
<summary>
|
||||
修改项目的StudyNameList
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Triggers.ChallengeStateTrigger">
|
||||
<summary>
|
||||
访视 质疑状态 触发修改
|
||||
|
@ -17445,6 +17844,11 @@
|
|||
已经签名的临床数据数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Application.Contracts.AttachmentDTO.IsAuthorizedView">
|
||||
<summary>
|
||||
是否授权
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Application.Contracts.DoctorSearchDTO">
|
||||
<summary>
|
||||
Reviewer 列表查询参数
|
||||
|
@ -17455,6 +17859,21 @@
|
|||
入组 Selection 列表查询参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Application.Contracts.GetTrialDoctorListInDto.SubspecialityId">
|
||||
<summary>
|
||||
亚专业
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Application.Contracts.GetTrialDoctorListInDto.SpecialityId">
|
||||
<summary>
|
||||
专业
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Application.Contracts.GetTrialDoctorListInDto.HospitalId">
|
||||
<summary>
|
||||
机构
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Application.Contracts.DoctorBasicInfo.WorkPartTime">
|
||||
<summary>
|
||||
工作兼职
|
||||
|
|
|
@ -4,6 +4,7 @@ using IRaCIS.Core.Application.MassTransit.Command;
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using MassTransit;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text;
|
||||
|
||||
|
@ -21,6 +22,8 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
||||
public IStringLocalizer _localizer { get; set; }
|
||||
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig;
|
||||
|
||||
/// <summary>
|
||||
/// 构造函数注入
|
||||
/// </summary>
|
||||
|
@ -28,7 +31,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
public ConsistencyCheckConsumer(IRepository<DicomStudy> studyRepository, IUserInfo userInfo,
|
||||
IRepository<Subject> subjectRepository, IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<TrialSite> trialSiteRepository, IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
||||
IMapper mapper, IStringLocalizer localizer)
|
||||
IMapper mapper, IStringLocalizer localizer, IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig)
|
||||
{
|
||||
_noneDicomStudyRepository = noneDicomStudyRepository;
|
||||
_studyRepository = studyRepository;
|
||||
|
@ -38,6 +41,8 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
_trialSiteRepository = trialSiteRepository;
|
||||
_mapper = mapper;
|
||||
_localizer = localizer;
|
||||
|
||||
_systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
}
|
||||
|
||||
|
||||
|
@ -186,7 +191,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
{
|
||||
dialogMsg.AppendLine($"<br/>");
|
||||
//---核对EDC数据,完全一致, 审核通过
|
||||
dialogMsg.AppendLine(_localizer["ConsistencyVerification_EDCA"]);
|
||||
dialogMsg.AppendLine(_localizer["ConsistencyVerification_EDCA", _systemEmailConfig.SystemShortName]);
|
||||
|
||||
|
||||
// dialogMsg.AppendLine(@$"<br>说明:为高效解决/处理以上全部质疑问题,麻烦您准确核实实际影像检查情况。请注意影像日期与实际检查的日期可能会不一致,部分检查(如PET -CT)可能同时存在多种模态影像。准确核实后,请回复该访视正确的影像检查情况。");
|
||||
|
@ -196,7 +201,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
dbSV.CheckChallengeState = CheckChanllengeTypeEnum.Closed;
|
||||
|
||||
//---核对EDC数据,完全一致
|
||||
dbSV.CheckResult = _localizer["ConsistencyVerification_EDCB"];
|
||||
dbSV.CheckResult = _localizer["ConsistencyVerification_EDCB", _systemEmailConfig.SystemShortName];
|
||||
//---自动核查通过
|
||||
dbSV.ManualPassReason = _localizer["ConsistencyVerification_Auto"];
|
||||
|
||||
|
@ -224,7 +229,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
{
|
||||
num++;
|
||||
//影像检查(EDC 缺少) ConsistencyVerification_EdcL
|
||||
dialogMsg.AppendLine($"<br/><div style='text-indent: 20px;'>{num}. {_localizer["ConsistencyVerification_EdcL", item.StudyDate, item.Modality]}</div>");
|
||||
dialogMsg.AppendLine($"<br/><div style='text-indent: 20px;'>{num}. {_localizer["ConsistencyVerification_EdcL", item.StudyDate, item.Modality, _systemEmailConfig.SystemShortName]}</div>");
|
||||
|
||||
}
|
||||
|
||||
|
@ -232,15 +237,15 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
{
|
||||
num++;
|
||||
// 影像检查(IRC 缺少)
|
||||
dialogMsg.AppendLine($"<br/><div style='text-indent: 20px;'>{num}. {_localizer["ConsistencyVerification_IrcLi", item.StudyDate, item.Modality]}</div>");
|
||||
dialogMsg.AppendLine($"<br/><div style='text-indent: 20px;'>{num}. {_localizer["ConsistencyVerification_IrcLi", item.StudyDate, item.Modality, _systemEmailConfig.SystemShortName]}</div>");
|
||||
}
|
||||
|
||||
dialogMsg.AppendLine($"<br/>");
|
||||
dialogMsg.AppendLine(@$"<div>{_localizer["ConsistencyVerification_Desc"]}</div>");
|
||||
|
||||
dbSV.CheckResult = _localizer["ConsistencyVerification_Conf"] +
|
||||
String.Join(" | ", dbExceptExcel.Select(t => $"{_localizer["ConsistencyVerification_EdcL", t.StudyDate, t.Modality]}")) + " | "
|
||||
+ String.Join(" | ", excelExceptDB.Select(t => $"{_localizer["ConsistencyVerification_IrcLi", t.StudyDate, t.Modality]}"));
|
||||
dbSV.CheckResult =
|
||||
String.Join(" | ", dbExceptExcel.Select(t => $"{_localizer["ConsistencyVerification_EdcL", t.StudyDate, t.Modality, _systemEmailConfig.SystemShortName]}")) + " | "
|
||||
+ String.Join(" | ", excelExceptDB.Select(t => $"{_localizer["ConsistencyVerification_IrcLi", t.StudyDate, t.Modality, _systemEmailConfig.SystemShortName]}"));
|
||||
|
||||
//新增一致性核查质疑记录
|
||||
|
||||
|
|
|
@ -339,6 +339,16 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public int UrgentCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否存在未处理的反馈
|
||||
/// </summary>
|
||||
public bool IsExistUnprocessedFeedback
|
||||
{
|
||||
get
|
||||
{
|
||||
return UnReadCanReadTaskList.Any(t => t.IsExistUnprocessedFeedback);
|
||||
}
|
||||
}
|
||||
|
||||
public List<IRUnreadTaskView> UnReadCanReadTaskList { get; set; } = new List<IRUnreadTaskView>();
|
||||
|
||||
|
@ -355,6 +365,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
/// 是否是一致性分析产生
|
||||
/// </summary>
|
||||
public bool IsAnalysisCreate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否存在未处理的反馈
|
||||
/// </summary>
|
||||
public bool IsExistUnprocessedFeedback { get; set; }
|
||||
|
||||
public bool IsUrgent { get; set; }
|
||||
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
|
|
|
@ -1055,6 +1055,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
ReadingCategory = u.ReadingCategory,
|
||||
IsAnalysisCreate = u.IsAnalysisCreate,
|
||||
ArmEnum = u.ArmEnum,
|
||||
IsExistUnprocessedFeedback=u.UserFeedBackList.Any(t => t.State ==0),
|
||||
TrialReadingCriterionId = u.TrialReadingCriterionId,
|
||||
IsNeedClinicalDataSign = u.IsNeedClinicalDataSign,
|
||||
IsClinicalDataSign = u.IsClinicalDataSign,
|
||||
|
@ -1085,6 +1086,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
ReadingCategory = u.ReadingCategory,
|
||||
IsAnalysisCreate = u.IsAnalysisCreate,
|
||||
ArmEnum = u.ArmEnum,
|
||||
IsExistUnprocessedFeedback = u.UserFeedBackList.Any(t => t.State == 0),
|
||||
TrialReadingCriterionId = u.TrialReadingCriterionId,
|
||||
IsNeedClinicalDataSign = u.IsNeedClinicalDataSign,
|
||||
IsClinicalDataSign = u.IsClinicalDataSign,
|
||||
|
@ -1194,6 +1196,7 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
ReadingCategory = u.ReadingCategory,
|
||||
IsAnalysisCreate = u.IsAnalysisCreate,
|
||||
ArmEnum = u.ArmEnum,
|
||||
IsExistUnprocessedFeedback = u.UserFeedBackList.Any(t => t.State == 0),
|
||||
TrialReadingCriterionId = u.TrialReadingCriterionId,
|
||||
IsNeedClinicalDataSign = u.IsNeedClinicalDataSign,
|
||||
IsClinicalDataSign = u.IsClinicalDataSign,
|
||||
|
|
|
@ -112,6 +112,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public int? State { get; set; }
|
||||
|
||||
public int InternationalizationType { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class BatchAddInternationalizationDto : BatchInternationalizationDto
|
||||
|
@ -121,6 +123,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public class InternationalizationSimpleDto : BatchInternationalizationDto
|
||||
{
|
||||
public string Version { get; set; }
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ 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;
|
||||
|
@ -81,7 +82,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
.WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.OrganizationName),
|
||||
t => t.UserRole.OrganizationName.Contains(param.OrganizationName))
|
||||
t => t.UserRole.IdentityUser.OrganizationName.Contains(param.OrganizationName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserRealName),
|
||||
t => (t.UserRole.FullName).Contains(param.UserRealName))
|
||||
.Select(t => new TrialMaintenanceDTO()
|
||||
|
@ -1613,8 +1614,52 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
}
|
||||
|
||||
public List<T> DealOncologyResult<T>(IRepository<ReadingOncologyTaskInfo> _oncologyRepository, bool isOncology, List<T> list) where T : CommonEvaluationExport
|
||||
{
|
||||
if (isOncology)
|
||||
{
|
||||
|
||||
var subjectIdList = list.Select(t => t.SubjectId).Distinct().ToList();
|
||||
|
||||
//已阅片完的肿瘤学结果
|
||||
var oncologyResultList = _oncologyRepository.Where(t => subjectIdList.Contains(t.OncologyVisitTask.SubjectId)
|
||||
&& t.OncologyVisitTask.IsAnalysisCreate == false && t.OncologyVisitTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.OncologyVisitTask.TaskState == TaskState.Effect)
|
||||
|
||||
.Select(t => new { t.OncologyVisitTask.SubjectId, OncologyVisitTaskNum = t.OncologyVisitTask.VisitTaskNum, OncologyUserName = t.OncologyVisitTask.DoctorUser.UserName, t.VisitTask.VisitTaskNum, t.VisitTaskId, t.EvaluationReason, t.EvaluationResult })
|
||||
.ToList();
|
||||
|
||||
foreach (var subjectOncologyResult in oncologyResultList.GroupBy(t => t.SubjectId))
|
||||
{
|
||||
//最后已完成的肿瘤学任务号
|
||||
var lastOncologyVisitTaskNum = subjectOncologyResult.OrderByDescending(t => t.OncologyVisitTaskNum).FirstOrDefault().OncologyVisitTaskNum;
|
||||
|
||||
//需要填充的肿瘤学结果
|
||||
var subjectOncologyList = subjectOncologyResult.Where(t => t.OncologyVisitTaskNum == lastOncologyVisitTaskNum).ToList();
|
||||
|
||||
|
||||
foreach (var subjectOncology in subjectOncologyList)
|
||||
{
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item.SubjectId == subjectOncology.SubjectId && item.VisitTaskNum == subjectOncology.VisitTaskNum)
|
||||
{
|
||||
item.OncologyReason = subjectOncology.EvaluationReason;
|
||||
item.OncologyResult = subjectOncology.EvaluationResult;
|
||||
item.OncologyUserName = subjectOncology.OncologyUserName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
public List<T> DealJudgeMark<T>(ArbitrationRule arbitrationRule, bool isGlobalReading, IEnumerable<T> list) where T : CommonEvaluationExport
|
||||
{
|
||||
//处理访视任务的裁判标记
|
||||
|
@ -2172,12 +2217,13 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
[FromServices] IDictionaryService _dictionaryService,
|
||||
[FromServices] IRepository<ReadingQuestionTrial> _trialReadingQuestionRepository,
|
||||
[FromServices] IRepository<ReadingTableQuestionTrial> _trialReadingTableQuestionRepository,
|
||||
[FromServices] IRepository<ReadingOncologyTaskInfo> _oncologyRepository,
|
||||
[FromServices] IRepository<Trial> _trialRepository)
|
||||
{
|
||||
var trialId = inQuery.TrialId;
|
||||
var trialReadingCriterionId = inQuery.TrialReadingCriterionId;
|
||||
//每次查询必须是单标准的
|
||||
var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionGroup, t.IsGlobalReading, t.IsArbitrationReading, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync();
|
||||
var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionGroup, t.IsGlobalReading, t.IsArbitrationReading, t.IsOncologyReading, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync();
|
||||
|
||||
|
||||
var query = _visitTaskRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsAnalysisCreate == false && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze))
|
||||
|
@ -2218,6 +2264,16 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
//仲裁阅片 才有裁判阅片明细表 同时要把模板里面的三列给去掉
|
||||
removeColumnIndexList = new List<int>() { 6, 7, 8 };
|
||||
}
|
||||
|
||||
//阅片结果表 和阅片结果明细表 没有肿瘤学的时候需要移除肿瘤学三个字段
|
||||
|
||||
if (!criterion.IsOncologyReading)
|
||||
{
|
||||
if (inQuery.ReadingExportType == ExportResult.TableOfAssessmentResults || inQuery.ReadingExportType == ExportResult.DetailedTableOfAssessmentResults)
|
||||
{
|
||||
removeColumnIndexList = removeColumnIndexList.Union(new List<int>() { 9, 10, 11 }).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var export_Template = StaticData.Export.CommonReading_Export;
|
||||
|
@ -2400,7 +2456,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
{
|
||||
Id = Guid.Empty,
|
||||
Name = (t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.Tumor) ? (_userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估") : t.QuestionName
|
||||
}).ToList();
|
||||
}).Distinct().ToList();
|
||||
|
||||
|
||||
|
||||
|
@ -2413,7 +2469,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
{
|
||||
Id = Guid.Empty,
|
||||
Name = (t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.ImgOncology) ? (_userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估") : t.QuestionName
|
||||
}).ToList();
|
||||
}).Distinct().ToList();
|
||||
|
||||
}
|
||||
else if (criterion.CriterionType == CriterionType.PCWG3)
|
||||
|
@ -2422,7 +2478,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
{
|
||||
Id = Guid.Empty,
|
||||
Name = t.QuestionName
|
||||
}).ToList();
|
||||
}).Distinct().ToList();
|
||||
|
||||
}
|
||||
|
||||
|
@ -2636,7 +2692,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
addLessionInfoList.Add(new CommonQuesionInfo() { QuestionId = Guid.Empty, QuestionName = _userInfo.IsEn_Us ? "Table Name" : "表格名称", QuestionValue = firstLessionAnser.TableName });
|
||||
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionId=t.TableQuesionId, QuestionName = t.TableName + "_" + t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode });
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionId = t.TableQuesionId, QuestionName = t.TableName + "_" + t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode });
|
||||
|
||||
//有三部分组成 外层问题+ 固定列表格名称 + 动态的表格问题
|
||||
dynamicLessionInfoList = item.QuestionAnswerList.Union(addLessionInfoList).Union(dynamicPartialLessionInfoList).ToList();
|
||||
|
@ -2678,7 +2734,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
{
|
||||
AutoColumnTitleRowIndex = 2,
|
||||
AutoColumnStartIndex = 6,
|
||||
TempalteLastColumnIndex = 8,
|
||||
TempalteLastColumnIndex = 11,
|
||||
DynamicItemDicName = "TranslateDicName",
|
||||
DynamicItemValueName = "QuestionValue",
|
||||
DynamicItemTitleName = "QuestionName",
|
||||
|
@ -2731,7 +2787,8 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
#region 最终导出参数处理
|
||||
|
||||
if (inQuery.ReadingExportType == ExportResult.DetailedTableOfAdjudicationResults)
|
||||
//裁判阅片明细表
|
||||
if (export_Template == StaticData.Export.CommonJudgeReadingDetail_Export)
|
||||
{
|
||||
//R1 R2 两个人的访视都阅片完成了才可以,去除只有一个人阅片完成的访视
|
||||
//找到只有一个人阅片的受试者 和访视
|
||||
|
@ -2747,7 +2804,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
//处理裁判标记
|
||||
list = DealJudgeMark(criterion.ArbitrationRule, criterion.IsGlobalReading, list);
|
||||
|
||||
//裁判阅片明细表
|
||||
//处理肿瘤学结果
|
||||
list = DealOncologyResult(_oncologyRepository, criterion.IsOncologyReading, list);
|
||||
|
||||
//裁判阅片明细表 处理完标记后处理
|
||||
if (export_Template == StaticData.Export.CommonJudgeReadingDetail_Export)
|
||||
{
|
||||
//裁判产生标记为空的数据过滤掉
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
#region DTO
|
||||
public class DoctorDownloadInfo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string ReviewerCode { get; set; }
|
||||
|
||||
|
@ -111,7 +111,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
public int Language { get; set; }
|
||||
|
||||
public List<Guid> DoctorIdList { get; set; }
|
||||
public List<Guid?> DoctorIdList { get; set; }
|
||||
}
|
||||
|
||||
public class GetDoctoreAttachPathCommand
|
||||
|
|
|
@ -45,6 +45,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
ValueCN = t.ValueCN,
|
||||
FrontType = t.FrontType,
|
||||
Description = t.Description,
|
||||
Module = t.Module,
|
||||
State = t.State,
|
||||
Version = t.PublishLog.Version,
|
||||
CreateTime = t.CreateTime,
|
||||
InternationalizationType = t.InternationalizationType
|
||||
}).ToListAsync();
|
||||
|
||||
await _fusionCache.SetAsync<List<InternationalizationSimpleDto>>(CacheKeys.FrontInternational, list, TimeSpan.FromDays(1));
|
||||
|
@ -55,7 +60,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 前端批量提交,后端判断不存在就添加,存在就更新
|
||||
/// 前端批量提交,后端查询判断不存在就添加,存在就更新 (这里提交接口也能提交后端的标识,对后端标识进行更新)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
|
@ -65,7 +70,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
foreach (var item in batchList)
|
||||
{
|
||||
var find = await _internationalizationRepository.FirstOrDefaultAsync(t => t.Code == item.Code && t.Description == item.Description && t.InternationalizationType == 0);
|
||||
var find = await _internationalizationRepository.FirstOrDefaultAsync(t => t.Code == item.Code && t.InternationalizationType == item.InternationalizationType);
|
||||
|
||||
if (find != null)
|
||||
{
|
||||
|
@ -77,7 +82,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
var frontState = item.State == null ? 0 : (int)item.State;
|
||||
|
||||
var mapItem = _mapper.Map<Internationalization>(item);
|
||||
mapItem.InternationalizationType = 0;
|
||||
//mapItem.InternationalizationType = 0;
|
||||
|
||||
// 0 是预翻译 1是已确认 2是后端废弃
|
||||
mapItem.State = frontState;
|
||||
|
|
|
@ -583,6 +583,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
saveItem.IsTestUser = true;
|
||||
}
|
||||
|
||||
saveItem.UserCeateSource = UserCeateSource.ReviewerSelect;
|
||||
saveItem.TrialId = trialId;
|
||||
|
||||
saveItem.Code = _identityUserRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
|
||||
|
@ -9,7 +12,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// 医生文档关联关系维护
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Reviewer")]
|
||||
public class AttachmentService(IRepository<Attachment> _attachmentrepository, IRepository<Doctor> _doctorrepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IAttachmentService
|
||||
public class AttachmentService(IRepository<Attachment> _attachmentrepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<Enroll> _enrollRepository,
|
||||
IOSSService _oSSService,
|
||||
IRepository<Doctor> _doctorrepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IAttachmentService
|
||||
{
|
||||
|
||||
|
||||
|
@ -89,6 +96,150 @@ namespace IRaCIS.Core.Application.Service
|
|||
return attachmentList;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目医生附件
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<AttachmentDTO>> GetTrialAttachments(GetTrialAttachmentsInDto inDto)
|
||||
{
|
||||
|
||||
|
||||
|
||||
var dicList=await _dictionaryRepository.Where(x => x.Parent.Code == "CertificateFileType").Select(x=>x.Code).ToListAsync();
|
||||
|
||||
var attachmentList = await _attachmentrepository
|
||||
.Where(a =>a.Doctor.EnrollList.Any(x=>x.TrialId == inDto.TrialId && x.EnrollStatus >= EnrollStatus.InviteIntoGroup)|| a.TrialId == inDto.TrialId)
|
||||
.WhereIf(inDto.DoctorId!=null,x=>x.DoctorId==inDto.DoctorId)
|
||||
.WhereIf(inDto.IsAuthorizedView != null, x => x.IsAuthorizedView == inDto.IsAuthorizedView)
|
||||
.WhereIf(inDto.Type.IsNotNullOrEmpty(), x => x.Type == inDto.Type)
|
||||
.WhereIf(inDto.FileName.IsNotNullOrEmpty(), x => inDto.FileName.Contains(x.FileName))
|
||||
|
||||
.Where(a => dicList.Contains(a.Type)||a.Type==string.Empty)
|
||||
|
||||
|
||||
|
||||
.ProjectTo<AttachmentDTO>(_mapper.ConfigurationProvider, new { TrialId = inDto.TrialId }).ToPagedListAsync(inDto);
|
||||
|
||||
|
||||
return attachmentList;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取医生列表
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetTrialDoctorListOutDto>> GetTrialDoctorList(GetTrialDoctorSelectInDto inDto)
|
||||
{
|
||||
var result= await _enrollRepository.Where(x => x.TrialId == inDto.TrialId && x.EnrollStatus >= EnrollStatus.InviteIntoGroup).Select(x => x.Doctor)
|
||||
|
||||
.ProjectTo<GetTrialDoctorListOutDto>(_mapper.ConfigurationProvider).OrderBy(x=>x.BlindName).ToListAsync();
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改稽查状态
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetAuthorizedView(SetAttachmentAuthorizedView inDto)
|
||||
{
|
||||
await _attachmentrepository.UpdatePartialFromQueryAsync(x => inDto.Ids.Contains(x.Id), x => new Attachment() { IsAuthorizedView = inDto.IsAuthorizedView });
|
||||
|
||||
await _attachmentrepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> DeleteAttachment(DeleteAttachment inDto)
|
||||
{
|
||||
var success = await _attachmentrepository.DeleteFromQueryAsync(t => inDto.Ids.Contains(t.Id));
|
||||
await _attachmentrepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传项目医生
|
||||
/// </summary>
|
||||
/// <param name="attachmentList"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IEnumerable<AttachmentDTO>> SaveTrialAttachments(IEnumerable<AttachmentDTO> attachmentList)
|
||||
{
|
||||
|
||||
foreach (var item in attachmentList)
|
||||
{
|
||||
if (item.DoctorId != null)
|
||||
{
|
||||
await _attachmentrepository.BatchDeleteNoTrackingAsync(a => a.DoctorId == item.DoctorId && a.Type == item.Type);
|
||||
}
|
||||
}
|
||||
|
||||
var attachments = _mapper.Map<IEnumerable<Attachment>>(attachmentList).ToList();
|
||||
var newAttachment = attachments.Where(t => t.Id == Guid.Empty);
|
||||
await _attachmentrepository.AddRangeAsync(newAttachment);
|
||||
await _attachmentrepository.SaveChangesAsync();
|
||||
|
||||
var list = _mapper.Map<IEnumerable<AttachmentDTO>>(attachments).ToList();
|
||||
|
||||
list.ForEach(t => t.FullPath = t.Path + "?access_token=" + _userInfo.UserToken);
|
||||
|
||||
return list;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新医生资质
|
||||
/// </summary>
|
||||
/// <param name="attachment"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> UpdateTrialAttachments(AttachmentDTO attachment)
|
||||
{
|
||||
|
||||
if (!attachment.Path.Contains(attachment.DoctorId.ToString()))
|
||||
{
|
||||
var attachmentData= await _attachmentrepository.Where(a => a.Id == attachment.Id).FirstNotNullAsync();
|
||||
|
||||
var fileName= attachmentData.Path.Split("/").Last();
|
||||
|
||||
|
||||
attachment.Path = $"/systemData/reviewe/{attachment.Type}/{attachment.DoctorId}/{fileName}";
|
||||
|
||||
await _oSSService.MoveObject(attachmentData.Path, attachment.Path);
|
||||
|
||||
}
|
||||
|
||||
if (attachment.DoctorId != null)
|
||||
{
|
||||
await _attachmentrepository.DeleteFromQueryAsync(a =>a.Id!=attachment.Id&& a.DoctorId == attachment.DoctorId && a.Type == attachment.Type);
|
||||
}
|
||||
|
||||
attachment.UpdateTime = DateTime.Now;
|
||||
await _attachmentrepository.UpdateFromDTOAsync(attachment);
|
||||
|
||||
await _attachmentrepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
[NonDynamicMethod]
|
||||
public async Task<AttachmentDTO> GetDetailById(Guid attachmentId)
|
||||
{
|
||||
|
|
|
@ -2,19 +2,80 @@
|
|||
{
|
||||
public class AttachmentDTO
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid DoctorId { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public Guid? DoctorId { get; set; }
|
||||
public bool IsOfficial { get; set; }
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string Path { get; set; } = string.Empty;
|
||||
public string FullPath { get; set; } = string.Empty;
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
public int Language { get; set; }
|
||||
|
||||
public bool ReUpload { get; set; } = false;
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否授权
|
||||
/// </summary>
|
||||
|
||||
public bool IsAuthorizedView { get; set; } = false;
|
||||
|
||||
public string BlindName { get; set; } = string.Empty;
|
||||
|
||||
public string BlindNameCN { get; set; } = string.Empty;
|
||||
public string ChineseName { get; set; } = string.Empty;
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
public string FullName => LastName + " / " + FirstName;
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class SetAttachmentAuthorizedView
|
||||
{
|
||||
public List<Guid> Ids { get; set; }
|
||||
|
||||
public bool IsAuthorizedView { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteAttachment
|
||||
{
|
||||
public List<Guid> Ids { get; set; }
|
||||
}
|
||||
|
||||
public class GetTrialDoctorSelectInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
public class GetTrialDoctorListOutDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string BlindName { get; set; } = string.Empty;
|
||||
|
||||
public string BlindNameCN { get; set; } = string.Empty;
|
||||
public string ChineseName { get; set; } = string.Empty;
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
public string FullName => LastName + " / " + FirstName;
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class GetTrialAttachmentsInDto:PageInput
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public string? Type { get; set; }
|
||||
|
||||
public Guid? DoctorId { get; set; }
|
||||
|
||||
public string? FileName { get; set; }
|
||||
|
||||
public bool? IsAuthorizedView { get; set; }
|
||||
}
|
||||
public class ReviewerAckDTO
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
|
|
@ -169,6 +169,16 @@ namespace IRaCIS.Application.Contracts
|
|||
public class ReviewerConfirmationQueryDTO : PageInput
|
||||
{
|
||||
public Guid TrialId { get; set; } = Guid.Empty;
|
||||
|
||||
public DateTime? OptStartTime{ get; set; }
|
||||
|
||||
public DateTime? OptEndTime { get; set; }
|
||||
|
||||
public string? Code { get; set; }
|
||||
|
||||
public UserTypeEnum? UserTypeEnum { get; set; }
|
||||
|
||||
public string? OptUserName { get; set; }
|
||||
}
|
||||
|
||||
public class SelectionReviewerDTO : DoctorDTO
|
||||
|
@ -194,14 +204,48 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public string City { get; set; } = string.Empty;
|
||||
public string HospitalName { get; set; } = string.Empty;
|
||||
|
||||
public string HospitalNameCN { get; set; } = string.Empty;
|
||||
public string Country { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
public class GetTrialDoctorListInDto : PageInput
|
||||
{
|
||||
public Guid TrialId { get; set; } = Guid.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 亚专业
|
||||
/// </summary>
|
||||
public Guid? SubspecialityId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 专业
|
||||
/// </summary>
|
||||
public Guid? SpecialityId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 机构
|
||||
/// </summary>
|
||||
public Guid? HospitalId { get; set; }
|
||||
}
|
||||
|
||||
public class TrialDoctorInfo : ConfirmationReviewerDTO
|
||||
{
|
||||
|
||||
|
||||
|
||||
public List<string> SubspecialityList => DictionaryList.Where(t => t.ParentCode == StaticData.Subspeciality).OrderBy(t => t.ShowOrder).Select(t => t.Value).ToList();
|
||||
|
||||
public List<string> SubspecialityCNList => DictionaryList.Where(t => t.ParentCode == StaticData.Subspeciality).OrderBy(t => t.ShowOrder).Select(t => t.ValueCN).ToList();
|
||||
}
|
||||
|
||||
public class ConfirmationReviewerDTO : DoctorOptDTO
|
||||
{
|
||||
public int DoctorTrialState { get; set; }
|
||||
public string OptUserName { get; set; } = string.Empty;
|
||||
|
||||
public UserTypeEnum? UserTypeEnum { get; set; }
|
||||
public DateTime? OptTime { get; set; }
|
||||
public string? OptTimeStr => OptTime?.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
|
@ -223,6 +267,8 @@ namespace IRaCIS.Application.Contracts
|
|||
public List<Guid> SubspecialityIds => DictionaryList.Where(t => t.ParentCode == StaticData.Subspeciality).OrderBy(t => t.ShowOrder).Select(t => t.Id).ToList();
|
||||
|
||||
public Guid? HospitalId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -235,6 +281,10 @@ namespace IRaCIS.Application.Contracts
|
|||
public string OptUserName { get; set; } = String.Empty;
|
||||
public DateTime? OptTime { get; set; }
|
||||
|
||||
public int OptUserType { get; set; }
|
||||
|
||||
public UserTypeEnum UserTypeEnum { get; set; }
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -523,6 +573,8 @@ namespace IRaCIS.Application.Contracts
|
|||
{
|
||||
public string BlindName { get; set; }
|
||||
|
||||
public bool IsHaveAccount { get; set; } = false;
|
||||
|
||||
public string BlindNameCN { get; set; } = string.Empty;
|
||||
|
||||
public List<DicView> DoctorDicViewDtos = new List<DicView>();
|
||||
|
|
|
@ -243,11 +243,137 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
|
||||
|
||||
#region 连表查询
|
||||
//var query = from enroll in _enrollRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus >= EnrollStatus.InviteIntoGroup)
|
||||
// join enrollDetail in _enrollDetailRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus >= EnrollStatus.InviteIntoGroup) on new { enroll.DoctorId, enroll.EnrollStatus } equals new { enrollDetail.DoctorId, enrollDetail.EnrollStatus } into enrollDetailtemp
|
||||
// from leftenrollDetail in enrollDetailtemp.DefaultIfEmpty()
|
||||
// select new ConfirmationReviewerDTO()
|
||||
// {
|
||||
// DoctorTrialState = (int)leftenrollDetail.EnrollStatus,
|
||||
// OptTime = leftenrollDetail.CreateTime,
|
||||
// UserTypeEnum = leftenrollDetail.CreateUserRole.UserTypeEnum,
|
||||
// OptUserName = leftenrollDetail.CreateUserRole.UserName,
|
||||
// SubmmitTime = leftenrollDetail.CreateTime,
|
||||
// SubmmitUserName = leftenrollDetail.CreateUserRole.UserName,
|
||||
// //BlindName= enroll.BlindName,
|
||||
// //BlindNameCN= enroll.BlindNameCN,
|
||||
// SpecialityId = enroll.Doctor.SpecialityId,
|
||||
// SpecialityCN = enroll.Doctor.Speciality.ValueCN,
|
||||
// Speciality = enroll.Doctor.Speciality.Value,
|
||||
// //SpecialityOther=enroll.Doctor.Speciality.SpecialityOther,
|
||||
// //SpecialityOtherCN= enroll.Doctor.Speciality.SpecialityOtherCN,
|
||||
// DictionaryList = enroll.Doctor.DoctorDicRelationList.Where(t => t.KeyName == StaticData.ReadingType || t.KeyName == StaticData.Subspeciality).Select(t => t.Dictionary).OrderBy(t => t.ShowOrder).Select(x => new DicView()
|
||||
// {
|
||||
// Id = x.Id,
|
||||
// ParentCode = x.Parent.Code,
|
||||
// ShowOrder = x.ShowOrder,
|
||||
// Value = x.Value,
|
||||
// ValueCN = x.ValueCN
|
||||
// }).ToList(),
|
||||
|
||||
// //HospitalId= enroll.BlindName
|
||||
|
||||
// Id = enroll.Doctor.Id,
|
||||
// Code = enroll.DoctorUser.UserName,
|
||||
// //FirstName=enroll.FirstName,
|
||||
// //LastName = enroll.LastName,
|
||||
// //ChineseName = enroll.ChineseName,
|
||||
// //City = enroll.City,
|
||||
// //HospitalName = enroll.HospitalName,
|
||||
// //Country = enroll.Country,
|
||||
// };
|
||||
|
||||
|
||||
//var result = await query
|
||||
// .WhereIf(inQuery.OptStartTime != null, x => x.OptTime >= inQuery.OptStartTime)
|
||||
// .WhereIf(inQuery.OptEndTime != null, x => x.OptTime <= inQuery.OptEndTime)
|
||||
// .WhereIf(inQuery.UserTypeEnum != null, x => x.UserTypeEnum == inQuery.UserTypeEnum)
|
||||
// .WhereIf(inQuery.Code.IsNotNullOrEmpty(), x => x.Code.Contains(inQuery.Code))
|
||||
|
||||
// .WhereIf(inQuery.OptUserName.IsNotNullOrEmpty(), x => x.OptUserName.Contains(inQuery.OptUserName))
|
||||
// .ToPagedListAsync(inQuery);
|
||||
#endregion
|
||||
|
||||
|
||||
#region 查询第一个
|
||||
|
||||
// 这里这样写的原因是因为 要取最新的入组详情 然后还要根据时间筛选 入组信息
|
||||
var query = _enrollDetailRepository
|
||||
.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus >= EnrollStatus.InviteIntoGroup);
|
||||
var enrollStateList = await query
|
||||
.ProjectTo<DoctorStateModelDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
enrollStateList = enrollStateList.GroupBy(e => e.DoctorId)
|
||||
.Select(g => g.OrderByDescending(e => e.OptTime).FirstOrDefault()).ToList();
|
||||
|
||||
enrollStateList = enrollStateList
|
||||
.WhereIf(inQuery.OptStartTime != null, x => x.OptTime >= inQuery.OptStartTime)
|
||||
.WhereIf(inQuery.OptEndTime != null, x => x.OptTime <= inQuery.OptEndTime)
|
||||
.WhereIf(inQuery.UserTypeEnum != null, x => x.UserTypeEnum == inQuery.UserTypeEnum)
|
||||
.ToList();
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var doctorids = enrollStateList.Select(x => x.DoctorId).ToList();
|
||||
|
||||
|
||||
var doctorQuery = _enrollRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus >= EnrollStatus.InviteIntoGroup)
|
||||
.ProjectTo<ConfirmationReviewerDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.WhereIf(inQuery.OptStartTime != null || inQuery.OptEndTime != null || inQuery.UserTypeEnum != null, x => doctorids.Contains(x.DoctorId))
|
||||
.ProjectTo<ConfirmationReviewerDTO>(_mapper.ConfigurationProvider)
|
||||
.WhereIf(inQuery.Code.IsNotNullOrEmpty(), x => x.Code.Contains(inQuery.Code))
|
||||
|
||||
.WhereIf(inQuery.OptUserName.IsNotNullOrEmpty(), x => x.OptUserName.Contains(inQuery.OptUserName));
|
||||
|
||||
var doctorPageList = await doctorQuery.ToPagedListAsync(inQuery);
|
||||
|
||||
|
||||
doctorPageList.CurrentPageData.ToList().ForEach(u =>
|
||||
{
|
||||
u.DoctorTrialState = (int)EnrollStatus.InviteIntoGroup;
|
||||
var opt = enrollStateList.OrderByDescending(x=>x.OptTime).FirstOrDefault(t => t.DoctorId == u.Id);
|
||||
if (opt != null)
|
||||
{
|
||||
u.DoctorTrialState = opt.IntoGroupState;
|
||||
u.OptTime = opt.OptTime;
|
||||
u.UserTypeEnum = opt.UserTypeEnum;
|
||||
u.OptUserName = opt.OptUserName;
|
||||
}
|
||||
});
|
||||
|
||||
return doctorPageList;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目下医生列表
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialDoctorInfo>> GetTrialDoctorList(
|
||||
GetTrialDoctorListInDto inQuery)
|
||||
{
|
||||
|
||||
|
||||
var doctorQuery = _enrollRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus == EnrollStatus.ConfirmIntoGroup)
|
||||
|
||||
.ProjectTo<TrialDoctorInfo>(_mapper.ConfigurationProvider);
|
||||
|
||||
var doctorPageList = await doctorQuery
|
||||
.WhereIf(inQuery.HospitalId!=null,x=>x.HospitalId==inQuery.HospitalId.Value)
|
||||
.WhereIf(inQuery.SpecialityId != null, x => x.SpecialityId == inQuery.SpecialityId.Value)
|
||||
.WhereIf(inQuery.SubspecialityId != null, x => x.DictionaryList.Any(x=>x.Id==inQuery.SubspecialityId.Value))
|
||||
.ToPagedListAsync(inQuery);
|
||||
|
||||
var enrollStateList = await _enrollDetailRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus > EnrollStatus.InviteIntoGroup)
|
||||
.ProjectTo<DoctorStateModelDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<DoctorDictionary> _doctorDictionaryRepository,
|
||||
IRepository<DoctorSummarize> _doctorSummarizeRepository,
|
||||
IRepository<Enroll> _enrollRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<Hospital> _hospitalRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<Attachment> _attachmentRepository,
|
||||
|
@ -490,7 +491,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var doctorBasicInfo = (await _doctorRepository.Where(t => t.Id == doctorId)
|
||||
.ProjectTo<DoctorBasicInfoDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
doctorBasicInfo.IsHaveAccount =await _userRoleRepository.AnyAsync(x => x.DoctorId == doctorId);
|
||||
return doctorBasicInfo;
|
||||
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var isEn_Us = false;
|
||||
|
||||
Guid TrialId = Guid.Empty;
|
||||
|
||||
// 从 DateTime 映射到 DateOnly
|
||||
CreateMap<DateTime, DateOnly>().ConvertUsing(dt => DateOnly.FromDateTime(dt));
|
||||
|
||||
|
@ -70,7 +72,15 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<Postgraduate, PostgraduateViewModel>();
|
||||
// .ForMember(t => t.Hospital, c => c.MapFrom(d => d.HospitalEnt.HospitalName))
|
||||
//.ForMember(t => t.HospitalCN, c => c.MapFrom(d => d.HospitalEnt.HospitalNameCN));
|
||||
CreateMap<Attachment, AttachmentDTO>();
|
||||
CreateMap<Attachment, AttachmentDTO>()
|
||||
.ForMember(d => d.BlindName, u => u.MapFrom(t => t.Doctor.BlindName))
|
||||
.ForMember(d => d.BlindNameCN, u => u.MapFrom(t => t.Doctor.BlindNameCN))
|
||||
.ForMember(d => d.ChineseName, u => u.MapFrom(t => t.Doctor.ChineseName))
|
||||
.ForMember(d => d.FirstName, u => u.MapFrom(t => t.Doctor.FirstName))
|
||||
.ForMember(d => d.LastName, u => u.MapFrom(t => t.Doctor.LastName))
|
||||
.ForMember(d => d.UserName, u => u.MapFrom(t => t.Doctor.EnrollList.Where(y=>y.TrialId== TrialId).Select(x=>x.DoctorUser.UserName).First()))
|
||||
;
|
||||
CreateMap<Doctor, GetTrialDoctorListOutDto>();
|
||||
CreateMap<Doctor, ResumeConfirmDTO>();
|
||||
|
||||
CreateMap<Doctor, DoctorSelectDTO>();
|
||||
|
@ -178,16 +188,30 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<Hospital, EmploymentDTO>();
|
||||
|
||||
CreateMap<EnrollDetail, DoctorStateModelDTO>()
|
||||
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.CreateUserRole.UserTypeEnum))
|
||||
.ForMember(d => d.IntoGroupState, u => u.MapFrom(s => s.EnrollStatus))
|
||||
.ForMember(d => d.OptTime, u => u.MapFrom(s => s.CreateTime))
|
||||
.ForMember(d => d.OptUserName, u => u.MapFrom(s => s.CreateUserRole.IdentityUser.UserName));
|
||||
|
||||
|
||||
CreateMap<Enroll, TrialDoctorInfo>().IncludeMembers(t => t.Doctor, t => t.Doctor.Hospital)
|
||||
.ForMember(o => o.DictionaryList, t => t.MapFrom(u => u.Doctor.DoctorDicRelationList.Where(t => t.KeyName == StaticData.ReadingType || t.KeyName == StaticData.Subspeciality).Select(t => t.Dictionary).OrderBy(t => t.ShowOrder)))
|
||||
.ForMember(d => d.Speciality, u => u.MapFrom(s => s.Doctor.Speciality.Value))
|
||||
.ForMember(d => d.SpecialityCN, u => u.MapFrom(s => s.Doctor.Speciality.ValueCN))
|
||||
.ForMember(d => d.Id, u => u.MapFrom(s => s.Doctor.Id))
|
||||
.ForMember(d => d.Code, u => u.MapFrom(s => s.DoctorUser.UserName));
|
||||
|
||||
CreateMap<Doctor, TrialDoctorInfo>();
|
||||
CreateMap<Hospital, TrialDoctorInfo>();
|
||||
|
||||
CreateMap<Enroll, ConfirmationReviewerDTO>().IncludeMembers(t => t.Doctor, t => t.Doctor.Hospital)
|
||||
.ForMember(o => o.DictionaryList, t => t.MapFrom(u => u.Doctor.DoctorDicRelationList.Where(t => t.KeyName == StaticData.ReadingType || t.KeyName == StaticData.Subspeciality).Select(t => t.Dictionary).OrderBy(t => t.ShowOrder)))
|
||||
.ForMember(d => d.Speciality, u => u.MapFrom(s => s.Doctor.Speciality.Value))
|
||||
.ForMember(d => d.SpecialityCN, u => u.MapFrom(s => s.Doctor.Speciality.ValueCN))
|
||||
.ForMember(d => d.Id, u => u.MapFrom(s => s.Doctor.Id))
|
||||
.ForMember(d => d.Code, u => u.MapFrom(s => s.DoctorUser.UserName))
|
||||
.ForMember(d => d.HospitalName, u => u.MapFrom(s => s.Doctor.HospitalName))
|
||||
.ForMember(d => d.HospitalNameCN, u => u.MapFrom(s => s.Doctor.HospitalNameCN))
|
||||
;
|
||||
CreateMap<Doctor, ConfirmationReviewerDTO>();
|
||||
CreateMap<Hospital, ConfirmationReviewerDTO>();
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
public class SysFileTypeView : SysFileTypeAddOrEdit
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class SysFileTypeAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public ArchiveType ArchiveTypeEnum { get; set; }
|
||||
|
||||
public bool IsConfirmRecord { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string NameCN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 显示顺序
|
||||
/// </summary>
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
public SubIdentification SubIdentificationEnum { get; set; }
|
||||
}
|
||||
|
||||
public class SysFileTypeQuery : PageInput
|
||||
{
|
||||
public ArchiveType? ArchiveTypeEnum { get; set; }
|
||||
|
||||
public bool? IsConfirmRecord { get; set; }
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? NameCN { get; set; }
|
||||
|
||||
public SubIdentification? SubIdentificationEnum { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -178,7 +178,25 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public bool? IsConfirmed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 课时状态
|
||||
/// </summary>
|
||||
public bool? IsDeleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
public string? UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
public DateTime? StartConfirmTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
public DateTime? EndConfirmTime { get; set; }
|
||||
}
|
||||
|
||||
///<summary> SystemDocumentAddOrEdit 列表查询参数模型</summary>
|
||||
|
|
|
@ -0,0 +1,153 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Reflection.Metadata;
|
||||
namespace IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
public class TrialFileTypeView : TrialFileTypeAddOrEdit
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class GetTrialFileTypeDataOutDto
|
||||
{
|
||||
public List<TrialFileTypeData> TrialFileTypeDataList { get; set; }
|
||||
}
|
||||
|
||||
public class TrialFileTypeData
|
||||
{
|
||||
public ArchiveType ArchiveTypeEnum { get; set; }
|
||||
|
||||
public List<TrialFileTypeView> TrialFileTypeList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetTrialFileTypeFileInDto
|
||||
{
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class UploadTrialFileTypeFileInDto
|
||||
{
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 文件
|
||||
/// </summary>
|
||||
public TrialFileDto? FileRecord { get; set; }
|
||||
}
|
||||
public class SetAuthorizedViewInDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
}
|
||||
|
||||
public class GetTrialFileTypeDataInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; } = false;
|
||||
}
|
||||
public class CopySystemFileTypeToTrialInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
public class TrialFileTypeSelectView
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
public bool IsSelfDefine { get; set; }
|
||||
|
||||
public ArchiveType ArchiveTypeEnum { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class TrialFileTypeAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public ArchiveType ArchiveTypeEnum { get; set; }
|
||||
|
||||
public DateOnly? FirstFinalDate { get; set; }
|
||||
|
||||
public bool IsConfirmRecord { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
public bool IsSelfDefine { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string NameCN { get; set; }
|
||||
|
||||
public SubIdentification SubIdentificationEnum { get; set; }
|
||||
|
||||
public Guid? SysFileTypeId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 显示顺序
|
||||
/// </summary>
|
||||
public int ShowOrder { get; set; }
|
||||
}
|
||||
|
||||
public class TrialFileTypeQuery : PageInput
|
||||
{
|
||||
public ArchiveType? ArchiveTypeEnum { get; set; }
|
||||
|
||||
public DateOnly? FirstFinalDate { get; set; }
|
||||
|
||||
public bool? IsConfirmRecord { get; set; }
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
||||
public bool? IsSelfDefine { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? NameCN { get; set; }
|
||||
|
||||
public SubIdentification? SubIdentificationEnum { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class TrialFileTypeSelectQuery
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
||||
public bool? IsSelfDefine { get; set; }
|
||||
|
||||
public ArchiveType? ArchiveTypeEnum { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
namespace IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
public class TrialFinalRecordView : TrialFinalRecordAddOrEdit
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class DeleteTrialNormalRecordListInDto
|
||||
{
|
||||
public List<Guid> Ids { get; set; }
|
||||
}
|
||||
|
||||
public class AuthorizedTrialFinalRecordInDto
|
||||
{
|
||||
public List<Guid> Ids { get; set; }
|
||||
|
||||
public bool IsAuthorizedView { get; set; }
|
||||
}
|
||||
|
||||
public class TrialFinalRecordAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
|
||||
|
||||
public bool IsAuthorizedView { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
|
||||
public int State { get; set; }
|
||||
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public string Version { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 定稿PDF
|
||||
/// </summary>
|
||||
public TrialFileDto? PDFFileRecord { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 定稿Word
|
||||
/// </summary>
|
||||
|
||||
public TrialFileDto? WordFileRecord { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 签名页
|
||||
/// </summary>
|
||||
|
||||
public TrialFileDto? SignFileRecord { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 历史记录
|
||||
/// </summary>
|
||||
|
||||
public TrialFileDto? HistoryFileRecord { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class TrialFileDto
|
||||
{
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
public string FileName { get; set; }
|
||||
|
||||
public string FilePath { get; set; }
|
||||
|
||||
public string FileSize { get; set; }
|
||||
|
||||
public string FileFormat { get; set; }
|
||||
}
|
||||
|
||||
public class TrialFinalRecordQuery : PageInput
|
||||
{
|
||||
public Guid? HistoryFileRecordId { get; set; }
|
||||
|
||||
public bool? IsAuthorizedView { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
public string? Version { get; set; }
|
||||
|
||||
public Guid? WordFileRecordId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
public class TrialNormalRecordView : TrialNormalRecordAddOrEdit
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
public string FileName { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class BatchAddTrialNormalRecordInDto
|
||||
{
|
||||
public List<TrialNormalRecordAddOrEdit> TrialNormalRecordList { get; set; }
|
||||
}
|
||||
public class TrialNormalRecordAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public bool IsAuthorizedView { get; set; }
|
||||
|
||||
|
||||
public int State { get; set; }
|
||||
|
||||
public TrialFileDto? TrialFileRecord { get; set; }
|
||||
|
||||
public TrialFileDto? HistoryFileRecord { get; set; }
|
||||
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
public class TrialNormalRecordQuery : PageInput
|
||||
{
|
||||
public bool? IsAuthorizedView { get; set; }
|
||||
|
||||
public int? State { get; set; }
|
||||
|
||||
public string? FileName { get; set; }
|
||||
|
||||
public Guid? TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
public class TrialTrianingRecordView : TrialTrianingRecordAddOrEdit
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
public string FileName { get; set; }
|
||||
}
|
||||
|
||||
public class BatchAddTTrianingRecordInDto
|
||||
{
|
||||
public List<TrialTrianingRecordAddOrEdit> TrianingRecordList { get; set; }
|
||||
}
|
||||
|
||||
public class TrialTrianingRecordAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public bool IsAuthorizedView { get; set; }
|
||||
|
||||
public string Note { get; set; }=string.Empty;
|
||||
|
||||
public int? State { get; set; }
|
||||
|
||||
public TrialFileDto? TrialFileRecord { get; set; }
|
||||
|
||||
public TrialFileDto? HistoryFileRecord { get; set; }
|
||||
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public int? TrianingCount { get; set; }
|
||||
|
||||
public DateOnly? TrianingDate { get; set; }
|
||||
|
||||
public string? TrianingState { get; set; }
|
||||
}
|
||||
|
||||
public class TrialTrianingRecordQuery : PageInput
|
||||
{
|
||||
public bool? IsAuthorizedView { get; set; }
|
||||
|
||||
public string? FileName { get; set; }
|
||||
|
||||
public Guid? TrialFileTypeId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
public int? TrianingCount { get; set; }
|
||||
|
||||
public DateOnly? TrianingDateStartTime { get; set; }
|
||||
|
||||
public DateOnly? TrianingDateEndTime { get; set; }
|
||||
|
||||
public DateTime? UpdateStartTime { get; set; }
|
||||
|
||||
public DateTime? UpdateEndTime { get; set; }
|
||||
|
||||
public string? TrianingState { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces;
|
||||
|
||||
public interface ISysFileTypeService
|
||||
{
|
||||
|
||||
Task<PageOutput<SysFileTypeView>> GetSysFileTypeList(SysFileTypeQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateSysFileType(SysFileTypeAddOrEdit addOrEditSysFileType);
|
||||
|
||||
Task<IResponseOutput> DeleteSysFileType(Guid sysFileTypeId);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces;
|
||||
|
||||
public interface ITrialFileTypeService
|
||||
{
|
||||
|
||||
Task<PageOutput<TrialFileTypeView>> GetTrialFileTypeList(TrialFileTypeQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateTrialFileType(TrialFileTypeAddOrEdit addOrEditTrialFileType);
|
||||
|
||||
Task<IResponseOutput> DeleteTrialFileType(Guid trialFileTypeId);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces;
|
||||
|
||||
public interface ITrialFinalRecordService
|
||||
{
|
||||
|
||||
Task<PageOutput<TrialFinalRecordView>> GetTrialFinalRecordList(TrialFinalRecordQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateTrialFinalRecord(TrialFinalRecordAddOrEdit addOrEditTrialFinalRecord);
|
||||
|
||||
Task<IResponseOutput> DeleteTrialFinalRecord(Guid trialFinalRecordId);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces;
|
||||
|
||||
public interface ITrialNormalRecordService
|
||||
{
|
||||
|
||||
Task<PageOutput<TrialNormalRecordView>> GetTrialNormalRecordList(TrialNormalRecordQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateTrialNormalRecord(TrialNormalRecordAddOrEdit addOrEditTrialNormalRecord);
|
||||
|
||||
Task<IResponseOutput> DeleteTrialNormalRecord(Guid trialNormalRecordId);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces;
|
||||
|
||||
public interface ITrialTrianingRecordService
|
||||
{
|
||||
|
||||
Task<PageOutput<TrialTrianingRecordView>> GetTrialTrianingRecordList(TrialTrianingRecordQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateTrialTrianingRecord(TrialTrianingRecordAddOrEdit addOrEditTrialTrianingRecord);
|
||||
|
||||
Task<IResponseOutput> DeleteTrialTrianingRecord(Guid trialTrianingRecordId);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:24Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
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;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 系统文件类型
|
||||
/// </summary>
|
||||
/// <param name="_sysFileTypeRepository"></param>
|
||||
/// <param name="_mapper"></param>
|
||||
/// <param name="_userInfo"></param>
|
||||
/// <param name="_localizer"></param>
|
||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
||||
|
||||
public class SysFileTypeService(IRepository<SysFileType> _sysFileTypeRepository, IRepository<TrialFileType> _trialFileTypeRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ISysFileTypeService
|
||||
{
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<SysFileTypeView>> GetSysFileTypeList(SysFileTypeQuery inQuery)
|
||||
{
|
||||
|
||||
var sysFileTypeQueryable = _sysFileTypeRepository
|
||||
.WhereIf(inQuery.ArchiveTypeEnum != null, t => t.ArchiveTypeEnum == inQuery.ArchiveTypeEnum)
|
||||
.WhereIf(inQuery.IsConfirmRecord != null, t => t.IsConfirmRecord == inQuery.IsConfirmRecord)
|
||||
.WhereIf(inQuery.SubIdentificationEnum != null, t => t.SubIdentificationEnum == inQuery.SubIdentificationEnum)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
.WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.Name.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.NameCN.IsNotNullOrEmpty(), t => t.NameCN.Contains(inQuery.NameCN))
|
||||
.ProjectTo<SysFileTypeView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var defalutSortArray = new string[] { nameof(SysFileTypeView.ArchiveTypeEnum), nameof(SysFileTypeView.ShowOrder)};
|
||||
|
||||
var pageList = await sysFileTypeQueryable.ToPagedListAsync(inQuery, defalutSortArray);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateSysFileType(SysFileTypeAddOrEdit addOrEditSysFileType)
|
||||
{
|
||||
var verifyExp = new EntityVerifyExp<SysFileType>()
|
||||
{
|
||||
VerifyExp = u => u.IsEnable == addOrEditSysFileType.IsEnable && (u.Name == addOrEditSysFileType.Name || u.NameCN == addOrEditSysFileType.NameCN),
|
||||
|
||||
// "当前类型启用的文件类型名称重复"
|
||||
VerifyMsg = _localizer["SysFileType_NameRepeat"],
|
||||
|
||||
IsVerify = addOrEditSysFileType.IsEnable == false
|
||||
};
|
||||
|
||||
var entity = await _sysFileTypeRepository.InsertOrUpdateAsync(addOrEditSysFileType, true, verifyExp);
|
||||
|
||||
//启用的才进行更新
|
||||
if (addOrEditSysFileType.Id != null && addOrEditSysFileType.IsEnable)
|
||||
{
|
||||
await _trialFileTypeRepository.BatchUpdateNoTrackingAsync(t => t.SysFileTypeId == addOrEditSysFileType.Id, u => new TrialFileType() { Name = addOrEditSysFileType.Name, NameCN = addOrEditSysFileType.NameCN,ShowOrder=addOrEditSysFileType.ShowOrder });
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{sysFileTypeId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteSysFileType(Guid sysFileTypeId)
|
||||
{
|
||||
var success = await _sysFileTypeRepository.DeleteFromQueryAsync(t => t.Id == sysFileTypeId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -473,7 +473,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
var trialDocQuery =
|
||||
from trialDoc in _trialDocumentRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId)
|
||||
.Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true)
|
||||
from trialUser in _trialIdentityUserRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId
|
||||
from trialUser in _trialIdentityUserRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId
|
||||
&& t.TrialUserRoleList.AsQueryable().Any(t => trialDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId))
|
||||
)
|
||||
.Where(t => inQuery.UserId != null ? t.IdentityUserId == inQuery.UserId : true)
|
||||
|
@ -557,6 +557,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
|
||||
.WhereIf(inQuery.IsConfirmed == true, t => t.ConfirmTime != null)
|
||||
.WhereIf(inQuery.IsConfirmed == false, t => t.ConfirmTime == null)
|
||||
.WhereIf(inQuery.StartConfirmTime != null, t => t.ConfirmTime >= inQuery.StartConfirmTime.Value)
|
||||
.WhereIf(inQuery.EndConfirmTime != null, t => t.ConfirmTime <= inQuery.EndConfirmTime.Value)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName))
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted);
|
||||
|
||||
var result = await unionQuery.ToPagedListAsync(inQuery);
|
||||
|
|
|
@ -0,0 +1,241 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
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 MassTransit;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 项目文件类型
|
||||
/// </summary>
|
||||
/// <param name="_trialFileTypeRepository"></param>
|
||||
/// <param name="_mapper"></param>
|
||||
/// <param name="_userInfo"></param>
|
||||
/// <param name="_localizer"></param>
|
||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
||||
public class TrialFileTypeService(IRepository<TrialFileType> _trialFileTypeRepository,
|
||||
|
||||
IRepository<TrialFile> _trialFileRepository,
|
||||
IRepository<SysFileType> _sysFileTypeRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialFileTypeService
|
||||
{
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialFileTypeView>> GetTrialFileTypeList(TrialFileTypeQuery inQuery)
|
||||
{
|
||||
|
||||
var trialFileTypeQueryable = _trialFileTypeRepository
|
||||
.Where(t => t.TrialId == inQuery.TrialId)
|
||||
|
||||
.WhereIf(inQuery.ArchiveTypeEnum != null, t => t.ArchiveTypeEnum == inQuery.ArchiveTypeEnum)
|
||||
.WhereIf(inQuery.IsConfirmRecord != null, t => t.IsConfirmRecord == inQuery.IsConfirmRecord)
|
||||
.WhereIf(inQuery.SubIdentificationEnum != null, t => t.SubIdentificationEnum == inQuery.SubIdentificationEnum)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
.WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.Name.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.NameCN.IsNotNullOrEmpty(), t => t.NameCN.Contains(inQuery.NameCN))
|
||||
|
||||
.WhereIf(inQuery.IsSelfDefine != null, t => t.IsSelfDefine == inQuery.IsSelfDefine)
|
||||
.ProjectTo<TrialFileTypeView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await trialFileTypeQueryable.ToPagedListAsync(inQuery);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目文件类型下拉框
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<TrialFileTypeSelectView>> GetTrialFileTypeSelectList(TrialFileTypeSelectQuery inQuery)
|
||||
{
|
||||
var list = _trialFileTypeRepository
|
||||
.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(inQuery.ArchiveTypeEnum != null, t => t.ArchiveTypeEnum == inQuery.ArchiveTypeEnum)
|
||||
.WhereIf(inQuery.IsSelfDefine != null, t => t.IsSelfDefine == inQuery.IsSelfDefine)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
.Select(t => new TrialFileTypeSelectView()
|
||||
{
|
||||
Id = t.Id,
|
||||
IsEnable = t.IsEnable,
|
||||
Name = _userInfo.IsEn_Us ? t.Name : t.NameCN,
|
||||
IsSelfDefine = t.IsSelfDefine,
|
||||
ArchiveTypeEnum = t.ArchiveTypeEnum,
|
||||
}).ToList();
|
||||
|
||||
return list;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialFileType(TrialFileTypeAddOrEdit addOrEditTrialFileType)
|
||||
{
|
||||
|
||||
|
||||
|
||||
if (await _trialFileTypeRepository.AnyAsync(u => u.TrialId == addOrEditTrialFileType.TrialId && u.Id != addOrEditTrialFileType.Id && u.IsEnable == addOrEditTrialFileType.IsEnable && (u.Name == addOrEditTrialFileType.Name || u.NameCN == addOrEditTrialFileType.NameCN)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["TrialFileType_NameRepeat"]);
|
||||
}
|
||||
|
||||
var entity = await _trialFileTypeRepository.InsertOrUpdateAsync(addOrEditTrialFileType, true);
|
||||
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{trialFileTypeId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialFileType(Guid trialFileTypeId)
|
||||
{
|
||||
var success = await _trialFileTypeRepository.DeleteFromQueryAsync(t => t.Id == trialFileTypeId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 复制系统数据到项目
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> CopySystemFileTypeToTrial(CopySystemFileTypeToTrialInDto inDto)
|
||||
{
|
||||
if (!(await _trialFileTypeRepository.AnyAsync(x => x.TrialId == inDto.TrialId)))
|
||||
{
|
||||
var trialFileTypeList = await _sysFileTypeRepository
|
||||
.ProjectTo<TrialFileType>(_mapper.ConfigurationProvider)
|
||||
.ToListAsync();
|
||||
|
||||
trialFileTypeList.ForEach(x => {
|
||||
x.TrialId = inDto.TrialId;
|
||||
x.Id = NewId.NextGuid();
|
||||
});
|
||||
|
||||
await _trialFileTypeRepository.AddRangeAsync(trialFileTypeList, true);
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目文件类型数据
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<GetTrialFileTypeDataOutDto> GetTrialFileTypeData(GetTrialFileTypeDataInDto inDto)
|
||||
{
|
||||
await this.CopySystemFileTypeToTrial(new CopySystemFileTypeToTrialInDto()
|
||||
{
|
||||
TrialId = inDto.TrialId
|
||||
});
|
||||
var trialFileTypeList = await _trialFileTypeRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||
.WhereIf(inDto.IsEnable, x => x.IsEnable)
|
||||
.OrderBy(x => x.ShowOrder)
|
||||
.ProjectTo<TrialFileTypeView>(_mapper.ConfigurationProvider)
|
||||
.ToListAsync();
|
||||
|
||||
List<TrialFileTypeData> result = new List<TrialFileTypeData>();
|
||||
foreach (ArchiveType type in Enum.GetValues(typeof(ArchiveType)))
|
||||
{
|
||||
result.Add(new TrialFileTypeData()
|
||||
{
|
||||
ArchiveTypeEnum = type,
|
||||
TrialFileTypeList = trialFileTypeList.Where(x => x.ArchiveTypeEnum == type).OrderBy(x => x.SysFileTypeId == null).ThenBy(x => x.ShowOrder).ToList()
|
||||
});
|
||||
}
|
||||
|
||||
return new GetTrialFileTypeDataOutDto() { TrialFileTypeDataList = result };
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改授权状态
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetAuthorizedView(SetAuthorizedViewInDto inDto)
|
||||
{
|
||||
await _trialFileTypeRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new TrialFileType() { IsEnable = inDto.IsEnable }, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传同意入项记录
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> UploadTrialFileTypeFile(UploadTrialFileTypeFileInDto inDto)
|
||||
{
|
||||
var trialFileType = await _trialFileTypeRepository.Where(x => x.Id == inDto.TrialFileTypeId).FirstNotNullAsync();
|
||||
|
||||
if (trialFileType.FileRecordId != null)
|
||||
{
|
||||
await _trialFileRepository.BatchDeleteNoTrackingAsync(x => x.Id == trialFileType.FileRecordId);
|
||||
}
|
||||
|
||||
inDto.FileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
|
||||
var entity = await _trialFileRepository.InsertFromDTOAsync(inDto.FileRecord, true);
|
||||
await _trialFileTypeRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.TrialFileTypeId, x => new TrialFileType()
|
||||
{
|
||||
|
||||
FileRecordId = entity.Id
|
||||
});
|
||||
await _trialFileTypeRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取入项记录
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<TrialFileDto> GetTrialFileTypeFile(GetTrialFileTypeFileInDto inDto)
|
||||
{
|
||||
var trialFileType = await _trialFileTypeRepository.Where(x => x.Id == inDto.TrialFileTypeId).FirstNotNullAsync();
|
||||
if (trialFileType.FileRecordId == null)
|
||||
{
|
||||
return new TrialFileDto() { };
|
||||
}
|
||||
var file = await _trialFileRepository.Where(x => x.Id == trialFileType.FileRecordId).ProjectTo<TrialFileDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||
return file;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除入项记录
|
||||
/// </summary>
|
||||
/// <param name="trialFileTypeId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> DeleteTrialTypeFile(Guid trialFileTypeId)
|
||||
{
|
||||
var trialFileType = await _trialFileTypeRepository.Where(x => x.Id == trialFileTypeId).FirstNotNullAsync();
|
||||
|
||||
await _trialFileRepository.DeleteFromQueryAsync(x => x.Id == trialFileType.FileRecordId, true);
|
||||
await _trialFileTypeRepository.UpdatePartialFromQueryAsync(x => x.Id == trialFileTypeId, x => new TrialFileType() { FileRecordId = null }, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
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 IRaCIS.Core.Infrastructure;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 项目定稿记录
|
||||
/// </summary>
|
||||
/// <param name="_trialFinalRecordRepository"></param>
|
||||
/// <param name="_mapper"></param>
|
||||
/// <param name="_userInfo"></param>
|
||||
/// <param name="_localizer"></param>
|
||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
||||
public class TrialFinalRecordService(IRepository<TrialFinalRecord> _trialFinalRecordRepository,
|
||||
IRepository<TrialFile> _trialFileRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialFinalRecordService
|
||||
{
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialFinalRecordView>> GetTrialFinalRecordList(TrialFinalRecordQuery inDto)
|
||||
{
|
||||
|
||||
var trialFinalRecordQueryable = _trialFinalRecordRepository
|
||||
.Where(x=>x.TrialFileTypeId==inDto.TrialFileTypeId)
|
||||
.WhereIf(inDto.Name.IsNotNullOrEmpty(),x=>x.Name.Contains(inDto.Name))
|
||||
.WhereIf(inDto.Version.IsNotNullOrEmpty(), x => x.Version.Contains(inDto.Version))
|
||||
.WhereIf(inDto.IsAuthorizedView!=null, x => x.IsAuthorizedView==inDto.IsAuthorizedView)
|
||||
// .Include(x=>x.PDFFileRecord).Include(x => x.WordFileRecord).Include(x => x.SignFileRecord).Include(x => x.HistoryFileRecord)
|
||||
.ProjectTo<TrialFinalRecordView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await trialFinalRecordQueryable.ToPagedListAsync(inDto);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增或者修改文档
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialFinalRecord(TrialFinalRecordAddOrEdit inDto)
|
||||
{
|
||||
// 在此处拷贝automapper 映射
|
||||
if (inDto.PDFFileRecord != null) inDto.PDFFileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
|
||||
if (inDto.WordFileRecord != null) inDto.WordFileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
|
||||
if (inDto.SignFileRecord != null) inDto.SignFileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
|
||||
if (inDto.HistoryFileRecord != null) inDto.HistoryFileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
|
||||
|
||||
|
||||
if (await _trialFinalRecordRepository.AnyAsync(x => x.Id != inDto.Id && x.TrialFileTypeId == inDto.TrialFileTypeId && x.Name == inDto.Name && x.Version == inDto.Version))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["TrialFinalRecord_NameRepeat"]);
|
||||
}
|
||||
|
||||
if (inDto.Id != null)
|
||||
{
|
||||
var trialFinalRecord = await _trialFinalRecordRepository.Where(x => x.Id == inDto.Id.Value).FirstNotNullAsync();
|
||||
|
||||
List<Guid?> ids= new List<Guid?>() {
|
||||
trialFinalRecord.WordFileRecordId,
|
||||
trialFinalRecord.PDFFileRecordId,
|
||||
trialFinalRecord.SignFileRecordId,
|
||||
trialFinalRecord.HistoryFileRecordId
|
||||
|
||||
};
|
||||
|
||||
var fileIds = ids.Where(x => x != null).Select(x => (Guid)x).ToList();
|
||||
await _trialFileRepository.BatchDeleteNoTrackingAsync(x => fileIds.Contains(x.Id));
|
||||
}
|
||||
var entity = await _trialFinalRecordRepository.InsertOrUpdateAsync(inDto, true);
|
||||
|
||||
|
||||
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 授权文档
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> AuthorizedTrialFinalRecord(AuthorizedTrialFinalRecordInDto inDto)
|
||||
{
|
||||
await _trialFinalRecordRepository.UpdatePartialFromQueryAsync(t =>inDto.Ids.Contains(t.Id), t => new TrialFinalRecord() { IsAuthorizedView = inDto.IsAuthorizedView });
|
||||
await _trialFinalRecordRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除文档
|
||||
/// </summary>
|
||||
/// <param name="trialFinalRecordId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{trialFinalRecordId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialFinalRecord(Guid trialFinalRecordId)
|
||||
{
|
||||
var success = await _trialFinalRecordRepository.DeleteFromQueryAsync(t => t.Id == trialFinalRecordId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
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;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 项目-一般文件记录
|
||||
/// </summary>
|
||||
/// <param name="_trialNormalRecordRepository"></param>
|
||||
/// <param name="_mapper"></param>
|
||||
/// <param name="_userInfo"></param>
|
||||
/// <param name="_localizer"></param>
|
||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
||||
public class TrialNormalRecordService(IRepository<TrialNormalRecord> _trialNormalRecordRepository,
|
||||
IRepository<TrialFile> _trialFileRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialNormalRecordService
|
||||
{
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialNormalRecordView>> GetTrialNormalRecordList(TrialNormalRecordQuery inDto)
|
||||
{
|
||||
|
||||
var trialNormalRecordQueryable = _trialNormalRecordRepository
|
||||
.Where(x => x.TrialFileTypeId == inDto.TrialFileTypeId)
|
||||
.WhereIf(inDto.IsAuthorizedView != null, x => x.IsAuthorizedView == inDto.IsAuthorizedView)
|
||||
.WhereIf(inDto.FileName.IsNotNullOrEmpty(), x => x.TrialFileRecord.FileName.Contains(inDto.FileName))
|
||||
.ProjectTo<TrialNormalRecordView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await trialNormalRecordQueryable.ToPagedListAsync(inDto);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialNormalRecord(TrialNormalRecordAddOrEdit inDto)
|
||||
{
|
||||
if (inDto.TrialFileRecord != null) inDto.TrialFileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
|
||||
if (inDto.HistoryFileRecord != null) inDto.HistoryFileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
|
||||
|
||||
|
||||
if (inDto.Id != null)
|
||||
{
|
||||
var trialFinalRecord = await _trialNormalRecordRepository.Where(x => x.Id == inDto.Id.Value).FirstNotNullAsync();
|
||||
|
||||
List<Guid?> ids = new List<Guid?>() {
|
||||
trialFinalRecord.TrialFileRecordId,
|
||||
trialFinalRecord.HistoryFileRecordId,
|
||||
};
|
||||
|
||||
var fileIds = ids.Where(x => x != null).Select(x => (Guid)x).ToList();
|
||||
await _trialFileRepository.BatchDeleteNoTrackingAsync(x => fileIds.Contains(x.Id));
|
||||
}
|
||||
|
||||
var entity = await _trialNormalRecordRepository.InsertOrUpdateAsync(inDto, true);
|
||||
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量新增一般文件记录
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> BatchAddTrialNormalRecord(BatchAddTrialNormalRecordInDto inDto)
|
||||
{
|
||||
foreach (var item in inDto.TrialNormalRecordList)
|
||||
{
|
||||
if (item.TrialFileRecord != null) item.TrialFileRecord.TrialFileTypeId = item.TrialFileTypeId;
|
||||
if (item.HistoryFileRecord != null) item.HistoryFileRecord.TrialFileTypeId = item.TrialFileTypeId;
|
||||
|
||||
var entity = await _trialNormalRecordRepository.InsertFromDTOAsync(item);
|
||||
}
|
||||
|
||||
var result= await _trialNormalRecordRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(result);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 授权文档
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> AuthorizedTTrialNormalRecord(AuthorizedTrialFinalRecordInDto inDto)
|
||||
{
|
||||
await _trialNormalRecordRepository.UpdatePartialFromQueryAsync(t => inDto.Ids.Contains(t.Id), t => new TrialNormalRecord() { IsAuthorizedView = inDto.IsAuthorizedView });
|
||||
await _trialNormalRecordRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpDelete("{trialNormalRecordId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialNormalRecord(Guid trialNormalRecordId)
|
||||
{
|
||||
var success = await _trialNormalRecordRepository.DeleteFromQueryAsync(t => t.Id == trialNormalRecordId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除一般文件记录
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> DeleteTrialNormalRecordList(DeleteTrialNormalRecordListInDto inDto)
|
||||
{
|
||||
var success = await _trialNormalRecordRepository.DeleteFromQueryAsync(t => inDto.Ids.Contains(t.Id), true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由liquid模板自动生成 byzhouhang 20240909
|
||||
// 生成时间 2025-02-21 07:47:30Z
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
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;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 项目-培训记录
|
||||
/// </summary>
|
||||
/// <param name="_trialTrianingRecordRepository"></param>
|
||||
/// <param name="_mapper"></param>
|
||||
/// <param name="_userInfo"></param>
|
||||
/// <param name="_localizer"></param>
|
||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
||||
public class TrialTrianingRecordService(IRepository<
|
||||
TrialTrianingRecord> _trialTrianingRecordRepository,
|
||||
IRepository<TrialFile> _trialFileRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialTrianingRecordService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 获取培训记录列表
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialTrianingRecordView>> GetTrialTrianingRecordList(TrialTrianingRecordQuery inDto)
|
||||
{
|
||||
|
||||
var trialTrianingRecordQueryable = _trialTrianingRecordRepository
|
||||
.Where(x => x.TrialFileTypeId == inDto.TrialFileTypeId)
|
||||
.WhereIf(inDto.IsAuthorizedView != null, x => x.IsAuthorizedView == inDto.IsAuthorizedView)
|
||||
.WhereIf(inDto.FileName.IsNotNullOrEmpty(), x => x.TrialFileRecord.FileName.Contains(inDto.FileName))
|
||||
.WhereIf(inDto.TrianingDateStartTime != null, x => x.TrianingDate >= inDto.TrianingDateStartTime)
|
||||
.WhereIf(inDto.TrianingDateEndTime != null, x => x.TrianingDate <= inDto.TrianingDateEndTime)
|
||||
.WhereIf(inDto.UpdateStartTime != null, x => x.UpdateTime >= inDto.UpdateStartTime)
|
||||
.WhereIf(inDto.UpdateEndTime != null, x => x.UpdateTime < inDto.UpdateEndTime.Value.AddDays(1))
|
||||
.ProjectTo<TrialTrianingRecordView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await trialTrianingRecordQueryable.ToPagedListAsync(inDto);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialTrianingRecord(TrialTrianingRecordAddOrEdit inDto)
|
||||
{
|
||||
// 在此处拷贝automapper 映射
|
||||
|
||||
|
||||
if (inDto.TrialFileRecord != null) inDto.TrialFileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
|
||||
if (inDto.HistoryFileRecord != null) inDto.HistoryFileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
|
||||
|
||||
|
||||
if (inDto.Id != null)
|
||||
{
|
||||
var trialFinalRecord = await _trialTrianingRecordRepository.Where(x => x.Id == inDto.Id.Value).FirstNotNullAsync();
|
||||
|
||||
List<Guid?> ids = new List<Guid?>() {
|
||||
trialFinalRecord.TrialFileRecordId,
|
||||
trialFinalRecord.HistoryFileRecordId,
|
||||
};
|
||||
|
||||
var fileIds = ids.Where(x => x != null).Select(x => (Guid)x).ToList();
|
||||
await _trialFileRepository.BatchDeleteNoTrackingAsync(x => fileIds.Contains(x.Id));
|
||||
}
|
||||
var entity = await _trialTrianingRecordRepository.InsertOrUpdateAsync(inDto, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 批量新增培训记录
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> BatchAddTrialTrianingRecord(BatchAddTTrianingRecordInDto inDto)
|
||||
{
|
||||
foreach (var item in inDto.TrianingRecordList)
|
||||
{
|
||||
if (item.TrialFileRecord != null) item.TrialFileRecord.TrialFileTypeId = item.TrialFileTypeId;
|
||||
if (item.HistoryFileRecord != null) item.HistoryFileRecord.TrialFileTypeId = item.TrialFileTypeId;
|
||||
|
||||
var entity = await _trialTrianingRecordRepository.InsertFromDTOAsync(item);
|
||||
}
|
||||
|
||||
var result = await _trialTrianingRecordRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(result);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 授权文档
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> AuthorizedTrialTrianingRecord(AuthorizedTrialFinalRecordInDto inDto)
|
||||
{
|
||||
await _trialTrianingRecordRepository.UpdatePartialFromQueryAsync(t => inDto.Ids.Contains(t.Id), t => new TrialTrianingRecord() { IsAuthorizedView = inDto.IsAuthorizedView });
|
||||
await _trialTrianingRecordRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
[HttpDelete("{trialTrianingRecordId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialTrianingRecord(Guid trialTrianingRecordId)
|
||||
{
|
||||
var success = await _trialTrianingRecordRepository.DeleteFromQueryAsync(t => t.Id == trialTrianingRecordId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除培训记录
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> DeleteTrialTrianingRecordList(DeleteTrialNormalRecordListInDto inDto)
|
||||
{
|
||||
var success = await _trialTrianingRecordRepository.DeleteFromQueryAsync(t => inDto.Ids.Contains(t.Id), true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3,6 +3,7 @@ using AutoMapper.EquivalencyExpression;
|
|||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
@ -18,6 +19,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.FileType, u => u.MapFrom(s => isEn_Us ? s.FileType.Value : s.FileType.ValueCN))
|
||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
|
||||
|
||||
|
||||
CreateMap<SysFileType, TrialFileType>()
|
||||
.ForMember(d => d.SysFileTypeId, u => u.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.IsSelfDefine, u => u.MapFrom(s => false))
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<TrialDocument, TrialDocumentView>()
|
||||
.ForMember(d => d.FileType, u => u.MapFrom(s => isEn_Us ? s.FileType.Value : s.FileType.ValueCN))
|
||||
.ForMember(d => d.IsSomeUserSigned, u => u.MapFrom(s => s.TrialDocConfirmedUserList.Any(t => t.ConfirmTime != null)))
|
||||
|
@ -51,6 +58,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<TrialUserRole, TrialDocumentUserConfirmView>();
|
||||
|
||||
CreateMap<TrialFileDto, TrialFile>();
|
||||
CreateMap<TrialFile, TrialFileDto>();
|
||||
|
||||
CreateMap<BatchAddTrialEmailNoticeConfig, TrialEmailNoticeConfig>();
|
||||
|
||||
CreateMap<TrialSelectEmailNoticeConfigView, BatchAddTrialEmailNoticeConfig > ();
|
||||
|
@ -87,6 +97,33 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<TrialEmailNoticeUser, EmailUserInfoDto>();
|
||||
|
||||
|
||||
|
||||
|
||||
CreateMap<SysFileType, SysFileTypeView>();
|
||||
CreateMap<SysFileType, SysFileTypeAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<TrialFileType, TrialFileTypeView>();
|
||||
|
||||
CreateMap<TrialFileType, TrialFileTypeAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<TrialFinalRecord, TrialFinalRecordView>();
|
||||
CreateMap<TrialFinalRecordAddOrEdit, TrialFinalRecord>();
|
||||
//.ForMember(d => d.HistoryFileRecord.TrialFileTypeId, c => c.MapFrom(t => t.TrialFileTypeId))
|
||||
//.ForMember(d => d.SignFileRecord.TrialFileTypeId, c => c.MapFrom(t => t.TrialFileTypeId))
|
||||
//.ForMember(d => d.WordFileRecord.TrialFileTypeId, c => c.MapFrom(t => t.TrialFileTypeId))
|
||||
//.ForMember(d => d.PDFFileRecord.TrialFileTypeId, c => c.MapFrom(t => t.TrialFileTypeId));
|
||||
|
||||
CreateMap<TrialNormalRecord, TrialNormalRecordView>()
|
||||
.ForMember(d => d.FileName, c => c.MapFrom(t => t.TrialFileRecord.FileName));
|
||||
CreateMap<TrialNormalRecord, TrialNormalRecordAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<TrialTrianingRecord, TrialTrianingRecordView>()
|
||||
.ForMember(d => d.FileName, c => c.MapFrom(t => t.TrialFileRecord.FileName));
|
||||
CreateMap<TrialTrianingRecord, TrialTrianingRecordAddOrEdit>().ReverseMap();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
IRepository<NoneDicomStudyFile> _noneDicomStudyFileReposiotry,
|
||||
IDistributedLockProvider _distributedLockProvider,
|
||||
IRepository<TrialImageDownload> _trialImageDownloadRepository,
|
||||
IRepository<Subject> _subjectRepository,
|
||||
IRepository<Subject> _subjectRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, IDownloadAndUploadService
|
||||
{
|
||||
|
||||
|
@ -257,7 +257,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
}
|
||||
|
||||
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
public async Task<IResponseOutput> PreArchiveDicomStudy(PriArchiveTaskStudyCommand preArchiveStudyCommand)
|
||||
{
|
||||
|
@ -356,7 +356,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
}
|
||||
|
||||
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task<IResponseOutput> AddOrUpdateArchiveTaskStudy(TaskArchiveStudyCommand incommand)
|
||||
{
|
||||
#region 获取该subject 已生成任务的访视的检查
|
||||
|
@ -620,12 +620,25 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
{
|
||||
if (dicomStudyId == null)
|
||||
{
|
||||
var deleteStudyPathList = await _taskInstanceRepository.Where(t => t.VisitTaskId == visitTaskId).GroupBy(t => t.StudyId).Select(g => g.First().Path).ToListAsync();
|
||||
|
||||
foreach (var fisrtPath in deleteStudyPathList)
|
||||
{
|
||||
var prefix = fisrtPath.Substring(1, fisrtPath.LastIndexOf('/') - 1);
|
||||
await _oSSService.DeleteFromPrefix(prefix, true);
|
||||
}
|
||||
|
||||
|
||||
await _taskStudyRepository.DeleteFromQueryAsync(t => t.VisitTaskId == visitTaskId);
|
||||
await _taskSeriesRepository.BatchDeleteNoTrackingAsync(t => t.VisitTaskId == visitTaskId);
|
||||
await _taskInstanceRepository.BatchDeleteNoTrackingAsync(t => t.VisitTaskId == visitTaskId);
|
||||
}
|
||||
else
|
||||
{
|
||||
var fisrtPath = await _taskInstanceRepository.Where(t => t.VisitTaskId == visitTaskId && t.StudyId == dicomStudyId).Select(t => t.Path).FirstOrDefaultAsync();
|
||||
var prefix = fisrtPath.Substring(1, fisrtPath.LastIndexOf('/') - 1);
|
||||
await _oSSService.DeleteFromPrefix(prefix, true);
|
||||
|
||||
await _taskStudyRepository.DeleteFromQueryAsync(t => t.VisitTaskId == visitTaskId && t.Id == dicomStudyId);
|
||||
await _taskSeriesRepository.BatchDeleteNoTrackingAsync(t => t.VisitTaskId == visitTaskId && t.Id == dicomStudyId);
|
||||
await _taskInstanceRepository.BatchDeleteNoTrackingAsync(t => t.VisitTaskId == visitTaskId && t.Id == dicomStudyId);
|
||||
|
@ -689,7 +702,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
SubjectCode = u.IsSelfAnalysis == true ? u.BlindSubjectCode : u.Subject.Code,
|
||||
TaskBlindName = u.TaskBlindName,
|
||||
TaskName = u.TaskName,
|
||||
ReadingTaskState=u.ReadingTaskState,
|
||||
ReadingTaskState = u.ReadingTaskState,
|
||||
SourceSubjectVisitId = u.SourceSubjectVisitId,
|
||||
VisitTaskId = u.Id,
|
||||
|
||||
|
@ -761,9 +774,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
select new
|
||||
{
|
||||
TrialId = sv.TrialId,
|
||||
SubjectId=sv.SubjectId,
|
||||
SubjectId = sv.SubjectId,
|
||||
SubjectCode = sv.Subject.Code,
|
||||
TrialSiteCode=sv.TrialSite.TrialSiteCode,
|
||||
TrialSiteCode = sv.TrialSite.TrialSiteCode,
|
||||
VisitName = sv.VisitName,
|
||||
|
||||
StudyList = sv.StudyList.Where(t => isQueryDicom ? inQuery.DicomStudyIdList.Contains(t.Id) : false)
|
||||
|
@ -971,7 +984,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
var subjectVisitIdList = inQuery.SubjectVisitTaskList.Select(t => t.SubjectVisitId).ToList();
|
||||
|
||||
var trialSiteCode = _visitTaskRepository.Where(t => t.Id == taskIdList.FirstOrDefault()).Select(t => t.IsAnalysisCreate ? t.BlindTrialSiteCode : t.Subject.TrialSite.TrialSiteCode).FirstOrDefault()??string.Empty;
|
||||
var trialSiteCode = _visitTaskRepository.Where(t => t.Id == taskIdList.FirstOrDefault()).Select(t => t.IsAnalysisCreate ? t.BlindTrialSiteCode : t.Subject.TrialSite.TrialSiteCode).FirstOrDefault() ?? string.Empty;
|
||||
|
||||
var query = from sv in _subjectRepository.Where(t => t.Id == inQuery.SubjectId).SelectMany(t => t.SubjectVisitList.Where(t => subjectVisitIdList.Contains(t.Id)))
|
||||
//一致性分析,导致查询出来两条数据
|
||||
|
@ -1032,9 +1045,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
{
|
||||
Id = NewId.NextSequentialGuid(),
|
||||
TrialId = info.TrialId,
|
||||
SubjectId=inQuery.SubjectId,
|
||||
SubjectId = inQuery.SubjectId,
|
||||
SubjectCode = inQuery.SubjectCode,
|
||||
TrialSiteCode= trialSiteCode,
|
||||
TrialSiteCode = trialSiteCode,
|
||||
IP = _userInfo.IP,
|
||||
DownloadStartTime = DateTime.Now,
|
||||
IsSuccess = false,
|
||||
|
|
|
@ -8,6 +8,7 @@ using IRaCIS.Core.Domain.Models;
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using Medallion.Threading;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
|
@ -28,36 +29,49 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IResponseOutput<List<NoneDicomStudyView>> > GetNoneDicomStudyList(
|
||||
public async Task<IResponseOutput<List<NoneDicomStudyView>>> GetNoneDicomStudyList(
|
||||
[FromQuery, NotDefault] Guid subjectVisitId,
|
||||
[FromQuery] Guid? nonedicomStudyId,
|
||||
[FromQuery] bool isFilterZip,
|
||||
[FromQuery] Guid? visitTaskId)
|
||||
[FromQuery] Guid? visitTaskId,
|
||||
[FromQuery] bool isReading)
|
||||
{
|
||||
var qcAuditState = await _subjectVisitRepository.Where(s => s.Id == subjectVisitId).Select(t => t.AuditState).FirstOrDefaultAsync();
|
||||
|
||||
//质控过程中,因为会修改统计数字,但是此时其他人看,应该看到完整的影像
|
||||
var isQCFinished = qcAuditState == AuditStateEnum.QCPassed;
|
||||
|
||||
//质控过程中并且不是IQC时,可以看到删除的(不需要忽略过滤器) 质控中iqc 也需要看到删除的
|
||||
var isViewDelete = !isQCFinished;
|
||||
|
||||
IQueryable<NoneDicomStudyView> noneDicomStudyQueryable = default;
|
||||
if (visitTaskId == null)
|
||||
{
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId).WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId)
|
||||
//质控过程中,需要忽略过滤质控设置删除的检查,以及设置删除的文件,质控通过后才
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId, ignoreQueryFilters: isViewDelete)
|
||||
.WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId)
|
||||
.WhereIf(isReading, t => t.IsReading && t.IsDeleted==false)
|
||||
|
||||
.ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip });
|
||||
|
||||
.ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, isReading= isReading });
|
||||
}
|
||||
else
|
||||
{
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Select(t => new { t.BlindSubjectCode, t.TrialReadingCriterionId, t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys }).FirstNotNullAsync();
|
||||
|
||||
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.TaskNoneDicomFileList.Any(t => t.VisitTaskId == visitTaskId))
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.TaskNoneDicomFileList.Any(t => t.VisitTaskId == visitTaskId), ignoreQueryFilters: isViewDelete)
|
||||
.WhereIf(isReading, t => t.IsReading && t.IsDeleted == false)
|
||||
.Where(t => taskinfo.IsImageFilter ? ("|" + taskinfo.CriterionModalitys + "|").Contains("|" + t.Modality + "|") : true)
|
||||
.WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId)
|
||||
.ProjectTo<TaskDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, visiTaskId = visitTaskId });
|
||||
.ProjectTo<TaskDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, visiTaskId = visitTaskId, isReading = isReading });
|
||||
}
|
||||
|
||||
|
||||
var list = await noneDicomStudyQueryable.OrderBy(x => x.ImageDate).ThenBy(x => x.CreateTime).ToListAsync();
|
||||
|
||||
var config = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).Select(t => new { t.Trial.ImageFormatList, t.Trial.StudyNameList ,t.Trial.IsShowStudyName}).FirstOrDefaultAsync();
|
||||
return ResponseOutput.Ok(list, config) ;
|
||||
var config = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).Select(t => new { t.Trial.ImageFormatList, t.Trial.StudyNameList, t.Trial.IsShowStudyName, AuditState = qcAuditState }).FirstOrDefaultAsync();
|
||||
return ResponseOutput.Ok(list, config);
|
||||
}
|
||||
|
||||
|
||||
|
@ -163,18 +177,35 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
[HttpGet("{noneDicomStudyId:guid}")]
|
||||
public async Task<List<NoneDicomStudyFileView>> GetNoneDicomStudyFileList(Guid noneDicomStudyId)
|
||||
{
|
||||
return await _noneDicomStudyFileRepository.Where(t => t.NoneDicomStudyId == noneDicomStudyId)
|
||||
var qcAuditState = await _noneDicomStudyFileRepository.Where(t => t.NoneDicomStudyId == noneDicomStudyId).Select(t => t.NoneDicomStudy.SubjectVisit.AuditState).FirstOrDefaultAsync();
|
||||
|
||||
//质控过程中,因为会修改统计数字,但是此时其他人看,应该看到完整的影像
|
||||
var isQCFinished = qcAuditState == AuditStateEnum.QCPassed;
|
||||
|
||||
//质控过程中并且不是IQC时,可以看到删除的(不需要忽略过滤器)
|
||||
var isViewDelete = !isQCFinished;
|
||||
|
||||
return await _noneDicomStudyFileRepository.Where(t => t.NoneDicomStudyId == noneDicomStudyId, ignoreQueryFilters: isViewDelete)
|
||||
.ProjectTo<NoneDicomStudyFileView>(_mapper.ConfigurationProvider).OrderBy(t => t.CreateTime).ToListAsync();
|
||||
}
|
||||
|
||||
[HttpGet("{subjectVisitId:guid}")]
|
||||
public async Task<List<NoneDicomStudyFileView>> GetVisitNoneDicomStudyFileList(Guid subjectVisitId)
|
||||
{
|
||||
return await _noneDicomStudyFileRepository.Where(t => t.NoneDicomStudy.SubjectVisitId == subjectVisitId)
|
||||
var qcAuditState = await _subjectVisitRepository.Where(s => s.Id == subjectVisitId).Select(t => t.AuditState).FirstOrDefaultAsync();
|
||||
|
||||
//质控过程中,因为会修改统计数字,但是此时其他人看,应该看到完整的影像
|
||||
var isQCFinished = qcAuditState == AuditStateEnum.QCPassed;
|
||||
|
||||
//质控过程中并且不是IQC时, 不需要忽略过滤器+质控设置删除的
|
||||
var isViewDelete = !isQCFinished;
|
||||
|
||||
return await _noneDicomStudyFileRepository.Where(t => t.NoneDicomStudy.SubjectVisitId == subjectVisitId, ignoreQueryFilters: isViewDelete)
|
||||
.ProjectTo<NoneDicomStudyFileView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Newtonsoft.Json;
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
/// <summary> UserLogView 列表视图模型 </summary>
|
||||
|
@ -13,7 +14,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public string IP { get; set; }
|
||||
|
||||
public string ActionUserType { get; set; }
|
||||
public int OptType { get; set; }
|
||||
public UserOptType OptType { get; set; }
|
||||
|
||||
public string? ActionUserName { get; set; }
|
||||
|
||||
|
@ -26,10 +27,13 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public bool IsLoginUncommonly { get; set; }
|
||||
|
||||
|
||||
|
||||
public string JsonObj { get; set; }
|
||||
|
||||
public string IPRegion { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public UserLogJsonObj UserObj => JsonObj.IsNotNullOrEmpty() ? JsonConvert.DeserializeObject<UserLogJsonObj>(JsonObj) :new UserLogJsonObj();
|
||||
}
|
||||
|
||||
public class SendMfaCommand
|
||||
|
|
|
@ -311,6 +311,8 @@ namespace IRaCIS.Application.Contracts
|
|||
public DateTime? BeginLastChangePassWordTime { get; set; }
|
||||
|
||||
public DateTime? EndLastChangePassWordTime { get; set; }
|
||||
|
||||
public UserCeateSource? UserCeateSource { get; set; }
|
||||
}
|
||||
|
||||
public class UserRoleInfoDTO
|
||||
|
@ -336,6 +338,18 @@ namespace IRaCIS.Application.Contracts
|
|||
public DateTime? LastChangePassWordTime { get; set; }
|
||||
|
||||
public List<IdentityUserTypeDTO> UserRoleList { get; set; }
|
||||
|
||||
#region 用户来源
|
||||
|
||||
public UserCeateSource UserCeateSource { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
public string TrialCode { get; set; }
|
||||
|
||||
public string ResearchProgramNo { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string PermissionStr { get; set; } = string.Empty;
|
||||
public int Order { get; set; }
|
||||
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
public List<Guid> UserTypeGroupIdList { get; set; } = new List<Guid>();
|
||||
|
||||
|
@ -93,6 +93,16 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
}
|
||||
|
||||
|
||||
public class UserTypeSelectDto
|
||||
{
|
||||
public bool IsDeleted { get; set; }
|
||||
public Guid UserTypeId { get; set; }
|
||||
public string UserTypeShortName { get; set; } = string.Empty;
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
}
|
||||
|
||||
public class UserTypeSimpleDTO
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
//Task<IResponseOutput> DeleteUser(Guid userId);
|
||||
//Task<UserDetailDTO> GetUser(Guid id);
|
||||
Task<PageOutput<UserListDTO>> GetUserList(UserListQueryDTO param);
|
||||
Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password);
|
||||
//Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password);
|
||||
Task<IResponseOutput> VerifyMFACodeAsync(string Code);
|
||||
|
||||
Task<IResponseOutput> SendMFAEmail(SendMfaCommand sendMfa);
|
||||
|
|
|
@ -87,6 +87,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
addOrEditUserFeedBack.TrialSiteId = info.TrialSiteId;
|
||||
addOrEditUserFeedBack.SubjectVisitId = info.SourceSubjectVisitId;
|
||||
}
|
||||
|
||||
addOrEditUserFeedBack.State = 0;//设置解决后IR 更新反馈自动变为未解决
|
||||
}
|
||||
|
||||
else if (addOrEditUserFeedBack.SubjectVisitId != null)
|
||||
|
|
|
@ -334,14 +334,21 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
////查找改邮箱或者手机的用户
|
||||
var exist = await _identityUserRepository.AnyAsync(t => t.EMail == email && t.Status == UserStateEnum.Enable);
|
||||
var existUser = await _identityUserRepository.Where(t => t.EMail == email && t.Status == UserStateEnum.Enable).FirstOrDefaultAsync();
|
||||
|
||||
if (!exist)
|
||||
if (existUser == null)
|
||||
{
|
||||
//---邮箱错误。
|
||||
return ResponseOutput.NotOk(_localizer["User_EmailError"]);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (existUser.IsFirstAdd && existUser.UserName.IsNullOrEmpty())
|
||||
{
|
||||
return ResponseOutput.NotOk(_localizer["User_Notinitialized"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//验证码 6位
|
||||
|
@ -414,6 +421,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
await _identityUserRepository.UpdatePartialFromQueryAsync(t => t.Id == identityUserId, u => new IdentityUser()
|
||||
{
|
||||
Password = newPwd,
|
||||
LastChangePassWordTime = DateTime.Now,
|
||||
IsFirstAdd = false
|
||||
});
|
||||
|
||||
|
@ -459,6 +467,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
var success = await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.IdentityUserId, u => new IdentityUser()
|
||||
{
|
||||
Password = editPwModel.NewPassWord,
|
||||
LastChangePassWordTime = DateTime.Now,
|
||||
IsFirstAdd = false
|
||||
});
|
||||
|
||||
|
@ -505,6 +514,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(inQuery.UserState != null, t => t.Status == inQuery.UserState)
|
||||
.WhereIf(inQuery.IsTestUser != null, t => t.IsTestUser == inQuery.IsTestUser)
|
||||
.WhereIf(inQuery.IsZhiZhun != null, t => t.IsZhiZhun == inQuery.IsZhiZhun)
|
||||
.WhereIf(inQuery.UserCeateSource != null, t => t.UserCeateSource == inQuery.UserCeateSource)
|
||||
.ProjectTo<UserListDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await userQueryable.ToPagedListAsync(inQuery);
|
||||
|
@ -525,7 +535,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
if (user != null)
|
||||
{
|
||||
user.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == identityUserId).ProjectTo<UserAccountInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
user.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == identityUserId).ProjectTo<UserAccountInfo>(_mapper.ConfigurationProvider).OrderBy(t => t.UserTypeShortName).ToListAsync();
|
||||
|
||||
}
|
||||
return user;
|
||||
|
@ -570,7 +580,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
saveItem.OrganizationName = organizationName;
|
||||
}
|
||||
|
||||
|
||||
saveItem.UserCeateSource = UserCeateSource.AdminCreate;
|
||||
saveItem.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10));
|
||||
|
||||
var addRoleList = new List<UserRole>();
|
||||
|
@ -817,7 +827,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
//删除验证码历史记录
|
||||
await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.Id == verificationRecord.Id);
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionUserName = _userInfo.UserName, TargetIdentityUserId = identityUserId, OptType = UserOptType.MFALogin }, true);
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionUserName = _userInfo.UserName, ActionIdentityUserId = identityUserId, OptType = UserOptType.MFALogin }, true);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -825,116 +835,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户登陆
|
||||
/// </summary>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <returns></returns>
|
||||
[NonDynamicMethod]
|
||||
public async Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password)
|
||||
{
|
||||
|
||||
int maxFailures = _verifyConfig.CurrentValue.LoginMaxFailCount;
|
||||
int lockoutMinutes = _verifyConfig.CurrentValue.LoginFailLockMinutes;
|
||||
|
||||
// 生成缓存键
|
||||
string cacheKey = CacheKeys.UserLoginError(userName);
|
||||
|
||||
// 从缓存中获取登录失败次数
|
||||
int? failCount = await _fusionCache.GetOrDefaultAsync<int?>(cacheKey);
|
||||
|
||||
if (failCount == null)
|
||||
{
|
||||
failCount = 0;
|
||||
}
|
||||
|
||||
//每次登录 都重置缓存时间
|
||||
await _fusionCache.SetAsync<int?>(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
|
||||
|
||||
|
||||
if (failCount >= maxFailures)
|
||||
{
|
||||
//await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = Guid.Empty, OptUserId = Guid.Empty, LoginFaildName = userName, LoginPassword = password, OptType = UserOptType.AccountLocked }, true);
|
||||
|
||||
//$"密码连续错误{maxFailures}次,当前账号已被限制登录,请等待 {lockoutMinutes} 分钟后再试。"
|
||||
throw new BusinessValidationFailedException(_localizer["User_ErrorLimit", maxFailures, lockoutMinutes]);
|
||||
}
|
||||
|
||||
var userLoginReturnModel = new LoginReturnDTO();
|
||||
|
||||
|
||||
var loginUser = await _userRoleRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
if (loginUser == null)
|
||||
{
|
||||
|
||||
//错误次数累加
|
||||
failCount++;
|
||||
await _fusionCache.SetAsync(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
|
||||
|
||||
var errorPwdUserId = await _identityUserRepository.Where(u => u.UserName == userName).Select(t => t.Id).FirstOrDefaultAsync();
|
||||
|
||||
//await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = errorPwdUserId, OptUserId = errorPwdUserId, LoginFaildName = userName, LoginPassword = password, OptType = UserOptType.AccountOrPasswordError }, true);
|
||||
|
||||
return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
|
||||
|
||||
}
|
||||
|
||||
if (loginUser.Status == 0)
|
||||
{
|
||||
//await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = loginUser.IdentityUserId, OptUserId = loginUser.IdentityUserId, LoginFaildName = userName, OptType = UserOptType.LoginLockedAccount }, true);
|
||||
|
||||
//---该用户已经被禁用。
|
||||
return ResponseOutput.NotOk(_localizer["User_Disabled"], new LoginReturnDTO());
|
||||
}
|
||||
|
||||
//登录成功 清除缓存
|
||||
await _fusionCache.SetAsync(cacheKey, 0, TimeSpan.FromMinutes(lockoutMinutes));
|
||||
var ipinfo = _searcher.Search(_userInfo.IP);
|
||||
|
||||
var iPRegion = string.Join('|', ipinfo.Split('|').TakeLast(3));
|
||||
|
||||
if (loginUser.LastLoginIP != string.Empty)
|
||||
{
|
||||
// 与上一次IP不一致
|
||||
if (loginUser.LastLoginIP != iPRegion)
|
||||
{
|
||||
loginUser.LoginState = 2;
|
||||
}
|
||||
}
|
||||
|
||||
//超过90天没修改密码
|
||||
if (_verifyConfig.CurrentValue.IsNeedChangePassWord && loginUser.LastChangePassWordTime != null && DateTime.Now.AddDays(-_verifyConfig.CurrentValue.ChangePassWordDays) > loginUser.LastChangePassWordTime.Value)
|
||||
{
|
||||
loginUser.NeedChangePassWord = true;
|
||||
|
||||
}
|
||||
|
||||
//await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = loginUser.IdentityUserId, OptUserId = loginUser.IdentityUserId, OptType = UserOptType.Login }, true);
|
||||
|
||||
userLoginReturnModel.BasicInfo = loginUser;
|
||||
|
||||
if (loginUser.LastChangePassWordTime == null)
|
||||
{
|
||||
await _identityUserRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.IdentityUserId, x => new IdentityUser()
|
||||
{
|
||||
LastChangePassWordTime = DateTime.Now
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
await _identityUserRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.IdentityUserId, x => new IdentityUser()
|
||||
{
|
||||
LastLoginIP = iPRegion,
|
||||
LastLoginTime = DateTime.Now
|
||||
|
||||
});
|
||||
|
||||
return ResponseOutput.Ok(userLoginReturnModel);
|
||||
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<UserLogView>> GetUserLogList(UserLogQuery inQuery)
|
||||
|
@ -963,6 +864,17 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var pageList = await userLogQueryable.ToPagedListAsync(inQuery);
|
||||
|
||||
|
||||
//项目创建账户的时候,没有用户名,但是目标用户Id 有值,导致查询出来有名字,所以在此单独处理下
|
||||
|
||||
foreach (var item in pageList.CurrentPageData)
|
||||
{
|
||||
if (item.OptType == UserOptType.AddUser)
|
||||
{
|
||||
item.TargetIdentityUserName = item.UserObj.UserName;
|
||||
}
|
||||
}
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
@ -1033,9 +945,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
var userLoginReturnModel = new IRCLoginReturnDTO();
|
||||
|
||||
|
||||
var loginUser = await _identityUserRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
var loginUser = await _identityUserRepository.Where(u => (u.UserName.Equals(userName) || u.EMail.Equals(userName)) && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
var existUserLoginInfo = await _identityUserRepository.Where(u => u.UserName == userName).Select(t => new { t.LastLoginIP, t.LastChangePassWordTime, t.Id }).FirstOrDefaultAsync();
|
||||
var existUserLoginInfo = await _identityUserRepository.Where(u => u.UserName == userName || u.EMail == userName).Select(t => new { t.LastLoginIP, t.LastChangePassWordTime, t.Id }).FirstOrDefaultAsync();
|
||||
|
||||
var isExistAccount = existUserLoginInfo != null;
|
||||
|
||||
|
@ -1106,12 +1018,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
|
||||
|
||||
await _identityUserRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.IdentityUserId, x => new IdentityUser()
|
||||
{
|
||||
LastLoginTime = DateTime.Now,
|
||||
LastLoginIP = _userInfo.IP,
|
||||
});
|
||||
|
||||
|
||||
if (loginUser.Status == 0)
|
||||
{
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, ActionUserName = userName, OptType = UserOptType.LoginLockedAccount, IsLoginUncommonly = isLoginUncommonly }, true);
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, ActionUserName = loginUser.UserName, OptType = UserOptType.LoginLockedAccount, IsLoginUncommonly = isLoginUncommonly }, true);
|
||||
|
||||
//---该用户已经被禁用。
|
||||
return ResponseOutput.NotOk(_localizer["User_Disabled"], new IRCLoginReturnDTO());
|
||||
|
@ -1121,7 +1037,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
await _fusionCache.SetAsync(cacheKey, 0, TimeSpan.FromMinutes(lockoutMinutes));
|
||||
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, OptType = UserOptType.Login, IsLoginUncommonly = isLoginUncommonly }, true);
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, ActionUserName = loginUser.UserName, OptType = UserOptType.Login, IsLoginUncommonly = isLoginUncommonly }, true);
|
||||
|
||||
userLoginReturnModel.BasicInfo = loginUser;
|
||||
|
||||
|
@ -1177,7 +1093,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
await _fusionCache.SetAsync(CacheKeys.UserAutoLoginOut(identityUserId), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(_verifyConfig.CurrentValue.AutoLoginOutMinutes));
|
||||
|
||||
|
||||
userLoginReturnModel.BasicInfo.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == identityUserId).ProjectTo<UserAccountInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
userLoginReturnModel.BasicInfo.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == identityUserId).ProjectTo<UserAccountInfo>(_mapper.ConfigurationProvider).OrderBy(t => t.UserTypeShortName).ToListAsync();
|
||||
userLoginReturnModel.CompanyInfo = companyInfo;
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
{
|
||||
|
||||
var userTypeRoleQueryable = _userTypeRepository
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.IsEnable == true)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(userTypeQuery.SearchFilter), t => t.Description.Contains(userTypeQuery.SearchFilter!) || t.UserTypeName.Contains(userTypeQuery.SearchFilter!) || t.UserTypeShortName.Contains(userTypeQuery.SearchFilter!))
|
||||
|
||||
.WhereIf(userTypeQuery.GroupId != null, t => t.UserTypeGroupList.Any(t => t.DictionaryId == userTypeQuery.GroupId))
|
||||
|
@ -140,7 +141,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
|
||||
|
||||
var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||
var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin && x.IsEnable==true)
|
||||
.WhereIf(userTypeSelectEnum != UserTypeSelectEnum.None, t => userTypeEnums.Contains(t.UserTypeEnum))
|
||||
.OrderBy(t => t.UserTypeShortName).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
@ -158,7 +159,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public async Task<List<TrialUserType>> GetTrialUserTypeList()
|
||||
{
|
||||
//排除其他组的用户
|
||||
var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||
var query = _userTypeRepository
|
||||
.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin && x.IsEnable==true)
|
||||
.Where(t => !t.UserTypeGroupList.Any(t => t.Group.Code == "3"))
|
||||
.OrderBy(t => t.UserTypeShortName).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
|
|
@ -152,7 +152,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<IdentityUser, UserBasicInfo>()
|
||||
.ForMember(d => d.IdentityUserId, c => c.MapFrom(t => t.Id));
|
||||
CreateMap<IdentityUser, UserListDTO>();
|
||||
CreateMap<IdentityUser, UserListDTO>()
|
||||
.ForMember(d => d.TrialCode, u => u.MapFrom(s => s.Trial.TrialCode))
|
||||
.ForMember(d => d.ResearchProgramNo, u => u.MapFrom(s => s.Trial.ResearchProgramNo));
|
||||
|
||||
CreateMap<UserAddUserType, UserRole>().ReverseMap();
|
||||
|
||||
|
@ -172,7 +174,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<UpdateTrialUserCommand, TrialIdentityUser>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,14 +6,9 @@
|
|||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
/// <summary> NoneDicomStudyFileView 列表视图模型 </summary>
|
||||
public class NoneDicomStudyFileView
|
||||
public class NoneDicomStudyFileView: NoneDicomStudyFileAddOrEdit
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Path { get; set; } = string.Empty;
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public Guid NoneDicomStudyId { get; set; }
|
||||
|
||||
|
||||
public long? FileSize { get; set; }
|
||||
|
||||
|
@ -21,7 +16,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public string FileType { get; set; }
|
||||
|
||||
public bool IsReading { get; set; }
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,24 +30,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string AuditInfo { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class NoneDicomStudyAndFile
|
||||
{
|
||||
public string NoneDicomStudyCode { get; set; } = string.Empty;
|
||||
|
||||
public List<NoneDicomStudyFileView> NoneDicomStudyFileList { get; set; } = new List<NoneDicomStudyFileView>();
|
||||
|
||||
}
|
||||
|
||||
///<summary>NoneDicomStudyFileQuery 列表查询参数模型</summary>
|
||||
public class NoneDicomStudyFileQuery
|
||||
{
|
||||
///<summary> Path</summary>
|
||||
public string Path { get; set; } = string.Empty;
|
||||
|
||||
///<summary> FileName</summary>
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
///<summary> NoneDicomStudyFileAddOrEdit 列表查询参数模型</summary>
|
||||
public class NoneDicomStudyFileAddOrEdit
|
||||
|
|
|
@ -14,10 +14,15 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public int FileCount { get; set; }
|
||||
|
||||
public bool IsCriticalSequence { get; set; } = false;
|
||||
|
||||
|
||||
public List<NoneDicomStudyFileView> NoneDicomStudyFileList { get; set; } = new List<NoneDicomStudyFileView>();
|
||||
|
||||
|
||||
public bool IsReading { get; set; }
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
}
|
||||
|
||||
public class TaskDicomStudyView : NoneDicomStudyView
|
||||
|
|
|
@ -81,6 +81,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public Guid? VisitId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否领取了
|
||||
/// </summary>
|
||||
public bool IsReceived { get; set; } = false;
|
||||
}
|
||||
|
||||
public class CRCRequestToQCCommand
|
||||
|
@ -1218,6 +1223,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid? DoctorUserId { get; set; }
|
||||
|
||||
public string TaskName { get; set; }
|
||||
|
@ -1272,6 +1279,17 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public DateTime? SignTime { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region 肿瘤学结果
|
||||
|
||||
[DictionaryTranslateAttribute("OncologyAssessType")]
|
||||
public string OncologyResult { get; set; } = string.Empty;
|
||||
|
||||
public string OncologyReason { get; set; } = string.Empty;
|
||||
|
||||
public string OncologyUserName { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class CommonLessionExport : CommonEvaluationExport
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
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 MassTransit.Initializers;
|
||||
|
@ -279,7 +280,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<(PageOutput<QCCheckWithModalityView>, TrialSubjectAndSVConfig)> GetConsistencyVerificationList(CheckQuery inQuery)
|
||||
public async Task<IResponseOutput<PageOutput<QCCheckWithModalityView>>> GetConsistencyVerificationList(CheckQuery inQuery)
|
||||
{
|
||||
|
||||
var svExpression = QCCommon.GetSubjectVisitFilter(inQuery.VisitPlanArray);
|
||||
|
@ -294,9 +295,14 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.UserRoleId))//CRC 过滤负责的site
|
||||
.ProjectTo<QCCheckWithModalityView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await query.ToPagedListAsync(inQuery);
|
||||
|
||||
var defalutSortArray = new string[] { nameof(QCCheckWithModalityView.CheckState), nameof(QCCheckWithModalityView.IsUrgent), nameof(QCCheckWithModalityView.SubjectCode), nameof(QCCheckWithModalityView.VisitNum) };
|
||||
|
||||
var pageList = await query.ToPagedListAsync(inQuery, defalutSortArray);
|
||||
|
||||
var config = await _trialRepository.Where(t => t.Id == inQuery.TrialId).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
|
||||
return (pageList, config);
|
||||
|
||||
return ResponseOutput.Ok(pageList, config);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -374,7 +380,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).ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider).ToListAsync(),
|
||||
NoneDicomStudyList = await _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId,ignoreQueryFilters: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()
|
||||
};
|
||||
|
|
|
@ -33,8 +33,11 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
IRepository<ReadModule> _readModuleRepository,
|
||||
IRepository<DicomInstance> _dicomInstanceRepository,
|
||||
IRepository<TrialQCQuestionAnswer> _trialQCQuestionAnswerRepository,
|
||||
IRepository<NoneDicomStudy> _noneDicomStudyRepository,
|
||||
IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||
IDistributedLockProvider _distributedLockProvider, IReadingClinicalDataService _readingClinicalDataService,
|
||||
IOSSService _oSSService,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IWebHostEnvironment _hostEnvironment) : BaseService, IQCOperationService
|
||||
{
|
||||
|
||||
|
@ -264,7 +267,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
sv.CheckChallengeState = CheckChanllengeTypeEnum.CRCWaitPMReply;
|
||||
|
||||
}
|
||||
else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt != (int)UserTypeEnum.APM)
|
||||
else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM)
|
||||
{
|
||||
sv.CheckChallengeState = CheckChanllengeTypeEnum.PMWaitCRCReply;
|
||||
}
|
||||
|
@ -697,13 +700,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
study.InstanceCount = study.InstanceCount - 1;
|
||||
|
||||
////删除到最后一个instance
|
||||
//if (series.InstanceCount == 0)
|
||||
//{
|
||||
// series.IsDeleted = true;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if (state == 5)
|
||||
|
@ -717,7 +713,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
var study = (await _dicomStudyRepository.Where(t => t.Id == series.StudyId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
study.InstanceCount = study.InstanceCount + 1;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -725,7 +721,73 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 1、设置为不读片,2 设置为读片(取消 先前设置为不读片) 4 设置为删除(数据库记录软删除) 5 恢复为未删除
|
||||
/// </summary>
|
||||
/// <param name="subjectVisitId"></param>
|
||||
/// <param name="noneDicomStudyId"></param>
|
||||
/// <param name="noneDicomStudyFileId"></param>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task<IResponseOutput> SetNodicomStudyState(Guid subjectVisitId, Guid noneDicomStudyId, Guid? noneDicomStudyFileId, int state)
|
||||
{
|
||||
await VerifyIsCanQCAsync(null, subjectVisitId);
|
||||
|
||||
//设置检查
|
||||
if (noneDicomStudyFileId == null)
|
||||
{
|
||||
|
||||
var noneDicomStudy = (await _noneDicomStudyRepository.Where(t => t.Id == noneDicomStudyId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
|
||||
if (state == 1)
|
||||
{
|
||||
noneDicomStudy.IsReading = false;
|
||||
}
|
||||
else if (state == 2)
|
||||
{
|
||||
noneDicomStudy.IsReading = true;
|
||||
}
|
||||
else if (state == 4)
|
||||
{
|
||||
noneDicomStudy.IsDeleted = true;
|
||||
}
|
||||
else if (state == 5)
|
||||
{
|
||||
noneDicomStudy.IsDeleted = false;
|
||||
|
||||
}
|
||||
}
|
||||
//设置检查下面的文件
|
||||
else
|
||||
{
|
||||
var noneDicomStudyFile = (await _noneDicomStudyFileRepository.Where(t => t.Id == noneDicomStudyFileId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
|
||||
if (state == 1)
|
||||
{
|
||||
noneDicomStudyFile.IsReading = false;
|
||||
}
|
||||
else if (state == 2)
|
||||
{
|
||||
noneDicomStudyFile.IsReading = true;
|
||||
}
|
||||
else if (state == 4)
|
||||
{
|
||||
noneDicomStudyFile.IsDeleted = true;
|
||||
}
|
||||
else if (state == 5)
|
||||
{
|
||||
noneDicomStudyFile.IsDeleted = false;
|
||||
}
|
||||
}
|
||||
|
||||
await _noneDicomStudyRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///type 1 :study 2: series 3:非dicom QC修改检查部位和 拍片类型
|
||||
|
@ -837,6 +899,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
await _dicomStudyRepository.DeleteAsync(study);
|
||||
|
||||
var fisrtPath = await _dicomInstanceRepository.Where(t => t.StudyId == id).Select(t => t.Path).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
var succeess2 = await _dicomInstanceRepository.BatchDeleteNoTrackingAsync(t => t.StudyId == id);
|
||||
var success3 = await _dicomSeriesrepository.BatchDeleteNoTrackingAsync(t => t.StudyId == id);
|
||||
|
@ -844,6 +908,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
await _scpStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new SCPStudy() { SubjectVisitId = null });
|
||||
|
||||
|
||||
var prefix = fisrtPath.Substring(1, fisrtPath.LastIndexOf('/') - 1);
|
||||
|
||||
await _oSSService.DeleteFromPrefix(prefix, true);
|
||||
|
||||
//var success3 = await _dicomSeriesrepository.DeleteFromQueryAsync(t => t.StudyId == id, true);
|
||||
//var success4 = await _repository.BatchDeleteAsync<StudyMonitor>(t => t.StudyId == id);
|
||||
|
@ -952,7 +1019,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
var nextIQCQuality = await this.GetNextIQCQuality(inDto);
|
||||
|
||||
if (nextIQCQuality.VisitId != null)
|
||||
if (nextIQCQuality.VisitId != null && nextIQCQuality.IsReceived == false)
|
||||
{
|
||||
var visit = await _subjectVisitRepository.Where(x => x.Id == nextIQCQuality.VisitId).FirstNotNullAsync();
|
||||
if (!visit.IsTake)
|
||||
|
@ -980,6 +1047,22 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
.FirstOrDefaultAsync(t => t.TrialId == inDto.TrialId)
|
||||
.IfNullThrowException();
|
||||
|
||||
|
||||
|
||||
var currentActionList = await _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId && x.CurrentActionUserId == _userInfo.UserRoleId).OrderByDescending(x => x.IsUrgent)
|
||||
.ThenBy(x => x.Subject.Code).ThenBy(x => x.VisitNum).ToListAsync();
|
||||
|
||||
if (currentActionList.Count() > 0)
|
||||
{
|
||||
return new GetNextIQCQualityOutDto()
|
||||
{
|
||||
IsReceived = true,
|
||||
SubjectId = currentActionList[0].SubjectId,
|
||||
VisitId = currentActionList[0].Id,
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
SubjectVisit? subjectVisit = null;
|
||||
List<SubjectVisit>? visitList = null;
|
||||
switch (trialConfig.QCProcessEnum)
|
||||
|
@ -1613,8 +1696,11 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
|
||||
//删除 软删除的物理文件
|
||||
var instancePathList = await _dicomInstanceRepository.Where(t => t.DicomSerie.IsDeleted && t.SubjectVisitId == subjectVisitId)
|
||||
.Select(t => t.Path).ToListAsync();
|
||||
var instancePathList = await _dicomInstanceRepository.Where(t => (t.DicomSerie.IsDeleted || t.IsDeleted) && t.SubjectVisitId == subjectVisitId, false, true)
|
||||
.Select(t => t.Path).ToListAsync();
|
||||
var noneDicomFileList = await _noneDicomStudyFileRepository.Where(t => (t.NoneDicomStudy.IsDeleted ||t.IsDeleted) && t.NoneDicomStudy.SubjectVisitId == subjectVisitId, false, true)
|
||||
.Select(t => t.Path).ToListAsync();
|
||||
|
||||
|
||||
//维护统一状态
|
||||
dbSubjectVisit.ReadingStatus = ReadingStatusEnum.ConsistencyCheck;
|
||||
|
@ -1652,17 +1738,15 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
dbSubjectVisit.ReadingStatus = trialConfig.IsImageConsistencyVerification ? ReadingStatusEnum.ConsistencyCheck : ReadingStatusEnum.TaskAllocate;
|
||||
|
||||
//删除影像
|
||||
instancePathList.ForEach(path =>
|
||||
{
|
||||
await _dicomStudyRepository.BatchDeleteNoTrackingAsync(t => t.IsDeleted && t.SubjectVisitId == subjectVisitId);
|
||||
await _dicomSeriesRepository.BatchDeleteNoTrackingAsync(t => t.IsDeleted && t.SubjectVisitId == subjectVisitId);
|
||||
await _dicomInstanceRepository.BatchDeleteNoTrackingAsync(t => (t.DicomSerie.IsDeleted || t.IsDeleted) && t.SubjectVisitId == subjectVisitId);
|
||||
await _noneDicomStudyFileRepository.BatchDeleteNoTrackingAsync(t => (t.NoneDicomStudy.IsDeleted || t.IsDeleted) && t.NoneDicomStudy.SubjectVisitId == subjectVisitId);
|
||||
await _noneDicomStudyRepository.BatchDeleteNoTrackingAsync(t => t.IsDeleted && t.SubjectVisitId == subjectVisitId);
|
||||
await _oSSService.DeleteObjects(instancePathList.Select(t => t.TrimStart('/')).ToList());
|
||||
await _oSSService.DeleteObjects(noneDicomFileList.Select(t => t.TrimStart('/')).ToList());
|
||||
|
||||
|
||||
var physicalPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, path);
|
||||
|
||||
if (System.IO.File.Exists(physicalPath))
|
||||
{
|
||||
File.Delete(physicalPath);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -1716,18 +1800,10 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
dbSubjectVisit.ReadingStatus = trialConfig.IsImageConsistencyVerification ? ReadingStatusEnum.ConsistencyCheck : ReadingStatusEnum.TaskAllocate;
|
||||
|
||||
//删除影像
|
||||
instancePathList.ForEach(path =>
|
||||
{
|
||||
|
||||
var physicalPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, path);
|
||||
|
||||
if (System.IO.File.Exists(physicalPath))
|
||||
{
|
||||
File.Delete(physicalPath);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
await _dicomInstanceRepository.BatchDeleteNoTrackingAsync(t => (t.DicomSerie.IsDeleted || t.IsDeleted) && t.SubjectVisitId == subjectVisitId);
|
||||
await _noneDicomStudyFileRepository.BatchDeleteNoTrackingAsync(t => (t.NoneDicomStudy.IsDeleted || t.IsDeleted) && t.NoneDicomStudy.SubjectVisitId == subjectVisitId);
|
||||
await _oSSService.DeleteObjects(instancePathList.Select(t => t.TrimStart('/')).ToList());
|
||||
await _oSSService.DeleteObjects(noneDicomFileList.Select(t => t.TrimStart('/')).ToList());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@ using IRaCIS.Core.Application.Contracts.DTO;
|
|||
using IRaCIS.Core.Application.MassTransit.Command;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System.Linq;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
|
@ -401,6 +402,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
bool isFilterZip = false;
|
||||
|
||||
bool isIgnoreDelete = false;
|
||||
|
||||
bool isReading = false;
|
||||
|
||||
|
||||
string token = string.Empty;
|
||||
//一致性核查
|
||||
|
@ -537,10 +542,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.MedicalNo, u => u.MapFrom(s => s.Subject.MedicalNo))
|
||||
.ForMember(d => d.Sex, u => u.MapFrom(s => s.Subject.Sex))
|
||||
.ForMember(d => d.Age, u => u.MapFrom(t => t.Subject.Age))
|
||||
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
||||
|| t.Subject.ClinicalFormList.Any(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == t.Id)
|
||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count > 0)
|
||||
|| t.PreviousSurgeryList.Any()))
|
||||
.ForMember(d => d.IsHaveClinicalData,
|
||||
u => u.MapFrom(t => t.PreviousHistoryList.Any() ||
|
||||
t.PreviousOtherList.Any() ||
|
||||
t.Subject.ClinicalFormList.Any(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == t.Id) ||
|
||||
t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count > 0) ||
|
||||
t.PreviousSurgeryList.Any()))
|
||||
|
||||
.ForMember(d => d.IsHaveUploadFailed, u => u.MapFrom(t => t.StudyList.SelectMany(c => c.DicomStudyMonitorList).Any(h => h.FailedFileCount > 0)))
|
||||
|
||||
|
@ -718,14 +725,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
|
||||
|
||||
CreateMap<NoneDicomStudy, NoneDicomStudyView>()
|
||||
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip ? s.NoneDicomFileList.Where(t => !t.FileType.Contains(StaticData.FileType.Zip)).OrderBy(t => t.CreateTime).ThenBy(t => t.FileName) : s.NoneDicomFileList.OrderBy(t => t.CreateTime).ThenBy(t => t.FileName)))
|
||||
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s =>
|
||||
s.NoneDicomFileList.Where(t => isFilterZip ? !t.FileType.Contains(StaticData.FileType.Zip) : true).Where(t => isReading ? t.IsReading && t.IsDeleted == false : true).OrderBy(t => t.CreateTime).ThenBy(t => t.FileName)))
|
||||
.ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode));
|
||||
|
||||
Guid? visiTaskId = null;
|
||||
CreateMap<NoneDicomStudy, TaskDicomStudyView>()
|
||||
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip ?
|
||||
s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).Where(t => !t.FileType.Contains(StaticData.FileType.Zip)).OrderBy(t => t.CreateTime).ThenBy(t => t.FileName)
|
||||
: s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).OrderBy(t => t.CreateTime).ThenBy(t => t.FileName)))
|
||||
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s =>
|
||||
s.TaskNoneDicomFileList.Where(t => visiTaskId != null ? t.VisitTaskId == visiTaskId : true).Where(t => isFilterZip ? !t.FileType.Contains(StaticData.FileType.Zip):true)
|
||||
.Where(t => isReading ? t.IsReading && t.IsDeleted == false : true)
|
||||
.OrderBy(t => t.CreateTime).ThenBy(t => t.FileName)))
|
||||
.ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode));
|
||||
|
||||
}
|
||||
|
|
|
@ -407,6 +407,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
if (await _readModuleRepository.AnyAsync(x => x.SubjectId == inDto.SubjectId && x.SubjectVisit.LatestScanDate <= clinicalForm.CheckDate && x.IsCRCConfirm))
|
||||
{
|
||||
|
||||
throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_unableToAddOrUpdate", clinicalForm.CheckDate.Value.ToString("yyyy-MM-dd")]);
|
||||
}
|
||||
|
||||
|
|
|
@ -372,6 +372,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
ClinicalDataSetEnName = x.ClinicalDataSetEnName,
|
||||
UploadRole = x.UploadRole,
|
||||
FileName = x.FileName,
|
||||
EnFileName = x.EnFileName,
|
||||
EnPath = x.EnPath,
|
||||
Path = x.Path,
|
||||
TrialId = trialId,
|
||||
IsApply = x.IsApply,
|
||||
|
|
|
@ -159,9 +159,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||
ClinicalDataSetEnName = x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSet.Id,
|
||||
FileName = x.ClinicalDataTrialSet.FileName,
|
||||
FileName = _userInfo.IsEn_Us?x.ClinicalDataTrialSet.EnFileName: x.ClinicalDataTrialSet.FileName,
|
||||
Path = _userInfo.IsEn_Us ? x.ClinicalDataTrialSet.EnPath : x.ClinicalDataTrialSet.Path,
|
||||
UploadRole = x.ClinicalDataTrialSet.UploadRole,
|
||||
Path = x.ClinicalDataTrialSet.Path,
|
||||
|
||||
IsBlind = x.IsBlind,
|
||||
IsComplete = x.IsComplete,
|
||||
ClinicalFromList = x.Subject.ClinicalFormList.Where(y => y.ReadingId == x.ReadingId && y.ClinicalDataTrialSetId == x.ClinicalDataTrialSetId).Select(y => new ClinicalFromData()
|
||||
|
@ -231,9 +232,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||
ClinicalDataSetEnName = x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSet.Id,
|
||||
FileName = x.ClinicalDataTrialSet.FileName,
|
||||
FileName = _userInfo.IsEn_Us?x.ClinicalDataTrialSet.EnFileName: x.ClinicalDataTrialSet.FileName,
|
||||
Path = _userInfo.IsEn_Us ? x.ClinicalDataTrialSet.EnPath : x.ClinicalDataTrialSet.Path,
|
||||
UploadRole = x.ClinicalDataTrialSet.UploadRole,
|
||||
Path = x.ClinicalDataTrialSet.Path,
|
||||
|
||||
IsBlind = x.IsBlind,
|
||||
IsComplete = x.IsComplete,
|
||||
ClinicalFromList = x.Subject.ClinicalFormList.Where(y => y.ReadingId == x.ReadingId && y.ClinicalDataTrialSetId == x.ClinicalDataTrialSetId).Select(y => new ClinicalFromData()
|
||||
|
@ -682,8 +684,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
ClinicalDataSetName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||
ClinicalDataSetEnName = x.ClinicalDataSetEnName,
|
||||
ClinicalUploadType = x.ClinicalUploadType,
|
||||
FileName = x.FileName,
|
||||
Path = x.Path,
|
||||
FileName = _userInfo.IsEn_Us?x.EnFileName: x.FileName,
|
||||
Path = _userInfo.IsEn_Us ? x.EnPath : x.Path,
|
||||
Id = x.Id,
|
||||
CriterionEnumList = x.CriterionEnumList,
|
||||
}).ToListAsync();
|
||||
|
|
|
@ -66,6 +66,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 英文模板文件名称
|
||||
/// </summary>
|
||||
public string EnFileName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 英文文件路径
|
||||
/// </summary>
|
||||
public string EnPath { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public List<Guid> TrialCriterionIdList { get; set; }
|
||||
|
||||
|
@ -139,6 +149,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public string Path { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 英文模板文件名称
|
||||
/// </summary>
|
||||
public string EnFileName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 英文文件路径
|
||||
/// </summary>
|
||||
public string EnPath { get; set; } = string.Empty;
|
||||
|
||||
|
||||
//public List<Guid> SystemCriterionIdList { get; set; }
|
||||
|
||||
|
||||
|
|
|
@ -1495,6 +1495,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public class GetRelatedVisitTaskOutDto
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 是否存在未处理的反馈
|
||||
/// </summary>
|
||||
public bool IsExistUnprocessedFeedback { get; set; }
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public string TaskName { get; set; }
|
||||
|
||||
|
@ -1845,6 +1850,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public bool ExistsManual { get; set; }
|
||||
|
||||
public bool IsBaseLine { get; set; }
|
||||
|
||||
public ReadingCategory ReadingCategory { get; set; }
|
||||
|
||||
public decimal VisitNum { get; set; }
|
||||
|
@ -1864,6 +1871,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public ReadingTaskState ReadingTaskState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示检查名称
|
||||
/// </summary>
|
||||
public bool IsShowStudyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否存在未处理的反馈
|
||||
/// </summary>
|
||||
public bool IsExistUnprocessedFeedback { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是转变的任务(转为IRECIST)
|
||||
/// </summary>
|
||||
|
@ -2355,6 +2372,32 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class GetNoneDicomMarkListOutDto
|
||||
{
|
||||
public List<AddNoneDicomMarkInDto> NoneDicomMarkList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetNoneDicomMarkListInDtoDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class AddNoneDicomMarkInDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Guid? StudyId { get; set; }
|
||||
public Guid? NoneDicomFileId { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public string MeasureData { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public Guid NewSystemCriterionId { get; set; }
|
||||
|
||||
public bool IsCopyQuestion { get; set; }
|
||||
//public bool IsCopyQuestion { get; set; }
|
||||
}
|
||||
|
||||
public class EditCriterionDictionaryInDto
|
||||
|
|
|
@ -22,8 +22,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository,
|
||||
IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository,
|
||||
IReadingImageTaskService _iReadingImageTaskService,
|
||||
IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> _readingSystemCriterionDictionaryRepository,
|
||||
IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository,
|
||||
IRepository<ReadingCriterionPage> _readingCriterionPageRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
|
@ -939,8 +940,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<IResponseOutput> CopySystemCriterionData(CopySystemCriterionDataInDto inDto)
|
||||
{
|
||||
if (inDto.IsCopyQuestion)
|
||||
{
|
||||
|
||||
var newSystemQuestionList = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.SourceSystemCriterionId)
|
||||
.ProjectTo<ReadingQuestionSystemData>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
newSystemQuestionList.ForEach(x =>
|
||||
|
@ -993,22 +993,49 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
await _readingTableQuestionSystemRepository.BatchDeleteNoTrackingAsync(x => x.SystemCriterionId == inDto.NewSystemCriterionId);
|
||||
await _readingTableQuestionSystemRepository.AddRangeAsync(needAddTableDatas);
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
#region 器官
|
||||
var organData = await _organInfoRepository.Where(x => x.SystemCriterionId == inDto.SourceSystemCriterionId).ToListAsync();
|
||||
|
||||
organData.ForEach(x =>
|
||||
{
|
||||
var organData = await _organInfoRepository.Where(x => x.SystemCriterionId == inDto.SourceSystemCriterionId).ToListAsync();
|
||||
x.Id = NewId.NextGuid();
|
||||
x.SystemCriterionId = inDto.NewSystemCriterionId;
|
||||
});
|
||||
await _organInfoRepository.BatchDeleteNoTrackingAsync(x => x.SystemCriterionId == inDto.NewSystemCriterionId);
|
||||
await _organInfoRepository.AddRangeAsync(organData);
|
||||
#endregion
|
||||
|
||||
#region 字典Code
|
||||
var dictionaryCodes = await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SourceSystemCriterionId).ToListAsync();
|
||||
|
||||
dictionaryCodes.ForEach(x =>
|
||||
{
|
||||
x.Id = NewId.NextGuid();
|
||||
x.SystemCriterionId = inDto.NewSystemCriterionId;
|
||||
});
|
||||
await _systemCriterionDictionaryCodeRepository.BatchDeleteNoTrackingAsync(x => x.SystemCriterionId == inDto.NewSystemCriterionId);
|
||||
await _systemCriterionDictionaryCodeRepository.AddRangeAsync(dictionaryCodes);
|
||||
#endregion
|
||||
|
||||
#region 字典
|
||||
|
||||
|
||||
var criterionDictionaries = await _readingSystemCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.SourceSystemCriterionId).ToListAsync();
|
||||
|
||||
criterionDictionaries.ForEach(x =>
|
||||
{
|
||||
x.Id = NewId.NextGuid();
|
||||
x.CriterionId = inDto.NewSystemCriterionId;
|
||||
});
|
||||
await _readingSystemCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.NewSystemCriterionId);
|
||||
await _readingSystemCriterionDictionaryRepository.AddRangeAsync(criterionDictionaries);
|
||||
|
||||
#endregion
|
||||
|
||||
organData.ForEach(x =>
|
||||
{
|
||||
x.Id = NewId.NextGuid();
|
||||
x.SystemCriterionId = inDto.NewSystemCriterionId;
|
||||
});
|
||||
await _organInfoRepository.BatchDeleteNoTrackingAsync(x => x.SystemCriterionId == inDto.NewSystemCriterionId);
|
||||
await _organInfoRepository.AddRangeAsync(organData);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -29,30 +29,30 @@ namespace IRaCIS.Core.Application.Service.TA
|
|||
result = await _tumorAssessmentRepository1Point1.AsQueryable().ToPagedListAsync(inQuery, nameof(TumorAssessmentView.Id));
|
||||
columnList = new List<ColumnInfo>()
|
||||
{
|
||||
new ColumnInfo(){ ColumnName="靶病灶",ColumnKey=nameof(TumorAssessment_RECIST1Point1.TargetLesion),DictionaryKey=typeof(TargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName="非靶病灶",ColumnKey=nameof(TumorAssessment_RECIST1Point1.NonTargetLesions),DictionaryKey=typeof(NoTargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName="新病灶",ColumnKey=nameof(TumorAssessment_RECIST1Point1.NewLesion),DictionaryKey=typeof(NewLesionAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName="整体疗效",ColumnKey=nameof(TumorAssessment_RECIST1Point1.OverallEfficacy),DictionaryKey=typeof(OverallAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_TargetLesions"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.TargetLesion),DictionaryKey=typeof(TargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_NonTargetLesions"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.NonTargetLesions),DictionaryKey=typeof(NoTargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_NewLesions"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.NewLesion),DictionaryKey=typeof(NewLesionAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_OverallEfficacy"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.OverallEfficacy),DictionaryKey=typeof(OverallAssessment).Name },
|
||||
};
|
||||
break;
|
||||
case CriterionType.RECIST1Pointt1_MB:
|
||||
result = await _tumorAssessmentRepository1Point1BM.AsQueryable().ToPagedListAsync(inQuery, nameof(TumorAssessmentView.Id));
|
||||
columnList = new List<ColumnInfo>()
|
||||
{
|
||||
new ColumnInfo(){ ColumnName="靶病灶",ColumnKey=nameof(TumorAssessment_RECIST1Point1.TargetLesion),DictionaryKey=typeof(TargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName="非靶病灶",ColumnKey=nameof(TumorAssessment_RECIST1Point1.NonTargetLesions),DictionaryKey=typeof(NoTargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName="新病灶",ColumnKey=nameof(TumorAssessment_RECIST1Point1.NewLesion),DictionaryKey=typeof(NewLesionAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName="整体疗效",ColumnKey=nameof(TumorAssessment_RECIST1Point1.OverallEfficacy),DictionaryKey=typeof(OverallAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_TargetLesions"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.TargetLesion),DictionaryKey=typeof(TargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_NonTargetLesions"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.NonTargetLesions),DictionaryKey=typeof(NoTargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_NewLesions"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.NewLesion),DictionaryKey=typeof(NewLesionAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_OverallEfficacy"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.OverallEfficacy),DictionaryKey=typeof(OverallAssessment).Name },
|
||||
};
|
||||
break;
|
||||
case CriterionType.IRECIST1Point1:
|
||||
result = await _tumorAssessmentIRepository1Point1.AsQueryable().ToPagedListAsync(inQuery, nameof(TumorAssessmentView.Id));
|
||||
columnList = new List<ColumnInfo>()
|
||||
{
|
||||
new ColumnInfo(){ ColumnName="靶病灶",ColumnKey=nameof(TumorAssessment_RECIST1Point1.TargetLesion),DictionaryKey=typeof(TargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName="非靶病灶",ColumnKey=nameof(TumorAssessment_RECIST1Point1.NonTargetLesions),DictionaryKey=typeof(NoTargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName="新病灶",ColumnKey=nameof(TumorAssessment_RECIST1Point1.NewLesion),DictionaryKey=typeof(NewLesionAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName="整体疗效",ColumnKey=nameof(TumorAssessment_RECIST1Point1.OverallEfficacy),DictionaryKey=typeof(OverallAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_TargetLesions"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.TargetLesion),DictionaryKey=typeof(TargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_NonTargetLesions"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.NonTargetLesions),DictionaryKey=typeof(NoTargetAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_NewLesions"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.NewLesion),DictionaryKey=typeof(NewLesionAssessment).Name },
|
||||
new ColumnInfo(){ ColumnName=_localizer["Tumor_OverallEfficacy"],ColumnKey=nameof(TumorAssessment_RECIST1Point1.OverallEfficacy),DictionaryKey=typeof(OverallAssessment).Name },
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -32,6 +32,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<NoneDicomStudy> _noneDicomStudyRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository,
|
||||
IRepository<ReadingNoneDicomMark> _readingNoneDicomMarkRepository,
|
||||
IRepository<UserLog> _userLogRepository,
|
||||
IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository,
|
||||
IRepository<ReadingOncologyTaskInfo> _readingOncologyTaskInfoRepository,
|
||||
|
@ -41,6 +43,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IReadingCalculateService _readingCalculateService,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Subject> _subjectRepository,
|
||||
IRepository<UserFeedBack> _userFeedBackRepository,
|
||||
IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig,
|
||||
IRepository<ReadingGlobalTaskInfo> _readingGlobalTaskInfoRepository,
|
||||
IRepository<ReadingCriterionPage> _readingCriterionPageRepository,
|
||||
|
@ -642,7 +645,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IsCurrentTask = x.Id == inDto.VisitTaskId,
|
||||
IsConvertedTask = x.IsConvertedTask,
|
||||
IsFirstChangeTask = x.BeforeConvertedTaskId != null,
|
||||
|
||||
IsExistUnprocessedFeedback=x.UserFeedBackList.Any(y => y.State == 0),
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
|
@ -3154,6 +3157,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
});
|
||||
}
|
||||
|
||||
var trialInfo = await _trialRepository.Where(x => x.Id == visitTaskInfo.TrialId).FirstNotNullAsync();
|
||||
|
||||
// 如果已经签名 就不需要再读了
|
||||
task.IsNeedReadClinicalData = visitTaskInfo.ReadingTaskState == ReadingTaskState.HaveSigned ? false : task.IsNeedReadClinicalData;
|
||||
|
@ -3166,6 +3170,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode;
|
||||
task.ExistsManual = (await GetManualList(new GetManualListInDto() { TrialId = visitTaskInfo.TrialId })).Count > 0;
|
||||
task.ReadingTaskState = visitTaskInfo.ReadingTaskState;
|
||||
task.IsShowStudyName= trialInfo.IsShowStudyName;
|
||||
task.IsBaseLine = isBaseLine;
|
||||
task.IsExistUnprocessedFeedback = await _userFeedBackRepository.AnyAsync(x => x.VisitTaskId == task.VisitTaskId && x.State == 0);
|
||||
// 添加默认答案
|
||||
if (inDto.VisitTaskId == null && visitTaskInfo.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||
{
|
||||
|
|
|
@ -523,7 +523,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var readModule = await _readModuleRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId && x.TrialReadingCriterionId == taskinfo.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||
|
||||
if (criterion.IsReadingPeriod && !criterion.IsGlobalReading && readModule != null)
|
||||
if (criterion.IsReadingPeriod && readModule != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
@ -32,13 +33,56 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加非Dicom标记
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> AddNoneDicomMark(AddNoneDicomMarkInDto inDto)
|
||||
{
|
||||
var entity = await _readingNoneDicomMarkRepository.InsertOrUpdateAsync(inDto, true);
|
||||
return ResponseOutput.Ok(entity.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取非Dicom标记
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<GetNoneDicomMarkListOutDto> GetNoneDicomMarkListOutDto(GetNoneDicomMarkListInDtoDto inDto)
|
||||
{
|
||||
var result = await _readingNoneDicomMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId)
|
||||
|
||||
.ProjectTo<AddNoneDicomMarkInDto>(_mapper.ConfigurationProvider)
|
||||
.ToListAsync();
|
||||
|
||||
return new GetNoneDicomMarkListOutDto()
|
||||
{
|
||||
NoneDicomMarkList = result
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除非Dicom标记
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("{id:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTrialFileType(Guid id)
|
||||
{
|
||||
var success = await _readingNoneDicomMarkRepository.DeleteFromQueryAsync(t => t.Id == id, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存任务问题
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task<IResponseOutput> SaveVisitTaskQuestions(SubmitVisitTaskQuestionsInDto inDto)
|
||||
{
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
|
@ -85,26 +129,41 @@ namespace IRaCIS.Core.Application.Service
|
|||
visitIds.AddRange(await _subjectVisitRepository.Where(x => x.VisitNum <= task.VisitNum && x.SubjectId == task.SubjectId).Select(x => x.Id).ToListAsync());
|
||||
}
|
||||
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisistTaskId).Select(t => new { t.BlindSubjectCode, t.TrialReadingCriterionId, t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys }).FirstNotNullAsync();
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisistTaskId).Select(t => new { t.BlindSubjectCode, t.ReadingTaskState, t.TrialReadingCriterionId, t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys }).FirstNotNullAsync();
|
||||
|
||||
|
||||
|
||||
IQueryable<NoneDicomStudyView> noneDicomStudyQueryable = default;
|
||||
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.IsReading)
|
||||
.Where(t => visitIds.Contains(t.SubjectVisitId) && t.NoneDicomFileList.Any(t => !t.FileType.Contains(StaticData.FileType.Zip)))
|
||||
.WhereIf(taskinfo.IsImageFilter == true, t => taskinfo.CriterionModalitys.Contains(t.Modality))
|
||||
.ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = true });
|
||||
.ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = true, isReading = true });
|
||||
|
||||
if (inDto.VisistTaskId != null && _noneDicomStudyFileSystem.Any(t => t.VisitTaskId == inDto.VisistTaskId))
|
||||
{
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.TaskNoneDicomFileList.Any(t => t.VisitTaskId == inDto.VisistTaskId))
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.IsReading)
|
||||
.Where(t => t.TaskNoneDicomFileList.Any(t => t.VisitTaskId == inDto.VisistTaskId))
|
||||
.Where(t => taskinfo.IsImageFilter ? ("|" + taskinfo.CriterionModalitys + "|").Contains("|" + t.Modality + "|") : true)
|
||||
.Where(t => visitIds.Contains(t.SubjectVisitId))
|
||||
.ProjectTo<TaskDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = true, visiTaskId = inDto.VisistTaskId });
|
||||
.ProjectTo<TaskDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = true, isReading = true, visiTaskId = inDto.VisistTaskId });
|
||||
}
|
||||
|
||||
List<NoneDicomStudyView> result = await noneDicomStudyQueryable.OrderBy(x => x.ImageDate).ThenBy(x => x.CreateTime).ToListAsync();
|
||||
|
||||
|
||||
var nonoDicomStudyFileIds = await _readingNoneDicomMarkRepository.Where(x => x.VisitTaskId == inDto.VisistTaskId).ToListAsync();
|
||||
if (nonoDicomStudyFileIds.Count > 0 && taskinfo.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
var studyId = nonoDicomStudyFileIds.Select(x => x.StudyId).FirstOrDefault();
|
||||
|
||||
var noneDicomids = nonoDicomStudyFileIds.Select(x => x.NoneDicomFileId).ToList();
|
||||
var noneDicomStudyViewMark = new NoneDicomStudyView() { Id = Guid.NewGuid() };
|
||||
noneDicomStudyViewMark.IsCriticalSequence = true;
|
||||
noneDicomStudyViewMark.NoneDicomStudyFileList = await _noneDicomStudyFileRepository.Where(x => noneDicomids.Contains(x.Id)).ProjectTo<NoneDicomStudyFileView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
result.Insert(0, noneDicomStudyViewMark);
|
||||
}
|
||||
|
||||
List<NoneDicomStudyView> result = await noneDicomStudyQueryable.OrderBy(x=>x.ImageDate).ThenBy(x=>x.CreateTime).ToListAsync();
|
||||
|
||||
|
||||
var trialInfo = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => new
|
||||
|
|
|
@ -232,6 +232,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
x.ReadingCategory == ReadingCategory.Oncology
|
||||
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||
&& x.TaskState == TaskState.Effect
|
||||
&&x.SubjectId == taskInfo.SubjectId
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned
|
||||
&& x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||
&& x.VisitTaskNum < taskInfo.VisitTaskNum
|
||||
|
|
|
@ -65,6 +65,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<TrialClinicalTableQuestion, ClinicalTablePreviewDto>();
|
||||
#endregion
|
||||
CreateMap<TableMarkInfo, ReadingTaskQuestionMark>();
|
||||
CreateMap<AddNoneDicomMarkInDto, ReadingNoneDicomMark>();
|
||||
CreateMap<ReadingNoneDicomMark, AddNoneDicomMarkInDto>();
|
||||
CreateMap<ReadingTaskQuestionMark, TableMarkInfo>();
|
||||
CreateMap<VisitTask, VisitTaskDto>();
|
||||
CreateMap<SaveTableQuestionMarkInDto, ReadingTaskQuestionMark>();
|
||||
|
|
|
@ -925,7 +925,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
//generateUser.UserName = generateUser.UserCode;
|
||||
|
||||
|
||||
generateUser.UserCeateSource = UserCeateSource.SiteSruvey;
|
||||
generateUser.TrialId = trialId;
|
||||
generateUser.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10));
|
||||
|
||||
generateUser.Status = UserStateEnum.Enable;
|
||||
|
@ -1168,6 +1169,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
//generateUser.UserName = generateUser.UserCode;
|
||||
|
||||
generateUser.UserCeateSource = UserCeateSource.SiteSruvey;
|
||||
generateUser.TrialId = trialId;
|
||||
generateUser.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10));
|
||||
|
||||
generateUser.Status = UserStateEnum.Enable;
|
||||
|
|
|
@ -235,7 +235,12 @@ namespace IRaCIS.Application.Contracts
|
|||
public int Status { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateTrialStudyNameListInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public List<StudyName> StudyNameList { get; set; } = new List<StudyName>();
|
||||
}
|
||||
public class TrialExtraConfig
|
||||
{
|
||||
#region QC 影像下载
|
||||
|
|
|
@ -103,6 +103,49 @@ namespace IRaCIS.Application.Contracts
|
|||
public string FullName { get; set; }
|
||||
}
|
||||
|
||||
public class IdentityUserJoinedTrialQuery : PageInput
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid IdentityUserId { get; set; }
|
||||
public string? TrialCode { get; set; }
|
||||
|
||||
public string? ResearchProgramNo { get; set; }
|
||||
|
||||
public string? ExperimentName { get; set; }
|
||||
|
||||
public Guid? UserTypeId { get; set; }
|
||||
|
||||
public bool? IsDeleted { get; set; }
|
||||
}
|
||||
|
||||
public class IdentityUserJoinedTrialView
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
public string TrialCode { get; set; }
|
||||
|
||||
public string ResearchProgramNo { get; set; }
|
||||
|
||||
public string ExperimentName { get; set; }
|
||||
|
||||
public string TrialStatusStr { get; set; }
|
||||
|
||||
public DateTime TrialCreateTime { get; set; }
|
||||
|
||||
public List<UserTypeSelectDto> TrialUserRoleList { get; set; }
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
public DateTime? RemoveTime { get; set; }
|
||||
|
||||
public DateTime? JoinTime { get; set; }
|
||||
|
||||
|
||||
public string Roles => string.Join(',', TrialUserRoleList.Select(t => t.UserTypeShortName));
|
||||
public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||
public string RemoveTimeStr => RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||
|
||||
}
|
||||
|
||||
public class TrialMaintenanceDTO : UserTrialCommand
|
||||
{
|
||||
|
||||
|
@ -110,7 +153,7 @@ namespace IRaCIS.Application.Contracts
|
|||
public bool IsDeleted { get; set; }
|
||||
|
||||
[DictionaryTranslateAttribute("IsSiteDisable")]
|
||||
|
||||
|
||||
public bool RoleIsDeleted { get; set; }
|
||||
|
||||
public DateTime? DeletedTime { get; set; }
|
||||
|
@ -484,7 +527,7 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public bool? IsUserRoleDisabled { get; set; }
|
||||
|
||||
public string? EMail { get; set; }
|
||||
public string? EMail { get; set; }
|
||||
}
|
||||
|
||||
public class TrialUserScreeningDTO : TrialUserAddCommand
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace IRaCIS.Core.Application.Interfaces
|
|||
Task<IResponseOutput> DeleteSiteCRC(Guid id, bool isDelete);
|
||||
Task<IResponseOutput> DeleteTrialSite(Guid id);
|
||||
Task<PageOutput<SiteStatDTO>> GetSiteCRCList(SiteCrcQueryDTO param);
|
||||
Task<PageOutput<SiteStatSimpleDTO>> GetSiteCRCSimpleList(SiteCrcQueryDTO param);
|
||||
Task<(PageOutput<SiteStatSimpleDTO>,object)> GetSiteCRCSimpleList(SiteCrcQueryDTO param);
|
||||
Task<PageOutput<TrialSiteScreeningDTO>> GetTrialSiteScreeningList(TrialSiteQuery trialSiteQuery);
|
||||
Task<IEnumerable<TrialSiteForSelect>> GetTrialSiteSelect(Guid trialId);
|
||||
}
|
||||
|
|
|
@ -778,7 +778,9 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
|
||||
|
||||
var newQuery = _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
var newQuery = _trialReadingCriterionRepository
|
||||
.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.IsSigned && t.IsConfirm && t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Select(c => new IRImageReadingToBeDoneDto()
|
||||
{
|
||||
TrialId = c.TrialId,
|
||||
|
@ -1117,7 +1119,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
var isInternal = _userInfo.IsZhiZhun;
|
||||
|
||||
var needSignTrialCount = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped)
|
||||
var needSignTrialCount = await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)
|
||||
&& !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null)).Count() > 0).CountAsync();
|
||||
|
@ -1197,16 +1199,16 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
PM_SiteSurveryCount = isPM ? siteSurveyCount : 0,
|
||||
|
||||
PM_CheckCount = isPM ? await _trialRepository
|
||||
PM_CheckCount = isPM ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(u => u.SubjectVisitList.Any(t => t.CheckState == CheckStateEnum.ToCheck || (t.CheckState == CheckStateEnum.CVIng &&
|
||||
t.CheckChallengeDialogList.OrderByDescending(t => t.CreateTime).First().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))).CountAsync() : 0,
|
||||
|
||||
PM_ReviewerSelectCount = isPM ? await _trialRepository
|
||||
PM_ReviewerSelectCount = isPM ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.InviteIntoGroup).Count() > 0).CountAsync() : 0,
|
||||
|
||||
PM_ReReadingApprovalCount = isPM ? await _visitTaskReReadingRepository
|
||||
PM_ReReadingApprovalCount = isPM ? await _visitTaskReReadingRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed)
|
||||
.GroupBy(t => t.OriginalReReadingTask.TrialId)
|
||||
|
@ -1217,7 +1219,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
}).Where(x => x.ToBeApprovalCount > 0).CountAsync() : 0,
|
||||
|
||||
PM_ClinicalDataCount = isPM ? await _trialRepository
|
||||
PM_ClinicalDataCount = isPM ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.ReadModuleList.Where(u => u.IsCRCConfirm && !u.IsPMConfirm).Count() > 0).CountAsync() : 0,
|
||||
|
||||
|
@ -1225,34 +1227,34 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
#region CRC
|
||||
|
||||
CRC_ImageSubmitCount = isCRC ? await _trialRepository
|
||||
CRC_ImageSubmitCount = isCRC ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView))
|
||||
.Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)).Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count() > 0).CountAsync() : 0,
|
||||
|
||||
|
||||
CRC_ImageQuestionCount = isCRC ? await _trialRepository
|
||||
CRC_ImageQuestionCount = isCRC ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId)).SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.IsClosed == false && (u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC || u.LatestReplyUserId == null)).Count() > 0).CountAsync() : 0,
|
||||
|
||||
|
||||
|
||||
CRC_CheckQuestionCount = isCRC ? await _trialRepository
|
||||
CRC_CheckQuestionCount = isCRC ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count() > 0).CountAsync() : 0,
|
||||
|
||||
CRC_ImageReUploadCount = isCRC ? await _trialRepository
|
||||
CRC_ImageReUploadCount = isCRC ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.SubjectVisitList
|
||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.UserRoleId))
|
||||
.Where(u => (u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading) || (u.IsQCConfirmedReupload)).Count() > 0).CountAsync() : 0,
|
||||
|
||||
CRC_ClinicalDataTobeDoneCount = isCRC ? await _trialRepository
|
||||
CRC_ClinicalDataTobeDoneCount = isCRC ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.ReadingClinicalDataList.Where(x => !x.IsSign && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC).Count() > 0).CountAsync() : 0,
|
||||
|
||||
CRC_ClinialDataTobeConfirmCount = isCRC ? await _trialRepository
|
||||
CRC_ClinialDataTobeConfirmCount = isCRC ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.ReadModuleList.Where(x => !x.IsCRCConfirm).Count() > 0).CountAsync() : 0,
|
||||
|
||||
|
@ -1266,11 +1268,11 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
SPM_SiteSurveryCount = isSPMOrCPM ? siteSurveyCount : 0,
|
||||
|
||||
SPM_ReviewerApprovalCount = isSPMOrCPM ? await _trialRepository
|
||||
SPM_ReviewerApprovalCount = isSPMOrCPM ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).Count() > 0).CountAsync() : 0,
|
||||
|
||||
SPM_ReReadingApprovalCount = isSPMOrCPM ? await _visitTaskReReadingRepository
|
||||
SPM_ReReadingApprovalCount = isSPMOrCPM ? await _visitTaskReReadingRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.OriginalReReadingTask.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed)
|
||||
.GroupBy(t => t.OriginalReReadingTask.TrialId)
|
||||
|
@ -1287,7 +1289,7 @@ namespace IRaCIS.Core.Application
|
|||
#region IQC
|
||||
|
||||
|
||||
IQC_IamgeQCCount = isIQC ? await _trialRepository
|
||||
IQC_IamgeQCCount = isIQC ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit)
|
||||
.Select(t => new
|
||||
|
@ -1301,7 +1303,7 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
}).Where(x => x.ToBeClaimedCount + x.ToBeReviewedCount > 0).CountAsync() : 0,
|
||||
|
||||
IQC_QCQuestionCount = isIQC ? await _trialRepository
|
||||
IQC_QCQuestionCount = isIQC ? await _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.SubjectVisitList.SelectMany(c => c.QCChallengeList)
|
||||
.Where(u => u.CreateUserId == _userInfo.UserRoleId && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count() > 0).CountAsync() : 0,
|
||||
|
@ -1326,7 +1328,9 @@ namespace IRaCIS.Core.Application
|
|||
// .Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)).Count()>0).CountAsync() : 0,
|
||||
|
||||
|
||||
await _trialReadingCriterionRepository.Where(t => t.IsSigned == true && t.IsConfirm == true && t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
await _trialReadingCriterionRepository
|
||||
.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.IsSigned == true && t.IsConfirm == true && t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(c => c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.UserRoleId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
||||
// 前序 不存在 未一致性核查未通过的
|
||||
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
|
||||
|
@ -1339,7 +1343,9 @@ namespace IRaCIS.Core.Application
|
|||
: 0,
|
||||
|
||||
|
||||
IR_MedicalReviewCount = isIR ? await _taskMedicalReviewRepository.Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
IR_MedicalReviewCount = isIR ? await _taskMedicalReviewRepository
|
||||
.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.VisitTask.DoctorUserId == _userInfo.UserRoleId)
|
||||
.GroupBy(t => new { t.TrialId, t.VisitTask.TrialReadingCriterionId })
|
||||
.Where(g => g.Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.MIM && u.AuditState == MedicalReviewAuditState.Auditing).Count() > 0).CountAsync() : 0,
|
||||
|
@ -1350,7 +1356,8 @@ namespace IRaCIS.Core.Application
|
|||
#region MIM
|
||||
|
||||
MIM_MedicalReviewCount = isMIM ? await _taskMedicalReviewRepository
|
||||
.Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
.Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.UserRoleId)
|
||||
.GroupBy(t => new { t.TrialId, t.VisitTask.TrialReadingCriterionId })
|
||||
.Select(g => new
|
||||
|
@ -1384,8 +1391,7 @@ namespace IRaCIS.Core.Application
|
|||
var isIR = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer;
|
||||
|
||||
|
||||
var query = _trialRepository.AsQueryable().IgnoreQueryFilters()
|
||||
|
||||
var query = _trialRepository.AsQueryable().IgnoreQueryFilters()
|
||||
.WhereIf(inQuery.SponsorId != null, o => o.SponsorId == inQuery.SponsorId)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo))
|
||||
|
|
|
@ -1384,5 +1384,32 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
return new TrialPacsInfo() { Ip = optionsMonitor.CurrentValue.IP, Port = optionsMonitor.CurrentValue.Port, TrialCalledAE = $"EI{trialCode}" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改项目的StudyNameList
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> UpdateTrialStudyNameList(UpdateTrialStudyNameListInDto inDto)
|
||||
{
|
||||
|
||||
|
||||
var trial = await _trialRepository.FirstOrDefaultAsync(x => x.Id == inDto.TrialId);
|
||||
|
||||
trial.StudyNameList = trial.StudyNameList.Where(x => x.IsChoose).ToList();
|
||||
inDto.StudyNameList.ForEach(x =>
|
||||
{
|
||||
if (trial.StudyNameList.Any(y => y.Name == x.Name && y.EnName == x.EnName))
|
||||
{
|
||||
x.IsChoose = true;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
trial.StudyNameList = inDto.StudyNameList;
|
||||
await _trialRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -280,7 +280,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
//generateUser.UserName = generateUser.UserCode;
|
||||
|
||||
|
||||
generateUser.UserCeateSource = UserCeateSource.External;
|
||||
generateUser.TrialId = trialId;
|
||||
generateUser.Password = MD5Helper.Md5(IRCEmailPasswordHelper.GenerateRandomPassword(10));
|
||||
|
||||
generateUser.Status = UserStateEnum.Enable;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using FellowOakDicom;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
|
@ -15,6 +16,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class TrialMaintenanceService(IRepository<TrialUserRole> _trialUseRoleRepository, IRepository<TrialIdentityUser> _trialIdentityUserRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<IdentityUser> _identityUserRepository,
|
||||
IRepository<TrialSiteUserRole> _trialSiteUserRoleRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Trial> _trialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialMaintenanceService
|
||||
|
@ -28,6 +30,44 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ToListAsync();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput<PageOutput<IdentityUserJoinedTrialView>>> GetUserJoinedTrialList(IdentityUserJoinedTrialQuery inQuery)
|
||||
{
|
||||
var list = await _trialIdentityUserRepository.Where(t => t.IdentityUserId == inQuery.IdentityUserId, false, true)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialCode), o => o.Trial.TrialCode.Contains(inQuery.TrialCode))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.Trial.ResearchProgramNo.Contains(inQuery.ResearchProgramNo))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.Trial.ExperimentName.Contains(inQuery.ExperimentName))
|
||||
.WhereIf(inQuery.UserTypeId != null, o => o.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == inQuery.UserTypeId))
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted)
|
||||
.Select(t => new IdentityUserJoinedTrialView()
|
||||
{
|
||||
TrialId = t.TrialId,
|
||||
TrialCode = t.Trial.TrialCode,
|
||||
TrialCreateTime = t.Trial.CreateTime,
|
||||
ExperimentName = t.Trial.ExperimentName,
|
||||
ResearchProgramNo = t.Trial.ResearchProgramNo,
|
||||
TrialStatusStr = t.Trial.TrialStatusStr,
|
||||
|
||||
IsDeleted = t.IsDeleted,
|
||||
JoinTime = t.JoinTime,
|
||||
RemoveTime = t.RemoveTime,
|
||||
TrialUserRoleList = t.TrialUserRoleList.Select(t => new UserTypeSelectDto()
|
||||
{
|
||||
IsDeleted = t.IsDeleted,
|
||||
UserTypeId = t.UserRole.UserTypeRole.Id,
|
||||
UserTypeShortName = t.UserRole.UserTypeRole.UserTypeShortName,
|
||||
CreateTime=t.CreateTime,
|
||||
UpdateTime=t.UpdateTime,
|
||||
}).ToList(),
|
||||
|
||||
}).ToPagedListAsync(inQuery);
|
||||
|
||||
var info = await _identityUserRepository.Where(t => t.Id == inQuery.IdentityUserId).Select(t =>
|
||||
new { t.CreateTime, t.UserCeateSource, t.Trial.ResearchProgramNo, t.Trial.ExperimentName, t.Trial.TrialCode }).FirstOrDefaultAsync();
|
||||
|
||||
return ResponseOutput.Ok(list, info);
|
||||
}
|
||||
|
||||
#region 多账户调整已修改
|
||||
/// <summary>
|
||||
/// Setting页面 获取项目参与人员列表
|
||||
|
|
|
@ -6,9 +6,11 @@ using IRaCIS.Core.Application.Helper;
|
|||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Options;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using ZiggyCreatures.Caching.Fusion;
|
||||
|
||||
|
@ -104,9 +106,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<List<TrialSelectDTO>> GetTrialSelect()
|
||||
{
|
||||
return await _trialRepository.AsQueryable()
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP,
|
||||
t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)) && t.IsDeleted == false)
|
||||
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP,
|
||||
t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)) && t.IsDeleted == false)
|
||||
.Where(t=>t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))
|
||||
&& (t.TrialStatusStr != StaticData.TrialState.TrialStopped || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager))
|
||||
.ProjectTo<TrialSelectDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
|
@ -467,6 +470,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
#region 真项目删除
|
||||
await _repository.BatchDeleteNoTrackingAsync<TrialIdentityUser>(o => o.TrialId == trialId);
|
||||
await _repository.BatchDeleteNoTrackingAsync<CheckChallengeDialog>(o => o.SubjectVisit.TrialId == trialId);
|
||||
await _repository.BatchDeleteNoTrackingAsync<ClinicalDataTrialSet>(o => o.TrialId == trialId);
|
||||
await _repository.BatchDeleteNoTrackingAsync<InspectionFile>(o => o.TrialId == trialId);
|
||||
|
|
|
@ -101,9 +101,10 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
/// <summary>[new] setting页面Site列表,和getSiteCRCList对比 没有统计数据,增加了一些site信息 </summary>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<SiteStatSimpleDTO>> GetSiteCRCSimpleList(SiteCrcQueryDTO inQuery)
|
||||
public async Task<(PageOutput<SiteStatSimpleDTO>,object)> GetSiteCRCSimpleList(SiteCrcQueryDTO inQuery)
|
||||
{
|
||||
|
||||
var trialinfo = await _trialRepository.Where(x => x.Id == inQuery.TrialId).FirstNotNullAsync();
|
||||
var siteStatQuery = _trialSiteRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters()
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.SiteName), t => t.TrialSiteName.Contains(inQuery.SiteName) || t.TrialSiteAliasName.Contains(inQuery.TrialSiteAliasName))
|
||||
|
@ -118,7 +119,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var result = await siteStatQuery.ToPagedListAsync(inQuery);
|
||||
|
||||
return result;
|
||||
return (result,new {
|
||||
IsPACSConnectAndIsTrialPACSConfirmed = trialinfo.IsPACSConnect&&trialinfo.IsTrialPACSConfirmed,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -147,7 +150,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
var list = _siteRepository
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(siteName), t => t.SiteName.Contains(siteName) || t.SiteNameCN.Contains(siteName) || t.AliasName.Contains(siteName))
|
||||
.Select(t => new TrialSiteSelect() { SiteId = t.Id, SiteName = _userInfo.IsEn_Us ? t.SiteName : t.SiteNameCN, AliasName = t.AliasName }).ToList();
|
||||
.Select(t => new TrialSiteSelect() { SiteId = t.Id, SiteName = _userInfo.IsEn_Us ? t.SiteName : t.SiteNameCN, AliasName = t.AliasName })
|
||||
.OrderBy(x=>x.SiteName)
|
||||
.ToList();
|
||||
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -270,6 +270,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public bool IsDicom { get; set; } = true;
|
||||
|
||||
public string StudyName { get; set; } = string.Empty;
|
||||
|
||||
public List<DicomSeriesDTO> SeriesList { get; set; } = new List<DicomSeriesDTO>();
|
||||
}
|
||||
|
||||
|
|
|
@ -231,8 +231,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
|
||||
|
||||
var studyList = await _dicomStudyRepository.Where(t => t.TrialId == trialId && t.SubjectVisitId == sujectVisitId)
|
||||
var studyList = await _dicomStudyRepository.Where(t => t.TrialId == trialId && t.SubjectVisitId == sujectVisitId).IgnoreQueryFilters()
|
||||
.Where(t => isImageFilter ? ("|" + criterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|") : true)
|
||||
.WhereIf(isReading == 1 || isQCFinished, s=> s.IsDeleted == false)
|
||||
.Select(k => new VisitStudyDTO()
|
||||
{
|
||||
InstanceCount = k.InstanceCount,
|
||||
|
@ -241,6 +242,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
StudyCode = k.StudyCode,
|
||||
StudyId = k.Id
|
||||
}).ToListAsync();
|
||||
|
||||
var studyIds = studyList.Select(t => t.StudyId).ToList();
|
||||
|
||||
var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId)).IgnoreQueryFilters()
|
||||
|
@ -504,6 +506,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
.Select(k => new VisitStudyDTO()
|
||||
{
|
||||
InstanceCount = k.InstanceCount,
|
||||
StudyName=k.StudyName,
|
||||
Modalities = k.Modalities,
|
||||
//SeriesCount = k.SeriesCount,
|
||||
StudyCode = k.StudyCode,
|
||||
|
@ -682,13 +685,15 @@ namespace IRaCIS.Core.Application.Services
|
|||
#region 非Dicom 检查查询
|
||||
|
||||
var noDicomList = await _noneDicomStudyRepository.Where(x => x.TrialId == indto.TrialId && x.SubjectVisitId == indto.SujectVisitId && x.NoneDicomFileList.Any(t => !t.FileType.Contains(StaticData.FileType.Zip)))
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => taskInfo.CriterionModalitys.Contains(t.Modality)).ToListAsync();
|
||||
.Where(t => t.IsReading)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => taskInfo.CriterionModalitys.Contains(t.Modality)).ToListAsync();
|
||||
|
||||
|
||||
List<VisitStudyDTO> noDicomStudyList = noDicomList.Select(x => new VisitStudyDTO()
|
||||
{
|
||||
InstanceCount = x.FileCount,
|
||||
StudyId = x.Id,
|
||||
StudyName = x.StudyName,
|
||||
Modalities = x.Modality,
|
||||
//SeriesCount = 1,
|
||||
StudyCode = x.StudyCode,
|
||||
|
@ -702,7 +707,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
{
|
||||
var nodicom = noDicomList.Where(x => x.Id == item.StudyId).First();
|
||||
|
||||
var instanceCount = await _noneDicomStudyFileRepository.WhereIf(isExistTaskNoneDicomFile, x => x.OriginNoneDicomStudyId == item.StudyId)
|
||||
var instanceCount = await _noneDicomStudyFileRepository.Where(t=>t.IsReading)
|
||||
.WhereIf(isExistTaskNoneDicomFile, x => x.OriginNoneDicomStudyId == item.StudyId)
|
||||
.WhereIf(isExistTaskNoneDicomFile == false, x => x.NoneDicomStudyId == item.StudyId).CountAsync();
|
||||
|
||||
if (instanceCount == 0)
|
||||
|
|
|
@ -27,6 +27,7 @@ using MiniExcelLibs;
|
|||
using NPOI.SS.Formula.Functions;
|
||||
using NPOI.XWPF.UserModel;
|
||||
using System.Globalization;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
@ -154,213 +155,110 @@ namespace IRaCIS.Core.Application.Service
|
|||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目退出历史数据维护
|
||||
/// </summary>
|
||||
/// <param name="_trialIdentityUserRepository"></param>
|
||||
/// <param name="_trialUserRoleReposiotry"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
[AllowAnonymous]
|
||||
public async Task<IResponseOutput> OldTrialDeleteUser([FromServices] IRepository<TrialIdentityUser> _trialIdentityUserRepository, [FromServices] IRepository<TrialUserRole> _trialUserRoleReposiotry)
|
||||
public async Task<IResponseOutput> UserCreateSourceDeal([FromServices] IRepository<IdentityUser> _identityUserRepository,
|
||||
[FromServices] IRepository<TrialUserRole> _trialUserRoleRepository)
|
||||
{
|
||||
_userInfo.IsNotNeedInspection = true;
|
||||
|
||||
|
||||
if (_trialUserRoleReposiotry.Any(t => t.TrialUserId == Guid.Empty))
|
||||
{
|
||||
var list = _trialUserRoleReposiotry.Where(t => t.IsDeleted == true && t.TrialUserId == Guid.Empty, false, true).Select(t => new { t.TrialId, t.UserRole.IdentityUserId, t.UserId, t.JoinTime, t.RemoveTime, t.DeletedTime, t.DeleteUserId, t.CreateUserId }).ToList();
|
||||
|
||||
|
||||
foreach (var item in list.GroupBy(t => new { t.IdentityUserId, t.TrialId }))
|
||||
{
|
||||
|
||||
var id = NewId.NextSequentialGuid();
|
||||
|
||||
var userRoleList = item.ToList();
|
||||
|
||||
var userIdList = item.Select(t => t.UserId).ToList();
|
||||
|
||||
var first = userRoleList.OrderByDescending(t => t.RemoveTime).FirstOrDefault();
|
||||
|
||||
|
||||
//判断在项目中是否存在
|
||||
|
||||
var find = _trialIdentityUserRepository.Where(t => t.IdentityUserId == first.IdentityUserId && t.TrialId == first.TrialId).FirstOrDefault();
|
||||
|
||||
if (find == null)
|
||||
{
|
||||
await _trialIdentityUserRepository.AddAsync(new TrialIdentityUser()
|
||||
{
|
||||
Id = id,
|
||||
IdentityUserId = item.Key.IdentityUserId,
|
||||
TrialId = item.Key.TrialId,
|
||||
RemoveTime = first.RemoveTime,
|
||||
IsDeleted = true,
|
||||
DeletedTime = first.DeletedTime,
|
||||
DeleteUserId = first.DeleteUserId,
|
||||
|
||||
});
|
||||
|
||||
|
||||
await _trialUserRoleReposiotry.BatchUpdateNoTrackingAsync(t => t.TrialId == item.Key.TrialId && userIdList.Contains(t.UserId), u => new TrialUserRole() { TrialUserId = id, UpdateTime = (DateTime)first.DeletedTime });
|
||||
}
|
||||
else
|
||||
{
|
||||
await _trialUserRoleReposiotry.BatchUpdateNoTrackingAsync(t => t.TrialId == item.Key.TrialId && userIdList.Contains(t.UserId), u => new TrialUserRole() { TrialUserId = find.Id, UpdateTime = (DateTime)first.DeletedTime });
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
await _trialIdentityUserRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户多账号,初次维护数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public async Task<IResponseOutput> UserMutiAccount([FromServices] IRepository<IdentityUser> _identityUserRepository, [FromServices] IRepository<UserPassWordLog> _userPasswordLogRepository)
|
||||
{
|
||||
|
||||
if ((await _identityUserRepository.FirstOrDefaultAsync()) == null)
|
||||
{
|
||||
var userList = _userRoleRepository.Where().ToList();
|
||||
|
||||
foreach (var item in userList.GroupBy(t => t.EMail.Trim().ToLower()))
|
||||
{
|
||||
var emailUserIdList = item.Select(t => t.Id).ToList();
|
||||
|
||||
var identityUserId = NewId.NextSequentialGuid();
|
||||
|
||||
var selectUser = item.OrderByDescending(t => t.Status).ThenBy(t=>t.CreateTime).FirstOrDefault();
|
||||
|
||||
var identityUser = _mapper.Map<IdentityUser>(selectUser);
|
||||
|
||||
if (identityUser.IsFirstAdd)
|
||||
{
|
||||
identityUser.UserName = "";
|
||||
}
|
||||
|
||||
identityUser.Id = identityUserId;
|
||||
|
||||
await _identityUserRepository.AddAsync(identityUser);
|
||||
|
||||
await _userRoleRepository.BatchUpdateNoTrackingAsync(t => emailUserIdList.Contains(t.Id), u => new UserRole() { IdentityUserId = identityUserId });
|
||||
|
||||
if (emailUserIdList.Count == 1)
|
||||
{
|
||||
var userRoleId = emailUserIdList.First();
|
||||
|
||||
await _userPasswordLogRepository.BatchUpdateNoTrackingAsync(t => t.UserId == userRoleId, u => new UserPassWordLog() { IdentityUserId = identityUserId });
|
||||
}
|
||||
}
|
||||
|
||||
await _identityUserRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
// UPDATE[User]
|
||||
//SET
|
||||
// UserName = IdentityUser.UserName,
|
||||
// FirstName = IdentityUser.FirstName,
|
||||
//LastName = IdentityUser.LastName,
|
||||
// EMail = IdentityUser.EMail
|
||||
//FROM[User]
|
||||
//INNER JOIN IdentityUser
|
||||
//ON[User].IdentityUserId = IdentityUser.Id
|
||||
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目用户 维护数据
|
||||
/// </summary>
|
||||
/// <param name="_trialIdentityUserRepository"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public async Task<IResponseOutput> UserTrialUser([FromServices] IRepository<TrialIdentityUser> _trialIdentityUserRepository, [FromServices] IRepository<TrialUserRole> _trialUserRoleReposiotry)
|
||||
{
|
||||
_userInfo.IsNotNeedInspection = true;
|
||||
|
||||
|
||||
if ((await _trialIdentityUserRepository.FirstOrDefaultAsync()) == null)
|
||||
{
|
||||
var list = _trialUserRoleReposiotry.Where().Select(t => new { t.TrialId, t.UserRole.IdentityUserId, t.UserId, t.JoinTime, t.RemoveTime }).ToList();
|
||||
|
||||
|
||||
foreach (var item in list.GroupBy(t => new { t.IdentityUserId, t.TrialId }))
|
||||
{
|
||||
|
||||
var id = NewId.NextSequentialGuid();
|
||||
|
||||
var userRoleList = item.ToList();
|
||||
|
||||
var userIdList = item.Select(t => t.UserId).ToList();
|
||||
|
||||
var first = userRoleList.First();
|
||||
|
||||
var haveJoin = userRoleList.Any(t => t.JoinTime != null);
|
||||
|
||||
if (haveJoin)
|
||||
{
|
||||
await _trialIdentityUserRepository.AddAsync(new TrialIdentityUser() { Id = id, IdentityUserId = item.Key.IdentityUserId, TrialId = item.Key.TrialId, JoinTime = userRoleList.Min(t => t.JoinTime) });
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
await _trialIdentityUserRepository.AddAsync(new TrialIdentityUser() { Id = id, IdentityUserId = item.Key.IdentityUserId, TrialId = item.Key.TrialId, RemoveTime = userRoleList.Max(t => t.RemoveTime) });
|
||||
}
|
||||
|
||||
await _trialUserRoleReposiotry.BatchUpdateNoTrackingAsync(t => t.TrialId == item.Key.TrialId && userIdList.Contains(t.UserId), u => new TrialUserRole() { TrialUserId = id });
|
||||
|
||||
}
|
||||
|
||||
await _trialIdentityUserRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 外部人员 中心调研人员维护
|
||||
/// </summary>
|
||||
/// <param name="_trialIdentityUserRepository"></param>
|
||||
/// <param name="_trialUserRoleReposiotry"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> ExternalTrialUser(
|
||||
[FromServices] IRepository<TrialSiteUserSurvey> _trialSiteUserSurveyRepository,
|
||||
[FromServices] IRepository<TrialExternalUser> _trialExternalUserReposiotry,
|
||||
[FromServices] IRepository<UserRole> _userRoleRepository)
|
||||
{
|
||||
var list = _userRoleRepository.Select(t => new { t.Id, t.IdentityUserId }).ToList();
|
||||
var list = _userRoleRepository.Where().IgnoreQueryFilters().ToList();
|
||||
|
||||
foreach (var item in list.GroupBy(t => t.IdentityUserId))
|
||||
{
|
||||
var userRoleIdList = item.Select(t => t.Id).ToList();
|
||||
var userRoleList = item.OrderBy(t => t.CreateTime).ToList();
|
||||
|
||||
var identityUserId = item.Key;
|
||||
foreach (var userRole in userRoleList)
|
||||
{
|
||||
var isTrue = userRole.UserTypeEnum == UserTypeEnum.SystemAdmin || userRole.UserTypeEnum == UserTypeEnum.OP || userRole.UserTypeEnum == UserTypeEnum.Dashboard;
|
||||
|
||||
await _trialSiteUserSurveyRepository.BatchUpdateNoTrackingAsync(t => userRoleIdList.Contains(t.SystemUserId.Value), u => new TrialSiteUserSurvey() { SystemUserId = identityUserId });
|
||||
if (isTrue)
|
||||
{
|
||||
await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == userRole.Id, t => new UserRole() { IsUserRoleDisabled = true });
|
||||
}
|
||||
}
|
||||
|
||||
await _trialExternalUserReposiotry.BatchUpdateNoTrackingAsync(t => userRoleIdList.Contains(t.SystemUserId), u => new TrialExternalUser() { SystemUserId = identityUserId });
|
||||
var firstCreateRole = userRoleList.FirstOrDefault();
|
||||
|
||||
var firstTrialId = _trialUserRoleRepository.Where(t => t.TrialUser.IdentityUserId == firstCreateRole.IdentityUserId).IgnoreQueryFilters().OrderBy(t => t.CreateTime).Select(t => t.TrialId).FirstOrDefault();
|
||||
|
||||
|
||||
if (firstCreateRole.UserTypeEnum == UserTypeEnum.IndependentReviewer)
|
||||
{
|
||||
await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == firstCreateRole.IdentityUserId, u => new Domain.Models.IdentityUser() { UserCeateSource = UserCeateSource.ReviewerSelect, TrialId = firstTrialId });
|
||||
}
|
||||
else if (firstCreateRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || firstCreateRole.UserTypeEnum == UserTypeEnum.CRA)
|
||||
{
|
||||
await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == firstCreateRole.IdentityUserId, u => new Domain.Models.IdentityUser() { UserCeateSource = UserCeateSource.AdminCreate, TrialId = firstTrialId });
|
||||
}
|
||||
else if (firstCreateRole.UserTypeEnum == UserTypeEnum.SPM || firstCreateRole.UserTypeEnum == UserTypeEnum.CPM ||
|
||||
firstCreateRole.UserTypeEnum == UserTypeEnum.SMM || firstCreateRole.UserTypeEnum == UserTypeEnum.CMM ||
|
||||
firstCreateRole.UserTypeEnum == UserTypeEnum.EA || firstCreateRole.UserTypeEnum == UserTypeEnum.MC)
|
||||
{
|
||||
await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == firstCreateRole.IdentityUserId, u => new Domain.Models.IdentityUser() { UserCeateSource = UserCeateSource.AdminCreate, TrialId = firstTrialId });
|
||||
}
|
||||
else
|
||||
{
|
||||
await _identityUserRepository.BatchUpdateNoTrackingAsync(t => t.Id == firstCreateRole.IdentityUserId, u => new Domain.Models.IdentityUser() { UserCeateSource = UserCeateSource.AdminCreate, TrialId = firstTrialId });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 非dicom 临床数据
|
||||
/// </summary>
|
||||
/// <param name="_identityUserRepository"></param>
|
||||
/// <param name="_trialUserRoleRepository"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public async Task<IResponseOutput> DealTialFileSie([FromServices] IOSSService _oSSService,
|
||||
[FromServices] IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository,
|
||||
[FromServices] IRepository<ReadingClinicalDataPDF> _readingClinicalDataPDFRepository)
|
||||
{
|
||||
var noneDicomList = _noneDicomStudyFileRepository.Where(t => t.FileSize == 0 || t.FileSize == null).Select(t => new { t.Path, t.Id }).ToList();
|
||||
|
||||
var clinicalDataPDFList = _readingClinicalDataPDFRepository.Where(t => t.Size == 0).Select(t => new { t.Path, t.Id }).ToList();
|
||||
|
||||
|
||||
foreach (var item in noneDicomList)
|
||||
{
|
||||
try
|
||||
{
|
||||
var fileSize = await _oSSService.GetObjectSizeAsync(item.Path);
|
||||
await _noneDicomStudyFileRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new NoneDicomStudyFile() { FileSize = fileSize });
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach (var item in clinicalDataPDFList)
|
||||
{
|
||||
try
|
||||
{
|
||||
var fileSize = await _oSSService.GetObjectSizeAsync(item.Path);
|
||||
|
||||
await _readingClinicalDataPDFRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new ReadingClinicalDataPDF() { Size = (int)fileSize });
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
[LowerCamelCaseJson]
|
||||
public class TestModel
|
||||
|
|
|
@ -62,6 +62,9 @@
|
|||
|
||||
OP=31,
|
||||
|
||||
//仅仅管理后端部分数据,现在不用
|
||||
SystemAdmin=32,
|
||||
|
||||
//医生用户类型暂不处理
|
||||
|
||||
ShareImage = 125,
|
||||
|
|
|
@ -3,7 +3,7 @@ namespace IRaCIS.Core.Domain.Models;
|
|||
|
||||
[Comment("医生 - 简历|证书 文档表")]
|
||||
[Table("Attachment")]
|
||||
public class Attachment : BaseAddAuditEntity
|
||||
public class Attachment : BaseFullAuditEntity
|
||||
{
|
||||
|
||||
[JsonIgnore]
|
||||
|
@ -12,7 +12,7 @@ public class Attachment : BaseAddAuditEntity
|
|||
[Comment("编码")]
|
||||
public string Code { get; set; } = null!;
|
||||
|
||||
public Guid DoctorId { get; set; }
|
||||
public Guid? DoctorId { get; set; }
|
||||
|
||||
[Comment("过期时间")]
|
||||
public DateTime? ExpiryDate { get; set; }
|
||||
|
@ -30,4 +30,16 @@ public class Attachment : BaseAddAuditEntity
|
|||
|
||||
[Comment("文件类型名")]
|
||||
public string Type { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
/// </summary>
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否授权
|
||||
/// </summary>
|
||||
|
||||
public bool IsAuthorizedView { get; set; } = false;
|
||||
}
|
||||
|
|
|
@ -1,30 +1,5 @@
|
|||
namespace IRaCIS.Core.Domain.Models;
|
||||
|
||||
[Comment("后台 - 系统文档签署记录")]
|
||||
[Table("SystemDocConfirmedUser")]
|
||||
public class SystemDocConfirmedUser : BaseAddDeleteAuditEntity
|
||||
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
public SystemDocument SystemDocument { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("ConfirmUserId")]
|
||||
public UserRole ConfirmUser { get; set; }
|
||||
#endregion
|
||||
public Guid SystemDocumentId { get; set; }
|
||||
|
||||
public DateTime? ConfirmTime { get; set; }
|
||||
public Guid ConfirmUserId { get; set; }
|
||||
|
||||
public DateTime? SignFirstViewTime { get; set; }
|
||||
|
||||
[StringLength(1000)]
|
||||
public string SignText { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
[Comment("后台 - 系统文档签署记录")]
|
||||
|
|
|
@ -1,26 +1,5 @@
|
|||
namespace IRaCIS.Core.Domain.Models;
|
||||
|
||||
[Comment("项目 - 项目文档签署记录")]
|
||||
[Table("TrialDocConfirmedUser")]
|
||||
public class TrialDocConfirmedUser : BaseAddDeleteAuditEntity
|
||||
{
|
||||
#region 导航属性
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("ConfirmUserId")]
|
||||
public UserRole User { get; set; }
|
||||
[JsonIgnore]
|
||||
public TrialDocument TrialDocument { get; set; }
|
||||
#endregion
|
||||
public Guid TrialDocumentId { get; set; }
|
||||
public DateTime? ConfirmTime { get; set; }
|
||||
public Guid ConfirmUserId { get; set; }
|
||||
public DateTime? SignFirstViewTime { get; set; }
|
||||
|
||||
[StringLength(1000)]
|
||||
public string SignText { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
public class TrialDocConfirmedIdentityUser : BaseAddDeleteAuditEntity
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue