|
|
@@ -175,6 +175,16 @@ public class PerformanceService {
|
|
|
dto.setSuperiorScore(findExisting(periodId, userId, ScoreType.SUPERIOR));
|
|
|
dto.setFinalScore(findExisting(periodId, userId, ScoreType.FINAL));
|
|
|
|
|
|
+ if (dto.getSelfScore() != null) {
|
|
|
+ dto.setSelfItems(queryScoreItems(dto.getSelfScore().getId()));
|
|
|
+ }
|
|
|
+ if (dto.getSuperiorScore() != null) {
|
|
|
+ dto.setSuperiorItems(queryScoreItems(dto.getSuperiorScore().getId()));
|
|
|
+ }
|
|
|
+ if (dto.getFinalScore() != null) {
|
|
|
+ dto.setFinalItems(queryScoreItems(dto.getFinalScore().getId()));
|
|
|
+ }
|
|
|
+
|
|
|
dto.setFeedback(feedbackMapper.selectOne(
|
|
|
new LambdaQueryWrapper<PerformanceFeedback>()
|
|
|
.eq(PerformanceFeedback::getPeriodId, periodId)
|
|
|
@@ -378,6 +388,14 @@ public class PerformanceService {
|
|
|
}).toList();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private List<PerformanceScoreItem> queryScoreItems(Long scoreId) {
|
|
|
+ return scoreItemMapper.selectList(
|
|
|
+ new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<PerformanceScoreItem>()
|
|
|
+ .eq(PerformanceScoreItem::getScoreId, scoreId)
|
|
|
+ .orderByAsc(PerformanceScoreItem::getSortOrder));
|
|
|
+ }
|
|
|
+
|
|
|
private void writeScoreItems(Long scoreId, String commentsJson) {
|
|
|
if (commentsJson == null || commentsJson.isBlank()) return;
|
|
|
try {
|