修改一版
parent
ce097f0acb
commit
fe5050a461
|
@ -460,6 +460,30 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传Reading问题的图像
|
||||
/// </summary>
|
||||
/// <param name="trialId"></param>
|
||||
/// <param name="visitTaskId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("VisitTask/UploadReadingAnswerImage/{trialId:guid}/{visitTaskId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput<FileDto>> UploadReadingAnswerImage(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;
|
||||
});
|
||||
|
||||
|
||||
return ResponseOutput.Ok(fileDto);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传裁判任务的图像
|
||||
/// </summary>
|
||||
|
|
|
@ -389,7 +389,7 @@ namespace IRaCIS.Application.Services
|
|||
var globalModule = await _readModuleRepository.Where(x => x.SubjectId == readModuleData.SubjectId && x.SubjectVisitId == readModuleData.SubjectVisitId&& x.ModuleType == ModuleTypeEnum.Global).FirstOrDefaultAsync();
|
||||
if (globalModule != null)
|
||||
{
|
||||
var globalTaskInfoList = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalModule.Id && x.TaskState == TaskState.Effect && x.ReadingTaskState == ReadingTaskState.HaveSigned).ToListAsync();
|
||||
var globalTaskInfoList = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalModule.Id && x.TaskState == TaskState.Effect && x.ReadingTaskState == ReadingTaskState.HaveSigned&&!x.IsAnalysisCreate).ToListAsync();
|
||||
|
||||
if (globalTaskInfoList.Count() > 0 && globalTaskInfoList.Count == (int)trialInfo.ReadingType)
|
||||
{
|
||||
|
|
|
@ -381,7 +381,7 @@ namespace IRaCIS.Application.Services
|
|||
var globalModuleIds = await _readModuleRepository.Where(x => subjectVisitIds.Contains(x.SubjectVisitId) && x.ModuleType == ModuleTypeEnum.Global).Select(x => x.Id).ToListAsync();
|
||||
|
||||
|
||||
var globalTaskInfo = await _visitTaskRepository.Where(x => globalModuleIds.Contains(x.SouceReadModuleId ?? default(Guid)) && x.TaskState == TaskState.Effect && x.ReadingTaskState == ReadingTaskState.HaveSigned).GroupBy(x=> new { x.SouceReadModuleId }).Select(x =>
|
||||
var globalTaskInfo = await _visitTaskRepository.Where(x => globalModuleIds.Contains(x.SouceReadModuleId ?? default(Guid)) && x.TaskState == TaskState.Effect && x.ReadingTaskState == ReadingTaskState.HaveSigned&&!x.IsAnalysisCreate).GroupBy(x=> new { x.SouceReadModuleId }).Select(x =>
|
||||
new {
|
||||
SouceReadModuleId=x.Key.SouceReadModuleId,
|
||||
Count=x.ToList().Count,
|
||||
|
|
|
@ -42,6 +42,8 @@ public static class StaticData
|
|||
|
||||
public static readonly string JudgeTask = "JudgeTask";
|
||||
|
||||
public static readonly string ReadingAnswer = "ReadingAnswer";
|
||||
|
||||
|
||||
public static readonly string UploadEDCData = "UploadEDCData";
|
||||
public static readonly string UploadFileFolder = "UploadFile";
|
||||
|
|
Loading…
Reference in New Issue