This commit is contained in:
2023-05-05 10:08:49 +08:00
25 changed files with 229 additions and 127 deletions
@@ -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;