修改一版
parent
a74d3fc501
commit
691e024322
|
@ -460,6 +460,32 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传裁判任务的图像
|
||||
/// </summary>
|
||||
/// <param name="trialId"></param>
|
||||
/// <param name="visitTaskId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("VisitTask/UploadMedicalReviewImage/{trialId:guid}/{visitTaskId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput<FileDto>> UploadJudgeTaskImage(Guid trialId, Guid visitTaskId)
|
||||
{
|
||||
|
||||
FileDto fileDto = new FileDto();
|
||||
await FileUploadAsync(async (fileName) =>
|
||||
{
|
||||
var (serverFilePath, relativePath, fileRealName) = FileStoreHelper.GetFilePath(_hostEnvironment, fileName, trialId, visitTaskId, StaticData.Folder.JudgeTask);
|
||||
fileDto.Path = relativePath;
|
||||
fileDto.FileName = fileName;
|
||||
return serverFilePath;
|
||||
});
|
||||
|
||||
await _repository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(fileDto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传医学审核图片
|
||||
/// </summary>
|
||||
|
|
|
@ -345,6 +345,33 @@ public static class FileStoreHelper
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通用获取文件路径
|
||||
/// </summary>
|
||||
/// <param name="_hostEnvironment"></param>
|
||||
/// <param name="fileName"></param>
|
||||
/// <param name="trialId"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public static (string PhysicalPath, string RelativePath, string FileRealName) GetFilePath(IWebHostEnvironment _hostEnvironment, string fileName, Guid trialId, Guid id,string type)
|
||||
{
|
||||
var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
||||
|
||||
string uploadFolderPath = Path.Combine(rootPath, StaticData.Folder.TrialDataFolder, trialId.ToString(), id.ToString(), type);
|
||||
|
||||
if (!Directory.Exists(uploadFolderPath)) Directory.CreateDirectory(uploadFolderPath);
|
||||
|
||||
var (trustedFileNameForFileStorage, fileRealName) = FileStoreHelper.GetStoreFileName(fileName);
|
||||
|
||||
|
||||
var relativePath = $"/{StaticData.Folder.IRaCISDataFolder}/{StaticData.Folder.TrialDataFolder}/{trialId}/{id}/{type}/{trustedFileNameForFileStorage}";
|
||||
|
||||
var serverFilePath = Path.Combine(uploadFolderPath, trustedFileNameForFileStorage);
|
||||
|
||||
return (serverFilePath, relativePath, fileRealName);
|
||||
}
|
||||
|
||||
public static (string PhysicalPath, string RelativePath, string FileRealName) GetMedicalReviewImage(IWebHostEnvironment _hostEnvironment, string fileName, Guid trialId, Guid taskMedicalReviewId)
|
||||
{
|
||||
var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
||||
|
|
|
@ -153,6 +153,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 裁判结果的备注
|
||||
/// </summary>
|
||||
public string JudgeResultRemark { get; set; }
|
||||
|
||||
|
||||
public string JudgeResultImagePath { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class GetReadingPastResultListOutDto
|
||||
|
@ -182,6 +185,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public Guid JudgeResultTaskId { get; set; }
|
||||
|
||||
public string JudgeResultRemark { get; set; } = string.Empty;
|
||||
|
||||
public string JudgeResultImagePath { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class GetJudgeReadingInfo
|
||||
|
|
|
@ -372,12 +372,14 @@ namespace IRaCIS.Application.Services
|
|||
x.ReadingTaskState,
|
||||
x.JudgeResultTaskId,
|
||||
x.JudgeResultRemark,
|
||||
x.JudgeResultImagePath,
|
||||
}).FirstOrDefaultAsync();
|
||||
GetJudgeReadingInfoOutDto judgeInfo = new GetJudgeReadingInfoOutDto()
|
||||
{
|
||||
ReadingTaskState = visitTask.ReadingTaskState,
|
||||
JudgeResultTaskId = visitTask.JudgeResultTaskId,
|
||||
JudgeResultRemark=visitTask.JudgeResultRemark,
|
||||
JudgeResultImagePath= JudgeResultImagePath,
|
||||
VisitTaskInfoList = new List<JudgeReadingInfoDto>()
|
||||
};
|
||||
var visitIds = await _visitTaskRepository.Where(x => x.JudgeVisitTaskId == inDto.VisitTaskId).Select(x => new
|
||||
|
@ -415,6 +417,7 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
JudgeResultTaskId = inDto.JudgeResultTaskId,
|
||||
JudgeResultRemark = inDto.JudgeResultRemark,
|
||||
|
||||
});
|
||||
var result=await _visitTaskRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(result);
|
||||
|
@ -434,6 +437,7 @@ namespace IRaCIS.Application.Services
|
|||
ReadingTaskState = ReadingTaskState.HaveSigned,
|
||||
JudgeResultRemark = inDto.JudgeResultRemark,
|
||||
SignTime = DateTime.Now,
|
||||
JudgeResultImagePath=inDto.JudgeResultImagePath,
|
||||
});
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(result);
|
||||
|
|
|
@ -152,6 +152,12 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
public bool? IsGlobalHaveUpdate { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 裁判结果的图片路径
|
||||
/// </summary>
|
||||
public string JudgeResultImagePath { get; set; } = string.Empty;
|
||||
|
||||
#region 一致性分析的任务特有数据
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -40,6 +40,8 @@ public static class StaticData
|
|||
|
||||
public static readonly string MedicalReview = "MedicalReview";
|
||||
|
||||
public static readonly string JudgeTask = "JudgeTask";
|
||||
|
||||
|
||||
public static readonly string UploadEDCData = "UploadEDCData";
|
||||
public static readonly string UploadFileFolder = "UploadFile";
|
||||
|
|
Loading…
Reference in New Issue