From 4a46cd375521b932016496f118468a7afc408b1b Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Fri, 15 Apr 2022 11:10:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 175 ++++++++++++++++++ IRaCIS.Core.API.sln | 5 + .../Controllers/InspectionController.cs | 147 ++++++++++++++- IRaCIS.Core.API/IRaCIS.Core.API.csproj | 4 + IRaCIS.Core.API/IRaCIS.Core.API.xml | 56 ++++++ .../IRaCIS.Core.Application.xml | 56 +++--- .../Common/DTO/FrontAuditConfigViewModel.cs | 91 +++------ .../Service/Common/FrontAuditConfigService.cs | 4 + .../Service/Inspection/DTO/InspectionModel.cs | 36 ++++ .../QC/Interface/IQCOperationService.cs | 6 +- .../Service/QC/QCOperationService.cs | 17 +- .../Service/Visit/SubjectService.cs | 5 +- IRaCIS.Core.Domain/Common/FrontAuditConfig.cs | 27 +++ 13 files changed, 518 insertions(+), 111 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..e8bd25dfd --- /dev/null +++ b/.editorconfig @@ -0,0 +1,175 @@ +[*.cs] + +# CS8618: 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。 +dotnet_diagnostic.CS8618.severity = silent +csharp_space_around_binary_operators = before_and_after +csharp_indent_labels = no_change +csharp_using_directive_placement = outside_namespace:silent +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_conditional_delegate_call = true:suggestion +csharp_style_var_for_built_in_types = false:silent +csharp_style_var_when_type_is_apparent = false:silent +csharp_style_var_elsewhere = false:silent + +[*.{cs,vb}] +end_of_line = crlf +tab_width = 4 +indent_size = 4 +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_property = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_event = false:silent +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent +dotnet_code_quality_unused_parameters = all:suggestion +dotnet_style_readonly_field = true:suggestion +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_allow_multiple_blank_lines_experimental = true:silent +dotnet_style_allow_statement_immediately_after_block_experimental = true:silent +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion +dotnet_style_namespace_match_folder = true:suggestion +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent +[*.cs] +#### 命名样式 #### + +# 命名规则 + +dotnet_naming_rule.接口_should_be_以_i_开始.severity = suggestion +dotnet_naming_rule.接口_should_be_以_i_开始.symbols = 接口 +dotnet_naming_rule.接口_should_be_以_i_开始.style = 以_i_开始 + +dotnet_naming_rule.类型_should_be_帕斯卡拼写法.severity = suggestion +dotnet_naming_rule.类型_should_be_帕斯卡拼写法.symbols = 类型 +dotnet_naming_rule.类型_should_be_帕斯卡拼写法.style = 帕斯卡拼写法 + +dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.severity = suggestion +dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.symbols = 非字段成员 +dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.style = 帕斯卡拼写法 + +# 符号规范 + +dotnet_naming_symbols.接口.applicable_kinds = interface +dotnet_naming_symbols.接口.applicable_accessibilities = public, internal, private, protected, protected_internal +dotnet_naming_symbols.接口.required_modifiers = + +dotnet_naming_symbols.类型.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.类型.applicable_accessibilities = public, internal, private, protected, protected_internal +dotnet_naming_symbols.类型.required_modifiers = + +dotnet_naming_symbols.非字段成员.applicable_kinds = property, event, method +dotnet_naming_symbols.非字段成员.applicable_accessibilities = public, internal, private, protected, protected_internal +dotnet_naming_symbols.非字段成员.required_modifiers = + +# 命名样式 + +dotnet_naming_style.以_i_开始.required_prefix = I +dotnet_naming_style.以_i_开始.required_suffix = +dotnet_naming_style.以_i_开始.word_separator = +dotnet_naming_style.以_i_开始.capitalization = pascal_case + +dotnet_naming_style.帕斯卡拼写法.required_prefix = +dotnet_naming_style.帕斯卡拼写法.required_suffix = +dotnet_naming_style.帕斯卡拼写法.word_separator = +dotnet_naming_style.帕斯卡拼写法.capitalization = pascal_case + +dotnet_naming_style.帕斯卡拼写法.required_prefix = +dotnet_naming_style.帕斯卡拼写法.required_suffix = +dotnet_naming_style.帕斯卡拼写法.word_separator = +dotnet_naming_style.帕斯卡拼写法.capitalization = pascal_case +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_braces = true:silent +csharp_style_namespace_declarations = block_scoped:silent +csharp_prefer_static_local_function = true:suggestion +csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent +csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent +csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent +csharp_style_prefer_switch_expression = true:suggestion +csharp_style_prefer_pattern_matching = true:silent +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_prefer_not_pattern = true:suggestion +csharp_style_prefer_extended_property_pattern = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_prefer_null_check_over_type_check = true:suggestion +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_prefer_local_over_anonymous_function = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion +csharp_style_prefer_tuple_swap = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent + +[*.vb] +#### 命名样式 #### + +# 命名规则 + +dotnet_naming_rule.interface_should_be_以_i_开始.severity = suggestion +dotnet_naming_rule.interface_should_be_以_i_开始.symbols = interface +dotnet_naming_rule.interface_should_be_以_i_开始.style = 以_i_开始 + +dotnet_naming_rule.类型_should_be_帕斯卡拼写法.severity = suggestion +dotnet_naming_rule.类型_should_be_帕斯卡拼写法.symbols = 类型 +dotnet_naming_rule.类型_should_be_帕斯卡拼写法.style = 帕斯卡拼写法 + +dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.severity = suggestion +dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.symbols = 非字段成员 +dotnet_naming_rule.非字段成员_should_be_帕斯卡拼写法.style = 帕斯卡拼写法 + +# 符号规范 + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.类型.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.类型.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected +dotnet_naming_symbols.类型.required_modifiers = + +dotnet_naming_symbols.非字段成员.applicable_kinds = property, event, method +dotnet_naming_symbols.非字段成员.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected +dotnet_naming_symbols.非字段成员.required_modifiers = + +# 命名样式 + +dotnet_naming_style.以_i_开始.required_prefix = I +dotnet_naming_style.以_i_开始.required_suffix = +dotnet_naming_style.以_i_开始.word_separator = +dotnet_naming_style.以_i_开始.capitalization = pascal_case + +dotnet_naming_style.帕斯卡拼写法.required_prefix = +dotnet_naming_style.帕斯卡拼写法.required_suffix = +dotnet_naming_style.帕斯卡拼写法.word_separator = +dotnet_naming_style.帕斯卡拼写法.capitalization = pascal_case + +dotnet_naming_style.帕斯卡拼写法.required_prefix = +dotnet_naming_style.帕斯卡拼写法.required_suffix = +dotnet_naming_style.帕斯卡拼写法.word_separator = +dotnet_naming_style.帕斯卡拼写法.capitalization = pascal_case diff --git a/IRaCIS.Core.API.sln b/IRaCIS.Core.API.sln index 2841877ac..cb23da7dd 100644 --- a/IRaCIS.Core.API.sln +++ b/IRaCIS.Core.API.sln @@ -25,6 +25,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.IdentityServer4 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.IdentityServer4.MVC", "IRaCIS.Core.IdentityServer4.MVC\IRaCIS.Core.IdentityServer4.MVC.csproj", "{F621ADD6-94E8-4A4B-998E-25B8EF15D39C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F852ABFB-88AC-48BE-B876-2228BE2373D6}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index 6fe058b93..f4bda54ba 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -7,6 +7,7 @@ using Castle.Core.Internal; using IRaCIS.Application.Contracts; using IRaCIS.Application.Interfaces; using IRaCIS.Core.Application.Contracts; +using IRaCIS.Core.Application.Contracts.DTO; using IRaCIS.Core.Application.Filter; using IRaCIS.Core.Application.Image.QA; using IRaCIS.Core.Application.Interfaces; @@ -77,8 +78,8 @@ namespace IRaCIS.Core.API.Controllers this._dataInspectionRepository = dataInspectionRepository; } - + #region 获取稽查数据 /// /// 获取稽查数据 /// @@ -88,6 +89,8 @@ namespace IRaCIS.Core.API.Controllers { return await _inspectionService.GetInspectionData(dto); } + #endregion + #region 影像质疑 /// @@ -107,6 +110,148 @@ namespace IRaCIS.Core.API.Controllers return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun); } + /// + /// 添加或者更新 QC核对问题列表 + /// + /// + /// + [HttpPost, Route("Inspection/QCOperation/AddOrUpdateQCQuestionAnswerList")] + [UnitOfWork] + public async Task AddOrUpdateQCQuestionAnswerList(DataInspectionDto opt) + + { + var fun = await _qCOperationService.AddOrUpdateQCQuestionAnswerList(opt.OptCommand.qcQuestionAnswerCommands, opt.OptCommand.trialId, opt.OptCommand.subjectVisitId,opt.OptCommand.trialQCProcess,opt.OptCommand.currentQCType); + if (!fun.IsSuccess) + { + return ResponseOutput.NotOk(fun.ErrorMessage); + } + return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun); + + + } + + + /// + /// 添加和更新质疑 + /// + [HttpPost, Route("Inspection/QCOperation/AddOrUpdateQCChallenge")] + [UnitOfWork] + public async Task AddOrUpdateQCChallenge(DataInspectionDto opt) + { + var fun = await _qCOperationService.AddOrUpdateQCChallenge(opt.OptCommand.qaQuestionCommand, opt.OptCommand.trialId, opt.OptCommand.trialQCProcess, opt.OptCommand.currentQCType); + if (!fun.IsSuccess) + { + return ResponseOutput.NotOk(fun.ErrorMessage); + } + return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun); + } + + + /// + /// 回复质疑 + /// + [HttpPost, Route("Inspection/QCOperation/AddQCChallengeReply")] + [UnitOfWork] + public async Task AddQCChallengeReply(DataInspectionDto opt) + + { + var fun = _qCOperationService.AddQCChallengeReply; + return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); + } + + /// + /// 关闭质疑 + /// + [HttpPost, Route("Inspection/QCOperation/CloseQCChallenge")] + [UnitOfWork] + public async Task CloseQCChallenge(DataInspectionDto opt) + { + var fun = await _qCOperationService.CloseQCChallenge(opt.OptCommand.qcChallengeId, opt.OptCommand.subjectVisitId, opt.OptCommand.closeEnum, opt.OptCommand.closeReason); + if (!fun.IsSuccess) + { + return ResponseOutput.NotOk(fun.ErrorMessage); + } + return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, null, fun); + } + + + + /// + /// 删除QC质疑记录 + /// + /// + /// + [HttpPost, Route("Inspection/QCOperation/DeleteQCChallenge")] + [UnitOfWork] + public async Task DeleteQCChallenge(DataInspectionDto opt) + { + var fun = _qCOperationService.DeleteQCChallenge; + + return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); + } + + + + /// + /// 一致性核查 质疑的添加/回复 + /// + [HttpPost, Route("Inspection/QCOperation/AddCheckChallengeReply")] + [UnitOfWork] + public async Task AddCheckChallengeReply(DataInspectionDto opt) + + { + var fun = _qCOperationService.AddCheckChallengeReply; + return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); + } + + + /// + /// 删除QC质疑记录 + /// + /// + /// + [HttpPost, Route("Inspection/QCOperation/CloseCheckChallenge")] + [UnitOfWork] + public async Task CloseCheckChallenge(DataInspectionDto opt) + { + var fun = _qCOperationService.CloseCheckChallenge; + + return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); + } + + /// + /// 手动设置一致性核查通过 + /// + [HttpPost, Route("Inspection/QCOperation/SetCheckPass")] + [UnitOfWork] + public async Task SetCheckPass(DataInspectionDto opt) + { + var fun = _qCOperationService.SetCheckPass; + return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); + } + + /// + /// CRC 请求回退 + /// + [HttpPost, Route("Inspection/QCOperation/CRCRequstCheckBack")] + [UnitOfWork] + public async Task CRCRequstCheckBack(DataInspectionDto opt) + { + var fun = _qCOperationService.CRCRequstCheckBack; + return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); + } + + + /// + /// 一致性核查 回退 对话记录不清除 只允许PM回退 + /// + [HttpPost, Route("Inspection/QCOperation/CheckBack")] + [UnitOfWork] + public async Task CheckBack(DataInspectionDto opt) + { + var fun = _qCOperationService.CheckBack; + return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); + } #endregion #region 影像上传 diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.csproj b/IRaCIS.Core.API/IRaCIS.Core.API.csproj index 30fb9224a..9d12b7c80 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.csproj +++ b/IRaCIS.Core.API/IRaCIS.Core.API.csproj @@ -98,6 +98,10 @@ + + + + Always diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml index 64333a11f..4410e08fe 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.xml +++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml @@ -65,6 +65,62 @@ + + + 添加或者更新 QC核对问题列表 + + + + + + + 添加和更新质疑 + + + + + 回复质疑 + + + + + 关闭质疑 + + + + + 删除QC质疑记录 + + + + + + + 一致性核查 质疑的添加/回复 + + + + + 删除QC质疑记录 + + + + + + + 手动设置一致性核查通过 + + + + + CRC 请求回退 + + + + + 一致性核查 回退 对话记录不清除 只允许PM回退 + + 疾病进展确认评估 diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 71eea224f..22cd5d21b 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -411,36 +411,6 @@ FrontAuditConfigView 列表视图模型 - - - 是否有签名 - - - - - 是否有原因 - - - - - 是否向前站位 - - - - - 标识 - - - - - 是否完成 - - - - - 是否加入计划 - - FrontAuditConfigQuery 列表查询参数模型 @@ -495,6 +465,26 @@ 是否加入计划 + + + 数据类型 + + + + + 子数据Lable + + + + + 子数据Value + + + + + 是否为特殊类型 + + SystemAnonymizationView 列表视图模型 @@ -1431,7 +1421,7 @@ - + 手动设置一致性核查通过 @@ -1446,7 +1436,7 @@ - + 一致性核查 回退 对话记录不清除 只允许PM回退 @@ -1462,7 +1452,7 @@ - + 添加或者更新 QC核对问题列表 两个人不能同时操作,就算意外进去了,提交数据,也不会覆盖前一个人数据, 后台已经做好判断 diff --git a/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs index 3597de01c..77d6e9206 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs @@ -9,28 +9,8 @@ using System.Collections.Generic; namespace IRaCIS.Core.Application.ViewModel { /// FrontAuditConfigView 列表视图模型 - public class FrontAuditConfigView + public class FrontAuditConfigView:FrontAuditConfig { - public Guid Id { get; set; } - public string Value { get; set; } = string.Empty; - public string ValueCN { get; set; } = string.Empty; - public string Description { get; set; } = string.Empty; - public DateTime CreateTime { get; set; } - public Guid CreateUserId { get; set; } - public DateTime UpdateTime { get; set; } - public Guid UpdateUserId { get; set; } - public string Code { get; set; } = string.Empty; - public Guid? ParentId { get; set; } - public bool? IsEnable { get; set; } - public bool? IsConfig { get; set; } - public string ModuleTypeId { get; set; } = string.Empty; - public string OptTypeId { get; set; } = string.Empty; - public string ChildrenTypeId { get; set; } = string.Empty; - - public string ConfigType { get; set; } = string.Empty; - - public bool? IsShowParent { get; set; } - public string ChildrenTypeValue { get; set; } = string.Empty; public string ChildrenTypeValueCN { get; set; } = string.Empty; @@ -40,55 +20,12 @@ namespace IRaCIS.Core.Application.ViewModel public string OptTypeValue { get; set; } = string.Empty; public string OptTypeValueCN { get; set; } = string.Empty; - public int? Sort { get; set; } - public string? EnumList { get; set; } - - public string? DictionaryKey { get; set; } - - public string? EnumType { get; set; } - - public string ObjectTypeId { get; set; } = string.Empty; public string ObjectTypeValue { get; set; } = string.Empty; public string ObjectTypeValueCN { get; set; } = string.Empty; - public bool? IsShowByTrialConfig { get; set; } - - public string ByTrialConfig { get; set; } = string.Empty; - - /// - /// 是否有签名 - /// - public bool? IsHaveSign { get; set; } - - /// - /// 是否有原因 - /// - public bool? IsHaveReason { get; set; } - - - /// - /// 是否向前站位 - /// - public bool? IsForwardPosition { get; set; } - - /// - /// 标识 - /// - public string Identification { get; set; } = string.Empty; - - /// - /// 是否完成 - /// - public bool? IsFinish { get; set; } - - /// - /// 是否加入计划 - /// - public bool? IsJoinPlan { get; set; } - } @@ -229,6 +166,32 @@ namespace IRaCIS.Core.Application.ViewModel + /// + /// 数据类型 + /// + + public string DataType { get; set; } + + /// + /// 子数据Lable + /// + + public string ChildDataLabel { get; set; } + + /// + /// 子数据Value + /// + + public string ChildDataValue { get; set; } + + + /// + /// 是否为特殊类型 + /// + + public bool? IsSpecialType { get; set; } + + } diff --git a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs index 5185d170b..7d1ef6616 100644 --- a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs +++ b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs @@ -184,6 +184,10 @@ namespace IRaCIS.Core.Application.Service IsHaveSign=data.IsHaveSign, IsFinish=data.IsFinish, IsJoinPlan=data.IsJoinPlan, + DataType=data.DataType, + ChildDataLabel=data.ChildDataLabel, + ChildDataValue=data.ChildDataValue, + IsSpecialType=data.IsSpecialType, }; query = query diff --git a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs index 54ccf1302..bf30ab12b 100644 --- a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs +++ b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs @@ -1,6 +1,8 @@ using Castle.Core.Internal; using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.Contracts; +using IRaCIS.Core.Application.Contracts.DTO; +using IRaCIS.Core.Domain.Share; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System; @@ -159,6 +161,40 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO } #endregion + public class SetCheckPassDto + { + public Guid qcChallengeId { get; set; } + public Guid subjectVisitId { get; set; } + public QCChallengeCloseEnum closeEnum { get; set; } + public string closeReason { get; set; } + } + + public class CloseQCChallengeDto + { + public Guid qcChallengeId { get; set; } + public Guid subjectVisitId { get; set; } + public QCChallengeCloseEnum closeEnum { get; set; } + public string closeReason { get; set; } + } + + public class AddOrUpdateQCChallengeDto + { + public QCChallengeCommand qaQuestionCommand { get; set; } + public Guid trialId { get; set; } + public TrialQCProcess trialQCProcess { get; set; } + public CurrentQC currentQCType { get; set; } + } + + public class AddOrUpdateQCQuestionAnswerListDto + { + public QCQuestionAnswerCommand[] qcQuestionAnswerCommands { get; set; } + public Guid trialId { get; set; } + public Guid subjectVisitId { get; set; } + public TrialQCProcess trialQCProcess { get; set; } + public CurrentQC currentQCType { get; set; } + + } + public class ObtainOrCancelQCTaskDto { diff --git a/IRaCIS.Core.Application/Service/QC/Interface/IQCOperationService.cs b/IRaCIS.Core.Application/Service/QC/Interface/IQCOperationService.cs index c07b13993..c5784d429 100644 --- a/IRaCIS.Core.Application/Service/QC/Interface/IQCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/Interface/IQCOperationService.cs @@ -10,17 +10,17 @@ namespace IRaCIS.Core.Application.Image.QA { public interface IQCOperationService { - Task CheckBack(Guid subjectVisitId, Guid signId); + Task CheckBack(Guid subjectVisitId); Task SetNeedReupload(Guid trialId, Guid signId, Guid qcChallengeId); Task QCPassedOrFailed(Guid trialId, Guid subjectVisitId, Guid signId, [FromRoute] AuditStateEnum auditState); - Task SetCheckPass(Guid subjectVisitId,Guid signId); + Task SetCheckPass(Guid subjectVisitId); Task> AddCheckChallengeReply(CheckChallengeDialogCommand checkDialogCommand); Task AddOrUpdateQCChallenge(QCChallengeCommand qaQuestionCommand, Guid trialId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType); - Task AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType, [FromServices] IServiceProvider serviceProvider); + Task AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType); Task AddQCChallengeReply(QADialogCommand qaDialogCommand); Task CloseCheckChallenge(Guid subjectVisitId); Task CloseQCChallenge(Guid qcChallengeId, Guid subjectVisitId, [FromRoute] QCChallengeCloseEnum closeEnum, [FromRoute] string closeReason); diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 7160d0cda..cce2d719f 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -31,11 +31,13 @@ namespace IRaCIS.Core.Application.Image.QA private readonly DicomFileStoreHelper _dicomFileStoreHelper; private readonly IRepository _subjectVisitRepository; private readonly IRepository _trialRepository; + private readonly IServiceProvider serviceProvider; private readonly IInspectionService _sinspectionService; private object _locker = new object(); public QCOperationService(DicomFileStoreHelper dicomFileStoreHelper, IRepository subjectVisitRepository, IRepository trialRepository, + IServiceProvider serviceProvider, IInspectionService sinspectionService, IRepository _trialRepository ) @@ -43,6 +45,7 @@ namespace IRaCIS.Core.Application.Image.QA _dicomFileStoreHelper = dicomFileStoreHelper; _subjectVisitRepository = subjectVisitRepository; this._trialRepository = trialRepository; + this.serviceProvider = serviceProvider; this._sinspectionService = sinspectionService; } @@ -400,7 +403,7 @@ namespace IRaCIS.Core.Application.Image.QA /// [HttpPut("{trialId:guid}/{signId:guid}/{subjectVisitId:guid}")] [TypeFilter(typeof(TrialResourceFilter))] - public async Task SetCheckPass(Guid subjectVisitId, Guid signId) + public async Task SetCheckPass(Guid subjectVisitId) { if (_userInfo.UserTypeEnumInt != (int)UserTypeEnum.ProjectManager) { @@ -429,9 +432,9 @@ namespace IRaCIS.Core.Application.Image.QA await _repository.SaveChangesAsync(); - var signSuccess = await _repository.UpdateFromQueryAsync(t => t.Id == signId, u => new TrialSign() { IsCompleted = true }); + //var signSuccess = await _repository.UpdateFromQueryAsync(t => t.Id == signId, u => new TrialSign() { IsCompleted = true }); - return ResponseOutput.Result(signSuccess); + return ResponseOutput.Result(true); } @@ -465,7 +468,7 @@ namespace IRaCIS.Core.Application.Image.QA /// [HttpPut("{trialId:guid}/{signId:guid}/{subjectVisitId:guid}")] [TypeFilter(typeof(TrialResourceFilter))] - public async Task CheckBack(Guid subjectVisitId, Guid signId) + public async Task CheckBack(Guid subjectVisitId) { if (_userInfo.UserTypeEnumInt != (int)UserTypeEnum.ProjectManager) { @@ -521,9 +524,9 @@ namespace IRaCIS.Core.Application.Image.QA var success = await _repository.SaveChangesAsync(); - var signSuccess = await _repository.UpdateFromQueryAsync(t => t.Id == signId, u => new TrialSign() { IsCompleted = true }); + // var signSuccess = await _repository.UpdateFromQueryAsync(t => t.Id == signId, u => new TrialSign() { IsCompleted = true }); - return ResponseOutput.Result(signSuccess && success); + return ResponseOutput.Result( success); } @@ -734,7 +737,7 @@ namespace IRaCIS.Core.Application.Image.QA /// [HttpPost("{trialId:guid}/{subjectVisitId:guid}/{trialQCProcess:int}/{currentQCType:int}")] [TypeFilter(typeof(TrialResourceFilter))] - public async Task AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType, [FromServices] IServiceProvider serviceProvider) + public async Task AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType) { //验证是否能操作 var verifyResult = await VerifyQCCanOpt(subjectVisitId); diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs index bee832a02..4c09c50a8 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs @@ -95,7 +95,6 @@ namespace IRaCIS.Application.Services await _repository.SaveChangesAsync(); - var createtime = DateTime.Now.AddSeconds(1); // 添加稽查记录 if (isadd) @@ -135,9 +134,9 @@ namespace IRaCIS.Application.Services VisitName = item.VisitName, VisitNum = item.VisitNum, IsBaseLine=item.IsBaseLine, - VisitExecuted= false, + VisitExecuted= "否", IsFinalVisit=item.IsFinalVisit, - PDState="None", + PDState="", IsLostVisit=item.IsLostVisit, }) diff --git a/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs b/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs index 308a1e3d3..0a663bc7e 100644 --- a/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs +++ b/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs @@ -147,6 +147,33 @@ namespace IRaCIS.Core.Domain.Models /// public bool? IsJoinPlan { get; set; } + /// + /// 数据类型 + /// + + public string DataType { get; set; } + + /// + /// 子数据Lable + /// + + public string ChildDataLabel { get; set; } + + /// + /// 子数据Value + /// + + public string ChildDataValue { get; set; } + + + + /// + /// 是否为特殊类型 + /// + + public bool? IsSpecialType { get; set; } + + } }