修改一版

Uat_Study
he 2022-04-20 14:43:59 +08:00
parent 1cc7afa7d0
commit 2ad979bee9
4 changed files with 50 additions and 37 deletions

View File

@ -456,7 +456,7 @@ namespace IRaCIS.Core.API.Controllers
public async Task<IResponseOutput> deleteNoneDicomStudyFile(DataInspectionDto<IDDto> opt) public async Task<IResponseOutput> deleteNoneDicomStudyFile(DataInspectionDto<IDDto> opt)
{ {
var fun = _noneDicomStudyService.DeleteNoneDicomStudyFile; var fun = _noneDicomStudyService.DeleteNoneDicomStudyFile;
opt.AuditInfo.GeneralId = opt.OptCommand.Id; //opt.AuditInfo.GeneralId = opt.OptCommand.Id;
return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun);
} }

View File

@ -77,10 +77,12 @@
<PackageReference Include="MailKit" Version="3.2.0" /> <PackageReference Include="MailKit" Version="3.2.0" />
<PackageReference Include="MediatR" Version="10.0.1" /> <PackageReference Include="MediatR" Version="10.0.1" />
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="6.0.3" /> <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="6.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.4" />
<PackageReference Include="MimeKit" Version="3.2.0" /> <PackageReference Include="MimeKit" Version="3.2.0" />
<PackageReference Include="MiniExcel" Version="1.24.3" /> <PackageReference Include="MiniExcel" Version="1.24.3" />
<PackageReference Include="My.Extensions.Localization.Json" Version="3.0.0" /> <PackageReference Include="My.Extensions.Localization.Json" Version="3.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.0" /> <PackageReference Include="Panda.DynamicWebApi" Version="1.2.0" />
<PackageReference Include="Quartz" Version="3.4.0" /> <PackageReference Include="Quartz" Version="3.4.0" />
<PackageReference Include="SharpCompress" Version="0.31.0" /> <PackageReference Include="SharpCompress" Version="0.31.0" />

View File

@ -196,7 +196,7 @@ namespace IRaCIS.Core.Application.ViewModel
/// 日期类型 /// 日期类型
/// </summary> /// </summary>
public string DateType { get; set; } public string DateType { get; set; }=string.Empty;
} }

View File

@ -13,6 +13,7 @@ using IRaCIS.Core.Infra.EFCore;
using Newtonsoft.Json; using Newtonsoft.Json;
using IRaCIS.Core.Application.Service.Inspection.Interface; using IRaCIS.Core.Application.Service.Inspection.Interface;
using IRaCIS.Core.Application.Service.Inspection.DTO; using IRaCIS.Core.Application.Service.Inspection.DTO;
using Nito.AsyncEx;
namespace IRaCIS.Core.Application.Contracts namespace IRaCIS.Core.Application.Contracts
{ {
@ -28,6 +29,10 @@ namespace IRaCIS.Core.Application.Contracts
private readonly IInspectionService _inspectionService; private readonly IInspectionService _inspectionService;
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository; private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository;
private readonly AsyncLock _mutex = new AsyncLock();
public NoneDicomStudyService(IRepository<NoneDicomStudy> noneDicomStudyRepository, public NoneDicomStudyService(IRepository<NoneDicomStudy> noneDicomStudyRepository,
IHttpContextAccessor httpContext, IHttpContextAccessor httpContext,
IWebHostEnvironment hostEnvironment, IWebHostEnvironment hostEnvironment,
@ -57,6 +62,9 @@ namespace IRaCIS.Core.Application.Contracts
[TypeFilter(typeof(TrialResourceFilter))] [TypeFilter(typeof(TrialResourceFilter))]
public async Task<IResponseOutput<NoneDicomStudyAddReturnDto>> AddOrUpdateNoneDicomStudy(NoneDicomStudyAddOrEdit addOrEditNoneDicomStudy) public async Task<IResponseOutput<NoneDicomStudyAddReturnDto>> AddOrUpdateNoneDicomStudy(NoneDicomStudyAddOrEdit addOrEditNoneDicomStudy)
{ {
using (await _mutex.LockAsync())
{
var entity = await _noneDicomStudyRepository.InsertOrUpdateAsync(addOrEditNoneDicomStudy, false); var entity = await _noneDicomStudyRepository.InsertOrUpdateAsync(addOrEditNoneDicomStudy, false);
if (_repository.Entry(entity).State == Microsoft.EntityFrameworkCore.EntityState.Added) if (_repository.Entry(entity).State == Microsoft.EntityFrameworkCore.EntityState.Added)
@ -91,10 +99,13 @@ namespace IRaCIS.Core.Application.Contracts
NoneDicomStudyAddReturnDto noneDicom = new NoneDicomStudyAddReturnDto() NoneDicomStudyAddReturnDto noneDicom = new NoneDicomStudyAddReturnDto()
{ {
StudyCode= entity.StudyCode, StudyCode = entity.StudyCode,
Id= entity.Id Id = entity.Id
}; };
return ResponseOutput.Ok(noneDicom); return ResponseOutput.Ok(noneDicom);
}
} }