From 3bb02ccb24f8396c5ec3780512fbe3e5b5badb31 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 24 Oct 2024 13:54:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 20 ++- .../Service/Management/_MapConfig.cs | 3 +- .../Reading/Dto/ReadingQuestionViewModel.cs | 159 ++++++++++++++++++ .../ReadingQuestionService.cs | 22 +-- .../Service/Reading/_MapConfig.cs | 10 +- 5 files changed, 196 insertions(+), 18 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 748a0ec80..5831202c8 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -13069,6 +13069,7 @@ + 通知PM 进行一致性核查 (018,030) @@ -13081,7 +13082,12 @@ - QC 领取了质控任务 + QC 领取了质控任务 (007,008) + + + + + QC 领取了质控任务 (007,008) @@ -15009,6 +15015,11 @@ TrialSiteSurveyQuery 列表查询参数模型 + + + + + TrialSiteSurveyAddOrEdit 列表查询参数模型 @@ -15048,6 +15059,13 @@ + + + 通过UserId获取Doctorid + + + + 验证邮箱验证码 获取医生信息Id diff --git a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs index 9680789ad..bd6289e3f 100644 --- a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs @@ -2,6 +2,7 @@ using AutoMapper.EquivalencyExpression; using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.Contracts; +using IRaCIS.Core.Application.Service.Reading.Dto; using IRaCIS.Core.Application.ViewModel; namespace IRaCIS.Core.Application.Service @@ -15,8 +16,6 @@ namespace IRaCIS.Core.Application.Service - - CreateMap().ForMember(d => d.UserCode, x => x.Ignore()); CreateMap().ReverseMap() .ForMember(t => t.UserTypeMenuList, u => u.MapFrom(c => c.MenuIds)) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 63d4b8d5f..92893e0ca 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -1598,6 +1598,165 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid QuestionId { get; set; } public string QuestionName { get; set; } + + [NotMapped] + public List ParentTriggerValueList + { + get + { + try + { + return this.ParentTriggerValue.Split(',').ToList(); + } + catch (Exception) + { + + return new List(); + } + } + + } + [NotMapped] + public List RelevanceValueList + { + get + { + try + { + return this.RelevanceValue.Split(',').ToList(); + } + catch (Exception) + { + + return new List(); + } + } + + } + + [Comment("系统表的问题Id ReadingQuestionSystem的Id")] + public Guid ReadingQuestionId { get; set; } + + public string Type { get; set; } = string.Empty; + public Guid? ParentId { get; set; } + + [Comment("父问题触发值")] + public string ParentTriggerValue { get; set; } = string.Empty; + + + + + public IsRequired IsRequired { get; set; } + + [Comment("排序号")] + public int ShowOrder { get; set; } + + [Comment("值")] + public string TypeValue { get; set; } = string.Empty; + + [Comment("是否启用")] + public bool IsEnable { get; set; } + + [Comment("备注")] + public string Remark { get; set; } = string.Empty; + + [Comment("显示父问题")] + public Guid? RelevanceId { get; set; } + + [Comment("显示父问题的值")] + public string RelevanceValue { get; set; } = string.Empty; + + [Comment("是否显示")] + public int ShowQuestion { get; set; } + + [Comment("最大问题数")] + public int? MaxRowCount { get; set; } + + [Comment("图片数量")] + public int? ImageCount { get; set; } + + [Comment("数据表名称")] + public string DataTableName { get; set; } = string.Empty; + + [Comment("数据列")] + public string DataTableColumn { get; set; } = string.Empty; + [Comment("关联父问题")] + public Guid? DependParentId { get; set; } + + [Comment("是否关联")] + public IsDepend IsDepend { get; set; } + + [Comment("表格问题类型")] + public TableQuestionType? TableQuestionType { get; set; } + + [Comment("系统标准Id")] + public Guid SystemCriterionId { get; set; } + + [Comment("问题标识")] + public QuestionMark? QuestionMark { get; set; } + + [Comment("字典code")] + public string DictionaryCode { get; set; } = string.Empty; + [Comment("数值类型")] + public ValueOfType? ValueType { get; set; } + + [Comment("单位")] + public ValueUnit? Unit { get; set; } + + [Comment("问题英文名称")] + public string QuestionEnName { get; set; } = string.Empty; + + [Comment("数据来源")] + public DataSources DataSource { get; set; } = DataSources.ManualEntry; + + [Comment("限制编辑")] + public LimitEdit LimitEdit { get; set; } = LimitEdit.None; + + [Comment("最大答案长度")] + public int? MaxAnswerLength { get; set; } + + [Comment("文件类型")] + public string? FileType { get; set; } = string.Empty; + + [Comment("问题分类")] + public QuestionClassify? QuestionClassify { get; set; } + + [Comment("复制病灶的时候 是否复制这个问题")] + public bool IsCopy { get; set; } = false; + + [Comment("分类问题表格Id")] + public Guid? ClassifyTableQuestionId { get; set; } + + [Comment("分类类型")] + public ClassifyType? ClassifyType { get; set; } + + [Comment("分类算法")] + public string ClassifyAlgorithms { get; set; } = string.Empty; + + [Comment("导出标识")] + public ExportIdentification? ExportIdentification { get; set; } + + [Comment("导出结果")] + public string ExportResultStr { get; set; } = "[]"; + + [NotMapped] + public List ExportResult + { + get + { + try + { + var result = JsonConvert.DeserializeObject>(this.ExportResultStr); + return result == null ? new List() : result; + } + catch (Exception) + { + + return new List(); + } + + } + } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs index 63d36a437..78a91e998 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs @@ -152,13 +152,10 @@ namespace IRaCIS.Core.Application.Service .Where(x => x.ReadingQuestionId == inDto.QuestionId) .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type) .OrderBy(x => x.ShowOrder) - .Select(x => new GetCalculateTableQuestionsOutDto - () - { - QuestionId = x.Id, - QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us) - - }).ToListAsync(); + .ProjectTo(_mapper.ConfigurationProvider, new + { + isEn_Us = _userInfo.IsEn_Us, + }).ToListAsync(); return result; } @@ -177,13 +174,10 @@ namespace IRaCIS.Core.Application.Service .Where(x => x.ReadingQuestionId == inDto.QuestionId) .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type) .OrderBy(x => x.ShowOrder) - .Select(x => new GetCalculateTableQuestionsOutDto - () - { - QuestionId = x.Id, - QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us) - - }).ToListAsync(); + .ProjectTo(_mapper.ConfigurationProvider, new + { + isEn_Us = _userInfo.IsEn_Us, + }).ToListAsync(); return result; } diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index 3a55897d4..1e88652d7 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -228,7 +228,15 @@ namespace IRaCIS.Core.Application.Service CreateMap(); - CreateMap(); + 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() .ForMember(dest => dest.CreateUser, opt => opt.Ignore())