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 Include="Hangfire.AspNetCore" Version="1.8.14" />
<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="Invio.Extensions.Authentication.JwtBearer" Version="2.0.1" />
<PackageReference Include="LogDashboard" Version="1.4.8" />

View File

@ -28,6 +28,7 @@ using FellowOakDicom.Network;
using IRaCIS.Core.Application.Service.ImageAndDoc;
using IP2Region.Net.Abstractions;
using IP2Region.Net.XDB;
using IRaCIS.Core.Application.BusinessFilter;
#region 获取环境变量
@ -104,11 +105,9 @@ builder.Services.AddControllers(options =>
options.Filters.Add<ModelActionFilter>();
options.Filters.Add<ProjectExceptionFilter>();
options.Filters.Add<UnitOfWorkFilter>();
options.Filters.Add<EncreptApiResultFilter>(10);
options.Filters.Add<LimitUserRequestAuthorization>();
if (_configuration.GetSection("BasicSystemConfig").GetValue<bool>("OpenLoginLimit"))
{
options.Filters.Add<LimitUserRequestAuthorization>();
}
})
.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<AliyunOSSOptions>(_configuration.GetSection("AliyunOSS"));
builder.Services.AddOptions().Configure<ObjectStoreServiceOptions>(_configuration.GetSection("ObjectStoreService"));
builder.Services.AddOptions().Configure<EncreptResponseOption>(_configuration.GetSection("EncrypteResponseConfig"));
//动态WebApi + UnifiedApiResultFilter 省掉控制器代码
@ -297,7 +298,7 @@ try
var server = DicomServerFactory.Create<CStoreSCPService>(11112,userState: app.Services);
var server = DicomServerFactory.Create<CStoreSCPService>(11112, userState: app.Services);
app.Run();

View File

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

View File

@ -92,5 +92,12 @@
"DefaultPassword": "123456",
"DefaultInternalOrganizationName": "ExtImaging",
"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

@ -8,8 +8,9 @@ namespace IRaCIS.Application.Services.BusinessFilter
/// 统一返回前端数据包装之前在控制器包装现在修改为动态Api 在ResultFilter这里包装减少重复冗余代码
/// by zhouhang 2021.09.12 周末
/// </summary>
public class UnifiedApiResultFilter : Attribute, IAsyncResultFilter
{
public class UnifiedApiResultFilter : Attribute, IAsyncResultFilter
{
/// <summary>
/// 异步版本
/// </summary>
@ -26,15 +27,6 @@ namespace IRaCIS.Application.Services.BusinessFilter
//是200 并且没有包装 那么包装结果
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();
@ -64,8 +56,6 @@ namespace IRaCIS.Application.Services.BusinessFilter
objectResult.DeclaredType = apiResponse.GetType();
}
//}
}
//如果不是200 是IResponseOutput 不处理

View File

@ -190,7 +190,7 @@ namespace IRaCIS.Application.Services
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);
@ -229,7 +229,7 @@ namespace IRaCIS.Application.Services
messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UserResetEmail, messageToSend, emailConfigFunc);
var sucessHandle = GetEmailSuccessHandle(userId, verificationCode);
var sucessHandle = GetEmailSuccessHandle(userId, verificationCode, emailAddress);
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle);
@ -269,7 +269,7 @@ namespace IRaCIS.Application.Services
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);
@ -355,7 +355,7 @@ namespace IRaCIS.Application.Services
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);

View File

@ -79,6 +79,10 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
public int InstanceNumber { get; set; }
public Guid? StudyId { get; set; }
public Guid? SeriesId { get; set; }
[JsonIgnore]
public int ShowOrder { get; set; }
[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"]);
}
else if (verificationRecord.EmailOrPhone.Trim() != newEmail.Trim())
{
//发送验证嘛的和提交的邮箱不一致
return ResponseOutput.NotOk(_localizer["User_VerificationEmailNotSameWithBefore"]);
}
else //验证码正确 并且 没有超时
{
@ -684,7 +689,7 @@ namespace IRaCIS.Application.Services
[AllowAnonymous]
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();
//检查数据库是否存在该验证码
@ -707,6 +712,10 @@ namespace IRaCIS.Application.Services
}
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);
}

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.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 //验证码正确 并且 没有超时
{
//删除验证码历史记录
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();
if (dockerInfo != null)
@ -192,6 +196,9 @@ namespace IRaCIS.Core.Application.Contracts
}
else
{
//删除验证码历史记录
await _repository.BatchDeleteAsync<VerificationCode>(t => t.Id == verifyRecord.Id);
//验证码正确 不处理
}

View File

@ -637,7 +637,8 @@ namespace IRaCIS.Core.Application.Services
HtmlPath = k.HtmlPath,
Path = k.Path,
InstanceNumber = k.InstanceNumber,
StudyId= k.StudyId,
SeriesId= k.SeriesId,
}).ToListAsync();
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 Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration.Json;
using System.Collections.Generic;
namespace IRaCIS.Core.Domain.Share
{
@ -19,7 +20,7 @@ namespace IRaCIS.Core.Domain.Share
public int LoginMaxFailCount { get; set; }
public int LoginFailLockMinutes { get; set; }
public int LoginFailLockMinutes { get; set; }
public int AutoLoginOutMinutes { get; set; }
@ -39,9 +40,9 @@ namespace IRaCIS.Core.Domain.Share
public class SystemEmailSendConfig
{
public int Port { get; set; }
public int Port { get; set; }
public string Host { get; set; }
public string Host { get; set; }
public string FromEmail { get; set; }
@ -66,6 +67,13 @@ namespace IRaCIS.Core.Domain.Share
}
public class EncreptResponseOption
{
public bool IsEnable { get; set; }
public List<string> ApiPathList { get; set; }
}
/// <summary>
/// 项目基础配置规则
@ -89,7 +97,7 @@ namespace IRaCIS.Core.Domain.Share
public static string SystemSiteCodePrefix { get; set; }
public static string BlindTaskPrefix { get; set; }
public static string BlindTaskPrefix { get; set; }
/// <summary>
/// 用户默认密码
@ -104,7 +112,7 @@ namespace IRaCIS.Core.Domain.Share
{
Path = "appsettings.json",
ReloadOnChange = true
})
})
.Build();
DoctorCodePrefix = configuration.GetSection("IRaCISBasicConfig").GetValue<string>("DoctorCodePrefix");
@ -112,7 +120,7 @@ namespace IRaCIS.Core.Domain.Share
QCChallengeCodePrefix = configuration.GetSection("IRaCISBasicConfig").GetValue<string>("QCChallengeCodePrefix");
NoneDicomStudyCodePrefix = configuration.GetSection("IRaCISBasicConfig").GetValue<string>("NoneDicomStudyCodePrefix");
DicomStudyCodePrefix = configuration.GetSection("IRaCISBasicConfig").GetValue<string>("DicomStudyCodePrefix");
DefaultPassword= configuration.GetSection("IRaCISBasicConfig").GetValue<string>("DefaultPassword");
DefaultPassword = configuration.GetSection("IRaCISBasicConfig").GetValue<string>("DefaultPassword");
SystemSiteCodePrefix = configuration.GetSection("IRaCISBasicConfig").GetValue<string>("SystemSiteCodePrefix");
DefaultInternalOrganizationName = configuration.GetSection("IRaCISBasicConfig").GetValue<string>("DefaultInternalOrganizationName");
@ -125,7 +133,7 @@ namespace IRaCIS.Core.Domain.Share
//获取实体编码字符串
public static string GetCodeStr(int codeInt ,string typeStr)
public static string GetCodeStr(int codeInt, string typeStr)
{
switch (typeStr)
{
@ -139,7 +147,7 @@ namespace IRaCIS.Core.Domain.Share
case nameof(QCChallenge):
return QCChallengeCodePrefix+ codeInt.ToString("D5");
return QCChallengeCodePrefix + codeInt.ToString("D5");
case nameof(NoneDicomStudy):
@ -164,5 +172,5 @@ namespace IRaCIS.Core.Domain.Share
}
}

View File

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

View File

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

View File

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

View File

@ -25,7 +25,7 @@ namespace IRaCIS.Core.Infrastructure.Extention
/// 数据 兼顾以前 Json序列化的时候返回属性名为“Result”
/// </summary>
[JsonProperty("Result")]
public T Data { get; private set; }
public T Data { get; set; }
[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 DbDatabase = "Test_IRC";
//表名称用字符串,拼接
public static readonly string TableName = "TrialSiteDicomAE";
public static readonly string TableName = "UserFeedBack";
//具体文件里面 例如service 可以配置是否分页
}
#>