This commit is contained in:
he
2022-12-08 15:59:29 +08:00
parent bea0811eb8
commit 422dadad36
8 changed files with 152 additions and 20 deletions
@@ -7,21 +7,23 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
/// 表格问题答案行数据
///</summary>
[Table("ReadingTableAnswerRowInfo")]
public class ReadingTableAnswerRowInfo : Entity, IAuditAdd
{
[JsonIgnore]
[ForeignKey("InstanceId")]
public class ReadingTableAnswerRowInfo : Entity, IAuditAdd, IAuditUpdate, ISoftDelete
{
[JsonIgnore]
[ForeignKey("InstanceId")]
public DicomInstance Instance { get; set; }
/// <summary>
/// 第一层的Question
/// </summary>
/// 第一层的Question
/// </summary>
public Guid QuestionId { get; set; }
/// <summary>
@@ -93,6 +95,8 @@ namespace IRaCIS.Core.Domain.Models
public string BlindName { get; set; } = string.Empty;
public string OrderMark { get; set; } = string.Empty;
/// <summary>
/// 第一次添加的任务ID
/// </summary>
@@ -106,6 +110,16 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public Guid CreateUserId { get; set; }
public Guid UpdateUserId { get; set; }
//string UpdateUserName { get; set; }
public DateTime UpdateTime { get; set; }
public bool IsDeleted { get; set; }
public DateTime? DeletedTime { get; set; }
public Guid? DeleteUserId { get; set; }
[JsonIgnore]
[ForeignKey("SplitRowId")]
public ReadingTableAnswerRowInfo SplitRow { get; set; }
@@ -117,10 +131,56 @@ namespace IRaCIS.Core.Domain.Models
public ReadingQuestionTrial ReadingQuestionTrial { get; set; }
public string RowMark
{
get
{
Dictionary<int, string> splitLesionDic = new Dictionary<int, string>()
{
{1, "a" },
{2, "b" },
{3, "c" },
{4, "d" },
{5, "e" },
{6, "f" },
{7, "g" },
{8, "h" },
{9, "i" },
{10, "j" },
{11, "k" },
{12, "l" },
{13, "m" },
{14, "n" },
{15, "o" },
{16, "p" },
{17, "q" },
{18, "r" },
{19, "s" },
{20, "t" },
{21, "u" },
{22, "v" },
{23, "w" },
{24, "x" },
{25, "y" },
{26, "z" },
};
if (RowIndex % 1 == 0)
{
return decimal.ToInt32(RowIndex).ToString().PadLeft(2, '0');
}
else
{
return Math.Floor(RowIndex).ToString().PadLeft(2, '0') + splitLesionDic[decimal.ToInt32((RowIndex % 1) * 100)];
}
}
}
}
}
}