Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is running Details

Test_IRC_Net10
hang 2026-04-23 14:55:16 +08:00
commit 58eb59bd61
12 changed files with 22375 additions and 16 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

@ -196,7 +196,7 @@ namespace IRaCIS.Core.Application.Contracts
public class EditPatientInfoCommand public class EditPatientInfoCommand
{ {
public Guid StudyId { get; set; } public Guid Id { get; set; }
/// <summary> /// <summary>
/// 性别 /// 性别
/// </summary> /// </summary>
@ -236,7 +236,7 @@ namespace IRaCIS.Core.Application.Contracts
public class PatientInfoDto public class PatientInfoDto
{ {
public Guid StudyId { get; set; } public Guid Id { get; set; }
/// <summary> /// <summary>
/// 性别 /// 性别

View File

@ -198,7 +198,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
[HttpPost] [HttpPost]
public async Task<IResponseOutput> EditPatientInfo(EditPatientInfoCommand command) public async Task<IResponseOutput> EditPatientInfo(EditPatientInfoCommand command)
{ {
await _dicomStudyRepository.UpdatePartialFromQueryAsync(command.StudyId, x => new DicomStudy await _dicomStudyRepository.UpdatePartialFromQueryAsync(command.Id, x => new DicomStudy
{ {
PatientSex = command.PatientSex, PatientSex = command.PatientSex,
PatientWeight = command.PatientWeight, PatientWeight = command.PatientWeight,

View File

@ -415,6 +415,52 @@ namespace IRaCIS.Core.Application.Contracts.DTO
public string BodyPartForEditOther { get; set; } public string BodyPartForEditOther { get; set; }
#region 核验
/// <summary>
/// 性别
/// </summary>
public string PatientSex { get; set; } = null!;
/// <summary>
/// 体重
/// </summary>
public string PatientWeight { get; set; }
/// <summary>
/// 总剂量
/// </summary>
public string RadionuclideTotalDose { get; set; } = null!;
/// <summary>
/// 半衰期
/// </summary>
public string RadionuclideHalfLife { get; set; } = null!;
/// <summary>
/// 注射时间
/// </summary>
public string RadiopharmaceuticalStartTime { get; set; } = null!;
/// <summary>
/// 成像 / 采集时间
/// </summary>
public string AcquisitionTime { get; set; } = null!;
#endregion
/// <summary>
/// 是否存在空字符串字段PatientSex、PatientWeight、RadionuclideTotalDose、RadionuclideHalfLife、RadiopharmaceuticalStartTime、AcquisitionTime 任意一个为空/空字符串)
/// </summary>
public bool IsHasEmptyPatientInfo =>
string.IsNullOrWhiteSpace(PatientSex) ||
string.IsNullOrWhiteSpace(PatientWeight) ||
string.IsNullOrWhiteSpace(RadionuclideTotalDose) ||
string.IsNullOrWhiteSpace(RadionuclideHalfLife) ||
string.IsNullOrWhiteSpace(RadiopharmaceuticalStartTime) ||
string.IsNullOrWhiteSpace(AcquisitionTime);
} }
public class QASeriesInfoDto public class QASeriesInfoDto

View File

@ -1,4 +1,5 @@
using IRaCIS.Core.Application.Contracts; using DocumentFormat.OpenXml.InkML;
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Contracts.DTO; using IRaCIS.Core.Application.Contracts.DTO;
using IRaCIS.Core.Application.Filter; using IRaCIS.Core.Application.Filter;
using IRaCIS.Core.Application.Helper; using IRaCIS.Core.Application.Helper;
@ -1108,6 +1109,23 @@ namespace IRaCIS.Core.Application.Image.QA
{ {
await VerifyIsCanQCAsync(null, subjectVisitId); await VerifyIsCanQCAsync(null, subjectVisitId);
var visit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId);
var isExistStudyClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(t => t.TrialId == visit.TrialId && t.ClinicalDataLevel == ClinicalLevel.Study&&t.IsConfirm&&t.IsApply);
if(isExistStudyClinicalData)
{
List<string> modalitieTypes = new List<string>() { "PT、CT", "CT、PT", "PET-CT" };
var studyList=await _dicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId&& modalitieTypes.Contains(t.Modalities)).ProjectTo<QAStudyInfoDTO>(_mapper.ConfigurationProvider).ToListAsync();
if (studyList.Any(x => x.IsHasEmptyPatientInfo))
{
return ResponseOutput.NotOk(_localizer["QCOperation_IsHasEmptyPatientInfo"]);
}
}
if (await _qcChallengeRepository.AnyAsync(t => t.SubjectVisitId == subjectVisitId && t.IsClosed == false)) if (await _qcChallengeRepository.AnyAsync(t => t.SubjectVisitId == subjectVisitId && t.IsClosed == false))
{ {
//---当前访视有质疑未关闭,不允许该操作 //---当前访视有质疑未关闭,不允许该操作

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
@ -112,14 +116,30 @@ namespace IRaCIS.Core.Application.Service
[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,
IsDoubleScreen = inDto.IsDoubleScreen,
});
}
else
{
await _readingUserConfigRepository.UpdatePartialFromQueryAsync(x => x.Id == userConfig.Id, x => new ReadingUserConfig
{
AutoCutNextTask = inDto.AutoCutNextTask,
IsDoubleScreen = inDto.IsDoubleScreen,
});
}
AutoCutNextTask = inDto.AutoCutNextTask,
IsDoubleScreen = inDto.IsDoubleScreen
});
await _userRoleRepository.SaveChangesAsync(); await _userRoleRepository.SaveChangesAsync();
return ResponseOutput.Ok(); return ResponseOutput.Ok();
} }

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")