From 22ad2ab96e7da93f74b306a252da4e7ab43eba39 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 3 Aug 2022 12:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/Dto/ReadingQuestionViewModel.cs | 6 ++++++ .../Service/Reading/ReadingQuestionService.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 7867d5fcb..ec8c20a05 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -723,6 +723,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public int? DigitPlaces { get; set; } = 2; + /// + /// 排序 + /// + public int ShowOrder { get; set; } + + /// /// 是否是系统数据 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index aa66265ef..2b036e654 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -709,7 +709,7 @@ namespace IRaCIS.Application.Services .WhereIf(!inDto.CriterionName.IsNullOrEmpty(), x => x.CriterionName.Contains(inDto.CriterionName)) .ProjectTo(_mapper.ConfigurationProvider); - return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(ReadingQuestionCriterionTrialView.CriterionName) : inDto.SortField, + return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField.IsNullOrEmpty() ? nameof(ReadingQuestionCriterionTrialView.ShowOrder) : inDto.SortField, inDto.Asc); }