From 90ff700aa4e3498eed99e790c6fb0f4c81f64186 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 9 May 2022 10:11:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BD=92=E6=A1=A3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Controllers/StudyController.cs | 12 ------------ .../Service/Visit/DTO/VisitPointViewModel.cs | 3 --- IRaCIS.Core.Domain/Common/JsonConvert.cs | 3 +++ IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs | 2 +- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/StudyController.cs b/IRaCIS.Core.API/Controllers/StudyController.cs index 80a548c9c..619f62b9a 100644 --- a/IRaCIS.Core.API/Controllers/StudyController.cs +++ b/IRaCIS.Core.API/Controllers/StudyController.cs @@ -73,12 +73,8 @@ namespace IRaCIS.Api.Controllers public async Task ArchiveStudy([FromForm] ArchiveStudyCommand archiveStudyCommand) { - DataInspectionAddDTO data = JsonConvert.DeserializeObject(archiveStudyCommand.AuditInfo); string studycode = string.Empty; - data.CreateTime = DateTime.Now; - //Stopwatch sw = new Stopwatch(); var startTime = DateTime.Now; - //sw.Start(); if (_provider.Exists("StudyUid_" + archiveStudyCommand.StudyInstanceUid)) { @@ -227,18 +223,10 @@ namespace IRaCIS.Api.Controllers } - data.GeneralId = archivedStudyIds[0]; - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("StyudCode", studycode); - data.JsonDetail = _inspectionService.AddJsonItem(data.JsonDetail, keyValuePairs); - //await _inspectionService.AddInspectionRecordAsync(data); } catch (Exception e) { - //section = await reader.ReadNextSectionAsync(); - - _logger.LogError(e.Message + e.StackTrace); _provider.Remove("StudyUid_" + archiveStudyCommand.StudyInstanceUid); } diff --git a/IRaCIS.Core.Application/Service/Visit/DTO/VisitPointViewModel.cs b/IRaCIS.Core.Application/Service/Visit/DTO/VisitPointViewModel.cs index 1e96d27fe..7bac14d09 100644 --- a/IRaCIS.Core.Application/Service/Visit/DTO/VisitPointViewModel.cs +++ b/IRaCIS.Core.Application/Service/Visit/DTO/VisitPointViewModel.cs @@ -205,9 +205,6 @@ namespace IRaCIS.Core.Application.Contracts public string StudyInstanceUid { get; set; } = String.Empty; - public string AuditInfo { get; set; }=string.Empty; - - //public Guid TrialId { get; set; } //public Guid SiteId { get; set; } diff --git a/IRaCIS.Core.Domain/Common/JsonConvert.cs b/IRaCIS.Core.Domain/Common/JsonConvert.cs index 0480f393e..b2cbfcaf9 100644 --- a/IRaCIS.Core.Domain/Common/JsonConvert.cs +++ b/IRaCIS.Core.Domain/Common/JsonConvert.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; +using System.Text.Json; using System.Threading.Tasks; namespace IRaCIS.Core.Domain.Common @@ -20,6 +21,8 @@ namespace IRaCIS.Core.Domain.Common settings.PreserveReferencesHandling = PreserveReferencesHandling.Objects; settings.ReferenceLoopHandling = ReferenceLoopHandling.Serialize; return JsonConvert.SerializeObject(obj, settings); + + //return JsonSerializer.Serialize(obj); } } } diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index 045defab2..bfc9e94fb 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -50,7 +50,7 @@ namespace IRaCIS.Core.Infra.EFCore .ReplaceService(); - //optionsBuilder.UseExceptionProcessor(); + optionsBuilder.UseExceptionProcessor(); //var config = new ConfigurationBuilder() // .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true).Build();