增加callningAE
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-08-21 17:36:57 +08:00
parent 652d90af98
commit 75f0f5e3a5
7 changed files with 18947 additions and 0 deletions

View File

@ -37,6 +37,8 @@ public class HospitalGroupAddOrEdit
public bool IsEnable { get; set; }
public string CallingAE { get; set; }
public List<Guid> IdentityUserIdList { get; set; }
}
@ -53,6 +55,8 @@ public class HospitalGroupQuery : PageInput
public string? Name { get; set; }
public bool? IsEnable { get; set; }
public string? CallingAE { get; set; }
}

View File

@ -48,6 +48,7 @@ public class HospitalGroupService(IRepository<HospitalGroup> _hospitalGroupRepos
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ContactPhone), t => t.ContactPhone.Contains(inQuery.ContactPhone))
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ContactName), t => t.ContactName.Contains(inQuery.ContactName))
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.GA, t => _userInfo.HospitalGroupIdList.Contains(t.Id))
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.CallingAE), t => t.CallingAE.Contains(inQuery.CallingAE))
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
.ProjectTo<HospitalGroupView>(_mapper.ConfigurationProvider);
@ -71,6 +72,7 @@ public class HospitalGroupService(IRepository<HospitalGroup> _hospitalGroupRepos
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Affiliation), t => t.Affiliation.Contains(inQuery.Affiliation))
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ContactPhone), t => t.ContactPhone.Contains(inQuery.ContactPhone))
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ContactName), t => t.ContactName.Contains(inQuery.ContactName))
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.CallingAE), t => t.CallingAE.Contains(inQuery.CallingAE))
.WhereIf(!inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
.ProjectTo<HospitalGroupView>(_mapper.ConfigurationProvider);

View File

@ -272,6 +272,8 @@ namespace IRaCIS.Application.Services
// throw new BusinessValidationFailedException($"已超过当前系统配置的未启动项目数量的限制,您的操作被限制,请获取授权再进行操作!");
//}
var hospitalInfo = await _fusionCache.GetOrSetAsync(CacheKeys.Hospital, _ => CacheHelper.GetHospitalCode(_hIRHospitalRepository), TimeSpan.FromDays(7));
inCommand.ResearchProgramNo = inCommand.ResearchProgramNo.Trim();
if (inCommand.Id == Guid.Empty || inCommand.Id == null)
@ -332,6 +334,8 @@ namespace IRaCIS.Application.Services
trial.IsConfigureEmail = true;
trial.CreateTime = DateTime.Now;
trial.HospitalId = hospitalInfo.Id;
var success = await _trialRepository.SaveChangesAsync();

View File

@ -30,6 +30,8 @@ namespace IRaCIS.Core.Domain.Models
public string ContactPhone { get; set; }
public string CallingAE { get; set; } = string.Empty;
public bool IsEnable { get; set; }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,75 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class addGroupAE : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_SCPStudyHospitalGroup_SCPStudy_SCPStudyId",
table: "SCPStudyHospitalGroup");
migrationBuilder.AddColumn<string>(
name: "CallingAE",
table: "HospitalGroup",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.CreateIndex(
name: "IX_Trial_HospitalGroupId",
table: "Trial",
column: "HospitalGroupId");
migrationBuilder.AddForeignKey(
name: "FK_SCPStudyHospitalGroup_SCPStudy_SCPStudyId",
table: "SCPStudyHospitalGroup",
column: "SCPStudyId",
principalTable: "SCPStudy",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Trial_HospitalGroup_HospitalGroupId",
table: "Trial",
column: "HospitalGroupId",
principalTable: "HospitalGroup",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_SCPStudyHospitalGroup_SCPStudy_SCPStudyId",
table: "SCPStudyHospitalGroup");
migrationBuilder.DropForeignKey(
name: "FK_Trial_HospitalGroup_HospitalGroupId",
table: "Trial");
migrationBuilder.DropIndex(
name: "IX_Trial_HospitalGroupId",
table: "Trial");
migrationBuilder.DropColumn(
name: "CallingAE",
table: "HospitalGroup");
migrationBuilder.AddForeignKey(
name: "FK_SCPStudyHospitalGroup_SCPStudy_SCPStudyId",
table: "SCPStudyHospitalGroup",
column: "SCPStudyId",
principalTable: "SCPStudy",
principalColumn: "SeqId",
onDelete: ReferentialAction.Cascade);
}
}
}

View File

@ -2786,6 +2786,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasColumnType("nvarchar(400)")
.HasComment("所属科室");
b.Property<string>("CallingAE")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(400)
@ -11031,6 +11036,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.HasIndex("CreateUserId");
b.HasIndex("HospitalGroupId");
b.HasIndex("IndicationTypeId");
b.HasIndex("PhaseId");
@ -16402,6 +16409,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.HasOne("IRaCIS.Core.Domain.Models.SCPStudy", "SCPStudy")
.WithMany("HospitalGroupList")
.HasForeignKey("SCPStudyId")
.HasPrincipalKey("Id")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@ -17272,6 +17280,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("IRaCIS.Core.Domain.Models.HospitalGroup", "HospitalGroup")
.WithMany()
.HasForeignKey("HospitalGroupId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("IRaCIS.Core.Domain.Models.Dictionary", "IndicationType")
.WithMany()
.HasForeignKey("IndicationTypeId")
@ -17324,6 +17338,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Navigation("CreateUserRole");
b.Navigation("HospitalGroup");
b.Navigation("IndicationType");
b.Navigation("Phase");