用户配置修改
continuous-integration/drone/push Build is passing Details

Test_IRC_Net10
he 2026-04-23 10:29:52 +08:00
parent 34008ef6db
commit b29ed4d6a2
8 changed files with 22307 additions and 12 deletions

View File

@ -15488,7 +15488,7 @@
用户WL模板 用户WL模板
</summary> </summary>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.UserWLTemplateService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserWLTemplate},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)"> <member name="M:IRaCIS.Core.Application.Service.UserWLTemplateService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserWLTemplate},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingUserConfig},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
<summary> <summary>
用户WL模板 用户WL模板
</summary> </summary>
@ -15514,7 +15514,7 @@
<param name="userWLTemplateId"></param> <param name="userWLTemplateId"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.UserWLTemplateService.GetAutoCutNextTask"> <member name="M:IRaCIS.Core.Application.Service.UserWLTemplateService.GetAutoCutNextTask(IRaCIS.Core.Application.ViewModel.GetAutoCutNextTaskInDto)">
<summary> <summary>
获取自动切换任务配置 获取自动切换任务配置
</summary> </summary>
@ -17269,17 +17269,17 @@
</member> </member>
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Question"> <member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Question">
<summary> <summary>
质疑 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
</summary> </summary>
</member> </member>
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Consistency"> <member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Consistency">
<summary> <summary>
一致性核查 һ<EFBFBD><EFBFBD><EFBFBD>Ժ˲<EFBFBD>
</summary> </summary>
</member> </member>
<member name="T:IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto"> <member name="T:IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto">
<summary> <summary>
复制 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
</summary> </summary>
</member> </member>
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView"> <member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
@ -18653,6 +18653,41 @@
受试者ID 受试者ID
</summary> </summary>
</member> </member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.QAStudyInfoDTO.PatientSex">
<summary>
性别
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.QAStudyInfoDTO.PatientWeight">
<summary>
体重
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.QAStudyInfoDTO.RadionuclideTotalDose">
<summary>
总剂量
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.QAStudyInfoDTO.RadionuclideHalfLife">
<summary>
半衰期
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.QAStudyInfoDTO.RadiopharmaceuticalStartTime">
<summary>
注射时间
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.QAStudyInfoDTO.AcquisitionTime">
<summary>
成像 / 采集时间
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.QAStudyInfoDTO.IsHasEmptyPatientInfo">
<summary>
是否存在空字符串字段PatientSex、PatientWeight、RadionuclideTotalDose、RadionuclideHalfLife、RadiopharmaceuticalStartTime、AcquisitionTime 任意一个为空/空字符串)
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Contracts.DTO.CloseCheckChallengeDto"> <member name="T:IRaCIS.Core.Application.Contracts.DTO.CloseCheckChallengeDto">
<summary> <summary>
关闭一致性质疑Dto 关闭一致性质疑Dto

View File

@ -27,8 +27,16 @@ namespace IRaCIS.Core.Application.ViewModel
} }
public class GetAutoCutNextTaskInDto
{
public int ImageToolType { get; set; }
}
public class SetAutoCutNextTaskInDto public class SetAutoCutNextTaskInDto
{ {
public int ImageToolType { get; set; }
public bool AutoCutNextTask { get; set; } public bool AutoCutNextTask { get; set; }
/// <summary> /// <summary>

View File

@ -15,6 +15,7 @@ namespace IRaCIS.Core.Application.Service
/// </summary> /// </summary>
[ApiExplorerSettings(GroupName = "Reading")] [ApiExplorerSettings(GroupName = "Reading")]
public class UserWLTemplateService(IRepository<UserWLTemplate> _userWLTemplateRepository, public class UserWLTemplateService(IRepository<UserWLTemplate> _userWLTemplateRepository,
IRepository<ReadingUserConfig> _readingUserConfigRepository,
IRepository<UserRole> _userRoleRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService IRepository<UserRole> _userRoleRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService
{ {
@ -82,15 +83,18 @@ namespace IRaCIS.Core.Application.Service
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<object> GetAutoCutNextTask() public async Task<object> GetAutoCutNextTask(GetAutoCutNextTaskInDto inDto)
{ {
var result = await _userRoleRepository.Where(x => x.Id == _userInfo.UserRoleId).Select(x => new var result = await _readingUserConfigRepository.Where(x => x.UserRoleId == _userInfo.UserRoleId&&x.ImageToolType==inDto.ImageToolType).Select(x => new
{ {
AutoCutNextTask = x.AutoCutNextTask, AutoCutNextTask = x.AutoCutNextTask,
IsDoubleScreen = x.IsDoubleScreen, IsDoubleScreen = x.IsDoubleScreen,
}).FirstOrDefaultAsync(); }).FirstOrDefaultAsync();
if (result == null) if (result == null)
{ {
return new return new
@ -111,13 +115,29 @@ namespace IRaCIS.Core.Application.Service
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<IResponseOutput> SetAutoCutNextTask(SetAutoCutNextTaskInDto inDto) public async Task<IResponseOutput> SetAutoCutNextTask(SetAutoCutNextTaskInDto inDto)
{
await _userRoleRepository.UpdatePartialFromQueryAsync(_userInfo.UserRoleId, x => new UserRole()
{ {
var userConfig = await _readingUserConfigRepository.FirstOrDefaultAsync(x => x.UserRoleId == _userInfo.UserRoleId && x.ImageToolType == inDto.ImageToolType);
if (userConfig == null)
{
await _readingUserConfigRepository.AddAsync(new ReadingUserConfig
{
UserRoleId = _userInfo.UserRoleId,
ImageToolType = inDto.ImageToolType,
AutoCutNextTask = inDto.AutoCutNextTask, AutoCutNextTask = inDto.AutoCutNextTask,
IsDoubleScreen = inDto.IsDoubleScreen IsDoubleScreen = inDto.IsDoubleScreen,
}); });
}
else
{
await _readingUserConfigRepository.UpdatePartialFromQueryAsync(x => x.Id == userConfig.Id, x => new ReadingUserConfig
{
AutoCutNextTask = inDto.AutoCutNextTask,
IsDoubleScreen = inDto.IsDoubleScreen,
});
}
await _userRoleRepository.SaveChangesAsync(); await _userRoleRepository.SaveChangesAsync();

View File

@ -0,0 +1,28 @@
namespace IRaCIS.Core.Domain.Models;
[Comment("项目阅片 - 用户配置")]
[Table("ReadingUserConfig")]
public class ReadingUserConfig : BaseAddAuditEntity
{
#region 导航属性
#endregion
public Guid UserRoleId { get; set; }
/// <summary>
/// 1 Dicom 2非Dicom 3 视频
/// </summary>
[Comment("影像工具类型")]
public int ImageToolType { get; set; }
[Comment("自动切换下一个任务")]
public bool AutoCutNextTask { get; set; }
/// <summary>
/// 是否双屏
/// </summary>
public bool IsDoubleScreen { get; set; } = false;
}

View File

@ -367,6 +367,7 @@ public class IRaCISDBContext : DbContext
#region Reading #region Reading
public virtual DbSet<ReadingUserConfig> ReadingUserConfig { get; set; }
public virtual DbSet<Segmentation> Segmentation { get; set; } public virtual DbSet<Segmentation> Segmentation { get; set; }
public virtual DbSet<Segment> Segment { get; set; } public virtual DbSet<Segment> Segment { get; set; }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,42 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class readingUserConfig : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ReadingUserConfig",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UserRoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ImageToolType = table.Column<int>(type: "int", nullable: false, comment: "影像工具类型"),
AutoCutNextTask = table.Column<bool>(type: "bit", nullable: false, comment: "自动切换下一个任务"),
IsDoubleScreen = table.Column<bool>(type: "bit", nullable: false),
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
},
comment: "项目阅片 - 用户配置");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ReadingUserConfig");
}
}
}

View File

@ -8410,6 +8410,45 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
}); });
}); });
modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingUserConfig", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<bool>("AutoCutNextTask")
.HasColumnType("bit")
.HasComment("自动切换下一个任务");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<int>("ImageToolType")
.HasColumnType("int")
.HasComment("影像工具类型");
b.Property<bool>("IsDoubleScreen")
.HasColumnType("bit");
b.Property<Guid>("UserRoleId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
SqlServerKeyBuilderExtensions.IsClustered(b.HasKey("Id"), false);
b.HasIndex("CreateTime");
SqlServerIndexBuilderExtensions.IsClustered(b.HasIndex("CreateTime"));
b.ToTable("ReadingUserConfig", t =>
{
t.HasComment("项目阅片 - 用户配置");
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
@ -18959,6 +18998,17 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Navigation("TrialReadingCriterion"); b.Navigation("TrialReadingCriterion");
}); });
modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingUserConfig", b =>
{
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
.WithMany()
.HasForeignKey("CreateUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CreateUserRole");
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b => modelBuilder.Entity("IRaCIS.Core.Domain.Models.ResearchPublication", b =>
{ {
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole") b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")