Compare commits
2 Commits
5baec1c4b9
...
42755c4a2a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42755c4a2a | ||
|
|
62930316f5 |
@ -452,6 +452,11 @@ public class WorkbenchJudgeScoreDto
|
||||
/// </summary>
|
||||
public bool HasPendingCorrection { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前评分单提交的记录画板 PNG 地址
|
||||
/// </summary>
|
||||
public string? AnnotationUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 评分单的动态评分项明细快照
|
||||
/// </summary>
|
||||
|
||||
@ -24,6 +24,7 @@ public class WorkbenchController : IDynamicApiController
|
||||
private readonly ISqlSugarRepository<EventSessionEntry> _entryRepository;
|
||||
private readonly ISqlSugarRepository<EventJudgeAssignment> _assignmentRepository;
|
||||
private readonly ISqlSugarRepository<EventJudgeScoreSheet> _sheetRepository;
|
||||
private readonly ISqlSugarRepository<EventJudgeScoreAttachment> _scoreAttachmentRepository;
|
||||
private readonly ISqlSugarRepository<EventScoreCorrection> _correctionRepository;
|
||||
private readonly ISqlSugarRepository<EventResult> _resultRepository;
|
||||
private readonly ISqlSugarRepository<EventResultVersion> _resultVersionRepository;
|
||||
@ -50,6 +51,7 @@ public class WorkbenchController : IDynamicApiController
|
||||
ISqlSugarRepository<EventSessionEntry> entryRepository,
|
||||
ISqlSugarRepository<EventJudgeAssignment> assignmentRepository,
|
||||
ISqlSugarRepository<EventJudgeScoreSheet> sheetRepository,
|
||||
ISqlSugarRepository<EventJudgeScoreAttachment> scoreAttachmentRepository,
|
||||
ISqlSugarRepository<EventScoreCorrection> correctionRepository,
|
||||
ISqlSugarRepository<EventResult> resultRepository,
|
||||
ISqlSugarRepository<EventResultVersion> resultVersionRepository,
|
||||
@ -75,6 +77,7 @@ public class WorkbenchController : IDynamicApiController
|
||||
_entryRepository = entryRepository;
|
||||
_assignmentRepository = assignmentRepository;
|
||||
_sheetRepository = sheetRepository;
|
||||
_scoreAttachmentRepository = scoreAttachmentRepository;
|
||||
_correctionRepository = correctionRepository;
|
||||
_resultRepository = resultRepository;
|
||||
_resultVersionRepository = resultVersionRepository;
|
||||
@ -381,6 +384,15 @@ public class WorkbenchController : IDynamicApiController
|
||||
|
||||
// 批量查询当前评分单的动态评分项明细,按评分单分组挂到各裁判评分下
|
||||
var sheetIds = sheets.Select(s => s.Id).ToList();
|
||||
var annotationUrls = sheetIds.Count == 0
|
||||
? new Dictionary<long, string>()
|
||||
: (await _scoreAttachmentRepository.AsQueryable()
|
||||
.Where(a => !a.DeleteMark && sheetIds.Contains(a.ScoreSheetId)
|
||||
&& a.IsCurrent && a.AttachmentType == "score_annotation_png")
|
||||
.Select(a => new { a.ScoreSheetId, a.FileUrl, a.CreatedTime })
|
||||
.ToListAsync())
|
||||
.GroupBy(a => a.ScoreSheetId)
|
||||
.ToDictionary(g => g.Key, g => g.OrderByDescending(a => a.CreatedTime).First().FileUrl);
|
||||
var scoreItems = await _scoreDetailRepository.AsQueryable()
|
||||
.Where(d => !d.DeleteMark && sheetIds.Contains(d.ScoreSheetId))
|
||||
.OrderBy(d => d.Sort)
|
||||
@ -437,6 +449,7 @@ public class WorkbenchController : IDynamicApiController
|
||||
IsDisqualified = sheet.IsDisqualified,
|
||||
SubmittedTime = sheet.SubmittedTime,
|
||||
HasPendingCorrection = pendingCorrectionSet.Contains(sheet.Id),
|
||||
AnnotationUrl = annotationUrls.GetValueOrDefault(sheet.Id),
|
||||
ScoreItems = scoreItems.Where(d => d.ScoreSheetId == sheet.Id).Select(d => new WorkbenchScoreItemDto
|
||||
{
|
||||
ItemCode = d.ItemCode,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user