Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
514a8a2d0f
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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('/'));
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -4595,6 +4595,11 @@
|
|||
是否确认
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingMedicineQuestion.LanguageType">
|
||||
<summary>
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TaskInfo.IsCurrentTask">
|
||||
<summary>
|
||||
是否是当前任务
|
||||
|
@ -7806,9 +7811,9 @@
|
|||
<member name="T:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionQuery">
|
||||
<summary>ReadingMedicineSystemQuestionQuery 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionQuery.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionQuery.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionQuery.ReadingCategory">
|
||||
|
@ -7816,9 +7821,9 @@
|
|||
任务类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.GetReadingMedicineTrialOtherQuestionOutDto.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.GetReadingMedicineTrialOtherQuestionOutDto.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.GetReadingMedicineTrialOtherQuestionOutDto.TypeValue">
|
||||
|
@ -7869,9 +7874,9 @@
|
|||
问题名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionAddOrEdit.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionAddOrEdit.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineSystemQuestionAddOrEdit.IsRequired">
|
||||
|
@ -7924,9 +7929,9 @@
|
|||
问题名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.GetMedicineQuestionPreviewOutDto.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.GetMedicineQuestionPreviewOutDto.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.GetMedicineQuestionPreviewOutDto.TypeValue">
|
||||
|
@ -7972,9 +7977,9 @@
|
|||
项目Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionQuery.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionQuery.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionQuery.ReadingCategory">
|
||||
|
@ -7985,9 +7990,9 @@
|
|||
<member name="T:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionAddOrEdit">
|
||||
<summary> ReadingMedicineTrialQuestionAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionAddOrEdit.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionAddOrEdit.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionAddOrEdit.ReadingCategory">
|
||||
|
@ -8363,17 +8368,17 @@
|
|||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionView.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionView.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.QCQuestionConfigureView">
|
||||
<summary> QCQuestionConfigureView 列表视图模型 </summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionConfigureView.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionConfigureView.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.QCQuestionQuery">
|
||||
|
@ -8382,9 +8387,9 @@
|
|||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionQuery.QuestionName">
|
||||
<summary> QuestionName</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionQuery.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionQuery.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionQuery.Type">
|
||||
|
@ -8393,22 +8398,22 @@
|
|||
<member name="T:IRaCIS.Core.Application.Contracts.QCQuestionAddOrEdit">
|
||||
<summary> QCQuestionAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionAddOrEdit.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.QCQuestionAddOrEdit.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.TrialQCQuestionConfigureView">
|
||||
<summary> TrialQCQuestionConfigureView 列表视图模型 </summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionConfigureView.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionConfigureView.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionSelect.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionSelect.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.TrialQCQuestionQuery">
|
||||
|
@ -8417,9 +8422,9 @@
|
|||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionQuery.QuestionName">
|
||||
<summary> QuestionName</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionQuery.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionQuery.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionQuery.Type">
|
||||
|
@ -8428,9 +8433,9 @@
|
|||
<member name="T:IRaCIS.Core.Application.Contracts.TrialQCQuestionAddOrEdit">
|
||||
<summary> TrialQCQuestionAddOrEdit 列表查询参数模型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionConfigureBatchAdd.QuestionEnName">
|
||||
<member name="P:IRaCIS.Core.Application.Contracts.TrialQCQuestionConfigureBatchAdd.LanguageType">
|
||||
<summary>
|
||||
问题英文名称
|
||||
语言类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Contracts.NoneDicomStudyService">
|
||||
|
|
|
@ -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."
|
||||
|
||||
}
|
||||
|
|
|
@ -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": "没有收件人"
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
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
|
|||
}
|
||||
|
||||
///<summary>QCQuestionQuery 列表查询参数模型</summary>
|
||||
public class QCQuestionQuery
|
||||
public class QCQuestionQuery:PageInput
|
||||
{
|
||||
///<summary> QuestionName</summary>
|
||||
public string QuestionName { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
public LanguageType? LanguageType { get; set; }
|
||||
|
||||
///<summary> TypeValue</summary>
|
||||
public string Type { get; set; } = String.Empty;
|
||||
|
@ -101,9 +102,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string QuestionName { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
public LanguageType? LanguageType { get; set; }
|
||||
|
||||
///<summary> TypeValue</summary>
|
||||
public string Type { get; set; }=String.Empty;
|
||||
|
@ -107,9 +108,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
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;
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
{
|
||||
Task<IResponseOutput> AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure);
|
||||
Task<IResponseOutput> DeleteQCQuestionConfigure(Guid qCQuestionConfigureId);
|
||||
Task<List<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure);
|
||||
Task<PageOutput<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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<List<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure)
|
||||
public async Task<PageOutput<QCQuestionConfigureView>> 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<QCQuestionConfigureView>(_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<IResponseOutput> AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure)
|
||||
|
|
|
@ -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<TrialQCQuestionConfigureView>(_mapper.ConfigurationProvider);
|
||||
.ProjectTo<TrialQCQuestionConfigureView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var list = await trialQCQuestionQueryable.OrderBy(t => t.ShowOrder).ToListAsync();
|
||||
|
||||
|
|
|
@ -303,13 +303,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<TrialQCQuestionConfigureBatchAdd, TrialQCQuestion>();
|
||||
|
||||
CreateMap<TrialQCQuestion, TrialQCQuestionSelect>()
|
||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
||||
CreateMap<TrialQCQuestion, TrialQCQuestionSelect>();
|
||||
|
||||
CreateMap<TrialQCQuestion, QCQuestionView>()
|
||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
||||
CreateMap<QCQuestion, QCQuestionView>()
|
||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
||||
CreateMap<TrialQCQuestion, QCQuestionView>();
|
||||
CreateMap<QCQuestion, QCQuestionView>();
|
||||
|
||||
|
||||
CreateMap<QCQuestion, QCQuestionConfigureView>()
|
||||
|
|
|
@ -575,8 +575,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public bool? IsConfirm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
public List<ReadingMedicineQuestion> Childrens { get; set; }
|
||||
|
||||
public List<ReadingMedicineQuestion> Childrens { get; set; }
|
||||
}
|
||||
|
||||
public class TaskInfo
|
||||
|
|
|
@ -24,9 +24,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
|
@ -175,9 +175,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是必须
|
||||
|
@ -265,9 +265,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
|
@ -329,9 +329,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
public string TypeValue { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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<ReadingMedicineSystemQuestionView>(_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<ReadingMedicineTrialQuestionView>(_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,
|
||||
|
|
|
@ -237,8 +237,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<ReadingMedicineTrialQuestion, ReadingMedicineTrialQuestionView>()
|
||||
.ForMember(x=>x.ParentShowOrder,y=>y.MapFrom(n=>n.ParentQuestion.ShowOrder));
|
||||
|
||||
CreateMap<ReadingMedicineTrialQuestion, GetMedicineQuestionPreviewOutDto>()
|
||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
||||
CreateMap<ReadingMedicineTrialQuestion, GetMedicineQuestionPreviewOutDto>();
|
||||
|
||||
|
||||
CreateMap<TaskMedicalReview, MedicalReviewInfo>()
|
||||
|
|
|
@ -44,7 +44,8 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<PageOutput<TrialDetailDTO>> GetTrialList(TrialQueryDTO searchParam)
|
||||
{
|
||||
var multiModalityIdSelectCount = searchParam.ModalityIds.Count;
|
||||
|
||||
var multiModalityIdSelectCount = searchParam.ModalityIds.Count;
|
||||
var multiCriteriaSelectCount = searchParam.CriterionIds.Count;
|
||||
var multiReviewTypeSelectCount = searchParam.ReviewTypeIds.Count;
|
||||
|
||||
|
|
|
@ -16,10 +16,28 @@ namespace IRaCIS.Core.Domain.Share
|
|||
public static readonly string Group = "group";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 标准字典分类
|
||||
/// </summary>
|
||||
public enum CrterionDictionaryGroup
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public enum LanguageType
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 中文
|
||||
/// </summary>
|
||||
Chinese = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 英文
|
||||
/// </summary>
|
||||
English = 1
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 标准字典分类
|
||||
/// </summary>
|
||||
public enum CrterionDictionaryGroup
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// IsRequired
|
||||
|
|
|
@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// IsRequired
|
||||
|
|
|
@ -35,9 +35,9 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是必须
|
||||
|
|
|
@ -37,9 +37,9 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// 修改人
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取国际化
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
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";
|
||||
|
||||
|
|
BIN
后端提示语.xlsx
BIN
后端提示语.xlsx
Binary file not shown.
Loading…
Reference in New Issue