Uat_Study
parent
d1068711b4
commit
aebaa4b661
|
@ -400,7 +400,7 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("ClinicalData/UploadClinicalData/{trialId:guid}/{subjectId:guid}/{readingId:guid}")]
|
[HttpPost("ClinicalData/UploadClinicalData/{trialId:guid}/{subjectId:guid}/{readingId:guid}")]
|
||||||
[DisableRequestSizeLimit]
|
[DisableRequestSizeLimit]
|
||||||
public async Task<List<FileDto>> UploadReadClinicalData(Guid trialId,Guid subjectId,Guid readingId)
|
public async Task<IResponseOutput<List<FileDto>>> UploadReadClinicalData(Guid trialId,Guid subjectId,Guid readingId)
|
||||||
{
|
{
|
||||||
var filerelativePath = string.Empty;
|
var filerelativePath = string.Empty;
|
||||||
List<FileDto> fileDtos = new List<FileDto>();
|
List<FileDto> fileDtos = new List<FileDto>();
|
||||||
|
@ -412,23 +412,22 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
var (serverFilePath, relativePath, fileRealName) = FileStoreHelper.GetReadClinicalDataPath(_hostEnvironment, fileName, trialId, siteid, subjectId, readingId);
|
var (serverFilePath, relativePath, fileRealName) = FileStoreHelper.GetReadClinicalDataPath(_hostEnvironment, fileName, trialId, siteid, subjectId, readingId);
|
||||||
//插入临床pdf 路径
|
//插入临床pdf 路径
|
||||||
filerelativePath = relativePath;
|
filerelativePath = relativePath;
|
||||||
|
|
||||||
fileDtos.Add(new FileDto()
|
fileDtos.Add(new FileDto()
|
||||||
{
|
{
|
||||||
FileName = fileName,
|
FileName = fileName,
|
||||||
Path = serverFilePath
|
Path = serverFilePath
|
||||||
|
|
||||||
}); ;
|
});
|
||||||
return fileName;
|
return fileName;
|
||||||
});
|
});
|
||||||
|
|
||||||
return fileDtos;
|
return ResponseOutput.Ok(fileDtos);
|
||||||
// indto.AddFileList = fileDtos;
|
|
||||||
|
|
||||||
//await _iReadingClinicalDataService.AddOrUpdateReadingClinicalData(indto);
|
|
||||||
|
|
||||||
//return ResponseOutput.Ok(filerelativePath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 上传非Dicom 文件 支持压缩包 多文件上传
|
/// 上传非Dicom 文件 支持压缩包 多文件上传
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -52,7 +52,6 @@ namespace IRaCIS.Application.Services
|
||||||
var entity = _mapper.Map<ReadingClinicalData>(indto);
|
var entity = _mapper.Map<ReadingClinicalData>(indto);
|
||||||
entity.ReadingClinicalDataPDFList = indto.AddFileList.Select(x => new ReadingClinicalDataPDF()
|
entity.ReadingClinicalDataPDFList = indto.AddFileList.Select(x => new ReadingClinicalDataPDF()
|
||||||
{
|
{
|
||||||
|
|
||||||
TrialId = entity.TrialId,
|
TrialId = entity.TrialId,
|
||||||
SubjectId= indto.SubjectId,
|
SubjectId= indto.SubjectId,
|
||||||
FileName=x.FileName,
|
FileName=x.FileName,
|
||||||
|
@ -71,9 +70,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
var entity = (await _readingClinicalDataRepository.Where(t => t.Id == indto.Id, true).FirstOrDefaultAsync()).IfNullThrowException();
|
var entity = (await _readingClinicalDataRepository.Where(t => t.Id == indto.Id, true).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
_mapper.Map(indto, entity);
|
_mapper.Map(indto, entity);
|
||||||
|
|
||||||
await _readingClinicalDataPDFRepository.DeleteFromQueryAsync(x => indto.DeleteFileIds.Contains(x.Id));
|
await _readingClinicalDataPDFRepository.DeleteFromQueryAsync(x => indto.DeleteFileIds.Contains(x.Id));
|
||||||
|
|
||||||
var addFileList = indto.AddFileList.Select(x => new ReadingClinicalDataPDF()
|
var addFileList = indto.AddFileList.Select(x => new ReadingClinicalDataPDF()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -94,6 +91,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 删除
|
/// 删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -102,6 +100,7 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpDelete("{id:guid}")]
|
[HttpDelete("{id:guid}")]
|
||||||
public async Task<IResponseOutput> DeleteReadingClinicalData(Guid id)
|
public async Task<IResponseOutput> DeleteReadingClinicalData(Guid id)
|
||||||
{
|
{
|
||||||
|
|
||||||
await _readingClinicalDataRepository.DeleteFromQueryAsync(x => x.Id == id, true);
|
await _readingClinicalDataRepository.DeleteFromQueryAsync(x => x.Id == id, true);
|
||||||
return ResponseOutput.Result(true);
|
return ResponseOutput.Result(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue