diff --git a/src/main/java/ru/soune/nocopy/service/violation/ViolationService.java b/src/main/java/ru/soune/nocopy/service/violation/ViolationService.java index ddf3b2d..da4df11 100644 --- a/src/main/java/ru/soune/nocopy/service/violation/ViolationService.java +++ b/src/main/java/ru/soune/nocopy/service/violation/ViolationService.java @@ -72,16 +72,6 @@ public class ViolationService { List fileViolations = violationsByFileId.getOrDefault(file.getId(), Collections.emptyList()); - List violationDtos = fileViolations.stream() - .map(v -> ViolationInfoDTO.builder() - .violationId(v.getId()) - .url(v.getUrl()) - .pageUrl(v.getPageUrl()) - .host(v.getHost()) - .createdDate(v.getCreatedDate()) - .build()) - .collect(Collectors.toList()); - LocalDateTime latestDate = fileViolations.stream() .map(Violation::getCreatedDate) .max(LocalDateTime::compareTo) @@ -91,15 +81,12 @@ public class ViolationService { .fileId(file.getId()) .supportId(file.getSupportId()) .fileName(file.getOriginalFileName()) - .storedFileName(file.getStoredFileName()) - .filePath(file.getFilePath()) .fileSize(file.getFileSize()) .mimeType(file.getMimeType()) .status(file.getStatus()) .createdAt(file.getCreatedAt()) .violationCount(fileViolations.size()) .latestViolationDate(latestDate) - .violations(violationDtos) .build(); }) .collect(Collectors.toList());