Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/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
6ccbfc466f
|
@ -32,6 +32,7 @@ using IRaCIS.Core.Application.Contracts;
|
|||
using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using AutoMapper.QueryableExtensions;
|
||||
using NetTopologySuite.Algorithm;
|
||||
|
||||
namespace IRaCIS.Api.Controllers
|
||||
{
|
||||
|
@ -108,7 +109,7 @@ namespace IRaCIS.Api.Controllers
|
|||
{
|
||||
|
||||
//MFA 邮箱验证 前端传递用户Id 和MFACode
|
||||
if (loginUser.UserId != null && _verifyConfig.CurrentValue.OpenLoginMFA)
|
||||
if (loginUser.UserId != null && _verifyConfig.CurrentValue.OpenLoginMFA)
|
||||
{
|
||||
Guid userId = (Guid)loginUser.UserId;
|
||||
|
||||
|
@ -226,23 +227,7 @@ namespace IRaCIS.Api.Controllers
|
|||
|
||||
var email = returnModel.Data.BasicInfo.EMail;
|
||||
|
||||
#region 隐藏Email
|
||||
// 找到 "@" 符号的位置
|
||||
int atIndex = email.IndexOf('@');
|
||||
|
||||
// 替换 "@" 符号前的中间两位为星号
|
||||
string visiblePart = email.Substring(0, atIndex);
|
||||
|
||||
int startIndex = (visiblePart.Length - 2) / 2;
|
||||
|
||||
// 替换中间两位字符为星号
|
||||
string hiddenPartBeforeAt = visiblePart.Substring(0, startIndex) + "**" + visiblePart.Substring(startIndex + 2);
|
||||
|
||||
string afterAt = email.Substring(atIndex + 1);
|
||||
|
||||
// 组合隐藏和可见部分
|
||||
string hiddenEmail = hiddenPartBeforeAt + "@" + afterAt;
|
||||
#endregion
|
||||
var hiddenEmail = EmailMaskHelper.MaskEmail(email);
|
||||
|
||||
returnModel.Data.BasicInfo.EMail = hiddenEmail;
|
||||
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Helper
|
||||
{
|
||||
public static class EmailMaskHelper
|
||||
{
|
||||
|
||||
//显示位数:3分之2的位数,向上取整
|
||||
//取哪几个个值:最后一位和前面几位
|
||||
//其他:3个***。
|
||||
//比如:hlj23@126.com
|
||||
//为:hlj***3@126.com
|
||||
|
||||
//he@126.com
|
||||
//为:h*** e@126.com
|
||||
|
||||
public static string MaskEmail(string email)
|
||||
{
|
||||
|
||||
// 找到 "@" 符号的位置
|
||||
int atIndex = email.IndexOf('@');
|
||||
|
||||
string visiblePartBefore = email.Substring(0, atIndex);
|
||||
|
||||
string afterAt = email.Substring(atIndex + 1);
|
||||
|
||||
int visibleLength = (int)Math.Ceiling((double)visiblePartBefore.Length * 2 / 3);
|
||||
|
||||
// 替换中间两位字符为星号
|
||||
string hiddenPartBeforeAt = visiblePartBefore.Substring(0, visibleLength - 1) + "***" + visiblePartBefore.Last();
|
||||
|
||||
|
||||
// 组合隐藏和可见部分
|
||||
string hiddenEmail = hiddenPartBeforeAt + "@" + afterAt;
|
||||
|
||||
return hiddenEmail;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1425,7 +1425,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var taskState = exsitPDF ? TaskState.NotEffect : TaskState.Effect;
|
||||
|
||||
var clinicalDataList = _readingClinicalDataRepository.Where(t => t.SubjectId == subjectId).Include(t => t.ReadingClinicalDataPDFList).Include(t=>t.ClinicalDataTrialSet).ToList();
|
||||
var clinicalDataList = _readingClinicalDataRepository.Where(t => t.SubjectId == subjectId&&t.ClinicalDataTrialSet.ClinicalUploadType == ClinicalUploadType.PDF).Include(t => t.ReadingClinicalDataPDFList).Include(t=>t.ClinicalDataTrialSet).ToList();
|
||||
|
||||
foreach (var clinicalData in clinicalDataList)
|
||||
{
|
||||
|
|
|
@ -18,6 +18,7 @@ using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
|||
using IRaCIS.Core.Application.Auth;
|
||||
using BeetleX.Redis.Commands;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
@ -676,7 +677,8 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, (UserMFAType)mfaType);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
var hiddenEmail = EmailMaskHelper.MaskEmail(userInfo.EMail);
|
||||
return ResponseOutput.Ok(hiddenEmail);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1071,7 +1071,56 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 一致性分析
|
||||
/// <summary>
|
||||
/// 获取阅片临床数据列表
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<(List<GetReadingClinicalDataListOutDto>, object)> GetConsistencyAnalysisReadingClinicalDataList(GetReadingClinicalDataListIndto inDto)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
var isBaseLine = await _subjectVisitRepository.AnyAsync(x => x.Id == inDto.ReadingId && x.IsBaseLine);
|
||||
|
||||
|
||||
var result = await this.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto()
|
||||
{
|
||||
ClinicalDataTrialSetId = inDto.ClinicalDataTrialSetId,
|
||||
GetClinicalType = inDto.GetClinicalType,
|
||||
SubjectId = inDto.SubjectId,
|
||||
TrialId = inDto.TrialId,
|
||||
SelectIsSign = false,
|
||||
ReadingId = inDto.ReadingId,
|
||||
TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
||||
});
|
||||
var readingIds = result.Select(x => x.ReadingId).ToList();
|
||||
|
||||
var previousHistoryList = await _previousHistoryRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
var previousOtherList = await _previousOtherRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
var previousSurgeryList = await _previousSurgeryRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
foreach (var item in result)
|
||||
{
|
||||
item.ClinicalTableData = new ClinicalDataTable()
|
||||
{
|
||||
PreviousHistoryList = previousHistoryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
||||
PreviousOtherList = previousOtherList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
||||
PreviousSurgeryList = previousSurgeryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
return (result, new
|
||||
{
|
||||
IsCanAddClinicalData = false,
|
||||
});
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 阅片临床数据PDF
|
||||
|
||||
|
|
|
@ -261,9 +261,12 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
|
||||
[AllowAnonymous]
|
||||
public async Task testwwwww([FromServices] IWebHostEnvironment env)
|
||||
public async Task<string> testEmail([FromServices] IWebHostEnvironment env ,string email)
|
||||
{
|
||||
await Task.CompletedTask;
|
||||
|
||||
var hiddenEmail = EmailMaskHelper.MaskEmail(email);
|
||||
|
||||
return hiddenEmail;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue