diff --git a/IRaCIS.Core.Application/BusinessFilter/UnifiedApiResultFilter.cs b/IRaCIS.Core.Application/BusinessFilter/UnifiedApiResultFilter.cs
index 3adc80599..f37d97b17 100644
--- a/IRaCIS.Core.Application/BusinessFilter/UnifiedApiResultFilter.cs
+++ b/IRaCIS.Core.Application/BusinessFilter/UnifiedApiResultFilter.cs
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc;
+using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Application.Services.BusinessFilter
{
@@ -74,7 +75,8 @@ namespace IRaCIS.Application.Services.BusinessFilter
else if(statusCode != 200&&!(objectResult.Value is IResponseOutput))
{
- var apiResponse = ResponseOutput.NotOk("Program error, please contact developer.");
+ //---程序错误,请联系开发人员。
+ var apiResponse = ResponseOutput.NotOk(StaticData.International("UnifiedAPI_ProgramError"));
objectResult.Value = apiResponse;
objectResult.DeclaredType = apiResponse.GetType();
@@ -114,4 +116,4 @@ namespace IRaCIS.Application.Services.BusinessFilter
return false;
}
}
-}
\ No newline at end of file
+}
diff --git a/IRaCIS.Core.Application/Helper/FileStoreHelper.cs b/IRaCIS.Core.Application/Helper/FileStoreHelper.cs
index e8da8a52b..53f8cf11d 100644
--- a/IRaCIS.Core.Application/Helper/FileStoreHelper.cs
+++ b/IRaCIS.Core.Application/Helper/FileStoreHelper.cs
@@ -93,14 +93,16 @@ public static class FileStoreHelper
if (systemClinicalData == null || systemClinicalData.Path == string.Empty)
{
- throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
+ //---数据库没有找到对应的数据模板文件,请联系系统运维人员。
+ throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
}
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, systemClinicalData.Path);
if (!System.IO.File.Exists(filePath))
{
- throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
+ //---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
+ throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
}
return (filePath, systemClinicalData.FileName);
@@ -121,14 +123,16 @@ public static class FileStoreHelper
if (trialClinicalData == null|| trialClinicalData.Path==string.Empty)
{
- throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
+ //---数据库没有找到对应的数据模板文件,请联系系统运维人员。
+ throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
}
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, trialClinicalData.Path);
if (!System.IO.File.Exists(filePath))
{
- throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
+ //---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
+ throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
}
return (filePath, trialClinicalData.FileName);
@@ -143,14 +147,16 @@ public static class FileStoreHelper
if (doc == null)
{
- throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
+ //---数据库没有找到对应的数据模板文件,请联系系统运维人员。
+ throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
}
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, doc.Path);
if (!System.IO.File.Exists(filePath))
{
- throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
+ //---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
+ throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
}
return (filePath, doc.Name.Trim('/'));
diff --git a/IRaCIS.Core.Application/Helper/SendEmailHelper.cs b/IRaCIS.Core.Application/Helper/SendEmailHelper.cs
index 45a129e77..41ed362a2 100644
--- a/IRaCIS.Core.Application/Helper/SendEmailHelper.cs
+++ b/IRaCIS.Core.Application/Helper/SendEmailHelper.cs
@@ -42,7 +42,8 @@ public static class SendEmailHelper
catch (Exception ex)
{
- throw new Exception("邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员");
+ //---邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员
+ throw new Exception(StaticData.International("SendEmail_SendFail"));
}
@@ -62,7 +63,8 @@ public static class SendEmailHelper
if (sMTPEmailConfig.ToMailAddressList.Count == 0)
{
- throw new ArgumentException("没有收件人");
+ //---没有收件人
+ throw new ArgumentException(StaticData.International("SendEmail_NoRecipient"));
}
else
{
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 2cf9c39c5..ce0e76b1b 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -4595,6 +4595,11 @@
是否确认
+
+
+ 语言类型
+
+
是否是当前任务
@@ -7806,9 +7811,9 @@
ReadingMedicineSystemQuestionQuery 列表查询参数模型
-
+
- 问题英文名称
+ 语言类型
@@ -7816,9 +7821,9 @@
任务类型
-
+
- 问题英文名称
+ 语言类型
@@ -7869,9 +7874,9 @@
问题名称
-
+
- 问题英文名称
+ 语言类型
@@ -7924,9 +7929,9 @@
问题名称
-
+
- 问题英文名称
+ 语言类型
@@ -7972,9 +7977,9 @@
项目Id
-
+
- 问题英文名称
+ 语言类型
@@ -7985,9 +7990,9 @@
ReadingMedicineTrialQuestionAddOrEdit 列表查询参数模型
-
+
- 问题英文名称
+ 语言类型
@@ -8363,17 +8368,17 @@
-
+
- 问题英文名称
+ 语言类型
QCQuestionConfigureView 列表视图模型
-
+
- 问题英文名称
+ 语言类型
@@ -8382,9 +8387,9 @@
QuestionName
-
+
- 问题英文名称
+ 语言类型
@@ -8393,22 +8398,22 @@
QCQuestionAddOrEdit 列表查询参数模型
-
+
- 问题英文名称
+ 语言类型
TrialQCQuestionConfigureView 列表视图模型
-
+
- 问题英文名称
+ 语言类型
-
+
- 问题英文名称
+ 语言类型
@@ -8417,9 +8422,9 @@
QuestionName
-
+
- 问题英文名称
+ 语言类型
@@ -8428,9 +8433,9 @@
TrialQCQuestionAddOrEdit 列表查询参数模型
-
+
- 问题英文名称
+ 语言类型
diff --git a/IRaCIS.Core.Application/Resources/en-US.json b/IRaCIS.Core.Application/Resources/en-US.json
index b3235d739..94a5b6519 100644
--- a/IRaCIS.Core.Application/Resources/en-US.json
+++ b/IRaCIS.Core.Application/Resources/en-US.json
@@ -507,7 +507,7 @@
//SubjectVisitFinalVisitTrigger
"SubjectVisit_CannotSetAsLastVisit": "The subject's follow-up visits has uploaded images or submitted , and the current visit is not allowed to be set as the last visit.",
- // ------------------------------------------------------------Helper--------------------------------------------------------------------
+ // ------------------------------------------------------------BusinessFilter--------------------------------------------------------------------
//LimitUserRequestAuthorization
"LimitUser_AuthTokenMissing": "User token was not retrieved from Header/URL, please contact developer",
"LimitUser_AccountLoggedInElsewhere": "User token was not retrieved from Header/URL, please contact developer",
@@ -522,6 +522,14 @@
"TrialResource_InterceptedProjectStatusRule": "This request was blocked by configured rules: only operations allowed when project status is in progress, please contact developer if this logic is incorrect and needs to be modified",
"TrialResource_MissingProjectNumber": "Project number not passed in the API parameters, please verify.",
//UnifiedApiResultFilter
- "UnifiedAPI_ProgramError": "Program error, please contact developer."
+ "UnifiedAPI_ProgramError": "Program error, please contact developer.",
+
+ // ------------------------------------------------------------Helper--------------------------------------------------------------------
+ //FileStoreHelper
+ "FileStore_TemplateFileNotFound": "Database did not find the corresponding data template file for FileStoreHelper, please contact system maintenance personnel.",
+ "FileStore_TemplateFileStoragePathInvalid": "No corresponding file was found on the storage path for the data template file of FileStoreHelper, please contact system maintenance personnel.",
+ //SendEmailHelper
+ "SendEmail_SendFail": "Failed to send email in SendEmailHelper. Your operation was unsuccessful, please check your email or contact maintenance personnel.",
+ "SendEmail_NoRecipient": "No recipient in SendEmailHelper."
}
diff --git a/IRaCIS.Core.Application/Resources/zh-CN.json b/IRaCIS.Core.Application/Resources/zh-CN.json
index d356e2ea8..52a7e105e 100644
--- a/IRaCIS.Core.Application/Resources/zh-CN.json
+++ b/IRaCIS.Core.Application/Resources/zh-CN.json
@@ -507,7 +507,7 @@
//SubjectVisitFinalVisitTrigger
"SubjectVisit_CannotSetAsLastVisit": "该受试者已有后续访视已上传影像或已提交,当前访视不允许设置为末次访视。",
- // ------------------------------------------------------------Helper--------------------------------------------------------------------
+ // ------------------------------------------------------------BusinessFilter--------------------------------------------------------------------
//LimitUserRequestAuthorization
"LimitUser_AuthTokenMissing": "当前请求未从Header/Url取到用户Token,请联系开发者",
"LimitUser_AccountLoggedInElsewhere": "您的账户在其他地方已登陆,您被迫下线。",
@@ -522,6 +522,14 @@
"TrialResource_InterceptedProjectStatusRule": "本次请求被配置规则拦截:项目状态处于进行中时,才允许操作,若此处逻辑有误,请联系开发人员修改",
"TrialResource_MissingProjectNumber": "该接口参数中,没有传递项目编号,请核对。",
//UnifiedApiResultFilter
- "UnifiedAPI_ProgramError": "程序错误,请联系开发人员。"
+ "UnifiedAPI_ProgramError": "程序错误,请联系开发人员。",
+
+ // ------------------------------------------------------------Helper--------------------------------------------------------------------
+ //FileStoreHelper
+ "FileStore_TemplateFileNotFound": "数据库没有找到对应的数据模板文件,请联系系统运维人员。",
+ "FileStore_TemplateFileStoragePathInvalid": "数据模板文件存储路径上未找对应文件,请联系系统运维人员。",
+ //SendEmailHelper
+ "SendEmail_SendFail": "邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员",
+ "SendEmail_NoRecipient": "没有收件人"
}
diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs
index f1ed1a624..aa2d550af 100644
--- a/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs
+++ b/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs
@@ -3,6 +3,7 @@
// 生成时间 2021-11-11 11:48:52
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
+using IRaCIS.Core.Domain.Share;
using System;
using System.Collections.Generic;
namespace IRaCIS.Core.Application.Contracts
@@ -22,9 +23,9 @@ namespace IRaCIS.Core.Application.Contracts
public string QuestionName { get; set; } = String.Empty;
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public bool IsRequired { get; set; }
public bool IsEnable { get; set; }
public string Type { get; set; } = String.Empty;
@@ -50,9 +51,9 @@ namespace IRaCIS.Core.Application.Contracts
public string QuestionName { get; set; } = String.Empty;
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public bool IsRequired { get; set; }
public bool IsEnable { get; set; }
public string Type { get; set; } = String.Empty;
@@ -72,15 +73,15 @@ namespace IRaCIS.Core.Application.Contracts
}
///QCQuestionQuery 列表查询参数模型
- public class QCQuestionQuery
+ public class QCQuestionQuery:PageInput
{
/// QuestionName
public string QuestionName { get; set; } = String.Empty;
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType? LanguageType { get; set; }
/// TypeValue
public string Type { get; set; } = String.Empty;
@@ -101,9 +102,9 @@ namespace IRaCIS.Core.Application.Contracts
public string QuestionName { get; set; } = String.Empty;
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public bool IsRequired { get; set; }
public bool IsEnable { get; set; }
public string Type { get; set; } = String.Empty;
diff --git a/IRaCIS.Core.Application/Service/QC/DTO/TrialQCQuestionConfigureViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/TrialQCQuestionConfigureViewModel.cs
index 1f0e7ede6..2c95bd487 100644
--- a/IRaCIS.Core.Application/Service/QC/DTO/TrialQCQuestionConfigureViewModel.cs
+++ b/IRaCIS.Core.Application/Service/QC/DTO/TrialQCQuestionConfigureViewModel.cs
@@ -3,6 +3,7 @@
// 生成时间 2021-11-11 11:48:52
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
+using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
namespace IRaCIS.Core.Application.Contracts
@@ -15,9 +16,9 @@ namespace IRaCIS.Core.Application.Contracts
public string QuestionName { get; set; } = string.Empty;
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public bool IsRequired { get; set; }
public bool IsEnable { get; set; }
public string Type { get; set; } = string.Empty;
@@ -60,9 +61,9 @@ namespace IRaCIS.Core.Application.Contracts
public string QuestionName { get; set; } = string.Empty;
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public Guid? ParentId { get; set; }
public int ShowOrder { get; set; }
@@ -79,9 +80,9 @@ namespace IRaCIS.Core.Application.Contracts
public string QuestionName { get; set; } = string.Empty;
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType? LanguageType { get; set; }
/// TypeValue
public string Type { get; set; }=String.Empty;
@@ -107,9 +108,9 @@ namespace IRaCIS.Core.Application.Contracts
public string QuestionName { get; set; } = string.Empty;
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public bool IsRequired { get; set; }
public bool IsEnable { get; set; }
public string Type { get; set; } = string.Empty;
diff --git a/IRaCIS.Core.Application/Service/QC/Interface/IQCQuestionService.cs b/IRaCIS.Core.Application/Service/QC/Interface/IQCQuestionService.cs
index 21a102b5c..382f27933 100644
--- a/IRaCIS.Core.Application/Service/QC/Interface/IQCQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/QC/Interface/IQCQuestionService.cs
@@ -11,7 +11,7 @@ namespace IRaCIS.Core.Application.Contracts
{
Task AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure);
Task DeleteQCQuestionConfigure(Guid qCQuestionConfigureId);
- Task> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure);
+ Task> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure);
}
diff --git a/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs b/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs
index 7b6c2d4d3..ad17595f8 100644
--- a/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs
@@ -48,8 +48,8 @@ namespace IRaCIS.Core.Application.Contracts
ShowOrder = x.ShowOrder,
Id = x.Id,
ParentId = x.ParentId,
- QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
-
+ QuestionName = x.QuestionName,
+ LanguageType=x.LanguageType,
TypeValue = x.TypeValue,
}).ToListAsync();
@@ -91,18 +91,19 @@ namespace IRaCIS.Core.Application.Contracts
[HttpPost]
- public async Task> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure)
+ public async Task> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure)
{
var QCQuestionQueryable = _qcQuestionRepository
.WhereIf(queryQCQuestionConfigure.IsEnable != null,x=>x.IsEnable== queryQCQuestionConfigure.IsEnable)
- .WhereIf(!string.IsNullOrWhiteSpace(queryQCQuestionConfigure.QuestionName), t => t.QuestionName.Contains(queryQCQuestionConfigure.QuestionName) || t.QuestionEnName.Contains(queryQCQuestionConfigure.QuestionName))
+ .WhereIf(!string.IsNullOrWhiteSpace(queryQCQuestionConfigure.QuestionName), t => t.QuestionName.Contains(queryQCQuestionConfigure.QuestionName))
.WhereIf(!string.IsNullOrWhiteSpace(queryQCQuestionConfigure.Type), t => t.Type.Contains(queryQCQuestionConfigure.Type))
- .WhereIf(queryQCQuestionConfigure.IsDefeaultViewParent==true,t=>t.ParentId==null)
+ .WhereIf(queryQCQuestionConfigure.LanguageType!=null, t =>t.LanguageType== queryQCQuestionConfigure.LanguageType)
+ .WhereIf(queryQCQuestionConfigure.IsDefeaultViewParent==true,t=>t.ParentId==null)
.OrderBy(t=>t.ShowOrder)
.ProjectTo(_mapper.ConfigurationProvider);
-
- return await QCQuestionQueryable.ToListAsync();
+
+ return await QCQuestionQueryable.ToPagedListAsync(queryQCQuestionConfigure.PageIndex, queryQCQuestionConfigure.PageSize, queryQCQuestionConfigure.SortField.IsNullOrEmpty()?nameof(queryQCQuestionConfigure.QuestionName): queryQCQuestionConfigure.SortField, queryQCQuestionConfigure.Asc);
}
public async Task AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure)
diff --git a/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs b/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs
index fe5f67ae1..dd384b16e 100644
--- a/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs
@@ -39,13 +39,14 @@ namespace IRaCIS.Core.Application.Contracts
var trialQCQuestionQueryable = _trialQcQuestionRepository.Where(t => t.TrialId == queryTrialQCQuestionConfigure.TrialId)
- .WhereIf(!string.IsNullOrWhiteSpace(queryTrialQCQuestionConfigure.QuestionName), t => t.QuestionName.Contains(queryTrialQCQuestionConfigure.QuestionName)|| t.QuestionEnName.Contains(queryTrialQCQuestionConfigure.QuestionName))
+ .WhereIf(!string.IsNullOrWhiteSpace(queryTrialQCQuestionConfigure.QuestionName), t => t.QuestionName.Contains(queryTrialQCQuestionConfigure.QuestionName))
.WhereIf(!string.IsNullOrWhiteSpace(queryTrialQCQuestionConfigure.Type), t => t.Type.Contains(queryTrialQCQuestionConfigure.Type))
.WhereIf(queryTrialQCQuestionConfigure.IsEnable != null, t => t.IsEnable == queryTrialQCQuestionConfigure.IsEnable)
.WhereIf(queryTrialQCQuestionConfigure.IsRequired != null, t => t.IsRequired == queryTrialQCQuestionConfigure.IsRequired)
+ .WhereIf(queryTrialQCQuestionConfigure.LanguageType != null, t => t.LanguageType == queryTrialQCQuestionConfigure.LanguageType)
- .ProjectTo(_mapper.ConfigurationProvider);
+ .ProjectTo(_mapper.ConfigurationProvider);
var list = await trialQCQuestionQueryable.OrderBy(t => t.ShowOrder).ToListAsync();
diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs
index dfc1c3f29..dbd55a6fa 100644
--- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs
@@ -303,13 +303,10 @@ namespace IRaCIS.Core.Application.Service
CreateMap();
- CreateMap()
- .ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
+ CreateMap();
- CreateMap()
- .ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
- CreateMap()
- .ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
+ CreateMap();
+ CreateMap();
CreateMap()
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs
index 19612bfee..95784d2ff 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs
@@ -575,8 +575,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public bool? IsConfirm { get; set; }
+ ///
+ /// 语言类型
+ ///
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
- public List Childrens { get; set; }
+
+ public List Childrens { get; set; }
}
public class TaskInfo
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicineQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicineQuestionViewModel.cs
index 0f3a879a8..5863a4d40 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicineQuestionViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicineQuestionViewModel.cs
@@ -24,9 +24,9 @@ namespace IRaCIS.Core.Application.ViewModel
public string QuestionName { get; set; } = string.Empty;
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType? LanguageType { get; set; }
public string TypeValue { get; set; } = string.Empty;
@@ -57,9 +57,9 @@ namespace IRaCIS.Core.Application.ViewModel
public string QuestionName { get; set; }
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
///
/// 类型值
@@ -175,9 +175,9 @@ namespace IRaCIS.Core.Application.ViewModel
public string QuestionName { get; set; }
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
///
/// 是否是必须
@@ -265,9 +265,9 @@ namespace IRaCIS.Core.Application.ViewModel
public string QuestionName { get; set; }
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
///
/// 类型值
@@ -329,9 +329,9 @@ namespace IRaCIS.Core.Application.ViewModel
public string QuestionName { get; set; } = string.Empty;
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType? LanguageType { get; set; }
public string TypeValue { get; set; } = string.Empty;
@@ -355,9 +355,9 @@ namespace IRaCIS.Core.Application.ViewModel
public string QuestionName { get; set; }
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public string TypeValue { get; set; }
public Guid TrialId { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs
index d18e815c9..7819c196b 100644
--- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs
@@ -355,19 +355,19 @@ namespace IRaCIS.Core.Application.Service
from leftquestionAnswer in questionAnswerTemp.DefaultIfEmpty()
select new ReadingMedicineQuestion()
{
- Id = data.Id,
- Type = data.Type,
- ParentTriggerValue = data.ParentTriggerValue ,
- QuestionEnName=data.QuestionEnName,
- IsEnable = data.IsEnable,
- IsConfirm = data.IsConfirm,
- QuestionName = data.QuestionName.LanguageName(data.QuestionEnName, _userInfo.IsEn_Us),
- IsRequired = data.IsRequired,
- ShowOrder = data.ShowOrder,
- ParentId = data.ParentId,
- TypeValue = data.TypeValue,
- Answer = leftquestionAnswer.Answer
- };
+ Id = data.Id,
+ Type = data.Type,
+ ParentTriggerValue = data.ParentTriggerValue,
+ LanguageType = data.LanguageType,
+ IsEnable = data.IsEnable,
+ IsConfirm = data.IsConfirm,
+ QuestionName = data.QuestionName,
+ IsRequired = data.IsRequired,
+ ShowOrder = data.ShowOrder,
+ ParentId = data.ParentId,
+ TypeValue = data.TypeValue,
+ Answer = leftquestionAnswer.Answer
+ };
var questionList = await questionQuery.OrderBy(x=>x.ShowOrder).ToListAsync();
diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs
index fd89af94c..dfa6fc058 100644
--- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs
@@ -52,13 +52,14 @@ namespace IRaCIS.Core.Application.Service
var query = _readingMedicineSystemQuestionRepository.AsQueryable()
.WhereIf(!inDto.TypeValue.IsNullOrEmpty(), x => x.TypeValue.Contains(inDto.TypeValue))
.WhereIf(!inDto.ParentTriggerValue.IsNullOrEmpty(), x => x.ParentTriggerValue.Contains(inDto.ParentTriggerValue))
- .WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName) || x.QuestionEnName.Contains(inDto.QuestionName))
+ .WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName) )
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
.WhereIf(inDto.CurrentCriterionType!=null,x=>x.CriterionTypeEnum==null||x.CriterionTypeEnum==inDto.CurrentCriterionType)
.WhereIf(inDto.CriterionTypeEnum != null, x => x.CriterionTypeEnum==inDto.CriterionTypeEnum)
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.CriterionTypeEnum== criterionEnum || x.IsGeneral==true)
.WhereIf(inDto.IsGeneral != null, x => x.IsGeneral == inDto.IsGeneral)
+ .WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType.Value)
.ProjectTo(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize,inDto.SortField,inDto.Asc);
@@ -85,8 +86,8 @@ namespace IRaCIS.Core.Application.Service
.Select(x => new GetReadingMedicineTrialOtherQuestionOutDto()
{
Id = x.Id,
- QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
- QuestionEnName =x.QuestionEnName,
+ QuestionName = x.QuestionName,
+ LanguageType =x.LanguageType,
TypeValue = x.TypeValue,
ReadingCategory = x.ReadingCategory,
}).ToListAsync();
@@ -153,9 +154,10 @@ namespace IRaCIS.Core.Application.Service
.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == inDto.TrialReadingCriterionId)
.WhereIf(!inDto.TypeValue.IsNullOrEmpty(), x => x.TypeValue.Contains(inDto.TypeValue))
.WhereIf(!inDto.ParentTriggerValue.IsNullOrEmpty(), x => x.ParentTriggerValue.Contains(inDto.ParentTriggerValue))
- .WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName)|| x.QuestionEnName.Contains(inDto.QuestionName))
+ .WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName))
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
+ .WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType)
.ProjectTo(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
@@ -191,8 +193,8 @@ namespace IRaCIS.Core.Application.Service
.Select(x => new GetReadingMedicineTrialOtherQuestionOutDto()
{
Id = x.Id,
- QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
- QuestionEnName=x.QuestionEnName,
+ QuestionName = x.QuestionName,
+ LanguageType=x.LanguageType,
TypeValue = x.TypeValue,
ReadingCategory = x.ReadingCategory,
}).ToListAsync();
@@ -466,9 +468,9 @@ namespace IRaCIS.Core.Application.Service
Id = NewId.NextGuid(),
ShowOrder = x.ShowOrder,
IsEnable = x.IsEnable,
- QuestionEnName=x.QuestionEnName,
+ LanguageType = x.LanguageType,
IsRequired = x.IsRequired,
- QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
+ QuestionName = x.QuestionName,
TrialReadingCriterionId=inDto.TrialReadingCriterionId,
Type = x.Type,
ParentId=x.ParentId,
diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
index df259b258..9d481d5a7 100644
--- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
@@ -237,8 +237,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap()
.ForMember(x=>x.ParentShowOrder,y=>y.MapFrom(n=>n.ParentQuestion.ShowOrder));
- CreateMap()
- .ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
+ CreateMap();
CreateMap()
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs
index 4650b7434..dcf4d7a74 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs
@@ -44,7 +44,8 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task> GetTrialList(TrialQueryDTO searchParam)
{
- var multiModalityIdSelectCount = searchParam.ModalityIds.Count;
+
+ var multiModalityIdSelectCount = searchParam.ModalityIds.Count;
var multiCriteriaSelectCount = searchParam.CriterionIds.Count;
var multiReviewTypeSelectCount = searchParam.ReviewTypeIds.Count;
diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
index f73646437..d28d6890a 100644
--- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
+++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
@@ -16,10 +16,28 @@ namespace IRaCIS.Core.Domain.Share
public static readonly string Group = "group";
}
- ///
- /// 标准字典分类
- ///
- public enum CrterionDictionaryGroup
+
+ ///
+ /// 语言类型
+ ///
+ public enum LanguageType
+ {
+
+ ///
+ /// 中文
+ ///
+ Chinese = 0,
+
+ ///
+ /// 英文
+ ///
+ English = 1
+ }
+
+ ///
+ /// 标准字典分类
+ ///
+ public enum CrterionDictionaryGroup
{
///
diff --git a/IRaCIS.Core.Domain/QC/QCQuestion.cs b/IRaCIS.Core.Domain/QC/QCQuestion.cs
index b8d75e841..cfda8fefc 100644
--- a/IRaCIS.Core.Domain/QC/QCQuestion.cs
+++ b/IRaCIS.Core.Domain/QC/QCQuestion.cs
@@ -2,6 +2,7 @@
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2021-11-11 11:19:10
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
+using IRaCIS.Core.Domain.Share;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@@ -19,10 +20,11 @@ namespace IRaCIS.Core.Domain.Models
[Required]
public string QuestionName { get; set; } = string.Empty;
+
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
///
/// IsRequired
diff --git a/IRaCIS.Core.Domain/QC/TrialQCQuestion.cs b/IRaCIS.Core.Domain/QC/TrialQCQuestion.cs
index 0ec7ddc97..4c1791ec0 100644
--- a/IRaCIS.Core.Domain/QC/TrialQCQuestion.cs
+++ b/IRaCIS.Core.Domain/QC/TrialQCQuestion.cs
@@ -2,6 +2,7 @@
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2021-11-11 11:19:10
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
+using IRaCIS.Core.Domain.Share;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -30,9 +31,9 @@ namespace IRaCIS.Core.Domain.Models
public string QuestionName { get; set; } = string.Empty;
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
///
/// IsRequired
diff --git a/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicineSystemQuestion.cs b/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicineSystemQuestion.cs
index 87c7c1f8a..e3daa8584 100644
--- a/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicineSystemQuestion.cs
+++ b/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicineSystemQuestion.cs
@@ -35,9 +35,9 @@ namespace IRaCIS.Core.Domain.Models
public string QuestionName { get; set; }
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
///
/// 是否是必须
diff --git a/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicineTrialQuestion.cs b/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicineTrialQuestion.cs
index d4f74aebd..afc4cc6e9 100644
--- a/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicineTrialQuestion.cs
+++ b/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicineTrialQuestion.cs
@@ -37,9 +37,9 @@ namespace IRaCIS.Core.Domain.Models
public string QuestionName { get; set; }
///
- /// 问题英文名称
+ /// 语言类型
///
- public string QuestionEnName { get; set; } = string.Empty;
+ public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
///
/// 修改人
diff --git a/IRaCIS.Core.Domain/_Config/_StaticData.cs b/IRaCIS.Core.Domain/_Config/_StaticData.cs
index c77d20da2..daf810d2b 100644
--- a/IRaCIS.Core.Domain/_Config/_StaticData.cs
+++ b/IRaCIS.Core.Domain/_Config/_StaticData.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
+using System.Threading;
namespace IRaCIS.Core.Domain.Share;
@@ -16,11 +17,52 @@ public static class StaticData
public static readonly string Zh_CN_Json = "zh-CN.json";
-
+ ///
+ /// 获取国际化
+ ///
+ ///
+ ///
+ public static string International(string key, params object?[] args)
+ {
+ try
+ {
+ return string.Format(GetLanguageDictionary(key), args);
+ }
+ catch (Exception)
+ {
+
+ return string.Empty;
+ }
+ }
- #region 字典表项固定值
- public static readonly string Title = "Title";
+ public static string GetLanguageDictionary(string key)
+ {
+ try
+ {
+ var type = Thread.CurrentThread.CurrentUICulture.Name;
+ if (type == "zh-CN")
+ {
+ return Zh_CN_Dic[key];
+
+ }
+ else
+ {
+ return En_US_Dic[key];
+
+ }
+ }
+ catch (Exception)
+ {
+
+ return string.Empty;
+ }
+
+ }
+
+
+ #region 字典表项固定值
+ public static readonly string Title = "Title";
public static readonly string ReadingType = "ReadingType";
public static readonly string Subspeciality = "Subspeciality";
diff --git a/后端提示语.xlsx b/后端提示语.xlsx
index b6c5e9b61..bdba57b20 100644
Binary files a/后端提示语.xlsx and b/后端提示语.xlsx differ