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 passing Details

IRC_NewDev
hang 2024-07-31 09:35:34 +08:00
commit d3e7b3a8d8
22 changed files with 462 additions and 49 deletions

View File

@ -71,6 +71,7 @@
</PackageReference> </PackageReference>
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.14" /> <PackageReference Include="Hangfire.AspNetCore" Version="1.8.14" />
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" /> <PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
<PackageReference Include="Hangfire.InMemory" Version="0.10.3" />
<PackageReference Include="Hangfire.SqlServer" Version="1.8.14" /> <PackageReference Include="Hangfire.SqlServer" Version="1.8.14" />
<PackageReference Include="Invio.Extensions.Authentication.JwtBearer" Version="2.0.1" /> <PackageReference Include="Invio.Extensions.Authentication.JwtBearer" Version="2.0.1" />
<PackageReference Include="LogDashboard" Version="1.4.8" /> <PackageReference Include="LogDashboard" Version="1.4.8" />

View File

@ -28,6 +28,7 @@ using FellowOakDicom.Network;
using IRaCIS.Core.Application.Service.ImageAndDoc; using IRaCIS.Core.Application.Service.ImageAndDoc;
using IP2Region.Net.Abstractions; using IP2Region.Net.Abstractions;
using IP2Region.Net.XDB; using IP2Region.Net.XDB;
using IRaCIS.Core.Application.BusinessFilter;
#region 获取环境变量 #region 获取环境变量
@ -104,11 +105,9 @@ builder.Services.AddControllers(options =>
options.Filters.Add<ModelActionFilter>(); options.Filters.Add<ModelActionFilter>();
options.Filters.Add<ProjectExceptionFilter>(); options.Filters.Add<ProjectExceptionFilter>();
options.Filters.Add<UnitOfWorkFilter>(); options.Filters.Add<UnitOfWorkFilter>();
options.Filters.Add<EncreptApiResultFilter>(10);
if (_configuration.GetSection("BasicSystemConfig").GetValue<bool>("OpenLoginLimit"))
{
options.Filters.Add<LimitUserRequestAuthorization>(); options.Filters.Add<LimitUserRequestAuthorization>();
}
}) })
.AddNewtonsoftJsonSetup(builder.Services); // NewtonsoftJson 序列化 处理 .AddNewtonsoftJsonSetup(builder.Services); // NewtonsoftJson 序列化 处理
@ -117,6 +116,8 @@ builder.Services.AddOptions().Configure<SystemEmailSendConfig>(_configuration.Ge
builder.Services.AddOptions().Configure<ServiceVerifyConfigOption>(_configuration.GetSection("BasicSystemConfig")); builder.Services.AddOptions().Configure<ServiceVerifyConfigOption>(_configuration.GetSection("BasicSystemConfig"));
builder.Services.AddOptions().Configure<AliyunOSSOptions>(_configuration.GetSection("AliyunOSS")); builder.Services.AddOptions().Configure<AliyunOSSOptions>(_configuration.GetSection("AliyunOSS"));
builder.Services.AddOptions().Configure<ObjectStoreServiceOptions>(_configuration.GetSection("ObjectStoreService")); builder.Services.AddOptions().Configure<ObjectStoreServiceOptions>(_configuration.GetSection("ObjectStoreService"));
builder.Services.AddOptions().Configure<EncreptResponseOption>(_configuration.GetSection("EncrypteResponseConfig"));
//动态WebApi + UnifiedApiResultFilter 省掉控制器代码 //动态WebApi + UnifiedApiResultFilter 省掉控制器代码

View File

@ -3,6 +3,7 @@ using Hangfire.SqlServer;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using System; using System;
using System.Runtime.InteropServices;
namespace IRaCIS.Core.API namespace IRaCIS.Core.API
{ {
@ -14,9 +15,14 @@ namespace IRaCIS.Core.API
services.AddHangfire(hangFireConfig => services.AddHangfire(hangFireConfig =>
{ {
//本地window 调试 使用内存,服务器部署使用数据库,防止服务器任务调度到本地
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
hangFireConfig.UseInMemoryStorage();
//hangFireConfig.UseInMemoryStorage(); }
else
{
//指定存储介质 //指定存储介质
hangFireConfig.UseSqlServerStorage(hangFireConnStr, new SqlServerStorageOptions() hangFireConfig.UseSqlServerStorage(hangFireConnStr, new SqlServerStorageOptions()
{ {
@ -27,6 +33,11 @@ namespace IRaCIS.Core.API
UseRecommendedIsolationLevel = true, UseRecommendedIsolationLevel = true,
DisableGlobalLocks = true DisableGlobalLocks = true
}); });
}
//hangFireConfig.UseTagsWithSql(); //nuget引入Hangfire.Tags.SqlServer //hangFireConfig.UseTagsWithSql(); //nuget引入Hangfire.Tags.SqlServer
//.UseHangfireHttpJob(); //.UseHangfireHttpJob();

View File

@ -92,5 +92,12 @@
"DefaultPassword": "123456", "DefaultPassword": "123456",
"DefaultInternalOrganizationName": "ExtImaging", "DefaultInternalOrganizationName": "ExtImaging",
"ImageShareExpireDays": 10 "ImageShareExpireDays": 10
},
"EncrypteResponseConfig": {
"IsEnable": true,
"ApiPathList": [
"/test/get"
]
} }
} }

View File

@ -0,0 +1,71 @@
using IRaCIS.Core.Domain.Share;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Application.BusinessFilter
{
public class EncreptApiResultFilter : IAsyncResultFilter
{
private readonly IOptionsMonitor<EncreptResponseOption> _encreptResponseMonitor;
public EncreptApiResultFilter(IOptionsMonitor<EncreptResponseOption> encreptResponseMonitor)
{
_encreptResponseMonitor = encreptResponseMonitor;
}
public async Task OnResultExecutionAsync(ResultExecutingContext context, ResultExecutionDelegate next)
{
if(_encreptResponseMonitor.CurrentValue.IsEnable)
{
if (context.Result is ObjectResult objectResult)
{
var statusCode = objectResult.StatusCode ?? context.HttpContext.Response.StatusCode;
var objectValue = objectResult.Value;
if (objectValue is IResponseOutput)
{
var responseOutput = objectValue as IResponseOutput<object>;
var path = context.HttpContext?.Request.Path.Value?.ToLower();
if(!string.IsNullOrEmpty(path) && path.Length>5 && _encreptResponseMonitor.CurrentValue.ApiPathList.Contains(path.ToLower()))
{
if(responseOutput.IsSuccess)
{
responseOutput.Code = ApiResponseCodeEnum.ResultEncrepted;
responseOutput.Data = JsonConvert.SerializeObject(Convert.ToBase64String(Encoding.UTF8.GetBytes(responseOutput.Data.ToString())));
objectResult.Value = responseOutput;
}
}
}
}
}
await next.Invoke();
}
}
}

View File

@ -10,6 +10,7 @@ namespace IRaCIS.Application.Services.BusinessFilter
/// </summary> /// </summary>
public class UnifiedApiResultFilter : Attribute, IAsyncResultFilter public class UnifiedApiResultFilter : Attribute, IAsyncResultFilter
{ {
/// <summary> /// <summary>
/// 异步版本 /// 异步版本
/// </summary> /// </summary>
@ -26,15 +27,6 @@ namespace IRaCIS.Application.Services.BusinessFilter
//是200 并且没有包装 那么包装结果 //是200 并且没有包装 那么包装结果
if (statusCode == 200 && !(objectResult.Value is IResponseOutput)) if (statusCode == 200 && !(objectResult.Value is IResponseOutput))
{ {
//if (objectResult.Value == null)
//{
// var apiResponse = ResponseOutput.DBNotExist();
// objectResult.Value = apiResponse;
// objectResult.DeclaredType = apiResponse.GetType();
//}
//else
//{
var type = objectResult.Value?.GetType(); var type = objectResult.Value?.GetType();
@ -65,8 +57,6 @@ namespace IRaCIS.Application.Services.BusinessFilter
} }
//}
} }
//如果不是200 是IResponseOutput 不处理 //如果不是200 是IResponseOutput 不处理
else if (statusCode != 200 && (objectResult.Value is IResponseOutput)) else if (statusCode != 200 && (objectResult.Value is IResponseOutput))

View File

@ -190,7 +190,7 @@ namespace IRaCIS.Application.Services
messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(mfaType == UserMFAType.Login ? EmailBusinessScenario.MFALogin : EmailBusinessScenario.MFAUnlock, messageToSend, emailConfigFunc); messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(mfaType == UserMFAType.Login ? EmailBusinessScenario.MFALogin : EmailBusinessScenario.MFAUnlock, messageToSend, emailConfigFunc);
var sucessHandle = GetEmailSuccessHandle(userId, verificationCode); var sucessHandle = GetEmailSuccessHandle(userId, verificationCode, emailAddress);
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle); await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle);
@ -229,7 +229,7 @@ namespace IRaCIS.Application.Services
messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UserResetEmail, messageToSend, emailConfigFunc); messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UserResetEmail, messageToSend, emailConfigFunc);
var sucessHandle = GetEmailSuccessHandle(userId, verificationCode); var sucessHandle = GetEmailSuccessHandle(userId, verificationCode, emailAddress);
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle); await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle);
@ -269,7 +269,7 @@ namespace IRaCIS.Application.Services
messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UnloginUseEmailResetPassword, messageToSend, emailConfigFunc); messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UnloginUseEmailResetPassword, messageToSend, emailConfigFunc);
////此时不知道用户 ////此时不知道用户
var sucessHandle = GetEmailSuccessHandle(Guid.Empty, verificationCode); var sucessHandle = GetEmailSuccessHandle(Guid.Empty, verificationCode, emailAddress);
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle); await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle);
@ -355,7 +355,7 @@ namespace IRaCIS.Application.Services
messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.SiteSurveyLogin, messageToSend, emailConfigFunc); messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.SiteSurveyLogin, messageToSend, emailConfigFunc);
//此时不知道用户 //此时不知道用户
var sucessHandle = GetEmailSuccessHandle(Guid.Empty, verificationCode); var sucessHandle = GetEmailSuccessHandle(Guid.Empty, verificationCode, emailAddress);
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle); await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle);

View File

@ -79,6 +79,10 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
public int InstanceNumber { get; set; } public int InstanceNumber { get; set; }
public Guid? StudyId { get; set; }
public Guid? SeriesId { get; set; }
[JsonIgnore] [JsonIgnore]
public int ShowOrder { get; set; } public int ShowOrder { get; set; }
[JsonIgnore] [JsonIgnore]

View File

@ -0,0 +1,97 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2024-07-30 10:39:12
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using System;
using IRaCIS.Core.Domain.Share;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
namespace IRaCIS.Core.Application.ViewModel
{
/// <summary> UserFeedBackView 列表视图模型 </summary>
public class UserFeedBackView : UserFeedBackAddOrEdit
{
public string TrialCode { get; set; }
public string ExperimentName { get; set; }
public string SubjectCode { get; set; }
public string TrialSiteCode { get; set; }
public string SubjectVisitName { get; set; }
public string FeedBackUserName { get; set; }
public string FeedBackFullName { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
public UserTypeEnum UserTypeEnum { get; set; }
}
///<summary>UserFeedBackQuery 列表查询参数模型</summary>
public class UserFeedBackQuery : PageInput
{
public string? TrialKeyInfo { get; set; }
public string? SubejctAndVisitKeyInfo { get; set; }
public UserTypeEnum? UserTypeEnum { get; set; }
public string FeedBackKeyInfo { get; set; }
public string? QuestionDescription { get; set; }
public int? QuestionType { get; set; }
public int? State { get; set; }
public string? TrialSiteCode { get; set; }
public DateTime? BeginCreatime { get; set; }
public DateTime? EndCreatime { get; set; }
}
///<summary> UserFeedBackAddOrEdit 列表查询参数模型</summary>
public class UserFeedBackAddOrEdit
{
public Guid? Id { get; set; }
public Guid? SubjectId { get; set; }
public Guid? SubjectVisitId { get; set; }
public int QuestionType { get; set; }
public string QuestionDescription { get; set; }
public int State { get; set; }
public Guid? TrialSiteId { get; set; }
[NotDefault]
public Guid TrialId { get; set; }
public List<string> ScreenshotList { get; set; }
[JsonIgnore]
public string ScreenshotListStr { get; set; }
}
public class BatchUpdateCommand
{
public List<Guid> IdList { get; set; }
public int State { get; set; }
}
}

View File

@ -0,0 +1,24 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2024-07-30 10:39:05
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Application.ViewModel;
namespace IRaCIS.Core.Application.Interfaces
{
/// <summary>
/// IUserFeedBackService
/// </summary>
public interface IUserFeedBackService
{
Task<PageOutput<UserFeedBackView>> GetUserFeedBackList(UserFeedBackQuery inQuery);
Task<IResponseOutput> AddOrUpdateUserFeedBack(UserFeedBackAddOrEdit addOrEditUserFeedBack);
Task<IResponseOutput> DeleteUserFeedBack(Guid userFeedBackId);
}
}

View File

@ -0,0 +1,89 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2024-07-30 10:39:09
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Domain.Models;
using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
using Newtonsoft.Json;
namespace IRaCIS.Core.Application.Service
{
/// <summary>
/// UserFeedBackService
/// </summary>
[ApiExplorerSettings(GroupName = "Management")]
public class UserFeedBackService : BaseService, IUserFeedBackService
{
private readonly IRepository<UserFeedBack> _userFeedBackRepository;
public UserFeedBackService(IRepository<UserFeedBack> userFeedBackRepository)
{
_userFeedBackRepository = userFeedBackRepository;
}
[HttpPost]
public async Task<PageOutput<UserFeedBackView>> GetUserFeedBackList(UserFeedBackQuery inQuery)
{
var userFeedBackQueryable = _userFeedBackRepository
.WhereIf(inQuery.State != null, t => t.State == inQuery.State)
.WhereIf(inQuery.QuestionType != null, t => t.QuestionType == inQuery.QuestionType)
.WhereIf(inQuery.BeginCreatime != null, t => t.CreateTime >= inQuery.BeginCreatime)
.WhereIf(inQuery.EndCreatime != null, t => t.CreateTime == inQuery.EndCreatime)
.WhereIf(inQuery.UserTypeEnum != null, t => t.CreateUser.UserTypeEnum == inQuery.UserTypeEnum)
.WhereIf(!string.IsNullOrEmpty(inQuery.QuestionDescription), t => t.QuestionDescription.Contains(inQuery.QuestionDescription) )
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialKeyInfo), t => t.Trial.ExperimentName.Contains(inQuery.TrialKeyInfo) || t.Trial.TrialCode.Contains(inQuery.TrialKeyInfo))
.WhereIf(!string.IsNullOrEmpty(inQuery.SubejctAndVisitKeyInfo), t => t.Subject.Code.Contains(inQuery.SubejctAndVisitKeyInfo) || t.SubjectVisit.VisitName.Contains(inQuery.SubejctAndVisitKeyInfo))
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialSiteCode), t => t.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode) )
.ProjectTo<UserFeedBackView>(_mapper.ConfigurationProvider);
var pageList = await userFeedBackQueryable
.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(UserFeedBackView.Id) : inQuery.SortField,
inQuery.Asc);
return pageList;
}
public async Task<IResponseOutput> AddOrUpdateUserFeedBack(UserFeedBackAddOrEdit addOrEditUserFeedBack)
{
addOrEditUserFeedBack.ScreenshotListStr = JsonConvert.SerializeObject(addOrEditUserFeedBack.ScreenshotList);
var entity = await _userFeedBackRepository.InsertOrUpdateAsync(addOrEditUserFeedBack, true);
return ResponseOutput.Ok(entity.Id.ToString());
}
/// <summary>
/// 批量更新状态
/// </summary>
/// <param name="batchUpdateCommand"></param>
/// <returns></returns>
[HttpPut]
public async Task<IResponseOutput> BatchUpdateFeedBackState(BatchUpdateCommand batchUpdateCommand)
{
await _userFeedBackRepository.BatchUpdateNoTrackingAsync(t => batchUpdateCommand.IdList.Contains(t.Id), u => new UserFeedBack() { State = batchUpdateCommand.State });
return ResponseOutput.Ok();
}
[HttpDelete("{userFeedBackId:guid}")]
public async Task<IResponseOutput> DeleteUserFeedBack(Guid userFeedBackId)
{
var success = await _userFeedBackRepository.DeleteFromQueryAsync(t => t.Id == userFeedBackId, true);
return ResponseOutput.Ok();
}
}
}

View File

@ -208,6 +208,11 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk(_localizer["User_VerificationCodeExpired"]); return ResponseOutput.NotOk(_localizer["User_VerificationCodeExpired"]);
} }
else if (verificationRecord.EmailOrPhone.Trim() != newEmail.Trim())
{
//发送验证嘛的和提交的邮箱不一致
return ResponseOutput.NotOk(_localizer["User_VerificationEmailNotSameWithBefore"]);
}
else //验证码正确 并且 没有超时 else //验证码正确 并且 没有超时
{ {
@ -684,7 +689,7 @@ namespace IRaCIS.Application.Services
[AllowAnonymous] [AllowAnonymous]
public async Task<IResponseOutput> VerifyMFACodeAsync(Guid userId, string Code) public async Task<IResponseOutput> VerifyMFACodeAsync(Guid userId, string Code)
{ {
var verificationRecord = await _repository.GetQueryable<VerificationCode>().OrderByDescending(x => x.ExpirationTime).Where(t => t.UserId == userId && t.Code == Code && t.CodeType == VerifyType.Email).FirstOrDefaultAsync(); var verificationRecord = await _verificationCodeRepository.Where(t => t.UserId == userId && t.Code == Code && t.CodeType == VerifyType.Email).OrderByDescending(x => x.ExpirationTime).FirstOrDefaultAsync();
VerifyEmialGetDoctorInfoOutDto result = new VerifyEmialGetDoctorInfoOutDto(); VerifyEmialGetDoctorInfoOutDto result = new VerifyEmialGetDoctorInfoOutDto();
//检查数据库是否存在该验证码 //检查数据库是否存在该验证码
@ -707,6 +712,10 @@ namespace IRaCIS.Application.Services
} }
else //验证码正确 并且 没有超时 else //验证码正确 并且 没有超时
{ {
//删除验证码历史记录
await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.Id == verificationRecord.Id);
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = userId, OptUserId = userId, OptType = UserOptType.MFALogin }, true); await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = userId, OptUserId = userId, OptType = UserOptType.MFALogin }, true);
} }

View File

@ -125,6 +125,18 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.OptUserName, c => c.MapFrom(t => t.OptUser.UserName)) .ForMember(d => d.OptUserName, c => c.MapFrom(t => t.OptUser.UserName))
.ForMember(d => d.OptUserTypeEnum, c => c.MapFrom(t => t.OptUser.UserTypeEnum)) .ForMember(d => d.OptUserTypeEnum, c => c.MapFrom(t => t.OptUser.UserTypeEnum))
; ;
CreateMap<UserFeedBack, UserFeedBackView>()
.ForMember(d => d.ExperimentName, c => c.MapFrom(t => t.Trial.ExperimentName))
.ForMember(d => d.TrialCode, c => c.MapFrom(t => t.Trial.TrialCode))
.ForMember(d => d.SubjectCode, c => c.MapFrom(t => t.Subject.Code))
.ForMember(d => d.TrialSiteCode, c => c.MapFrom(t => t.TrialSite.TrialSiteCode))
.ForMember(d => d.SubjectVisitName, c => c.MapFrom(t => t.SubjectVisit.VisitName))
.ForMember(d => d.FeedBackUserName, c => c.MapFrom(t => t.CreateUser.UserName))
.ForMember(d => d.FeedBackFullName, c => c.MapFrom(t => t.CreateUser.FullName))
.ForMember(d => d.UserTypeEnum, c => c.MapFrom(t => t.CreateUser.UserTypeEnum));
CreateMap<UserFeedBack, UserFeedBackAddOrEdit>().ReverseMap();
} }
} }

View File

@ -117,6 +117,10 @@ namespace IRaCIS.Core.Application.Contracts
} }
else //验证码正确 并且 没有超时 else //验证码正确 并且 没有超时
{ {
//删除验证码历史记录
await _repository.BatchDeleteAsync<VerificationCode>(t => t.Id == verificationRecord.Id);
var dockerInfo = await _repository.Where<Doctor>(t => t.EMail == inDto.EmailOrPhone || t.Phone == inDto.EmailOrPhone).FirstOrDefaultAsync(); var dockerInfo = await _repository.Where<Doctor>(t => t.EMail == inDto.EmailOrPhone || t.Phone == inDto.EmailOrPhone).FirstOrDefaultAsync();
if (dockerInfo != null) if (dockerInfo != null)
@ -192,6 +196,9 @@ namespace IRaCIS.Core.Application.Contracts
} }
else else
{ {
//删除验证码历史记录
await _repository.BatchDeleteAsync<VerificationCode>(t => t.Id == verifyRecord.Id);
//验证码正确 不处理 //验证码正确 不处理
} }

View File

@ -637,7 +637,8 @@ namespace IRaCIS.Core.Application.Services
HtmlPath = k.HtmlPath, HtmlPath = k.HtmlPath,
Path = k.Path, Path = k.Path,
InstanceNumber = k.InstanceNumber, InstanceNumber = k.InstanceNumber,
StudyId= k.StudyId,
SeriesId= k.SeriesId,
}).ToListAsync(); }).ToListAsync();
item.InstanceInfoList.ForEach(x => item.InstanceInfoList.ForEach(x =>

View File

@ -0,0 +1,77 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2024-07-30 10:39:01
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
///UserFeedBack
///</summary>
[Table("UserFeedBack")]
public class UserFeedBack : Entity, IAuditUpdate, IAuditAdd
{
[JsonIgnore]
public Trial Trial { get; set; }
[JsonIgnore]
public Subject Subject { get; set; }
[JsonIgnore]
public SubjectVisit SubjectVisit { get; set; }
[JsonIgnore]
public TrialSite TrialSite { get; set; }
[JsonIgnore]
public User CreateUser { get; set; }
public Guid? SubjectId { get; set; }
public Guid? SubjectVisitId { get; set; }
public int QuestionType { get; set; }
public string QuestionDescription { get; set; }
public Guid CreateUserId { get; set; }
public DateTime CreateTime { get; set; }
public Guid UpdateUserId { get; set; }
public DateTime UpdateTime { get; set; }
public int State { get; set; }
public Guid? TrialSiteId { get; set; }
public Guid TrialId { get; set; }
public string ScreenshotListStr { get; set; }
//
[NotMapped]
public List<string> ScreenshotList => JsonConvert.DeserializeObject<List<string>>(ScreenshotListStr);
//public class ScreenshotInfo
//{
// public string Path { get; set; }
// public string Name { get; set; }
//}
}
}

View File

@ -1,6 +1,7 @@
using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Models;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration.Json; using Microsoft.Extensions.Configuration.Json;
using System.Collections.Generic;
namespace IRaCIS.Core.Domain.Share namespace IRaCIS.Core.Domain.Share
{ {
@ -66,6 +67,13 @@ namespace IRaCIS.Core.Domain.Share
} }
public class EncreptResponseOption
{
public bool IsEnable { get; set; }
public List<string> ApiPathList { get; set; }
}
/// <summary> /// <summary>
/// 项目基础配置规则 /// 项目基础配置规则

View File

@ -495,6 +495,8 @@ namespace IRaCIS.Core.Infra.EFCore
public virtual DbSet<SCPImageUpload> SCPImageUpload { get; set; } public virtual DbSet<SCPImageUpload> SCPImageUpload { get; set; }
public virtual DbSet<UserFeedBack> UserFeedBack { get; set; }
public override async Task<int> SaveChangesAsync(CancellationToken cancellationToken = new CancellationToken()) public override async Task<int> SaveChangesAsync(CancellationToken cancellationToken = new CancellationToken())
{ {

View File

@ -54,7 +54,9 @@ namespace IRaCIS.Core.Infrastructure.Extention
NoToken = 10, NoToken = 10,
//带了Token,但是没有相应权限(该用户类型不能做) //带了Token,但是没有相应权限(该用户类型不能做)
HaveTokenNotAccess = 11 HaveTokenNotAccess = 11,
ResultEncrepted=12
} }

View File

@ -27,7 +27,7 @@
/// <summary> /// <summary>
/// 返回数据 /// 返回数据
/// </summary> /// </summary>
T Data { get; } T Data { get; set; }
} }
//public interface IResponseOutput<T,T2> : IResponseOutput //public interface IResponseOutput<T,T2> : IResponseOutput

View File

@ -25,7 +25,7 @@ namespace IRaCIS.Core.Infrastructure.Extention
/// 数据 兼顾以前 Json序列化的时候返回属性名为“Result” /// 数据 兼顾以前 Json序列化的时候返回属性名为“Result”
/// </summary> /// </summary>
[JsonProperty("Result")] [JsonProperty("Result")]
public T Data { get; private set; } public T Data { get; set; }
[JsonProperty("OtherInfo")] [JsonProperty("OtherInfo")]

View File

@ -4,7 +4,7 @@
public static readonly string ConnectionString = "Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true"; public static readonly string ConnectionString = "Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true";
public static readonly string DbDatabase = "Test_IRC"; public static readonly string DbDatabase = "Test_IRC";
//表名称用字符串,拼接 //表名称用字符串,拼接
public static readonly string TableName = "TrialSiteDicomAE"; public static readonly string TableName = "UserFeedBack";
//具体文件里面 例如service 可以配置是否分页 //具体文件里面 例如service 可以配置是否分页
} }
#> #>