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 passing Details

Test_IRC_Net8
hang 2025-10-23 14:13:03 +08:00
commit 19f52bc133
11 changed files with 41493 additions and 8 deletions

View File

@ -42,6 +42,7 @@ public static class SendEmailHelper
await smtp.DisconnectAsync(true);
}
}
catch (Exception ex)

View File

@ -972,6 +972,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 问题分类
/// </summary>
public QuestionClassify? QuestionClassify { get; set; }
public bool IsDicomReading { get; set; } = true;
}
public class GetReadingTableQuestionOutDto
@ -1272,6 +1274,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public string? PicturePath { get; set; }
public string? Path { get; set; }
/// <summary>
/// NumberOfFrames
/// </summary>
@ -2470,11 +2474,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid? StudyId { get; set; }
public string MarkTool { get; set; }
public string OrderMarkName { get; set; }
public Guid? MarkId { get; set; }
public Guid? NoneDicomFileId { get; set; }
public string Path { get; set; }
public string PicturePath { get; set; } = string.Empty;
public string MeasureData { get; set; } = string.Empty;
}
@ -2490,11 +2501,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid VisitTaskId { get; set; }
public Guid? StudyId { get; set; }
public string MarkTool { get; set; }
public string OrderMarkName { get; set; }
public Guid? MarkId { get; set; }
public Guid? NoneDicomFileId { get; set; }
public string Path { get; set; }
public string PicturePath { get; set; } = string.Empty;
public string MeasureData { get; set; } = string.Empty;
public Guid QuestionId { get; set; }

View File

@ -1,4 +1,5 @@
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Drawing.Charts;
using DocumentFormat.OpenXml.Office2019.Excel.ThreadedComments;
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Filter;
@ -1309,14 +1310,44 @@ namespace IRaCIS.Core.Application.Service
var organIds = tableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
var organList = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync();
var tableQuestionMarkList=new List<QuestionMarkInfo>();
if (inDto.IsDicomReading)
{
// 删除病灶不删除病灶标记 所以查询question的时候 已经删除的病灶对应的标记的信息要排除
var rowids = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => x.Id).ToListAsync();
// 删除病灶不删除病灶标记 所以查询question的时候 已经删除的病灶对应的标记的信息要排除
var rowids = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => x.Id).ToListAsync();
List<Guid?> rowidnull = rowids.Select(x => (Guid?)x).ToList();
List<Guid?> rowidnull = rowids.Select(x => (Guid?)x).ToList();
tableQuestionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId != null
).ProjectTo<QuestionMarkInfo>(_mapper.ConfigurationProvider).ToListAsync();
}
else
{
var markList = await _readingNoneDicomMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId
).ProjectTo<QuestionMarkInfo>(_mapper.ConfigurationProvider).ToListAsync();
var bingList= await _readingNoneDicomMarkBindingRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId)
.ProjectTo<QuestionMarkInfo>(_mapper.ConfigurationProvider).ToListAsync();
tableQuestionMarkList = markList
.GroupJoin(
bingList,
l => l.MarkId,
r => r.MarkId,
(l, rs) => rs.DefaultIfEmpty()
.Select(r =>
{
var info = l.Clone();
info.QuestionId = r?.QuestionId;
info.TableQuestionId = r?.TableQuestionId;
info.RowId = r?.RowId;
return info;
}))
.SelectMany(g => g).ToList();
}
var tableQuestionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId&&x.QuestionId!=null
).ProjectTo<QuestionMarkInfo>(_mapper.ConfigurationProvider).ToListAsync();
return (await GetReadingTableQuestion(
new GetReadingTableQuestionOrAnswerInDto()

View File

@ -67,11 +67,13 @@ namespace IRaCIS.Core.Application.Service
var mark = await _readingNoneDicomMarkRepository.Where(x => x.MarkId == inDto.MarkId).FirstOrDefaultAsync();
if (mark != null)
{
if (mark.MeasureData != inDto.MeasureData || mark.Path != inDto.Path)
if (mark.MeasureData != inDto.MeasureData || mark.Path != inDto.Path|| mark.OrderMarkName != inDto.OrderMarkName || mark.MarkTool != inDto.MarkTool)
{
await _readingNoneDicomMarkRepository.UpdatePartialFromQueryAsync(x => x.Id == mark.Id, u => new Domain.Models.ReadingNoneDicomMark()
{
MeasureData = inDto.MeasureData,
MarkTool=inDto.MarkTool,
OrderMarkName=inDto.OrderMarkName,
Path = inDto.Path
});
}
@ -84,8 +86,11 @@ namespace IRaCIS.Core.Application.Service
Id = NewId.NextGuid(),
VisitTaskId = inDto.VisitTaskId,
StudyId = inDto.StudyId,
MarkTool = inDto.MarkTool,
OrderMarkName = inDto.OrderMarkName,
NoneDicomFileId = inDto.NoneDicomFileId,
Path = inDto.Path,
PicturePath = inDto.PicturePath,
MeasureData = inDto.MeasureData,
MarkId = inDto.MarkId
};

View File

@ -124,6 +124,12 @@ namespace IRaCIS.Core.Application.Service
CreateMap<ReadingTaskQuestionMark, GetTableAnswerRowInfoOutDto>()
.ForMember(d => d.FristAddTaskId, u => u.MapFrom(s => s.FristAddTaskId!.Value));
CreateMap<ReadingTaskQuestionMark, QuestionMarkInfo>();
CreateMap<ReadingNoneDicomMark, QuestionMarkInfo>();
CreateMap<ReadingNoneDicomMarkBinding, QuestionMarkInfo>();
CreateMap<QuestionMarkInfo, ReadingTaskQuestionMark>();
//CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
// CreateMap<ReadingClinicalData, GetReadingClinicalDataListOutDto>()

View File

@ -15,11 +15,19 @@ public class ReadingNoneDicomMark : BaseAddAuditEntity
public Guid? StudyId { get; set; }
public Guid? NoneDicomFileId { get; set; }
[StringLength(1000)]
public string Path { get; set; }
[StringLength(1000)]
public string PicturePath { get; set; } = string.Empty;
[MaxLength]
public string MeasureData { get; set; } = string.Empty;
public string MarkTool { get; set; }
public string OrderMarkName { get; set; }
/// <summary>
/// 标记的唯一标识符
/// </summary>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class NoneMark : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "MarkTool",
table: "ReadingNoneDicomMark",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "OrderMarkName",
table: "ReadingNoneDicomMark",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
defaultValue: "");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "MarkTool",
table: "ReadingNoneDicomMark");
migrationBuilder.DropColumn(
name: "OrderMarkName",
table: "ReadingNoneDicomMark");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,50 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class PicturePath : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Path",
table: "ReadingNoneDicomMark",
type: "nvarchar(1000)",
maxLength: 1000,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400);
migrationBuilder.AddColumn<string>(
name: "PicturePath",
table: "ReadingNoneDicomMark",
type: "nvarchar(1000)",
maxLength: 1000,
nullable: false,
defaultValue: "");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PicturePath",
table: "ReadingNoneDicomMark");
migrationBuilder.AlterColumn<string>(
name: "Path",
table: "ReadingNoneDicomMark",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(1000)",
oldMaxLength: 1000);
}
}
}

View File

@ -5716,6 +5716,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid?>("MarkId")
.HasColumnType("uniqueidentifier");
b.Property<string>("MarkTool")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("MeasureData")
.IsRequired()
.HasColumnType("nvarchar(max)");
@ -5723,11 +5728,21 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid?>("NoneDicomFileId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Path")
b.Property<string>("OrderMarkName")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("Path")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<string>("PicturePath")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<Guid?>("StudyId")
.HasColumnType("uniqueidentifier");