修改归档接口
parent
671c73c874
commit
90ff700aa4
|
@ -73,12 +73,8 @@ namespace IRaCIS.Api.Controllers
|
|||
public async Task<IResponseOutput> ArchiveStudy([FromForm] ArchiveStudyCommand archiveStudyCommand)
|
||||
{
|
||||
|
||||
DataInspectionAddDTO data = JsonConvert.DeserializeObject<DataInspectionAddDTO>(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<string, object> keyValuePairs = new Dictionary<string, object>();
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
|
||||
.ReplaceService<IModelCacheKeyFactory, DynamicModelCacheKeyFactoryDesignTimeSupport>();
|
||||
|
||||
//optionsBuilder.UseExceptionProcessor();
|
||||
optionsBuilder.UseExceptionProcessor();
|
||||
|
||||
//var config = new ConfigurationBuilder()
|
||||
// .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true).Build();
|
||||
|
|
Loading…
Reference in New Issue