添加表格预设
parent
7e39094b13
commit
9b0c874314
|
|
@ -10554,6 +10554,11 @@
|
||||||
影像标记
|
影像标记
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</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">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.ImageTool">
|
||||||
<summary>
|
<summary>
|
||||||
影像工具
|
影像工具
|
||||||
|
|
@ -10697,6 +10702,11 @@
|
||||||
数值类型
|
数值类型
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</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">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.ClassifyType">
|
||||||
<summary>
|
<summary>
|
||||||
分类问题类型
|
分类问题类型
|
||||||
|
|
|
||||||
|
|
@ -1007,6 +1007,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public int? PageShowOrder { get; set; }
|
public int? PageShowOrder { get; set; }
|
||||||
|
|
||||||
|
public bool IsPreinstall { get {
|
||||||
|
return this.TableQuestions.Questions.Any(x => x.IsPreinstall);
|
||||||
|
} }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<TrialReadQuestionData> Childrens { get; set; }
|
public List<TrialReadQuestionData> Childrens { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -324,6 +324,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ImageMark? ImageMarkEnum { get; set; }
|
public ImageMark? ImageMarkEnum { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否预设
|
||||||
|
/// </summary>
|
||||||
|
public bool IsPreinstall { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 影像工具
|
/// 影像工具
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -513,6 +519,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ValueOfType? ValueType { get; set; }
|
public ValueOfType? ValueType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否预设
|
||||||
|
/// </summary>
|
||||||
|
public bool IsPreinstall { get; set; } = false;
|
||||||
|
|
||||||
public bool IsCopy { 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 Guid QuestionId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string QuestionName { get; set; }
|
public string QuestionName { get; set; }
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
|
|
|
||||||
|
|
@ -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.Application.ViewModel;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
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 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();
|
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)
|
if (taskinfo.SourceSubjectVisitId != baseLineVisitId && isReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
|
|
@ -434,13 +437,63 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
|
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
|
||||||
|
|
||||||
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
|
addRowList.AddRange(addList);
|
||||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
|
addTableQuestionAnswerList.AddRange(tableAnswers);
|
||||||
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加 是否预设
|
||||||
|
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()
|
return new AddTaskLesionAnswerFromLastTaskOutDto()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,6 +167,12 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity
|
||||||
[Comment("导出结果")]
|
[Comment("导出结果")]
|
||||||
public string ExportResultStr { get; set; } = "[]";
|
public string ExportResultStr { get; set; } = "[]";
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否预设
|
||||||
|
/// </summary>
|
||||||
|
public bool IsPreinstall { get; set; } = false;
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public List<ExportResult> ExportResult
|
public List<ExportResult> ExportResult
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,11 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ImageTool { get; set; } = string.Empty;
|
public string ImageTool { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否预设
|
||||||
|
/// </summary>
|
||||||
|
public bool IsPreinstall { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 影像工具属性
|
/// 影像工具属性
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
20344
IRaCIS.Core.Infra.EFCore/Migrations/20251010074451_IsPreinstall.Designer.cs
generated
Normal file
20344
IRaCIS.Core.Infra.EFCore/Migrations/20251010074451_IsPreinstall.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7105,6 +7105,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
.HasColumnType("bit")
|
.HasColumnType("bit")
|
||||||
.HasComment("是否启用");
|
.HasComment("是否启用");
|
||||||
|
|
||||||
|
b.Property<bool>("IsPreinstall")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<int>("IsRequired")
|
b.Property<int>("IsRequired")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
|
@ -7337,6 +7340,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Property<bool>("IsEnable")
|
b.Property<bool>("IsEnable")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("IsPreinstall")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<int>("IsRequired")
|
b.Property<int>("IsRequired")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
|
@ -15450,7 +15456,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser")
|
b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser")
|
||||||
.WithMany()
|
.WithMany("AuditRecordList")
|
||||||
.HasForeignKey("IdentityUserId")
|
.HasForeignKey("IdentityUserId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
@ -19951,6 +19957,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b =>
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b =>
|
||||||
{
|
{
|
||||||
|
b.Navigation("AuditRecordList");
|
||||||
|
|
||||||
b.Navigation("SystemDocConfirmedList");
|
b.Navigation("SystemDocConfirmedList");
|
||||||
|
|
||||||
b.Navigation("UserRoleList");
|
b.Navigation("UserRoleList");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue