From b89029adfff86cfe8b985c44c950c828d3050dc3 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 10 Oct 2022 10:05: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 --- .../Reading/Dto/ReadingQuestionViewModel.cs | 12 +++++------ .../TrialSiteUser/TrialConfigService.cs | 2 +- IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs | 20 +++++++++++++++++++ .../Reading/ReadingQuestionSystem.cs | 2 +- .../Reading/ReadingQuestionTrial.cs | 2 +- .../Reading/ReadingTableQuestionSystem.cs | 2 +- .../Reading/ReadingTableQuestionTrial.cs | 2 +- 7 files changed, 31 insertions(+), 11 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index d7245cedc..ac9501345 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -124,7 +124,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 单位 /// - public string Unit { get; set; } = string.Empty; + public ValueUnit? Unit { get; set; } public Guid? Id { get; set; } @@ -185,7 +185,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 单位 /// - public string Unit { get; set; } = string.Empty; + public ValueUnit? Unit { get; set; } public Guid? Id { get; set; } public Guid ReadingQuestionId { get; set; } public string Type { get; set; } = string.Empty; @@ -628,7 +628,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 单位 /// - public string Unit { get; set; } = string.Empty; + public ValueUnit? Unit { get; set; } } public class ReadingQuestionSystemView @@ -641,7 +641,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 单位 /// - public string Unit { get; set; } = string.Empty; + public ValueUnit? Unit { get; set; } /// /// Id @@ -969,7 +969,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 单位 /// - public string Unit { get; set; } = string.Empty; + public ValueUnit? Unit { get; set; } /// /// 分组 @@ -1242,7 +1242,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 单位 /// - public string Unit { get; set; } = string.Empty; + public ValueUnit? Unit { get; set; } } public class GetSystemCriterionSelectDto diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index 296bf5ab6..e5cb85537 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -328,7 +328,7 @@ namespace IRaCIS.Core.Application }); - var result = await _trialRepository.SaveChangesAsync(); + var result = await _readingQuestionCriterionTrialRepository.SaveChangesAsync(); return ResponseOutput.Ok(result); diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index 619d32d96..ccf198321 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -16,6 +16,26 @@ namespace IRaCIS.Core.Domain.Share public static readonly string Group = "group"; } + + /// + /// 数值单位 + /// + public enum ValueUnit + { + None=0, + + /// + /// MM + /// + MM = 1, + + /// + /// CM + /// + CM = 2 + } + + /// /// 数值类型 /// diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs index 97a92d05e..d2b32e44b 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs @@ -148,7 +148,7 @@ namespace IRaCIS.Core.Domain.Models /// /// 单位 /// - public string Unit { get; set; } = string.Empty; + public ValueUnit? Unit { get; set; } [JsonIgnore] [ForeignKey("ReadingQuestionCriterionSystemId")] diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs index aa0b7e8c3..d05b2fb44 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs @@ -181,7 +181,7 @@ namespace IRaCIS.Core.Domain.Models /// /// 单位 /// - public string Unit { get; set; } = string.Empty; + public ValueUnit? Unit { get; set; } /// /// 分页标准 diff --git a/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs index 8ed050fad..95622c4bb 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingTableQuestionSystem.cs @@ -146,7 +146,7 @@ namespace IRaCIS.Core.Domain.Models /// /// 单位 /// - public string Unit { get; set; } = string.Empty; + public ValueUnit? Unit { get; set; } [ForeignKey("DependParentId")] public ReadingTableQuestionSystem DependParentQuestion { get; set; } diff --git a/IRaCIS.Core.Domain/Reading/ReadingTableQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingTableQuestionTrial.cs index 50f329c59..2503fe69f 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingTableQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingTableQuestionTrial.cs @@ -150,7 +150,7 @@ namespace IRaCIS.Core.Domain.Models /// /// 单位 /// - public string Unit { get; set; } = string.Empty; + public ValueUnit? Unit { get; set; } [JsonIgnore] [ForeignKey("DependParentId")]