修改缓存,删除限制
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
4de4e36e73
commit
ed2a777fd4
|
|
@ -23,6 +23,7 @@ using SixLabors.ImageSharp.Formats.Jpeg;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using FellowOakDicom.Imaging.Codec;
|
||||||
|
|
||||||
namespace IRaCIS.Core.SCP.Service
|
namespace IRaCIS.Core.SCP.Service
|
||||||
{
|
{
|
||||||
|
|
@ -325,6 +326,9 @@ namespace IRaCIS.Core.SCP.Service
|
||||||
{
|
{
|
||||||
await request.File.SaveAsync(ms);
|
await request.File.SaveAsync(ms);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//irc 从路径最后一截取Guid
|
//irc 从路径最后一截取Guid
|
||||||
storeRelativePath = await ossService.UploadToOSSAsync(ms, ossFolderPath, instanceId.ToString(), false);
|
storeRelativePath = await ossService.UploadToOSSAsync(ms, ossFolderPath, instanceId.ToString(), false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,11 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var entity = await _hIRHospitalRepository.InsertOrUpdateAsync(addOrEditHIRHospital, true, exp, exp2);
|
var entity = await _hIRHospitalRepository.InsertOrUpdateAsync(addOrEditHIRHospital, true, exp, exp2);
|
||||||
|
|
||||||
|
var hospitalInfo = await _hIRHospitalRepository.Where(t => t.IsDefault == true).FirstNotNullAsync();
|
||||||
|
|
||||||
|
//更新了联网信息,也要变更缓存是否可以联网,防止修改
|
||||||
|
await _fusionCache.SetAsync(CacheKeys.Hospital, hospitalInfo, TimeSpan.FromDays(7));
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -161,6 +166,11 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpDelete("{hIRHospitalId:guid}")]
|
[HttpDelete("{hIRHospitalId:guid}")]
|
||||||
public async Task<IResponseOutput> DeleteHIRHospital(Guid hIRHospitalId)
|
public async Task<IResponseOutput> DeleteHIRHospital(Guid hIRHospitalId)
|
||||||
{
|
{
|
||||||
|
if (_hIRHospitalRepository.Any(t => t.Id == hIRHospitalId && t.IsDefault == true))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk(_localizer["Patient_CannotDeleteDefaultHospital"]);
|
||||||
|
}
|
||||||
|
|
||||||
var success = await _hIRHospitalRepository.DeleteFromQueryAsync(t => t.Id == hIRHospitalId, true);
|
var success = await _hIRHospitalRepository.DeleteFromQueryAsync(t => t.Id == hIRHospitalId, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue