修改
This commit is contained in:
@@ -460,7 +460,39 @@ namespace IRaCIS.Core.API.Controllers
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传医学审核图片
|
||||
/// </summary>
|
||||
/// <param name="trialId"></param>
|
||||
/// <param name="taskMedicalReviewId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("TaskMedicalReview/UploadMedicalReviewImage/{trialId:guid}/{taskMedicalReviewId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> UploadMedicalReviewImage(Guid trialId, Guid taskMedicalReviewId)
|
||||
{
|
||||
string path = string.Empty;
|
||||
|
||||
await FileUploadAsync(async (fileName) =>
|
||||
{
|
||||
|
||||
var (serverFilePath, relativePath, fileRealName) = FileStoreHelper.GetMedicalReviewImage(_hostEnvironment, fileName, trialId, taskMedicalReviewId);
|
||||
|
||||
|
||||
await _repository.UpdatePartialFromQueryAsync<TaskMedicalReview>(x => x.Id == taskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
ImagePath = relativePath
|
||||
});
|
||||
|
||||
path = relativePath;
|
||||
|
||||
return serverFilePath;
|
||||
});
|
||||
|
||||
await _repository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(path);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传非Dicom 文件 支持压缩包 多文件上传
|
||||
|
||||
Reference in New Issue
Block a user