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-11 15:38:41 +08:00
commit a85cc1236c
9 changed files with 20487 additions and 5 deletions

View File

@ -10554,6 +10554,11 @@
影像标记
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.IsPreinstall">
<summary>
是否预设
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.ImageTool">
<summary>
影像工具
@ -10697,6 +10702,11 @@
数值类型
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.IsPreinstall">
<summary>
是否预设
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.ClassifyType">
<summary>
分类问题类型

View File

@ -1007,6 +1007,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public int? PageShowOrder { get; set; }
public bool IsPreinstall { get {
return this.TableQuestions.Questions.Any(x => x.IsPreinstall);
} }
public List<TrialReadQuestionData> Childrens { get; set; }

View File

@ -324,6 +324,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public ImageMark? ImageMarkEnum { get; set; }
/// <summary>
/// 是否预设
/// </summary>
public bool IsPreinstall { get; set; } = false;
/// <summary>
/// 影像工具
/// </summary>
@ -513,6 +519,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public ValueOfType? ValueType { get; set; }
/// <summary>
/// 是否预设
/// </summary>
public bool IsPreinstall { get; set; } = false;
public bool IsCopy { get; set; } = false;
@ -1692,6 +1703,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
{
public Guid QuestionId { get; set; }
public string QuestionName { get; set; }
[NotMapped]

View File

@ -1,4 +1,5 @@
using IRaCIS.Core.Application.Service.Reading.Dto;
using DocumentFormat.OpenXml.EMMA;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infra.EFCore.Common;
@ -366,6 +367,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var isReadingTaskViewInOrder = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskinfo.TrialReadingCriterionId).Select(x => x.IsReadingTaskViewInOrder).FirstOrDefaultAsync();
var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
List<ReadingTableAnswerRowInfo> addRowList = new List<ReadingTableAnswerRowInfo>();
List<ReadingTableQuestionAnswer> addTableQuestionAnswerList = new List<ReadingTableQuestionAnswer>();
// 判断当前任务是否是基线
if (taskinfo.SourceSubjectVisitId != baseLineVisitId && isReadingTaskViewInOrder == ReadingOrder.InOrder)
{
@ -434,13 +437,63 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
addRowList.AddRange(addList);
addTableQuestionAnswerList.AddRange(tableAnswers);
}
}
// 添加 是否预设
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.IsPreinstall).Include(x=>x.ReadingQuestionTrial).ToListAsync();
if (tableQuestionList.Count() > 0)
{
foreach (var tableQuestion in tableQuestionList)
{
var thisTableQuestionList=await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == tableQuestion.ReadingQuestionId).ToListAsync();
decimal index = 1;
foreach (var item in tableQuestion.TypeValue.Split('|'))
{
var newRowId = NewId.NextGuid();
addRowList.Add(new ReadingTableAnswerRowInfo()
{
Id = newRowId,
QuestionId = tableQuestion.ReadingQuestionId,
VisitTaskId = taskinfo.Id,
TrialId = taskinfo.TrialId,
RowIndex = index,
IsCurrentTaskAdd = true,
BlindName = taskinfo.TaskBlindName,
OrderMark = tableQuestion.ReadingQuestionTrial.OrderMark,
FristAddTaskId = taskinfo.Id,
RowMark = tableQuestion.ReadingQuestionTrial.OrderMark + decimal.Parse(index.ToString()).GetLesionMark()
});
foreach (var thisTableQuestion in thisTableQuestionList)
{
addTableQuestionAnswerList.Add(new ReadingTableQuestionAnswer()
{
Answer = thisTableQuestion.Id== tableQuestion.Id? item:string.Empty,
QuestionId = tableQuestion.ReadingQuestionId,
TrialId = taskinfo.TrialId,
VisitTaskId = taskinfo.Id,
RowId = newRowId,
RowIndex = index,
TableQuestionId = thisTableQuestion.Id,
});
}
}
}
}
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addRowList);
await _readingTableQuestionAnswerRepository.AddRangeAsync(addTableQuestionAnswerList);
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
return new AddTaskLesionAnswerFromLastTaskOutDto()
{

View File

@ -167,6 +167,12 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity
[Comment("导出结果")]
public string ExportResultStr { get; set; } = "[]";
/// <summary>
/// 是否预设
/// </summary>
public bool IsPreinstall { get; set; } = false;
[NotMapped]
public List<ExportResult> ExportResult
{

View File

@ -192,6 +192,11 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity
/// </summary>
public string ImageTool { get; set; } = string.Empty;
/// <summary>
/// 是否预设
/// </summary>
public bool IsPreinstall { get; set; } = false;
/// <summary>
/// 影像工具属性
/// </summary>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class IsPreinstall : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsPreinstall",
table: "ReadingTableQuestionTrial",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsPreinstall",
table: "ReadingTableQuestionSystem",
type: "bit",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsPreinstall",
table: "ReadingTableQuestionTrial");
migrationBuilder.DropColumn(
name: "IsPreinstall",
table: "ReadingTableQuestionSystem");
}
}
}

View File

@ -7105,6 +7105,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasColumnType("bit")
.HasComment("是否启用");
b.Property<bool>("IsPreinstall")
.HasColumnType("bit");
b.Property<int>("IsRequired")
.HasColumnType("int");
@ -7337,6 +7340,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<bool>("IsEnable")
.HasColumnType("bit");
b.Property<bool>("IsPreinstall")
.HasColumnType("bit");
b.Property<int>("IsRequired")
.HasColumnType("int");
@ -15450,7 +15456,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.IsRequired();
b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser")
.WithMany()
.WithMany("AuditRecordList")
.HasForeignKey("IdentityUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@ -19951,6 +19957,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b =>
{
b.Navigation("AuditRecordList");
b.Navigation("SystemDocConfirmedList");
b.Navigation("UserRoleList");