Merge branch 'Test_HIR_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_HIR_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
21cafcab53
|
|
@ -2081,7 +2081,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum).ToList();
|
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum).ThenBy(t=>t.SignTime).ToList();
|
||||||
|
|
||||||
//处理裁判标记
|
//处理裁判标记
|
||||||
list = DealJudgeMark(criterion.ArbitrationRule, criterion.IsGlobalReading, list);
|
list = DealJudgeMark(criterion.ArbitrationRule, criterion.IsGlobalReading, list);
|
||||||
|
|
|
||||||
|
|
@ -1190,6 +1190,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public decimal VisitTaskNum { get; set; }
|
public decimal VisitTaskNum { get; set; }
|
||||||
|
|
||||||
|
public DateTime? SignTime { get; set; }
|
||||||
|
|
||||||
public bool? IsBaseline { get; set; }
|
public bool? IsBaseline { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -849,7 +849,7 @@ namespace IRaCIS.Application.Services
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var list = _identityUserRepository.Where(t => t.Id == _userInfo.IdentityUserId).SelectMany(t => t.IdentityUserHospitalGroupList).Where(t => t.IsDisabled == false && t.HospitalGroup.IsEnable == true)
|
var list = _identityUserRepository.Where(t => t.Id == _userInfo.IdentityUserId).SelectMany(t => t.IdentityUserHospitalGroupList).Where(t => t.IsDisabled == false && t.HospitalGroup.IsEnable == true)
|
||||||
.Select(t => new HospitalGroupInfo() { Code = t.HospitalGroup.Code, Id = t.Id, Name = t.HospitalGroup.Name, IsManager = t.IsManager }).ToList();
|
.Select(t => new HospitalGroupInfo() { Code = t.HospitalGroup.Code, Id = t.HospitalGroupId, Name = t.HospitalGroup.Name, IsManager = t.IsManager }).ToList();
|
||||||
|
|
||||||
item.CurrentUserHospitalGroupList = list;
|
item.CurrentUserHospitalGroupList = list;
|
||||||
|
|
||||||
|
|
@ -981,7 +981,7 @@ namespace IRaCIS.Application.Services
|
||||||
[FromServices] IRepository<SCPStudyHospitalGroup> _scpStudyHospitalGroupRepository)
|
[FromServices] IRepository<SCPStudyHospitalGroup> _scpStudyHospitalGroupRepository)
|
||||||
{
|
{
|
||||||
|
|
||||||
var existList = _scpStudyHospitalGroupRepository.Where(t => t.SCPStudyId == scpStudyId).Select(t => t.HospitalGroupId).ToList();
|
var existList = _scpStudyHospitalGroupRepository.Where(t => t.SCPStudyId == scpStudyId && t.HospitalGroup.IsEnable).Select(t => t.HospitalGroupId).ToList();
|
||||||
|
|
||||||
var isAdminOrOAOrGA = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.Admin || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.OA
|
var isAdminOrOAOrGA = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.Admin || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.OA
|
||||||
|| _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.GA;
|
|| _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.GA;
|
||||||
|
|
@ -991,7 +991,7 @@ namespace IRaCIS.Application.Services
|
||||||
.Where(t => t.IsDisabled == false && t.HospitalGroup.IsEnable == true).Select(t => t.HospitalGroupId).ToList();
|
.Where(t => t.IsDisabled == false && t.HospitalGroup.IsEnable == true).Select(t => t.HospitalGroupId).ToList();
|
||||||
|
|
||||||
// abc 课题组,人属于AB 课题组,删除仅仅删除这个标签 直接返回
|
// abc 课题组,人属于AB 课题组,删除仅仅删除这个标签 直接返回
|
||||||
if (!isAdminOrOAOrGA && existList.Count >= currentPMHospitalGroupIdList.Count)
|
if (!isAdminOrOAOrGA && existList.Count > currentPMHospitalGroupIdList.Count)
|
||||||
{
|
{
|
||||||
//同课题组其他项目绑定了,那么这个绑定关系也不能删除
|
//同课题组其他项目绑定了,那么这个绑定关系也不能删除
|
||||||
|
|
||||||
|
|
@ -3619,7 +3619,7 @@ namespace IRaCIS.Application.Services
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var list = _identityUserReposiotry.Where(t => t.Id == _userInfo.IdentityUserId).SelectMany(t => t.IdentityUserHospitalGroupList).Where(t => t.IsDisabled == false && t.HospitalGroup.IsEnable == true)
|
var list = _identityUserReposiotry.Where(t => t.Id == _userInfo.IdentityUserId).SelectMany(t => t.IdentityUserHospitalGroupList).Where(t => t.IsDisabled == false && t.HospitalGroup.IsEnable == true)
|
||||||
.Select(t => new HospitalGroupInfo() { Code = t.HospitalGroup.Code, Id = t.Id, Name = t.HospitalGroup.Name, IsManager = t.IsManager }).ToList();
|
.Select(t => new HospitalGroupInfo() { Code = t.HospitalGroup.Code, Id = t.HospitalGroupId, Name = t.HospitalGroup.Name, IsManager = t.IsManager }).ToList();
|
||||||
|
|
||||||
item.CurrentUserHospitalGroupList = list;
|
item.CurrentUserHospitalGroupList = list;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,43 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region 课题组标签 标签跟患者进行关联
|
||||||
|
public class HospitalGroupTag : BaseFullAuditEntity
|
||||||
|
{
|
||||||
|
[JsonIgnore]
|
||||||
|
public HospitalGroup HospitalGroup { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Guid HospitalGroupId { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class PatientHospitalGroupTag : BaseAddAuditEntity
|
||||||
|
{
|
||||||
|
[ForeignKey("PatientId")]
|
||||||
|
[JsonIgnore]
|
||||||
|
public SCPPatient Patient { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public HospitalGroupTag HospitalGroupTag { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Guid PatientId { get; set; }
|
||||||
|
|
||||||
|
public Guid HospitalGroupTagId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Comment("用户课题组中间关系表")]
|
[Comment("用户课题组中间关系表")]
|
||||||
public class HospitalGroupIdentityUser : BaseFullAuditEntity
|
public class HospitalGroupIdentityUser : BaseFullAuditEntity
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -593,6 +593,11 @@ public class IRaCISDBContext : DbContext
|
||||||
|
|
||||||
public virtual DbSet<CmoveStudy> CmoveStudy { get; set; }
|
public virtual DbSet<CmoveStudy> CmoveStudy { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public virtual DbSet<HospitalGroupTag> HospitalGroupTag { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<PatientHospitalGroupTag> PatientHospitalGroupTag { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TestLength : Entity
|
public class TestLength : Entity
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,112 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class addtag : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "HospitalGroupTag",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
HospitalGroupId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Name = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
||||||
|
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_HospitalGroupTag", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_HospitalGroupTag_HospitalGroup_HospitalGroupId",
|
||||||
|
column: x => x.HospitalGroupId,
|
||||||
|
principalTable: "HospitalGroup",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_HospitalGroupTag_User_CreateUserId",
|
||||||
|
column: x => x.CreateUserId,
|
||||||
|
principalTable: "User",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PatientHospitalGroupTag",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
PatientId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
HospitalGroupTagId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_PatientHospitalGroupTag", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PatientHospitalGroupTag_HospitalGroupTag_HospitalGroupTagId",
|
||||||
|
column: x => x.HospitalGroupTagId,
|
||||||
|
principalTable: "HospitalGroupTag",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PatientHospitalGroupTag_SCPPatient_PatientId",
|
||||||
|
column: x => x.PatientId,
|
||||||
|
principalTable: "SCPPatient",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_PatientHospitalGroupTag_User_CreateUserId",
|
||||||
|
column: x => x.CreateUserId,
|
||||||
|
principalTable: "User",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_HospitalGroupTag_CreateUserId",
|
||||||
|
table: "HospitalGroupTag",
|
||||||
|
column: "CreateUserId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_HospitalGroupTag_HospitalGroupId",
|
||||||
|
table: "HospitalGroupTag",
|
||||||
|
column: "HospitalGroupId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PatientHospitalGroupTag_CreateUserId",
|
||||||
|
table: "PatientHospitalGroupTag",
|
||||||
|
column: "CreateUserId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PatientHospitalGroupTag_HospitalGroupTagId",
|
||||||
|
table: "PatientHospitalGroupTag",
|
||||||
|
column: "HospitalGroupTagId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_PatientHospitalGroupTag_PatientId",
|
||||||
|
table: "PatientHospitalGroupTag",
|
||||||
|
column: "PatientId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PatientHospitalGroupTag");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "HospitalGroupTag");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2973,6 +2973,40 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.HospitalGroupTag", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreateTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid>("CreateUserId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid>("HospitalGroupId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(400)
|
||||||
|
.HasColumnType("nvarchar(400)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("UpdateTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid>("UpdateUserId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CreateUserId");
|
||||||
|
|
||||||
|
b.HasIndex("HospitalGroupId");
|
||||||
|
|
||||||
|
b.ToTable("HospitalGroupTag");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b =>
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -3746,6 +3780,34 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.ToTable("PIAudit");
|
b.ToTable("PIAudit");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.PatientHospitalGroupTag", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreateTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid>("CreateUserId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid>("HospitalGroupTagId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid>("PatientId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CreateUserId");
|
||||||
|
|
||||||
|
b.HasIndex("HospitalGroupTagId");
|
||||||
|
|
||||||
|
b.HasIndex("PatientId");
|
||||||
|
|
||||||
|
b.ToTable("PatientHospitalGroupTag");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b =>
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -15255,6 +15317,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Navigation("IdentityUser");
|
b.Navigation("IdentityUser");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.HospitalGroupTag", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("CreateUserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("IRaCIS.Core.Domain.Models.HospitalGroup", "HospitalGroup")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("HospitalGroupId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("CreateUserRole");
|
||||||
|
|
||||||
|
b.Navigation("HospitalGroup");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b =>
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||||
|
|
@ -15418,6 +15499,33 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Navigation("VisitTask");
|
b.Navigation("VisitTask");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.PatientHospitalGroupTag", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("CreateUserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("IRaCIS.Core.Domain.Models.HospitalGroupTag", "HospitalGroupTag")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("HospitalGroupTagId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("IRaCIS.Core.Domain.Models.SCPPatient", "Patient")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PatientId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("CreateUserRole");
|
||||||
|
|
||||||
|
b.Navigation("HospitalGroupTag");
|
||||||
|
|
||||||
|
b.Navigation("Patient");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b =>
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.Payment", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue