Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
commit
cc4d879def
|
@ -401,10 +401,10 @@ namespace IRaCIS.Api.Controllers
|
|||
/// 后端通过这个code ,带上客户端信息,和授权类型 可以向单点登录提供商,获取厂商token
|
||||
///
|
||||
/// 但是单点登录提供商提供的token 和我们系统的token 是有区别的,我们的token里面有我们业务系统的UserId,涉及到很多业务操作,所以在此出现了两种方案
|
||||
/// 1、前段使用厂商的Token。 后端通过code 获取厂商的Token 返回前端的同时返回我们系统的UserId,前段在http 请求头加上一个自定义参数,带上UserId 后端取用户Id的地方变动下,
|
||||
/// 1、前端使用厂商的Token。 后端通过code 获取厂商的Token 返回前端的同时返回我们系统的UserId,前段在http 请求头加上一个自定义参数,带上UserId 后端取用户Id的地方变动下,
|
||||
/// 但是除了UserId外,后端还有其他信息也是从Token取的,所以在请求头也需要带上,此外后端认证Token的方式也需要变化,改造成本稍大(如果是微服务,做这种处理还是可以的)。
|
||||
/// 2、前段还是使用我们后台自己的Token。后端通过code 获取厂商Token的同时,后端做一个隐藏登录,返回厂商的Token的同时,也返回我们系统的Token。
|
||||
/// (像我们单体,这种方式最简单,我们用单点登录,无非就是不想记多个系统的密码,自动登录而已,其他不支持的项目改造陈本也是最低的)
|
||||
/// 2、前端还是使用我们后台自己的Token。后端通过code 获取厂商Token的同时,后端做一个隐藏登录,返回厂商的Token的同时,也返回我们系统的Token。
|
||||
/// (像我们单体,这种方式最简单,我们用单点登录,无非就是不想记多个系统的密码,自动登录而已,其他不支持的项目改造成本也是最低的)
|
||||
/// </summary>
|
||||
/// <param name="type">回调的厂商类型 比如github, google, 我们用的logto ,不同的厂商回调到前端的地址可以不同的,但是请求后端的接口可以是同一个 </param>
|
||||
/// <param name="code">在第三方平台登录成功后,回调前端的时候会返回一个code </param>
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
后端通过这个code ,带上客户端信息,和授权类型 可以向单点登录提供商,获取厂商token
|
||||
|
||||
但是单点登录提供商提供的token 和我们系统的token 是有区别的,我们的token里面有我们业务系统的UserId,涉及到很多业务操作,所以在此出现了两种方案
|
||||
1、前段使用厂商的Token。 后端通过code 获取厂商的Token 返回前端的同时返回我们系统的UserId,前段在http 请求头加上一个自定义参数,带上UserId 后端取用户Id的地方变动下,
|
||||
1、前端使用厂商的Token。 后端通过code 获取厂商的Token 返回前端的同时返回我们系统的UserId,前段在http 请求头加上一个自定义参数,带上UserId 后端取用户Id的地方变动下,
|
||||
但是除了UserId外,后端还有其他信息也是从Token取的,所以在请求头也需要带上,此外后端认证Token的方式也需要变化,改造成本稍大(如果是微服务,做这种处理还是可以的)。
|
||||
2、前段还是使用我们后台自己的Token。后端通过code 获取厂商Token的同时,后端做一个隐藏登录,返回厂商的Token的同时,也返回我们系统的Token。
|
||||
(像我们单体,这种方式最简单,我们用单点登录,无非就是不想记多个系统的密码,自动登录而已,其他不支持的项目改造陈本也是最低的)
|
||||
2、前端还是使用我们后台自己的Token。后端通过code 获取厂商Token的同时,后端做一个隐藏登录,返回厂商的Token的同时,也返回我们系统的Token。
|
||||
(像我们单体,这种方式最简单,我们用单点登录,无非就是不想记多个系统的密码,自动登录而已,其他不支持的项目改造成本也是最低的)
|
||||
</summary>
|
||||
<param name="type">回调的厂商类型 比如github, google, 我们用的logto ,不同的厂商回调到前端的地址可以不同的,但是请求后端的接口可以是同一个 </param>
|
||||
<param name="code">在第三方平台登录成功后,回调前端的时候会返回一个code </param>
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Security;
|
||||
using System.Net;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RestSharp;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
|
||||
namespace IRaCIS.Core.Application.Helper.OtherTool
|
||||
{
|
||||
public static class RestClientAPI
|
||||
{
|
||||
public static async Task<T> GetAsync<T>(string api, Dictionary<string, string> query = null, Dictionary<string, string> headers = null)
|
||||
{
|
||||
using var _client = new RestClient();
|
||||
|
||||
var request = new RestRequest(api, Method.Get);
|
||||
|
||||
if (query != null)
|
||||
{
|
||||
foreach (var kv in query)
|
||||
{
|
||||
request.AddParameter(kv.Key, kv.Value);
|
||||
}
|
||||
}
|
||||
|
||||
if (headers != null)
|
||||
{
|
||||
foreach (var header in headers)
|
||||
{
|
||||
request.AddHeader(header.Key, header.Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var response = await _client.ExecuteAsync(request);
|
||||
|
||||
if (response.IsSuccessful)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<T>(response.Content ?? string.Empty);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"请求失败,错误代码: {response.StatusCode}, 错误消息: {response.ErrorMessage}");
|
||||
return JsonConvert.DeserializeObject<T>(string.Empty);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static async Task<T> PostAsync<T>(string api, object jsonObj = null, Dictionary<string, string> headers = null)
|
||||
{
|
||||
using var _client = new RestClient();
|
||||
|
||||
var request = new RestRequest(api, Method.Post);
|
||||
|
||||
if (jsonObj != null)
|
||||
{
|
||||
request.AddJsonBody(jsonObj);
|
||||
}
|
||||
|
||||
if (headers != null)
|
||||
{
|
||||
foreach (var header in headers)
|
||||
{
|
||||
request.AddHeader(header.Key, header.Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var response = await _client.ExecuteAsync(request);
|
||||
|
||||
if (response.IsSuccessful)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<T>(response.Content ?? string.Empty);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"请求失败,错误代码: {response.StatusCode}, 错误消息: {response.ErrorMessage}");
|
||||
return JsonConvert.DeserializeObject<T>(string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -236,7 +236,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
}
|
||||
|
||||
dialogMsg.AppendLine($"<br/>");
|
||||
dialogMsg.AppendLine(@$"<div>{_localizer["ConsistencyVerification_Desc"]}<div/>");
|
||||
dialogMsg.AppendLine(@$"<div>{_localizer["ConsistencyVerification_Desc"]}</div>");
|
||||
|
||||
dbSV.CheckResult = _localizer["ConsistencyVerification_Conf"] +
|
||||
String.Join(" | ", dbExceptExcel.Select(t => $"{_localizer["ConsistencyVerification_EdcL", t.StudyDate, t.Modality]}")) + " | "
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
// 生成时间 2023-06-01 13:38:20
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
/// <summary> InternationalizationView 列表视图模型 </summary>
|
||||
|
@ -19,6 +21,32 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
}
|
||||
|
||||
public class InternationExportDTO
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
[DictionaryTranslateAttribute("InternationalizationKeyState")]
|
||||
public int State { get; set; }
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public string Code { get; set; } = string.Empty;
|
||||
public string Value { get; set; } = string.Empty;
|
||||
public string ValueCN { get; set; } = string.Empty;
|
||||
|
||||
public string FrontType { get; set; } = string.Empty;
|
||||
|
||||
[DictionaryTranslateAttribute("InternationalizationType")]
|
||||
public int InternationalizationType { get; set; }
|
||||
public string Module { get; set; } = string.Empty;
|
||||
//关联版本历史记录表Id
|
||||
public Guid? PublishLogId { get; set; }
|
||||
|
||||
public string Version { get; set; }
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
}
|
||||
|
||||
///<summary>InternationalizationQuery 列表查询参数模型</summary>
|
||||
public class InternationalizationQuery : PageInput
|
||||
{
|
||||
|
@ -34,6 +62,14 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
//关联版本历史记录表Id
|
||||
public Guid? PublishLogId { get; set; }
|
||||
|
||||
public DateTime? BeginCreateTime { get; set; }
|
||||
|
||||
public DateTime? EndCreatTime { get; set; }
|
||||
|
||||
public DateTime? BeginUpdateTime { get; set; }
|
||||
|
||||
public DateTime? EndUpdateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
///<summary> InternationalizationAddOrEdit 列表查询参数模型</summary>
|
||||
|
|
|
@ -1304,7 +1304,11 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
.WhereIf(inQuery.InternationalizationType != null, t => t.InternationalizationType == inQuery.InternationalizationType)
|
||||
.WhereIf(inQuery.Value != null, t => t.Value.Contains(inQuery.Value))
|
||||
.WhereIf(inQuery.ValueCN != null, t => t.ValueCN.Contains(inQuery.ValueCN))
|
||||
.ProjectTo<InternationalizationView>(_mapper.ConfigurationProvider);
|
||||
.WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime)
|
||||
.WhereIf(inQuery.EndCreatTime != null, t => t.CreateTime <= inQuery.EndCreatTime)
|
||||
.WhereIf(inQuery.BeginUpdateTime != null, t => t.UpdateTime >= inQuery.BeginUpdateTime)
|
||||
.WhereIf(inQuery.EndUpdateTime != null, t => t.UpdateTime <= inQuery.EndUpdateTime)
|
||||
.ProjectTo<InternationExportDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
var list = internationalizationQueryable.SortToListAsync(inQuery);
|
||||
|
||||
|
@ -1312,7 +1316,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSCPImageUploadList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(InternationalizationView));
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.Internationalization_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(InternationExportDTO));
|
||||
|
||||
}
|
||||
|
||||
|
@ -1663,7 +1667,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
if (judegeList.Count > 0)
|
||||
{
|
||||
|
||||
var maxFinishedJudge = judegeList.Where(t => t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderByDescending(t=>t.VisitTaskNum).FirstOrDefault();
|
||||
var maxFinishedJudge = judegeList.Where(t => t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
var maxNotFinishedJudge = judegeList.Where(t => t.ReadingTaskState != ReadingTaskState.HaveSigned).FirstOrDefault();
|
||||
|
||||
|
@ -2260,7 +2264,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
.GroupBy(t => new { t.SubjectId, t.SourceSubjectVisitId })
|
||||
.Where(g => g.Count() == 2).Select(g => g.Key.SourceSubjectVisitId).Distinct().Count();
|
||||
|
||||
exportInfo.JudgeVisitCount = _visitTaskRepository.Where(comonTaskFilter).Where(t => t.ReadingCategory == ReadingCategory.Judge ).Count();
|
||||
exportInfo.JudgeVisitCount = _visitTaskRepository.Where(comonTaskFilter).Where(t => t.ReadingCategory == ReadingCategory.Judge).Count();
|
||||
|
||||
//3、裁判认同数M:触发裁判的受试者访视中,阅片人被裁判认同的访视数量;
|
||||
//4、总裁判数N:阅片人所阅的受试者访视中,触发裁判的访视数量;
|
||||
|
@ -2329,11 +2333,11 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
//2、总样本量Q:R1,R2均完成阅片的阅片期数量;
|
||||
|
||||
exportInfo.ReadingPeriodCount = _visitTaskRepository.Where(comonTaskFilter).Where(t => t.ReadingCategory == ReadingCategory.Global && t.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
.GroupBy(t => new { t.SubjectId, t.SouceReadModuleId })
|
||||
.GroupBy(t => new { t.SubjectId, t.SouceReadModuleId })
|
||||
.Where(g => g.Count() == 2).Select(g => g.Key.SouceReadModuleId).Distinct().Count();
|
||||
|
||||
exportInfo.judgeReadingPeriodCount = _visitTaskRepository.Where(comonTaskFilter).Where(t => t.ReadingCategory == ReadingCategory.Global && t.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
.GroupBy(t => new { t.SubjectId, t.SouceReadModuleId })
|
||||
.GroupBy(t => new { t.SubjectId, t.SouceReadModuleId })
|
||||
.Where(g => g.Count() == 2 && g.Any(c => c.JudgeVisitTaskId != null)).Select(g => g.Key.SouceReadModuleId).Distinct().Count();
|
||||
|
||||
//3、裁判认同数J:触发裁判的阅片期中,阅片人被裁判认同的阅片期数量;
|
||||
|
@ -2342,7 +2346,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
var doctor2List = _visitTaskRepository.Where(comonTaskFilter).Where(t => t.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
.GroupBy(t => new { t.DoctorUserId, t.DoctorUser.UserName, t.DoctorUser.FullName })
|
||||
//有全局裁判
|
||||
.Where(g => g.Any(t => t.ReadingCategory == ReadingCategory.Global && t.JudgeVisitTaskId != null))
|
||||
//.Where(g => g.Any(t => t.ReadingCategory == ReadingCategory.Global && t.JudgeVisitTaskId != null))
|
||||
.Select(g => new DoctorJudgeRatio()
|
||||
{
|
||||
DoctorUserId = g.Key.DoctorUserId,
|
||||
|
|
|
@ -101,6 +101,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(inQuery.InternationalizationType != null, t => t.InternationalizationType == inQuery.InternationalizationType)
|
||||
.WhereIf(inQuery.Value != null, t => t.Value.Contains(inQuery.Value))
|
||||
.WhereIf(inQuery.ValueCN != null, t => t.ValueCN.Contains(inQuery.ValueCN))
|
||||
.WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime)
|
||||
.WhereIf(inQuery.EndCreatTime != null, t => t.CreateTime <= inQuery.EndCreatTime)
|
||||
.WhereIf(inQuery.BeginUpdateTime != null, t => t.UpdateTime >= inQuery.BeginUpdateTime)
|
||||
.WhereIf(inQuery.EndUpdateTime != null, t => t.UpdateTime <= inQuery.EndUpdateTime)
|
||||
.ProjectTo<InternationalizationView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await internationalizationQueryable
|
||||
|
|
|
@ -67,6 +67,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<Internationalization, InternationalizationView>()
|
||||
.ForMember(o => o.Version, t => t.MapFrom(u => u.PublishLog.Version));
|
||||
|
||||
CreateMap<Internationalization, InternationExportDTO>()
|
||||
.ForMember(o => o.Version, t => t.MapFrom(u => u.PublishLog.Version));
|
||||
|
||||
CreateMap<Internationalization, InternationalizationAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<Internationalization, BatchInternationalizationDto>().ReverseMap();
|
||||
|
|
|
@ -352,7 +352,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public string Content { get; set; }
|
||||
|
||||
public string ContentReplaced => Content.Replace("<br>", "").Replace("<br>", "").Replace("<br/>", "").Replace("<div style='text-indent: 20px;'>", "").Replace("</div>", "");
|
||||
public string ContentReplaced => Content.Replace("<br>", "").Replace("<br/>", "").Replace("<div style='text-indent: 20px;'>", "")
|
||||
.Replace("<div style='color: red'>", "").Replace("</div>", "").Replace("<div/>", "");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1183,7 +1184,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string JudgeRatioStr => TotalJudgeCount == 0 ? $"NA" : $"{Math.Round((decimal)JudgeAgreeCount * 100 / TotalJudgeCount, 2)}%";
|
||||
|
||||
|
||||
public string ExceptionMark => TotalJudgeCount == 0 ? $"Y" : (JudgeAgreeCount * 3 / TotalJudgeCount < 1) ? "Y" : "N";
|
||||
public string ExceptionMark => TotalJudgeCount == 0 ? $"NA" : (JudgeAgreeCount * 3 / TotalJudgeCount < 1) ? "Y" : "N";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -240,6 +240,8 @@ public static class StaticData
|
|||
|
||||
public static string TrialSCPImageUploadPatientList_Export = "TrialSCPImageUploadPatientList_Export";
|
||||
|
||||
public static string Internationalization_Export = "Internationalization_Export";
|
||||
|
||||
//public const string TrialRECIST1Point1SelfAnalysisList_Export = "TrialRECIST1Point1SelfAnalysisList_Export";
|
||||
|
||||
//public const string TrialRECIST1Point1GroupAnalysisList_Export = "TrialRECIST1Point1GroupAnalysisList_Export";
|
||||
|
|
Loading…
Reference in New Issue