修改scp 配置
parent
781a4a7b0b
commit
65e50fec54
|
@ -365,6 +365,9 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
public static class HttpContextExtension
|
public static class HttpContextExtension
|
||||||
{
|
{
|
||||||
public static string GetClientIP(this HttpContext context)
|
public static string GetClientIP(this HttpContext context)
|
||||||
|
{
|
||||||
|
//scp 服务创建的记录不能获取请求上下文
|
||||||
|
if (context != null)
|
||||||
{
|
{
|
||||||
var ip = context.Request.Headers["Cdn-Src-Ip"].FirstOrDefault();
|
var ip = context.Request.Headers["Cdn-Src-Ip"].FirstOrDefault();
|
||||||
if (!string.IsNullOrEmpty(ip))
|
if (!string.IsNullOrEmpty(ip))
|
||||||
|
@ -378,6 +381,11 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
|
|
||||||
return IpReplace(ip);
|
return IpReplace(ip);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static string IpReplace(string inip)
|
static string IpReplace(string inip)
|
||||||
{
|
{
|
||||||
|
|
|
@ -75,6 +75,8 @@ public class TaskInstanceConfigration : IEntityTypeConfiguration<TaskInstance>
|
||||||
public void Configure(EntityTypeBuilder<TaskInstance> builder)
|
public void Configure(EntityTypeBuilder<TaskInstance> builder)
|
||||||
{
|
{
|
||||||
builder.HasKey(e => e.SeqId);
|
builder.HasKey(e => e.SeqId);
|
||||||
|
|
||||||
|
builder.HasOne(e => e.TaskStudy).WithMany(t=>t.InstanceList).HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,6 +106,8 @@ public class SCPInstanceConfigration : IEntityTypeConfiguration<SCPInstance>
|
||||||
public void Configure(EntityTypeBuilder<SCPInstance> builder)
|
public void Configure(EntityTypeBuilder<SCPInstance> builder)
|
||||||
{
|
{
|
||||||
builder.HasKey(e => e.SeqId);
|
builder.HasKey(e => e.SeqId);
|
||||||
|
|
||||||
|
builder.HasOne(e => e.SCPStudy).WithMany(t => t.InstanceList).HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue