From 9bd129b98aa96141c85e6e182cc0f8f3f5502194 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 12 Apr 2022 18:01:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Controllers/InspectionController.cs | 4 ++++ IRaCIS.Core.API/IRaCIS.Core.API.xml | 9 ++++++++- IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 8 ++++++++ .../Service/Inspection/InspectionService.cs | 10 +++++++++- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index 1b5f410d2..465e5a0d0 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -145,6 +145,10 @@ namespace IRaCIS.Core.API.Controllers public async Task AddOrUpdateNoneDicomStudy(DataInspectionDto opt) { var fun = await _noneDicomStudyService.AddOrUpdateNoneDicomStudy(opt.OptCommand); + if (!fun.IsSuccess) + { + return ResponseOutput.NotOk(fun.ErrorMessage); + } if (opt.OptCommand.Id == null) { Dictionary keyValuePairs = new Dictionary(); diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml index 541c13275..b4b73046b 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.xml +++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml @@ -88,7 +88,14 @@ - 删除 + 删除非dicom + + + + + + + 删除非dicom文件 diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 7d9df1b29..316c114d6 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -285,6 +285,14 @@ + + + 往json里面添加属性 + + json + 字典 + + 处理枚举 diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index f08dcfbb1..ff1f0da3b 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -332,9 +332,17 @@ namespace IRaCIS.Core.Application.Service.Inspection { var JsonData = JsonConvert.DeserializeObject>(json); + foreach (var item in keyValues) { - JsonData.Add(item.Key, item.Value); + if (JsonData.ContainsKey(item.Key)) + { + JsonData[item.Key] = item.Value; + } + else { + JsonData.Add(item.Key, item.Value); + } + } return JsonConvert.SerializeObject(JsonData);