修改一版

This commit is contained in:
he
2022-07-08 14:50:47 +08:00
parent a74d3fc501
commit 691e024322
6 changed files with 70 additions and 0 deletions
@@ -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);