修改接口和映射
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-08-21 11:08:37 +08:00
parent ce25556a9f
commit 8b72566b91
3 changed files with 16 additions and 4 deletions

View File

@ -150,8 +150,9 @@ namespace IRaCIS.Core.Application.Service
CreateMap<UserRole, IdentityUserTypeDTO>()
.ForMember(d => d.UserTypeShortName, c => c.MapFrom(t => t.UserTypeRole.UserTypeShortName));
CreateMap<UserAddUserType, UserRole>();
}
}
}

View File

@ -525,7 +525,7 @@ namespace IRaCIS.Application.Contracts
public class SCPStudyHospitalGroupCommand
{
public Guid HospitalGroupId { get; set; }
public List<Guid> HospitalGroupIdList { get; set; }
public List<Guid> SCPstudyIdList { get; set; }
public int AddOrDelete { get; set; }

View File

@ -818,7 +818,12 @@ namespace IRaCIS.Application.Services
//添加
foreach (var item in incommand.SCPstudyIdList)
{
await _SCPStudyHospitalGroupRepository.AddAsync(new SCPStudyHospitalGroup() { SCPStudyId = item, HospitalGroupId = incommand.HospitalGroupId });
foreach (var hospitalGroupId in incommand.HospitalGroupIdList)
{
await _SCPStudyHospitalGroupRepository.AddAsync(new SCPStudyHospitalGroup() { SCPStudyId = item, HospitalGroupId = hospitalGroupId });
}
}
}
@ -827,7 +832,13 @@ namespace IRaCIS.Application.Services
//删除
foreach (var item in incommand.SCPstudyIdList)
{
await _SCPStudyHospitalGroupRepository.DeleteFromQueryAsync(t => t.HospitalGroupId == incommand.HospitalGroupId && t.SCPStudyId == item);
foreach (var hospitalGroupId in incommand.HospitalGroupIdList)
{
await _SCPStudyHospitalGroupRepository.DeleteFromQueryAsync(t => t.HospitalGroupId == hospitalGroupId && t.SCPStudyId == item);
}
}
}