diff --git a/IRaCIS.Core.API/_ServiceExtensions/SwaggerSetup.cs b/IRaCIS.Core.API/_ServiceExtensions/SwaggerSetup.cs
index d2f85d734..a430b2709 100644
--- a/IRaCIS.Core.API/_ServiceExtensions/SwaggerSetup.cs
+++ b/IRaCIS.Core.API/_ServiceExtensions/SwaggerSetup.cs
@@ -109,7 +109,6 @@ public static class SwaggerSetup
//路径配置,设置为空,表示直接在根域名(localhost:8001)访问该文件,
//注意localhost:8001/swagger是访问不到的,去launchSettings.json把launchUrl去掉,如果你想换一个路径,直接写名字即可,比如直接写c.Route = "doc";
options.RoutePrefix = string.Empty;
- options.RoutePrefix = string.Empty;
//DocExpansion设置为none可折叠所有方法
options.DocExpansion(DocExpansion.None);
diff --git a/IRaCIS.Core.API/_ServiceExtensions/hangfireSetup.cs b/IRaCIS.Core.API/_ServiceExtensions/hangfireSetup.cs
index 3731df427..1e2eff9eb 100644
--- a/IRaCIS.Core.API/_ServiceExtensions/hangfireSetup.cs
+++ b/IRaCIS.Core.API/_ServiceExtensions/hangfireSetup.cs
@@ -16,12 +16,12 @@ namespace IRaCIS.Core.API
services.AddHangfire(hangFireConfig =>
{
//本地window 调试 使用内存,服务器部署使用数据库,防止服务器任务调度到本地
- //if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- //{
- // hangFireConfig.UseInMemoryStorage();
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ hangFireConfig.UseInMemoryStorage();
- //}
- //else
+ }
+ else
{
//指定存储介质
hangFireConfig.UseSqlServerStorage(hangFireConnStr, new SqlServerStorageOptions()
diff --git a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs
index e4d82de07..bf0861df9 100644
--- a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs
+++ b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs
@@ -16,6 +16,7 @@ using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using System.Collections;
using System.Globalization;
+using Xceed.Document.NET;
namespace IRaCIS.Core.Application.Service;
@@ -85,27 +86,27 @@ public static class ExcelExportHelper
foreach (var needTranslateProperty in needTranslatePropertyList)
{
- //翻译的属性依赖其他属性
- if (needTranslateProperty.IsTranslateDenpendOtherProperty)
+ if (itemDic.Keys.Any(t => t == needTranslateProperty.Name))
{
- if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
+ //翻译的属性依赖其他属性
+ if (needTranslateProperty.IsTranslateDenpendOtherProperty)
+ {
+ if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
+ {
+ var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
+
+ itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
+ }
+ }
+ //普通翻译 或者某一标准翻译
+ else
{
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
+
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
}
- //普通翻译 或者某一标准翻译
- else
- {
- var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
-
-
- itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
- }
-
-
-
}
itemDic.Add("No", no++);
@@ -125,6 +126,7 @@ public static class ExcelExportHelper
translateData = dic;
+
}
@@ -162,12 +164,49 @@ public static class ExcelExportHelper
workbook.RemoveSheetAt(1);
}
- var memoryStream2 = new MemoryStream();
- workbook.Write(memoryStream2, true);
+ //中文替换项目术语
+ if (isEn_US == false)
+ {
+ var replaceObjectList = data.TrialObjectNameList;
+
+ var sheet = workbook.GetSheetAt(0);
+
+ int rowCount = sheet.PhysicalNumberOfRows;
+
+ for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
+ {
+ var row = sheet.GetRow(rowIndex);
+ var colums = row.LastCellNum;
+
+ for (int colIndex = 0; colIndex < colums; colIndex++)
+ {
+ var cell = row.GetCell(colIndex);
+
+ // 只处理字符串类型的单元格
+ if (cell != null)
+ {
+ var cellValue = cell.StringCellValue;
+
+ var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
+ if (find != null)
+ {
+ cell.SetCellValue(find.TrialName);
+ }
+ }
+ }
+ }
+ }
+
+ using (var memoryStream2 = new MemoryStream())
+ {
+ workbook.Write(memoryStream2, true);
+
+ memoryStream2.Seek(0, SeekOrigin.Begin);
+
+ templateStream = memoryStream2;
+ }
- memoryStream2.Seek(0, SeekOrigin.Begin);
- templateStream = memoryStream2;
}
// 文件名称 从sheet里面取
@@ -300,25 +339,29 @@ public static class ExcelExportHelper
foreach (var needTranslateProperty in needTranslatePropertyList)
{
- //翻译的属性依赖其他属性
- if (needTranslateProperty.IsTranslateDenpendOtherProperty)
+ if (itemDic.Keys.Any(t => t == needTranslateProperty.Name))
{
- if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
+ //翻译的属性依赖其他属性
+ if (needTranslateProperty.IsTranslateDenpendOtherProperty)
+ {
+ if (itemDic[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
+ {
+ var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
+
+ itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
+ }
+ }
+ //普通翻译 或者某一标准翻译
+ else
{
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
+
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
}
- //普通翻译 或者某一标准翻译
- else
- {
- var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
- itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
- }
-
}
@@ -371,6 +414,38 @@ public static class ExcelExportHelper
workbook.RemoveSheetAt(1);
}
+ //中文替换项目术语
+ if (isEn_US == false)
+ {
+ var replaceObjectList = data.TrialObjectNameList;
+
+ var sheet = workbook.GetSheetAt(0);
+
+ int rowCount = sheet.PhysicalNumberOfRows;
+
+ for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
+ {
+ var row = sheet.GetRow(rowIndex);
+ var colums = row.LastCellNum;
+
+ for (int colIndex = 0; colIndex < colums; colIndex++)
+ {
+ var cell = row.GetCell(colIndex);
+
+ // 只处理字符串类型的单元格
+ if (cell != null)
+ {
+ var cellValue = cell.StringCellValue;
+
+ var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
+ if (find != null)
+ {
+ cell.SetCellValue(find.TrialName);
+ }
+ }
+ }
+ }
+ }
if (dynamicColumnConfig != null)
{
@@ -391,7 +466,7 @@ public static class ExcelExportHelper
var originTotalEndIndex = dynamicColumnConfig.TempalteLastColumnIndex;
//减去动态移除后原始结束索引
- var originRemoveEndIndex= originTotalEndIndex- dynamicRemoveColunmCount;
+ var originRemoveEndIndex = originTotalEndIndex - dynamicRemoveColunmCount;
//最终表 动态列开始索引
var dynamicColunmStartIndex = dynamicColumnConfig.AutoColumnStartIndex - beforeDynamicRemoveCount;
@@ -513,8 +588,8 @@ public static class ExcelExportHelper
//var writeIndex = itemList.IndexOf(itemObj) + dynamicColumnConfig.AutoColumnStartIndex;
- var writeIndex = dynamicColumnConfig.ColumnNameList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleName].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
-
+ var writeIndex = dynamicColumnConfig.ColumnNameList.IndexOf(iteObjDic[dynamicColumnConfig.DynamicItemTitleName].ToString()) + dynamicColumnConfig.AutoColumnStartIndex;
+
if (itemDicName.IsNotNullOrEmpty())
{
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj
index 1cf3fd0b9..cee4a0855 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj
@@ -70,4 +70,8 @@
+
+
+
+
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 75af1b317..22f7a4401 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -549,23 +549,134 @@
系统模板文档配置表
-
+
- 开始时候一些帮助 比如根据配置的字典生成枚举
+ 数据字典-基础数据维护
-
-
+
- 开始时候一些帮助 比如根据配置的字典生成枚举
+ 数据字典-基础数据维护
-
-
+
- 根据配置的字典名生成后端枚举
+ 添加bool
-
+
+
+
+
+
+ 获取所有字典的Key
+
+
+
+
+
+ 添加字典 的同时 一起添加子项 --New
+
+
+
+
+
+
+ New 查询条件
+
+
+
+
+
+
+ 添加和编辑
+
+
+
+
+
+
+ 获取子项数组
+
+
+
+
+
+ 删除字典数据
+
+
+
+ 传递父亲 code 字符串 数组 返回多个下拉框数据
+
+
+
+
+
+
+ 根据父亲Code 获取单个下拉框数据
+
+
+
+
+
+
+ 根据父亲字典分组 获取子项
+
+
+
+
+
+
+ 获取标准字典
+
+
+
+
+
+ 获取标准字典
+
+
+
+
+
+ 获取标准指定字典
+
+
+
+
+
+
+ 获取所有下拉框 枚举 bool 数据
+
+
+
+
+
+ 获取是和否
+
+
+
+
+
+
+ 获取审核状态
+
+
+
+
+
+
+
+
+ 邮件事件消息列表
+
+
+
+
+
+
+ 重新发布失败的事件消息
+
+
@@ -833,136 +944,6 @@
-
-
- 数据字典-基础数据维护
-
-
-
-
- 数据字典-基础数据维护
-
-
-
-
- 添加bool
-
-
-
-
-
-
- 获取所有字典的Key
-
-
-
-
-
- 添加字典 的同时 一起添加子项 --New
-
-
-
-
-
-
- New 查询条件
-
-
-
-
-
-
- 添加和编辑
-
-
-
-
-
-
- 获取子项数组
-
-
-
-
-
- 删除字典数据
-
-
-
- 传递父亲 code 字符串 数组 返回多个下拉框数据
-
-
-
-
-
-
- 根据父亲Code 获取单个下拉框数据
-
-
-
-
-
-
- 根据父亲字典分组 获取子项
-
-
-
-
-
-
- 获取标准字典
-
-
-
-
-
- 获取标准字典
-
-
-
-
-
- 获取标准指定字典
-
-
-
-
-
-
- 获取所有下拉框 枚举 bool 数据
-
-
-
-
-
- 获取是和否
-
-
-
-
-
-
- 获取审核状态
-
-
-
-
-
-
-
-
- 邮件事件消息列表
-
-
-
-
-
-
- 重新发布失败的事件消息
-
-
-
-
ExploreRecommendService
@@ -2316,6 +2297,21 @@
+
+
+ 获取数据库的表信息 以及字段信息
+
+
+
+
+
+
+
+ 根据字典名 code 生成枚举定义
+
+
+
+
上传文件转PDF 或者给url 这边下载然后转PDF
@@ -2331,7 +2327,14 @@
-
+
+
+
+ 测试efcore json 列支持情况
+ https://devblogs.microsoft.com/dotnet/array-mapping-in-ef-core-8/
+
+
+
测试客户端凭证代码
diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs
index da865627e..c45ec466e 100644
--- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs
@@ -227,7 +227,7 @@ namespace IRaCIS.Core.Application.Service
{
var lastTask = (subject.VisitTaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
- var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefault();
+ var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.ArmEnum==lastTask.ArmEnum && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefault();
if (existGlobal == null)
@@ -469,7 +469,7 @@ namespace IRaCIS.Core.Application.Service
var lastTask = (subjectAddTaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
- var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefault();
+ var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.ArmEnum == lastTask.ArmEnum && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefault();
if (existGlobal == null)
diff --git a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs
index e7bdc8743..084f205ad 100644
--- a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs
+++ b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs
@@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(queryCommonDocument.CriterionTypeEnum != null, t => t.CriterionTypeEnum == queryCommonDocument.CriterionTypeEnum)
.WhereIf(queryCommonDocument.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryCommonDocument.BusinessScenarioEnum)
.WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Code), t => t.Code.Contains(queryCommonDocument.Code))
- .WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name))
+ .WhereIf(!string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name) || t.NameCN.Contains(queryCommonDocument.Name))
.ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument);
diff --git a/IRaCIS.Core.Application/Service/Common/DevelopService.cs b/IRaCIS.Core.Application/Service/Common/DevelopService.cs
deleted file mode 100644
index 77eda0273..000000000
--- a/IRaCIS.Core.Application/Service/Common/DevelopService.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-
-namespace IRaCIS.Core.Application.Service.Common
-{
-
- ///
- /// 开始时候一些帮助 比如根据配置的字典生成枚举
- ///
- ///
- [ApiExplorerSettings(GroupName = "Common")]
- public class DevelopService(IRepository _dictionaryRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService
- {
- ///
- /// 根据配置的字典名生成后端枚举
- ///
- ///
- ///
- [HttpPost]
- public async Task BackDicGenerateEnum(string dicName)
- {
-
- return ResponseOutput.Ok();
- }
- }
-}
diff --git a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs
index 1f957a530..e3a8e2b9f 100644
--- a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs
+++ b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs
@@ -26,37 +26,6 @@ namespace IRaCIS.Core.Application.Service
IRepository _readingQuestionCriterionTrial, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IDictionaryService
{
- public async Task GenerateEnumDefine(string code)
- {
- var searchList = await _dicRepository.Where(t => t.Parent.Code == code && t.ParentId != null && t.IsEnable).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
-
- // StringBuilder 用于构建枚举代码字符串
- var enumCode = new StringBuilder();
-
- // 生成枚举定义
- enumCode.AppendLine($"public enum {code}");
- enumCode.AppendLine("{");
-
- foreach (var item in searchList)
- {
- // 添加 XML 注释作为枚举描述
- enumCode.AppendLine($" /// ");
- enumCode.AppendLine($" /// {item.ValueCN}"); // 假设你有一个描述字段
- enumCode.AppendLine($" /// ");
- // 每个枚举值生成
- enumCode.AppendLine($" {item.Value.Trim().Replace(" ", "")} = {item.Code},");
-
- }
-
- enumCode.AppendLine("}");
-
- // 返回生成的枚举代码
- var enumStr = enumCode.ToString();
-
- return ResponseOutput.Ok(enumStr);
-
- }
-
///
/// 添加bool
///
diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
index f22fd4d9f..ad1b6385c 100644
--- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
+++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs
@@ -1611,7 +1611,7 @@ namespace IRaCIS.Core.Application.Service.Common
//一致性分析
.WhereIf(inQuery.ReadingExportType == ExportResult.DetailedTableOfIntraReaderAnalysisResults, t => t.IsSelfAnalysis == true || t.IsSelfAnalysis == null)
- .WhereIf(inQuery.ReadingExportType == ExportResult.DetailedTableOfIntraReaderAnalysisResults, t => t.IsSelfAnalysis == null ? t.Subject.SubjectVisitTaskList.Any(u => u.IsSelfAnalysis == true && u.DoctorUserId == t.DoctorUserId && u.TrialReadingCriterionId == t.TrialReadingCriterionId) : true)
+ .WhereIf(inQuery.ReadingExportType == ExportResult.DetailedTableOfIntraReaderAnalysisResults, t => t.IsSelfAnalysis == null ? t.Subject.SubjectVisitTaskList.Any(u => u.IsSelfAnalysis == true && u.VisitTaskNum == t.VisitTaskNum && u.DoctorUserId == t.DoctorUserId && u.TrialReadingCriterionId == t.TrialReadingCriterionId) : true)
.WhereIf(inQuery.ReadingExportType == ExportResult.DetailedTableOfInterReaderAnalysisResults, t => t.IsSelfAnalysis == false || t.IsSelfAnalysis == null)
//访视和全局查询已签名完成的,裁判可以是未签名,未完成的
@@ -1730,12 +1730,14 @@ namespace IRaCIS.Core.Application.Service.Common
//处理再次阅片人的结果
if (selfAnalysisTask != null)
{
- foreach (var qItem in selfAnalysisTask.QuestionAnswerList)
+ var cloneQuestionAnswerList = selfAnalysisTask.QuestionAnswerList.Clone();
+
+ foreach (var qItem in cloneQuestionAnswerList)
{
qItem.QuestionName = qItem.QuestionName + $"{(_userInfo.IsEn_Us ? "(Again)" : "(再次)")}";
}
- item.QuestionAnswerList = item.QuestionAnswerList.Union(selfAnalysisTask?.QuestionAnswerList).ToList();
+ item.QuestionAnswerList = item.QuestionAnswerList.Union(cloneQuestionAnswerList).ToList();
}
}
@@ -1794,7 +1796,7 @@ namespace IRaCIS.Core.Application.Service.Common
var columNameList = list.SelectMany(t => t.QuestionAnswerList).Where(t => t.QuestionName.IsNotNullOrEmpty()).Select(t => t.QuestionName).Distinct().ToList();
- exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
+ exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t => t.ReadingCategory != ReadingCategory.Global).ToList(), _userInfo.TimeZoneId);
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
var dynamicColumnConfig = new DynamicColumnConfig()
diff --git a/IRaCIS.Core.Application/Service/MinimalApiService/CodeTemplate/CodeTemplateModel.cs b/IRaCIS.Core.Application/Service/MinimalApiService/CodeTemplate/CodeTemplateModel.cs
new file mode 100644
index 000000000..8d833d3ca
--- /dev/null
+++ b/IRaCIS.Core.Application/Service/MinimalApiService/CodeTemplate/CodeTemplateModel.cs
@@ -0,0 +1,46 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace IRaCIS.Core.Application.Service.DTO;
+
+public class TemplateTable
+{
+ public string TableName { get; set; }
+
+ public string Comment { get; set; }
+
+
+
+ public List AddOrEditPropertyList => TablePropertyList.Where(t => !AddOrUpdateExcludeNameList.Contains(t.PropertyName)).ToList();
+
+ [JsonIgnore]
+ public List TablePropertyList { get; set; }
+
+ [JsonIgnore]
+ public List AddOrUpdateExcludeNameList = new List() { "CreateUserId", "UpdateUserId", "CreateTime", "UpdateTime", "DeleteUserId", "IsDeleted", "DeletedTime" };
+
+}
+
+public class TemplateTableProperty
+{
+ public string ColumnName { get; set; }
+
+ public string PropertyName { get; set; }
+
+ public string CSharpType { get; set; }
+
+ public bool IsNullable { get; set; }
+
+ public int? MaxLength { get; set; }
+
+ public bool IsPrimarykey { get; set; }
+
+
+ public string Comment { get; set; }
+
+
+}
\ No newline at end of file
diff --git a/IRaCIS.Core.Application/Service/MinimalApiService/CodeTemplate/CodeTemplateService.cs b/IRaCIS.Core.Application/Service/MinimalApiService/CodeTemplate/CodeTemplateService.cs
new file mode 100644
index 000000000..65e6b4e48
--- /dev/null
+++ b/IRaCIS.Core.Application/Service/MinimalApiService/CodeTemplate/CodeTemplateService.cs
@@ -0,0 +1,119 @@
+using DocumentFormat.OpenXml.Office2016.Drawing.ChartDrawing;
+using IRaCIS.Application.Contracts;
+using IRaCIS.Core.Application.Service.DTO;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.EntityFrameworkCore.Metadata.Internal;
+using Microsoft.Extensions.Configuration;
+using NPOI.HPSF;
+using NPOI.SS.Formula.Functions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace IRaCIS.Core.Application.Service
+{
+
+ public class CodeTemplateService(IRepository _dicRepository,IMapper _mapper, IConfiguration _configuration) : ServiceBase
+ {
+
+ static string GetCSharpType(Type type)
+ {
+ if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
+ {
+ var underlyingType = Nullable.GetUnderlyingType(type);
+ return $"{GetCSharpType(underlyingType)}?";
+ }
+
+ return type switch
+ {
+ _ when type == typeof(int) => "int",
+ _ when type == typeof(long) => "long",
+ _ when type == typeof(short) => "short",
+ _ when type == typeof(byte) => "byte",
+ _ when type == typeof(bool) => "bool",
+ _ when type == typeof(decimal) => "decimal",
+ _ when type == typeof(double) => "double",
+ _ when type == typeof(float) => "float",
+ _ when type == typeof(Guid) => "Guid",
+ _ when type == typeof(DateTime) => "DateTime",
+ _ when type == typeof(string) => "string",
+ _ => type.Name // 非常见类型,返回 .NET 类型名称
+ };
+ }
+
+ ///
+ /// 获取数据库的表信息 以及字段信息
+ ///
+ ///
+ ///
+ ///
+ public List GetDataBaseTableList(string tableName, string comment)
+ {
+ var contextOptions = new DbContextOptionsBuilder().UseSqlServer(_configuration.GetSection("ConnectionStrings:RemoteNew").Value).Options;
+
+ using var dbContext = new IRaCISDBContext(contextOptions);
+ var dbModel = dbContext.Model;
+
+ var list = dbModel.GetEntityTypes().Where(t => t.GetTableName().IsNotNullOrEmpty())
+ .WhereIf(tableName.IsNotNullOrEmpty(), t => t.GetTableName()!.Contains(tableName))
+ .WhereIf(comment.IsNotNullOrEmpty(), t => t.GetComment().Contains(comment))
+ .Select(t => new TemplateTable()
+ {
+ TableName = t.GetTableName()!,
+ TablePropertyList = t.GetProperties().Select(property => new TemplateTableProperty()
+ {
+ PropertyName = property.Name,
+ ColumnName = property.GetColumnName(),
+ IsNullable = property.IsNullable,
+ IsPrimarykey = property.IsKey(),
+ CSharpType = GetCSharpType(property.ClrType),
+ Comment = property.GetComment() ?? string.Empty
+ }).ToList()
+ }).ToList();
+
+
+ return list;
+ }
+
+ ///
+ /// 根据字典名 code 生成枚举定义
+ ///
+ ///
+ ///
+ public async Task GenerateEnumDefine(string code)
+ {
+ var searchList = await _dicRepository.Where(t => t.Parent.Code == code && t.ParentId != null && t.IsEnable).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
+
+ // StringBuilder 用于构建枚举代码字符串
+ var enumCode = new StringBuilder();
+
+ // 生成枚举定义
+ enumCode.AppendLine($"public enum {code}");
+ enumCode.AppendLine("{");
+
+ foreach (var item in searchList)
+ {
+ // 添加 XML 注释作为枚举描述
+ enumCode.AppendLine($" /// ");
+ enumCode.AppendLine($" /// {item.ValueCN}"); // 假设你有一个描述字段
+ enumCode.AppendLine($" /// ");
+ // 每个枚举值生成
+ enumCode.AppendLine($" {item.Value.Trim().Replace(" ", "")} = {item.Code},");
+
+ }
+
+ enumCode.AppendLine("}");
+
+ // 返回生成的枚举代码
+ var enumStr = enumCode.ToString();
+
+ return ResponseOutput.Ok(enumStr);
+
+ }
+
+
+
+ }
+}
diff --git a/IRaCIS.Core.Application/Service/MinimalApiService/TestMinimalApiService.cs b/IRaCIS.Core.Application/Service/MinimalApiService/TestMinimalApiService.cs
index 9f264ce66..4a8a45625 100644
--- a/IRaCIS.Core.Application/Service/MinimalApiService/TestMinimalApiService.cs
+++ b/IRaCIS.Core.Application/Service/MinimalApiService/TestMinimalApiService.cs
@@ -21,9 +21,62 @@ namespace IRaCIS.Core.Application.Service.MinimalApiService
///
[ApiExplorerSettings(GroupName = "Institution")]
- public class TestMinimalApiService(IUserInfo _userInfo) : ServiceBase
+ public class TestMinimalApiService(IUserInfo _userInfo, IRepository _testLengthRepository) : ServiceBase
{
+ ///
+ /// 测试efcore json 列支持情况
+ /// https://devblogs.microsoft.com/dotnet/array-mapping-in-ef-core-8/
+ ///
+ ///
+ public async Task TestEfcoreJson()
+ {
+
+ var dateTime = DateTime.Parse("2024-11-08");
+
+ //await _testLengthRepository.AddAsync(new TestLength()
+ //{
+ // Name = "Testddd",
+ // TestJsonObjectLsit=new List() { new TestJsonObject() { Name="name1",Description="des1"} , new TestJsonObject() { Name = "name1", Description = "des1" } }
+ //});
+
+ //await _testLengthRepository.SaveChangesAsync();
+
+ //对于json 对象 不能使用count any 操作,但是简单的类型可以的
+ var jobjectList = _testLengthRepository.AsQueryable().ToList();
+
+ var jobjectList1 = _testLengthRepository.AsQueryable().Where(t=>t.TestJsonObjectLsit.Any(c=>c.Name=="name1")).ToList();
+
+ var jobjectList2 = _testLengthRepository.AsQueryable().Where(t => t.TestJsonObjectLsit.Any(c => c.Name == "name1")).SelectMany(t=>t.TestJsonObjectLsit).ToList();
+
+
+ var d1 = _testLengthRepository.Where(t => t.StringList.Any(t => t == "string1")).ToList();
+ var d2 = _testLengthRepository.Where(t => t.StringList.Contains("string1")).ToList();
+
+
+ //selectMany 报错 不支持
+ //var d20 = _testLengthRepository.Where(t => t.StringList.Contains("string1")).SelectMany(t => t.StringList).ToList();
+
+ var d3 = _testLengthRepository.Where(t => t.TestEnumList.Contains(TestEnum.Default)).ToList();
+ var d4 = _testLengthRepository.Where(t => t.TestEnumList.Any(t => t == TestEnum.Default)).ToList();
+
+ var d5 = _testLengthRepository.Where(t => t.DateTimeList.Contains(dateTime)).ToList();
+ var d6 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t == dateTime)).ToList();
+
+ var d7 = _testLengthRepository.Where(t=>t.DateTimeList.Any(t=>t.Year==2024)).ToList();
+
+ var d8 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Month == 11)).ToList();
+
+ var d90 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Year == 2024)).Select(t => t.DateTimeList).ToList();
+
+ //selectMany 报错 不支持
+ //var d9 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Year == 2024)).SelectMany(t=>t.DateTimeList).ToList();
+ //var d10 = _testLengthRepository.Where(t => t.DateTimeList.Any(t => t.Year == 2024)).SelectMany(t => t.DateTimeList).Where(t=>t>dateTime.AddSeconds(1)).ToList();
+
+ return ResponseOutput.Ok();
+ }
+
+
[TrialGlobalLimit("AddOrUpdateTrial", "BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
public Task> GetProjectList1Async()
@@ -38,7 +91,7 @@ namespace IRaCIS.Core.Application.Service.MinimalApiService
}
[AllowAnonymous]
- [TrialGlobalLimit( "BeforeOngoingCantOpt")]
+ [TrialGlobalLimit("BeforeOngoingCantOpt")]
public IResponseOutput GetTest()
{
diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs
index d75222599..bbf7745d7 100644
--- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs
+++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs
@@ -1087,6 +1087,7 @@ namespace IRaCIS.Core.Application.Contracts
public string UserName { get; set; }
public bool? IsBaseline { get; set; }
+ public ReadingCategory ReadingCategory { get; set; }
///
/// 自身一致性分析任务上会有这个值
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs
index 519267bc4..195d80a27 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs
@@ -68,7 +68,6 @@ namespace IRaCIS.Core.Application.Contracts
public List ModalityList { get; set; } = new List();
- public string TrialObjectNameConfigStr { get; set; }
public List TrialObjectNameList { get; set; }
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs
index 70894a30d..cf76591ed 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs
@@ -88,7 +88,7 @@ namespace IRaCIS.Application.Contracts
public string CriterionName { get; set; } = string.Empty;
-
+ public List TrialObjectNameList { get; set; }
}
public class TrialModalitySelectDto
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs
index f2a21b668..8f4384f13 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs
@@ -908,10 +908,10 @@ namespace IRaCIS.Core.Application
trialConfig.Modalitys = $"{String.Join('|', trialConfig.ModalityList)}";
- trialConfig.TrialObjectNameConfigStr=JsonConvert.SerializeObject(trialConfig.TrialObjectNameList);
_mapper.Map(trialConfig, trialInfo);
trialInfo.UpdateTime = DateTime.Now;
+ //_trialRepository.MarkAsModified(trialInfo, nameof(trialInfo.TrialObjectNameList));
//await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialConfig.TrialId && t.IsSigned == false, u => new ReadingQuestionCriterionTrial() { CriterionModalitys = trialConfig.Modalitys });
@@ -1351,11 +1351,11 @@ namespace IRaCIS.Core.Application
///
public async Task GetTrialExtralConfig(Guid trialId)
{
- var extralObj = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.TrialExtraConfigJsonStr, t.TrialObjectNameConfigStr }).FirstOrDefault();
+ var extralObj = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.TrialExtraConfigJsonStr, t.TrialObjectNameList }).FirstOrDefault();
var extralConfig = JsonConvert.DeserializeObject(extralObj?.TrialExtraConfigJsonStr) ?? new TrialExtraConfig();
- extralConfig.TrialObjectNameList = JsonConvert.DeserializeObject>(extralObj?.TrialObjectNameConfigStr) ?? new List();
+ extralConfig.TrialObjectNameList = extralObj.TrialObjectNameList;
return extralConfig;
}
diff --git a/IRaCIS.Core.Domain/Management/User.cs b/IRaCIS.Core.Domain/Management/User.cs
index 947db076d..087a418bd 100644
--- a/IRaCIS.Core.Domain/Management/User.cs
+++ b/IRaCIS.Core.Domain/Management/User.cs
@@ -5,7 +5,7 @@ namespace IRaCIS.Core.Domain.Models;
[Comment("̨ - ϵͳ˻")]
[Table("User")]
-public class User : BaseFullDeleteAuditEntity
+public class User : BaseFullAuditEntity
{
#region
diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs
index b9da035a0..11237a804 100644
--- a/IRaCIS.Core.Domain/Trial/Trial.cs
+++ b/IRaCIS.Core.Domain/Trial/Trial.cs
@@ -1,5 +1,6 @@
using IRaCIS.Core.Domain.Share;
using System.Linq;
+using ZstdSharp.Unsafe;
namespace IRaCIS.Core.Domain.Models;
@@ -260,17 +261,19 @@ public partial class Trial : BaseFullDeleteAuditEntity
public bool IsTrialPACSConfirmed { get; set; }
[Comment("项目术语配置Json字符串")]
- [StringLength(1000)]
- public string TrialObjectNameConfigStr { get; set; }
-
- [NotMapped]
- public List TrialObjectNameList => JsonConvert.DeserializeObject>(TrialObjectNameConfigStr) ?? new List();
+ [StringLength(2000)]
+ public List TrialObjectNameList { get; set; }
+ //[NotMapped]
+ //public List TrialObjectNameList => JsonConvert.DeserializeObject>(TrialObjectNameConfigStr) ?? new List();
}
+[ComplexType]
public class TrialObjectNameConfig
{
public string Name { get; set; }
public string TrialName { get; set; }
+ public bool IsDefault { get; set; }
+
}
\ No newline at end of file
diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
index 69d53d1a9..f4f70b2fe 100644
--- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
+++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs
@@ -2,7 +2,9 @@
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Infrastructure.Encryption;
+using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Newtonsoft.Json;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data;
@@ -59,11 +61,28 @@ public class IRaCISDBContext : DbContext
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
+
modelBuilder.Entity(entity =>
{
// 使用部分加密值转换器,前 2 个字符不加密,方便模糊搜索
- entity.Property(e => e.Name)
- .HasConversion(new PartialEncryptionConverter(2));
+ entity.Property(e => e.Name).HasConversion(new PartialEncryptionConverter(2));
+
+ entity.OwnsMany(x => x.TestJsonObjectLsit, ownedNavigationBuilder =>
+ {
+ ownedNavigationBuilder.ToJson();
+ });
+
+ //entity.Property(e => e.TestJsonObjectLsit).HasConversion(v => v == null ? "[]" : JsonConvert.SerializeObject(v),
+ // v => string.IsNullOrEmpty(v) ? null : JsonConvert.DeserializeObject>(v));
+ });
+
+ modelBuilder.Entity(entity =>
+ {
+ //项目术语配置
+ entity.OwnsMany(x => x.TrialObjectNameList, ownedNavigationBuilder =>
+ {
+ ownedNavigationBuilder.ToJson();
+ });
});
#region pgsql codefirst 配置 暂时屏蔽
@@ -558,7 +577,7 @@ public class IRaCISDBContext : DbContext
public virtual DbSet TestLength { get; set; }
- public virtual DbSet EventStoreRecord { get; set; }
+ public virtual DbSet EventStoreRecord { get; set; }
@@ -567,6 +586,32 @@ public class IRaCISDBContext : DbContext
public class TestLength : Entity
{
public string Name { get; set; }
+
+ [StringLength(1000)]
+ public string[] StringList { get; set; }=new string[] { };
+
+ public List DateTimeList { get; set; } = new List();
+
+ [StringLength(1000)]
+ public List TestEnumList { get; set; } = new List();
+
+ [MaxLength]
+ public List TestJsonObjectLsit { get; set; }
+}
+
+
+public record TestJsonObject
+{
+ public string Name { get; set; }
+
+ public string Description { get; set; }
+}
+
+public enum TestEnum
+{
+ Default = 0,
+
+ First = 1
}
diff --git a/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs b/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs
index c301521d0..a3224346c 100644
--- a/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs
+++ b/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs
@@ -3,11 +3,14 @@ using IRaCIS.Core.Domain.BaseModel;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infra.EFCore.Common;
+using IRaCIS.Core.Infrastructure.Extention;
using MassTransit;
using MassTransit.Mediator;
using MassTransit.Transports;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.Extensions.Logging;
+using Microsoft.VisualBasic;
+using System.Collections;
using System.Data;
@@ -75,9 +78,18 @@ public class AuditEntityInterceptor(IUserInfo _userInfo,
//.Where(x => !typeof(DataInspection).IsAssignableFrom(x.Entity.GetType()))
.ToList())
{
+
+
+
+ //foreach (var property in entry.Navigations.Where(t => typeof(IEnumerable).IsAssignableFrom(t.Metadata.ClrType) && t.Metadata.ClrType !=typeof(string) /*&& t.CurrentValue == null*/))
+ //{
+ // Console.WriteLine($"属性名{property.Metadata.Name} 现在值:{property.CurrentValue.ToJsonStr()}");
+ //}
+
// 检查属性是否为string类型,并且值为null
foreach (var property in entry.Properties.Where(t => t.Metadata.ClrType == typeof(string) && t.CurrentValue == null))
{
+
property.CurrentValue = string.Empty;
}
@@ -142,7 +154,8 @@ public class AuditEntityInterceptor(IUserInfo _userInfo,
var inspectionGeneralIdList = context.ChangeTracker.Entries().Where(t => typeof(DataInspection).IsAssignableFrom(t.Entity.GetType())).Select(t => ((DataInspection)t.Entity).GeneralId).ToList();
var entities = context.ChangeTracker.Entries().Where(u => (u.State == EntityState.Modified || u.State == EntityState.Deleted || u.State == EntityState.Added))
- .Where(t => !typeof(DataInspection).IsAssignableFrom(t.Entity.GetType()) && !inspectionGeneralIdList.Contains(((Entity)t.Entity).Id))
+ .Where(t => !typeof(DataInspection).IsAssignableFrom(t.Entity.GetType()) && typeof(Entity).IsAssignableFrom(t.Entity.GetType())
+ && !inspectionGeneralIdList.Contains(((Entity)t.Entity).Id))
.ToList();
AuditingData auditingData = new AuditingData((IRaCISDBContext)context, _userInfo);
diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241108013005_TestEfcoreJson.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241108013005_TestEfcoreJson.Designer.cs
new file mode 100644
index 000000000..589a7e8eb
--- /dev/null
+++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241108013005_TestEfcoreJson.Designer.cs
@@ -0,0 +1,18080 @@
+//
+using System;
+using IRaCIS.Core.Infra.EFCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace IRaCIS.Core.Infra.EFCore.Migrations
+{
+ [DbContext(typeof(IRaCISDBContext))]
+ [Migration("20241108013005_TestEfcoreJson")]
+ partial class TestEfcoreJson
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.10")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("编码");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DoctorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ExpiryDate")
+ .HasColumnType("datetime2")
+ .HasComment("过期时间");
+
+ b.Property("FileName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IsOfficial")
+ .HasColumnType("bit")
+ .HasComment("是否正式简历");
+
+ b.Property("Language")
+ .HasColumnType("int")
+ .HasComment("1 中文 2为英文");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("文件类型名");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("DoctorId");
+
+ b.ToTable("Attachment", t =>
+ {
+ t.HasComment("医生 - 简历|证书 文档表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CROCode")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CROName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CRONameCN")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsTrialLevel")
+ .HasColumnType("bit")
+ .HasComment("是否是项目级别");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("CROCompany", t =>
+ {
+ t.HasComment("机构 - CRO");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsCRCNeedReply")
+ .HasColumnType("bit")
+ .HasComment("CRC是否需要回复 前端使用");
+
+ b.Property("ParamInfo")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasComment("核查的检查信息Json");
+
+ b.Property("SubjectVisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TalkContent")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("UserTypeEnum")
+ .HasColumnType("int")
+ .HasComment("核查过程中的操作用户类型");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SubjectVisitId");
+
+ b.ToTable("CheckChallengeDialog", t =>
+ {
+ t.HasComment("一致性核查 - 对话记录表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalFormId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("表单Id");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("QuestionId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("问题Id");
+
+ b.Property("RowIndex")
+ .HasColumnType("int");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("ClinicalAnswerRowInfo", t =>
+ {
+ t.HasComment("受试者 - 临床表单表格问题行记录");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalDataLevel")
+ .HasColumnType("int");
+
+ b.Property("ClinicalDataSetEnName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalDataSetEnum")
+ .HasColumnType("int")
+ .HasComment("枚举(字典里面取的)");
+
+ b.Property("ClinicalDataSetName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalUploadType")
+ .HasColumnType("int")
+ .HasComment("上传方式");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionEnumListStr")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("FileName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IsApply")
+ .HasColumnType("bit")
+ .HasComment("是否应用");
+
+ b.Property("IsEnable")
+ .HasColumnType("bit");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("UploadRole")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("ClinicalDataSystemSet", t =>
+ {
+ t.HasComment("系统 - 临床数据配置");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalDataLevel")
+ .HasColumnType("int")
+ .HasComment("临床级别");
+
+ b.Property("ClinicalDataSetEnName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalDataSetName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalUploadType")
+ .HasColumnType("int")
+ .HasComment("上传方式");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionEnumListStr")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("FileName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IsApply")
+ .HasColumnType("bit")
+ .HasComment("是否应用");
+
+ b.Property("IsConfirm")
+ .HasColumnType("bit");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("SystemClinicalDataSetId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UploadRole")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SystemClinicalDataSetId");
+
+ b.HasIndex("TrialId");
+
+ b.ToTable("ClinicalDataTrialSet", t =>
+ {
+ t.HasComment("项目 - 临床数据适应标准配置");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CheckDate")
+ .HasColumnType("datetime2")
+ .HasComment("检查日期");
+
+ b.Property("ClinicalDataTrialSetId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PicturePath")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)")
+ .HasComment("截图地址");
+
+ b.Property("ReadingId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("VisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClinicalDataTrialSetId");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SubjectId");
+
+ b.ToTable("ClinicalForm", t =>
+ {
+ t.HasComment("受试者 - 临床表单");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Answer")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("ClinicalDataTrialSetId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalFormId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("表单Id");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("QuestionId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("问题Id");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClinicalFormId");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("ClinicalQuestionAnswer", t =>
+ {
+ t.HasComment("受试者 - 临床表单问题答案");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Answer")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)")
+ .HasComment("答案");
+
+ b.Property("ClinicalFormId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("表单Id");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("QuestionId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("问题Id");
+
+ b.Property("RowId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("答案行的Id");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.Property("TableQuestionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("RowId");
+
+ b.ToTable("ClinicalTableAnswer", t =>
+ {
+ t.HasComment("受试者 - 临床表单表格问题答案");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BusinessScenarioEnum")
+ .HasColumnType("int")
+ .HasComment("业务场景");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionTypeEnum")
+ .HasColumnType("int")
+ .HasComment("系统标准枚举");
+
+ b.Property("DeleteUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("FileTypeEnum")
+ .HasColumnType("int")
+ .HasComment("类型-上传|导出|邮件附件");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("NameCN")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("CommonDocument", t =>
+ {
+ t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsSystemCriterion")
+ .HasColumnType("bit");
+
+ b.Property("LesionType")
+ .HasColumnType("int")
+ .HasComment("病灶类型");
+
+ b.Property("OrganType")
+ .HasColumnType("int")
+ .HasComment("器官类型");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("CriterionId");
+
+ b.ToTable("CriterionNidusSystem", t =>
+ {
+ t.HasComment("系统标准 - 病灶器官表 (需要同步)");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LesionType")
+ .HasColumnType("int");
+
+ b.Property("OrganType")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("CriterionNidusTrial", t =>
+ {
+ t.HasComment("项目标准 - 病灶器官表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BatchId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("批次Id");
+
+ b.Property("ChildrenTypeId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("子类");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateUserName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("创建人姓名");
+
+ b.Property("CreateUserRealName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("DoctorUserId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("阅片医生");
+
+ b.Property("EntityName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("被稽查实体名");
+
+ b.Property("GeneralId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("要稽查对象Id");
+
+ b.Property("IP")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("Identification")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("标识");
+
+ b.Property("IsFrontAdd")
+ .HasColumnType("bit")
+ .HasComment("是否是前端添加");
+
+ b.Property("IsSign")
+ .HasColumnType("bit");
+
+ b.Property("JsonDetail")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastJsonDetail")
+ .HasColumnType("nvarchar(max)")
+ .HasComment("上一条json");
+
+ b.Property("ModuleTypeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ObjectRelationParentId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("被稽查对象外键1");
+
+ b.Property("ObjectRelationParentId2")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ObjectRelationParentId3")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ObjectTypeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OptTypeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("父ID");
+
+ b.Property("Reason")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("RoleName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("角色名称");
+
+ b.Property("SignId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectVisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialReadingCriterionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialSiteId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("VisitStageId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("访视计划ID");
+
+ b.Property("VisitTaskId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("TrialReadingCriterionId");
+
+ b.HasIndex("VisitTaskId");
+
+ b.ToTable("DataInspection", t =>
+ {
+ t.HasComment("稽查 - 记录表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b =>
+ {
+ b.Property("SeqId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Anonymize")
+ .HasColumnType("bit");
+
+ b.Property("CPIStatus")
+ .HasColumnType("bit");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("FileSize")
+ .HasColumnType("bigint");
+
+ b.Property("FrameOfReferenceUID")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("HtmlPath")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ImageColumns")
+ .HasColumnType("int");
+
+ b.Property("ImageRows")
+ .HasColumnType("int");
+
+ b.Property("ImagerPixelSpacing")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("InstanceNumber")
+ .HasColumnType("int");
+
+ b.Property("InstanceTime")
+ .HasColumnType("datetime2");
+
+ b.Property("NumberOfFrames")
+ .HasColumnType("int");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("PixelSpacing")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SeriesId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SeriesInstanceUid")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SliceLocation")
+ .HasColumnType("int");
+
+ b.Property("SliceThickness")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SopInstanceUid")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("StudyId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("StudyInstanceUid")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectVisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("WindowCenter")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("WindowWidth")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.HasKey("SeqId");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SeriesId");
+
+ b.HasIndex("StudyId");
+
+ b.ToTable("DicomInstance", t =>
+ {
+ t.HasComment("归档 - Instance表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b =>
+ {
+ b.Property("SeqId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AcquisitionNumber")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("AcquisitionTime")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("BodyPartExamined")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("BodyPartForEdit")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleteUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ImageOrientationPatient")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ImagePositionPatient")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ImageResizePath")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("ImagerPixelSpacing")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("InstanceCount")
+ .HasColumnType("int");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("IsReading")
+ .HasColumnType("bit");
+
+ b.Property("Modality")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ProtocolName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SequenceName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SeriesInstanceUid")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SeriesNumber")
+ .HasColumnType("int");
+
+ b.Property("SeriesTime")
+ .HasColumnType("datetime2");
+
+ b.Property("SliceThickness")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("StudyId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("StudyInstanceUid")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectVisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TriggerTime")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("VisitTaskId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("SeqId");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("StudyId");
+
+ b.ToTable("DicomSeries", t =>
+ {
+ t.HasComment("归档 - 序列表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b =>
+ {
+ b.Property